vscode-basex #9

Merged
apb merged 5 commits from vscode-basex into master 2022-06-07 17:44:26 +01:00
21 changed files with 601 additions and 349 deletions

290
package-lock.json generated
View file

@ -1,13 +1,13 @@
{
"name": "vscode-basex",
"version": "0.0.27",
"version": "0.0.44",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@eslint/eslintrc": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz",
"integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz",
"integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==",
"dev": true,
"requires": {
"ajv": "^6.12.4",
@ -36,9 +36,9 @@
}
},
"@humanwhocodes/config-array": {
"version": "0.9.3",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz",
"integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==",
"version": "0.9.5",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz",
"integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==",
"dev": true,
"requires": {
"@humanwhocodes/object-schema": "^1.2.1",
@ -79,9 +79,9 @@
}
},
"@quodatum/xqlint": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/@quodatum/xqlint/-/xqlint-0.0.8.tgz",
"integrity": "sha512-3tTyu5PNjSh8fIxHcFJYIn0dQY3cSYbCcVl6q3hjdHwh8TNr1PiPEnoHMHFWQ9cR5ftIi6+47/h4t6qflKfYnw==",
"version": "0.0.11",
"resolved": "https://registry.npmjs.org/@quodatum/xqlint/-/xqlint-0.0.11.tgz",
"integrity": "sha512-G+pOGhrPRvCrgh3yE+U3lIavQrhPymdS1ILqd1bqgsWthF55c78D2lNDxwBn03PCpB6svh08UefkBBlm1hw3GA==",
"requires": {
"colors": "1.4.0",
"commander": "~2.3.0",
@ -144,9 +144,9 @@
"dev": true
},
"@types/vscode": {
"version": "1.64.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.64.0.tgz",
"integrity": "sha512-bSlAWz5WtcSL3cO9tAT/KpEH9rv5OBnm93OIIFwdCshaAiqr2bp1AUyEwW9MWeCvZBHEXc3V0fTYVdVyzDNwHA==",
"version": "1.65.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.65.0.tgz",
"integrity": "sha512-wQhExnh2nEzpjDMSKhUvnNmz3ucpd3E+R7wJkOhBNK3No6fG3VUdmVmMOKD0A8NDZDDDiQcLNxe3oGmX5SjJ5w==",
"dev": true
},
"@types/xmldom": {
@ -156,14 +156,14 @@
"dev": true
},
"@typescript-eslint/eslint-plugin": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.0.tgz",
"integrity": "sha512-fwCMkDimwHVeIOKeBHiZhRUfJXU8n6xW1FL9diDxAyGAFvKcH4csy0v7twivOQdQdA0KC8TDr7GGRd3L4Lv0rQ==",
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz",
"integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "5.12.0",
"@typescript-eslint/type-utils": "5.12.0",
"@typescript-eslint/utils": "5.12.0",
"@typescript-eslint/scope-manager": "5.13.0",
"@typescript-eslint/type-utils": "5.13.0",
"@typescript-eslint/utils": "5.13.0",
"debug": "^4.3.2",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.1.8",
@ -173,52 +173,52 @@
}
},
"@typescript-eslint/parser": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.0.tgz",
"integrity": "sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog==",
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz",
"integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "5.12.0",
"@typescript-eslint/types": "5.12.0",
"@typescript-eslint/typescript-estree": "5.12.0",
"@typescript-eslint/scope-manager": "5.13.0",
"@typescript-eslint/types": "5.13.0",
"@typescript-eslint/typescript-estree": "5.13.0",
"debug": "^4.3.2"
}
},
"@typescript-eslint/scope-manager": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz",
"integrity": "sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ==",
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz",
"integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.12.0",
"@typescript-eslint/visitor-keys": "5.12.0"
"@typescript-eslint/types": "5.13.0",
"@typescript-eslint/visitor-keys": "5.13.0"
}
},
"@typescript-eslint/type-utils": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.0.tgz",
"integrity": "sha512-9j9rli3zEBV+ae7rlbBOotJcI6zfc6SHFMdKI9M3Nc0sy458LJ79Os+TPWeBBL96J9/e36rdJOfCuyRSgFAA0Q==",
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz",
"integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==",
"dev": true,
"requires": {
"@typescript-eslint/utils": "5.12.0",
"@typescript-eslint/utils": "5.13.0",
"debug": "^4.3.2",
"tsutils": "^3.21.0"
}
},
"@typescript-eslint/types": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.0.tgz",
"integrity": "sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ==",
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz",
"integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz",
"integrity": "sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ==",
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz",
"integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.12.0",
"@typescript-eslint/visitor-keys": "5.12.0",
"@typescript-eslint/types": "5.13.0",
"@typescript-eslint/visitor-keys": "5.13.0",
"debug": "^4.3.2",
"globby": "^11.0.4",
"is-glob": "^4.0.3",
@ -227,26 +227,26 @@
}
},
"@typescript-eslint/utils": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.0.tgz",
"integrity": "sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==",
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz",
"integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.9",
"@typescript-eslint/scope-manager": "5.12.0",
"@typescript-eslint/types": "5.12.0",
"@typescript-eslint/typescript-estree": "5.12.0",
"@typescript-eslint/scope-manager": "5.13.0",
"@typescript-eslint/types": "5.13.0",
"@typescript-eslint/typescript-estree": "5.13.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
}
},
"@typescript-eslint/visitor-keys": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz",
"integrity": "sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg==",
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz",
"integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.12.0",
"@typescript-eslint/types": "5.13.0",
"eslint-visitor-keys": "^3.0.0"
}
},
@ -257,9 +257,9 @@
"dev": true
},
"@vscode/test-electron": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.1.2.tgz",
"integrity": "sha512-INjJ0YA9RgR1B/xBl8P4sxww4Dy2996f4Xn5oGTFfC0c2Mm45y/1Id8xmfuoba6tR5i8zZaUIHfEYWe7Rt4uZA==",
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.1.3.tgz",
"integrity": "sha512-ps/yJ/9ToUZtR1dHfWi1mDXtep1VoyyrmGKC3UnIbScToRQvbUjyy1VMqnMEW3EpMmC3g7+pyThIPtPyCLHyow==",
"dev": true,
"requires": {
"http-proxy-agent": "^4.0.1",
@ -707,162 +707,170 @@
}
},
"esbuild": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.23.tgz",
"integrity": "sha512-XjnIcZ9KB6lfonCa+jRguXyRYcldmkyZ99ieDksqW/C8bnyEX299yA4QH2XcgijCgaddEZePPTgvx/2imsq7Ig==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.25.tgz",
"integrity": "sha512-4JHEIOMNFvK09ziiL+iVmldIhLbn49V4NAVo888tcGFKedEZY/Y8YapfStJ6zSE23tzYPKxqKwQBnQoIO0BI/Q==",
"dev": true,
"requires": {
"esbuild-android-arm64": "0.14.23",
"esbuild-darwin-64": "0.14.23",
"esbuild-darwin-arm64": "0.14.23",
"esbuild-freebsd-64": "0.14.23",
"esbuild-freebsd-arm64": "0.14.23",
"esbuild-linux-32": "0.14.23",
"esbuild-linux-64": "0.14.23",
"esbuild-linux-arm": "0.14.23",
"esbuild-linux-arm64": "0.14.23",
"esbuild-linux-mips64le": "0.14.23",
"esbuild-linux-ppc64le": "0.14.23",
"esbuild-linux-riscv64": "0.14.23",
"esbuild-linux-s390x": "0.14.23",
"esbuild-netbsd-64": "0.14.23",
"esbuild-openbsd-64": "0.14.23",
"esbuild-sunos-64": "0.14.23",
"esbuild-windows-32": "0.14.23",
"esbuild-windows-64": "0.14.23",
"esbuild-windows-arm64": "0.14.23"
"esbuild-android-64": "0.14.25",
"esbuild-android-arm64": "0.14.25",
"esbuild-darwin-64": "0.14.25",
"esbuild-darwin-arm64": "0.14.25",
"esbuild-freebsd-64": "0.14.25",
"esbuild-freebsd-arm64": "0.14.25",
"esbuild-linux-32": "0.14.25",
"esbuild-linux-64": "0.14.25",
"esbuild-linux-arm": "0.14.25",
"esbuild-linux-arm64": "0.14.25",
"esbuild-linux-mips64le": "0.14.25",
"esbuild-linux-ppc64le": "0.14.25",
"esbuild-linux-riscv64": "0.14.25",
"esbuild-linux-s390x": "0.14.25",
"esbuild-netbsd-64": "0.14.25",
"esbuild-openbsd-64": "0.14.25",
"esbuild-sunos-64": "0.14.25",
"esbuild-windows-32": "0.14.25",
"esbuild-windows-64": "0.14.25",
"esbuild-windows-arm64": "0.14.25"
}
},
"esbuild-android-64": {
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.25.tgz",
"integrity": "sha512-L5vCUk7TzFbBnoESNoXjU3x9+/+7TDIE/1mTfy/erAfvZAqC+S3sp/Qa9wkypFMcFvN9FzvESkTlpeQDolREtQ==",
"dev": true,
"optional": true
},
"esbuild-android-arm64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.23.tgz",
"integrity": "sha512-k9sXem++mINrZty1v4FVt6nC5BQCFG4K2geCIUUqHNlTdFnuvcqsY7prcKZLFhqVC1rbcJAr9VSUGFL/vD4vsw==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.25.tgz",
"integrity": "sha512-4jv5xPjM/qNm27T5j3ZEck0PvjgQtoMHnz4FzwF5zNP56PvY2CT0WStcAIl6jNlsuDdN63rk2HRBIsO6xFbcFw==",
"dev": true,
"optional": true
},
"esbuild-darwin-64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.23.tgz",
"integrity": "sha512-lB0XRbtOYYL1tLcYw8BoBaYsFYiR48RPrA0KfA/7RFTr4MV7Bwy/J4+7nLsVnv9FGuQummM3uJ93J3ptaTqFug==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.25.tgz",
"integrity": "sha512-TGp8tuudIxOyWd1+8aYPxQmC1ZQyvij/AfNBa35RubixD0zJ1vkKHVAzo0Zao1zcG6pNqiSyzfPto8vmg0s7oA==",
"dev": true,
"optional": true
},
"esbuild-darwin-arm64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.23.tgz",
"integrity": "sha512-yat73Z/uJ5tRcfRiI4CCTv0FSnwErm3BJQeZAh+1tIP0TUNh6o+mXg338Zl5EKChD+YGp6PN+Dbhs7qa34RxSw==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.25.tgz",
"integrity": "sha512-oTcDgdm0MDVEmw2DWu8BV68pYuImpFgvWREPErBZmNA4MYKGuBRaCiJqq6jZmBR1x+3y1DWCjez+5uLtuAm6mw==",
"dev": true,
"optional": true
},
"esbuild-freebsd-64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.23.tgz",
"integrity": "sha512-/1xiTjoLuQ+LlbfjJdKkX45qK/M7ARrbLmyf7x3JhyQGMjcxRYVR6Dw81uH3qlMHwT4cfLW4aEVBhP1aNV7VsA==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.25.tgz",
"integrity": "sha512-ueAqbnMZ8arnuLH8tHwTCQYeptnHOUV7vA6px6j4zjjQwDx7TdP7kACPf3TLZLdJQ3CAD1XCvQ2sPhX+8tacvQ==",
"dev": true,
"optional": true
},
"esbuild-freebsd-arm64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.23.tgz",
"integrity": "sha512-uyPqBU/Zcp6yEAZS4LKj5jEE0q2s4HmlMBIPzbW6cTunZ8cyvjG6YWpIZXb1KK3KTJDe62ltCrk3VzmWHp+iLg==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.25.tgz",
"integrity": "sha512-+ZVWud2HKh+Ob6k/qiJWjBtUg4KmJGGmbvEXXW1SNKS7hW7HU+Zq2ZCcE1akFxOPkVB+EhOty/sSek30tkCYug==",
"dev": true,
"optional": true
},
"esbuild-linux-32": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.23.tgz",
"integrity": "sha512-37R/WMkQyUfNhbH7aJrr1uCjDVdnPeTHGeDhZPUNhfoHV0lQuZNCKuNnDvlH/u/nwIYZNdVvz1Igv5rY/zfrzQ==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.25.tgz",
"integrity": "sha512-3OP/lwV3kCzEz45tobH9nj+uE4ubhGsfx+tn0L26WAGtUbmmcRpqy7XRG/qK7h1mClZ+eguIANcQntYMdYklfw==",
"dev": true,
"optional": true
},
"esbuild-linux-64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.23.tgz",
"integrity": "sha512-H0gztDP60qqr8zoFhAO64waoN5yBXkmYCElFklpd6LPoobtNGNnDe99xOQm28+fuD75YJ7GKHzp/MLCLhw2+vQ==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.25.tgz",
"integrity": "sha512-+aKHdHZmX9qwVlQmu5xYXh7GsBFf4TWrePgeJTalhXHOG7NNuUwoHmketGiZEoNsWyyqwH9rE5BC+iwcLY30Ug==",
"dev": true,
"optional": true
},
"esbuild-linux-arm": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.23.tgz",
"integrity": "sha512-x64CEUxi8+EzOAIpCUeuni0bZfzPw/65r8tC5cy5zOq9dY7ysOi5EVQHnzaxS+1NmV+/RVRpmrzGw1QgY2Xpmw==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.25.tgz",
"integrity": "sha512-aTLcE2VBoLydL943REcAcgnDi3bHtmULSXWLbjtBdtykRatJVSxKMjK9YlBXUZC4/YcNQfH7AxwVeQr9fNxPhw==",
"dev": true,
"optional": true
},
"esbuild-linux-arm64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.23.tgz",
"integrity": "sha512-c4MLOIByNHR55n3KoYf9hYDfBRghMjOiHLaoYLhkQkIabb452RWi+HsNgB41sUpSlOAqfpqKPFNg7VrxL3UX9g==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.25.tgz",
"integrity": "sha512-UxfenPx/wSZx55gScCImPtXekvZQLI2GW3qe5dtlmU7luiqhp5GWPzGeQEbD3yN3xg/pHc671m5bma5Ns7lBHw==",
"dev": true,
"optional": true
},
"esbuild-linux-mips64le": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.23.tgz",
"integrity": "sha512-kHKyKRIAedYhKug2EJpyJxOUj3VYuamOVA1pY7EimoFPzaF3NeY7e4cFBAISC/Av0/tiV0xlFCt9q0HJ68IBIw==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.25.tgz",
"integrity": "sha512-wLWYyqVfYx9Ur6eU5RT92yJVsaBGi5RdkoWqRHOqcJ38Kn60QMlcghsKeWfe9jcYut8LangYZ98xO1LxIoSXrQ==",
"dev": true,
"optional": true
},
"esbuild-linux-ppc64le": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.23.tgz",
"integrity": "sha512-7ilAiJEPuJJnJp/LiDO0oJm5ygbBPzhchJJh9HsHZzeqO+3PUzItXi+8PuicY08r0AaaOe25LA7sGJ0MzbfBag==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.25.tgz",
"integrity": "sha512-0dR6Csl6Zas3g4p9ULckEl8Mo8IInJh33VCJ3eaV1hj9+MHGdmDOakYMN8MZP9/5nl+NU/0ygpd14cWgy8uqRw==",
"dev": true,
"optional": true
},
"esbuild-linux-riscv64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.23.tgz",
"integrity": "sha512-fbL3ggK2wY0D8I5raPIMPhpCvODFE+Bhb5QGtNP3r5aUsRR6TQV+ZBXIaw84iyvKC8vlXiA4fWLGhghAd/h/Zg==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.25.tgz",
"integrity": "sha512-J4d20HDmTrgvhR0bdkDhvvJGaikH3LzXQnNaseo8rcw9Yqby9A90gKUmWpfwqLVNRILvNnAmKLfBjCKU9ajg8w==",
"dev": true,
"optional": true
},
"esbuild-linux-s390x": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.23.tgz",
"integrity": "sha512-GHMDCyfy7+FaNSO8RJ8KCFsnax8fLUsOrj9q5Gi2JmZMY0Zhp75keb5abTFCq2/Oy6KVcT0Dcbyo/bFb4rIFJA==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.25.tgz",
"integrity": "sha512-YI2d5V6nTE73ZnhEKQD7MtsPs1EtUZJ3obS21oxQxGbbRw1G+PtJKjNyur+3t6nzHP9oTg6GHQ3S3hOLLmbDIQ==",
"dev": true,
"optional": true
},
"esbuild-netbsd-64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.23.tgz",
"integrity": "sha512-ovk2EX+3rrO1M2lowJfgMb/JPN1VwVYrx0QPUyudxkxLYrWeBxDKQvc6ffO+kB4QlDyTfdtAURrVzu3JeNdA2g==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.25.tgz",
"integrity": "sha512-TKIVgNWLUOkr+Exrye70XTEE1lJjdQXdM4tAXRzfHE9iBA7LXWcNtVIuSnphTqpanPzTDFarF0yqq4kpbC6miA==",
"dev": true,
"optional": true
},
"esbuild-openbsd-64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.23.tgz",
"integrity": "sha512-uYYNqbVR+i7k8ojP/oIROAHO9lATLN7H2QeXKt2H310Fc8FJj4y3Wce6hx0VgnJ4k1JDrgbbiXM8rbEgQyg8KA==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.25.tgz",
"integrity": "sha512-QgFJ37A15D7NIXBTYEqz29+uw3nNBOIyog+3kFidANn6kjw0GHZ0lEYQn+cwjyzu94WobR+fes7cTl/ZYlHb1A==",
"dev": true,
"optional": true
},
"esbuild-sunos-64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.23.tgz",
"integrity": "sha512-hAzeBeET0+SbScknPzS2LBY6FVDpgE+CsHSpe6CEoR51PApdn2IB0SyJX7vGelXzlyrnorM4CAsRyb9Qev4h9g==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.25.tgz",
"integrity": "sha512-rmWfjUItYIVlqr5EnTH1+GCxXiBOC42WBZ3w++qh7n2cS9Xo0lO5pGSG2N+huOU2fX5L+6YUuJ78/vOYvefeFw==",
"dev": true,
"optional": true
},
"esbuild-windows-32": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.23.tgz",
"integrity": "sha512-Kttmi3JnohdaREbk6o9e25kieJR379TsEWF0l39PQVHXq3FR6sFKtVPgY8wk055o6IB+rllrzLnbqOw/UV60EA==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.25.tgz",
"integrity": "sha512-HGAxVUofl3iUIz9W10Y9XKtD0bNsK9fBXv1D55N/ljNvkrAYcGB8YCm0v7DjlwtyS6ws3dkdQyXadbxkbzaKOA==",
"dev": true,
"optional": true
},
"esbuild-windows-64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.23.tgz",
"integrity": "sha512-JtIT0t8ymkpl6YlmOl6zoSWL5cnCgyLaBdf/SiU/Eg3C13r0NbHZWNT/RDEMKK91Y6t79kTs3vyRcNZbfu5a8g==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.25.tgz",
"integrity": "sha512-TirEohRkfWU9hXLgoDxzhMQD1g8I2mOqvdQF2RS9E/wbkORTAqJHyh7wqGRCQAwNzdNXdg3JAyhQ9/177AadWA==",
"dev": true,
"optional": true
},
"esbuild-windows-arm64": {
"version": "0.14.23",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.23.tgz",
"integrity": "sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw==",
"version": "0.14.25",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.25.tgz",
"integrity": "sha512-4ype9ERiI45rSh+R8qUoBtaj6kJvUOI7oVLhKqPEpcF4Pa5PpT3hm/mXAyotJHREkHpM87PAJcA442mLnbtlNA==",
"dev": true,
"optional": true
},
@ -884,12 +892,12 @@
"dev": true
},
"eslint": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz",
"integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==",
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz",
"integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==",
"dev": true,
"requires": {
"@eslint/eslintrc": "^1.1.0",
"@eslint/eslintrc": "^1.2.0",
"@humanwhocodes/config-array": "^0.9.2",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
@ -2165,9 +2173,9 @@
}
},
"typescript": {
"version": "4.5.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
"integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz",
"integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
"dev": true
},
"unique-string": {

View file

@ -2,7 +2,7 @@
"name": "vscode-basex",
"displayName": "BaseX tools",
"description": "BaseX tools: XQuery, XML, XPath Tools for Visual Studio Code",
"version": "0.0.28",
"version": "0.0.52",
"preview": true,
"publisher": "quodatum",
"author": "Andy Bunce (https://github.com/Quodatum)",
@ -12,13 +12,13 @@
"theme": "light"
},
"icon": "resources/basex.png",
"homepage": "https://github.com/Quodatum/vscode-xml",
"homepage": "https://github.com/Quodatum/vscode-basex",
"repository": {
"type": "git",
"url": "git+https://github.com/Quodatum/vscode-xml.git"
"url": "git+https://github.com/Quodatum/vscode-basex.git"
},
"bugs": {
"url": "https://github.com/Quodatum/vscode-xml/issues"
"url": "https://github.com/Quodatum/vscode-basex/issues"
},
"engines": {
"vscode": "^1.63.0"
@ -27,6 +27,7 @@
"Formatters",
"Programming Languages",
"Linters",
"Snippets",
"Other"
],
"activationEvents": [
@ -70,109 +71,134 @@
{
"command": "basexTools.minifyXml",
"title": "BaseX Tools: Minify XML"
},
{
"command": "basexTools.getAST",
"title": "BaseX Tools: AST"
}
],
"configuration": {
"title": "BaseX Tools Configuration",
"type": "object",
"properties": {
"basexTools.enableXmlTreeView": {
"type": "boolean",
"default": true,
"description": "Enables the XML Document view in the explorer for XML documents.",
"scope": "window"
},
"basexTools.enableXmlTreeViewMetadata": {
"type": "boolean",
"default": true,
"description": "Enables attribute and child element counts in the XML Document view.",
"scope": "window"
},
"basexTools.enableXmlTreeViewCursorSync": {
"type": "boolean",
"default": false,
"description": "Enables auto-reveal of elements in the XML Document view when a start tag is clicked in the editor.",
"scope": "window"
},
"basexTools.enforcePrettySelfClosingTagOnFormat": {
"type": "boolean",
"default": false,
"description": "Enforces a space before the forward slash at the end of a self-closing XML tag.",
"scope": "resource"
},
"basexTools.ignoreDefaultNamespace": {
"type": "boolean",
"default": true,
"description": "Ignore default xmlns attributes when evaluating XPath.",
"scope": "window"
},
"basexTools.persistXPathQuery": {
"type": "boolean",
"default": true,
"description": "Remember the last XPath query used.",
"scope": "window"
},
"basexTools.removeCommentsOnMinify": {
"type": "boolean",
"default": false,
"description": "Remove XML comments during minification.",
"scope": "resource"
},
"basexTools.splitAttributesOnFormat": {
"type": "boolean",
"default": false,
"description": "Put each attribute on a new line when formatting XML. Overrides `basexTools.splitXmlnsOnFormat` if set to `true`.",
"scope": "resource"
},
"basexTools.splitXmlnsOnFormat": {
"type": "boolean",
"default": true,
"description": "Put each xmlns attribute on a new line when formatting XML.",
"scope": "resource"
},
"basexTools.xmlFormatterImplementation": {
"type": "string",
"enum": [
"classic",
"v2"
],
"default": "v2",
"description": "Supported XML Formatters: classic",
"scope": "window"
},
"basexTools.xqueryExecutionArguments": {
"type": "array",
"default": [
"-xquery",
"$(script)",
"-in",
"$(input)",
"-out",
"$(input).output.xml"
],
"description": "Arguments to be passed to the XQuery execution engine.",
"scope": "window"
},
"basexTools.xqueryExecutionEngine": {
"type": "string",
"default": "",
"description": "The full path to the executable to run when executing XQuery scripts.",
"scope": "window"
},
"basexTools.xqueryExecutionInputLimit": {
"type": "integer",
"default": 100,
"description": "The maximum number of input files to enumerate when executing XQuery scripts.",
"scope": "window"
},
"basexTools.xqueryExecutionInputSearchPattern": {
"type": "string",
"default": "**/*.xml",
"description": "The pattern used to search for input XML files when executing XQuery scripts.",
"scope": "window"
"configuration": [
{
"id": "xmltree",
"title": "XML tree view ",
"properties": {
"basexTools.xmlTree.enableTreeView": {
"type": "boolean",
"default": false,
"description": "Enables the XML Document view in the explorer for XML documents.",
"scope": "window"
},
"basexTools.xmlTree.enableViewMetadata": {
"type": "boolean",
"default": true,
"description": "Enables attribute and child element counts in the XML Document view.",
"scope": "window"
},
"basexTools.xmlTree.enableViewCursorSync": {
"type": "boolean",
"default": false,
"description": "Enables auto-reveal of elements in the XML Document view when a start tag is clicked in the editor.",
"scope": "window"
}
}
},
{
"id": "xpath",
"title": "XPath ",
"properties":{
"basexTools.xpath.ignoreDefaultNamespace": {
"type": "boolean",
"default": true,
"description": "Ignore default xmlns attributes when evaluating XPath.",
"scope": "window"
},
"basexTools.xpath.persistXPathQuery": {
"type": "boolean",
"default": true,
"description": "Remember the last XPath query used.",
"scope": "window"
}
}
},{
"id": "xquery",
"title": "XQuery ",
"properties":{
"basexTools.xquery.executionArguments": {
"type": "array",
"default": [
"-xquery",
"$(script)",
"-in",
"$(input)",
"-out",
"$(input).output.xml"
],
"description": "Arguments to be passed to the XQuery execution engine.",
"scope": "window"
},
"basexTools.xquery.executionEngine": {
"type": "string",
"default": "",
"description": "The full path to the executable to run when executing XQuery scripts.",
"scope": "window"
},
"basexTools.xquery.executionInputLimit": {
"type": "integer",
"default": 100,
"description": "The maximum number of input files to enumerate when executing XQuery scripts.",
"scope": "window"
},
"basexTools.xquery.executionInputSearchPattern": {
"type": "string",
"default": "**/*.xml",
"description": "The pattern used to search for input XML files when executing XQuery scripts.",
"scope": "window"
}
}
},{
"title": "BaseX Tools ",
"type": "object",
"properties": {
"basexTools.enforcePrettySelfClosingTagOnFormat": {
"type": "boolean",
"default": false,
"description": "Enforces a space before the forward slash at the end of a self-closing XML tag.",
"scope": "resource"
},
"basexTools.removeCommentsOnMinify": {
"type": "boolean",
"default": false,
"description": "Remove XML comments during minification.",
"scope": "resource"
},
"basexTools.splitAttributesOnFormat": {
"type": "boolean",
"default": false,
"description": "Put each attribute on a new line when formatting XML. Overrides `basexTools.splitXmlnsOnFormat` if set to `true`.",
"scope": "resource"
},
"basexTools.splitXmlnsOnFormat": {
"type": "boolean",
"default": true,
"description": "Put each xmlns attribute on a new line when formatting XML.",
"scope": "resource"
},
"basexTools.xmlFormatterImplementation": {
"type": "string",
"enum": [
"classic",
"v2"
],
"default": "v2",
"description": "Supported XML Formatters: classic",
"scope": "window"
}
}
}
},
],
"grammars": [
{
"language": "xquery",
@ -180,6 +206,12 @@
"scopeName": "source.xquery"
}
],
"snippets": [
{
"language": "xquery",
"path": "./snippets.jsonc"
}
],
"keybindings": [
{
"key": "ctrl+shift+alt+x",
@ -275,18 +307,18 @@
"@types/node": "^14.18.12",
"@types/vscode": "^1.63.0",
"@types/xmldom": "^0.1.31",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"@vscode/test-electron": "^2.1.2",
"esbuild": "^0.14.23",
"eslint": "^8.9.0",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"@vscode/test-electron": "^2.1.3",
"esbuild": "^0.14.25",
"eslint": "^8.10.0",
"glob": "^7.2.0",
"mocha": "^9.2.1",
"typescript": "^4.5.4"
"typescript": "^4.6.2"
},
"dependencies": {
"@quodatum/xqlint": "^0.0.8",
"@quodatum/xqlint": "^0.0.11",
"@xmldom/xmldom": "^0.8.1",
"xpath": "0.0.32"
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

120
snippets.jsonc Normal file
View file

@ -0,0 +1,120 @@
{
"for": {
"prefix": "for",
"body": "for $${1:item} in ${2:expr}"
},
"return": {
"prefix": "ret",
"body": "return ${1:expr}"
},
"import": {
"prefix": "import",
"body": "import module namespace ${1:ns} = '${2:http://www.example.com/}';",
"description": "Import module"
},
"module": {
"prefix": "module",
"body": "module namespace ${1:ns} = '${2:http://www.example.com}';"
},
"every": {
"prefix": "every",
"body": "every $${1:varname} in ${2:expr} satisfies ${3:expr}"
},
"some": {
"prefix": "some",
"body": "some $${1:varname} in ${2:expr} satisfies ${3:expr}"
},
"function": {
"prefix": "df",
"body": [
"(:~ $${2:name} :)",
"declare function ${1:ns}:${2:name}(){",
"${3:expr}",
"};"
],
"description": "declare a function"
},
"declare variable": {
"prefix": "dv",
"body": [
"(:~ $${1:varname} :)",
"declare variable $${1:varname} := ${2:expr};",
""
],
"description": "declare variable"
},
"switch": {
"prefix": "sw",
"body": [
"switch(${1:foo})",
"case ${2:foo} return ${3:true}",
"default return ${4:false}"
],
"description": "switch statement"
},
"typeswitch": {
"prefix": "type",
"body": [
"typeswitch(${1:foo})",
"case ${2:foo} return ${3:true}",
"default return ${4:false}"
],
"description": "typeswitch statement"
},
"try": {
"prefix": "try",
"body": [
"try { ${1:expr} } ",
"catch ${2:*} { ${3:expr} }"
],
"description": "switch statement"
},
"tumbling": {
"prefix": "tumbling",
"body": [
"for tumbling window $${1:varname} in ${2:expr}",
"start at $${3:start} when ${4:expr}",
"end at $${5:end} when ${6:expr}",
"return ${7:expr}"
],
"description": "tumbling window"
},
"sliding": {
"prefix": "sliding",
"body": [
"for sliding window $${1:varname} in ${2:expr}",
"start at $${3:start} when ${4:expr}",
"end at $${5:end} when ${6:expr}",
"return ${7:expr}"
],
"description": "sliding window"
}
}
//snippet if
// if(${1:true}) then ${2:expr} else ${3:true}
// default return ${4:false}
//snippet let
// let $${1:varname} := ${2:expr}
//snippet group
// group by $${1:varname} := ${2:expr}
//snippet order
// order by ${1:expr} ${2:descending}
//snippet stable
// stable order by ${1:expr}
//snippet count
// count $${1:varname}
//snippet ordered
// ordered { ${1:expr} }
//snippet unordered
// unordered { ${1:expr} }
//snippet treat
// treat as ${1:expr}
//snippet castable
// castable as ${1:atomicType}
//snippet cast
// cast as ${1:atomicType}

5
src/CHANGELOG.md Normal file
View file

@ -0,0 +1,5 @@
# 0.0.48
* Fix xmlToText #6
* FIX outline all vars
# 0.0.47

View file

@ -4,23 +4,23 @@ const ExtensionTopLevelSection = "basexTools";
export class Configuration {
static get enableXmlTreeView(): boolean {
return this._getForWindow<boolean>("enableXmlTreeView");
return this._getForWindow<boolean>("xmlTree.enableTreeView");
}
static get enableXmlTreeViewMetadata(): boolean {
return this._getForWindow<boolean>("enableXmlTreeViewMetadata");
return this._getForWindow<boolean>("xmlTree.enableViewMetadata");
}
static get enableXmlTreeViewCursorSync(): boolean {
return this._getForWindow<boolean>("enableXmlTreeViewCursorSync");
return this._getForWindow<boolean>("xmlTree.enableViewCursorSync");
}
static get ignoreDefaultNamespace(): boolean {
return this._getForWindow<boolean>("ignoreDefaultNamespace");
return this._getForWindow<boolean>("xpath.ignoreDefaultNamespace");
}
static get persistXPathQuery(): boolean {
return this._getForWindow<boolean>("persistXPathQuery");
return this._getForWindow<boolean>("xpath.persistXPathQuery");
}
static get xmlFormatterImplementation(): string {
@ -28,19 +28,19 @@ export class Configuration {
}
static get xqueryExecutionArguments(): string[] {
return this._getForWindow<string[]>("xqueryExecutionArguments");
return this._getForWindow<string[]>("xquery.executionArguments");
}
static get xqueryExecutionEngine(): string {
return this._getForWindow<string>("xqueryExecutionEngine");
return this._getForWindow<string>("xquery.executionEngine");
}
static get xqueryExecutionInputLimit(): number {
return this._getForWindow<number>("xqueryExecutionInputLimit");
return this._getForWindow<number>("xquery.executionInputLimit");
}
static get xqueryExecutionInputSearchPattern(): string {
return this._getForWindow<string>("xqueryExecutionInputSearchPattern");
return this._getForWindow<string>("xquery.executionInputSearchPattern");
}
static enforcePrettySelfClosingTagOnFormat(resource: Uri): boolean {

View file

@ -1,9 +1,10 @@
// debug messages
import { OutputChannel, window } from "vscode";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const XQLint = require("@quodatum/xqlint").XQLint;
const ver = require("@quodatum/xqlint").version;
const _channel:OutputChannel = window.createOutputChannel("BaseX");
const _channel:OutputChannel = window.createOutputChannel("BaseX log");
function logdate(){
return (new Date()).toISOString().slice(0, 19).replace(/-/g, "/").replace("T", " ");
}
@ -19,5 +20,5 @@ export class channel {
_channel.show
}
}
channel.log("started, XQLint version: "+XQLint.version);
channel.log("started, XQLint version: "+ver);
_channel.show

View file

@ -24,7 +24,9 @@ export class XQueryCompletionItemProvider implements CompletionItemProvider {
case "function":
completionItem.kind = CompletionItemKind.Function;
// eslint-disable-next-line no-case-declarations
const funcStart = (xqLintCompletionItem.value.indexOf(":") + 1);
// eslint-disable-next-line no-case-declarations
const funcEnd = xqLintCompletionItem.value.indexOf("(");
completionItem.insertText = xqLintCompletionItem.value.substring(funcStart, funcEnd);

View file

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-namespace */
export namespace commands {
export const evaluateXPath = "basexTools.evaluateXPath";
export const executeXQuery = "basexTools.executeXQuery";
@ -6,6 +7,7 @@ export namespace commands {
export const textToXml = "basexTools.textToXml";
export const getCurrentXPath = "basexTools.getCurrentXPath";
export const minifyXml = "basexTools.minifyXml";
export const getAST = "basexTools.getAST";
}
export namespace contextKeys {

View file

@ -1,20 +1,21 @@
import {
commands, languages, window, workspace, ExtensionContext, Memento,
TextEditor, TextEditorSelectionChangeEvent, TextEditorSelectionChangeKind, DiagnosticCollection, TextDocument, TextEdit,Range
commands, languages, window, ExtensionContext,
TextEditor, TextEditorSelectionChangeEvent, TextEditorSelectionChangeKind, DiagnosticCollection
} from "vscode";
import { channel } from "./common/logger";
import { createDocumentSelector, ExtensionState, Configuration } from "./common";
import { XQueryCompletionItemProvider } from "./completion";
import { XmlFormatterFactory, XmlFormattingEditProvider } from "./formatting";
import { formatAsXml, minifyXml, xmlToText, textToXml } from "./formatting/commands";
import { XQueryLinter } from "./linting";
import { formatAsXml, minifyXml, xmlToText, textToXml } from "./formatting/commands";
import { XQueryLinter,getAst } from "./linting";
import { XmlTreeDataProvider } from "./tree-view";
import { evaluateXPath, getCurrentXPath } from "./xpath/commands";
import { executeXQuery } from "./xquery-execution/commands";
import * as constants from "./constants";
import { XQueryFormatter } from "./formatting/XQueryFormatter";
import { XQueryFormatter } from "./formatting/xquery-formatting-provider";
import { Symbols } from './symbols/symbols';
let diagnosticCollectionXQuery: DiagnosticCollection;
@ -32,30 +33,27 @@ export function activate(context: ExtensionContext) {
/* Formatting Features */
const xmlFormattingEditProvider = new XmlFormattingEditProvider(XmlFormatterFactory.getXmlFormatter());
const xqueryFormattingEditProvider = new XQueryFormatter();
context.subscriptions.push(
commands.registerTextEditorCommand(constants.commands.formatAsXml, formatAsXml),
commands.registerTextEditorCommand(constants.commands.xmlToText, xmlToText),
commands.registerTextEditorCommand(constants.commands.textToXml, textToXml),
commands.registerTextEditorCommand(constants.commands.minifyXml, minifyXml),
commands.registerTextEditorCommand(constants.commands.getAST, getAst),
languages.registerDocumentFormattingEditProvider(xmlXsdDocSelector, xmlFormattingEditProvider),
languages.registerDocumentRangeFormattingEditProvider(xmlXsdDocSelector, xmlFormattingEditProvider)
languages.registerDocumentRangeFormattingEditProvider(xmlXsdDocSelector, xmlFormattingEditProvider),
languages.registerDocumentFormattingEditProvider(xqueryDocSelector, xqueryFormattingEditProvider),
languages.registerDocumentRangeFormattingEditProvider(xqueryDocSelector, xqueryFormattingEditProvider)
);
// 👍 XQuery formatter implemented using API
languages.registerDocumentFormattingEditProvider(constants.languageIds.xquery, {
async provideDocumentFormattingEdits(document: TextDocument): Promise<TextEdit[]> {
try {
const text = XQueryFormatter.format(document.getText())
const entireDocRange = document.validateRange(new Range(0, 0, document.lineCount, 0));
return [TextEdit.replace(entireDocRange, text)];
} catch (e) {
window.showInformationMessage('Format failed -syntax error')
}
}
});
// symbols
const symbols = new Symbols();
context.subscriptions.push(languages.registerDocumentSymbolProvider(constants.languageIds.xquery, symbols));
/* Linting Features */
diagnosticCollectionXQuery = languages.createDiagnosticCollection(constants.diagnosticCollections.xquery);
context.subscriptions.push(
@ -97,7 +95,7 @@ export function activate(context: ExtensionContext) {
export function deactivate() {
// do nothing
};
}
function _handleContextChange(editor: TextEditor): void {
const supportedSchemes = [constants.uriSchemes.file, constants.uriSchemes.untitled];

View file

@ -1,18 +0,0 @@
// format xquery
import { channel } from "../common/logger";
import { XQLint, CodeFormatter } from "@quodatum/xqlint";
export class XQueryFormatter {
static format(xquery: string): string {
channel.log("XQueryFormatter");
const linter = new (XQLint as any)(xquery, { "styleCheck": false });
channel.appendLine("got linter: " + linter.hasSyntaxError());
//if(linter.hasSyntaxError()+linter.hasSyntaxError()) throw new Error("XQuery syntax error")
const ast = linter.getAST()
const formatter = new (CodeFormatter as any)(ast);
const formatted = formatter.format().trim();
channel.log("XQueryFormatter done");
return formatted;
}
}

View file

@ -1,4 +1,5 @@
export * from "./formatAsXml";
export * from "./minifyXml";
export * from "./xmlToText";
export * from "./textToXml";

View file

@ -1,33 +0,0 @@
import { workspace } from "vscode";
import { ProviderResult, Range, TextEdit, TextEditor, Selection } from "vscode";
import { NativeCommands } from "../../common";
import * as constants from "../../constants";
import { XmlFormatterFactory } from "../xml-formatter";
import { XmlFormattingEditProvider } from "../xml-formatting-edit-provider";
import { XmlFormattingOptionsFactory } from "../xml-formatting-options";
export function textToXml(textEditor: TextEditor): void {
textEditor.edit(textEdit => {
const selections = textEditor.selections;
selections.forEach(selection => {
if (selection.isEmpty) {
selection = new Selection(
textEditor.document.positionAt(0),
textEditor.document.positionAt(textEditor.document.getText().length)
);
}
const txt = textEditor.document.getText(new Range(selection.start, selection.end));
const transformed = txt
.replace(/&lt;/g, "<")
.replace(/&gt;/g, ">")
.replace(/&amp;/g, "&")
// tslint:disable-next-line
.replace(/&quot;/g, '"')
.replace(/&apos;/g, "'");
textEdit.replace(selection, transformed);
});
});
}

View file

@ -1,12 +1,7 @@
import { workspace } from "vscode";
import { ProviderResult, Range, TextEdit, TextEditor, Selection } from "vscode";
import { NativeCommands } from "../../common";
import * as constants from "../../constants";
import { Range, TextEditor, Selection } from "vscode";
import { XmlFormatterFactory } from "../xml-formatter";
import { XmlFormattingEditProvider } from "../xml-formatting-edit-provider";
import { XmlFormattingOptionsFactory } from "../xml-formatting-options";
export function xmlToText(textEditor: TextEditor): void {
textEditor.edit(textEdit => {
@ -20,9 +15,9 @@ export function xmlToText(textEditor: TextEditor): void {
}
const txt = textEditor.document.getText(new Range(selection.start, selection.end));
const transformed = txt
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/&/g, "&amp;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&apos;");
@ -30,3 +25,27 @@ export function xmlToText(textEditor: TextEditor): void {
});
});
}
export function textToXml(textEditor: TextEditor): void {
textEditor.edit(textEdit => {
const selections = textEditor.selections;
selections.forEach(selection => {
if (selection.isEmpty) {
selection = new Selection(
textEditor.document.positionAt(0),
textEditor.document.positionAt(textEditor.document.getText().length)
);
}
const txt = textEditor.document.getText(new Range(selection.start, selection.end));
const transformed = txt
.replace(/&lt;/g, "<")
.replace(/&gt;/g, ">")
.replace(/&amp;/g, "&")
// tslint:disable-next-line
.replace(/&quot;/g, '"')
.replace(/&apos;/g, "'");
textEdit.replace(selection, transformed);
});
});
}

View file

@ -1,3 +1,4 @@
export * from "./xml-formatter";
export * from "./xml-formatting-edit-provider";
export * from "./xml-formatting-options";
export * from "./xquery-formatting-provider";

View file

@ -1,6 +1,6 @@
import { window, workspace } from "vscode";
import { Configuration, ExtensionState } from "../common";
import { Configuration } from "../common";
import * as constants from "../constants";
import { ClassicXmlFormatter } from "./formatters/classic-xml-formatter";
import { V2XmlFormatter } from "./formatters/v2-xml-formatter";

View file

@ -0,0 +1,33 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
// format xquery
import { XQLint, CodeFormatter } from "@quodatum/xqlint";
import { CancellationToken, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider,
FormattingOptions, ProviderResult,Range,
TextDocument, TextEdit} from "vscode";
import { channel } from "../common/logger";
function format(xquery: string,document: TextDocument): string {
channel.log("XQueryFormatter" + document.uri);
const linter = new (XQLint as any)(xquery, { "styleCheck": false });
channel.appendLine(" linter hasSyntaxError: " + linter.hasSyntaxError());
//if(linter.hasSyntaxError()+linter.hasSyntaxError()) throw new Error("XQuery syntax error")
const ast = linter.getAST()
const formatter = new (CodeFormatter as any)(ast);
const formatted = formatter.format().trim();
channel.log("XQueryFormatter done");
return formatted;
}
export class XQueryFormatter implements DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider{
provideDocumentFormattingEdits(document: TextDocument, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]> {
const lastLine = document.lineAt(document.lineCount - 1);
const documentRange = new Range(document.positionAt(0), lastLine.range.end);
return this.provideDocumentRangeFormattingEdits(document, documentRange, options, token);
}
provideDocumentRangeFormattingEdits(document: TextDocument, range: Range, _options: FormattingOptions, _token: CancellationToken): ProviderResult<TextEdit[]> {
const selected = document.getText(range);
const result = format(selected, document);
return [TextEdit.replace(range, result)];
}
}

23
src/linting/getAST.ts Normal file
View file

@ -0,0 +1,23 @@
import { Range, TextEditor, Selection } from "vscode";
import { channel } from "../common/logger";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const XQLint = require("@quodatum/xqlint").XQLint;
export function getAst(textEditor: TextEditor): void {
textEditor.edit(textEdit => {
const selections = textEditor.selections;
selections.forEach(selection => {
if (selection.isEmpty) {
selection = new Selection(
textEditor.document.positionAt(0),
textEditor.document.positionAt(textEditor.document.getText().length)
);
}
const text = textEditor.document.getText(new Range(selection.start, selection.end));
const linter = new XQLint(text);
const ast=linter.getAST();
channel.appendLine(ast);
});
});
}

View file

@ -1 +1,2 @@
export * from "./xquery-linter";
export * from "./getAST";

57
src/symbols/symbols.ts Normal file
View file

@ -0,0 +1,57 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { XQLint } from '@quodatum/xqlint';
import {SymbolKind, DocumentSymbol, DocumentSymbolProvider,
Range, Position, TextDocument,CancellationToken} from 'vscode';
import { channel } from "../common/logger";
//
// This class handles Symbols
//
function makeSymbol(name: string, description: string, icon: SymbolKind, pos: any) {
const spos = new Position(pos.sl, pos.sc);
const epos = new Position(pos.el, pos.ec);
const fullrange = new Range(spos, epos);
const selrange = new Range(spos, spos);
return new DocumentSymbol(name, description, icon, fullrange, selrange);
}
export class Symbols implements DocumentSymbolProvider {
provideDocumentSymbols = async (
document: TextDocument,
token: CancellationToken
): Promise<DocumentSymbol[]> => {
channel.log("Symbols: " + document.uri);
const symbols: DocumentSymbol[] = [];
const text = document.getText();
const linter = new (XQLint as any)(text, { "styleCheck": false });
const xqdoc = linter.getXQDoc();
channel.log("got xqdoc");
const prolog=new Range(0,0,0,0)
symbols.push(makeSymbol(xqdoc.moduleNamespace || "Main", xqdoc.description, SymbolKind.Module, prolog))
let vars=makeSymbol("Variables", "", SymbolKind.Variable, prolog)
vars.children=[]
// type: type,
// pos: pos,
// qname: qname,
// annotations: {}
xqdoc.variables.forEach(v => {
const name = v.name;
const info = makeSymbol(name, "", SymbolKind.Variable, v.pos)
vars.children.push(info);
});
const funs=makeSymbol("Variables", "", SymbolKind.Function, prolog)
funs.children=[]
xqdoc.functions.forEach(v => {
const name = v.name +"#" + v.params.length;
const info = makeSymbol(name, "", SymbolKind.Function, v.pos)
funs.children.push(info);
});
symbols.push(vars)
symbols.push(funs)
channel.log("Symbols done " + document.uri);
return symbols;
};
}

View file

@ -1,4 +1,4 @@
const child_process = require("child_process");
import child_process = require("child_process");
export class ChildProcess {
static async spawn(executable: string, args: string[]): Promise<void> {