diff --git a/examples/README.md b/examples/README.md index a5703d36..d896a258 100644 --- a/examples/README.md +++ b/examples/README.md @@ -34,4 +34,4 @@ The following projects focus on one particular concept at a time. The examples a 1. [Health checks](health-checks/README.md) - Demonstrates how to use health checks. 1. [Middleware](middleware/README.md) - Demonstrates how to use middleware. 1. [Cors](cors/README.md) - Demonstrates how to enable cors. -1. [Construction](construction/README.md) - Demonstrates how to use a set up and tear down scripts. +1. [Resources](resources/README.md) - Demonstrates how to use resources. diff --git a/examples/construction/README.md b/examples/resources/README.md similarity index 87% rename from examples/construction/README.md rename to examples/resources/README.md index c5c7da34..a4cf1ad2 100644 --- a/examples/construction/README.md +++ b/examples/resources/README.md @@ -1,7 +1,7 @@ -# Jitar | Construction example +# Jitar | Resources example -This example demonstrates how to construct and deconstruct a Jitar application. +This example demonstrates how to use resources in a Jitar application. The application creates and fills a database before the server starts. When the application gets shut down, the database gets cleared. diff --git a/examples/construction/jitar.json b/examples/resources/jitar.json similarity index 100% rename from examples/construction/jitar.json rename to examples/resources/jitar.json diff --git a/examples/construction/package.json b/examples/resources/package.json similarity index 82% rename from examples/construction/package.json rename to examples/resources/package.json index ee832176..99caa36b 100644 --- a/examples/construction/package.json +++ b/examples/resources/package.json @@ -1,5 +1,5 @@ { - "name": "jitar-construction-example", + "name": "jitar-resources-example", "private": true, "type": "module", "scripts": { diff --git a/examples/construction/requests.http b/examples/resources/requests.http similarity index 100% rename from examples/construction/requests.http rename to examples/resources/requests.http diff --git a/examples/construction/resources/database.json b/examples/resources/resources/database.json similarity index 100% rename from examples/construction/resources/database.json rename to examples/resources/resources/database.json diff --git a/examples/construction/segments/default.json b/examples/resources/segments/default.json similarity index 100% rename from examples/construction/segments/default.json rename to examples/resources/segments/default.json diff --git a/examples/construction/services/standalone.json b/examples/resources/services/standalone.json similarity index 100% rename from examples/construction/services/standalone.json rename to examples/resources/services/standalone.json diff --git a/examples/construction/src/database.ts b/examples/resources/src/database.ts similarity index 100% rename from examples/construction/src/database.ts rename to examples/resources/src/database.ts diff --git a/examples/construction/src/getData.ts b/examples/resources/src/getData.ts similarity index 100% rename from examples/construction/src/getData.ts rename to examples/resources/src/getData.ts diff --git a/examples/construction/src/setUpDatabase.ts b/examples/resources/src/setUpDatabase.ts similarity index 100% rename from examples/construction/src/setUpDatabase.ts rename to examples/resources/src/setUpDatabase.ts diff --git a/examples/construction/src/tearDownDatabase.ts b/examples/resources/src/tearDownDatabase.ts similarity index 100% rename from examples/construction/src/tearDownDatabase.ts rename to examples/resources/src/tearDownDatabase.ts diff --git a/examples/construction/tsconfig.json b/examples/resources/tsconfig.json similarity index 100% rename from examples/construction/tsconfig.json rename to examples/resources/tsconfig.json diff --git a/package-lock.json b/package-lock.json index fd897263..303664f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,9 +46,6 @@ "examples/access-protection": { "name": "jitar-access-protection-example" }, - "examples/construction": { - "name": "jitar-construction-example" - }, "examples/cors": { "name": "jitar-cors-example", "devDependencies": { @@ -76,6 +73,9 @@ "examples/multi-version": { "name": "jitar-multi-version-example" }, + "examples/resources": { + "name": "jitar-resources-example" + }, "examples/segmentation": { "name": "jitar-segmentation-example" }, @@ -109,9 +109,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.1.tgz", - "integrity": "sha512-Q+E+rd/yBzNQhXkG+zQnF58e4zoZfBedaxwzPmicKsiK3nt8iJYrSrDbjwFFDGC4f+rPafqRaPH6TsDoSvMf7A==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.2.tgz", + "integrity": "sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==", "dev": true, "license": "MIT", "engines": { @@ -190,13 +190,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.1.tgz", - "integrity": "sha512-2YaDd/Rd9E598B5+WIc8wJPmWETiiJXFYVE60oX8FDohv7rAUU3CQj+A1MgeEmcsk2+dQuEjIe/GDvig0SqL4g==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.1", + "@babel/compat-data": "^7.27.2", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -472,9 +472,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.1.tgz", - "integrity": "sha512-I0dZ3ZpCrJ1c04OqlNsQcKiZlsrXf/kkE4FXzID9rIOYICsAbA8mMDzhW/luRNAHdCNt7os/u8wenklZDlUVUQ==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz", + "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", "dev": true, "license": "MIT", "dependencies": { @@ -1214,14 +1214,15 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.27.1.tgz", - "integrity": "sha512-/sSliVc9gHE20/7D5qsdGlq7RG5NCDTWsAhyqzGuq174EtWJoGzIu1BQ7G56eDsTcy1jseBZwv50olSdXOlGuA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.27.2.tgz", + "integrity": "sha512-AIUHD7xJ1mCrj3uPozvtngY3s0xpv7Nu7DoUSnzNY6Xam1Cy4rUznR//pvMHOhQ4AvbCexhbqXCtpxGHOGOO6g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", + "@babel/plugin-transform-destructuring": "^7.27.1", "@babel/plugin-transform-parameters": "^7.27.1" }, "engines": { @@ -1597,14 +1598,14 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.27.1.tgz", - "integrity": "sha512-TZ5USxFpLgKDpdEt8YWBR7p6g+bZo6sHaXLqP2BY/U0acaoI8FTVflcYCr/v94twM1C5IWFdZ/hscq9WjUeLXA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.27.2.tgz", + "integrity": "sha512-Ma4zSuYSlGNRlCLO+EAzLnCmJK2vdstgv+n7aUP+/IKZrOfWHOJVdSJtuub8RzHTj3ahD37k5OKJWvzf16TQyQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.1", - "@babel/helper-compilation-targets": "^7.27.1", + "@babel/compat-data": "^7.27.2", + "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-validator-option": "^7.27.1", "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.27.1", @@ -1646,7 +1647,7 @@ "@babel/plugin-transform-new-target": "^7.27.1", "@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1", "@babel/plugin-transform-numeric-separator": "^7.27.1", - "@babel/plugin-transform-object-rest-spread": "^7.27.1", + "@babel/plugin-transform-object-rest-spread": "^7.27.2", "@babel/plugin-transform-object-super": "^7.27.1", "@babel/plugin-transform-optional-catch-binding": "^7.27.1", "@babel/plugin-transform-optional-chaining": "^7.27.1", @@ -1736,14 +1737,14 @@ } }, "node_modules/@babel/template": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.1.tgz", - "integrity": "sha512-Fyo3ghWMqkHHpHQCoBs2VnYjR4iWFFjguTDEqA5WgZDOrFesVjMhMM2FSqTKSoUSDO1VQtavj8NFpdRBEvJTtg==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.1", + "@babel/parser": "^7.27.2", "@babel/types": "^7.27.1" }, "engines": { @@ -1825,45 +1826,10 @@ "semver": "^7.5.3" } }, - "node_modules/@changesets/apply-release-plan/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@changesets/apply-release-plan/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@changesets/apply-release-plan/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/@changesets/assemble-release-plan": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.6.tgz", - "integrity": "sha512-Frkj8hWJ1FRZiY3kzVCKzS0N5mMwWKwmv9vpam7vt8rZjLL1JMthdh6pSDVSPumHPshTTkKZ0VtNbE0cJHZZUg==", + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.8.tgz", + "integrity": "sha512-y8+8LvZCkKJdbUlpXFuqcavpzJR80PN0OIfn8HZdwK7Sh6MgLXm4hKY5vu6/NDoKp8lAlM4ERZCqRMLxP4m+MQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1898,19 +1864,19 @@ } }, "node_modules/@changesets/cli": { - "version": "2.29.2", - "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.29.2.tgz", - "integrity": "sha512-vwDemKjGYMOc0l6WUUTGqyAWH3AmueeyoJa1KmFRtCYiCoY5K3B68ErYpDB6H48T4lLI4czum4IEjh6ildxUeg==", + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.29.4.tgz", + "integrity": "sha512-VW30x9oiFp/un/80+5jLeWgEU6Btj8IqOgI+X/zAYu4usVOWXjPIK5jSSlt5jsCU7/6Z7AxEkarxBxGUqkAmNg==", "dev": true, "license": "MIT", "dependencies": { "@changesets/apply-release-plan": "^7.0.12", - "@changesets/assemble-release-plan": "^6.0.6", + "@changesets/assemble-release-plan": "^6.0.8", "@changesets/changelog-git": "^0.2.1", "@changesets/config": "^3.1.1", "@changesets/errors": "^0.2.0", "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/get-release-plan": "^4.0.10", + "@changesets/get-release-plan": "^4.0.12", "@changesets/git": "^3.0.4", "@changesets/logger": "^0.1.1", "@changesets/pre": "^2.0.2", @@ -1937,41 +1903,6 @@ "changeset": "bin.js" } }, - "node_modules/@changesets/cli/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@changesets/cli/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@changesets/cli/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/@changesets/config": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.1.1.tgz", @@ -1988,41 +1919,6 @@ "micromatch": "^4.0.8" } }, - "node_modules/@changesets/config/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@changesets/config/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@changesets/config/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/@changesets/errors": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", @@ -2058,13 +1954,13 @@ } }, "node_modules/@changesets/get-release-plan": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.10.tgz", - "integrity": "sha512-CCJ/f3edYaA3MqoEnWvGGuZm0uMEMzNJ97z9hdUR34AOvajSwySwsIzC/bBu3+kuGDsB+cny4FljG8UBWAa7jg==", + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.12.tgz", + "integrity": "sha512-KukdEgaafnyGryUwpHG2kZ7xJquOmWWWk5mmoeQaSvZTWH1DC5D/Sw6ClgGFYtQnOMSQhgoEbDxAbpIIayKH1g==", "dev": true, "license": "MIT", "dependencies": { - "@changesets/assemble-release-plan": "^6.0.6", + "@changesets/assemble-release-plan": "^6.0.8", "@changesets/config": "^3.1.1", "@changesets/pre": "^2.0.2", "@changesets/read": "^0.6.5", @@ -2127,41 +2023,6 @@ "fs-extra": "^7.0.1" } }, - "node_modules/@changesets/pre/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@changesets/pre/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@changesets/pre/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/@changesets/read": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.5.tgz", @@ -2178,41 +2039,6 @@ "picocolors": "^1.1.0" } }, - "node_modules/@changesets/read/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@changesets/read/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@changesets/read/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/@changesets/should-skip-package": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.2.tgz", @@ -2244,41 +2070,6 @@ "prettier": "^2.7.1" } }, - "node_modules/@changesets/write/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@changesets/write/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@changesets/write/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/@emnapi/core": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.3.tgz", @@ -2311,9 +2102,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.3.tgz", - "integrity": "sha512-W8bFfPA8DowP8l//sxjJLSLkD8iEjMc7cBVyP+u4cEv9sM7mdUCkgsj+t0n/BWPFtv7WWCN5Yzj0N6FJNUUqBQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", + "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", "cpu": [ "ppc64" ], @@ -2328,9 +2119,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.3.tgz", - "integrity": "sha512-PuwVXbnP87Tcff5I9ngV0lmiSu40xw1At6i3GsU77U7cjDDB4s0X2cyFuBiDa1SBk9DnvWwnGvVaGBqoFWPb7A==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", + "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", "cpu": [ "arm" ], @@ -2345,9 +2136,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.3.tgz", - "integrity": "sha512-XelR6MzjlZuBM4f5z2IQHK6LkK34Cvv6Rj2EntER3lwCBFdg6h2lKbtRjpTTsdEjD/WSe1q8UyPBXP1x3i/wYQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", + "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", "cpu": [ "arm64" ], @@ -2362,9 +2153,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.3.tgz", - "integrity": "sha512-ogtTpYHT/g1GWS/zKM0cc/tIebFjm1F9Aw1boQ2Y0eUQ+J89d0jFY//s9ei9jVIlkYi8AfOjiixcLJSGNSOAdQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", + "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", "cpu": [ "x64" ], @@ -2379,9 +2170,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.3.tgz", - "integrity": "sha512-eESK5yfPNTqpAmDfFWNsOhmIOaQA59tAcF/EfYvo5/QWQCzXn5iUSOnqt3ra3UdzBv073ykTtmeLJZGt3HhA+w==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", + "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", "cpu": [ "arm64" ], @@ -2396,9 +2187,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.3.tgz", - "integrity": "sha512-Kd8glo7sIZtwOLcPbW0yLpKmBNWMANZhrC1r6K++uDR2zyzb6AeOYtI6udbtabmQpFaxJ8uduXMAo1gs5ozz8A==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", + "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", "cpu": [ "x64" ], @@ -2413,9 +2204,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.3.tgz", - "integrity": "sha512-EJiyS70BYybOBpJth3M0KLOus0n+RRMKTYzhYhFeMwp7e/RaajXvP+BWlmEXNk6uk+KAu46j/kaQzr6au+JcIw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", + "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", "cpu": [ "arm64" ], @@ -2430,9 +2221,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.3.tgz", - "integrity": "sha512-Q+wSjaLpGxYf7zC0kL0nDlhsfuFkoN+EXrx2KSB33RhinWzejOd6AvgmP5JbkgXKmjhmpfgKZq24pneodYqE8Q==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", + "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", "cpu": [ "x64" ], @@ -2447,9 +2238,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.3.tgz", - "integrity": "sha512-dUOVmAUzuHy2ZOKIHIKHCm58HKzFqd+puLaS424h6I85GlSDRZIA5ycBixb3mFgM0Jdh+ZOSB6KptX30DD8YOQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", + "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", "cpu": [ "arm" ], @@ -2464,9 +2255,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.3.tgz", - "integrity": "sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", + "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", "cpu": [ "arm64" ], @@ -2481,9 +2272,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.3.tgz", - "integrity": "sha512-yplPOpczHOO4jTYKmuYuANI3WhvIPSVANGcNUeMlxH4twz/TeXuzEP41tGKNGWJjuMhotpGabeFYGAOU2ummBw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", + "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", "cpu": [ "ia32" ], @@ -2498,9 +2289,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.3.tgz", - "integrity": "sha512-P4BLP5/fjyihmXCELRGrLd793q/lBtKMQl8ARGpDxgzgIKJDRJ/u4r1A/HgpBpKpKZelGct2PGI4T+axcedf6g==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", + "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", "cpu": [ "loong64" ], @@ -2515,9 +2306,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.3.tgz", - "integrity": "sha512-eRAOV2ODpu6P5divMEMa26RRqb2yUoYsuQQOuFUexUoQndm4MdpXXDBbUoKIc0iPa4aCO7gIhtnYomkn2x+bag==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", + "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", "cpu": [ "mips64el" ], @@ -2532,9 +2323,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.3.tgz", - "integrity": "sha512-ZC4jV2p7VbzTlnl8nZKLcBkfzIf4Yad1SJM4ZMKYnJqZFD4rTI+pBG65u8ev4jk3/MPwY9DvGn50wi3uhdaghg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", + "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", "cpu": [ "ppc64" ], @@ -2549,9 +2340,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.3.tgz", - "integrity": "sha512-LDDODcFzNtECTrUUbVCs6j9/bDVqy7DDRsuIXJg6so+mFksgwG7ZVnTruYi5V+z3eE5y+BJZw7VvUadkbfg7QA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", + "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", "cpu": [ "riscv64" ], @@ -2566,9 +2357,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.3.tgz", - "integrity": "sha512-s+w/NOY2k0yC2p9SLen+ymflgcpRkvwwa02fqmAwhBRI3SC12uiS10edHHXlVWwfAagYSY5UpmT/zISXPMW3tQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", + "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", "cpu": [ "s390x" ], @@ -2583,9 +2374,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.3.tgz", - "integrity": "sha512-nQHDz4pXjSDC6UfOE1Fw9Q8d6GCAd9KdvMZpfVGWSJztYCarRgSDfOVBY5xwhQXseiyxapkiSJi/5/ja8mRFFA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", + "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", "cpu": [ "x64" ], @@ -2600,9 +2391,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.3.tgz", - "integrity": "sha512-1QaLtOWq0mzK6tzzp0jRN3eccmN3hezey7mhLnzC6oNlJoUJz4nym5ZD7mDnS/LZQgkrhEbEiTn515lPeLpgWA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", + "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", "cpu": [ "arm64" ], @@ -2617,9 +2408,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.3.tgz", - "integrity": "sha512-i5Hm68HXHdgv8wkrt+10Bc50zM0/eonPb/a/OFVfB6Qvpiirco5gBA5bz7S2SHuU+Y4LWn/zehzNX14Sp4r27g==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", + "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", "cpu": [ "x64" ], @@ -2634,9 +2425,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.3.tgz", - "integrity": "sha512-zGAVApJEYTbOC6H/3QBr2mq3upG/LBEXr85/pTtKiv2IXcgKV0RT0QA/hSXZqSvLEpXeIxah7LczB4lkiYhTAQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", + "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", "cpu": [ "arm64" ], @@ -2651,9 +2442,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.3.tgz", - "integrity": "sha512-fpqctI45NnCIDKBH5AXQBsD0NDPbEFczK98hk/aa6HJxbl+UtLkJV2+Bvy5hLSLk3LHmqt0NTkKNso1A9y1a4w==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", + "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", "cpu": [ "x64" ], @@ -2668,9 +2459,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.3.tgz", - "integrity": "sha512-ROJhm7d8bk9dMCUZjkS8fgzsPAZEjtRJqCAmVgB0gMrvG7hfmPmz9k1rwO4jSiblFjYmNvbECL9uhaPzONMfgA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", + "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", "cpu": [ "x64" ], @@ -2685,9 +2476,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.3.tgz", - "integrity": "sha512-YWcow8peiHpNBiIXHwaswPnAXLsLVygFwCB3A7Bh5jRkIBFWHGmNQ48AlX4xDvQNoMZlPYzjVOQDYEzWCqufMQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", + "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", "cpu": [ "arm64" ], @@ -2702,9 +2493,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.3.tgz", - "integrity": "sha512-qspTZOIGoXVS4DpNqUYUs9UxVb04khS1Degaw/MnfMe7goQ3lTfQ13Vw4qY/Nj0979BGvMRpAYbs/BAxEvU8ew==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", + "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", "cpu": [ "ia32" ], @@ -2719,9 +2510,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.3.tgz", - "integrity": "sha512-ICgUR+kPimx0vvRzf+N/7L7tVSQeE3BYY+NhHRHXS1kBuPO7z2+7ea2HbhDyZdTephgvNvKrlDDKUexuCVBVvg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", + "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", "cpu": [ "x64" ], @@ -2736,9 +2527,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.6.1.tgz", - "integrity": "sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, "license": "MIT", "dependencies": { @@ -2804,9 +2595,9 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.1.tgz", - "integrity": "sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", + "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2901,9 +2692,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.25.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.25.1.tgz", - "integrity": "sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==", + "version": "9.26.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.26.0.tgz", + "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==", "dev": true, "license": "MIT", "engines": { @@ -2987,9 +2778,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", - "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -3230,26 +3021,6 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/@manypkg/find-root/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@manypkg/find-root/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/@manypkg/get-packages": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", @@ -3287,24 +3058,26 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/@manypkg/get-packages/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@manypkg/get-packages/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.2.tgz", + "integrity": "sha512-H9vwztj5OAqHg9GockCQC06k1natgcxWQSRpQcPJf6i5+MWBzfKkRtxGbjQf0X2ihii0ffLZCRGbYV2f2bjNCQ==", "dev": true, "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.3", + "eventsource": "^3.0.2", + "express": "^5.0.1", + "express-rate-limit": "^7.5.0", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.24.1" + }, "engines": { - "node": ">= 4.0.0" + "node": ">=18" } }, "node_modules/@napi-rs/wasm-runtime": { @@ -3824,9 +3597,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.1.tgz", - "integrity": "sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.2.tgz", + "integrity": "sha512-JkdNEq+DFxZfUwxvB58tHMHBHVgX23ew41g1OQinthJ+ryhdRk67O31S7sYw8u2lTjHUPFxwar07BBt1KHp/hg==", "cpu": [ "arm" ], @@ -3838,9 +3611,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.1.tgz", - "integrity": "sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.2.tgz", + "integrity": "sha512-13unNoZ8NzUmnndhPTkWPWbX3vtHodYmy+I9kuLxN+F+l+x3LdVF7UCu8TWVMt1POHLh6oDHhnOA04n8oJZhBw==", "cpu": [ "arm64" ], @@ -3852,9 +3625,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.1.tgz", - "integrity": "sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.2.tgz", + "integrity": "sha512-Gzf1Hn2Aoe8VZzevHostPX23U7N5+4D36WJNHK88NZHCJr7aVMG4fadqkIf72eqVPGjGc0HJHNuUaUcxiR+N/w==", "cpu": [ "arm64" ], @@ -3866,9 +3639,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.1.tgz", - "integrity": "sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.2.tgz", + "integrity": "sha512-47N4hxa01a4x6XnJoskMKTS8XZ0CZMd8YTbINbi+w03A2w4j1RTlnGHOz/P0+Bg1LaVL6ufZyNprSg+fW5nYQQ==", "cpu": [ "x64" ], @@ -3880,9 +3653,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.1.tgz", - "integrity": "sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.2.tgz", + "integrity": "sha512-8t6aL4MD+rXSHHZUR1z19+9OFJ2rl1wGKvckN47XFRVO+QL/dUSpKA2SLRo4vMg7ELA8pzGpC+W9OEd1Z/ZqoQ==", "cpu": [ "arm64" ], @@ -3894,9 +3667,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.1.tgz", - "integrity": "sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.2.tgz", + "integrity": "sha512-C+AyHBzfpsOEYRFjztcYUFsH4S7UsE9cDtHCtma5BK8+ydOZYgMmWg1d/4KBytQspJCld8ZIujFMAdKG1xyr4Q==", "cpu": [ "x64" ], @@ -3908,9 +3681,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.1.tgz", - "integrity": "sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.2.tgz", + "integrity": "sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q==", "cpu": [ "arm" ], @@ -3922,9 +3695,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.1.tgz", - "integrity": "sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.2.tgz", + "integrity": "sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg==", "cpu": [ "arm" ], @@ -3936,9 +3709,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.1.tgz", - "integrity": "sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.2.tgz", + "integrity": "sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg==", "cpu": [ "arm64" ], @@ -3950,9 +3723,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.1.tgz", - "integrity": "sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.2.tgz", + "integrity": "sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg==", "cpu": [ "arm64" ], @@ -3964,9 +3737,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.1.tgz", - "integrity": "sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.2.tgz", + "integrity": "sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw==", "cpu": [ "loong64" ], @@ -3978,9 +3751,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.1.tgz", - "integrity": "sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.2.tgz", + "integrity": "sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q==", "cpu": [ "ppc64" ], @@ -3992,9 +3765,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.1.tgz", - "integrity": "sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.2.tgz", + "integrity": "sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg==", "cpu": [ "riscv64" ], @@ -4006,9 +3779,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.1.tgz", - "integrity": "sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.2.tgz", + "integrity": "sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg==", "cpu": [ "riscv64" ], @@ -4020,9 +3793,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.1.tgz", - "integrity": "sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.2.tgz", + "integrity": "sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ==", "cpu": [ "s390x" ], @@ -4034,9 +3807,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.1.tgz", - "integrity": "sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.2.tgz", + "integrity": "sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==", "cpu": [ "x64" ], @@ -4048,9 +3821,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.1.tgz", - "integrity": "sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.2.tgz", + "integrity": "sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA==", "cpu": [ "x64" ], @@ -4062,9 +3835,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.1.tgz", - "integrity": "sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.2.tgz", + "integrity": "sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg==", "cpu": [ "arm64" ], @@ -4076,9 +3849,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.1.tgz", - "integrity": "sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.2.tgz", + "integrity": "sha512-dt1llVSGEsGKvzeIO76HToiYPNPYPkmjhMHhP00T9S4rDern8P2ZWvWAQUEJ+R1UdMWJ/42i/QqJ2WV765GZcA==", "cpu": [ "ia32" ], @@ -4090,9 +3863,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.1.tgz", - "integrity": "sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.2.tgz", + "integrity": "sha512-bwspbWB04XJpeElvsp+DCylKfF4trJDa2Y9Go8O6A7YLX2LIKGcNK/CYImJN6ZP4DcuOHB4Utl3iCbnR62DudA==", "cpu": [ "x64" ], @@ -4230,9 +4003,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", - "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", + "version": "22.15.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.18.tgz", + "integrity": "sha512-v1DKRfUdyW+jJhZNEI1PYy29S2YRxMV5AOO/x/SjKmW0acCIOqmbj6Haf9eHAhsPmrhlHSxEhv/1WszcLWV4cg==", "dev": true, "license": "MIT", "dependencies": { @@ -4302,21 +4075,21 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.1.tgz", - "integrity": "sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", + "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.31.1", - "@typescript-eslint/type-utils": "8.31.1", - "@typescript-eslint/utils": "8.31.1", - "@typescript-eslint/visitor-keys": "8.31.1", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/type-utils": "8.32.1", + "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4331,17 +4104,27 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", + "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.1.tgz", - "integrity": "sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", + "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.31.1", - "@typescript-eslint/types": "8.31.1", - "@typescript-eslint/typescript-estree": "8.31.1", - "@typescript-eslint/visitor-keys": "8.31.1", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4" }, "engines": { @@ -4357,14 +4140,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.1.tgz", - "integrity": "sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", + "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.1", - "@typescript-eslint/visitor-keys": "8.31.1" + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4375,16 +4158,16 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.1.tgz", - "integrity": "sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", + "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.31.1", - "@typescript-eslint/utils": "8.31.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/utils": "8.32.1", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4399,9 +4182,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.1.tgz", - "integrity": "sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", + "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", "dev": true, "license": "MIT", "engines": { @@ -4413,20 +4196,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.1.tgz", - "integrity": "sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", + "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.1", - "@typescript-eslint/visitor-keys": "8.31.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4456,16 +4239,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.1.tgz", - "integrity": "sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", + "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.31.1", - "@typescript-eslint/types": "8.31.1", - "@typescript-eslint/typescript-estree": "8.31.1" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4480,13 +4263,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.1.tgz", - "integrity": "sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", + "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.1", + "@typescript-eslint/types": "8.32.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -4511,9 +4294,9 @@ } }, "node_modules/@vitest/coverage-v8": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.1.2.tgz", - "integrity": "sha512-XDdaDOeaTMAMYW7N63AqoK32sYUWbXnTkC6tEbVcu3RlU1bB9of32T+PGf8KZvxqLNqeXhafDFqCkwpf2+dyaQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.1.3.tgz", + "integrity": "sha512-cj76U5gXCl3g88KSnf80kof6+6w+K4BjOflCl7t6yRJPDuCrHtVu0SgNYOUARJOL5TI8RScDbm5x4s1/P9bvpw==", "dev": true, "license": "MIT", "dependencies": { @@ -4534,8 +4317,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "3.1.2", - "vitest": "3.1.2" + "@vitest/browser": "3.1.3", + "vitest": "3.1.3" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -4544,14 +4327,14 @@ } }, "node_modules/@vitest/expect": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.2.tgz", - "integrity": "sha512-O8hJgr+zREopCAqWl3uCVaOdqJwZ9qaDwUP7vy3Xigad0phZe9APxKhPcDNqYYi0rX5oMvwJMSCAXY2afqeTSA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.3.tgz", + "integrity": "sha512-7FTQQuuLKmN1Ig/h+h/GO+44Q1IlglPlR2es4ab7Yvfx+Uk5xsv+Ykk+MEt/M2Yn/xGmzaLKxGw2lgy2bwuYqg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.1.2", - "@vitest/utils": "3.1.2", + "@vitest/spy": "3.1.3", + "@vitest/utils": "3.1.3", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, @@ -4560,9 +4343,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.2.tgz", - "integrity": "sha512-R0xAiHuWeDjTSB3kQ3OQpT8Rx3yhdOAIm/JM4axXxnG7Q/fS8XUwggv/A4xzbQA+drYRjzkMnpYnOGAc4oeq8w==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.3.tgz", + "integrity": "sha512-i6FDiBeJUGLDKADw2Gb01UtUNb12yyXAqC/mmRWuYl+m/U9GS7s8us5ONmGkGpUUo7/iAYzI2ePVfOZTYvUifA==", "dev": true, "license": "MIT", "dependencies": { @@ -4573,13 +4356,13 @@ } }, "node_modules/@vitest/runner": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.2.tgz", - "integrity": "sha512-bhLib9l4xb4sUMPXnThbnhX2Yi8OutBMA8Yahxa7yavQsFDtwY/jrUZwpKp2XH9DhRFJIeytlyGpXCqZ65nR+g==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.3.tgz", + "integrity": "sha512-Tae+ogtlNfFei5DggOsSUvkIaSuVywujMj6HzR97AHK6XK8i3BuVyIifWAm/sE3a15lF5RH9yQIrbXYuo0IFyA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.1.2", + "@vitest/utils": "3.1.3", "pathe": "^2.0.3" }, "funding": { @@ -4587,13 +4370,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.2.tgz", - "integrity": "sha512-Q1qkpazSF/p4ApZg1vfZSQ5Yw6OCQxVMVrLjslbLFA1hMDrT2uxtqMaw8Tc/jy5DLka1sNs1Y7rBcftMiaSH/Q==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.3.tgz", + "integrity": "sha512-XVa5OPNTYUsyqG9skuUkFzAeFnEzDp8hQu7kZ0N25B1+6KjGm4hWLtURyBbsIAOekfWQ7Wuz/N/XXzgYO3deWQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.1.2", + "@vitest/pretty-format": "3.1.3", "magic-string": "^0.30.17", "pathe": "^2.0.3" }, @@ -4602,9 +4385,9 @@ } }, "node_modules/@vitest/spy": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.2.tgz", - "integrity": "sha512-OEc5fSXMws6sHVe4kOFyDSj/+4MSwst0ib4un0DlcYgQvRuYQ0+M2HyqGaauUMnjq87tmUaMNDxKQx7wNfVqPA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.3.tgz", + "integrity": "sha512-x6w+ctOEmEXdWaa6TO4ilb7l9DxPR5bwEb6hILKuxfU1NqWT2mpJD9NJN7t3OTfxmVlOMrvtoFJGdgyzZ605lQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4615,13 +4398,13 @@ } }, "node_modules/@vitest/utils": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.2.tgz", - "integrity": "sha512-5GGd0ytZ7BH3H6JTj9Kw7Prn1Nbg0wZVrIvou+UWxm54d+WoXXgAgjFJ8wn3LdagWLFSEfpPeyYrByZaGEZHLg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.3.tgz", + "integrity": "sha512-2Ltrpht4OmHO9+c/nmHtF09HWiyWdworqnHIwjfvDyWjuwKbdkcS9AnhsDn+8E2RM4x++foD1/tNuLPVvWG1Rg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.1.2", + "@vitest/pretty-format": "3.1.3", "loupe": "^3.1.3", "tinyrainbow": "^2.0.0" }, @@ -5127,9 +4910,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "version": "4.24.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", + "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", "dev": true, "funding": [ { @@ -5147,10 +4930,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", + "caniuse-lite": "^1.0.30001716", + "electron-to-chromium": "^1.5.149", "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" + "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" @@ -5282,9 +5065,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001716", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001716.tgz", - "integrity": "sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==", + "version": "1.0.30001718", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", + "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", "dev": true, "funding": [ { @@ -5586,6 +5369,20 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", @@ -5632,6 +5429,21 @@ "npm": ">=10" } }, + "node_modules/cpx2/node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/cpx2/node_modules/ignore": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", @@ -5642,6 +5454,19 @@ "node": ">= 4" } }, + "node_modules/cpx2/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/cpx2/node_modules/minimatch": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", @@ -5671,6 +5496,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cpx2/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/create-jitar": { "resolved": "packages/create-jitar", "link": true @@ -5764,9 +5599,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -6038,9 +5873,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.148", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.148.tgz", - "integrity": "sha512-8uc1QXwwqayD4mblcsQYZqoi+cOc97A2XmKSBOIRbEAvbp6vrqmSYs4dHD2qVygUgn7Mi0qdKgPaJ9WC8cv63A==", + "version": "1.5.154", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.154.tgz", + "integrity": "sha512-G4VCFAyKbp1QJ+sWdXYIRYsPGvlV5sDACfCmoMFog3rjm1syLhI41WXm/swZypwCIWIm4IFLWzHY14joWMQ5Fw==", "dev": true, "license": "ISC" }, @@ -6244,9 +6079,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.3.tgz", - "integrity": "sha512-qKA6Pvai73+M2FtftpNKRxJ78GIjmFXFxd/1DVBqGo/qNhLSfv+G12n9pNoWdytJC8U00TrViOwpjT0zgqQS8Q==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", + "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -6257,31 +6092,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.3", - "@esbuild/android-arm": "0.25.3", - "@esbuild/android-arm64": "0.25.3", - "@esbuild/android-x64": "0.25.3", - "@esbuild/darwin-arm64": "0.25.3", - "@esbuild/darwin-x64": "0.25.3", - "@esbuild/freebsd-arm64": "0.25.3", - "@esbuild/freebsd-x64": "0.25.3", - "@esbuild/linux-arm": "0.25.3", - "@esbuild/linux-arm64": "0.25.3", - "@esbuild/linux-ia32": "0.25.3", - "@esbuild/linux-loong64": "0.25.3", - "@esbuild/linux-mips64el": "0.25.3", - "@esbuild/linux-ppc64": "0.25.3", - "@esbuild/linux-riscv64": "0.25.3", - "@esbuild/linux-s390x": "0.25.3", - "@esbuild/linux-x64": "0.25.3", - "@esbuild/netbsd-arm64": "0.25.3", - "@esbuild/netbsd-x64": "0.25.3", - "@esbuild/openbsd-arm64": "0.25.3", - "@esbuild/openbsd-x64": "0.25.3", - "@esbuild/sunos-x64": "0.25.3", - "@esbuild/win32-arm64": "0.25.3", - "@esbuild/win32-ia32": "0.25.3", - "@esbuild/win32-x64": "0.25.3" + "@esbuild/aix-ppc64": "0.25.4", + "@esbuild/android-arm": "0.25.4", + "@esbuild/android-arm64": "0.25.4", + "@esbuild/android-x64": "0.25.4", + "@esbuild/darwin-arm64": "0.25.4", + "@esbuild/darwin-x64": "0.25.4", + "@esbuild/freebsd-arm64": "0.25.4", + "@esbuild/freebsd-x64": "0.25.4", + "@esbuild/linux-arm": "0.25.4", + "@esbuild/linux-arm64": "0.25.4", + "@esbuild/linux-ia32": "0.25.4", + "@esbuild/linux-loong64": "0.25.4", + "@esbuild/linux-mips64el": "0.25.4", + "@esbuild/linux-ppc64": "0.25.4", + "@esbuild/linux-riscv64": "0.25.4", + "@esbuild/linux-s390x": "0.25.4", + "@esbuild/linux-x64": "0.25.4", + "@esbuild/netbsd-arm64": "0.25.4", + "@esbuild/netbsd-x64": "0.25.4", + "@esbuild/openbsd-arm64": "0.25.4", + "@esbuild/openbsd-x64": "0.25.4", + "@esbuild/sunos-x64": "0.25.4", + "@esbuild/win32-arm64": "0.25.4", + "@esbuild/win32-ia32": "0.25.4", + "@esbuild/win32-x64": "0.25.4" } }, "node_modules/escalade": { @@ -6314,9 +6149,9 @@ } }, "node_modules/eslint": { - "version": "9.25.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.25.1.tgz", - "integrity": "sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==", + "version": "9.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.26.0.tgz", + "integrity": "sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6326,11 +6161,12 @@ "@eslint/config-helpers": "^0.2.1", "@eslint/core": "^0.13.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.25.1", + "@eslint/js": "9.26.0", "@eslint/plugin-kit": "^0.2.8", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", + "@modelcontextprotocol/sdk": "^1.8.0", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -6354,7 +6190,8 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3" + "optionator": "^0.9.3", + "zod": "^3.24.2" }, "bin": { "eslint": "bin/eslint.js" @@ -6415,6 +6252,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/eslint-plugin-sonarjs/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/eslint-scope": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", @@ -6654,6 +6504,29 @@ "node": ">= 0.6" } }, + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.2.tgz", + "integrity": "sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/expect-type": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", @@ -6706,6 +6579,22 @@ "url": "https://opencollective.com/express" } }, + "node_modules/express-rate-limit": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", + "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": "^4.11 || 5 || ^5.0.0-beta.1" + } + }, "node_modules/express/node_modules/mime-db": { "version": "1.54.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", @@ -7100,17 +6989,18 @@ "license": "MIT" }, "node_modules/fs-extra": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, "license": "MIT", "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, "engines": { - "node": ">=14.14" + "node": ">=6 <7 || >=8" } }, "node_modules/fsevents": { @@ -8285,10 +8175,6 @@ "resolved": "examples/access-protection", "link": true }, - "node_modules/jitar-construction-example": { - "resolved": "examples/construction", - "link": true - }, "node_modules/jitar-cors-example": { "resolved": "examples/cors", "link": true @@ -8321,6 +8207,10 @@ "resolved": "examples/multi-version", "link": true }, + "node_modules/jitar-resources-example": { + "resolved": "examples/resources", + "link": true + }, "node_modules/jitar-segmentation-example": { "resolved": "examples/segmentation", "link": true @@ -8455,13 +8345,11 @@ "license": "MIT" }, "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -9005,16 +8893,26 @@ } }, "node_modules/nx/node_modules/yaml": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, "node_modules/object-inspect": { @@ -9453,6 +9351,16 @@ "node": ">=6" } }, + "node_modules/pkce-challenge": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", + "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.20.0" + } + }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", @@ -9950,9 +9858,9 @@ } }, "node_modules/rollup": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.1.tgz", - "integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.2.tgz", + "integrity": "sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg==", "dev": true, "license": "MIT", "dependencies": { @@ -9966,26 +9874,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.40.1", - "@rollup/rollup-android-arm64": "4.40.1", - "@rollup/rollup-darwin-arm64": "4.40.1", - "@rollup/rollup-darwin-x64": "4.40.1", - "@rollup/rollup-freebsd-arm64": "4.40.1", - "@rollup/rollup-freebsd-x64": "4.40.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.40.1", - "@rollup/rollup-linux-arm-musleabihf": "4.40.1", - "@rollup/rollup-linux-arm64-gnu": "4.40.1", - "@rollup/rollup-linux-arm64-musl": "4.40.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.40.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.40.1", - "@rollup/rollup-linux-riscv64-gnu": "4.40.1", - "@rollup/rollup-linux-riscv64-musl": "4.40.1", - "@rollup/rollup-linux-s390x-gnu": "4.40.1", - "@rollup/rollup-linux-x64-gnu": "4.40.1", - "@rollup/rollup-linux-x64-musl": "4.40.1", - "@rollup/rollup-win32-arm64-msvc": "4.40.1", - "@rollup/rollup-win32-ia32-msvc": "4.40.1", - "@rollup/rollup-win32-x64-msvc": "4.40.1", + "@rollup/rollup-android-arm-eabi": "4.40.2", + "@rollup/rollup-android-arm64": "4.40.2", + "@rollup/rollup-darwin-arm64": "4.40.2", + "@rollup/rollup-darwin-x64": "4.40.2", + "@rollup/rollup-freebsd-arm64": "4.40.2", + "@rollup/rollup-freebsd-x64": "4.40.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.40.2", + "@rollup/rollup-linux-arm-musleabihf": "4.40.2", + "@rollup/rollup-linux-arm64-gnu": "4.40.2", + "@rollup/rollup-linux-arm64-musl": "4.40.2", + "@rollup/rollup-linux-loongarch64-gnu": "4.40.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.40.2", + "@rollup/rollup-linux-riscv64-gnu": "4.40.2", + "@rollup/rollup-linux-riscv64-musl": "4.40.2", + "@rollup/rollup-linux-s390x-gnu": "4.40.2", + "@rollup/rollup-linux-x64-gnu": "4.40.2", + "@rollup/rollup-linux-x64-musl": "4.40.2", + "@rollup/rollup-win32-arm64-msvc": "4.40.2", + "@rollup/rollup-win32-ia32-msvc": "4.40.2", + "@rollup/rollup-win32-x64-msvc": "4.40.2", "fsevents": "~2.3.2" } }, @@ -10149,9 +10057,9 @@ } }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -10753,9 +10661,9 @@ } }, "node_modules/terser": { - "version": "5.39.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", - "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==", + "version": "5.39.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.1.tgz", + "integrity": "sha512-Mm6+uad0ZuDtcV8/4uOZQDQ8RuiC5Pu+iZRedJtF7yA/27sPL7d++In/AJKpWZlU3SYMPPkVfwetn6sgZ66pUA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -11010,27 +10918,27 @@ "license": "0BSD" }, "node_modules/turbo": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.5.2.tgz", - "integrity": "sha512-Qo5lfuStr6LQh3sPQl7kIi243bGU4aHGDQJUf6ylAdGwks30jJFloc9NYHP7Y373+gGU9OS0faA4Mb5Sy8X9Xw==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.5.3.tgz", + "integrity": "sha512-iHuaNcq5GZZnr3XDZNuu2LSyCzAOPwDuo5Qt+q64DfsTP1i3T2bKfxJhni2ZQxsvAoxRbuUK5QetJki4qc5aYA==", "dev": true, "license": "MIT", "bin": { "turbo": "bin/turbo" }, "optionalDependencies": { - "turbo-darwin-64": "2.5.2", - "turbo-darwin-arm64": "2.5.2", - "turbo-linux-64": "2.5.2", - "turbo-linux-arm64": "2.5.2", - "turbo-windows-64": "2.5.2", - "turbo-windows-arm64": "2.5.2" + "turbo-darwin-64": "2.5.3", + "turbo-darwin-arm64": "2.5.3", + "turbo-linux-64": "2.5.3", + "turbo-linux-arm64": "2.5.3", + "turbo-windows-64": "2.5.3", + "turbo-windows-arm64": "2.5.3" } }, "node_modules/turbo-darwin-64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.5.2.tgz", - "integrity": "sha512-2aIl0Sx230nLk+Cg2qSVxvPOBWCZpwKNuAMKoROTvWKif6VMpkWWiR9XEPoz7sHeLmCOed4GYGMjL1bqAiIS/g==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.5.3.tgz", + "integrity": "sha512-YSItEVBUIvAGPUDpAB9etEmSqZI3T6BHrkBkeSErvICXn3dfqXUfeLx35LfptLDEbrzFUdwYFNmt8QXOwe9yaw==", "cpu": [ "x64" ], @@ -11042,9 +10950,9 @@ ] }, "node_modules/turbo-darwin-arm64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.5.2.tgz", - "integrity": "sha512-MrFYhK/jYu8N6QlqZtqSHi3e4QVxlzqU3ANHTKn3/tThuwTLbNHEvzBPWSj5W7nZcM58dCqi6gYrfRz6bJZyAA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.5.3.tgz", + "integrity": "sha512-5PefrwHd42UiZX7YA9m1LPW6x9YJBDErXmsegCkVp+GjmWrADfEOxpFrGQNonH3ZMj77WZB2PVE5Aw3gA+IOhg==", "cpu": [ "arm64" ], @@ -11056,9 +10964,9 @@ ] }, "node_modules/turbo-linux-64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.5.2.tgz", - "integrity": "sha512-LxNqUE2HmAJQ/8deoLgMUDzKxd5bKxqH0UBogWa+DF+JcXhtze3UTMr6lEr0dEofdsEUYK1zg8FRjglmwlN5YA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.5.3.tgz", + "integrity": "sha512-M9xigFgawn5ofTmRzvjjLj3Lqc05O8VHKuOlWNUlnHPUltFquyEeSkpQNkE/vpPdOR14AzxqHbhhxtfS4qvb1w==", "cpu": [ "x64" ], @@ -11070,9 +10978,9 @@ ] }, "node_modules/turbo-linux-arm64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.5.2.tgz", - "integrity": "sha512-0MI1Ao1q8zhd+UUbIEsrM+yLq1BsrcJQRGZkxIsHFlGp7WQQH1oR3laBgfnUCNdCotCMD6w4moc9pUbXdOR3bg==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.5.3.tgz", + "integrity": "sha512-auJRbYZ8SGJVqvzTikpg1bsRAsiI9Tk0/SDkA5Xgg0GdiHDH/BOzv1ZjDE2mjmlrO/obr19Dw+39OlMhwLffrw==", "cpu": [ "arm64" ], @@ -11084,9 +10992,9 @@ ] }, "node_modules/turbo-windows-64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.5.2.tgz", - "integrity": "sha512-hOLcbgZzE5ttACHHyc1ajmWYq4zKT42IC3G6XqgiXxMbS+4eyVYTL+7UvCZBd3Kca1u4TLQdLQjeO76zyDJc2A==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.5.3.tgz", + "integrity": "sha512-arLQYohuHtIEKkmQSCU9vtrKUg+/1TTstWB9VYRSsz+khvg81eX6LYHtXJfH/dK7Ho6ck+JaEh5G+QrE1jEmCQ==", "cpu": [ "x64" ], @@ -11098,9 +11006,9 @@ ] }, "node_modules/turbo-windows-arm64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.5.2.tgz", - "integrity": "sha512-fMU41ABhSLa18H8V3Z7BMCGynQ8x+wj9WyBMvWm1jeyRKgkvUYJsO2vkIsy8m0vrwnIeVXKOIn6eSe1ddlBVqw==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.5.3.tgz", + "integrity": "sha512-3JPn66HAynJ0gtr6H+hjY4VHpu1RPKcEwGATvGUTmLmYSYBQieVlnGDRMMoYN066YfyPqnNGCfhYbXfH92Cm0g==", "cpu": [ "arm64" ], @@ -11252,15 +11160,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.31.1.tgz", - "integrity": "sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.1.tgz", + "integrity": "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.31.1", - "@typescript-eslint/parser": "8.31.1", - "@typescript-eslint/utils": "8.31.1" + "@typescript-eslint/eslint-plugin": "8.32.1", + "@typescript-eslint/parser": "8.32.1", + "@typescript-eslint/utils": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -11345,12 +11253,13 @@ } }, "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, "license": "MIT", "engines": { - "node": ">= 10.0.0" + "node": ">= 4.0.0" } }, "node_modules/unpipe": { @@ -11430,15 +11339,15 @@ } }, "node_modules/vite-node": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.2.tgz", - "integrity": "sha512-/8iMryv46J3aK13iUXsei5G/A3CUlW4665THCPS+K8xAaqrVWiGB4RfXMQXCLjpK9P2eK//BczrVkn5JLAk6DA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.3.tgz", + "integrity": "sha512-uHV4plJ2IxCl4u1up1FQRrqclylKAogbtBfOTwcuJ28xFi+89PZ57BRh+naIRvH70HPwxy5QHYzg1OrEaC7AbA==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.4.0", - "es-module-lexer": "^1.6.0", + "es-module-lexer": "^1.7.0", "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0" }, @@ -11453,9 +11362,9 @@ } }, "node_modules/vite-node/node_modules/vite": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz", - "integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11528,9 +11437,9 @@ } }, "node_modules/vite-node/node_modules/yaml": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", "dev": true, "license": "ISC", "optional": true, @@ -11539,23 +11448,23 @@ "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" } }, "node_modules/vitest": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.2.tgz", - "integrity": "sha512-WaxpJe092ID1C0mr+LH9MmNrhfzi8I65EX/NRU/Ld016KqQNRgxSOlGNP1hHN+a/F8L15Mh8klwaF77zR3GeDQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.3.tgz", + "integrity": "sha512-188iM4hAHQ0km23TN/adso1q5hhwKqUpv+Sd6p5sOuh6FhQnRNW3IsiIpvxqahtBabsJ2SLZgmGSpcYK4wQYJw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "3.1.2", - "@vitest/mocker": "3.1.2", - "@vitest/pretty-format": "^3.1.2", - "@vitest/runner": "3.1.2", - "@vitest/snapshot": "3.1.2", - "@vitest/spy": "3.1.2", - "@vitest/utils": "3.1.2", + "@vitest/expect": "3.1.3", + "@vitest/mocker": "3.1.3", + "@vitest/pretty-format": "^3.1.3", + "@vitest/runner": "3.1.3", + "@vitest/snapshot": "3.1.3", + "@vitest/spy": "3.1.3", + "@vitest/utils": "3.1.3", "chai": "^5.2.0", "debug": "^4.4.0", "expect-type": "^1.2.1", @@ -11568,7 +11477,7 @@ "tinypool": "^1.0.2", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.1.2", + "vite-node": "3.1.3", "why-is-node-running": "^2.3.0" }, "bin": { @@ -11584,8 +11493,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.1.2", - "@vitest/ui": "3.1.2", + "@vitest/browser": "3.1.3", + "@vitest/ui": "3.1.3", "happy-dom": "*", "jsdom": "*" }, @@ -11614,13 +11523,13 @@ } }, "node_modules/vitest/node_modules/@vitest/mocker": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.2.tgz", - "integrity": "sha512-kOtd6K2lc7SQ0mBqYv/wdGedlqPdM/B38paPY+OwJ1XiNi44w3Fpog82UfOibmHaV9Wod18A09I9SCKLyDMqgw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.3.tgz", + "integrity": "sha512-PJbLjonJK82uCWHjzgBJZuR7zmAOrSvKk1QBxrennDIgtH4uK0TB1PvYmc0XBCigxxtiAVPfWtAdy4lpz8SQGQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.1.2", + "@vitest/spy": "3.1.3", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -11651,9 +11560,9 @@ } }, "node_modules/vitest/node_modules/vite": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz", - "integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11726,9 +11635,9 @@ } }, "node_modules/vitest/node_modules/yaml": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", "dev": true, "license": "ISC", "optional": true, @@ -11737,7 +11646,7 @@ "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" } }, "node_modules/wcwidth": { @@ -12090,6 +11999,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zod": { + "version": "3.24.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.4.tgz", + "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.24.5", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", + "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", + "dev": true, + "license": "ISC", + "peerDependencies": { + "zod": "^3.24.1" + } + }, "packages/analysis": { "name": "@jitar/analysis", "version": "0.7.1", @@ -12132,8 +12061,6 @@ }, "packages/configuration/node_modules/dotenv": { "version": "16.5.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", "license": "BSD-2-Clause", "engines": { "node": ">=12" @@ -12170,7 +12097,8 @@ "version": "0.7.4", "license": "MIT", "dependencies": { - "@jitar/errors": "*" + "@jitar/errors": "*", + "@jitar/sourcing": "*" } }, "packages/health": { @@ -12223,8 +12151,6 @@ }, "packages/jitar/node_modules/dotenv": { "version": "16.5.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", "license": "BSD-2-Clause", "engines": { "node": ">=12" @@ -12233,6 +12159,41 @@ "url": "https://dotenvx.com" } }, + "packages/jitar/node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "packages/jitar/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "packages/jitar/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "packages/logging": { "name": "@jitar/logging", "version": "0.7.4", @@ -12264,9 +12225,7 @@ } }, "packages/plugin-vite/node_modules/vite": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz", - "integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==", + "version": "6.3.5", "dev": true, "license": "MIT", "dependencies": { @@ -12340,8 +12299,6 @@ }, "packages/plugin-vite/node_modules/yaml": { "version": "2.7.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", "dev": true, "license": "ISC", "optional": true, @@ -12397,6 +12354,41 @@ "mime-types": "^2.1.35" } }, + "packages/sourcing/node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "packages/sourcing/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "packages/sourcing/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "packages/validation": { "name": "@jitar/validation", "version": "0.7.4", diff --git a/packages/build/src/BuildManager.ts b/packages/build/src/BuildManager.ts index dd638463..edfdc677 100644 --- a/packages/build/src/BuildManager.ts +++ b/packages/build/src/BuildManager.ts @@ -1,7 +1,7 @@ import type { RuntimeConfiguration } from '@jitar/configuration'; import { Logger, LogLevel } from '@jitar/logging'; -import { Files, FileManager } from '@jitar/sourcing'; +import { Files, LocalFileManager } from '@jitar/sourcing'; import { ApplicationReader } from './source'; import { ApplicationBuilder } from './target'; @@ -20,10 +20,10 @@ export default class BuildManager { this.#logger = new Logger(logLevel); - const sourceFileManager = new FileManager(configuration.source); - const targetFileManager = new FileManager(configuration.target); - const resourceFileManager = new FileManager(configuration.resources); - const segmentFileManager = new FileManager(configuration.segments); + const sourceFileManager = new LocalFileManager(configuration.source); + const targetFileManager = new LocalFileManager(configuration.target); + const resourceFileManager = new LocalFileManager(configuration.resources); + const segmentFileManager = new LocalFileManager(configuration.segments); this.#fileManager = new ProjectFileManager(sourceFileManager, targetFileManager, resourceFileManager, segmentFileManager); diff --git a/packages/cli/src/commands/StartServer.ts b/packages/cli/src/commands/StartServer.ts index ac1e7b31..5e3f3827 100644 --- a/packages/cli/src/commands/StartServer.ts +++ b/packages/cli/src/commands/StartServer.ts @@ -3,7 +3,7 @@ import { ConfigurationManager, RuntimeConfiguration, ServerConfiguration } from import { HttpRemoteBuilder, HttpServer } from '@jitar/http'; import { LogLevel, LogLevelParser } from '@jitar/logging'; import { ServerBuilder } from '@jitar/runtime'; -import { FileManager, SourcingManager } from '@jitar/sourcing'; +import { LocalSourcingManager } from '@jitar/sourcing'; import ArgumentProcessor from '../ArgumentProcessor'; import Command from '../Command'; @@ -49,8 +49,7 @@ export default class StartServer implements Command { const [, , port] = serverConfiguration.url.split(':'); - const fileManager = new FileManager(runtimeConfiguration.target); - const sourcingManager = new SourcingManager(fileManager); + const sourcingManager = new LocalSourcingManager(runtimeConfiguration.target); const remoteBuilder = new HttpRemoteBuilder(); const serverBuilder = new ServerBuilder(sourcingManager, remoteBuilder); diff --git a/packages/configuration/src/ConfigurationManager.ts b/packages/configuration/src/ConfigurationManager.ts index 97c0c39e..bb7f41bf 100644 --- a/packages/configuration/src/ConfigurationManager.ts +++ b/packages/configuration/src/ConfigurationManager.ts @@ -1,6 +1,6 @@ import { Validator } from '@jitar/validation'; -import { FileManager } from '@jitar/sourcing'; +import { LocalFileManager } from '@jitar/sourcing'; import { EnvironmentConfigurator } from './environment'; import { RuntimeConfiguration, RuntimeConfigurationBuilder } from './runtime'; @@ -18,7 +18,7 @@ export default class ConfigurationManager constructor(rootPath: string = DEFAULT_ROOT_PATH) { - const fileManager = new FileManager(rootPath); + const fileManager = new LocalFileManager(rootPath); const reader = new ConfigurationReader(fileManager); const validator = new Validator(); diff --git a/packages/execution/package.json b/packages/execution/package.json index 70c691fb..5cd6d086 100644 --- a/packages/execution/package.json +++ b/packages/execution/package.json @@ -16,6 +16,7 @@ "clean": "rm -rf dist" }, "dependencies": { - "@jitar/errors": "*" + "@jitar/errors": "*", + "@jitar/sourcing": "*" } } diff --git a/packages/execution/src/ExecutionManager.ts b/packages/execution/src/ExecutionManager.ts index fa8340a7..d6e1f1d8 100644 --- a/packages/execution/src/ExecutionManager.ts +++ b/packages/execution/src/ExecutionManager.ts @@ -1,4 +1,6 @@ +import type { ModuleImporter } from '@jitar/sourcing'; + import StatusCodes from './definitions/StatusCodes'; import RunModes from './definitions/RunModes'; @@ -22,10 +24,36 @@ import ErrorConverter from './utils/ErrorConverter'; export default class ExecutionManager implements Runner { + readonly #moduleImporter: ModuleImporter; + readonly #segmentFiles: string[]; + readonly #argumentConstructor: ArgumentConstructor = new ArgumentConstructor(); readonly #errorConverter: ErrorConverter = new ErrorConverter(); readonly #application: Application = new Application(); + constructor(moduleImporter: ModuleImporter, segmentFiles: string[] = []) + { + this.#moduleImporter = moduleImporter; + this.#segmentFiles = segmentFiles; + } + + async start(): Promise + { + return this.#loadSegments(); + } + + async stop(): Promise + { + return this.#clearSegments(); + } + + async loadSegment(filename: string): Promise + { + const module = await this.#moduleImporter.import(filename); + + this.addSegment(module.default as Segment); + } + async addSegment(segment: Segment): Promise { if ((segment instanceof Segment) === false) @@ -85,6 +113,16 @@ export default class ExecutionManager implements Runner return this.#runImplementation(request, implementation, args); } + async #loadSegments(): Promise + { + await Promise.all(this.#segmentFiles.map(filename => this.loadSegment(filename))); + } + + #clearSegments(): void + { + this.#application.clearSegments(); + } + #getImplementation(fqn: string, version: Version): Implementation { const procedure = this.#application.getProcedure(fqn); diff --git a/packages/execution/src/models/Application.ts b/packages/execution/src/models/Application.ts index 6a8bd665..0922e250 100644 --- a/packages/execution/src/models/Application.ts +++ b/packages/execution/src/models/Application.ts @@ -12,6 +12,11 @@ export default class Application this.#segments.set(segment.id, segment); } + clearSegments(): void + { + this.#segments.clear(); + } + getClassNames(): string[] { const names = new Set(); diff --git a/packages/health/src/HealthManager.ts b/packages/health/src/HealthManager.ts index eb400051..7f6aadf3 100644 --- a/packages/health/src/HealthManager.ts +++ b/packages/health/src/HealthManager.ts @@ -1,4 +1,6 @@ +import type { ModuleImporter } from '@jitar/sourcing'; + import InvalidHealthCheck from './errors/InvalidHealthCheck'; import type HealthCheck from './interfaces/HealthCheck'; @@ -10,8 +12,34 @@ type HealthCheckResult = export default class HealthManager { + readonly #moduleImporter: ModuleImporter; + readonly #healthCheckFiles: string[]; + readonly #healthChecks = new Map(); + constructor(moduleImporter: ModuleImporter, healthCheckFiles: string[] = []) + { + this.#moduleImporter = moduleImporter; + this.#healthCheckFiles = healthCheckFiles; + } + + async start(): Promise + { + return this.#loadHealthChecks(); + } + + async stop(): Promise + { + return this.clearHealthChecks(); + } + + async loadHealthCheck(filename: string): Promise + { + const module = await this.#moduleImporter.import(filename); + + this.addHealthCheck(module.default as HealthCheck); + } + addHealthCheck(healthCheck: HealthCheck): void { if (healthCheck.isHealthy === undefined) @@ -63,6 +91,11 @@ export default class HealthManager .then(() => healthChecks); } + async #loadHealthChecks(): Promise + { + await Promise.all(this.#healthCheckFiles.map(filename => this.loadHealthCheck(filename))); + } + #handleHealthCheckResult(result: PromiseSettledResult, healthChecks: Map): void { if (result.status !== 'fulfilled') diff --git a/packages/middleware/src/MiddlewareManager.ts b/packages/middleware/src/MiddlewareManager.ts index 1b3d298e..c51a583a 100644 --- a/packages/middleware/src/MiddlewareManager.ts +++ b/packages/middleware/src/MiddlewareManager.ts @@ -1,5 +1,6 @@ import { Request, Response, StatusCodes } from '@jitar/execution'; +import type { ModuleImporter } from '@jitar/sourcing'; import InvalidMiddleware from './errors/InvalidMiddleware'; import type Middleware from './interfaces/Middleware'; @@ -7,8 +8,34 @@ import type NextHandler from './types/NextHandler'; export default class MiddlewareManager { + readonly #moduleImporter: ModuleImporter; + readonly #middlewareFiles: string[]; + #middlewares: Middleware[] = []; + constructor(moduleImporter: ModuleImporter, middlewareFiles: string[] = []) + { + this.#moduleImporter = moduleImporter; + this.#middlewareFiles = middlewareFiles; + } + + async start(): Promise + { + return this.#loadMiddlewares(); + } + + async stop(): Promise + { + return this.clearMiddlewares(); + } + + async loadMiddleware(filename:string): Promise + { + const module = await this.#moduleImporter.import(filename); + + this.addMiddleware(module.default as Middleware); + } + addMiddleware(middleware: Middleware): void { if (middleware?.handle === undefined) @@ -38,6 +65,11 @@ export default class MiddlewareManager return startHandler(); } + async #loadMiddlewares(): Promise + { + await Promise.all(this.#middlewareFiles.map(filename => this.loadMiddleware(filename))); + } + #getNextHandler(request: Request, index: number): NextHandler { const next = this.#middlewares[index]; diff --git a/packages/plugin-vite/src/index.ts b/packages/plugin-vite/src/index.ts index 3e365e30..74f15f35 100644 --- a/packages/plugin-vite/src/index.ts +++ b/packages/plugin-vite/src/index.ts @@ -198,8 +198,9 @@ export default function viteJitar(pluginConfig: PluginConfig): PluginOption const remoteBuilder = 'const remoteBuilder = new HttpRemoteBuilder();'; const clientBuilder = 'const clientBuilder = new ClientBuilder(remoteBuilder);'; - const build = 'clientBuilder.build({remoteUrl, segments, middleware});'; - const client = [remoteBuilder, clientBuilder, build].join('\n'); + const build = 'const client = clientBuilder.build({remoteUrl, segments, middleware});'; + const start = 'client.start();'; + const client = [remoteBuilder, clientBuilder, build, start].join('\n'); const exports = `export * from "${JITAR_CLIENT_ID}";`; diff --git a/packages/runtime/src/client/Client.ts b/packages/runtime/src/client/Client.ts index d25aa0b5..24b7d6a0 100644 --- a/packages/runtime/src/client/Client.ts +++ b/packages/runtime/src/client/Client.ts @@ -33,21 +33,18 @@ export default class Client extends Runtime }); this.#middlewareManager = configuration.middlewareManager; - - const procedureRunner = new ProcedureRunner(this.#worker); - this.#middlewareManager.addMiddleware(procedureRunner); } get worker() { return this.#worker; } start(): Promise { - return this.#worker.start(); + return this.#setUp(); } stop(): Promise { - return this.#worker.stop(); + return this.#tearDown(); } getTrustKey(): string | undefined @@ -64,4 +61,25 @@ export default class Client extends Runtime { return this.#middlewareManager.handle(request); } + + async #setUp(): Promise + { + await Promise.all( + [ + this.#worker.start(), + this.#middlewareManager.start() + ]); + + const procedureRunner = new ProcedureRunner(this.#worker); + this.#middlewareManager.addMiddleware(procedureRunner); + } + + async #tearDown(): Promise + { + await Promise.all( + [ + this.#middlewareManager.stop(), + this.#worker.stop() + ]); + } } diff --git a/packages/runtime/src/client/ClientBuilder.ts b/packages/runtime/src/client/ClientBuilder.ts index 19ea612d..7238830c 100644 --- a/packages/runtime/src/client/ClientBuilder.ts +++ b/packages/runtime/src/client/ClientBuilder.ts @@ -2,6 +2,7 @@ import { Segment, ExecutionManager } from '@jitar/execution'; import { RemoteBuilder } from '@jitar/services'; import { Middleware, MiddlewareManager } from '@jitar/middleware'; +import { RemoteSourcingManager } from '@jitar/sourcing'; import Client from './Client'; @@ -24,25 +25,29 @@ export default class ClientBuilder build(configuration: ClientConfiguration): Client { const remoteUrl = configuration.remoteUrl; + const middleware = configuration.middleware; + const segments = configuration.segments; + const remote = this.#remoteBuilder.build(remoteUrl); - const middlewareManager = this.#buildMiddlewareManager(configuration.middleware ?? []); - const executionManager = this.#buildExecutionManager(configuration.segments ?? []); + const sourcingManager = new RemoteSourcingManager(remoteUrl); + const middlewareManager = this.#buildMiddlewareManager(sourcingManager, middleware); + const executionManager = this.#buildExecutionManager(sourcingManager, segments); return new Client({ remoteUrl, remote, middlewareManager, executionManager }); } - #buildMiddlewareManager(middleware: Middleware[]): MiddlewareManager + #buildMiddlewareManager(sourcingManager: RemoteSourcingManager, middleware: Middleware[] = []): MiddlewareManager { - const manager = new MiddlewareManager(); + const manager = new MiddlewareManager(sourcingManager); middleware.forEach(middleware => manager.addMiddleware(middleware)); return manager; } - #buildExecutionManager(segments: Segment[]): ExecutionManager + #buildExecutionManager(sourcingManager: RemoteSourcingManager, segments: Segment[] = []): ExecutionManager { - const manager = new ExecutionManager(); + const manager = new ExecutionManager(sourcingManager); segments.forEach(segment => manager.addSegment(segment)); diff --git a/packages/runtime/src/server/ResourceManager.ts b/packages/runtime/src/server/ResourceManager.ts new file mode 100644 index 00000000..03319dc8 --- /dev/null +++ b/packages/runtime/src/server/ResourceManager.ts @@ -0,0 +1,41 @@ + +import type { SourcingManager } from '@jitar/sourcing'; + +export default class ResourceManager +{ + readonly #sourcingManager: SourcingManager; + readonly #setUpScripts: string[]; + readonly #tearDownScripts: string[]; + + constructor(sourcingManager: SourcingManager, setUpScripts: string[] = [], tearDownScripts: string[] = []) + { + this.#sourcingManager = sourcingManager; + this.#setUpScripts = setUpScripts; + this.#tearDownScripts = tearDownScripts; + } + + async start(): Promise + { + return this.#runSetupScripts(); + } + + async stop(): Promise + { + return this.#runTearDownScripts(); + } + + #runSetupScripts(): Promise + { + return this.#runScripts(this.#setUpScripts); + } + + #runTearDownScripts(): Promise + { + return this.#runScripts(this.#tearDownScripts); + } + + async #runScripts(scripts: string[]): Promise + { + await Promise.all(scripts.map(script => this.#sourcingManager.import(script))); + } +} diff --git a/packages/runtime/src/server/Server.ts b/packages/runtime/src/server/Server.ts index 1ccd5297..1c4d0eff 100644 --- a/packages/runtime/src/server/Server.ts +++ b/packages/runtime/src/server/Server.ts @@ -5,7 +5,7 @@ import { Request, Version, VersionParser } from '@jitar/execution'; import type { HealthManager } from '@jitar/health'; import { Logger } from '@jitar/logging'; import type { MiddlewareManager } from '@jitar/middleware'; -import { LocalGateway, LocalWorker, Proxy, RemoteBuilder, RemoteWorker } from '@jitar/services'; +import { LocalGateway, LocalWorker, LocalProxy, RemoteBuilder, RemoteWorker } from '@jitar/services'; import type { File, SourcingManager } from '@jitar/sourcing'; import ProcedureRunner from '../ProcedureRunner'; @@ -20,27 +20,26 @@ import RemoveWorkerRequest from './types/RemoveWorkerRequest'; import RunRequest from './types/RunRequest'; import ServerResponse from './types/ServerResponse'; +import ResourceManager from './ResourceManager'; + type Configuration = { - proxy: Proxy; + proxy: LocalProxy; sourcingManager: SourcingManager; remoteBuilder: RemoteBuilder; + resourceManager: ResourceManager; middlewareManager: MiddlewareManager; healthManager: HealthManager; - setUpScripts?: string[]; - tearDownScripts?: string[]; logger: Logger; }; export default class Server extends Runtime { - readonly #proxy: Proxy; - readonly #sourcingManager: SourcingManager; + readonly #proxy: LocalProxy; readonly #remoteBuilder: RemoteBuilder; + readonly #resourceManager: ResourceManager; readonly #middlewareManager: MiddlewareManager; readonly #healthManager: HealthManager; - readonly #setUpScripts: string[]; - readonly #tearDownScripts: string[]; readonly #logger: Logger; readonly #versionParser = new VersionParser(); @@ -50,17 +49,12 @@ export default class Server extends Runtime super(); this.#proxy = configuration.proxy; - this.#sourcingManager = configuration.sourcingManager; this.#remoteBuilder = configuration.remoteBuilder; + this.#resourceManager = configuration.resourceManager; this.#middlewareManager = configuration.middlewareManager; this.#healthManager = configuration.healthManager; - this.#setUpScripts = configuration.setUpScripts ?? []; - this.#tearDownScripts = configuration.tearDownScripts ?? []; this.#logger = configuration.logger; - - const procedureRunner = new ProcedureRunner(this.#proxy); - this.#middlewareManager.addMiddleware(procedureRunner); } get proxy() { return this.#proxy; } @@ -74,8 +68,6 @@ export default class Server extends Runtime { await this.#setUp(); - await this.#proxy.start(); - this.#logger.info(`Server started at ${this.#proxy.url}`); if (this.#proxy.runner instanceof LocalWorker) @@ -86,8 +78,6 @@ export default class Server extends Runtime async stop(): Promise { - await this.#proxy.stop(); - await this.#tearDown(); this.#logger.info('Server stopped'); @@ -244,19 +234,31 @@ export default class Server extends Runtime } } - #setUp(): Promise + async #setUp(): Promise { - return this.#runScripts(this.#setUpScripts); - } + await this.#resourceManager.start(); - #tearDown(): Promise - { - return this.#runScripts(this.#tearDownScripts); + await Promise.all( + [ + this.#proxy.start(), + this.#healthManager.start(), + this.#middlewareManager.start() + ]); + + const procedureRunner = new ProcedureRunner(this.#proxy); + this.#middlewareManager.addMiddleware(procedureRunner); } - async #runScripts(scripts: string[]): Promise + async #tearDown(): Promise { - await Promise.all(scripts.map(script => this.#sourcingManager.import(script))); + await Promise.all( + [ + this.#middlewareManager.stop(), + this.#healthManager.stop(), + this.#proxy.stop() + ]); + + await this.#resourceManager.stop(); } #transformRunRequest(request: RunRequest): Request diff --git a/packages/runtime/src/server/ServerBuilder.ts b/packages/runtime/src/server/ServerBuilder.ts index ee24ecef..3894d1b6 100644 --- a/packages/runtime/src/server/ServerBuilder.ts +++ b/packages/runtime/src/server/ServerBuilder.ts @@ -1,13 +1,14 @@ import { GatewayConfiguration, ProxyConfiguration, RepositoryConfiguration, ServerConfiguration, StandaloneConfiguration, WorkerConfiguration } from '@jitar/configuration'; -import { ExecutionManager, Segment } from '@jitar/execution'; -import { HealthCheck, HealthManager } from '@jitar/health'; +import { ExecutionManager } from '@jitar/execution'; +import { HealthManager } from '@jitar/health'; import { Logger, LogLevel } from '@jitar/logging'; -import { Middleware, MiddlewareManager } from '@jitar/middleware'; -import { DummyProvider, DummyRunner, LocalGateway, LocalRepository, LocalWorker, Proxy, RemoteBuilder, RemoteGateway, RemoteRepository } from '@jitar/services'; +import { MiddlewareManager } from '@jitar/middleware'; +import { DummyProvider, DummyRunner, LocalGateway, LocalRepository, LocalWorker, LocalProxy, RemoteBuilder, RemoteGateway, RemoteRepository } from '@jitar/services'; import { SourcingManager } from '@jitar/sourcing'; import UnknownServiceConfigured from './errors/UnknownServiceConfigured'; +import ResourceManager from './ResourceManager'; import Server from './Server'; export default class RuntimeBuilder @@ -23,25 +24,24 @@ export default class RuntimeBuilder async build(configuration: ServerConfiguration, logLevel?: LogLevel): Promise { - const setUp = configuration.setUp ?? []; - const tearDown = configuration.tearDown ?? []; + const setUp = configuration.setUp; + const tearDown = configuration.tearDown; const middleware = configuration.middleware; const healthChecks = configuration.healthChecks; const proxy = await this.#buildService(configuration); const sourcingManager = this.#sourcingManager; const remoteBuilder = this.#remoteBuilder; - const middlewareManager = await this.#buildMiddlewareManager(middleware); - const healthManager = await this.#buildHealthManager(healthChecks); - const setUpScripts = setUp.map(filename => this.#assureExtension(filename)); - const tearDownScripts = tearDown.map(filename => this.#assureExtension(filename)); + const resourceManager = this.#buildResourceManager(setUp, tearDown); + const middlewareManager = this.#buildMiddlewareManager(middleware); + const healthManager = this.#buildHealthManager(healthChecks); const logger = new Logger(logLevel); - return new Server({ proxy, sourcingManager, remoteBuilder, middlewareManager, healthManager, setUpScripts, tearDownScripts, logger }); + return new Server({ proxy, sourcingManager, remoteBuilder, resourceManager, middlewareManager, healthManager, logger }); } - #buildService(configuration: ServerConfiguration): Promise + #buildService(configuration: ServerConfiguration): Promise { if (configuration.gateway !== undefined) return this.#buildGatewayProxy(configuration.url, configuration.gateway); if (configuration.worker !== undefined) return this.#buildWorkerProxy(configuration.url, configuration.worker); @@ -52,31 +52,31 @@ export default class RuntimeBuilder throw new UnknownServiceConfigured(); } - async #buildGatewayProxy(url: string, configuration: GatewayConfiguration): Promise + async #buildGatewayProxy(url: string, configuration: GatewayConfiguration): Promise { const provider = new DummyProvider(); - const runner = await this.#buildLocalGateway(url, configuration); + const runner = this.#buildLocalGateway(url, configuration); - return new Proxy({ url, provider, runner }); + return new LocalProxy({ url, provider, runner }); } - async #buildWorkerProxy(url: string, configuration: WorkerConfiguration): Promise + async #buildWorkerProxy(url: string, configuration: WorkerConfiguration): Promise { const provider = new DummyProvider(); - const runner = await this.#buildLocalWorker(url, configuration); + const runner = this.#buildLocalWorker(url, configuration); - return new Proxy({ url, provider, runner }); + return new LocalProxy({ url, provider, runner }); } - async #buildRepositoryProxy(url: string, configuration: RepositoryConfiguration): Promise + async #buildRepositoryProxy(url: string, configuration: RepositoryConfiguration): Promise { const provider = await this.#buildLocalRepository(url, configuration); const runner = new DummyRunner(); - return new Proxy({ url, provider, runner }); + return new LocalProxy({ url, provider, runner }); } - async #buildLocalGateway(url: string, configuration: GatewayConfiguration): Promise + #buildLocalGateway(url: string, configuration: GatewayConfiguration): LocalGateway { const trustKey = configuration.trustKey; const monitorInterval = configuration.monitor; @@ -91,13 +91,14 @@ export default class RuntimeBuilder return new RemoteGateway({ url, remote }); } - async #buildLocalWorker(url: string, configuration: WorkerConfiguration): Promise + #buildLocalWorker(url: string, configuration: WorkerConfiguration): LocalWorker { const trustKey = configuration.trustKey; const gateway = configuration.gateway ? this.#buildRemoteGateway(configuration.gateway) : undefined; - const executionManager = await this.#buildExecutionManager(configuration.segments); + const registerAtGateway = gateway !== undefined; // if we have a gateway, the worker needs to register itself at it. + const executionManager = this.#buildExecutionManager(configuration.segments); - return new LocalWorker({ url, trustKey, gateway, executionManager }); + return new LocalWorker({ url, trustKey, gateway, registerAtGateway, executionManager }); } async #buildLocalRepository(url: string, configuration: RepositoryConfiguration): Promise @@ -117,62 +118,49 @@ export default class RuntimeBuilder return new RemoteRepository({ url, remote }); } - async #buildProxy(url: string, configuration: ProxyConfiguration): Promise + async #buildProxy(url: string, configuration: ProxyConfiguration): Promise { const provider = this.#buildRemoteRepository(configuration.repository); const runner = this.#buildRemoteGateway(configuration.gateway); - return new Proxy({ url, provider, runner }); + return new LocalProxy({ url, provider, runner }); } - async #buildStandalone(url: string, configuration: StandaloneConfiguration): Promise + async #buildStandalone(url: string, configuration: StandaloneConfiguration): Promise { const provider = await this.#buildLocalRepository(url, configuration); - const runner = await this.#buildLocalWorker(url, configuration); + const runner = this.#buildLocalWorker(url, configuration); - return new Proxy({ url, provider, runner }); + return new LocalProxy({ url, provider, runner }); } - async #buildHealthManager(filenames?: string[]): Promise + #buildResourceManager(setUp: string[] = [], tearDown: string[] = []): ResourceManager { - const manager = new HealthManager(); + const translatedSetUp = setUp.map(filename => this.#assureExtension(filename)); + const translatedTearDown = tearDown.map(filename => this.#assureExtension(filename)); - if (filenames !== undefined) - { - const translatedFilenames = filenames.map(filename => this.#assureExtension(filename)); - const modules = await Promise.all(translatedFilenames.map(filename => this.#sourcingManager.import(filename))); - - modules.forEach(module => manager.addHealthCheck(module.default as HealthCheck)); - } - - return manager; + return new ResourceManager(this.#sourcingManager, translatedSetUp, translatedTearDown); } - async #buildMiddlewareManager(filenames?: string[]): Promise + #buildHealthManager(filenames: string[] = []): HealthManager { - const manager = new MiddlewareManager(); + const translatedFilenames = filenames.map(filename => this.#assureExtension(filename)); - if (filenames !== undefined) - { - const translatedFilenames = filenames.map(filename => this.#assureExtension(filename)); - const modules = await Promise.all(translatedFilenames.map(filename => this.#sourcingManager.import(filename))); + return new HealthManager(this.#sourcingManager, translatedFilenames); + } - modules.forEach(module => manager.addMiddleware(module.default as Middleware)); - } + #buildMiddlewareManager(filenames: string[] = []): MiddlewareManager + { + const translatedFilenames = filenames.map(filename => this.#assureExtension(filename)); - return manager; + return new MiddlewareManager(this.#sourcingManager, translatedFilenames); } - async #buildExecutionManager(segmentNames: string[]): Promise + #buildExecutionManager(segmentNames: string[] = []): ExecutionManager { - const manager = new ExecutionManager(); const filenames = segmentNames.map(name => `./${name}.segment.js`); - const modules = await Promise.all(filenames.map(filename => this.#sourcingManager.import(filename))); - - modules.forEach(module => manager.addSegment(module.default as Segment)); - - return manager; + return new ExecutionManager(this.#sourcingManager, filenames); } async #buildAssetSet(patterns?: string[]): Promise> diff --git a/packages/services/src/index.ts b/packages/services/src/index.ts index 2d10959b..b62c8886 100644 --- a/packages/services/src/index.ts +++ b/packages/services/src/index.ts @@ -6,7 +6,7 @@ export { default as Gateway } from './gateway/Gateway'; export { default as LocalGateway } from './gateway/LocalGateway'; export { default as RemoteGateway } from './gateway/RemoteGateway'; -export { default as Proxy } from './proxy/Proxy'; +export { default as LocalProxy } from './proxy/LocalProxy'; export { default as LocalRepository } from './repository/LocalRepository'; export { default as RemoteRepository } from './repository/RemoteRepository'; diff --git a/packages/services/src/proxy/Proxy.ts b/packages/services/src/proxy/LocalProxy.ts similarity index 96% rename from packages/services/src/proxy/Proxy.ts rename to packages/services/src/proxy/LocalProxy.ts index 0c91b9bc..5013e539 100644 --- a/packages/services/src/proxy/Proxy.ts +++ b/packages/services/src/proxy/LocalProxy.ts @@ -12,7 +12,7 @@ type Configuration = runner: RunnerService; }; -export default class Proxy implements ProviderService, RunnerService +export default class LocalProxy implements ProviderService, RunnerService { readonly #url: string; readonly #provider: ProviderService; diff --git a/packages/services/src/worker/LocalWorker.ts b/packages/services/src/worker/LocalWorker.ts index b8921aa3..3837c309 100644 --- a/packages/services/src/worker/LocalWorker.ts +++ b/packages/services/src/worker/LocalWorker.ts @@ -17,6 +17,7 @@ type Configuration = url: string; trustKey?: string; gateway?: Gateway; + registerAtGateway?: boolean; executionManager: ExecutionManager; }; @@ -26,6 +27,7 @@ export default class LocalWorker implements Worker readonly #url: string; readonly #trustKey?: string; readonly #gateway?: Gateway; + readonly #registerAtGateway: boolean; readonly #executionManager: ExecutionManager; readonly #serializer: Serializer; @@ -34,6 +36,7 @@ export default class LocalWorker implements Worker this.#url = configuration.url; this.#trustKey = configuration.trustKey; this.#gateway = configuration.gateway; + this.#registerAtGateway = configuration.registerAtGateway === true; this.#executionManager = configuration.executionManager; @@ -51,20 +54,32 @@ export default class LocalWorker implements Worker async start(): Promise { + await this.#executionManager.start(); + if (this.#gateway !== undefined) { await this.#gateway.start(); - this.#id = await this.#gateway.addWorker(this); + + if (this.#registerAtGateway) + { + this.#id = await this.#gateway.addWorker(this); + } } } async stop(): Promise { - if (this.#gateway !== undefined && this.#id !== undefined) + if (this.#gateway !== undefined) { - await this.#gateway.removeWorker(this); + if (this.#id !== undefined) + { + await this.#gateway.removeWorker(this); + } + await this.#gateway.stop(); } + + await this.#executionManager.stop(); } getProcedureNames(): string[] diff --git a/packages/services/test/repository/fixtures/sourcingManager.fixture.ts b/packages/services/test/repository/fixtures/sourcingManager.fixture.ts index 96d4b758..cdec0d9e 100644 --- a/packages/services/test/repository/fixtures/sourcingManager.fixture.ts +++ b/packages/services/test/repository/fixtures/sourcingManager.fixture.ts @@ -1,37 +1,14 @@ import { NotImplemented } from '@jitar/errors'; -import { File, FileManager, FileNotFound, SourcingManager } from '@jitar/sourcing'; +import { File, FileNotFound, LocalSourcingManager } from '@jitar/sourcing'; import { FILENAMES } from './filenames.fixture'; import { FILES } from './files.fixtures'; -class DummyFileManager implements FileManager +class DummySourcingManager extends LocalSourcingManager { - getRootLocation(): string - { - throw new NotImplemented(); - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - getAbsoluteLocation(filename: string): string - { - throw new NotImplemented(); - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - getRelativeLocation(filename: string): string - { - throw new NotImplemented(); - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - getType(filename: string): Promise - { - throw new NotImplemented(); - } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - getContent(filename: string): Promise + filter(pattern: string): Promise { throw new NotImplemented(); } @@ -52,25 +29,11 @@ class DummyFileManager implements FileManager } } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - write(filename: string, content: string): Promise - { - throw new NotImplemented(); - } - // eslint-disable-next-line @typescript-eslint/no-unused-vars delete(filename: string): Promise { throw new NotImplemented(); } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - filter(pattern: string): Promise - { - throw new NotImplemented(); - } } -const fileManager = new DummyFileManager(); - -export const sourcingManager = new SourcingManager(fileManager); +export const sourcingManager = new DummySourcingManager(''); diff --git a/packages/sourcing/src/LocalSourcingManager.ts b/packages/sourcing/src/LocalSourcingManager.ts new file mode 100644 index 00000000..6da102f1 --- /dev/null +++ b/packages/sourcing/src/LocalSourcingManager.ts @@ -0,0 +1,16 @@ + +import { LocalFileManager } from './files'; +import { LocalImportManager } from './modules'; + +import SourcingManager from './SourcingManager'; + +export default class LocalSourcingManager extends SourcingManager +{ + constructor(location: string) + { + const fileManager = new LocalFileManager(location); + const importManager = new LocalImportManager(fileManager); + + super(fileManager, importManager); + } +} diff --git a/packages/sourcing/src/RemoteSourcingManager.ts b/packages/sourcing/src/RemoteSourcingManager.ts new file mode 100644 index 00000000..b04872bf --- /dev/null +++ b/packages/sourcing/src/RemoteSourcingManager.ts @@ -0,0 +1,16 @@ + +import { RemoteFileManager } from './files'; +import { RemoteImportManager } from './modules'; + +import SourcingManager from './SourcingManager'; + +export default class RemoteSourcingManager extends SourcingManager +{ + constructor(location: string) + { + const fileManager = new RemoteFileManager(location); + const importManager = new RemoteImportManager(location); + + super(fileManager, importManager); + } +} diff --git a/packages/sourcing/src/SourcingManager.ts b/packages/sourcing/src/SourcingManager.ts index c642a1c6..407285df 100644 --- a/packages/sourcing/src/SourcingManager.ts +++ b/packages/sourcing/src/SourcingManager.ts @@ -1,16 +1,17 @@ -import type File from './models/File'; -import ModuleNotLoaded from './errors/ModuleNotLoaded'; -import type Module from './types/Module'; -import type FileManager from './FileManager'; -export default class SourcingManager +import { File, FileManager, FileReader } from './files'; +import { Module, ImportManager, ModuleImporter } from './modules'; + +export default class SourcingManager implements FileReader, ModuleImporter { readonly #fileManager: FileManager; + readonly #importManager: ImportManager; - constructor(fileManager: FileManager) + constructor(fileManager: FileManager, importManager: ImportManager) { this.#fileManager = fileManager; + this.#importManager = importManager; } async filter(...patterns: string[]): Promise @@ -20,34 +21,18 @@ export default class SourcingManager return files.flat().map(file => this.#fileManager.getRelativeLocation(file)); } - async exists(filename: string): Promise + exists(filename: string): Promise { return this.#fileManager.exists(filename); } - async read(filename: string): Promise + read(filename: string): Promise { return this.#fileManager.read(filename); } - async import(filename: string): Promise + import(filename: string): Promise { - // If the specifier is an absolute path, we need to convert it to a path - // relative to the cache folder. - - const specifier = filename.startsWith('/') - ? this.#fileManager.getAbsoluteLocation(`.${filename}`) - : this.#fileManager.getAbsoluteLocation(filename); - - try - { - return await import(specifier); - } - catch (error: unknown) - { - const message = error instanceof Error ? error.message : String(error); - - throw new ModuleNotLoaded(specifier, message); - } + return this.#importManager.import(filename); } } diff --git a/packages/sourcing/src/FileManager.ts b/packages/sourcing/src/files/FileManager.ts similarity index 95% rename from packages/sourcing/src/FileManager.ts rename to packages/sourcing/src/files/FileManager.ts index 9ca6cc3c..21be8bb8 100644 --- a/packages/sourcing/src/FileManager.ts +++ b/packages/sourcing/src/files/FileManager.ts @@ -2,21 +2,20 @@ import InvalidLocation from './errors/InvalidLocation'; import FileNotFound from './errors/FileNotFound'; +import FileReader from './interfaces/FileReader'; import FileSystem from './interfaces/FileSystem'; import File from './models/File'; -import LocalFileSystem from './LocalFileSystem'; - const DEFAULT_MIME_TYPE = 'application/octet-stream'; -export default class FileManager +export default class FileManager implements FileReader { readonly #location: string; readonly #rootLocation: string; readonly #fileSystem: FileSystem; - constructor(location: string, fileSystem = new LocalFileSystem()) + constructor(location: string, fileSystem: FileSystem) { this.#location = location; this.#fileSystem = fileSystem; diff --git a/packages/sourcing/src/files/LocalFileManager.ts b/packages/sourcing/src/files/LocalFileManager.ts new file mode 100644 index 00000000..9a48cbb1 --- /dev/null +++ b/packages/sourcing/src/files/LocalFileManager.ts @@ -0,0 +1,11 @@ + +import FileManager from './FileManager'; +import LocalFileSystem from './LocalFileSystem'; + +export default class LocalFileManager extends FileManager +{ + constructor(location: string) + { + super(location, new LocalFileSystem()); + } +} diff --git a/packages/sourcing/src/LocalFileSystem.ts b/packages/sourcing/src/files/LocalFileSystem.ts similarity index 93% rename from packages/sourcing/src/LocalFileSystem.ts rename to packages/sourcing/src/files/LocalFileSystem.ts index 63cac0e3..ab57ab71 100644 --- a/packages/sourcing/src/LocalFileSystem.ts +++ b/packages/sourcing/src/files/LocalFileSystem.ts @@ -74,7 +74,14 @@ export default class LocalFileSystem implements FileSystem async mimeType(location: string): Promise { - return mime.lookup(location) || undefined; + const mimeType = mime.lookup(location); + + if (mimeType === false) + { + return undefined; + } + + return mimeType; } async write(location: string, content: string): Promise diff --git a/packages/sourcing/src/files/RemoteFileManager.ts b/packages/sourcing/src/files/RemoteFileManager.ts new file mode 100644 index 00000000..7ff8a2e6 --- /dev/null +++ b/packages/sourcing/src/files/RemoteFileManager.ts @@ -0,0 +1,11 @@ + +import FileManager from './FileManager'; +import RemoteFileSystem from './RemoteFileSystem'; + +export default class RemoteFileManager extends FileManager +{ + constructor(location: string) + { + super(location, new RemoteFileSystem()); + } +} diff --git a/packages/sourcing/src/files/RemoteFileSystem.ts b/packages/sourcing/src/files/RemoteFileSystem.ts new file mode 100644 index 00000000..cdd2c2bd --- /dev/null +++ b/packages/sourcing/src/files/RemoteFileSystem.ts @@ -0,0 +1,68 @@ + +import RemoteFilesNotSupported from './errors/RemoteFilesNotSupported'; +import FileSystem from './interfaces/FileSystem'; + +/* eslint-disable @typescript-eslint/no-unused-vars */ +export default class RemoteFileSystem implements FileSystem +{ + // This is a placeholder class for remote file systems. + // Its current role is basically saying no to all requests. + + // If we ever want to allow a remote file system, we need to + // implement an interface for multi-protocol implementations. + + copy(source: string, destination: string): Promise + { + throw new RemoteFilesNotSupported(); + } + + delete(location: string): Promise + { + throw new RemoteFilesNotSupported(); + } + + exists(location: string): Promise + { + throw new RemoteFilesNotSupported(); + } + + async filter(location: string, pattern: string): Promise + { + return []; + } + + isDirectory(location: string): boolean + { + throw new RemoteFilesNotSupported(); + } + + join(...paths: string[]): string + { + throw new RemoteFilesNotSupported(); + } + + read(location: string): Promise + { + throw new RemoteFilesNotSupported(); + } + + resolve(location: string): string + { + return location; + } + + relative(from: string, to: string): string + { + throw new RemoteFilesNotSupported(); + } + + mimeType(location: string): Promise + { + throw new RemoteFilesNotSupported(); + } + + write(location: string, content: string): Promise + { + throw new RemoteFilesNotSupported(); + } +} diff --git a/packages/sourcing/src/definitions/Files.ts b/packages/sourcing/src/files/definitions/Files.ts similarity index 100% rename from packages/sourcing/src/definitions/Files.ts rename to packages/sourcing/src/files/definitions/Files.ts diff --git a/packages/sourcing/src/errors/FileNotFound.ts b/packages/sourcing/src/files/errors/FileNotFound.ts similarity index 100% rename from packages/sourcing/src/errors/FileNotFound.ts rename to packages/sourcing/src/files/errors/FileNotFound.ts diff --git a/packages/sourcing/src/errors/InvalidLocation.ts b/packages/sourcing/src/files/errors/InvalidLocation.ts similarity index 100% rename from packages/sourcing/src/errors/InvalidLocation.ts rename to packages/sourcing/src/files/errors/InvalidLocation.ts diff --git a/packages/sourcing/src/files/errors/RemoteFilesNotSupported.ts b/packages/sourcing/src/files/errors/RemoteFilesNotSupported.ts new file mode 100644 index 00000000..68bd04cf --- /dev/null +++ b/packages/sourcing/src/files/errors/RemoteFilesNotSupported.ts @@ -0,0 +1,8 @@ + +export default class RemoteFilesNotSupported extends Error +{ + constructor() + { + super('Remote files are not supported'); + } +} diff --git a/packages/sourcing/src/files/index.ts b/packages/sourcing/src/files/index.ts new file mode 100644 index 00000000..7b3dd4a0 --- /dev/null +++ b/packages/sourcing/src/files/index.ts @@ -0,0 +1,13 @@ + +export { default as Files } from './definitions/Files'; + +export { default as InvalidLocation } from './errors/InvalidLocation'; +export { default as FileNotFound } from './errors/FileNotFound'; + +export type { default as FileReader } from './interfaces/FileReader'; + +export { default as File } from './models/File'; + +export { default as FileManager } from './FileManager'; +export { default as LocalFileManager } from './LocalFileManager'; +export { default as RemoteFileManager } from './RemoteFileManager'; diff --git a/packages/sourcing/src/files/interfaces/FileReader.ts b/packages/sourcing/src/files/interfaces/FileReader.ts new file mode 100644 index 00000000..78294154 --- /dev/null +++ b/packages/sourcing/src/files/interfaces/FileReader.ts @@ -0,0 +1,13 @@ + +import type File from '../models/File'; + +interface FileReader +{ + filter(...patterns: string[]): Promise; + + exists(filename: string): Promise; + + read(filename: string): Promise; +} + +export default FileReader; diff --git a/packages/sourcing/src/interfaces/FileSystem.ts b/packages/sourcing/src/files/interfaces/FileSystem.ts similarity index 100% rename from packages/sourcing/src/interfaces/FileSystem.ts rename to packages/sourcing/src/files/interfaces/FileSystem.ts diff --git a/packages/sourcing/src/models/File.ts b/packages/sourcing/src/files/models/File.ts similarity index 100% rename from packages/sourcing/src/models/File.ts rename to packages/sourcing/src/files/models/File.ts diff --git a/packages/sourcing/src/index.ts b/packages/sourcing/src/index.ts index f624c05a..0bd3943e 100644 --- a/packages/sourcing/src/index.ts +++ b/packages/sourcing/src/index.ts @@ -1,10 +1,10 @@ -export { default as Files } from './definitions/Files'; -export { default as InvalidLocation } from './errors/InvalidLocation'; -export { default as FileNotFound } from './errors/FileNotFound'; -export { default as ModuleNotLoaded } from './errors/ModuleNotLoaded'; -export { default as File } from './models/File'; -export { default as Module } from './types/Module'; +export type { FileReader } from './files'; +export { Files, File, FileManager, LocalFileManager, RemoteFileManager, InvalidLocation, FileNotFound } from './files'; + +export type { Module, ModuleImporter } from './modules'; +export { ImportManager, ModuleNotLoaded } from './modules'; -export { default as FileManager } from './FileManager'; export { default as SourcingManager } from './SourcingManager'; +export { default as LocalSourcingManager } from './LocalSourcingManager'; +export { default as RemoteSourcingManager } from './RemoteSourcingManager'; diff --git a/packages/sourcing/src/modules/ImportManager.ts b/packages/sourcing/src/modules/ImportManager.ts new file mode 100644 index 00000000..b39b2a83 --- /dev/null +++ b/packages/sourcing/src/modules/ImportManager.ts @@ -0,0 +1,33 @@ + +import ModuleNotLoaded from './errors/ModuleNotLoaded'; +import ModuleImporter from './interfaces/ModuleImporter'; +import ModuleLocator from './interfaces/ModuleLocator'; +import Module from './types/Module'; + +export default class ImportManager implements ModuleImporter +{ + readonly #moduleLocator: ModuleLocator; + + constructor(moduleLocator: ModuleLocator) + { + this.#moduleLocator = moduleLocator; + } + + async import(filename: string): Promise + { + const location = this.#moduleLocator.locate(filename); + + try + { + // We must await here to catch and translate the error. + + return await import(location); + } + catch (error: unknown) + { + const message = error instanceof Error ? error.message : String(error); + + throw new ModuleNotLoaded(location, message); + } + } +} diff --git a/packages/sourcing/src/modules/LocalImportManager.ts b/packages/sourcing/src/modules/LocalImportManager.ts new file mode 100644 index 00000000..851a12b4 --- /dev/null +++ b/packages/sourcing/src/modules/LocalImportManager.ts @@ -0,0 +1,13 @@ + +import type { LocalFileManager } from '../files'; + +import ImportManager from './ImportManager'; +import LocalModuleLocator from './LocalModuleLocator'; + +export default class LocalImportManager extends ImportManager +{ + constructor(fileManager: LocalFileManager) + { + super(new LocalModuleLocator(fileManager)); + } +} diff --git a/packages/sourcing/src/modules/LocalModuleLocator.ts b/packages/sourcing/src/modules/LocalModuleLocator.ts new file mode 100644 index 00000000..a8df1859 --- /dev/null +++ b/packages/sourcing/src/modules/LocalModuleLocator.ts @@ -0,0 +1,24 @@ + +import FileManager from '../files/FileManager'; + +import ModuleLocator from './interfaces/ModuleLocator'; + +export default class LocalModuleLocator implements ModuleLocator +{ + readonly #fileManager: FileManager; + + constructor(fileManager: FileManager) + { + this.#fileManager = fileManager; + } + + locate(filename: string): string + { + // If the specifier is an absolute path, we need to convert it to a path + // relative to the cache folder. + + return filename.startsWith('/') + ? this.#fileManager.getAbsoluteLocation(`.${filename}`) + : this.#fileManager.getAbsoluteLocation(filename); + } +} diff --git a/packages/sourcing/src/modules/RemoteImportManager.ts b/packages/sourcing/src/modules/RemoteImportManager.ts new file mode 100644 index 00000000..12785a19 --- /dev/null +++ b/packages/sourcing/src/modules/RemoteImportManager.ts @@ -0,0 +1,12 @@ + +import ImportManager from './ImportManager'; +import RemoteModuleLocator from './RemoteModuleLocator'; + +export default class RemoteImportManager extends ImportManager +{ + // eslint-disable-next-line @typescript-eslint/no-unused-vars + constructor(location: string) + { + super(new RemoteModuleLocator(location)); + } +} diff --git a/packages/sourcing/src/modules/RemoteModuleLocator.ts b/packages/sourcing/src/modules/RemoteModuleLocator.ts new file mode 100644 index 00000000..2c805798 --- /dev/null +++ b/packages/sourcing/src/modules/RemoteModuleLocator.ts @@ -0,0 +1,22 @@ + +import ModuleNotLoaded from './errors/ModuleNotLoaded'; +import ModuleLocator from './interfaces/ModuleLocator'; + +export default class RemoteModuleLocator implements ModuleLocator +{ + // This is a placeholder class because remote module loading + // is currently not allowed due to security reasons. + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + constructor(location: string) + { + // This constructor is intentionally empty. + // In case we ever want to allow remote module loading, + // we need the location to be passed in. + } + + locate(filename: string): string + { + throw new ModuleNotLoaded(filename, 'Remote module loading is not allowed'); + } +} diff --git a/packages/sourcing/src/errors/ModuleNotLoaded.ts b/packages/sourcing/src/modules/errors/ModuleNotLoaded.ts similarity index 100% rename from packages/sourcing/src/errors/ModuleNotLoaded.ts rename to packages/sourcing/src/modules/errors/ModuleNotLoaded.ts diff --git a/packages/sourcing/src/modules/index.ts b/packages/sourcing/src/modules/index.ts new file mode 100644 index 00000000..a85c121e --- /dev/null +++ b/packages/sourcing/src/modules/index.ts @@ -0,0 +1,10 @@ + +export { default as ModuleNotLoaded } from './errors/ModuleNotLoaded'; + +export type { default as ModuleImporter } from './interfaces/ModuleImporter'; + +export { default as Module } from './types/Module'; + +export { default as ImportManager } from './ImportManager'; +export { default as LocalImportManager } from './LocalImportManager'; +export { default as RemoteImportManager } from './RemoteImportManager'; diff --git a/packages/sourcing/src/modules/interfaces/ModuleImporter.ts b/packages/sourcing/src/modules/interfaces/ModuleImporter.ts new file mode 100644 index 00000000..ae39a4bf --- /dev/null +++ b/packages/sourcing/src/modules/interfaces/ModuleImporter.ts @@ -0,0 +1,9 @@ + +import type Module from '../types/Module'; + +interface ModuleImporter +{ + import(filename: string): Promise; +} + +export default ModuleImporter; diff --git a/packages/sourcing/src/modules/interfaces/ModuleLocator.ts b/packages/sourcing/src/modules/interfaces/ModuleLocator.ts new file mode 100644 index 00000000..f1a19add --- /dev/null +++ b/packages/sourcing/src/modules/interfaces/ModuleLocator.ts @@ -0,0 +1,7 @@ + +interface ModuleLocator +{ + locate(filename: string): string; +} + +export default ModuleLocator; diff --git a/packages/sourcing/src/types/Module.ts b/packages/sourcing/src/modules/types/Module.ts similarity index 100% rename from packages/sourcing/src/types/Module.ts rename to packages/sourcing/src/modules/types/Module.ts diff --git a/packages/sourcing/test/fixtures/TestFileSystem.ts b/packages/sourcing/test/fixtures/TestFileSystem.ts index 96244158..f58c35ab 100644 --- a/packages/sourcing/test/fixtures/TestFileSystem.ts +++ b/packages/sourcing/test/fixtures/TestFileSystem.ts @@ -1,7 +1,7 @@ import path from 'path'; -import LocalFileSystem from '../../src/LocalFileSystem'; +import LocalFileSystem from '../../src/files/LocalFileSystem'; export default class TestFileSystem extends LocalFileSystem {