From cc225bcde7c67625e598e59a09447ce53a27c2f0 Mon Sep 17 00:00:00 2001 From: Laurin Weger Date: Sun, 14 Sep 2025 22:24:26 +0300 Subject: [PATCH] compact shapes & message broadcasting --- package-lock.json | 1724 ++++++++++++++++- package.json | 2 + .../connector/createSignalObjectForShape.ts | 239 ++- .../frontendAdapters/react/useShape.ts | 12 +- src/ng-mock/wasm-land/requestShape.ts | 99 - src/ng-mock/wasm-land/shapeHandler.ts | 255 +++ src/ng-mock/wasm-land/sparql/README.md | 14 + .../wasm-land/sparql/buildConstruct.ts | 149 ++ src/ng-mock/wasm-land/sparql/buildSelect.ts | 152 ++ src/ng-mock/wasm-land/sparql/common.ts | 125 ++ src/ng-mock/wasm-land/updateShape.ts | 10 +- src/shapes/ldo/catShape.schema.compact.ts | 77 + src/shapes/ldo/catShape.schema.ts | 104 - ...ypes.ts => catShape.shapeTypes.compact.ts} | 0 src/shapes/ldo/personShape.schema.compact.ts | 70 + src/shapes/ldo/personShape.schema.ts | 95 - ...s.ts => personShape.shapeTypes.compact.ts} | 0 src/shapes/ldo/testShape.schema.compact.ts | 114 ++ src/shapes/ldo/testShape.schema.ts | 150 -- ...pes.ts => testShape.shapeTypes.compact.ts} | 0 20 files changed, 2836 insertions(+), 555 deletions(-) delete mode 100644 src/ng-mock/wasm-land/requestShape.ts create mode 100644 src/ng-mock/wasm-land/shapeHandler.ts create mode 100644 src/ng-mock/wasm-land/sparql/README.md create mode 100644 src/ng-mock/wasm-land/sparql/buildConstruct.ts create mode 100644 src/ng-mock/wasm-land/sparql/buildSelect.ts create mode 100644 src/ng-mock/wasm-land/sparql/common.ts create mode 100644 src/shapes/ldo/catShape.schema.compact.ts delete mode 100644 src/shapes/ldo/catShape.schema.ts rename src/shapes/ldo/{catShape.shapeTypes.ts => catShape.shapeTypes.compact.ts} (100%) create mode 100644 src/shapes/ldo/personShape.schema.compact.ts delete mode 100644 src/shapes/ldo/personShape.schema.ts rename src/shapes/ldo/{personShape.shapeTypes.ts => personShape.shapeTypes.compact.ts} (100%) create mode 100644 src/shapes/ldo/testShape.schema.compact.ts delete mode 100644 src/shapes/ldo/testShape.schema.ts rename src/shapes/ldo/{testShape.shapeTypes.ts => testShape.shapeTypes.compact.ts} (100%) diff --git a/package-lock.json b/package-lock.json index ffe7102..c872808 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,12 +24,14 @@ "astro": "5.13.2", "install": "^0.13.0", "npm": "^11.5.2", + "prettier-eslint": "^16.4.2", "react": "19.1.1", "react-dom": "19.1.1", "svelte": "5.38.2", "vue": "3.5.19" }, "devDependencies": { + "@ldo/traverser-shexj": "^1.0.0-alpha.28", "@playwright/test": "^1.55.0", "@types/node": "24.3.0", "@types/react": "19.1.10", @@ -968,6 +970,87 @@ "node": ">=18" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@gn8/alien-signals-react": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@gn8/alien-signals-react/-/alien-signals-react-0.1.1.tgz", @@ -1008,6 +1091,63 @@ "vue": ">=3.0.0" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "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==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "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", + "license": "BSD-3-Clause" + }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.33.5", "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", @@ -1369,6 +1509,18 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "license": "MIT", @@ -1462,6 +1614,71 @@ "uuid": "^11.1.0" } }, + "node_modules/@ldo/traverser-shexj": { + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmjs.org/@ldo/traverser-shexj/-/traverser-shexj-1.0.0-alpha.28.tgz", + "integrity": "sha512-N06+LOWhv6//unPRLbFMd56MqPf5lO2ihZgle9hNLmxt6QJmNrZM3oXzHCL3TfDu4OT1/NUZp3kj2HmztQIZkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ldo/type-traverser": "^1.0.0-alpha.28" + } + }, + "node_modules/@ldo/type-traverser": { + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmjs.org/@ldo/type-traverser/-/type-traverser-1.0.0-alpha.28.tgz", + "integrity": "sha512-pGMIVxLzoLjYVhADuVhg6r5ZDNleXZ9DcyIvLXo1/ADEocLnysg/Xjk9D/7l/Rw3WtDJrTFOOtBv8OnH+VPgKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "uuid": "^8.3.2" + } + }, + "node_modules/@ldo/type-traverser/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@oslojs/encoding": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@oslojs/encoding/-/encoding-1.1.0.tgz", @@ -1646,6 +1863,12 @@ "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", "license": "MIT" }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "license": "MIT" + }, "node_modules/@sindresorhus/merge-streams": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", @@ -1835,6 +2058,121 @@ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "license": "MIT" }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "license": "MIT", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", @@ -2199,6 +2537,31 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/alien-deepsignals": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/alien-deepsignals/-/alien-deepsignals-0.1.0.tgz", @@ -2342,6 +2705,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -2549,6 +2921,12 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, "node_modules/base-64": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", @@ -2626,6 +3004,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/brotli": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.3.tgz", @@ -2716,6 +3115,15 @@ "node": ">=8" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", @@ -2904,7 +3312,6 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "license": "MIT", - "optional": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2916,8 +3323,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/color-string": { "version": "1.9.1", @@ -2946,6 +3352,21 @@ "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", "license": "ISC" }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -3089,6 +3510,12 @@ "node": ">=6" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "license": "MIT" + }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -3215,12 +3642,36 @@ "node": ">=0.3.1" } }, + "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==", + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", "license": "MIT" }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dset": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.4.tgz", @@ -3327,10 +3778,209 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "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.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "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", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "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" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "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==", + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/esm-env": { "version": "1.2.2", "license": "MIT" }, + "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==", + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/esrap": { "version": "2.1.0", "license": "MIT", @@ -3338,10 +3988,40 @@ "@jridgewell/sourcemap-codec": "^1.4.15" } }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/estree-walker": { "version": "2.0.2", "license": "MIT" }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", @@ -3414,6 +4094,55 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fdir": { "version": "6.5.0", "license": "MIT", @@ -3444,6 +4173,66 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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==", + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "license": "ISC" + }, "node_modules/flattie": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flattie/-/flattie-1.1.1.tgz", @@ -3494,6 +4283,12 @@ "node": ">=14.14" } }, + "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==", + "license": "ISC" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3551,12 +4346,120 @@ "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==", "license": "ISC" }, + "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", + "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/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/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==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "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" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "license": "ISC" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "license": "MIT" + }, "node_modules/h3": { "version": "1.15.4", "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.4.tgz", @@ -3574,6 +4477,36 @@ "uncrypto": "^0.1.3" } }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/hast-util-from-html": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz", @@ -3827,6 +4760,31 @@ ], "license": "BSD-3-Clause" }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/import-meta-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", @@ -3837,6 +4795,41 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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.", + "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", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, "node_modules/install": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", @@ -3877,6 +4870,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -3886,6 +4888,18 @@ "node": ">=8" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-inside-container": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", @@ -3904,6 +4918,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -4010,6 +5042,24 @@ "node": ">=6" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "license": "MIT" + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -4095,6 +5145,15 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -4110,10 +5169,137 @@ "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", "license": "MIT" }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/locate-character": { "version": "3.0.0", "license": "MIT" }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "license": "MIT" + }, + "node_modules/loglevel": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/loglevel-colored-level-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/loglevel-colored-level-prefix/-/loglevel-colored-level-prefix-1.0.0.tgz", + "integrity": "sha512-u45Wcxxc+SdAlh4yeF/uKlC1SPUPCy0gullSNKXod5I4bmifzk+Q4lSLExNEVn19tGaJipbZ4V4jbFn79/6mVA==", + "license": "MIT", + "dependencies": { + "chalk": "^1.1.3", + "loglevel": "^1.4.1" + } + }, + "node_modules/loglevel-colored-level-prefix/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loglevel-colored-level-prefix/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loglevel-colored-level-prefix/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loglevel-colored-level-prefix/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==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/loglevel-colored-level-prefix/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loglevel-colored-level-prefix/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/longest-streak": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", @@ -4408,6 +5594,15 @@ "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", "license": "CC0-1.0" }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/micromark": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", @@ -4971,6 +6166,46 @@ ], "license": "MIT" }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -5021,6 +6256,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "license": "MIT" + }, "node_modules/neotraverse": { "version": "0.6.18", "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", @@ -7609,51 +8850,119 @@ "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", "license": "MIT" }, + "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==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/oniguruma-parser": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz", "integrity": "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==", "license": "MIT" }, - "node_modules/oniguruma-to-es": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.3.tgz", - "integrity": "sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==", + "node_modules/oniguruma-to-es": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.3.tgz", + "integrity": "sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==", + "license": "MIT", + "dependencies": { + "oniguruma-parser": "^0.12.1", + "regex": "^6.0.1", + "regex-recursion": "^6.0.2" + } + }, + "node_modules/open": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "wsl-utils": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz", + "integrity": "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==", + "license": "MIT", + "dependencies": { + "yocto-queue": "^1.1.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "license": "MIT", "dependencies": { - "oniguruma-parser": "^0.12.1", - "regex": "^6.0.1", - "regex-recursion": "^6.0.2" + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/open": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", - "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "node_modules/p-locate/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "license": "MIT", "dependencies": { - "default-browser": "^5.2.1", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "wsl-utils": "^0.1.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=18" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-limit": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz", - "integrity": "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==", + "node_modules/p-locate/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "license": "MIT", - "dependencies": { - "yocto-queue": "^1.1.1" - }, "engines": { - "node": ">=18" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7699,6 +9008,18 @@ "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", "license": "MIT" }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parse-latin": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/parse-latin/-/parse-latin-7.0.0.tgz", @@ -7763,6 +9084,24 @@ "tslib": "^2.0.3" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "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==", + "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", @@ -7772,6 +9111,15 @@ "node": ">=8" } }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -7881,6 +9229,94 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-eslint": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-16.4.2.tgz", + "integrity": "sha512-vtJAQEkaN8fW5QKl08t7A5KCjlZuDUNeIlr9hgolMS5s3+uzbfRHDwaRnzrdqnY2YpHDmeDS/8zY0MKQHXJtaA==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/parser": "^6.21.0", + "common-tags": "^1.8.2", + "dlv": "^1.1.3", + "eslint": "^8.57.1", + "indent-string": "^4.0.0", + "lodash.merge": "^4.6.2", + "loglevel-colored-level-prefix": "^1.0.0", + "prettier": "^3.5.3", + "pretty-format": "^29.7.0", + "require-relative": "^0.8.7", + "tslib": "^2.8.1", + "vue-eslint-parser": "^9.4.3" + }, + "engines": { + "node": ">=16.10.0" + }, + "funding": { + "url": "https://opencollective.com/prettier-eslint" + }, + "peerDependencies": { + "prettier-plugin-svelte": "^3.0.0", + "svelte-eslint-parser": "*" + }, + "peerDependenciesMeta": { + "prettier-plugin-svelte": { + "optional": true + }, + "svelte-eslint-parser": { + "optional": true + } + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/pretty-ms": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.2.0.tgz", @@ -7946,6 +9382,35 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/radix3": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz", @@ -7997,6 +9462,12 @@ "react": "^19.1.1" } }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, "node_modules/react-refresh": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", @@ -8207,6 +9678,21 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==", + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/restructure": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/restructure/-/restructure-3.0.2.tgz", @@ -8274,12 +9760,38 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rfdc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "license": "MIT" }, + "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", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rollup": { "version": "4.47.1", "license": "MIT", @@ -8329,6 +9841,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -8524,6 +10059,15 @@ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "license": "MIT" }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/smol-toml": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.4.2.tgz", @@ -8655,6 +10199,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strip-literal": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", @@ -8687,6 +10243,18 @@ "node": ">=16" } }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/svelte": { "version": "5.38.2", "license": "MIT", @@ -8724,6 +10292,12 @@ "typescript": "^4.9.4 || ^5.0.0" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "license": "MIT" + }, "node_modules/tiny-inflate": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", @@ -8787,6 +10361,18 @@ "node": ">=14.0.0" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/totalist": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", @@ -8822,6 +10408,18 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/tsconfck": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.6.tgz", @@ -8848,6 +10446,18 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-fest": { "version": "4.41.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", @@ -9218,6 +10828,15 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/uuid": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", @@ -9563,6 +11182,42 @@ } } }, + "node_modules/vue-eslint-parser": { + "version": "9.4.3", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz", + "integrity": "sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "eslint-scope": "^7.1.1", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", + "esquery": "^1.4.0", + "lodash": "^4.17.21", + "semver": "^7.3.6" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, + "node_modules/vue-eslint-parser/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/web-namespaces": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", @@ -9645,6 +11300,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", @@ -9662,6 +11326,12 @@ "url": "https://github.com/chalk/wrap-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==", + "license": "ISC" + }, "node_modules/wsl-utils": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", diff --git a/package.json b/package.json index 6354d59..d07597b 100644 --- a/package.json +++ b/package.json @@ -29,12 +29,14 @@ "astro": "5.13.2", "install": "^0.13.0", "npm": "^11.5.2", + "prettier-eslint": "^16.4.2", "react": "19.1.1", "react-dom": "19.1.1", "svelte": "5.38.2", "vue": "3.5.19" }, "devDependencies": { + "@ldo/traverser-shexj": "^1.0.0-alpha.28", "@playwright/test": "^1.55.0", "@types/node": "24.3.0", "@types/react": "19.1.10", diff --git a/src/ng-mock/js-land/connector/createSignalObjectForShape.ts b/src/ng-mock/js-land/connector/createSignalObjectForShape.ts index 5b64560..1faa93f 100644 --- a/src/ng-mock/js-land/connector/createSignalObjectForShape.ts +++ b/src/ng-mock/js-land/connector/createSignalObjectForShape.ts @@ -1,27 +1,38 @@ -import updateShape from "src/ng-mock/wasm-land/updateShape"; import type { Connection, Diff, Scope, Shape } from "../types"; -import requestShape from "src/ng-mock/wasm-land/requestShape"; import { applyDiff } from "./applyDiff"; +import requestShape from "src/ng-mock/wasm-land/shapeHandler"; import { deepSignal, watch, batch } from "alien-deepsignals"; import type { DeepPatch, DeepSignalObject } from "alien-deepsignals"; import type { CompactShapeType } from "node_modules/@ldo/ldo/dist/types/ShapeType"; import type { LdoCompactBase } from "@ldo/ldo"; interface PoolEntry { + connectionId: string; key: string; - shape: CompactShapeType; + shapeType: CompactShapeType; scopeKey: string; signalObject: DeepSignalObject; refCount: number; - stopListening: (() => void) | null; - registerCleanup?: (fn: () => void) => void; - connectionId?: string; - ready: Promise; // resolves to connectionId - resolveReady: (id: string) => void; suspendDeepWatcher: boolean; + ready: boolean; + // Promise that resolves once initial data has been applied. + readyPromise: Promise; + resolveReady: () => void; + release: () => void; } -const pool = new Map>(); +interface WasmMessage { + type: + | "Request" + | "InitialResponse" + | "FrontendUpdate" + | "BackendUpdate" + | "Stop"; + connectionId: string; + diff?: Diff; + schema?: CompactShapeType["schema"]; + initialData?: LdoCompactBase; +} function canonicalScope(scope: Scope | undefined): string { if (scope == null) return ""; @@ -35,88 +46,174 @@ export function deepPatchesToDiff(patches: DeepPatch[]): Diff { }) as Diff; } +const recurseArrayToSet = (obj: any): any => { + if (Array.isArray(obj)) { + return new Set(obj.map(recurseArrayToSet)); + } else if (obj && typeof obj === "object") { + for (const key of Object.keys(obj)) { + obj[key] = recurseArrayToSet(obj[key]); + } + return obj; + } else { + return obj; + } +}; + +const setUpConnection = (entry: PoolEntry, wasmMessage: WasmMessage) => { + const { connectionId, initialData } = wasmMessage; + + const { signalObject } = entry; + + // Assign initial data to empty signal object without triggering watcher at first. + entry.suspendDeepWatcher = true; + batch(() => { + // Convert arrays to sets and apply to signalObject (we only have sets but can only transport arrays). + Object.assign(signalObject, recurseArrayToSet(initialData)!); + }); + + // Add listener to deep signal object to report changes back to wasm land. + const watcher = watch(signalObject, ({ patches }) => { + if (entry.suspendDeepWatcher || !patches.length) return; + + const diff = deepPatchesToDiff(patches); + + // Send FrontendUpdate message to wasm land. + const msg: WasmMessage = { + type: "FrontendUpdate", + connectionId, + diff: JSON.parse(JSON.stringify(diff)), + }; + communicationChannel.postMessage(msg); + }); + + queueMicrotask(() => { + entry.suspendDeepWatcher = false; + // Resolve readiness after initial data is committed and watcher armed. + entry.resolveReady?.(); + }); + + // Schedule cleanup of the connection when the signal object is GC'd. + cleanupSignalRegistry?.register( + entry.signalObject, + entry.connectionId, + entry.signalObject, + ); + + entry.ready = true; +}; + +// Handler for messages from wasm land. +const onWasmMessage = (event: MessageEvent) => { + console.debug("[JsLand] onWasmMessage", event); + const { diff, connectionId, type } = event.data; + + // Only process messages for objects we track. + const entry = connectionIdToEntry.get(connectionId); + if (!entry) return; + + // And only process messages that are addressed to js-land. + if (type === "FrontendUpdate") return; + if (type === "Request") return; + if (type === "Stop") return; + + if (type === "InitialResponse") { + setUpConnection(entry, event.data); + } else if (type === "BackendUpdate" && diff) { + applyDiff(entry.signalObject, diff); + } else { + console.warn("[JsLand] Unknown message type", event); + } +}; + +const keyToEntry = new Map>(); +const connectionIdToEntry = new Map>(); + +const communicationChannel = new BroadcastChannel("shape-manager"); +communicationChannel.addEventListener("message", onWasmMessage); + +// FinalizationRegistry to clean up connections when signal objects are GC'd. +const cleanupSignalRegistry = + typeof FinalizationRegistry === "function" + ? new FinalizationRegistry((connectionId) => { + // Best-effort fallback; look up by id and clean + const entry = connectionIdToEntry.get(connectionId); + if (!entry) return; + entry.release(); + }) + : null; + export function createSignalObjectForShape( - shape: CompactShapeType, + shapeType: CompactShapeType, scope?: Scope, - poolSignal = true ) { const scopeKey = canonicalScope(scope); - const key = `${shape}::${scopeKey}`; - if (poolSignal) { - const existing = pool.get(key); - if (existing) { - existing.refCount++; - return buildReturn(existing); - } + // Unique identifier for a given shape type and scope. + const key = `${shapeType.shape}::${scopeKey}`; + + // If we already have an object for this shape+scope, return it + // and just increase the reference count. + const existing = keyToEntry.get(key); + if (existing) { + existing.refCount++; + return buildReturn(existing); } + // Otherwise, create a new signal object and an entry for it. const signalObject = deepSignal({}); - let resolveReady!: (id: string) => void; - const ready = new Promise((res) => (resolveReady = res)); + const entry: PoolEntry = { key, - shape, + // The id for future communication between wasm and js land. + connectionId: `${key}_${new Date().toISOString()}`, + shapeType, scopeKey, signalObject, refCount: 1, - stopListening: null, - registerCleanup: undefined, - connectionId: undefined, - ready, - resolveReady, suspendDeepWatcher: false, - }; - if (poolSignal) pool.set(key, entry); - - const onUpdateFromDb = (diff: Diff, connectionId: Connection["id"]) => { - console.debug("[shape][diff] applying", connectionId, diff); - entry.suspendDeepWatcher = true; - batch(() => applyDiff(signalObject, diff)); - queueMicrotask(() => { - entry.suspendDeepWatcher = false; - }); + ready: false, + // readyPromise will be set just below + readyPromise: Promise.resolve(), + resolveReady: () => {}, + // Function to manually release the connection. + // Only releases if no more references exist. + release: () => { + if (entry.refCount > 0) entry.refCount--; + if (entry.refCount === 0) { + communicationChannel.postMessage({ + type: "Stop", + connectionId: entry.connectionId, + } as WasmMessage); + + keyToEntry.delete(entry.key); + connectionIdToEntry.delete(entry.connectionId); + + // In your manual release + cleanupSignalRegistry?.unregister(entry.signalObject); + } + }, }; - requestShape(shape, scope, onUpdateFromDb).then( - ({ connectionId, shapeObject }) => { - entry.connectionId = connectionId; - entry.suspendDeepWatcher = true; - batch(() => { - for (const k of Object.keys(shapeObject)) { - (signalObject as any)[k] = (shapeObject as any)[k]; - } - }); - const watcher = watch(signalObject, ({ patches }) => { - if (entry.suspendDeepWatcher || !patches.length) return; - const diff = deepPatchesToDiff(patches); - updateShape(connectionId as any, diff as any); - }); - entry.stopListening = watcher.stopListening; - entry.registerCleanup = watcher.registerCleanup; - queueMicrotask(() => { - entry.suspendDeepWatcher = false; - }); - entry.resolveReady(connectionId); - } - ); + // Initialize per-entry readiness promise that resolves in setUpConnection + entry.readyPromise = new Promise((resolve) => { + entry.resolveReady = resolve; + }); + + keyToEntry.set(key, entry); + connectionIdToEntry.set(entry.connectionId, entry); + + communicationChannel.postMessage({ + type: "Request", + connectionId: entry.connectionId, + schema: shapeType.schema, + } as WasmMessage); function buildReturn(entry: PoolEntry) { - const release = () => { - if (entry.refCount > 0) entry.refCount--; - if (entry.refCount === 0) { - entry.stopListening?.(); - if (poolSignal) pool.delete(entry.key); - } - }; return { signalObject: entry.signalObject, - stop: release, - ready: entry.ready, // Promise - get connectionId() { - return entry.connectionId; - }, - registerCleanup: entry.registerCleanup, + stop: entry.release, + connectionId: entry.connectionId, + readyPromise: entry.readyPromise, }; } diff --git a/src/ng-mock/js-land/frontendAdapters/react/useShape.ts b/src/ng-mock/js-land/frontendAdapters/react/useShape.ts index 4a11152..bccdd61 100644 --- a/src/ng-mock/js-land/frontendAdapters/react/useShape.ts +++ b/src/ng-mock/js-land/frontendAdapters/react/useShape.ts @@ -7,7 +7,7 @@ import type { Scope, Shape } from "src/ng-mock/js-land/types"; const useShape = ( shape: CompactShapeType, - scope: Scope = "" + scope: Scope = "", ) => { const shapeSignalRef = useRef< ReturnType> @@ -15,15 +15,19 @@ const useShape = ( const [, setTick] = useState(0); useEffect(() => { - const deepSignalObj = shapeSignalRef.current.signalObject; - const { stopListening } = watch(deepSignalObj, () => { + const handle = shapeSignalRef.current; + const deepSignalObj = handle.signalObject; + const stopListening = watch(deepSignalObj, () => { // trigger a React re-render when the deep signal updates setTick((t) => t + 1); }); + // Ensure first render after initial data is applied + handle.readyPromise?.then(() => setTick((t) => t + 1)); + return () => { - shapeSignalRef.current.stop(); stopListening(); + handle.stop(); }; }, []); diff --git a/src/ng-mock/wasm-land/requestShape.ts b/src/ng-mock/wasm-land/requestShape.ts deleted file mode 100644 index 6cd04bd..0000000 --- a/src/ng-mock/wasm-land/requestShape.ts +++ /dev/null @@ -1,99 +0,0 @@ -import * as shapeManager from "./shapeManager"; -import type { WasmConnection, Diff, Scope } from "./types"; -import type { CompactShapeType } from "@ldo/ldo"; -import type { LdoCompactBase } from "@ldo/ldo"; -import type { Person } from "src/shapes/ldo/personShape.typings"; -import type { Cat } from "src/shapes/ldo/catShape.typings"; -import type { TestObject } from "src/shapes/ldo/testShape.typings"; - -export const mockTestObject = { - id: "ex:mock-id-1", - type: "TestObject", - stringValue: "string", - numValue: 42, - boolValue: true, - arrayValue: new Set([1, 2, 3]), - objectValue: { - nestedString: "nested", - nestedNum: 7, - nestedArray: new Set([10, 12]), - }, - anotherObject: { - "id:1": { - id: "id:1", - prop1: "prop1 value", - prop2: 100, - }, - "id:2": { - id: "id:1", - prop1: "prop2 value", - prop2: 200, - }, - }, -} satisfies TestObject; - -const mockShapeObject1 = { - id: "ex:person-1", - type: "Person", - name: "Bob", - address: { - street: "First street", - houseNumber: "15", - }, - hasChildren: true, - numberOfHouses: 0, -} satisfies Person; -const mockShapeObject2 = { - id: "ex:cat-1", - type: "Cat", - name: "Niko's cat", - age: 12, - numberOfHomes: 3, - address: { - street: "Niko's street", - houseNumber: "15", - floor: 0, - }, -} satisfies Cat; - -let connectionIdCounter = 1; - -export default async function requestShape( - shape: CompactShapeType, - scope: Scope | undefined, - callback: (diff: Diff, connectionId: WasmConnection["id"]) => void -): Promise<{ - connectionId: string; - shapeObject: T; -}> { - const connectionId = `connection-${connectionIdCounter++}-${ - shape.schema.shapes?.[0].id - }`; - - let shapeObject: T; - if (shape.schema.shapes?.[0].id.includes("TestObject")) { - shapeObject = mockTestObject as T; - } else if (shape.schema.shapes?.[0].id.includes("Person")) { - shapeObject = mockShapeObject1 as T; - } else if (shape.schema.shapes?.[0].id.includes("Cat")) { - shapeObject = mockShapeObject2 as T; - } else { - console.warn( - "BACKEND: requestShape for unknown shape, returning empty object.", - shape.schema.shapes?.[0].id - ); - shapeObject = {}; - } - - shapeManager.connections.set(connectionId, { - id: connectionId, - shape, - state: shapeObject, - callback, - }); - - return { - connectionId, - shapeObject, - }; -} diff --git a/src/ng-mock/wasm-land/shapeHandler.ts b/src/ng-mock/wasm-land/shapeHandler.ts new file mode 100644 index 0000000..589804b --- /dev/null +++ b/src/ng-mock/wasm-land/shapeHandler.ts @@ -0,0 +1,255 @@ +import * as shapeManager from "./shapeManager"; +import type { WasmConnection, Diff, Scope } from "./types"; +import type { CompactShapeType, LdoCompactBase } from "@ldo/ldo"; +import type { Person } from "src/shapes/ldo/personShape.typings"; +import type { Cat } from "src/shapes/ldo/catShape.typings"; +import type { TestObject } from "src/shapes/ldo/testShape.typings"; +import updateShape from "./updateShape"; + +// Messages exchanged over the BroadcastChannel("shape-manager") +interface WasmMessage { + type: + | "Request" + | "InitialResponse" + | "FrontendUpdate" + | "BackendUpdate" + | "Stop"; + connectionId: string; + diff?: Diff; + schema?: CompactShapeType["schema"]; + initialData?: LdoCompactBase; +} + +export const mockTestObject = { + id: "ex:mock-id-1", + type: "TestObject", + stringValue: "string", + numValue: 42, + boolValue: true, + arrayValue: [1, 2, 3], + objectValue: { + id: "urn:obj-1", + nestedString: "nested", + nestedNum: 7, + nestedArray: [10, 12], + }, + anotherObject: { + "id:1": { + id: "id:1", + prop1: "prop1 value", + prop2: 100, + }, + "id:2": { + id: "id:1", + prop1: "prop2 value", + prop2: 200, + }, + }, +} satisfies TestObject; + +const mockShapeObject1 = { + id: "ex:person-1", + type: "Person", + name: "Bob", + address: { + id: "urn:person-home-1", + street: "First street", + houseNumber: "15", + }, + hasChildren: true, + numberOfHouses: 0, +} satisfies Person; + +const mockShapeObject2 = { + id: "ex:cat-1", + type: "Cat", + name: "Niko's cat", + age: 12, + numberOfHomes: 3, + address: { + id: "Nikos-cat-home", + street: "Niko's street", + houseNumber: "15", + floor: 0, + }, +} satisfies Cat; + +// Single BroadcastChannel for wasm-land side +const communicationChannel = new BroadcastChannel("shape-manager"); + +function getInitialObjectByShapeId( + shapeId?: string, +): T { + if (shapeId?.includes("TestObject")) return mockTestObject as unknown as T; + if (shapeId?.includes("Person")) return mockShapeObject1 as unknown as T; + if (shapeId?.includes("Cat")) return mockShapeObject2 as unknown as T; + console.warn( + "BACKEND: requestShape for unknown shape, returning empty object.", + shapeId, + ); + return {} as T; +} + +// Register handler for messages coming from js-land +communicationChannel.addEventListener( + "message", + (event: MessageEvent) => { + console.log("BACKEND: Received message", event.data); + const { type, connectionId, schema } = event.data; + + if (type === "Request") { + const shapeId = schema?.shapes?.[0]?.id; + const initialData = getInitialObjectByShapeId(shapeId); + + // Store connection. We store the shapeId string to allow equality across connections. + shapeManager.connections.set(connectionId, { + id: connectionId, + // Cast to any to satisfy WasmConnection type, comparison in updateShape uses == + shape: (shapeId ?? "__unknown__") as any, + state: initialData, + callback: (diff: Diff, conId: WasmConnection["id"]) => { + // Notify js-land about backend updates + const msg: WasmMessage = { + type: "BackendUpdate", + connectionId: conId, + diff, + }; + communicationChannel.postMessage(msg); + }, + }); + + const msg: WasmMessage = { + type: "InitialResponse", + connectionId, + initialData, + }; + communicationChannel.postMessage(msg); + return; + } + + if (type === "Stop") { + shapeManager.connections.delete(connectionId); + return; + } + + if (type === "FrontendUpdate" && event.data.diff) { + updateShape(connectionId, event.data.diff); + return; + } + + console.warn("BACKEND: Unknown message type or missing diff", event.data); + }, +); + +// Keep the original function for compatibility with any direct callers. +let connectionIdCounter = 1; +export default async function requestShape( + shape: CompactShapeType, + _scope: Scope | undefined, + callback: (diff: Diff, connectionId: WasmConnection["id"]) => void, +): Promise<{ connectionId: string; shapeObject: T }> { + const connectionId = `connection-${connectionIdCounter++}-${shape.schema.shapes?.[0]?.id}`; + const shapeId = shape.schema.shapes?.[0]?.id; + const shapeObject = getInitialObjectByShapeId(shapeId); + + shapeManager.connections.set(connectionId, { + id: connectionId, + shape: (shapeId ?? "__unknown__") as any, + state: shapeObject, + callback, + }); + + return { connectionId, shapeObject }; +} + +const getObjectsForShapeType = ( + shape: CompactShapeType, + scope: string = "", +): T[] => { + // Procedure + // - Get all triples for the scope + // - Parse the schema (all shapes and anonymous shapes required for the shape type). + + // - Group triples by subject + // - For the shapeType in the schema, match all required predicates + // - For predicates pointing to nested objects + // - recurse + + // Repeat procedure for all matched subjects with optional predicates + + const quads: [ + string, + string, + number | string | boolean, + string | undefined, + ][] = []; + + // The URI of the shape to find matches for. + const schemaId = shape.shape; + // ShexJ shape object + const rootShapeDecl = shape.schema.shapes?.find( + (shape) => shape.id === schemaId, + ); + if (!rootShapeDecl) + throw new Error(`Could not find shape id ${schemaId} in shape schema`); + + if (rootShapeDecl.shapeExpr.type !== "Shape") + throw new Error("Expected shapeExpr.type to be Shape"); + + const shapeExpression = rootShapeDecl.shapeExpr.expression; + // If shape is a reference... + if (typeof shapeExpression === "string") { + // TODO: Recurse + return []; + } + + const requiredPredicates = []; + const optionalPredicates = []; + + if (shapeExpression?.type === "EachOf") { + const predicates = shapeExpression.expressions.map((constraint) => { + if (typeof constraint === "string") { + // Cannot parse constraint refs + return; + } else if (constraint.type === "TripleConstraint") { + requiredPredicates.push({ + predicate: constraint.predicate, + }); + } else { + // EachOf or OneOf possible? + } + }); + } else if (shapeExpression?.type === "OneOf") { + // Does not occur AFAIK. + } else if (shapeExpression?.type === "TripleConstraint") { + // Does not occur AFAIK. + } + + return []; +}; + +interface ShapeConstraintTracked { + subject: string; + childOf?: ShapeConstraintTracked; + predicates: [ + { + displayName: string; + uri: string; + type: "number" | "string" | "boolean" | "nested" | "literal"; + literalValue?: number | string | boolean | number[] | string[]; + nested?: ShapeConstraintTracked; + min: number; + max: number; + currentCount: number; + }, + ]; +} + +// Group by subject, check predicates of root level +// For all subjects of root level, +// - recurse + +// Construct matching subjects +// for each optional and non-optional predicate +// - fill objects and record +// - build tracked object (keeping reference counts to check if the object is still valid) diff --git a/src/ng-mock/wasm-land/sparql/README.md b/src/ng-mock/wasm-land/sparql/README.md new file mode 100644 index 0000000..ef7439e --- /dev/null +++ b/src/ng-mock/wasm-land/sparql/README.md @@ -0,0 +1,14 @@ +# SPARQL builders + +Utilities to build SPARQL SELECT and CONSTRUCT queries from a ShapeConstraint structure. + +Exports: + +- buildSelectQuery(shape, options) +- buildConstructQuery(shape, options) + +Options: + +- prefixes: Record +- graph: named graph IRI or CURIE +- includeOptionalForMinZero: wrap min=0 predicates in OPTIONAL (default true) diff --git a/src/ng-mock/wasm-land/sparql/buildConstruct.ts b/src/ng-mock/wasm-land/sparql/buildConstruct.ts new file mode 100644 index 0000000..31b4ed0 --- /dev/null +++ b/src/ng-mock/wasm-land/sparql/buildConstruct.ts @@ -0,0 +1,149 @@ +import type { + BuildContext, + PredicateConstraint, + ShapeConstraint, + SparqlBuildOptions, +} from "./common"; +import { + predicateToSparql, + prefixesToText, + toIriOrCurie, + uniqueVar, + valuesBlock, + varToken, +} from "./common"; + +/** + * Build a SPARQL CONSTRUCT query from a ShapeConstraint definition. + * The WHERE mirrors the graph template. Optional predicates (min=0) are wrapped in OPTIONAL in WHERE + * but still appear in the CONSTRUCT template so that matched triples are constructed. + */ +export function buildConstructQuery( + shape: ShapeConstraint, + options?: SparqlBuildOptions, +): string { + const ctx: BuildContext = { usedVars: new Set() }; + const prefixes = prefixesToText(options?.prefixes); + const subject = toIriOrCurie(shape.subject); + + const templateLines: string[] = []; + const whereLines: string[] = []; + const postFilters: string[] = []; + const valuesBlocks: string[] = []; + + const rootVar = + subject.startsWith("?") || subject.startsWith("$") + ? subject + : uniqueVar(ctx, "s"); + if (!subject.startsWith("?") && !subject.startsWith("$")) { + valuesBlocks.push(valuesBlock(rootVar, [subject] as any)); + } + + const predicates = Array.isArray(shape.predicates) + ? shape.predicates + : [...shape.predicates]; + for (const pred of predicates) { + addConstructPattern( + ctx, + pred, + rootVar, + templateLines, + whereLines, + postFilters, + valuesBlocks, + options, + ); + } + + const graphWrap = (body: string) => + options?.graph + ? `GRAPH ${toIriOrCurie(options.graph)} {\n${body}\n}` + : body; + + const where = [ + ...valuesBlocks, + graphWrap(whereLines.join("\n")), + ...postFilters, + ] + .filter(Boolean) + .join("\n"); + + const template = templateLines.join("\n"); + + return [prefixes, `CONSTRUCT {`, template, `} WHERE {`, where, `}`].join( + "\n", + ); +} + +function addConstructPattern( + ctx: BuildContext, + pred: PredicateConstraint, + subjectVar: string, + template: string[], + where: string[], + postFilters: string[], + valuesBlocks: string[], + options?: SparqlBuildOptions, +) { + const p = predicateToSparql(pred.uri); + const objVar = uniqueVar(ctx, pred.displayName || "o"); + const objTerm = + pred.type === "nested" && + pred.nested?.subject && + !pred.nested.subject.match(/^\?|^\$/) + ? toIriOrCurie(pred.nested.subject) + : objVar; + + const triple = `${subjectVar} ${p} ${objTerm} .`; + + const isOptional = + (pred.min ?? 0) === 0 && (options?.includeOptionalForMinZero ?? true); + + if (pred.type === "nested" && pred.nested) { + template.push(triple); + const nestedBody: string[] = [triple]; + const nestedPreds = Array.isArray(pred.nested.predicates) + ? pred.nested.predicates + : [...pred.nested.predicates]; + for (const n of nestedPreds) { + addConstructPattern( + ctx, + n, + objTerm, + template, + nestedBody, + postFilters, + valuesBlocks, + options, + ); + } + const block = nestedBody.join("\n"); + where.push(isOptional ? `OPTIONAL {\n${block}\n}` : block); + return; + } + + // Non-nested + template.push(triple); + const blockLines: string[] = [triple]; + + if (pred.type === "literal" && pred.literalValue !== undefined) { + if (Array.isArray(pred.literalValue)) { + valuesBlocks.push(valuesBlock(objVar, pred.literalValue as any[])); + } else { + const lit = + typeof pred.literalValue === "string" || + typeof pred.literalValue === "number" || + typeof pred.literalValue === "boolean" + ? pred.literalValue + : String(pred.literalValue); + postFilters.push( + `FILTER(${objVar} = ${typeof lit === "string" ? `"${String(lit).replace(/"/g, '\\"')}"` : lit})`, + ); + } + } + + const block = blockLines.join("\n"); + where.push(isOptional ? `OPTIONAL {\n${block}\n}` : block); +} + +export default buildConstructQuery; diff --git a/src/ng-mock/wasm-land/sparql/buildSelect.ts b/src/ng-mock/wasm-land/sparql/buildSelect.ts new file mode 100644 index 0000000..57e6118 --- /dev/null +++ b/src/ng-mock/wasm-land/sparql/buildSelect.ts @@ -0,0 +1,152 @@ +import type { + BuildContext, + PredicateConstraint, + ShapeConstraint, + SparqlBuildOptions, +} from "./common"; +import { + predicateToSparql, + prefixesToText, + toIriOrCurie, + uniqueVar, + valuesBlock, + varToken, +} from "./common"; + +/** + * Build a SPARQL SELECT query from a ShapeConstraint definition. + * The query matches the shape subject and constraints; optional predicates (min=0) are wrapped in OPTIONAL. + */ +export function buildSelectQuery( + shape: ShapeConstraint, + options?: SparqlBuildOptions, +): string { + const ctx: BuildContext = { usedVars: new Set() }; + const prefixes = prefixesToText(options?.prefixes); + const subject = toIriOrCurie(shape.subject); + + const selectVars: string[] = []; + const whereLines: string[] = []; + const postFilters: string[] = []; + const valuesBlocks: string[] = []; + + // ensure a consistent root variable when subject is a variable + const rootVar = + subject.startsWith("?") || subject.startsWith("$") + ? subject + : uniqueVar(ctx, "s"); + if (!subject.startsWith("?") && !subject.startsWith("$")) { + // bind fixed subject via VALUES for portability + valuesBlocks.push(valuesBlock(rootVar, [subject] as any)); + } + + const predicates = Array.isArray(shape.predicates) + ? shape.predicates + : [...shape.predicates]; + + for (const pred of predicates) { + addPredicatePattern( + ctx, + pred, + rootVar, + whereLines, + selectVars, + postFilters, + valuesBlocks, + options, + ); + } + + const graphWrap = (body: string) => + options?.graph + ? `GRAPH ${toIriOrCurie(options.graph)} {\n${body}\n}` + : body; + + const where = [ + ...valuesBlocks, + graphWrap(whereLines.join("\n")), + ...postFilters, + ] + .filter(Boolean) + .join("\n"); + + const select = selectVars.length ? selectVars.join(" ") : "*"; + + return [prefixes, `SELECT ${select} WHERE {`, where, `}`].join("\n"); +} + +function addPredicatePattern( + ctx: BuildContext, + pred: PredicateConstraint, + subjectVar: string, + where: string[], + selectVars: string[], + postFilters: string[], + valuesBlocks: string[], + options?: SparqlBuildOptions, +) { + const p = predicateToSparql(pred.uri); + const objVar = uniqueVar(ctx, pred.displayName || "o"); + const objTerm = + pred.type === "nested" && + pred.nested?.subject && + !pred.nested.subject.match(/^\?|^\$/) + ? toIriOrCurie(pred.nested.subject) + : objVar; + + const triple = `${subjectVar} ${p} ${objTerm} .`; + + const isOptional = + (pred.min ?? 0) === 0 && (options?.includeOptionalForMinZero ?? true); + + if (pred.type === "nested" && pred.nested) { + // For nested, we select the nested object var and then recurse + if (objTerm === objVar) selectVars.push(objVar); + const nestedBody: string[] = [triple]; + const nestedPreds = Array.isArray(pred.nested.predicates) + ? pred.nested.predicates + : [...pred.nested.predicates]; + for (const n of nestedPreds) { + addPredicatePattern( + ctx, + n, + objTerm, + nestedBody, + selectVars, + postFilters, + valuesBlocks, + options, + ); + } + const block = nestedBody.join("\n"); + where.push(isOptional ? `OPTIONAL {\n${block}\n}` : block); + return; + } + + // Non-nested: literals or IRIs + selectVars.push(objVar); + const blockLines: string[] = [triple]; + + if (pred.type === "literal" && pred.literalValue !== undefined) { + if (Array.isArray(pred.literalValue)) { + // VALUES block for IN-like matching + valuesBlocks.push(valuesBlock(objVar, pred.literalValue as any[])); + } else { + // simple equality filter + const lit = + typeof pred.literalValue === "string" || + typeof pred.literalValue === "number" || + typeof pred.literalValue === "boolean" + ? pred.literalValue + : String(pred.literalValue); + postFilters.push( + `FILTER(${objVar} = ${typeof lit === "string" ? `"${String(lit).replace(/"/g, '\\"')}"` : lit})`, + ); + } + } + + const block = blockLines.join("\n"); + where.push(isOptional ? `OPTIONAL {\n${block}\n}` : block); +} + +export default buildSelectQuery; diff --git a/src/ng-mock/wasm-land/sparql/common.ts b/src/ng-mock/wasm-land/sparql/common.ts new file mode 100644 index 0000000..aaed2c6 --- /dev/null +++ b/src/ng-mock/wasm-land/sparql/common.ts @@ -0,0 +1,125 @@ +/** + * Shared helpers and types to build SPARQL queries from ShapeConstraint + */ + +export type LiteralKind = + | "number" + | "string" + | "boolean" + | "nested" + | "literal"; + +export interface PredicateConstraint { + displayName: string; + uri: string; + type: LiteralKind; + literalValue?: number | string | boolean | number[] | string[]; + nested?: ShapeConstraint; + min: number; + max: number; + currentCount: number; +} + +export interface ShapeConstraint { + subject: string; + // In upstream code this is typed as a 1-length tuple; we normalize to an array here + predicates: PredicateConstraint[] | [PredicateConstraint]; +} + +export interface SparqlBuildOptions { + prefixes?: Record; + graph?: string; // IRI of the named graph to query, if any + includeOptionalForMinZero?: boolean; // default true +} + +export const defaultPrefixes: Record = { + xsd: "http://www.w3.org/2001/XMLSchema#", + rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + rdfs: "http://www.w3.org/2000/01/rdf-schema#", +}; + +export function prefixesToText(prefixes?: Record): string { + const all = { ...defaultPrefixes, ...(prefixes ?? {}) }; + return Object.entries(all) + .map(([p, iri]) => `PREFIX ${p}: <${iri}>`) + .join("\n"); +} + +export function toIriOrCurie(term: string): string { + // variable + if (term.startsWith("?") || term.startsWith("$")) return term; + // blank node + if (term.startsWith("_:")) return term; + // full IRI + if (term.includes("://")) return `<${term}>`; + // fallback: assume CURIE or already-angled + if (term.startsWith("<") && term.endsWith(">")) return term; + return term; // CURIE, caller must ensure prefix provided +} + +export function predicateToSparql(uri: string): string { + // Allow CURIEs or IRIs + return toIriOrCurie(uri); +} + +export function safeVarName(name: string): string { + const base = name + .replace(/[^a-zA-Z0-9_]/g, "_") + .replace(/^([0-9])/, "_$1") + .slice(0, 60); + return base || "v"; +} + +export function varToken(name: string): string { + const n = name.startsWith("?") || name.startsWith("$") ? name.slice(1) : name; + return `?${safeVarName(n)}`; +} + +export function formatLiteral(value: string | number | boolean): string { + if (typeof value === "number") return String(value); + if (typeof value === "boolean") return value ? "true" : "false"; + // default string literal + const escaped = value.replace(/"/g, '\\"'); + return `"${escaped}"`; +} + +export function formatTermForValues(value: string | number | boolean): string { + if (typeof value === "number" || typeof value === "boolean") + return formatLiteral(value); + // strings: detect IRI or CURIE and keep raw; otherwise quote + const v = value.trim(); + const looksLikeIri = v.startsWith("<") && v.endsWith(">"); + const looksLikeHttp = v.includes("://"); + const looksLikeCurie = + /^[A-Za-z_][A-Za-z0-9_-]*:.+$/u.test(v) && !looksLikeHttp; + if (looksLikeIri || looksLikeHttp || looksLikeCurie) { + return looksLikeHttp ? `<${v}>` : v; + } + return formatLiteral(v); +} + +export function valuesBlock( + varName: string, + values: Array, +): string { + const rendered = values.map(formatTermForValues).join(" "); + return `VALUES ${varName} { ${rendered} }`; +} + +export interface BuildContext { + // Tracks used variable names to avoid collisions + usedVars: Set; +} + +export function uniqueVar(ctx: BuildContext, base: string): string { + let candidate = varToken(base); + if (!ctx.usedVars.has(candidate)) { + ctx.usedVars.add(candidate); + return candidate; + } + let i = 2; + while (ctx.usedVars.has(`${candidate}_${i}`)) i++; + const unique = `${candidate}_${i}`; + ctx.usedVars.add(unique); + return unique; +} diff --git a/src/ng-mock/wasm-land/updateShape.ts b/src/ng-mock/wasm-land/updateShape.ts index c713667..4ea1a6f 100644 --- a/src/ng-mock/wasm-land/updateShape.ts +++ b/src/ng-mock/wasm-land/updateShape.ts @@ -3,7 +3,7 @@ import type { WasmConnection, Diff } from "./types"; export default async function updateShape( connectionId: WasmConnection["id"], - diff: Diff + diff: Diff, ) { const connection = shapeManager.connections.get(connectionId); if (!connection) throw new Error("No Connection found."); @@ -14,9 +14,9 @@ export default async function updateShape( connection.state = newState; shapeManager.connections.forEach((con) => { - if (con.shape == connection.shape) { - con.state = newState; - con.callback(diff, con.id); - } + // if (con.shape == connection.shape) { + // con.state = newState; + // con.callback(diff, con.id); + // } }); } diff --git a/src/shapes/ldo/catShape.schema.compact.ts b/src/shapes/ldo/catShape.schema.compact.ts new file mode 100644 index 0000000..b646098 --- /dev/null +++ b/src/shapes/ldo/catShape.schema.compact.ts @@ -0,0 +1,77 @@ +import type { CompactSchema } from "@ldo/ldo"; + +/** + * ============================================================================= + * catShapeSchema: Compact Schema for catShape + * ============================================================================= + */ +export const catShapeSchema: CompactSchema = { + "http://example.org/Cat": { + schemaUri: "http://example.org/Cat", + predicates: [ + { + type: "literal", + literalValue: ["Cat"], + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + readablePredicate: "type", + }, + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/name", + readablePredicate: "name", + }, + { + type: "number", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/age", + readablePredicate: "age", + }, + { + type: "number", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/numberOfHomes", + readablePredicate: "numberOfHomes", + }, + { + type: "nested", + nestedSchema: "http://example.org/Cat::http://example.org/address", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/address", + readablePredicate: "address", + }, + ], + }, + "http://example.org/Cat::http://example.org/address": { + schemaUri: "http://example.org/Cat::http://example.org/address", + predicates: [ + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/street", + readablePredicate: "street", + }, + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/houseNumber", + readablePredicate: "houseNumber", + }, + { + type: "number", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/floor", + readablePredicate: "floor", + }, + ], + }, +}; diff --git a/src/shapes/ldo/catShape.schema.ts b/src/shapes/ldo/catShape.schema.ts deleted file mode 100644 index 35eab87..0000000 --- a/src/shapes/ldo/catShape.schema.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Schema } from "shexj"; - -/** - * ============================================================================= - * catShapeSchema: ShexJ Schema for catShape - * ============================================================================= - */ -export const catShapeSchema: Schema = { - type: "Schema", - shapes: [ - { - id: "http://example.org/Cat", - type: "ShapeDecl", - shapeExpr: { - type: "Shape", - expression: { - type: "EachOf", - expressions: [ - { - type: "TripleConstraint", - predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", - valueExpr: { - type: "NodeConstraint", - values: [ - { - value: "Cat", - }, - ], - }, - readablePredicate: "type", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/name", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "name", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/age", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - readablePredicate: "age", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/numberOfHomes", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - readablePredicate: "numberOfHomes", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/address", - valueExpr: { - type: "Shape", - expression: { - type: "EachOf", - expressions: [ - { - type: "TripleConstraint", - predicate: "http://example.org/street", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "street", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/houseNumber", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "houseNumber", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/floor", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - readablePredicate: "floor", - }, - ], - }, - }, - readablePredicate: "address", - }, - ], - }, - }, - }, - ], -}; diff --git a/src/shapes/ldo/catShape.shapeTypes.ts b/src/shapes/ldo/catShape.shapeTypes.compact.ts similarity index 100% rename from src/shapes/ldo/catShape.shapeTypes.ts rename to src/shapes/ldo/catShape.shapeTypes.compact.ts diff --git a/src/shapes/ldo/personShape.schema.compact.ts b/src/shapes/ldo/personShape.schema.compact.ts new file mode 100644 index 0000000..d892a9c --- /dev/null +++ b/src/shapes/ldo/personShape.schema.compact.ts @@ -0,0 +1,70 @@ +import type { CompactSchema } from "@ldo/ldo"; + +/** + * ============================================================================= + * personShapeSchema: Compact Schema for personShape + * ============================================================================= + */ +export const personShapeSchema: CompactSchema = { + "http://example.org/Person": { + schemaUri: "http://example.org/Person", + predicates: [ + { + type: "literal", + literalValue: ["Person"], + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + readablePredicate: "type", + }, + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/name", + readablePredicate: "name", + }, + { + type: "nested", + nestedSchema: "http://example.org/Person::http://example.org/address", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/address", + readablePredicate: "address", + }, + { + type: "boolean", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/hasChildren", + readablePredicate: "hasChildren", + }, + { + type: "number", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/numberOfHouses", + readablePredicate: "numberOfHouses", + }, + ], + }, + "http://example.org/Person::http://example.org/address": { + schemaUri: "http://example.org/Person::http://example.org/address", + predicates: [ + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/street", + readablePredicate: "street", + }, + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/houseNumber", + readablePredicate: "houseNumber", + }, + ], + }, +}; diff --git a/src/shapes/ldo/personShape.schema.ts b/src/shapes/ldo/personShape.schema.ts deleted file mode 100644 index f0ea272..0000000 --- a/src/shapes/ldo/personShape.schema.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { Schema } from "shexj"; - -/** - * ============================================================================= - * personShapeSchema: ShexJ Schema for personShape - * ============================================================================= - */ -export const personShapeSchema: Schema = { - type: "Schema", - shapes: [ - { - id: "http://example.org/Person", - type: "ShapeDecl", - shapeExpr: { - type: "Shape", - expression: { - type: "EachOf", - expressions: [ - { - type: "TripleConstraint", - predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", - valueExpr: { - type: "NodeConstraint", - values: [ - { - value: "Person", - }, - ], - }, - readablePredicate: "type", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/name", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "name", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/address", - valueExpr: { - type: "Shape", - expression: { - type: "EachOf", - expressions: [ - { - type: "TripleConstraint", - predicate: "http://example.org/street", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "street", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/houseNumber", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "houseNumber", - }, - ], - }, - }, - readablePredicate: "address", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/hasChildren", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#boolean", - }, - readablePredicate: "hasChildren", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/numberOfHouses", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - readablePredicate: "numberOfHouses", - }, - ], - }, - }, - }, - ], -}; diff --git a/src/shapes/ldo/personShape.shapeTypes.ts b/src/shapes/ldo/personShape.shapeTypes.compact.ts similarity index 100% rename from src/shapes/ldo/personShape.shapeTypes.ts rename to src/shapes/ldo/personShape.shapeTypes.compact.ts diff --git a/src/shapes/ldo/testShape.schema.compact.ts b/src/shapes/ldo/testShape.schema.compact.ts new file mode 100644 index 0000000..afeaad7 --- /dev/null +++ b/src/shapes/ldo/testShape.schema.compact.ts @@ -0,0 +1,114 @@ +import type { CompactSchema } from "@ldo/ldo"; + +/** + * ============================================================================= + * testShapeSchema: Compact Schema for testShape + * ============================================================================= + */ +export const testShapeSchema: CompactSchema = { + "http://example.org/TestObject": { + schemaUri: "http://example.org/TestObject", + predicates: [ + { + type: "literal", + literalValue: ["TestObject"], + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + readablePredicate: "type", + }, + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/stringValue", + readablePredicate: "stringValue", + }, + { + type: "number", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/numValue", + readablePredicate: "numValue", + }, + { + type: "boolean", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/boolValue", + readablePredicate: "boolValue", + }, + { + type: "number", + maxCardinality: -1, + minCardinality: 0, + predicateUri: "http://example.org/arrayValue", + readablePredicate: "arrayValue", + }, + { + type: "nested", + nestedSchema: + "http://example.org/TestObject::http://example.org/objectValue", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/objectValue", + readablePredicate: "objectValue", + }, + { + type: "nested", + nestedSchema: + "http://example.org/TestObject::http://example.org/anotherObject", + maxCardinality: -1, + minCardinality: 0, + predicateUri: "http://example.org/anotherObject", + readablePredicate: "anotherObject", + }, + ], + }, + "http://example.org/TestObject::http://example.org/objectValue": { + schemaUri: "http://example.org/TestObject::http://example.org/objectValue", + predicates: [ + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/nestedString", + readablePredicate: "nestedString", + }, + { + type: "number", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/nestedNum", + readablePredicate: "nestedNum", + }, + { + type: "number", + maxCardinality: -1, + minCardinality: 0, + predicateUri: "http://example.org/nestedArray", + readablePredicate: "nestedArray", + }, + ], + }, + "http://example.org/TestObject::http://example.org/anotherObject": { + schemaUri: + "http://example.org/TestObject::http://example.org/anotherObject", + predicates: [ + { + type: "string", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/prop1", + readablePredicate: "prop1", + }, + { + type: "number", + maxCardinality: 1, + minCardinality: 1, + predicateUri: "http://example.org/prop2", + readablePredicate: "prop2", + }, + ], + }, +}; diff --git a/src/shapes/ldo/testShape.schema.ts b/src/shapes/ldo/testShape.schema.ts deleted file mode 100644 index 84a04eb..0000000 --- a/src/shapes/ldo/testShape.schema.ts +++ /dev/null @@ -1,150 +0,0 @@ -import type { Schema } from "shexj"; - -/** - * ============================================================================= - * testShapeSchema: ShexJ Schema for testShape - * ============================================================================= - */ -export const testShapeSchema: Schema = { - type: "Schema", - shapes: [ - { - id: "http://example.org/TestObject", - type: "ShapeDecl", - shapeExpr: { - type: "Shape", - expression: { - type: "EachOf", - expressions: [ - { - type: "TripleConstraint", - predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", - valueExpr: { - type: "NodeConstraint", - values: [ - { - value: "TestObject", - }, - ], - }, - readablePredicate: "type", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/stringValue", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "stringValue", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/numValue", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - readablePredicate: "numValue", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/boolValue", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#boolean", - }, - readablePredicate: "boolValue", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/arrayValue", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - min: 0, - max: -1, - readablePredicate: "arrayValue", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/objectValue", - valueExpr: { - type: "Shape", - expression: { - type: "EachOf", - expressions: [ - { - type: "TripleConstraint", - predicate: "http://example.org/nestedString", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "nestedString", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/nestedNum", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - readablePredicate: "nestedNum", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/nestedArray", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - min: 0, - max: -1, - readablePredicate: "nestedArray", - }, - ], - }, - }, - readablePredicate: "objectValue", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/anotherObject", - valueExpr: { - type: "Shape", - expression: { - type: "EachOf", - expressions: [ - { - type: "TripleConstraint", - predicate: "http://example.org/prop1", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#string", - }, - readablePredicate: "prop1", - }, - { - type: "TripleConstraint", - predicate: "http://example.org/prop2", - valueExpr: { - type: "NodeConstraint", - datatype: "http://www.w3.org/2001/XMLSchema#integer", - }, - readablePredicate: "prop2", - }, - ], - }, - }, - min: 0, - max: -1, - readablePredicate: "anotherObject", - }, - ], - }, - }, - }, - ], -}; diff --git a/src/shapes/ldo/testShape.shapeTypes.ts b/src/shapes/ldo/testShape.shapeTypes.compact.ts similarity index 100% rename from src/shapes/ldo/testShape.shapeTypes.ts rename to src/shapes/ldo/testShape.shapeTypes.compact.ts