From 855def617222608838bdffc627a9bb21deed0d04 Mon Sep 17 00:00:00 2001 From: "Hofstetter Benjamin (extern)" Date: Thu, 31 Oct 2024 15:23:53 +0100 Subject: [PATCH 1/2] harmonize http and file endpoint api --- CHANGELOG.md | 9 + doc/00_intro.md | 0 package-lock.json | 1217 +++++++---------- package.json | 38 +- samples/first.sparqlbook | 2 +- samples/issues.sparqlbook | 2 +- src/extension/endpoint/endpoint.ts | 22 +- .../endpoint/file-endpoint/file-endpoint.ts | 40 +- .../endpoint/http-endpoint/http-endpoint.ts | 15 +- src/extension/endpoint/sparql-utils.ts | 12 +- src/extension/enum/mime-type.ts | 14 + .../notebook/sparql-notebook-controller.ts | 46 +- src/extension/sparql-store/sparql-store.ts | 147 +- .../sparql-json-result-component.tsx | 2 +- 14 files changed, 730 insertions(+), 836 deletions(-) create mode 100644 doc/00_intro.md create mode 100644 src/extension/enum/mime-type.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index b855de2..ad22ac6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to the "vscode-sparql-notebook" extension will be documented in this file. +## 0.0.39 +- Oxigraph update +- Harmonize SPARQL file and http endpoint query execution + +## 0.0.38 +- Oxigraph update +- Fix: Correct SPARQL select result order +- Fix: Correct SPARQL optional empty filed rendering + ## 0.0.37 - Fix: Windows path issue with external query files. diff --git a/doc/00_intro.md b/doc/00_intro.md new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json index 99f59fc..b39d84f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,45 +1,45 @@ { "name": "sparql-notebook", - "version": "0.0.37", + "version": "0.0.39", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sparql-notebook", - "version": "0.0.37", + "version": "0.0.39", "license": "MIT", "dependencies": { "@vscode/webview-ui-toolkit": "^1.4.0", "@zazuko/prefixes": "^2.2.0", - "axios": "^1.6.7", - "oxigraph": "0.4.0-alpha.7", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "axios": "^1.7.7", + "oxigraph": " 0.4.1", + "react": "^18.3.1", + "react-dom": "^18.3.1" }, "devDependencies": { "@types/glob": "^8.1.0", - "@types/mocha": "^10.0.6", + "@types/mocha": "^10.0.9", "@types/node": "18.x", - "@types/react": "^18.2.21", + "@types/react": "^18.3.12", "@types/react-dom": "^18.2.7", - "@types/vscode": "^1.90.0", + "@types/vscode": "^1.95.0", "@types/vscode-notebook-renderer": "^1.72.3", - "@types/vscode-webview": "^1.57.2", - "@types/webpack-env": "^1.18.1", - "@typescript-eslint/eslint-plugin": "^7.13.0", - "@typescript-eslint/parser": "^ 7.13.0", - "css-loader": "^6.8.1", - "eslint": "^8.56.0", + "@types/vscode-webview": "^1.57.5", + "@types/webpack-env": "^1.18.5", + "@typescript-eslint/eslint-plugin": "^8.12.2", + "@typescript-eslint/parser": "^ 8.12.2", + "css-loader": "^7.1.2", + "eslint": "^9.13.0", "fork-ts-checker-webpack-plugin": "^9.0.2", - "glob": "^10.4.1", + "glob": "^11.0.0", "os-browserify": "^0.3.0", "path-browserify": "^1.0.1", - "style-loader": "^3.3.3", + "style-loader": "^4.0.0", "ts-loader": "^9.5.1", - "typescript": "^5.4.5", - "url": "^0.11.1", + "typescript": "^5.6.3", + "url": "^0.11.4", "util": "^0.12.5", - "webpack": "^5.89.0", + "webpack": "^5.95.0", "webpack-cli": "^5.1.4" }, "engines": { @@ -47,13 +47,14 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -61,156 +62,114 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, "engines": { - "node": ">=6.9.0" + "node": ">=10.0.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^1.9.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "has-flag": "^3.0.0" + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" }, "engines": { - "node": ">=4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "license": "MIT", - "engines": { - "node": ">=10.0.0" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": "*" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "node_modules/@eslint/core": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", + "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -218,7 +177,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -249,53 +208,60 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", + "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@eslint/plugin-kit": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", + "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "levn": "^0.4.1" }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, - "license": "ISC", + "license": "Apache-2.0", "dependencies": { - "brace-expansion": "^1.1.7" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": "*" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -312,13 +278,19 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", + "node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -338,35 +310,6 @@ "node": ">=12" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -432,18 +375,18 @@ } }, "node_modules/@microsoft/fast-element": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@microsoft/fast-element/-/fast-element-1.13.0.tgz", - "integrity": "sha512-iFhzKbbD0cFRo9cEzLS3Tdo9BYuatdxmCEKCpZs1Cro/93zNMpZ/Y9/Z7SknmW6fhDZbpBvtO8lLh9TFEcNVAQ==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@microsoft/fast-element/-/fast-element-1.14.0.tgz", + "integrity": "sha512-zXvuSOzvsu8zDTy9eby8ix8VqLop2rwKRgp++ZN2kTCsoB3+QJVoaGD2T/Cyso2ViZQFXNpiNCVKfnmxBvmWkQ==", "license": "MIT" }, "node_modules/@microsoft/fast-foundation": { - "version": "2.49.6", - "resolved": "https://registry.npmjs.org/@microsoft/fast-foundation/-/fast-foundation-2.49.6.tgz", - "integrity": "sha512-DZVr+J/NIoskFC1Y6xnAowrMkdbf2d5o7UyWK6gW5AiQ6S386Ql8dw4KcC4kHaeE1yL2CKvweE79cj6ZhJhTvA==", + "version": "2.50.0", + "resolved": "https://registry.npmjs.org/@microsoft/fast-foundation/-/fast-foundation-2.50.0.tgz", + "integrity": "sha512-8mFYG88Xea1jZf2TI9Lm/jzZ6RWR8x29r24mGuLojNYqIR2Bl8+hnswoV6laApKdCbGMPKnsAL/O68Q0sRxeVg==", "license": "MIT", "dependencies": { - "@microsoft/fast-element": "^1.13.0", + "@microsoft/fast-element": "^1.14.0", "@microsoft/fast-web-utilities": "^5.4.1", "tabbable": "^5.2.0", "tslib": "^1.13.0" @@ -456,13 +399,13 @@ "license": "0BSD" }, "node_modules/@microsoft/fast-react-wrapper": { - "version": "0.3.24", - "resolved": "https://registry.npmjs.org/@microsoft/fast-react-wrapper/-/fast-react-wrapper-0.3.24.tgz", - "integrity": "sha512-sRnSBIKaO42p4mYoYR60spWVkg89wFxFAgQETIMazAm2TxtlsnsGszJnTwVhXq2Uz+XNiD8eKBkfzK5c/i6/Kw==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@microsoft/fast-react-wrapper/-/fast-react-wrapper-0.3.25.tgz", + "integrity": "sha512-jKzmk2xJV93RL/jEFXEZgBvXlKIY4N4kXy3qrjmBfFpqNi3VjY+oUTWyMnHRMC5EUhIFxD+Y1VD4u9uIPX3jQw==", "license": "MIT", "dependencies": { - "@microsoft/fast-element": "^1.13.0", - "@microsoft/fast-foundation": "^2.49.6" + "@microsoft/fast-element": "^1.14.0", + "@microsoft/fast-foundation": "^2.50.0" }, "peerDependencies": { "react": ">=16.9.0" @@ -515,43 +458,10 @@ "node": ">= 8" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@types/eslint": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.0.tgz", - "integrity": "sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, "license": "MIT" }, @@ -581,16 +491,16 @@ "license": "MIT" }, "node_modules/@types/mocha": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", - "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", + "version": "10.0.9", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.9.tgz", + "integrity": "sha512-sicdRoWtYevwxjOHNMPTl3vSfJM6oyW8o1wXeI7uww6b6xHg8eBznQDNSGBCDJmsE8UMxP05JgZRtsKbTqt//Q==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "18.19.43", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.43.tgz", - "integrity": "sha512-Mw/YlgXnyJdEwLoFv2dpuJaDFriX+Pc+0qOBJ57jC1H6cDxIj2xc5yUrdtArDVG0m+KV6622a4p2tenEqB3C/g==", + "version": "18.19.62", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.62.tgz", + "integrity": "sha512-UOGhw+yZV/icyM0qohQVh3ktpY40Sp7tdTW7HxG3pTd7AiMrlFlAJNUrGK9t5mdW0+ViQcFV74zCSIx9ZJpncA==", "dev": true, "license": "MIT", "dependencies": { @@ -598,16 +508,16 @@ } }, "node_modules/@types/prop-types": { - "version": "15.7.12", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", "dev": true, "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.3", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", - "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "version": "18.3.12", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", + "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", "dev": true, "license": "MIT", "dependencies": { @@ -616,9 +526,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", - "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==", "dev": true, "license": "MIT", "dependencies": { @@ -626,9 +536,9 @@ } }, "node_modules/@types/vscode": { - "version": "1.92.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.92.0.tgz", - "integrity": "sha512-DcZoCj17RXlzB4XJ7IfKdPTcTGDLYvTOcTNkvtjXWF+K2TlKzHHkBEXNWQRpBIXixNEUgx39cQeTFunY0E2msw==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.95.0.tgz", + "integrity": "sha512-0LBD8TEiNbet3NvWsmn59zLzOFu/txSlGxnv5yAFHCrhG9WvAnR3IvfHzMOs2aeWqgvNjq9pO99IUw8d3n+unw==", "dev": true, "license": "MIT" }, @@ -654,32 +564,32 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", + "integrity": "sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/type-utils": "8.12.2", + "@typescript-eslint/utils": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -688,27 +598,27 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.12.2.tgz", + "integrity": "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/typescript-estree": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -717,17 +627,17 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz", + "integrity": "sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -735,27 +645,24 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz", + "integrity": "sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/typescript-estree": "8.12.2", + "@typescript-eslint/utils": "8.12.2", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^8.56.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -763,13 +670,13 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.12.2.tgz", + "integrity": "sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==", "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -777,23 +684,23 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz", + "integrity": "sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -806,53 +713,46 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.12.2.tgz", + "integrity": "sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/typescript-estree": "8.12.2" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz", + "integrity": "sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/types": "8.12.2", "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true, - "license": "ISC" - }, "node_modules/@vscode/webview-ui-toolkit": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@vscode/webview-ui-toolkit/-/webview-ui-toolkit-1.4.0.tgz", @@ -1097,9 +997,9 @@ "license": "MIT" }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -1157,13 +1057,16 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { @@ -1203,16 +1106,6 @@ "dev": true, "license": "Python-2.0" }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -1236,9 +1129,9 @@ } }, "node_modules/axios": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz", - "integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -1290,9 +1183,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", - "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -1310,10 +1203,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001646", - "electron-to-chromium": "^1.5.4", + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -1360,9 +1253,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001646", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001646.tgz", - "integrity": "sha512-dRg00gudiBDDTmUhClSdv3hqRfpbOnU28IpI1T6PBTLWa+kOj0681C8uML3PifYfREuBrVjDGhL3adYpBT6spw==", + "version": "1.0.30001676", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001676.tgz", + "integrity": "sha512-Qz6zwGCiPghQXGJvgQAem79esjitvJ+CxSbSQkW9H/UX5hg8XM88d4lp2W+MEQ81j+Hip58Il+jGVdazk1z9cw==", "dev": true, "funding": [ { @@ -1556,9 +1449,9 @@ } }, "node_modules/css-loader": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", - "integrity": "sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", + "integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==", "dev": true, "license": "MIT", "dependencies": { @@ -1572,7 +1465,7 @@ "semver": "^7.5.4" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", @@ -1580,7 +1473,7 @@ }, "peerDependencies": { "@rspack/core": "0.x || 1.x", - "webpack": "^5.0.0" + "webpack": "^5.27.0" }, "peerDependenciesMeta": { "@rspack/core": { @@ -1612,13 +1505,13 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1673,32 +1566,6 @@ "node": ">=0.4.0" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1707,9 +1574,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz", - "integrity": "sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==", + "version": "1.5.49", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz", + "integrity": "sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==", "dev": true, "license": "ISC" }, @@ -1735,9 +1602,9 @@ } }, "node_modules/envinfo": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", - "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", "dev": true, "license": "MIT", "bin": { @@ -1788,9 +1655,9 @@ "license": "MIT" }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "license": "MIT", "engines": { @@ -1811,65 +1678,70 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", + "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.7.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.13.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.5", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.3.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.1.0", + "eslint-visitor-keys": "^4.1.0", + "espree": "^10.2.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -1877,7 +1749,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1907,6 +1779,19 @@ "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1921,18 +1806,31 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -2072,16 +1970,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -2125,18 +2023,17 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { @@ -2147,9 +2044,9 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", @@ -2177,9 +2074,9 @@ } }, "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "license": "ISC", "dependencies": { @@ -2247,9 +2144,9 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -2282,13 +2179,6 @@ "dev": true, "license": "Unlicense" }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2335,22 +2225,25 @@ } }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", "dev": true, "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" + "path-scurry": "^2.0.0" }, "bin": { "glob": "dist/esm/bin.mjs" }, + "engines": { + "node": "20 || >=22" + }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -2375,38 +2268,30 @@ "dev": true, "license": "BSD-2-Clause" }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "node_modules/glob/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "type-fest": "^0.20.2" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=8" + "node": "20 || >=22" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2531,9 +2416,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", "engines": { @@ -2587,18 +2472,6 @@ "node": ">=0.8.19" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -2667,9 +2540,9 @@ } }, "node_modules/is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2741,16 +2614,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -2798,19 +2661,19 @@ } }, "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, + "engines": { + "node": "20 || >=22" + }, "funding": { "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" } }, "node_modules/jest-worker": { @@ -2991,11 +2854,14 @@ } }, "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", + "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", "dev": true, - "license": "ISC" + "license": "ISC", + "engines": { + "node": "20 || >=22" + } }, "node_modules/memfs": { "version": "3.5.3", @@ -3028,9 +2894,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "license": "MIT", "dependencies": { @@ -3089,9 +2955,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, @@ -3165,16 +3031,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -3201,9 +3057,9 @@ "license": "MIT" }, "node_modules/oxigraph": { - "version": "0.4.0-alpha.7", - "resolved": "https://registry.npmjs.org/oxigraph/-/oxigraph-0.4.0-alpha.7.tgz", - "integrity": "sha512-qbuUH+ep7BB+Y1Tp9EbCi8roI9S5OQSipQzOqpQii/8lxg1u7XURfy0eog2rJlwo5YqfHHtQ3BUKF6YpkFTP9g==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/oxigraph/-/oxigraph-0.4.1.tgz", + "integrity": "sha512-tzFxvHN7ybnhgEUFcCtcK0cwe06CHsS4Ca0XlEB/EhHfG+lonbe8Zd+TLu/nmp+Do/fOMVUvjBVDMECNVY+O4g==", "license": "MIT OR Apache-2.0" }, "node_modules/p-limit": { @@ -3249,9 +3105,9 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, "license": "BlueOak-1.0.0" }, @@ -3304,16 +3160,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -3332,17 +3178,17 @@ "license": "MIT" }, "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" }, "engines": { - "node": ">=16 || 14 >=14.18" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3359,9 +3205,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, @@ -3458,9 +3304,9 @@ } }, "node_modules/postcss": { - "version": "8.4.40", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz", - "integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -3479,8 +3325,8 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -3550,9 +3396,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.1.tgz", - "integrity": "sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "license": "MIT", "dependencies": { @@ -3756,69 +3602,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4001,16 +3784,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/source-map": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", @@ -4022,9 +3795,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -4086,6 +3859,16 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/string-width-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -4093,20 +3876,20 @@ "dev": true, "license": "MIT" }, - "node_modules/string-width/node_modules/ansi-regex": { + "node_modules/string-width-cjs/node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "ansi-regex": "^5.0.1" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "engines": { + "node": ">=8" } }, - "node_modules/string-width/node_modules/strip-ansi": { + "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", @@ -4122,7 +3905,8 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/strip-ansi": { + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -4135,16 +3919,12 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { "node": ">=8" } @@ -4163,20 +3943,20 @@ } }, "node_modules/style-loader": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.4.tgz", - "integrity": "sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz", + "integrity": "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==", "dev": true, "license": "MIT", "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^5.0.0" + "webpack": "^5.27.0" } }, "node_modules/supports-color": { @@ -4222,9 +4002,9 @@ } }, "node_modules/terser": { - "version": "5.31.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.3.tgz", - "integrity": "sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==", + "version": "5.36.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", + "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4296,9 +4076,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", + "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", "dev": true, "license": "MIT", "engines": { @@ -4330,9 +4110,9 @@ } }, "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", "license": "0BSD" }, "node_modules/type-check": { @@ -4348,23 +4128,10 @@ "node": ">= 0.8.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4393,9 +4160,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", - "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "funding": [ { @@ -4413,8 +4180,8 @@ ], "license": "MIT", "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -4476,9 +4243,9 @@ "license": "MIT" }, "node_modules/watchpack": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", - "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dev": true, "license": "MIT", "dependencies": { @@ -4490,13 +4257,12 @@ } }, "node_modules/webpack": { - "version": "5.93.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.93.0.tgz", - "integrity": "sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA==", + "version": "5.95.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", "dev": true, "license": "MIT", "dependencies": { - "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", @@ -4505,7 +4271,7 @@ "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -4732,6 +4498,16 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -4754,17 +4530,17 @@ "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "ansi-regex": "^5.0.1" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "engines": { + "node": ">=8" } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { @@ -4780,29 +4556,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 8106c43..a5ad489 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "repository": { "url": "https://github.com/zazuko/vscode-sparql-notebook.git" }, - "version": "0.0.37", + "version": "0.0.39", "engines": { "vscode": "^1.90.0" }, @@ -181,37 +181,37 @@ }, "devDependencies": { "@types/glob": "^8.1.0", - "@types/mocha": "^10.0.6", + "@types/mocha": "^10.0.9", "@types/node": "18.x", - "@types/react": "^18.2.21", + "@types/react": "^18.3.12", "@types/react-dom": "^18.2.7", - "@types/vscode": "^1.90.0", + "@types/vscode": "^1.95.0", "@types/vscode-notebook-renderer": "^1.72.3", - "@types/vscode-webview": "^1.57.2", - "@types/webpack-env": "^1.18.1", - "@typescript-eslint/eslint-plugin": "^7.13.0", - "@typescript-eslint/parser": "^ 7.13.0", - "css-loader": "^6.8.1", - "eslint": "^8.56.0", + "@types/vscode-webview": "^1.57.5", + "@types/webpack-env": "^1.18.5", + "@typescript-eslint/eslint-plugin": "^8.12.2", + "@typescript-eslint/parser": "^ 8.12.2", + "css-loader": "^7.1.2", + "eslint": "^9.13.0", "fork-ts-checker-webpack-plugin": "^9.0.2", - "glob": "^10.4.1", + "glob": "^11.0.0", "os-browserify": "^0.3.0", "path-browserify": "^1.0.1", - "style-loader": "^3.3.3", + "style-loader": "^4.0.0", "ts-loader": "^9.5.1", - "typescript": "^5.4.5", - "url": "^0.11.1", + "typescript": "^5.6.3", + "url": "^0.11.4", "util": "^0.12.5", - "webpack": "^5.89.0", + "webpack": "^5.95.0", "webpack-cli": "^5.1.4" }, "dependencies": { "@vscode/webview-ui-toolkit": "^1.4.0", "@zazuko/prefixes": "^2.2.0", - "axios": "^1.6.7", - "oxigraph": "0.4.0-alpha.7", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "axios": "^1.7.7", + "oxigraph": " 0.4.1", + "react": "^18.3.1", + "react-dom": "^18.3.1" }, "extensionDependencies": [ "stardog-union.stardog-rdf-grammars", diff --git a/samples/first.sparqlbook b/samples/first.sparqlbook index cde2eea..13b6617 100644 --- a/samples/first.sparqlbook +++ b/samples/first.sparqlbook @@ -92,7 +92,7 @@ { "kind": 2, "language": "sparql", - "value": "# [endpoint=https://lindas.admin.ch/query]\n\nPREFIX schema: \nPREFIX rdf: \nPREFIX rdfs: \nPREFIX cube: \nPREFIX blv: \nPREFIX skos: \n\nSELECT ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup (sum(?count) as ?sum)\nWHERE {\n {\n SELECT ?observation where {\n \t{\n \t\tSELECT ?observationSet where {\n \t\t\tBIND ( as ?cube)\n\t\t\t\t?cube ?observationSet .\n \t\t} LIMIT 1\n \t}\n ?observationSet ?observation .\n\t\t?observation blv:internet-publication ?publicationDate .\n FILTER (?publicationDate >= \"2023-12-11\"^^xsd:date && ?publicationDate <= \"2023-12-17\"^^xsd:date)\n } ORDER BY desc(?publicationDate)\n }\n ?observation blv:internet-publication ?publicationDate ;\n blv:animal-specie/schema:name ?animalSpecie ;\n blv:animal-specie/skos:broader/schema:name ?animalGroup ;\n blv:epidemics/schema:name ?epidemic ;\n blv:epidemics/skos:broader/schema:name ?epidemicGroup ;\n schema:containedInPlace/schema:name ?municipality .\n OPTIONAL {\n ?observation schema:containedInPlace/schema:containedInPlace ?cantonIri .\n ?cantonIri a ;\n schema:alternateName ?canton .\n }\n BIND (1 as ?count)\n\n FILTER(langMatches(lang(?animalSpecie), \"de\"))\n FILTER(langMatches(lang(?animalGroup), \"de\"))\n FILTER(langMatches(lang(?epidemic), \"de\"))\n FILTER(langMatches(lang(?epidemicGroup), \"de\"))\n} GROUP BY ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup ?count ORDER BY ?publicationDate ?canton", + "value": "# [endpoint=https://lindas.admin.ch/query]\n\nPREFIX schema: \nPREFIX rdf: \nPREFIX rdfs: \nPREFIX cube: \nPREFIX blv: \nPREFIX skos: \nPREFIX xsd: \n\nSELECT ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup (sum(?count) as ?sum)\nWHERE {\n {\n SELECT ?observation where {\n \t{\n \t\tSELECT ?observationSet where {\n \t\t\tBIND ( as ?cube)\n\t\t\t\t?cube ?observationSet .\n \t\t} LIMIT 1\n \t}\n ?observationSet ?observation .\n\t\t?observation blv:internet-publication ?publicationDate .\n FILTER (?publicationDate >= \"2023-12-11\"^^xsd:date && ?publicationDate <= \"2023-12-17\"^^xsd:date)\n } ORDER BY desc(?publicationDate)\n }\n ?observation blv:internet-publication ?publicationDate ;\n blv:animal-specie/schema:name ?animalSpecie ;\n blv:animal-specie/skos:broader/schema:name ?animalGroup ;\n blv:epidemics/schema:name ?epidemic ;\n blv:epidemics/skos:broader/schema:name ?epidemicGroup ;\n schema:containedInPlace/schema:name ?municipality .\n OPTIONAL {\n ?observation schema:containedInPlace/schema:containedInPlace ?cantonIri .\n ?cantonIri a ;\n schema:alternateName ?canton .\n }\n BIND (1 as ?count)\n\n FILTER(langMatches(lang(?animalSpecie), \"de\"))\n FILTER(langMatches(lang(?animalGroup), \"de\"))\n FILTER(langMatches(lang(?epidemic), \"de\"))\n FILTER(langMatches(lang(?epidemicGroup), \"de\"))\n} GROUP BY ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup ?count ORDER BY ?publicationDate ?canton", "metadata": {} }, { diff --git a/samples/issues.sparqlbook b/samples/issues.sparqlbook index 65b050c..91c5cae 100644 --- a/samples/issues.sparqlbook +++ b/samples/issues.sparqlbook @@ -8,7 +8,7 @@ { "kind": 2, "language": "sparql", - "value": "PREFIX cube: \nPREFIX rdf: \n\nfrom \nselect *\nWHERE \n{ \n BIND( AS ?cube)\n ?cube rdf:type cube:Cube\n}\n", + "value": "PREFIX cube: \nPREFIX rdf: \n\nselect *\nfrom \nWHERE \n{ \n BIND( AS ?cube)\n ?cube rdf:type cube:Cube\n}\n", "metadata": {} } ] \ No newline at end of file diff --git a/src/extension/endpoint/endpoint.ts b/src/extension/endpoint/endpoint.ts index f56f5cd..8317218 100644 --- a/src/extension/endpoint/endpoint.ts +++ b/src/extension/endpoint/endpoint.ts @@ -1,3 +1,4 @@ +import { MimeType } from "../enum/mime-type"; import { SparqlQuery } from "./model/sparql-query"; /** @@ -8,8 +9,7 @@ import { SparqlQuery } from "./model/sparql-query"; */ export abstract class Endpoint { public abstract url: string; - abstract query(sparqlQuery: SparqlQuery, execution?: any): Promise; - // abstract update(sparqlConstruct: string, execution?: any): Promise; + abstract query(sparqlQuery: SparqlQuery, execution?: any): Promise | never; } /** @@ -45,4 +45,20 @@ class EndpointController { * The endpointController is used to store the current endpoint. * */ -export const notebookEndpoint = new EndpointController(); \ No newline at end of file +export const notebookEndpoint = new EndpointController(); + + + + + + +export interface SimpleHttpResponse { + + headers: HttpContentType, + data: string + +} + +export interface HttpContentType { + "content-type": MimeType +} \ No newline at end of file diff --git a/src/extension/endpoint/file-endpoint/file-endpoint.ts b/src/extension/endpoint/file-endpoint/file-endpoint.ts index 49bc728..66762c9 100644 --- a/src/extension/endpoint/file-endpoint/file-endpoint.ts +++ b/src/extension/endpoint/file-endpoint/file-endpoint.ts @@ -2,16 +2,17 @@ import { Uri, window } from 'vscode'; import * as fs from 'fs'; -import { Endpoint } from '../endpoint'; +import { Endpoint, SimpleHttpResponse } from '../endpoint'; import { RdfMimeType, SparqlStore } from '../../sparql-store/sparql-store'; import { SparqlQuery } from '../model/sparql-query'; +import { SPARQLQueryKind } from "../enum/sparql-query-kind"; +import { MimeType } from '../../enum/mime-type'; /** * Represents an HTTP SPARQL endpoint. */ export class FileEndpoint extends Endpoint { #url: string = ''; - readonly #files: Set = new Set(); readonly #store: SparqlStore; /** @@ -79,8 +80,37 @@ export class FileEndpoint extends Endpoint { * @param sparqlQuery - The SPARQL query to execute. * @param execution - The execution object. */ - public async query(sparqlQuery: SparqlQuery, execution?: any): Promise { - const res = this.#store.query(sparqlQuery); - return res; + public async query(sparqlQuery: SparqlQuery, execution?: any): Promise | never { + let response: SimpleHttpResponse | null = null; + switch (sparqlQuery.kind) { + case SPARQLQueryKind.ask: + response = { + headers: { 'content-type': MimeType.sparqlResultsJson }, + data: this.#store.ask(sparqlQuery), + }; + break; + case SPARQLQueryKind.select: + response = { + headers: { 'content-type': MimeType.sparqlResultsJson }, + data: this.#store.select(sparqlQuery), + }; + break; + case SPARQLQueryKind.describe: + response = { + headers: { 'content-type': MimeType.turtle }, + data: this.#store.describe(sparqlQuery), + }; + break; + case SPARQLQueryKind.construct: + response = { + headers: { 'content-type': MimeType.turtle }, + data: this.#store.construct(sparqlQuery), + }; + break; + default: + throw new Error('Unknown query type'); + } + + return Promise.resolve(response); } } diff --git a/src/extension/endpoint/http-endpoint/http-endpoint.ts b/src/extension/endpoint/http-endpoint/http-endpoint.ts index 67f2a89..408a71f 100644 --- a/src/extension/endpoint/http-endpoint/http-endpoint.ts +++ b/src/extension/endpoint/http-endpoint/http-endpoint.ts @@ -1,8 +1,9 @@ import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'; -import { getSPARQLQueryKind, getAcceptHeader } from '../sparql-utils'; -import { Endpoint } from '../endpoint'; +import { getAcceptHeader } from '../sparql-utils'; +import { Endpoint, SimpleHttpResponse } from '../endpoint'; import { SparqlQuery } from '../model/sparql-query'; +import { MimeType } from '../../enum/mime-type'; /** * Represents an HTTP SPARQL endpoint. @@ -38,7 +39,7 @@ export class HttpEndpoint extends Endpoint { * @param sparqlQuery - The SPARQL query to execute. * @param execution - The execution object. */ - public async query(sparqlQuery: SparqlQuery, execution?: any) { + public async query(sparqlQuery: SparqlQuery, execution?: any): Promise { const params = new URLSearchParams(); params.append("query", sparqlQuery.queryString); @@ -61,7 +62,13 @@ export class HttpEndpoint extends Endpoint { }); } const response = await this.http.post('', params, options); - return response; + const mimeType = response.headers['content-type']; + + const httpResponse: SimpleHttpResponse = { + headers: { "content-type": mimeType }, + data: typeof response.data === 'string' ? response.data : JSON.stringify(response.data) + }; + return httpResponse; } } diff --git a/src/extension/endpoint/sparql-utils.ts b/src/extension/endpoint/sparql-utils.ts index c2779fe..9d7346d 100644 --- a/src/extension/endpoint/sparql-utils.ts +++ b/src/extension/endpoint/sparql-utils.ts @@ -1,3 +1,4 @@ +import { MimeType } from "../enum/mime-type"; import { SPARQLQueryKind } from "./enum/sparql-query-kind"; @@ -53,23 +54,22 @@ export function getSPARQLQueryKind(query: string): SPARQLQueryKind { -export function getAcceptHeader(queryType: SPARQLQueryKind): string { - console.log('queryType', queryType); +export function getAcceptHeader(queryType: SPARQLQueryKind): MimeType { switch (queryType) { case SPARQLQueryKind.ask: case SPARQLQueryKind.select: - return 'application/sparql-results+json'; + return MimeType.sparqlResultsJson case SPARQLQueryKind.construct: case SPARQLQueryKind.describe: - return 'text/turtle'; + return MimeType.turtle case SPARQLQueryKind.insert: case SPARQLQueryKind.load: case SPARQLQueryKind.clear: case SPARQLQueryKind.drop: case SPARQLQueryKind.create: - return '*/*'; + return MimeType.any case SPARQLQueryKind.json: - return 'application/json'; + return MimeType.json default: throw new Error('Unknown query type' + queryType); } diff --git a/src/extension/enum/mime-type.ts b/src/extension/enum/mime-type.ts new file mode 100644 index 0000000..6f65b65 --- /dev/null +++ b/src/extension/enum/mime-type.ts @@ -0,0 +1,14 @@ +export enum MimeType { + turtle = 'text/turtle', + ntriples = 'application/n-triples', + rdfxml = 'application/rdf+xml', + trig = 'application/trig', + nquads = 'application/n-quads', + json = 'application/json', + sparqlResultsJson = 'application/sparql-results+json', + sparqlResultsXml = 'application/sparql-results+xml', + sparqlResultsCsv = 'text/csv', + sparqlResultsTsv = 'text/tab-separated-values', + plainText = 'text/plain', + any = '*/*', +} \ No newline at end of file diff --git a/src/extension/notebook/sparql-notebook-controller.ts b/src/extension/notebook/sparql-notebook-controller.ts index aef3bfa..be0a8fc 100644 --- a/src/extension/notebook/sparql-notebook-controller.ts +++ b/src/extension/notebook/sparql-notebook-controller.ts @@ -6,6 +6,8 @@ import { notebookEndpoint } from '../endpoint/endpoint'; import { SparqlNotebookCell } from './sparql-notebook-cell'; import { shrink } from '@zazuko/prefixes'; import { SparqlQuery } from '../endpoint/model/sparql-query'; +import { MimeType } from '../enum/mime-type'; +import { MIMEParams, MIMEType } from 'util'; export class SparqlNotebookController { readonly controllerId = `${extensionId}-controller-id`; @@ -109,8 +111,9 @@ export class SparqlNotebookController { const data = queryResult.data; let isSuccess = true; - if (contentType === "application/sparql-results+json") { - if (data.hasOwnProperty("boolean")) { + if (contentType === MimeType.sparqlResultsJson) { + const parsedData = JSON.parse(data); + if (parsedData.hasOwnProperty("boolean")) { // sparql ask execution.replaceOutput([this._writeAskResult(data)]); execution.end(isSuccess, Date.now()); @@ -123,16 +126,17 @@ export class SparqlNotebookController { return; } - if (contentType === "text/turtle") { + if (contentType === MimeType.turtle) { // sparql construct - execution.replaceOutput([await this._writeTurtleResult(data, sparqlCell.getPrefixMap())]); + execution.replaceOutput([await this._writeTurtleResult(data)]); execution.end(isSuccess, Date.now()); return; } - if (contentType === "application/json") { + if (contentType === MimeType.json) { // stardog is returning and error as json - execution.replaceOutput([this._writeError(data.message)]); + const errorObject = JSON.parse(data); + execution.replaceOutput([this._writeError(errorObject.message ?? 'An error occurred')]); isSuccess = false; execution.end(isSuccess, Date.now()); return; @@ -146,12 +150,12 @@ export class SparqlNotebookController { return; } - private async _writeTurtleResult(resultTTL: string, prefix: PrefixMap): Promise { + private async _writeTurtleResult(resultTTL: string): Promise { // this is writing markdown to the cell containing a turtle code block return new NotebookCellOutput([ - NotebookCellOutputItem.text(resultTTL, "text/plain"), + NotebookCellOutputItem.text(resultTTL, MimeType.plainText), NotebookCellOutputItem.text( `\`\`\`turtle\n${resultTTL}\n\`\`\``, "text/markdown" @@ -159,23 +163,23 @@ export class SparqlNotebookController { ]); } - private _writeAskResult(resultJson: any): NotebookCellOutput { + private _writeAskResult(resultJson: string): NotebookCellOutput { const outputItem = new NotebookCellOutput([ - this._writeJson(JSON.stringify(resultJson, null, " ")), + this._writeJson(resultJson), NotebookCellOutputItem.json( - resultJson, - "application/sparql-results+json" + JSON.parse(resultJson), + MimeType.sparqlResultsJson ), ]); return outputItem; } - private _writeSparqlJsonResult(resultJson: any, prefixMap: PrefixMap = {}): NotebookCellOutput { + private _writeSparqlJsonResult(resultJson: string, prefixMap: PrefixMap = {}): NotebookCellOutput { const outputItem = new NotebookCellOutput([ - this._writeJson(JSON.stringify(resultJson, null, " ")), + this._writeJson(resultJson), NotebookCellOutputItem.json( - resultJson, - "application/sparql-results+json" + JSON.parse(resultJson), + MimeType.sparqlResultsJson ), this._writeDataTableRendererCompatibleJson(resultJson, prefixMap) ]); @@ -183,14 +187,14 @@ export class SparqlNotebookController { return outputItem; } - private _writeJson(jsonResult: any): NotebookCellOutputItem { + private _writeJson(jsonResult: string): NotebookCellOutputItem { return NotebookCellOutputItem.text( `\`\`\`json\n${jsonResult}\n\`\`\``, "text/markdown" ); } - private _writeError(message: any): NotebookCellOutput { + private _writeError(message: string): NotebookCellOutput { return new NotebookCellOutput([ NotebookCellOutputItem.error({ name: "SPARQL error", @@ -199,7 +203,8 @@ export class SparqlNotebookController { ]); } - private _writeDataTableRendererCompatibleJson(resultJson: any, prefixMap: PrefixMap = {}) { + private _writeDataTableRendererCompatibleJson(resultJsonString: string, prefixMap: PrefixMap = {}) { + const resultJson = JSON.parse(resultJsonString); const dtJonBindings: { [k: string]: any }[] = resultJson.results.bindings; const dtJson = dtJonBindings.map(item => { @@ -220,7 +225,7 @@ export class SparqlNotebookController { }); const jsonStringified = JSON.stringify(dtJson, null, " "); - return NotebookCellOutputItem.text(jsonStringified, "application/json"); + return NotebookCellOutputItem.text(jsonStringified, MimeType.json); } dispose() { @@ -249,7 +254,6 @@ export class SparqlNotebookController { const activeFileDir = Uri.parse(cell.document.uri.toString(true)).with({ path: cell.document.uri.path.replace(/\/[^\/]*$/, '') }); fileUri = activeFileDir.with({ path: `${activeFileDir.path}/${filePath}` }); } - console.log('fileUri', fileUri.fsPath); const fileEndpoint = new FileEndpoint(); await fileEndpoint.addFile(fileUri); return fileEndpoint; diff --git a/src/extension/sparql-store/sparql-store.ts b/src/extension/sparql-store/sparql-store.ts index 7f17ff8..cd36c6e 100644 --- a/src/extension/sparql-store/sparql-store.ts +++ b/src/extension/sparql-store/sparql-store.ts @@ -1,4 +1,4 @@ -import { Store, defaultGraph } from 'oxigraph'; +import { Quad, Store, defaultGraph } from 'oxigraph'; import { SPARQLQueryKind } from '../endpoint/enum/sparql-query-kind'; import { SparqlQuery } from '../endpoint/model/sparql-query'; @@ -9,6 +9,11 @@ export enum RdfMimeType { trig = 'application/trig', nQuads = 'application/n-quads', } + +/** + * This is the local SPARQL endpoint that is used to execute SPARQL queries on the local RDF store. + * It is based on the Oxigraph. + */ export class SparqlStore { // the oxigraph store readonly #store: Store; @@ -18,59 +23,107 @@ export class SparqlStore { } /** - * Can be a SELECT, ASK, CONSTRUCT or DESCRIBE query + * Execute a SPARQL CONSTRUCT query and return the result as a turtle string. * - * @param query SPARQL query - * @returns + * @param query SPARQL query of type CONSTRUCT + * @returns the turtle string + * @throws Error if the query is not a CONSTRUCT query */ - public async query(query: SparqlQuery): Promise { - // Executes a SPARQL 1.1 Query. - // For SELECT queries the return type is an array of Map which keys are the bound variables and values are the values the result is bound to. - // For CONSTRUCT and DESCRIBE queries the return type is an array of Quad. - // For ASK queries the return type is a boolean. - - const queryKind = query.kind; - switch (queryKind) { - case SPARQLQueryKind.ask: - case SPARQLQueryKind.select: - const res = await this._select(query); - const fakeHttpResult = { - headers: { "content-type": "application/sparql-results+json" }, - data: JSON.parse(res) - }; - return fakeHttpResult; - case SPARQLQueryKind.construct: - case SPARQLQueryKind.describe: - return this._construct(query); - default: - return await this.#store.query(query.queryString, {}); + construct(query: SparqlQuery): string | never { + if (query.kind !== SPARQLQueryKind.construct) { + throw new Error('Query is not a CONSTRUCT query'); } + const queryResult = this.#store.query(query.queryString, { + results_format: RdfMimeType.turtle, + }) as string; + + return queryResult; } - private async _construct(query: SparqlQuery): Promise { - const ttl = (new Store(this.#store.query(query.queryString, {}))).dump(RdfMimeType.turtle, defaultGraph()); - const fakeHttpResult = { - // eslint-disable-next-line @typescript-eslint/naming-convention - headers: { "content-type": RdfMimeType.turtle }, - data: ttl - }; - return fakeHttpResult; + /** + * Execute a SPARQL CONSTRUCT query and return the result as an array of quads. + * + * @param query SPARQL query of type CONSTRUCT + * @returns the array of quads + * @throws Error if the query is not a CONSTRUCT query + */ + constructQuads(query: SparqlQuery): Quad[] | never { + if (query.kind !== SPARQLQueryKind.construct) { + throw new Error('Query is not a CONSTRUCT query'); + } + + const queryResult = this.#store.query(query.queryString) as Quad[]; + + return queryResult; } - private async _select(query: SparqlQuery): Promise { - const result = await this.#store.query(query.queryString, { + /** + * Execute a SPARQL SELECT query and return the result as a JSON string. + * + * @param query SPARQL query of type SELECT + * @returns the JSON string + * @throws Error if the query is not a SELECT query + */ + select(query: SparqlQuery): string | never { + if (query.kind !== SPARQLQueryKind.select) { + throw new Error('Query is not a SELECT query'); + } + + const queryResult = this.#store.query(query.queryString, { + results_format: 'json', + }) as string; + + return queryResult; + } + + /** + * Execute a SPARQL ASK query + * + * @param query SPARQL query of type ASK + * @returns the JSON string + */ + ask(query: SparqlQuery): string | never { + if (query.kind !== SPARQLQueryKind.ask) { + throw new Error('Query is not an ASK query'); + } + const result = this.#store.query(query.queryString, { results_format: "json", - }); + }) as string; return result; - }; + } + /** + * Execute a SPARQL DESCRIBE query and return the result as a turtle string. + * + * @param query SPARQL query of type DESCRIBE + * @returns the turtle string + */ + describe(query: SparqlQuery): string | never { + if (query.kind !== SPARQLQueryKind.describe) { + throw new Error('Query is not a DESCRIBE query'); + } + + const queryResult = this.#store.query(query.queryString, { + results_format: RdfMimeType.turtle, + }) as string; - public async update(query: SparqlQuery): Promise { - return await this.#store.update(query.queryString, {}); + return queryResult; } + describeQuads(query: SparqlQuery): Quad[] | never { + if (query.kind !== SPARQLQueryKind.describe) { + throw new Error('Query is not a DESCRIBE query'); + } + + const queryResult = this.#store.query(query.queryString) as Quad[]; + + return queryResult; + } + + /** + * Load an RDF string into the store. * * @param rdfString Load RDF data into the store * @param mimeType Supported MIME types are: application/n-triples, text/turtle, application/rdf+xml, application/n-quads @@ -82,23 +135,23 @@ export class SparqlStore { to_graph_name: defaultGraph() }; - return this.#store.load(rdfString, options, null, null); + this.#store.load(rdfString, options); } /** + * Dump the store into an RDF string. * * @param mimeType Supported MIME types are: application/n-triples, text/turtle, application/rdf+xml, application/n-quads * @returns Serialized RDF data */ - public async dump(mimeType: RdfMimeType): Promise { + public dump(mimeType: RdfMimeType): string { const options = { format: mimeType, to_graph_name: defaultGraph() }; - return await this.#store.dump(options, null); + return this.#store.dump(options); } - /** * Get the size of the store * @returns the number of triples in the store @@ -108,3 +161,11 @@ export class SparqlStore { } } + + +/** + const fakeHttpResult = { + headers: { "content-type": "application/sparql-results+json" }, + data: JSON.parse(res) + }; + */ \ No newline at end of file diff --git a/src/renderer/components/sparql-result-json-component/sparql-json-result-component.tsx b/src/renderer/components/sparql-result-json-component/sparql-json-result-component.tsx index 4d987f2..eb789f1 100644 --- a/src/renderer/components/sparql-result-json-component/sparql-json-result-component.tsx +++ b/src/renderer/components/sparql-result-json-component/sparql-json-result-component.tsx @@ -35,7 +35,7 @@ export const SparqlResultJsonComponent: React.FC ) : result[heading]?.type === 'bnode' ? ( - ) : null ?? '' + ) : '' } From a183c8ff5e7aebf8d52dd8dd2cbe13f98240a56e Mon Sep 17 00:00:00 2001 From: "Hofstetter Benjamin (extern)" Date: Tue, 5 Nov 2024 09:38:51 +0100 Subject: [PATCH 2/2] add multi file lines --- CHANGELOG.md | 2 +- README.md | 18 ++ package-lock.json | 214 ++++++++++-------- package.json | 2 +- samples/external-includes.sparqlbook | 2 +- samples/first.sparqlbook | 6 +- samples/multi-endpoiont.sparqlbook | 44 ++++ samples/query-from-rdf-file.sparqlbook | 10 +- samples/rdf/a.ttl | 3 + samples/rdf/b.ttl | 3 + src/extension/endpoint/model/sparql-query.ts | 82 +++++-- ...-notebook-cell-status-bar-item-provider.ts | 39 +++- .../notebook/sparql-notebook-controller.ts | 66 ++++-- 13 files changed, 345 insertions(+), 146 deletions(-) create mode 100644 samples/multi-endpoiont.sparqlbook create mode 100644 samples/rdf/a.ttl create mode 100644 samples/rdf/b.ttl diff --git a/CHANGELOG.md b/CHANGELOG.md index ad22ac6..2d87121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to the "vscode-sparql-notebook" extension will be documented ## 0.0.39 - Oxigraph update -- Harmonize SPARQL file and http endpoint query execution +- Feature: You can load multiple files for "local" queries. ## 0.0.38 - Oxigraph update diff --git a/README.md b/README.md index f94d8c2..2bd66a2 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,24 @@ or ``` Working with relative paths makes the notebook portable. +For file based endpoints you can have multiple files in the endpoint definitions in many ways: + +Absolute or relative paths pattern are supported but i suggest to use relative paths for portability. +```sparql +# [endpoint=./rdf/{a,b}.ttl] +``` +or +```sparql +# [endpoint=./rdf/*.ttl] +``` +or +```sparql +# [endpoint=./rdf/a.ttl] +# [endpoint=./rdf/b.ttl] +``` + +Note: You cannot mix HTTP endpoints and file endpoints in the same cell. + ### Cell Status Bar The cell status bar displays information about the endpoint in use and its source. diff --git a/package-lock.json b/package-lock.json index b39d84f..78aa4f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@vscode/webview-ui-toolkit": "^1.4.0", "@zazuko/prefixes": "^2.2.0", "axios": "^1.7.7", - "oxigraph": " 0.4.1", + "oxigraph": "^0.4.2", "react": "^18.3.1", "react-dom": "^18.3.1" }, @@ -208,9 +208,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", - "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.14.0.tgz", + "integrity": "sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==", "dev": true, "license": "MIT", "engines": { @@ -264,6 +264,20 @@ "node": ">=18.18.0" } }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -279,9 +293,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.0.tgz", + "integrity": "sha512-xnRgu9DxZbkWak/te3fcytNyp8MTbuiZIaueg2rgEvBuN55n04nwLYLU9TX/VVlusc9L2ZNXi99nUFNkHXtr5g==", "dev": true, "license": "Apache-2.0", "engines": { @@ -458,6 +472,28 @@ "node": ">= 8" } }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -498,9 +534,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.19.62", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.62.tgz", - "integrity": "sha512-UOGhw+yZV/icyM0qohQVh3ktpY40Sp7tdTW7HxG3pTd7AiMrlFlAJNUrGK9t5mdW0+ViQcFV74zCSIx9ZJpncA==", + "version": "18.19.64", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.64.tgz", + "integrity": "sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ==", "dev": true, "license": "MIT", "dependencies": { @@ -564,17 +600,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", - "integrity": "sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.13.0.tgz", + "integrity": "sha512-nQtBLiZYMUPkclSeC3id+x4uVd1SGtHuElTxL++SfP47jR0zfkZBJHc+gL4qPsgTuypz0k8Y2GheaDYn6Gy3rg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/type-utils": "8.12.2", - "@typescript-eslint/utils": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.13.0", + "@typescript-eslint/type-utils": "8.13.0", + "@typescript-eslint/utils": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -598,16 +634,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.12.2.tgz", - "integrity": "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.13.0.tgz", + "integrity": "sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.13.0", + "@typescript-eslint/types": "8.13.0", + "@typescript-eslint/typescript-estree": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0", "debug": "^4.3.4" }, "engines": { @@ -627,14 +663,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz", - "integrity": "sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.13.0.tgz", + "integrity": "sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2" + "@typescript-eslint/types": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -645,14 +681,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz", - "integrity": "sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.13.0.tgz", + "integrity": "sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/utils": "8.12.2", + "@typescript-eslint/typescript-estree": "8.13.0", + "@typescript-eslint/utils": "8.13.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -670,9 +706,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.12.2.tgz", - "integrity": "sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.13.0.tgz", + "integrity": "sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==", "dev": true, "license": "MIT", "engines": { @@ -684,14 +720,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz", - "integrity": "sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.13.0.tgz", + "integrity": "sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/types": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -713,16 +749,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.12.2.tgz", - "integrity": "sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.13.0.tgz", + "integrity": "sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2" + "@typescript-eslint/scope-manager": "8.13.0", + "@typescript-eslint/types": "8.13.0", + "@typescript-eslint/typescript-estree": "8.13.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -736,13 +772,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz", - "integrity": "sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.13.0.tgz", + "integrity": "sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/types": "8.13.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1009,16 +1045,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -1253,9 +1279,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001676", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001676.tgz", - "integrity": "sha512-Qz6zwGCiPghQXGJvgQAem79esjitvJ+CxSbSQkW9H/UX5hg8XM88d4lp2W+MEQ81j+Hip58Il+jGVdazk1z9cw==", + "version": "1.0.30001677", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz", + "integrity": "sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==", "dev": true, "funding": [ { @@ -1574,9 +1600,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.49", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz", - "integrity": "sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==", + "version": "1.5.51", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.51.tgz", + "integrity": "sha512-kKeWV57KSS8jH4alKt/jKnvHPmJgBxXzGUSbMd4eQF+iOsVPl7bz2KUmu6eo80eMP8wVioTfTyTzdMgM15WXNg==", "dev": true, "license": "ISC" }, @@ -1678,22 +1704,22 @@ } }, "node_modules/eslint": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", - "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.14.0.tgz", + "integrity": "sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", + "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.18.0", "@eslint/core": "^0.7.0", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.13.0", + "@eslint/js": "9.14.0", "@eslint/plugin-kit": "^0.2.0", - "@humanfs/node": "^0.16.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.1", + "@humanwhocodes/retry": "^0.4.0", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -1701,9 +1727,9 @@ "cross-spawn": "^7.0.2", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.1.0", - "eslint-visitor-keys": "^4.1.0", - "espree": "^10.2.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2854,9 +2880,9 @@ } }, "node_modules/lru-cache": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", - "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", + "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", "dev": true, "license": "ISC", "engines": { @@ -3057,9 +3083,9 @@ "license": "MIT" }, "node_modules/oxigraph": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/oxigraph/-/oxigraph-0.4.1.tgz", - "integrity": "sha512-tzFxvHN7ybnhgEUFcCtcK0cwe06CHsS4Ca0XlEB/EhHfG+lonbe8Zd+TLu/nmp+Do/fOMVUvjBVDMECNVY+O4g==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/oxigraph/-/oxigraph-0.4.2.tgz", + "integrity": "sha512-ips0pdthYfr24q6H572Q5pzrfqOa+dooh5GcaR3qGh8nUrOezTfUNZJ1kOReIJcf2E4Q/or3DY9Lb/kx4m/dkQ==", "license": "MIT OR Apache-2.0" }, "node_modules/p-limit": { @@ -4110,9 +4136,9 @@ } }, "node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/type-check": { @@ -4257,19 +4283,19 @@ } }, "node_modules/webpack": { - "version": "5.95.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", - "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", + "version": "5.96.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", + "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "^1.0.5", + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", diff --git a/package.json b/package.json index a5ad489..2934975 100644 --- a/package.json +++ b/package.json @@ -209,7 +209,7 @@ "@vscode/webview-ui-toolkit": "^1.4.0", "@zazuko/prefixes": "^2.2.0", "axios": "^1.7.7", - "oxigraph": " 0.4.1", + "oxigraph": "^0.4.2", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/samples/external-includes.sparqlbook b/samples/external-includes.sparqlbook index bd03ead..d888272 100644 --- a/samples/external-includes.sparqlbook +++ b/samples/external-includes.sparqlbook @@ -22,7 +22,7 @@ { "kind": 2, "language": "sparql", - "value": "# from file queries/z-external-query.rq\n# [endpoint=https://lindas.admin.ch/query]\n#\nPREFIX gont: \nPREFIX schema: \nSELECT ?name ?abbr ?date WHERE {\n { \n ?canton a gont:Canton;\n gont:cantonAbbreviation ?abbr ;\n gont:date ?date ;\n gont:longName ?name . \n } UNION {\n gont:Canton ?p ?o .\n }\n} \n", + "value": "# from file queries/z-external-query.rq\n\n\n# [endpoint=https://lindas.admin.ch/query]\n#\n# change \n# windows change\nPREFIX gont: \nPREFIX schema: \nSELECT ?name ?abbr ?date WHERE {\n { \n ?canton a gont:Canton;\n gont:cantonAbbreviation ?abbr ;\n gont:date ?date ;\n gont:longName ?name . \n } UNION {\n gont:Canton ?p ?o .\n }\n} \n", "metadata": { "file": "queries/z-external-query.rq" } diff --git a/samples/first.sparqlbook b/samples/first.sparqlbook index 13b6617..a21adf5 100644 --- a/samples/first.sparqlbook +++ b/samples/first.sparqlbook @@ -14,7 +14,7 @@ { "kind": 2, "language": "sparql", - "value": "#\n# Test [endpoint=https://query.wikidata.org/bigdata/namespace/wdq/sparql] Test \n# \nPREFIX schema: \nPREFIX wd: \nPREFIX wdt: \nPREFIX wikibase: \nPREFIX bd: \n\nSELECT DISTINCT ?euMemberCountry ?euMemberCountryLabel ?headOfState ?headOfStateLabel\n \nWHERE {\n ?euMemberCountry wdt:P463 wd:Q458;\n wdt:P35 ?headOfState .\n SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n}", + "value": "#\n# Test [endpoint=https://query.wikidata.org/bigdata/namespace/wdq/sparql] Test \n# \nPREFIX wd: \nPREFIX wdt: \nPREFIX wikibase: \nPREFIX bd: \n\nSELECT DISTINCT ?euMemberCountry ?euMemberCountryLabel ?headOfState ?headOfStateLabel\n \nWHERE {\n ?euMemberCountry wdt:P463 wd:Q458;\n wdt:P35 ?headOfState .\n SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n}", "metadata": {} }, { @@ -86,13 +86,13 @@ { "kind": 2, "language": "sparql", - "value": "SELECT (COUNT (?work_of_Agatha_Christie) AS ?Number_of_AC_works)\n\n{?work_of_Agatha_Christie dbo:author dbr:Agatha_Christie } \n\n", + "value": "PREFIX dbo: \nPREFIX dbr: \n\nSELECT (COUNT (?work_of_Agatha_Christie) AS ?Number_of_AC_works) {\n ?work_of_Agatha_Christie dbo:author dbr:Agatha_Christie \n } \n\n", "metadata": {} }, { "kind": 2, "language": "sparql", - "value": "# [endpoint=https://lindas.admin.ch/query]\n\nPREFIX schema: \nPREFIX rdf: \nPREFIX rdfs: \nPREFIX cube: \nPREFIX blv: \nPREFIX skos: \nPREFIX xsd: \n\nSELECT ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup (sum(?count) as ?sum)\nWHERE {\n {\n SELECT ?observation where {\n \t{\n \t\tSELECT ?observationSet where {\n \t\t\tBIND ( as ?cube)\n\t\t\t\t?cube ?observationSet .\n \t\t} LIMIT 1\n \t}\n ?observationSet ?observation .\n\t\t?observation blv:internet-publication ?publicationDate .\n FILTER (?publicationDate >= \"2023-12-11\"^^xsd:date && ?publicationDate <= \"2023-12-17\"^^xsd:date)\n } ORDER BY desc(?publicationDate)\n }\n ?observation blv:internet-publication ?publicationDate ;\n blv:animal-specie/schema:name ?animalSpecie ;\n blv:animal-specie/skos:broader/schema:name ?animalGroup ;\n blv:epidemics/schema:name ?epidemic ;\n blv:epidemics/skos:broader/schema:name ?epidemicGroup ;\n schema:containedInPlace/schema:name ?municipality .\n OPTIONAL {\n ?observation schema:containedInPlace/schema:containedInPlace ?cantonIri .\n ?cantonIri a ;\n schema:alternateName ?canton .\n }\n BIND (1 as ?count)\n\n FILTER(langMatches(lang(?animalSpecie), \"de\"))\n FILTER(langMatches(lang(?animalGroup), \"de\"))\n FILTER(langMatches(lang(?epidemic), \"de\"))\n FILTER(langMatches(lang(?epidemicGroup), \"de\"))\n} GROUP BY ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup ?count ORDER BY ?publicationDate ?canton", + "value": "# [endpoint=https://lindas.admin.ch/query]\n\nPREFIX schema: \nPREFIX blv: \nPREFIX skos: \nPREFIX xsd: \n\nSELECT ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup (sum(?count) as ?sum)\nWHERE {\n {\n SELECT ?observation where {\n \t{\n \t\tSELECT ?observationSet where {\n \t\t\tBIND ( as ?cube)\n\t\t\t\t?cube ?observationSet .\n \t\t} LIMIT 1\n \t}\n ?observationSet ?observation .\n\t\t?observation blv:internet-publication ?publicationDate .\n FILTER (?publicationDate >= \"2023-12-11\"^^xsd:date && ?publicationDate <= \"2023-12-17\"^^xsd:date)\n } ORDER BY desc(?publicationDate)\n }\n ?observation blv:internet-publication ?publicationDate ;\n blv:animal-specie/schema:name ?animalSpecie ;\n blv:animal-specie/skos:broader/schema:name ?animalGroup ;\n blv:epidemics/schema:name ?epidemic ;\n blv:epidemics/skos:broader/schema:name ?epidemicGroup ;\n schema:containedInPlace/schema:name ?municipality .\n OPTIONAL {\n ?observation schema:containedInPlace/schema:containedInPlace ?cantonIri .\n ?cantonIri a ;\n schema:alternateName ?canton .\n }\n BIND (1 as ?count)\n\n FILTER(langMatches(lang(?animalSpecie), \"de\"))\n FILTER(langMatches(lang(?animalGroup), \"de\"))\n FILTER(langMatches(lang(?epidemic), \"de\"))\n FILTER(langMatches(lang(?epidemicGroup), \"de\"))\n} GROUP BY ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup ?count ORDER BY ?publicationDate ?canton", "metadata": {} }, { diff --git a/samples/multi-endpoiont.sparqlbook b/samples/multi-endpoiont.sparqlbook new file mode 100644 index 0000000..e757aa2 --- /dev/null +++ b/samples/multi-endpoiont.sparqlbook @@ -0,0 +1,44 @@ +[ + { + "kind": 2, + "language": "sparql", + "value": "# [endpoint=./rdf/curia.nt]\n\nPREFIX schema: \nPREFIX rdf: \nPREFIX rdfs: \nPREFIX xsd:\n\nDESCRIBE ", + "metadata": {} + }, + { + "kind": 2, + "language": "sparql", + "value": "# [endpoint=./rdf/*]\n# error will be shown \nPREFIX schema: \nPREFIX rdf: \nPREFIX rdfs: \nPREFIX xsd:\n\nDESCRIBE ", + "metadata": {} + }, + { + "kind": 2, + "language": "sparql", + "value": "# [endpoint=./rdf/curia.nt]\n# [endpoint=./rdf/curia.nt]\n# [endpoint=./rdf/curia.nt]\n# [endpoint=./rdf/curia.nt]\nPREFIX schema: \nPREFIX rdf: \nPREFIX rdfs: \nPREFIX xsd:\n\nDESCRIBE ", + "metadata": {} + }, + { + "kind": 2, + "language": "sparql", + "value": "# [endpoint=./rdf/{a,b}.ttl]\n\nSELECT * WHERE {\n ?s ?p ?o\n}", + "metadata": {} + }, + { + "kind": 2, + "language": "sparql", + "value": "# [endpoint=./rdf/a.ttl]\n# [endpoint=./rdf/b.ttl]\n\nSELECT * WHERE {\n ?s ?p ?o\n}", + "metadata": {} + }, + { + "kind": 2, + "language": "sparql", + "value": "# [endpoint=rdf/a.ttl]\n# [endpoint=/Users/benjaminhofstetter/code/zazuko/github/vscode-sparql-notebook/samples/rdf/b.ttl]\n\nSELECT * WHERE {\n ?s ?p ?o\n}", + "metadata": {} + }, + { + "kind": 2, + "language": "sparql", + "value": "# [endpoint=rdf/a.ttl]\n# Test [endpoint=https://query.wikidata.org/bigdata/namespace/wdq/sparql] Test \n# \nPREFIX wd: \nPREFIX wdt: \nPREFIX wikibase: \nPREFIX bd: \n\nSELECT DISTINCT ?euMemberCountry ?euMemberCountryLabel ?headOfState ?headOfStateLabel\n \nWHERE {\n ?euMemberCountry wdt:P463 wd:Q458;\n wdt:P35 ?headOfState .\n SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n}", + "metadata": {} + } +] \ No newline at end of file diff --git a/samples/query-from-rdf-file.sparqlbook b/samples/query-from-rdf-file.sparqlbook index 9d4f36a..94e4343 100644 --- a/samples/query-from-rdf-file.sparqlbook +++ b/samples/query-from-rdf-file.sparqlbook @@ -8,19 +8,19 @@ { "kind": 2, "language": "sparql", - "value": "\nPREFIX schema: \n\nSELECT ?person ?name ?givenName WHERE {\n {\n BIND( as ?person) \n ?person schema:name ?name .\n }\n UNION\n {\n BIND( as ?person) \n ?person schema:givenName ?givenName .\n }\n} \n", + "value": "\nPREFIX schema: \nPREFIX blv: \nPREFIX skos: \nPREFIX xsd: \n\nSELECT ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup (sum(?count) as ?sum)\nWHERE {\n {\n SELECT ?observation where {\n \t{\n \t\tSELECT ?observationSet where {\n \t\t\tBIND ( as ?cube)\n\t\t\t\t?cube ?observationSet .\n \t\t} LIMIT 1\n \t}\n ?observationSet ?observation .\n\t\t?observation blv:internet-publication ?publicationDate .\n FILTER (?publicationDate >= \"2023-12-11\"^^xsd:date && ?publicationDate <= \"2023-12-17\"^^xsd:date)\n } ORDER BY desc(?publicationDate)\n }\n ?observation blv:internet-publication ?publicationDate ;\n blv:animal-specie/schema:name ?animalSpecie ;\n blv:animal-specie/skos:broader/schema:name ?animalGroup ;\n blv:epidemics/schema:name ?epidemic ;\n blv:epidemics/skos:broader/schema:name ?epidemicGroup ;\n schema:containedInPlace/schema:name ?municipality .\n OPTIONAL {\n ?observation schema:containedInPlace/schema:containedInPlace ?cantonIri .\n ?cantonIri a ;\n schema:alternateName ?canton .\n }\n BIND (1 as ?count)\n\n FILTER(langMatches(lang(?animalSpecie), \"de\"))\n FILTER(langMatches(lang(?animalGroup), \"de\"))\n FILTER(langMatches(lang(?epidemic), \"de\"))\n FILTER(langMatches(lang(?epidemicGroup), \"de\"))\n} GROUP BY ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup ?count ORDER BY ?publicationDate ?canton", "metadata": {} }, { "kind": 2, "language": "sparql", - "value": "# [endpoint=https://lindas.admin.ch/query]\n\nPREFIX schema: \n\nSELECT ?person ?name ?givenName WHERE {\n {\n BIND( as ?person) \n ?person schema:name ?name .\n }\n UNION\n {\n BIND( as ?person) \n ?person schema:givenName ?givenName .\n }\n}", + "value": "# [endpoint=https://lindas.admin.ch/query]\n# [endpoint=https://lindas.admin.ch/query]\n\nPREFIX schema: \nPREFIX blv: \nPREFIX skos: \nPREFIX xsd: \n\nSELECT ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup (sum(?count) as ?sum)\nWHERE {\n {\n SELECT ?observation where {\n \t{\n \t\tSELECT ?observationSet where {\n \t\t\tBIND ( as ?cube)\n\t\t\t\t?cube ?observationSet .\n \t\t} LIMIT 1\n \t}\n ?observationSet ?observation .\n\t\t?observation blv:internet-publication ?publicationDate .\n FILTER (?publicationDate >= \"2023-12-11\"^^xsd:date && ?publicationDate <= \"2023-12-17\"^^xsd:date)\n } ORDER BY desc(?publicationDate)\n }\n ?observation blv:internet-publication ?publicationDate ;\n blv:animal-specie/schema:name ?animalSpecie ;\n blv:animal-specie/skos:broader/schema:name ?animalGroup ;\n blv:epidemics/schema:name ?epidemic ;\n blv:epidemics/skos:broader/schema:name ?epidemicGroup ;\n schema:containedInPlace/schema:name ?municipality .\n OPTIONAL {\n ?observation schema:containedInPlace/schema:containedInPlace ?cantonIri .\n ?cantonIri a ;\n schema:alternateName ?canton .\n }\n BIND (1 as ?count)\n\n FILTER(langMatches(lang(?animalSpecie), \"de\"))\n FILTER(langMatches(lang(?animalGroup), \"de\"))\n FILTER(langMatches(lang(?epidemic), \"de\"))\n FILTER(langMatches(lang(?epidemicGroup), \"de\"))\n} GROUP BY ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup ?count ORDER BY ?publicationDate ?canton\n", "metadata": {} }, { "kind": 2, "language": "sparql", - "value": "PREFIX schema: \n\nSELECT ?propertyShape ?p ?o WHERE {\n BIND ( as ?set)\n ?set ?propertyShape . \n ?propertyShape ?p ?o .\n} ", + "value": "# [endpoint=https://lindas.admin.ch/query]\n\nPREFIX schema: \nPREFIX blv: \nPREFIX skos: \nPREFIX xsd: \n\nSELECT ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup (sum(?count) as ?sum)\nWHERE {\n {\n SELECT ?observation where {\n \t{\n \t\tSELECT ?observationSet where {\n \t\t\tBIND ( as ?cube)\n\t\t\t\t?cube ?observationSet .\n \t\t} LIMIT 1\n \t}\n ?observationSet ?observation .\n\t\t?observation blv:internet-publication ?publicationDate .\n FILTER (?publicationDate >= \"2023-12-11\"^^xsd:date && ?publicationDate <= \"2023-12-17\"^^xsd:date)\n } ORDER BY desc(?publicationDate)\n }\n ?observation blv:internet-publication ?publicationDate ;\n blv:animal-specie/schema:name ?animalSpecie ;\n blv:animal-specie/skos:broader/schema:name ?animalGroup ;\n blv:epidemics/schema:name ?epidemic ;\n blv:epidemics/skos:broader/schema:name ?epidemicGroup ;\n schema:containedInPlace/schema:name ?municipality .\n OPTIONAL {\n ?observation schema:containedInPlace/schema:containedInPlace ?cantonIri .\n ?cantonIri a ;\n schema:alternateName ?canton .\n }\n BIND (1 as ?count)\n\n FILTER(langMatches(lang(?animalSpecie), \"de\"))\n FILTER(langMatches(lang(?animalGroup), \"de\"))\n FILTER(langMatches(lang(?epidemic), \"de\"))\n FILTER(langMatches(lang(?epidemicGroup), \"de\"))\n} GROUP BY ?publicationDate ?canton ?municipality ?animalSpecie ?epidemic ?epidemicGroup ?animalGroup ?count ORDER BY ?publicationDate ?canton", "metadata": {} }, { @@ -38,7 +38,7 @@ { "kind": 2, "language": "sparql", - "value": "DESCRIBE ", + "value": "DESCRIBE ", "metadata": {} }, { @@ -58,7 +58,7 @@ { "kind": 2, "language": "sparql", - "value": "# from file queries/z-external-query-win.rq\n\n\n# [endpoint=https://lindas.admin.ch/query]\n# not funny\n\nPREFIX gont: \nPREFIX schema: \nSELECT ?name ?abbr ?date WHERE {\n { \n ?canton a gont:Canton;\n gont:cantonAbbreviation ?abbr ;\n gont:date ?date ;\n gont:longName ?name . \n } UNION {\n gont:Canton ?p ?o .\n }\n} \n", + "value": "# from file queries/z-external-query-win.rq\n# [endpoint=https://lindas.admin.ch/query]\n\nPREFIX gont: \nPREFIX schema: \nSELECT ?name ?abbr ?date WHERE {\n { \n ?canton a gont:Canton;\n gont:cantonAbbreviation ?abbr ;\n gont:date ?date ;\n gont:longName ?name . \n } UNION {\n gont:Canton ?p ?o .\n }\n} \n", "metadata": { "file": "queries/z-external-query-win.rq" } diff --git a/samples/rdf/a.ttl b/samples/rdf/a.ttl new file mode 100644 index 0000000..220159c --- /dev/null +++ b/samples/rdf/a.ttl @@ -0,0 +1,3 @@ +@prefix ex: . + +ex:A a ex:Class1 . diff --git a/samples/rdf/b.ttl b/samples/rdf/b.ttl new file mode 100644 index 0000000..4443cbf --- /dev/null +++ b/samples/rdf/b.ttl @@ -0,0 +1,3 @@ +@prefix ex: . + +ex:B a ex:Class1 . diff --git a/src/extension/endpoint/model/sparql-query.ts b/src/extension/endpoint/model/sparql-query.ts index 11b6b27..e27922a 100644 --- a/src/extension/endpoint/model/sparql-query.ts +++ b/src/extension/endpoint/model/sparql-query.ts @@ -1,10 +1,15 @@ +import { window } from "vscode"; + import { SPARQLQueryKind } from "../enum/sparql-query-kind"; import { getSPARQLQueryKind } from "../sparql-utils"; +import * as glob from 'glob'; export class SparqlQuery { readonly #queryString: string; readonly #queryKind: SPARQLQueryKind; + #extractedEndpointCollection: EndpointCollection | undefined = undefined; + /** * Creates a new instance of the SparqlQuery class. * @param queryString - The SPARQL query string. @@ -34,33 +39,80 @@ export class SparqlQuery { * * @returns the endpoint url or undefined if not found */ - extractEndpoint(): string | undefined { + extractEndpoint(): EndpointCollection { + if (this.#extractedEndpointCollection !== undefined) { + return this.#extractedEndpointCollection; + } const commentLines = this.#queryString .split("\n") .map((l) => l.trim()) .filter((l) => l.startsWith("#")); - const endpointExp = /\[endpoint=(.*)\]/gm; - const endpoints: string[] = []; - commentLines.every((comment: string) => { + const endpointsSet = new Set(); + commentLines.forEach((comment: string) => { + const endpointExp = /\[endpoint=(.*)\]/gm; const match = endpointExp.exec(comment); if (match) { - endpoints.push(match[1]); - return false; + endpointsSet.add(match[1]); } - return true; }); - return endpoints.shift() ?? undefined; + + const endpoints: ExtractedEndpoint[] = [...endpointsSet].flatMap(endpoint => { + const kind = endpoint.startsWith("http://") || endpoint.startsWith('https://') ? EndpointKind.Http : EndpointKind.File; + return [{ kind, endpoint }]; + }); + this.#extractedEndpointCollection = new EndpointCollection(endpoints); + return this.#extractedEndpointCollection; + } + +} + + +export enum EndpointKind { + File = 'file', + Http = 'http' +} + +export interface ExtractedEndpoint { + kind: EndpointKind; + endpoint: string; +} + +export class EndpointCollection { + readonly #endpoints: ExtractedEndpoint[]; + + constructor(endpoints: ExtractedEndpoint[]) { + this.#endpoints = endpoints; + } + + get #hasHttpEndpoint(): boolean { + return this.#endpoints.some(e => e.kind === 'http'); + } + + get #hasFileEndpoint(): boolean { + return this.#endpoints.some(e => e.kind === 'file'); } /** - * Try to extract the file path from the SPARQL query. Looks for a line like: - * [file: ] - * - * @returns the file path or undefined if not found + * Get the configured endpoints from the SPARQL query. The output is an array of endpoints. + * If the query contains both file and http endpoints, an error message is shown and an empty array is returned. + * If the query contains multiple http endpoints, an error message is shown and an empty array is returned. + * If all is ok the array of endpoints is returned. + * @returns the extracted endpoints from the SPARQL query. */ - extractFilePath(): string | undefined { - console.log('extractFilePath: not implemented'); - return undefined; + getEndpoints(): ExtractedEndpoint[] { + if (this.#endpoints.length === 0) { + return []; + } + if (this.#hasFileEndpoint && this.#hasHttpEndpoint) { + window.showWarningMessage('SPARQL query contains both file and http endpoints. Please remove one of them.'); + return []; + } + + if (this.#hasHttpEndpoint && this.#endpoints.length > 1) { + window.showWarningMessage('SPARQL query contains multiple http endpoints. Please remove all but one.'); + return []; + } + return this.#endpoints; } } \ No newline at end of file diff --git a/src/extension/notebook/sparql-notebook-cell-status-bar-item-provider.ts b/src/extension/notebook/sparql-notebook-cell-status-bar-item-provider.ts index 3741fe4..34e4bd4 100644 --- a/src/extension/notebook/sparql-notebook-cell-status-bar-item-provider.ts +++ b/src/extension/notebook/sparql-notebook-cell-status-bar-item-provider.ts @@ -4,6 +4,7 @@ import { } from 'vscode'; import { SparqlNotebookCell } from './sparql-notebook-cell'; import { notebookEndpoint } from '../endpoint/endpoint'; +import { EndpointKind } from '../endpoint/model/sparql-query'; // we have 3 possible notebook cell status bar items // 1. the connection source - it could be be connected to a "global" notebook connection from the cell @@ -20,18 +21,30 @@ export enum ConnectionSource { } export class ConnectionSourceStatusBarItem extends NotebookCellStatusBarItem { - private readonly icon = ' $(link)'; - private itemText = 'Notebook Connection'; + readonly #sparqlEndpointIcon = ' $(link)'; + #endpointSource: EndpointSource = EndpointSource.notConnected; + #endpointSourceIcon: EndpointKindIcon = EndpointKindIcon.NotConnected; + constructor(cell: SparqlNotebookCell, alignment: NotebookCellStatusBarAlignment) { super('', alignment); const sparqlQuery = cell.sparqlQuery; - let commentEndpoint = sparqlQuery.extractEndpoint(); - if (commentEndpoint) { - this.itemText = `Query Comment`; + let endpointsFromCell = sparqlQuery.extractEndpoint().getEndpoints(); + if (endpointsFromCell.length > 0) { + if (endpointsFromCell[0].kind === EndpointKind.Http) { + this.#endpointSource = EndpointSource.cell; + this.#endpointSourceIcon = EndpointKindIcon.Http; + } else if (endpointsFromCell[0].kind === EndpointKind.File) { + this.#endpointSource = EndpointSource.cell; + this.#endpointSourceIcon = EndpointKindIcon.File; + } + } else if (notebookEndpoint.endpoint) { + this.#endpointSource = EndpointSource.notebookEndpointConnection; + this.#endpointSourceIcon = EndpointKindIcon.NotConnected; } - this.text = `${this.icon} ${this.itemText} ${commentEndpoint ?? notebookEndpoint.endpoint?.url ? ((commentEndpoint ?? notebookEndpoint.endpoint?.url)?.startsWith('http') ? `$(database)` : '$(file)') : '$(circle-slash)'}`; - this.tooltip = `Endpoint: ${commentEndpoint ?? notebookEndpoint.endpoint?.url ?? "None"}`; + + this.text = `${this.#sparqlEndpointIcon} ${this.#endpointSource} ${this.#endpointSourceIcon}`; + this.tooltip = `Endpoint: ${this.#endpointSource}`; } } @@ -50,4 +63,16 @@ export class CellContentStatusBarItem extends NotebookCellStatusBarItem { this.text = `${this.icon} ${this.itemText}`; this.tooltip = `Cell text source: ${cell.metadata.file ?? "Cell"}`; } +} + +enum EndpointSource { + cell = 'Cell Comment', + notebookEndpointConnection = 'Endpoint Connection', + notConnected = 'Not Connected' +} + +enum EndpointKindIcon { + File = '$(file)', + Http = '$(database)', + NotConnected = '$(circle-slash)' } \ No newline at end of file diff --git a/src/extension/notebook/sparql-notebook-controller.ts b/src/extension/notebook/sparql-notebook-controller.ts index be0a8fc..3acc0a5 100644 --- a/src/extension/notebook/sparql-notebook-controller.ts +++ b/src/extension/notebook/sparql-notebook-controller.ts @@ -1,13 +1,15 @@ -import { NotebookCell, NotebookCellOutput, NotebookCellOutputItem, NotebookController, NotebookDocument, Uri, commands, notebooks, window, workspace } from 'vscode'; +import { NotebookCell, NotebookCellOutput, RelativePattern, GlobPattern, NotebookCellOutputItem, NotebookController, NotebookDocument, Uri, commands, notebooks, window, workspace } from 'vscode'; import { extensionId } from "../extension"; import { Endpoint, FileEndpoint, HttpEndpoint, } from "../endpoint"; import { PrefixMap } from '../model/prefix-map'; import { notebookEndpoint } from '../endpoint/endpoint'; import { SparqlNotebookCell } from './sparql-notebook-cell'; import { shrink } from '@zazuko/prefixes'; -import { SparqlQuery } from '../endpoint/model/sparql-query'; +import { EndpointKind, SparqlQuery } from '../endpoint/model/sparql-query'; import { MimeType } from '../enum/mime-type'; -import { MIMEParams, MIMEType } from 'util'; +import path = require('path'); +import { Glob } from 'glob'; +import { File } from 'buffer'; export class SparqlNotebookController { readonly controllerId = `${extensionId}-controller-id`; @@ -239,27 +241,53 @@ export class SparqlNotebookController { * @returns An Endpoint instance for the given SPARQL query, or null if no endpoint could be found. */ private async _getDocumentOrConnectionClient(cell: SparqlNotebookCell, sparqlQuery: SparqlQuery): Promise { - const documentEndpoint = sparqlQuery.extractEndpoint(); - if (documentEndpoint) { - if (documentEndpoint.startsWith("http")) { - return new HttpEndpoint(documentEndpoint, "", ""); + const documentEndpoints = sparqlQuery.extractEndpoint().getEndpoints(); + + if (documentEndpoints.length > 0) { + + if (documentEndpoints[0].kind === EndpointKind.Http) { + // http endpoint (only one is supported) + return new HttpEndpoint(documentEndpoints[0].endpoint, "", ""); } - const filePath = documentEndpoint; - let fileUri: Uri; - if (filePath.startsWith('/')) { - // Absolute path - fileUri = Uri.file(filePath); - } else { - // Relative path - const activeFileDir = Uri.parse(cell.document.uri.toString(true)).with({ path: cell.document.uri.path.replace(/\/[^\/]*$/, '') }); - fileUri = activeFileDir.with({ path: `${activeFileDir.path}/${filePath}` }); + if (documentEndpoints[0].kind === EndpointKind.File) { + // file endpoint + const fileEndpoint = new FileEndpoint(); + for (const extractFileEndpoint of documentEndpoints) { + await this.#loadFileToStore(extractFileEndpoint.endpoint, fileEndpoint); + } + return fileEndpoint; } - const fileEndpoint = new FileEndpoint(); - await fileEndpoint.addFile(fileUri); - return fileEndpoint; } return notebookEndpoint.endpoint; + } + async #loadFileToStore(filePathPattern: string, fileEndpoint: FileEndpoint): Promise { + const notebookUri = window.activeNotebookEditor?.notebook.uri; + const fileUri: Uri[] = []; + + if (filePathPattern.startsWith('/')) { + // Absolute pattern + const fileName = path.basename(filePathPattern); + const directory = path.dirname(filePathPattern); + const relativePattern = new RelativePattern(directory, fileName); + const files = await workspace.findFiles(relativePattern); + + fileUri.push(...files); + } else { + // Relative pattern + const relativePatternString = filePathPattern.startsWith('./') ? filePathPattern.replace('./', '') : filePathPattern; + const notebookDirectory = path.dirname(notebookUri!.fsPath); + const relativePattern = new RelativePattern(notebookDirectory, relativePatternString); + const files = await workspace.findFiles(relativePattern); + fileUri.push(...files); + } + + for (const uri of fileUri) { + await fileEndpoint.addFile(uri); + }; + + + } }