diff --git a/nx.json b/nx.json index ec6d827..0d65abd 100644 --- a/nx.json +++ b/nx.json @@ -27,6 +27,11 @@ }, "@nx/eslint:lint": { "inputs": ["default", "{workspaceRoot}/.eslintrc.json"] + }, + "@nx/js:tsc": { + "cache": true, + "dependsOn": ["^build"], + "inputs": ["production", "^production"] } }, "namedInputs": { diff --git a/package-lock.json b/package-lock.json index 45cbb73..d80e203 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,8 @@ "object-hash": "3.0.0", "tslib": "^2.3.0", "yaml": "2.8.0", - "yargs": "18.0.0" + "yargs": "18.0.0", + "zod": ">=3.22.0" }, "devDependencies": { "@commitlint/cli": "^19.8.1", @@ -35,6 +36,9 @@ "@nx/js": "21.6.4", "@nx/node": "21.6.4", "@nx/workspace": "21.6.4", + "@swc-node/register": "~1.9.1", + "@swc/core": "~1.5.7", + "@swc/helpers": "~0.5.11", "@types/jest": "30.0.0", "@types/lodash": "4.17.17", "@types/node": "^24.0.3", @@ -136,9 +140,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", - "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", "dev": true, "license": "MIT", "engines": { @@ -146,21 +150,21 @@ } }, "node_modules/@babel/core": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", - "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", + "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.3", + "@babel/generator": "^7.28.5", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.28.3", "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.4", + "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.4", - "@babel/types": "^7.28.4", + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -187,14 +191,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", - "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.3", - "@babel/types": "^7.28.2", + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -244,18 +248,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.3.tgz", - "integrity": "sha512-V9f6ZFIYSLNEbuGA/92uOvYsGCJNsuA8ESZ4ldc09bWk/j8H8TKiPw8Mk1eG6olpnO0ALHJmYfZvF4MEE4gajg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.5.tgz", + "integrity": "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", - "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", - "@babel/traverse": "^7.28.3", + "@babel/traverse": "^7.28.5", "semver": "^6.3.1" }, "engines": { @@ -276,14 +280,14 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.27.1.tgz", - "integrity": "sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz", + "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "regexpu-core": "^6.2.0", + "@babel/helper-annotate-as-pure": "^7.27.3", + "regexpu-core": "^6.3.1", "semver": "^6.3.1" }, "engines": { @@ -320,27 +324,6 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/@babel/helper-define-polyfill-provider/node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/@babel/helper-globals": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", @@ -352,14 +335,14 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz", - "integrity": "sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz", + "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -481,9 +464,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -530,13 +513,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", - "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.4" + "@babel/types": "^7.28.5" }, "bin": { "parser": "bin/babel-parser.js" @@ -546,14 +529,14 @@ } }, "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.27.1.tgz", - "integrity": "sha512-QPG3C9cCVRQLxAVwmefEmwdTanECuUBMQZ/ym5kiw3XKCGA7qkuQLcjWWHcrD/GKbn/WmJwaezfuuAOcyKlRPA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.28.5.tgz", + "integrity": "sha512-87GDMS3tsmMSi/3bWOte1UblL+YUTFMV8SZPZ2eSEL17s74Cw/l63rR6NmGVKMYW2GYi85nE+/d6Hw5N0bEk2Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1017,9 +1000,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.4.tgz", - "integrity": "sha512-1yxmvN0MJHOhPVmAsmoW5liWwoILobu/d/ShymZmj867bAdxGbehIrew1DuLpw2Ukv+qDSSPQdYW1dLNE7t11A==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.5.tgz", + "integrity": "sha512-45DmULpySVvmq9Pj3X9B+62Xe+DJGov27QravQJU1LLcapR6/10i+gYVAucGGJpHBp5mYxIMK4nDAT/QDLr47g==", "dev": true, "license": "MIT", "dependencies": { @@ -1105,14 +1088,14 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.0.tgz", - "integrity": "sha512-v1nrSMBiKcodhsyJ4Gf+Z0U/yawmJDBOTpEB3mcQY52r9RIyPneGyAS/yM6seP/8I+mWI3elOMtT5dB8GJVs+A==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz", + "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", - "@babel/traverse": "^7.28.0" + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1205,9 +1188,9 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.27.1.tgz", - "integrity": "sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.5.tgz", + "integrity": "sha512-D4WIMaFtwa2NizOp+dnoFjRez/ClKiC2BqqImwKd1X28nqBtZEyCYJ2ozQrrzlxAFrcrjxo39S6khe9RNDlGzw==", "dev": true, "license": "MIT", "dependencies": { @@ -1304,9 +1287,9 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.27.1.tgz", - "integrity": "sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.5.tgz", + "integrity": "sha512-axUuqnUTBuXyHGcJEVVh9pORaN6wC5bYfE7FGzPiaWa3syib9m7g+/IT/4VgCOe2Upef43PHzeAvcrVek6QuuA==", "dev": true, "license": "MIT", "dependencies": { @@ -1370,16 +1353,16 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.27.1.tgz", - "integrity": "sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.28.5.tgz", + "integrity": "sha512-vn5Jma98LCOeBy/KpeQhXcV2WZgaRUtjwQmjoBuLNlOmkg0fB5pdvYVeWRYI69wWKwK2cD1QbMiUQnoujWvrew==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-module-transforms": "^7.28.3", "@babel/helper-plugin-utils": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1524,9 +1507,9 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.27.1.tgz", - "integrity": "sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.5.tgz", + "integrity": "sha512-N6fut9IZlPnjPwgiQkXNhb+cT8wQKFlJNqcZkWlcTqkcqx6/kU4ynGmLFoa4LViBSirn05YAwk+sQBbPfxtYzQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1657,9 +1640,9 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.28.3.tgz", - "integrity": "sha512-Y6ab1kGqZ0u42Zv/4a7l0l72n9DKP/MKoKWaUSBylrhNZO2prYuqFOLbn5aW5SIFXwSH93yfjbgllL8lxuGKLg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.28.5.tgz", + "integrity": "sha512-20NUVgOrinudkIBzQ2bNxP08YpKprUkRTiRSd2/Z5GOdPImJGkoN4Z7IQe1T5AdyKI1i5L6RBmluqdSzvaq9/w==", "dev": true, "license": "MIT", "dependencies": { @@ -1769,14 +1752,14 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.0.tgz", - "integrity": "sha512-4AEiDEBPIZvLQaWlc9liCavE0xRM0dNca41WtBeM3jgFptfUOSG9z0uteLhq6+3rq+WB6jIvUwKDTpXEHPJ2Vg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.5.tgz", + "integrity": "sha512-x2Qa+v/CuEoX7Dr31iAfr0IhInrVOWZU/2vJMJ00FOR/2nM0BcBEclpaf9sWCDc+v5e9dMrhSH8/atq/kX7+bA==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", - "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-create-class-features-plugin": "^7.28.5", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1" @@ -1856,17 +1839,17 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.3.tgz", - "integrity": "sha512-ROiDcM+GbYVPYBOeCR6uBXKkQpBExLl8k9HO1ygXEyds39j+vCCsjmj7S8GOniZQlEs81QlkdJZe76IpLSiqpg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.5.tgz", + "integrity": "sha512-S36mOoi1Sb6Fz98fBfE+UZSpYw5mJm0NUHtIKrOuNcqeFauy1J6dIvXm2KRVKobOSaGq4t/hBXdN4HGU3wL9Wg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.28.0", + "@babel/compat-data": "^7.28.5", "@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", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.28.5", "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1", @@ -1879,42 +1862,42 @@ "@babel/plugin-transform-async-generator-functions": "^7.28.0", "@babel/plugin-transform-async-to-generator": "^7.27.1", "@babel/plugin-transform-block-scoped-functions": "^7.27.1", - "@babel/plugin-transform-block-scoping": "^7.28.0", + "@babel/plugin-transform-block-scoping": "^7.28.5", "@babel/plugin-transform-class-properties": "^7.27.1", "@babel/plugin-transform-class-static-block": "^7.28.3", - "@babel/plugin-transform-classes": "^7.28.3", + "@babel/plugin-transform-classes": "^7.28.4", "@babel/plugin-transform-computed-properties": "^7.27.1", - "@babel/plugin-transform-destructuring": "^7.28.0", + "@babel/plugin-transform-destructuring": "^7.28.5", "@babel/plugin-transform-dotall-regex": "^7.27.1", "@babel/plugin-transform-duplicate-keys": "^7.27.1", "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.27.1", "@babel/plugin-transform-dynamic-import": "^7.27.1", "@babel/plugin-transform-explicit-resource-management": "^7.28.0", - "@babel/plugin-transform-exponentiation-operator": "^7.27.1", + "@babel/plugin-transform-exponentiation-operator": "^7.28.5", "@babel/plugin-transform-export-namespace-from": "^7.27.1", "@babel/plugin-transform-for-of": "^7.27.1", "@babel/plugin-transform-function-name": "^7.27.1", "@babel/plugin-transform-json-strings": "^7.27.1", "@babel/plugin-transform-literals": "^7.27.1", - "@babel/plugin-transform-logical-assignment-operators": "^7.27.1", + "@babel/plugin-transform-logical-assignment-operators": "^7.28.5", "@babel/plugin-transform-member-expression-literals": "^7.27.1", "@babel/plugin-transform-modules-amd": "^7.27.1", "@babel/plugin-transform-modules-commonjs": "^7.27.1", - "@babel/plugin-transform-modules-systemjs": "^7.27.1", + "@babel/plugin-transform-modules-systemjs": "^7.28.5", "@babel/plugin-transform-modules-umd": "^7.27.1", "@babel/plugin-transform-named-capturing-groups-regex": "^7.27.1", "@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.28.0", + "@babel/plugin-transform-object-rest-spread": "^7.28.4", "@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", + "@babel/plugin-transform-optional-chaining": "^7.28.5", "@babel/plugin-transform-parameters": "^7.27.7", "@babel/plugin-transform-private-methods": "^7.27.1", "@babel/plugin-transform-private-property-in-object": "^7.27.1", "@babel/plugin-transform-property-literals": "^7.27.1", - "@babel/plugin-transform-regenerator": "^7.28.3", + "@babel/plugin-transform-regenerator": "^7.28.4", "@babel/plugin-transform-regexp-modifiers": "^7.27.1", "@babel/plugin-transform-reserved-words": "^7.27.1", "@babel/plugin-transform-shorthand-properties": "^7.27.1", @@ -1966,9 +1949,9 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.27.1.tgz", - "integrity": "sha512-l7WfQfX0WK4M0v2RudjuQK4u99BS6yLHYEmdtVPP7lKV013zr9DygFuWNlnbvQ9LR+LS0Egz/XAvGx5U9MX0fQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz", + "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==", "dev": true, "license": "MIT", "dependencies": { @@ -1976,7 +1959,7 @@ "@babel/helper-validator-option": "^7.27.1", "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-transform-modules-commonjs": "^7.27.1", - "@babel/plugin-transform-typescript": "^7.27.1" + "@babel/plugin-transform-typescript": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -2011,18 +1994,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", - "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.3", + "@babel/generator": "^7.28.5", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.4", + "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4", + "@babel/types": "^7.28.5", "debug": "^4.3.1" }, "engines": { @@ -2030,14 +2013,14 @@ } }, "node_modules/@babel/types": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", - "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -2517,22 +2500,6 @@ "node": ">= 6" } }, - "node_modules/@cypress/request/node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/@cypress/request/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -2544,9 +2511,9 @@ } }, "node_modules/@emnapi/core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", - "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.1.tgz", + "integrity": "sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==", "dev": true, "license": "MIT", "dependencies": { @@ -2555,9 +2522,9 @@ } }, "node_modules/@emnapi/runtime": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz", - "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", + "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==", "dev": true, "license": "MIT", "dependencies": { @@ -2594,9 +2561,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", "peer": true, @@ -2605,14 +2572,14 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", - "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", "dev": true, "license": "Apache-2.0", "peer": true, "dependencies": { - "@eslint/object-schema": "^2.1.6", + "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -2647,23 +2614,23 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.0.tgz", - "integrity": "sha512-WUFvV4WoIwW8Bv0KeKCIIEgdSiFOsulyN0xrMu+7z43q/hkOLXjvb5u7UC9jDxvRzcrbEmuZBX5yJZz1741jog==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", "dev": true, "license": "Apache-2.0", "peer": true, "dependencies": { - "@eslint/core": "^0.16.0" + "@eslint/core": "^0.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", - "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -2675,9 +2642,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz", + "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", "dev": true, "license": "MIT", "peer": true, @@ -2688,7 +2655,7 @@ "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, @@ -2744,9 +2711,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "peer": true, @@ -2780,9 +2747,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.37.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.37.0.tgz", - "integrity": "sha512-jaS+NJ+hximswBG6pjNX0uEJZkrT0zwpVi3BA3vX22aFGjJjmgSTSmPpZCRKmoBL5VY/M6p0xsSJx7rk7sy5gg==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", "dev": true, "license": "MIT", "peer": true, @@ -2794,9 +2761,9 @@ } }, "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -2805,14 +2772,14 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz", - "integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "license": "Apache-2.0", "peer": true, "dependencies": { - "@eslint/core": "^0.16.0", + "@eslint/core": "^0.17.0", "levn": "^0.4.1" }, "engines": { @@ -2886,13 +2853,13 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", - "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", "dev": true, "license": "MIT", "dependencies": { - "chardet": "^2.1.0", + "chardet": "^2.1.1", "iconv-lite": "^0.7.0" }, "engines": { @@ -2907,23 +2874,6 @@ } } }, - "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", - "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -2995,16 +2945,6 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -4054,37 +3994,37 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/@jest/expect/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@jest/expect/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jest/expect/node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@jest/expect/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/@jest/expect/node_modules/jest-snapshot": { @@ -4138,21 +4078,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/@jest/expect/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/@jest/fake-timers": { "version": "30.2.0", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.2.0.tgz", @@ -4915,9 +4840,9 @@ } }, "node_modules/@leancodepl/api-date": { - "version": "9.6.3", - "resolved": "https://registry.npmjs.org/@leancodepl/api-date/-/api-date-9.6.3.tgz", - "integrity": "sha512-NhycMZItnKDPNj262UFUnohwDECD6ySUW4v8BalEv6ECVdCs52EV3L/FWvwdBc5D40PQO0aHy67Z6aO5FDN95g==", + "version": "9.6.6", + "resolved": "https://registry.npmjs.org/@leancodepl/api-date/-/api-date-9.6.6.tgz", + "integrity": "sha512-dOCgvbJo2MdRHdh0eAQ0+oG7BR/ouQJHJVxe2DcvxU7FHtDMKXNvksdwie9WKIqsYdSGBsUjdRV5fS2AJrKueA==", "license": "Apache-2.0", "engines": { "node": ">=18.0.0" @@ -4943,6 +4868,10 @@ "resolved": "plugins/raw", "link": true }, + "node_modules/@leancodepl/contractsgenerator-typescript-plugin-zod": { + "resolved": "plugins/zod", + "link": true + }, "node_modules/@leancodepl/contractsgenerator-typescript-schema": { "resolved": "libs/schema", "link": true @@ -5007,12 +4936,12 @@ } }, "node_modules/@leancodepl/utils": { - "version": "9.6.3", - "resolved": "https://registry.npmjs.org/@leancodepl/utils/-/utils-9.6.3.tgz", - "integrity": "sha512-D4hAftVqDUkLkhqdexjF7VvNg92WJIXNsshO9rXFTaBQQuc1AB8M3JKj43x8QtaYY/0B72ed9wUQJaI3s3coBA==", + "version": "9.6.6", + "resolved": "https://registry.npmjs.org/@leancodepl/utils/-/utils-9.6.6.tgz", + "integrity": "sha512-dYrm2d3CPx4svHZW4F5HrJ5S2L0G1c3f4DQu22/7lT2sFkDFPuAcGmRO8h1CmpQjObjnqdCcAC5NWVjliSAXSg==", "license": "Apache-2.0", "dependencies": { - "@leancodepl/api-date": "9.6.3", + "@leancodepl/api-date": "9.6.6", "tiny-invariant": ">=1.3.1" }, "engines": { @@ -5117,22 +5046,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@lerna/create/node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz", - "integrity": "sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@emnapi/core": "^1.1.0", - "@emnapi/runtime": "^1.1.0", - "@tybys/wasm-util": "^0.9.0" - } - }, "node_modules/@lerna/create/node_modules/@nx/devkit": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.8.2.tgz", - "integrity": "sha512-rr9p2/tZDQivIpuBUpZaFBK6bZ+b5SAjZk75V4tbCUqGW3+5OPuVvBPm+X+7PYwUF6rwSpewxkjWNeGskfCe+Q==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.8.3.tgz", + "integrity": "sha512-5lbfJ6ICFOiGeirldQOU5fQ/W/VQ8L3dfWnmHG4UgpWSLoK/YFdRf4lTB4rS0aDXsBL0gyWABz3sZGLPGNYnPA==", "dev": true, "license": "MIT", "dependencies": { @@ -5166,9 +5083,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-darwin-arm64": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.8.2.tgz", - "integrity": "sha512-t+bmCn6sRPNGU6hnSyWNvbQYA/KgsxGZKYlaCLRwkNhI2akModcBUqtktJzCKd1XHDqs6EkEFBWjFr8/kBEkSg==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.8.3.tgz", + "integrity": "sha512-BeYnPAcnaerg6q+qR0bAb0nebwwrsvm4STSVqqVlaqLmmQpU3Bfpx44CEa5d6T9b0V11ZqVE/bkmRhMqhUcrhw==", "cpu": [ "arm64" ], @@ -5183,9 +5100,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-darwin-x64": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.8.2.tgz", - "integrity": "sha512-pt/wmDLM31Es8/EzazlyT5U+ou2l60rfMNFGCLqleHEQ0JUTc0KWnOciBLbHIQFiPsCQZJFEKyfV5V/ncePmmw==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.8.3.tgz", + "integrity": "sha512-RIFg1VkQ4jhI+ErqEZuIeGBcJGD8t+u9J5CdQBDIASd8QRhtudBkiYLYCJb+qaQly09G7nVfxuyItlS2uRW3qA==", "cpu": [ "x64" ], @@ -5200,9 +5117,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-freebsd-x64": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.8.2.tgz", - "integrity": "sha512-joZxFbgJfkHkB9uMIJr73Gpnm9pnpvr0XKGbWC409/d2x7q1qK77tKdyhGm+A3+kaZFwstNVPmCUtUwJYyU6LA==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.8.3.tgz", + "integrity": "sha512-boQTgMUdnqpZhHMrV/xgnp/dTg5dfxw8I4d16NBwmW4j+Sez7zi/dydgsJpfZsj8TicOHvPu6KK4W5wzp82NPw==", "cpu": [ "x64" ], @@ -5217,9 +5134,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.8.2.tgz", - "integrity": "sha512-98O/qsxn4vIMPY/FyzvmVrl7C5yFhCUVk0/4PF+PA2SvtQ051L1eMRY6bq/lb69qfN6szJPZ41PG5mPx0NeLZw==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.8.3.tgz", + "integrity": "sha512-wpiNyY1igx1rLN3EsTLum2lDtblFijdBZB9/9u/6UDub4z9CaQ4yaC4h9n5v7yFYILwfL44YTsQKzrE+iv0y1Q==", "cpu": [ "arm" ], @@ -5234,9 +5151,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm64-gnu": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.8.2.tgz", - "integrity": "sha512-h6a+HxwfSpxsi4KpxGgPh9GDBmD2E+XqGCdfYpobabxqEBvlnIlJyuDhlRR06cTWpuNXHpRdrVogmV6m/YbtDg==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.8.3.tgz", + "integrity": "sha512-nbi/eZtJfWxuDwdUCiP+VJolFubtrz6XxVtB26eMAkODnREOKELHZtMOrlm8JBZCdtWCvTqibq9Az74XsqSfdA==", "cpu": [ "arm64" ], @@ -5251,9 +5168,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm64-musl": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.8.2.tgz", - "integrity": "sha512-4Ev+jM0VAxDHV/dFgMXjQTCXS4I8W4oMe7FSkXpG8RUn6JK659DC8ExIDPoGIh+Cyqq6r6mw1CSia+ciQWICWQ==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.8.3.tgz", + "integrity": "sha512-LTTGzI8YVPlF1v0YlVf+exM+1q7rpsiUbjTTHJcfHFRU5t4BsiZD54K19Y1UBg1XFx5cwhEaIomSmJ88RwPPVQ==", "cpu": [ "arm64" ], @@ -5268,9 +5185,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-x64-gnu": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.8.2.tgz", - "integrity": "sha512-nR0ev+wxu+nQYRd7bhqggOxK7UfkV6h+Ko1mumUFyrM5GvPpz/ELhjJFSnMcOkOMcvH0b6G5uTBJvN1XWCkbmg==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.8.3.tgz", + "integrity": "sha512-SlA4GtXvQbSzSIWLgiIiLBOjdINPOUR/im+TUbaEMZ8wiGrOY8cnk0PVt95TIQJVBeXBCeb5HnoY0lHJpMOODg==", "cpu": [ "x64" ], @@ -5285,9 +5202,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-x64-musl": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.8.2.tgz", - "integrity": "sha512-ost41l5yc2aq2Gc9bMMpaPi/jkXqbXEMEPHrxWKuKmaek3K2zbVDQzvBBNcQKxf/mlCsrqN4QO0mKYSRRqag5A==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.8.3.tgz", + "integrity": "sha512-MNzkEwPktp5SQH9dJDH2wP9hgG9LsBDhKJXJfKw6sUI/6qz5+/aAjFziKy+zBnhU4AO1yXt5qEWzR8lDcIriVQ==", "cpu": [ "x64" ], @@ -5302,9 +5219,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-win32-arm64-msvc": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.8.2.tgz", - "integrity": "sha512-0SEOqT/daBG5WtM9vOGilrYaAuf1tiALdrFavY62+/arXYxXemUKmRI5qoKDTnvoLMBGkJs6kxhMO5b7aUXIvQ==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.8.3.tgz", + "integrity": "sha512-qUV7CyXKwRCM/lkvyS6Xa1MqgAuK5da6w27RAehh7LATBUKn1I4/M7DGn6L7ERCxpZuh1TrDz9pUzEy0R+Ekkg==", "cpu": [ "arm64" ], @@ -5319,9 +5236,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-win32-x64-msvc": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.8.2.tgz", - "integrity": "sha512-iIsY+tVqes/NOqTbJmggL9Juie/iaDYlWgXA9IUv88FE9thqWKhVj4/tCcPjsOwzD+1SVna3YISEEFsx5UV4ew==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.8.3.tgz", + "integrity": "sha512-gX1G8u6W6EPX6PO/wv07+B++UHyCHBXyVWXITA3Kv6HoSajOxIa2Kk1rv1iDQGmX1WWxBaj3bUyYJAFBDITe4w==", "cpu": [ "x64" ], @@ -5342,16 +5259,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@lerna/create/node_modules/@tybys/wasm-util": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", - "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@lerna/create/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -5431,21 +5338,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/@lerna/create/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, "node_modules/@lerna/create/node_modules/get-stream": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", @@ -5545,27 +5437,6 @@ "concat-map": "0.0.1" } }, - "node_modules/@lerna/create/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/@lerna/create/node_modules/npm-package-arg": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz", @@ -5583,9 +5454,9 @@ } }, "node_modules/@lerna/create/node_modules/nx": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/nx/-/nx-20.8.2.tgz", - "integrity": "sha512-mDKpbH3vEpUFDx0rrLh+tTqLq1PYU8KiD/R7OVZGd1FxQxghx2HOl32MiqNsfPcw6AvKlXhslbwIESV+N55FLQ==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/nx/-/nx-20.8.3.tgz", + "integrity": "sha512-8w815WSMWar3A/LFzwtmEY+E8cVW62lMiFuPDXje+C8O8hFndfvscP56QHNMn2Zdhz3q0+BZUe+se4Em1BKYdA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -5630,16 +5501,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.8.2", - "@nx/nx-darwin-x64": "20.8.2", - "@nx/nx-freebsd-x64": "20.8.2", - "@nx/nx-linux-arm-gnueabihf": "20.8.2", - "@nx/nx-linux-arm64-gnu": "20.8.2", - "@nx/nx-linux-arm64-musl": "20.8.2", - "@nx/nx-linux-x64-gnu": "20.8.2", - "@nx/nx-linux-x64-musl": "20.8.2", - "@nx/nx-win32-arm64-msvc": "20.8.2", - "@nx/nx-win32-x64-msvc": "20.8.2" + "@nx/nx-darwin-arm64": "20.8.3", + "@nx/nx-darwin-x64": "20.8.3", + "@nx/nx-freebsd-x64": "20.8.3", + "@nx/nx-linux-arm-gnueabihf": "20.8.3", + "@nx/nx-linux-arm64-gnu": "20.8.3", + "@nx/nx-linux-arm64-musl": "20.8.3", + "@nx/nx-linux-x64-gnu": "20.8.3", + "@nx/nx-linux-x64-musl": "20.8.3", + "@nx/nx-win32-arm64-msvc": "20.8.3", + "@nx/nx-win32-x64-msvc": "20.8.3" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -5748,6 +5619,16 @@ "node": ">=8" } }, + "node_modules/@lerna/create/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/@lerna/create/node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", @@ -5765,29 +5646,19 @@ "node": ">=6" } }, - "node_modules/@lerna/create/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@lerna/create/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/@lerna/create/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "node_modules/@lerna/create/node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", "dev": true, "license": "MIT", "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, "node_modules/@lerna/create/node_modules/yargs": { @@ -5809,6 +5680,18 @@ "node": ">=12" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz", + "integrity": "sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@emnapi/core": "^1.1.0", + "@emnapi/runtime": "^1.1.0", + "@tybys/wasm-util": "^0.9.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -7071,13 +6954,312 @@ "@sinonjs/commons": "^3.0.1" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "node_modules/@swc-node/register": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@swc-node/register/-/register-1.9.2.tgz", + "integrity": "sha512-BBjg0QNuEEmJSoU/++JOXhrjWdu3PTyYeJWsvchsI0Aqtj8ICkz/DqlwtXbmZVZ5vuDPpTfFlwDBZe81zgShMA==", "dev": true, - "license": "MIT" - }, + "license": "MIT", + "dependencies": { + "@swc-node/core": "^1.13.1", + "@swc-node/sourcemap-support": "^0.5.0", + "colorette": "^2.0.20", + "debug": "^4.3.4", + "pirates": "^4.0.6", + "tslib": "^2.6.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@swc/core": ">= 1.4.13", + "typescript": ">= 4.3" + } + }, + "node_modules/@swc-node/register/node_modules/@swc-node/core": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@swc-node/core/-/core-1.14.1.tgz", + "integrity": "sha512-jrt5GUaZUU6cmMS+WTJEvGvaB6j1YNKPHPzC2PUi2BjaFbtxURHj6641Az6xN7b665hNniAIdvjxWcRml5yCnw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@swc/core": ">= 1.13.3", + "@swc/types": ">= 0.1" + } + }, + "node_modules/@swc-node/sourcemap-support": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@swc-node/sourcemap-support/-/sourcemap-support-0.5.1.tgz", + "integrity": "sha512-JxIvIo/Hrpv0JCHSyRpetAdQ6lB27oFYhv0PKCNf1g2gUXOjpeR1exrXccRxLMuAV5WAmGFBwRnNOJqN38+qtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map-support": "^0.5.21", + "tslib": "^2.6.3" + } + }, + "node_modules/@swc-node/sourcemap-support/node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/@swc/core": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.5.29.tgz", + "integrity": "sha512-nvTtHJI43DUSOAf3h9XsqYg8YXKc0/N4il9y4j0xAkO0ekgDNo+3+jbw6MInawjKJF9uulyr+f5bAutTsOKVlw==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.8" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.5.29", + "@swc/core-darwin-x64": "1.5.29", + "@swc/core-linux-arm-gnueabihf": "1.5.29", + "@swc/core-linux-arm64-gnu": "1.5.29", + "@swc/core-linux-arm64-musl": "1.5.29", + "@swc/core-linux-x64-gnu": "1.5.29", + "@swc/core-linux-x64-musl": "1.5.29", + "@swc/core-win32-arm64-msvc": "1.5.29", + "@swc/core-win32-ia32-msvc": "1.5.29", + "@swc/core-win32-x64-msvc": "1.5.29" + }, + "peerDependencies": { + "@swc/helpers": "*" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.29.tgz", + "integrity": "sha512-6F/sSxpHaq3nzg2ADv9FHLi4Fu2A8w8vP8Ich8gIl16D2htStlwnaPmCLjRswO+cFkzgVqy/l01gzNGWd4DFqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.5.29.tgz", + "integrity": "sha512-rF/rXkvUOTdTIfoYbmszbSUGsCyvqACqy1VeP3nXONS+LxFl4bRmRcUTRrblL7IE5RTMCKUuPbqbQSE2hK7bqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.5.29.tgz", + "integrity": "sha512-2OAPL8iWBsmmwkjGXqvuUhbmmoLxS1xNXiMq87EsnCNMAKohGc7wJkdAOUL6J/YFpean/vwMWg64rJD4pycBeg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.5.29.tgz", + "integrity": "sha512-eH/Q9+8O5qhSxMestZnhuS1xqQMr6M7SolZYxiXJqxArXYILLCF+nq2R9SxuMl0CfjHSpb6+hHPk/HXy54eIRA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.5.29.tgz", + "integrity": "sha512-TERh2OICAJz+SdDIK9+0GyTUwF6r4xDlFmpoiHKHrrD/Hh3u+6Zue0d7jQ/he/i80GDn4tJQkHlZys+RZL5UZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.5.29.tgz", + "integrity": "sha512-WMDPqU7Ji9dJpA+Llek2p9t7pcy7Bob8ggPUvgsIlv3R/eesF9DIzSbrgl6j3EAEPB9LFdSafsgf6kT/qnvqFg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.5.29.tgz", + "integrity": "sha512-DO14glwpdKY4POSN0201OnGg1+ziaSVr6/RFzuSLggshwXeeyVORiHv3baj7NENhJhWhUy3NZlDsXLnRFkmhHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.5.29.tgz", + "integrity": "sha512-V3Y1+a1zG1zpYXUMqPIHEMEOd+rHoVnIpO/KTyFwAmKVu8v+/xPEVx/AGoYE67x4vDAAvPQrKI3Aokilqa5yVg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.5.29.tgz", + "integrity": "sha512-OrM6yfXw4wXhnVFosOJzarw0Fdz5Y0okgHfn9oFbTPJhoqxV5Rdmd6kXxWu2RiVKs6kGSJFZXHDeUq2w5rTIMg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.5.29.tgz", + "integrity": "sha512-eD/gnxqKyZQQR0hR7TMkIlJ+nCF9dzYmVVNbYZWuA1Xy94aBPUsEk3Uw3oG7q6R3ErrEUPP0FNf2ztEnv+I+dw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@swc/helpers": { + "version": "0.5.17", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", + "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@swc/types": { + "version": "0.1.25", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz", + "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", @@ -7140,12 +7322,11 @@ } }, "node_modules/@tybys/wasm-util": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", - "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", + "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "tslib": "^2.4.0" } @@ -7196,9 +7377,9 @@ } }, "node_modules/@types/conventional-commits-parser": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.1.tgz", - "integrity": "sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.2.tgz", + "integrity": "sha512-BgT2szDXnVypgpNxOK8aL5SGjUdaQbC++WZNjF1Qge3Og2+zhHj+RWhmehLhYyvQwqAmvezruVfOf8+3m74W+g==", "dev": true, "license": "MIT", "dependencies": { @@ -7251,21 +7432,6 @@ "pretty-format": "^30.0.0" } }, - "node_modules/@types/jest/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/@types/jsdom": { "version": "21.1.7", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz", @@ -7340,12 +7506,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.7.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.2.tgz", - "integrity": "sha512-/NbVmcGTP+lj5oa4yiYxxeBjRivKQ5Ns1eSZeB99ExsEQ6rX5XYU1Zy/gGxY/ilqtD4Etx9mKyrPxZRetiahhA==", + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "license": "MIT", "dependencies": { - "undici-types": "~7.14.0" + "undici-types": "~7.16.0" } }, "node_modules/@types/normalize-package-data": { @@ -7384,9 +7550,9 @@ "license": "MIT" }, "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", "dev": true, "license": "MIT", "dependencies": { @@ -7401,18 +7567,18 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.0.tgz", - "integrity": "sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.48.1.tgz", + "integrity": "sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.46.0", - "@typescript-eslint/type-utils": "8.46.0", - "@typescript-eslint/utils": "8.46.0", - "@typescript-eslint/visitor-keys": "8.46.0", + "@typescript-eslint/scope-manager": "8.48.1", + "@typescript-eslint/type-utils": "8.48.1", + "@typescript-eslint/utils": "8.48.1", + "@typescript-eslint/visitor-keys": "8.48.1", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -7426,7 +7592,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.46.0", + "@typescript-eslint/parser": "^8.48.1", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } @@ -7443,17 +7609,17 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.0.tgz", - "integrity": "sha512-n1H6IcDhmmUEG7TNVSspGmiHHutt7iVKtZwRppD7e04wha5MrkV1h3pti9xQLcCMt6YWsncpoT0HMjkH1FNwWQ==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.48.1.tgz", + "integrity": "sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.46.0", - "@typescript-eslint/types": "8.46.0", - "@typescript-eslint/typescript-estree": "8.46.0", - "@typescript-eslint/visitor-keys": "8.46.0", + "@typescript-eslint/scope-manager": "8.48.1", + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/typescript-estree": "8.48.1", + "@typescript-eslint/visitor-keys": "8.48.1", "debug": "^4.3.4" }, "engines": { @@ -7469,14 +7635,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.0.tgz", - "integrity": "sha512-OEhec0mH+U5Je2NZOeK1AbVCdm0ChyapAyTeXVIYTPXDJ3F07+cu87PPXcGoYqZ7M9YJVvFnfpGg1UmCIqM+QQ==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.48.1.tgz", + "integrity": "sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.46.0", - "@typescript-eslint/types": "^8.46.0", + "@typescript-eslint/tsconfig-utils": "^8.48.1", + "@typescript-eslint/types": "^8.48.1", "debug": "^4.3.4" }, "engines": { @@ -7491,14 +7657,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.0.tgz", - "integrity": "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.48.1.tgz", + "integrity": "sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.0", - "@typescript-eslint/visitor-keys": "8.46.0" + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/visitor-keys": "8.48.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7509,9 +7675,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.0.tgz", - "integrity": "sha512-WrYXKGAHY836/N7zoK/kzi6p8tXFhasHh8ocFL9VZSAkvH956gfeRfcnhs3xzRy8qQ/dq3q44v1jvQieMFg2cw==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.48.1.tgz", + "integrity": "sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==", "dev": true, "license": "MIT", "engines": { @@ -7526,15 +7692,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.0.tgz", - "integrity": "sha512-hy+lvYV1lZpVs2jRaEYvgCblZxUoJiPyCemwbQZ+NGulWkQRy0HRPYAoef/CNSzaLt+MLvMptZsHXHlkEilaeg==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.48.1.tgz", + "integrity": "sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.0", - "@typescript-eslint/typescript-estree": "8.46.0", - "@typescript-eslint/utils": "8.46.0", + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/typescript-estree": "8.48.1", + "@typescript-eslint/utils": "8.48.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -7551,9 +7717,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz", - "integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.48.1.tgz", + "integrity": "sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==", "dev": true, "license": "MIT", "engines": { @@ -7565,21 +7731,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.0.tgz", - "integrity": "sha512-ekDCUfVpAKWJbRfm8T1YRrCot1KFxZn21oV76v5Fj4tr7ELyk84OS+ouvYdcDAwZL89WpEkEj2DKQ+qg//+ucg==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.48.1.tgz", + "integrity": "sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.46.0", - "@typescript-eslint/tsconfig-utils": "8.46.0", - "@typescript-eslint/types": "8.46.0", - "@typescript-eslint/visitor-keys": "8.46.0", + "@typescript-eslint/project-service": "8.48.1", + "@typescript-eslint/tsconfig-utils": "8.48.1", + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/visitor-keys": "8.48.1", "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", + "tinyglobby": "^0.2.15", "ts-api-utils": "^2.1.0" }, "engines": { @@ -7610,16 +7775,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.0.tgz", - "integrity": "sha512-nD6yGWPj1xiOm4Gk0k6hLSZz2XkNXhuYmyIrOWcHoPuAhjT9i5bAG+xbWPgFeNR8HPHHtpNKdYUXJl/D3x7f5g==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.48.1.tgz", + "integrity": "sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.46.0", - "@typescript-eslint/types": "8.46.0", - "@typescript-eslint/typescript-estree": "8.46.0" + "@typescript-eslint/scope-manager": "8.48.1", + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/typescript-estree": "8.48.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7634,13 +7799,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.0.tgz", - "integrity": "sha512-FrvMpAK+hTbFy7vH5j1+tMYHMSKLE6RzluFJlkFNKD0p9YsUT75JlBSmr5so3QRzvMwU5/bIEdeNrxm8du8l3Q==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.48.1.tgz", + "integrity": "sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/types": "8.48.1", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -7911,6 +8076,17 @@ "@tybys/wasm-util": "^0.10.0" } }, + "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", @@ -8286,13 +8462,6 @@ "url": "https://opencollective.com/verdaccio" } }, - "node_modules/@verdaccio/logger-commons/node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, - "license": "MIT" - }, "node_modules/@verdaccio/logger-commons/node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", @@ -8332,20 +8501,6 @@ "url": "https://opencollective.com/verdaccio" } }, - "node_modules/@verdaccio/logger-prettify/node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@verdaccio/logger-prettify/node_modules/dayjs": { - "version": "1.11.13", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", - "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", - "dev": true, - "license": "MIT" - }, "node_modules/@verdaccio/middleware": { "version": "8.0.0-next-8.16", "resolved": "https://registry.npmjs.org/@verdaccio/middleware/-/middleware-8.0.0-next-8.16.tgz", @@ -8500,21 +8655,6 @@ "url": "https://opencollective.com/verdaccio" } }, - "node_modules/@verdaccio/tarball/node_modules/b4a": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", - "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", - "dev": true, - "license": "Apache-2.0", - "peerDependencies": { - "react-native-b4a": "*" - }, - "peerDependenciesMeta": { - "react-native-b4a": { - "optional": true - } - } - }, "node_modules/@verdaccio/tarball/node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", @@ -8710,6 +8850,16 @@ "node": ">= 0.6" } }, + "node_modules/accepts/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -8934,6 +9084,16 @@ "dev": true, "license": "Python-2.0" }, + "node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", @@ -9255,9 +9415,9 @@ } }, "node_modules/axios": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", - "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", + "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", "dev": true, "license": "MIT", "dependencies": { @@ -9276,6 +9436,21 @@ "node": ">= 0.4" } }, + "node_modules/b4a": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", + "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } + }, "node_modules/babel-jest": { "version": "30.2.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.2.0.tgz", @@ -9315,116 +9490,55 @@ } }, "node_modules/babel-jest/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/babel-plugin-const-enum": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-const-enum/-/babel-plugin-const-enum-1.2.0.tgz", - "integrity": "sha512-o1m/6iyyFnp9MRsK1dHF3bneqyf3AlM2q3A/YbgQr2pCat6B6XJVDv2TXqzfY2RYUi4mak6WAksSBPlyYGx9dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-typescript": "^7.3.3", - "@babel/traverse": "^7.16.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz", - "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==", - "dev": true, - "license": "BSD-3-Clause", - "workspaces": [ - "test/babel-8" - ], - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-instrument": "^6.0.2", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": "*" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/babel-plugin-istanbul/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/babel-plugin-const-enum": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-const-enum/-/babel-plugin-const-enum-1.2.0.tgz", + "integrity": "sha512-o1m/6iyyFnp9MRsK1dHF3bneqyf3AlM2q3A/YbgQr2pCat6B6XJVDv2TXqzfY2RYUi4mak6WAksSBPlyYGx9dg==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "brace-expansion": "^1.1.7" + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-typescript": "^7.3.3", + "@babel/traverse": "^7.16.0" }, - "engines": { - "node": "*" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/babel-plugin-istanbul/node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "node_modules/babel-plugin-istanbul": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz", + "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==", "dev": true, - "license": "ISC", + "license": "BSD-3-Clause", + "workspaces": [ + "test/babel-8" + ], "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-instrument": "^6.0.2", + "test-exclude": "^6.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/babel-plugin-jest-hoist": { @@ -9597,9 +9711,9 @@ "license": "MIT" }, "node_modules/bare-events": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.0.tgz", - "integrity": "sha512-AOhh6Bg5QmFIXdViHbMc2tLDsBIRxdkIaIddPslJF9Z5De3APBScuqGP2uThXnIpqFrgoxMNC6km7uXNIMLHXA==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz", + "integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==", "dev": true, "license": "Apache-2.0", "peerDependencies": { @@ -9633,9 +9747,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.16", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.16.tgz", - "integrity": "sha512-OMu3BGQ4E7P1ErFsIPpbJh0qvDudM/UuJeHgkAvfWe+0HFJCXh+t/l8L6fVLR55RI/UbKrVLnAXZSVwd9ysWYw==", + "version": "2.8.32", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.32.tgz", + "integrity": "sha512-OPz5aBThlyLFgxyhdwf/s2+8ab3OvT7AdTNvKHBwpXomIYeXqpUUuT8LrdtxZSsWJ4R4CU1un4XGh5Ez3nlTpw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -9771,6 +9885,22 @@ "dev": true, "license": "MIT" }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/brace-expansion": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", @@ -9805,9 +9935,9 @@ } }, "node_modules/browserslist": { - "version": "4.26.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", - "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", + "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", "dev": true, "funding": [ { @@ -9825,11 +9955,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.9", - "caniuse-lite": "^1.0.30001746", - "electron-to-chromium": "^1.5.227", - "node-releases": "^2.0.21", - "update-browserslist-db": "^1.1.3" + "baseline-browser-mapping": "^2.8.25", + "caniuse-lite": "^1.0.30001754", + "electron-to-chromium": "^1.5.249", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.1.4" }, "bin": { "browserslist": "cli.js" @@ -10100,16 +10230,13 @@ } }, "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, "node_modules/camelcase-keys": { @@ -10130,20 +10257,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/camelcase-keys/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/caniuse-lite": { - "version": "1.0.30001750", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001750.tgz", - "integrity": "sha512-cuom0g5sdX6rw00qOoLNSFCJ9/mYIsuSOA+yzpDw8eopiFqcVwQvZHqov0vmEighRxX++cfC0Vg1G+1Iy/mSpQ==", + "version": "1.0.30001757", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz", + "integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==", "dev": true, "funding": [ { @@ -10221,9 +10338,9 @@ } }, "node_modules/chardet": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", - "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", "dev": true, "license": "MIT" }, @@ -10254,9 +10371,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.0.tgz", - "integrity": "sha512-UX0OwmYRYQQetfrLEZeewIFFI+wSTofC+pMBLNuH3RUuu/xzG1oz84UCEDOSoQlN3fZ4+AzmV50ZYvGqkMh9yA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.1.tgz", + "integrity": "sha512-+CmxIZ/L2vNcEfvNtLdU0ZQ6mbq3FZnwAP2PPTiKP+1QOoKwlKlPgb8UKV0Dds7QVaMnHm+FwSft2VB0s/SLjQ==", "dev": true, "license": "MIT" }, @@ -10417,19 +10534,6 @@ "node": ">=6" } }, - "node_modules/clone-deep/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -10462,9 +10566,9 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", "dev": true, "license": "MIT" }, @@ -10498,6 +10602,13 @@ "color-support": "bin.js" } }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, "node_modules/columnify": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", @@ -10525,6 +10636,13 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, "node_modules/common-ancestor-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", @@ -10592,16 +10710,6 @@ "dev": true, "license": "MIT" }, - "node_modules/compression/node_modules/negotiator": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", - "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -11802,13 +11910,13 @@ } }, "node_modules/core-js-compat": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", - "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.47.0.tgz", + "integrity": "sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==", "dev": true, "license": "MIT", "dependencies": { - "browserslist": "^4.26.3" + "browserslist": "^4.28.0" }, "funding": { "type": "opencollective", @@ -11892,9 +12000,9 @@ } }, "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { @@ -12077,6 +12185,13 @@ "node": "*" } }, + "node_modules/dayjs": { + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", + "dev": true, + "license": "MIT" + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -13180,9 +13295,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.234", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.234.tgz", - "integrity": "sha512-RXfEp2x+VRYn8jbKfQlRImzoJU01kyDvVPBmG39eU2iuRVhuS6vQNocB8J0/8GrIMLnPzgz4eW6WiRnJkTuNWg==", + "version": "1.5.263", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.263.tgz", + "integrity": "sha512-DrqJ11Knd+lo+dv+lltvfMDLU27g14LMdH2b0O3Pio4uk0x+z7OR+JrmyacTPN2M8w3BrZ7/RTwG3R9B7irPlg==", "dev": true, "license": "ISC" }, @@ -13227,6 +13342,20 @@ "iconv-lite": "^0.6.2" } }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/end-of-stream": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", @@ -13251,9 +13380,9 @@ } }, "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -13599,26 +13728,25 @@ } }, "node_modules/eslint": { - "version": "9.37.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.37.0.tgz", - "integrity": "sha512-XyLmROnACWqSxiGYArdef1fItQd47weqB7iwtfr9JHwRrqIXZdcFMvvEcL9xHCmL0SNsOvF0c42lWyM1U5dgig==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.0", - "@eslint/config-helpers": "^0.4.0", - "@eslint/core": "^0.16.0", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.37.0", - "@eslint/plugin-kit": "^0.4.0", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", @@ -13782,19 +13910,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -13818,29 +13933,6 @@ "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-import/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", @@ -13871,16 +13963,6 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" } }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -13989,17 +14071,17 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.0.0.tgz", - "integrity": "sha512-fNXaOwvKwq2+pXiRpXc825Vd63+KM4DLL40Rtlycb8m7fYpp6efrTp1sa6ZbP/Ap58K2bEKFXRmhURE+CJAQWw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.0.1.tgz", + "integrity": "sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.24.4", "@babel/parser": "^7.24.4", "hermes-parser": "^0.25.1", - "zod": "^3.22.4 || ^4.0.0", - "zod-validation-error": "^3.0.3 || ^4.0.0" + "zod": "^3.25.0 || ^4.0.0", + "zod-validation-error": "^3.5.0 || ^4.0.0" }, "engines": { "node": ">=18" @@ -14065,9 +14147,9 @@ } }, "node_modules/eslint-plugin-unused-imports": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.2.0.tgz", - "integrity": "sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.3.0.tgz", + "integrity": "sha512-ZFBmXMGBYfHttdRtOG9nFFpmUvMtbHSjsKrS20vdWdbfiVYsO3yA2SGYy9i9XmZJDfMGBflZGBCm70SEnFQtOA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -14630,6 +14712,22 @@ "dev": true, "license": "MIT" }, + "node_modules/express/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -15077,9 +15175,9 @@ } }, "node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "dev": true, "license": "MIT", "dependencies": { @@ -15141,6 +15239,21 @@ "dev": true, "license": "MIT" }, + "node_modules/fs-extra": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", @@ -15886,9 +15999,9 @@ "license": "ISC" }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, "license": "ISC", "dependencies": { @@ -15952,9 +16065,9 @@ } }, "node_modules/globals": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", - "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", "dev": true, "license": "MIT", "engines": { @@ -16297,6 +16410,19 @@ "dev": true, "license": "ISC" }, + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -16405,9 +16531,9 @@ } }, "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", "dev": true, "license": "MIT", "dependencies": { @@ -16415,6 +16541,10 @@ }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/identity-obj-proxy": { @@ -16751,9 +16881,9 @@ } }, "node_modules/ip-address": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", - "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", "dev": true, "license": "MIT", "engines": { @@ -17183,6 +17313,19 @@ "node": ">=0.10.0" } }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -17738,37 +17881,37 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-circus/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-circus/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-circus/node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-circus/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/jest-circus/node_modules/jest-runtime": { @@ -17856,21 +17999,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-circus/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/jest-cli": { "version": "30.0.5", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.0.5.tgz", @@ -18608,37 +18736,50 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-config/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-config/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "color-convert": "^2.0.1" }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-config/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-config/node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-config/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/jest-config/node_modules/jest-leak-detector": { @@ -18812,21 +18953,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-config/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/jest-config/node_modules/source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -18854,24 +18980,7 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-diff/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/chalk/node_modules/ansi-styles": { + "node_modules/jest-diff/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", @@ -18887,19 +18996,21 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-diff/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "node_modules/jest-diff/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/jest-docblock": { @@ -18932,37 +19043,37 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-each/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-each/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-each/node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-each/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/jest-each/node_modules/jest-util": { @@ -18983,21 +19094,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-each/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/jest-environment-jsdom": { "version": "30.0.5", "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-30.0.5.tgz", @@ -19208,6 +19304,19 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/jest-environment-node/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jest-environment-node/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -19261,34 +19370,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-environment-node/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-get-type": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", @@ -19430,24 +19511,7 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-matcher-utils/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/chalk/node_modules/ansi-styles": { + "node_modules/jest-matcher-utils/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", @@ -19463,19 +19527,21 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-matcher-utils/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "node_modules/jest-matcher-utils/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/jest-message-util": { @@ -19499,24 +19565,7 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-message-util/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/chalk/node_modules/ansi-styles": { + "node_modules/jest-message-util/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", @@ -19532,19 +19581,21 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-message-util/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "node_modules/jest-message-util/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/jest-mock": { @@ -19691,6 +19742,19 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/jest-resolve/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jest-resolve/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -19744,34 +19808,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-resolve/node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-resolve/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-runner": { "version": "30.0.5", "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.0.5.tgz", @@ -20872,6 +20908,19 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jest-validate/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -21242,9 +21291,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -21362,32 +21411,6 @@ } } }, - "node_modules/jsdom/node_modules/html-encoding-sniffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", - "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^3.1.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/jsdom/node_modules/whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -21827,22 +21850,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/lerna/node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz", - "integrity": "sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@emnapi/core": "^1.1.0", - "@emnapi/runtime": "^1.1.0", - "@tybys/wasm-util": "^0.9.0" - } - }, "node_modules/lerna/node_modules/@nx/devkit": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.8.2.tgz", - "integrity": "sha512-rr9p2/tZDQivIpuBUpZaFBK6bZ+b5SAjZk75V4tbCUqGW3+5OPuVvBPm+X+7PYwUF6rwSpewxkjWNeGskfCe+Q==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.8.3.tgz", + "integrity": "sha512-5lbfJ6ICFOiGeirldQOU5fQ/W/VQ8L3dfWnmHG4UgpWSLoK/YFdRf4lTB4rS0aDXsBL0gyWABz3sZGLPGNYnPA==", "dev": true, "license": "MIT", "dependencies": { @@ -21876,9 +21887,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-darwin-arm64": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.8.2.tgz", - "integrity": "sha512-t+bmCn6sRPNGU6hnSyWNvbQYA/KgsxGZKYlaCLRwkNhI2akModcBUqtktJzCKd1XHDqs6EkEFBWjFr8/kBEkSg==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.8.3.tgz", + "integrity": "sha512-BeYnPAcnaerg6q+qR0bAb0nebwwrsvm4STSVqqVlaqLmmQpU3Bfpx44CEa5d6T9b0V11ZqVE/bkmRhMqhUcrhw==", "cpu": [ "arm64" ], @@ -21893,9 +21904,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-darwin-x64": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.8.2.tgz", - "integrity": "sha512-pt/wmDLM31Es8/EzazlyT5U+ou2l60rfMNFGCLqleHEQ0JUTc0KWnOciBLbHIQFiPsCQZJFEKyfV5V/ncePmmw==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.8.3.tgz", + "integrity": "sha512-RIFg1VkQ4jhI+ErqEZuIeGBcJGD8t+u9J5CdQBDIASd8QRhtudBkiYLYCJb+qaQly09G7nVfxuyItlS2uRW3qA==", "cpu": [ "x64" ], @@ -21910,9 +21921,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-freebsd-x64": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.8.2.tgz", - "integrity": "sha512-joZxFbgJfkHkB9uMIJr73Gpnm9pnpvr0XKGbWC409/d2x7q1qK77tKdyhGm+A3+kaZFwstNVPmCUtUwJYyU6LA==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.8.3.tgz", + "integrity": "sha512-boQTgMUdnqpZhHMrV/xgnp/dTg5dfxw8I4d16NBwmW4j+Sez7zi/dydgsJpfZsj8TicOHvPu6KK4W5wzp82NPw==", "cpu": [ "x64" ], @@ -21927,9 +21938,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.8.2.tgz", - "integrity": "sha512-98O/qsxn4vIMPY/FyzvmVrl7C5yFhCUVk0/4PF+PA2SvtQ051L1eMRY6bq/lb69qfN6szJPZ41PG5mPx0NeLZw==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.8.3.tgz", + "integrity": "sha512-wpiNyY1igx1rLN3EsTLum2lDtblFijdBZB9/9u/6UDub4z9CaQ4yaC4h9n5v7yFYILwfL44YTsQKzrE+iv0y1Q==", "cpu": [ "arm" ], @@ -21944,9 +21955,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-linux-arm64-gnu": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.8.2.tgz", - "integrity": "sha512-h6a+HxwfSpxsi4KpxGgPh9GDBmD2E+XqGCdfYpobabxqEBvlnIlJyuDhlRR06cTWpuNXHpRdrVogmV6m/YbtDg==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.8.3.tgz", + "integrity": "sha512-nbi/eZtJfWxuDwdUCiP+VJolFubtrz6XxVtB26eMAkODnREOKELHZtMOrlm8JBZCdtWCvTqibq9Az74XsqSfdA==", "cpu": [ "arm64" ], @@ -21961,9 +21972,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-linux-arm64-musl": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.8.2.tgz", - "integrity": "sha512-4Ev+jM0VAxDHV/dFgMXjQTCXS4I8W4oMe7FSkXpG8RUn6JK659DC8ExIDPoGIh+Cyqq6r6mw1CSia+ciQWICWQ==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.8.3.tgz", + "integrity": "sha512-LTTGzI8YVPlF1v0YlVf+exM+1q7rpsiUbjTTHJcfHFRU5t4BsiZD54K19Y1UBg1XFx5cwhEaIomSmJ88RwPPVQ==", "cpu": [ "arm64" ], @@ -21978,9 +21989,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-linux-x64-gnu": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.8.2.tgz", - "integrity": "sha512-nR0ev+wxu+nQYRd7bhqggOxK7UfkV6h+Ko1mumUFyrM5GvPpz/ELhjJFSnMcOkOMcvH0b6G5uTBJvN1XWCkbmg==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.8.3.tgz", + "integrity": "sha512-SlA4GtXvQbSzSIWLgiIiLBOjdINPOUR/im+TUbaEMZ8wiGrOY8cnk0PVt95TIQJVBeXBCeb5HnoY0lHJpMOODg==", "cpu": [ "x64" ], @@ -21995,9 +22006,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-linux-x64-musl": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.8.2.tgz", - "integrity": "sha512-ost41l5yc2aq2Gc9bMMpaPi/jkXqbXEMEPHrxWKuKmaek3K2zbVDQzvBBNcQKxf/mlCsrqN4QO0mKYSRRqag5A==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.8.3.tgz", + "integrity": "sha512-MNzkEwPktp5SQH9dJDH2wP9hgG9LsBDhKJXJfKw6sUI/6qz5+/aAjFziKy+zBnhU4AO1yXt5qEWzR8lDcIriVQ==", "cpu": [ "x64" ], @@ -22012,9 +22023,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-win32-arm64-msvc": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.8.2.tgz", - "integrity": "sha512-0SEOqT/daBG5WtM9vOGilrYaAuf1tiALdrFavY62+/arXYxXemUKmRI5qoKDTnvoLMBGkJs6kxhMO5b7aUXIvQ==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.8.3.tgz", + "integrity": "sha512-qUV7CyXKwRCM/lkvyS6Xa1MqgAuK5da6w27RAehh7LATBUKn1I4/M7DGn6L7ERCxpZuh1TrDz9pUzEy0R+Ekkg==", "cpu": [ "arm64" ], @@ -22029,9 +22040,9 @@ } }, "node_modules/lerna/node_modules/@nx/nx-win32-x64-msvc": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.8.2.tgz", - "integrity": "sha512-iIsY+tVqes/NOqTbJmggL9Juie/iaDYlWgXA9IUv88FE9thqWKhVj4/tCcPjsOwzD+1SVna3YISEEFsx5UV4ew==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.8.3.tgz", + "integrity": "sha512-gX1G8u6W6EPX6PO/wv07+B++UHyCHBXyVWXITA3Kv6HoSajOxIa2Kk1rv1iDQGmX1WWxBaj3bUyYJAFBDITe4w==", "cpu": [ "x64" ], @@ -22052,16 +22063,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lerna/node_modules/@tybys/wasm-util": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", - "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/lerna/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -22141,21 +22142,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/lerna/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, "node_modules/lerna/node_modules/get-stream": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", @@ -22275,27 +22261,6 @@ "concat-map": "0.0.1" } }, - "node_modules/lerna/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/lerna/node_modules/npm-package-arg": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz", @@ -22313,9 +22278,9 @@ } }, "node_modules/lerna/node_modules/nx": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/nx/-/nx-20.8.2.tgz", - "integrity": "sha512-mDKpbH3vEpUFDx0rrLh+tTqLq1PYU8KiD/R7OVZGd1FxQxghx2HOl32MiqNsfPcw6AvKlXhslbwIESV+N55FLQ==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/nx/-/nx-20.8.3.tgz", + "integrity": "sha512-8w815WSMWar3A/LFzwtmEY+E8cVW62lMiFuPDXje+C8O8hFndfvscP56QHNMn2Zdhz3q0+BZUe+se4Em1BKYdA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -22360,16 +22325,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.8.2", - "@nx/nx-darwin-x64": "20.8.2", - "@nx/nx-freebsd-x64": "20.8.2", - "@nx/nx-linux-arm-gnueabihf": "20.8.2", - "@nx/nx-linux-arm64-gnu": "20.8.2", - "@nx/nx-linux-arm64-musl": "20.8.2", - "@nx/nx-linux-x64-gnu": "20.8.2", - "@nx/nx-linux-x64-musl": "20.8.2", - "@nx/nx-win32-arm64-msvc": "20.8.2", - "@nx/nx-win32-x64-msvc": "20.8.2" + "@nx/nx-darwin-arm64": "20.8.3", + "@nx/nx-darwin-x64": "20.8.3", + "@nx/nx-freebsd-x64": "20.8.3", + "@nx/nx-linux-arm-gnueabihf": "20.8.3", + "@nx/nx-linux-arm64-gnu": "20.8.3", + "@nx/nx-linux-arm64-musl": "20.8.3", + "@nx/nx-linux-x64-gnu": "20.8.3", + "@nx/nx-linux-x64-musl": "20.8.3", + "@nx/nx-win32-arm64-msvc": "20.8.3", + "@nx/nx-win32-x64-msvc": "20.8.3" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -22478,6 +22443,16 @@ "node": ">=8" } }, + "node_modules/lerna/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/lerna/node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", @@ -22495,29 +22470,19 @@ "node": ">=6" } }, - "node_modules/lerna/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true, - "license": "MIT" - }, - "node_modules/lerna/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/lerna/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "node_modules/lerna/node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", "dev": true, "license": "MIT", "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, "node_modules/lerna/node_modules/yargs": { @@ -23105,6 +23070,19 @@ "markdown-it": "*" } }, + "node_modules/markdown-it/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -23223,16 +23201,16 @@ } }, "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", "dev": true, "license": "MIT", "bin": { "mime": "cli.js" }, "engines": { - "node": ">=4" + "node": ">=10.0.0" } }, "node_modules/mime-db": { @@ -23638,9 +23616,9 @@ } }, "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", "dev": true, "license": "MIT", "engines": { @@ -23667,9 +23645,9 @@ } }, "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dev": true, "license": "MIT", "dependencies": { @@ -23778,9 +23756,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.23", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.23.tgz", - "integrity": "sha512-cCmFDMSm26S6tQSDpBCg/NR8NENrVPhAJSf+XbxBG4rPFaaonlEoE9wHQmun+cls499TQGSb7ZyPBRlzgKfpeg==", + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true, "license": "MIT" }, @@ -24068,28 +24046,6 @@ } } }, - "node_modules/nx/node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz", - "integrity": "sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@emnapi/core": "^1.1.0", - "@emnapi/runtime": "^1.1.0", - "@tybys/wasm-util": "^0.9.0" - } - }, - "node_modules/nx/node_modules/@tybys/wasm-util": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", - "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/nx/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -24157,7 +24113,17 @@ "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=8" + "node": ">=8" + } + }, + "node_modules/nx/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" } }, "node_modules/nx/node_modules/tar-stream": { @@ -24177,6 +24143,21 @@ "node": ">=6" } }, + "node_modules/nx/node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/nx/node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -24591,9 +24572,9 @@ } }, "node_modules/p-locate/node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", "dev": true, "license": "MIT", "engines": { @@ -24861,19 +24842,6 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/parse5/node_modules/entities": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", - "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -25316,9 +25284,9 @@ } }, "node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.3.tgz", + "integrity": "sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==", "dev": true, "license": "MIT", "bin": { @@ -25344,6 +25312,21 @@ "node": ">=6.0.0" } }, + "node_modules/pretty-format": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", + "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "30.0.5", + "ansi-styles": "^5.2.0", + "react-is": "^18.3.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "node_modules/proc-log": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", @@ -25708,13 +25691,13 @@ "license": "MIT" }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -25816,9 +25799,9 @@ } }, "node_modules/react": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", - "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", + "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", "peer": true, "engines": { @@ -26267,19 +26250,22 @@ } }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -26618,13 +26604,6 @@ "seek-table": "bin/seek-bzip-table" } }, - "node_modules/seek-bzip/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, "node_modules/semver": { "version": "7.7.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", @@ -26690,6 +26669,19 @@ "node": ">= 0.8" } }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/serve-static": { "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", @@ -27757,6 +27749,67 @@ "node": ">=4" } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/text-decoder": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", @@ -27767,21 +27820,6 @@ "b4a": "^1.6.4" } }, - "node_modules/text-decoder/node_modules/b4a": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", - "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", - "dev": true, - "license": "Apache-2.0", - "peerDependencies": { - "react-native-b4a": "*" - }, - "peerDependenciesMeta": { - "react-native-b4a": { - "optional": true - } - } - }, "node_modules/text-extensions": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", @@ -27840,11 +27878,14 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", - "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/tinyglobby": { "version": "0.2.15", @@ -27958,6 +27999,15 @@ "node": ">=0.6" } }, + "node_modules/topological-sort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/topological-sort/-/topological-sort-0.3.0.tgz", + "integrity": "sha512-BmO2t72jjJ3B9PZC3LTHyojgNynOKEvWG4GiYqyfSMUjtO6+yZK0oozlMYVA+tC6YvS3NZh4OPx6QaolEYOg6A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/tough-cookie": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", @@ -28161,18 +28211,29 @@ } }, "node_modules/tsconfig-paths": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", - "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "license": "MIT", "dependencies": { - "json5": "^2.2.2", + "@types/json5": "^0.0.29", + "json5": "^1.0.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" }, - "engines": { - "node": ">=6" + "bin": { + "json5": "lib/cli.js" } }, "node_modules/tsconfig-paths/node_modules/strip-bom": { @@ -28386,17 +28447,17 @@ } }, "node_modules/typescript-eslint": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.0.tgz", - "integrity": "sha512-6+ZrB6y2bT2DX3K+Qd9vn7OFOJR+xSLDj+Aw/N3zBwUt27uTw2sw2TE2+UcY1RiyBZkaGbTkVg9SSdPNUG6aUw==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.48.1.tgz", + "integrity": "sha512-FbOKN1fqNoXp1hIl5KYpObVrp0mCn+CLgn479nmu2IsRMrx2vyv74MmsBLVlhg8qVwNFGbXSp8fh1zp8pEoC2A==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "8.46.0", - "@typescript-eslint/parser": "8.46.0", - "@typescript-eslint/typescript-estree": "8.46.0", - "@typescript-eslint/utils": "8.46.0" + "@typescript-eslint/eslint-plugin": "8.48.1", + "@typescript-eslint/parser": "8.48.1", + "@typescript-eslint/typescript-estree": "8.48.1", + "@typescript-eslint/utils": "8.48.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -28468,9 +28529,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz", - "integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -28637,9 +28698,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", "dev": true, "funding": [ { @@ -28994,19 +29055,6 @@ "node": ">=12" } }, - "node_modules/verdaccio/node_modules/mime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/verdaccio/node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -29092,6 +29140,32 @@ "node": ">=12" } }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/whatwg-mimetype": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", @@ -29478,9 +29552,9 @@ } }, "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, "license": "MIT", "engines": { @@ -29725,9 +29799,9 @@ } }, "node_modules/zod": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", - "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", + "version": "4.1.13", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.13.tgz", + "integrity": "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -29746,31 +29820,6 @@ "zod": "^3.25.0 || ^4.0.0" } }, - "packages/api-admin": { - "name": "@leancodepl/admin", - "version": "1.1.3", - "extraneous": true, - "license": "Apache-2.0", - "dependencies": { - "@ant-design/icons": ">=5.3.7", - "@leancodepl/api-date": ">=7.2.3", - "@leancodepl/api-date-dayjs": ">=7.2.3", - "@leancodepl/contractsgenerator-typescript-plugin-admin": "1.1.3", - "@leancodepl/contractsgenerator-typescript-schema": "1.1.3", - "@leancodepl/react-query-cqrs-client": ">=7.2.3", - "@leancodepl/utils": ">=7.2.3", - "@nx/vite": ">=19.0.0", - "@tanstack/react-query": ">=5.0.0", - "@vitejs/plugin-react": ">=4.0.0", - "antd": ">=5.5.2", - "dayjs": "^1.9.0", - "vite": ">=5.0.0", - "vite-plugin-dts": ">=2.3.0" - }, - "peerDependencies": { - "react": "*" - } - }, "packages/generator": { "name": "@leancodepl/contractsgenerator-typescript", "version": "1.1.3", @@ -29791,18 +29840,6 @@ "contractsgenerator-typescript": "src/bin.js" } }, - "plugins/admin": { - "name": "@leancodepl/contractsgenerator-typescript-plugin-admin", - "version": "1.1.3", - "extraneous": true, - "license": "Apache-2.0", - "dependencies": { - "@leancodepl/contractsgenerator-typescript-plugin": "1.1.3", - "@leancodepl/contractsgenerator-typescript-schema": "1.1.3", - "@leancodepl/utils": ">=7.2.3", - "zod": ">=3.22.0" - } - }, "plugins/client": { "name": "@leancodepl/contractsgenerator-typescript-plugin-client", "version": "1.1.3", @@ -29842,6 +29879,23 @@ "@leancodepl/contractsgenerator-typescript-plugin": "1.1.3", "zod": ">=3.22.0" } + }, + "plugins/zod": { + "name": "@leancodepl/contractsgenerator-typescript-plugin-zod", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "@leancodepl/contractsgenerator-typescript-plugin": "1.1.3", + "@leancodepl/contractsgenerator-typescript-schema": "1.1.3", + "@leancodepl/contractsgenerator-typescript-types": "1.1.3", + "@leancodepl/contractsgenerator-typescript-values": "1.1.3", + "lodash": "^4.0.0", + "topological-sort": "0.3.0", + "zod": ">=4.0.0" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + } } } } diff --git a/package.json b/package.json index 9f72717..c9962ca 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "object-hash": "3.0.0", "tslib": "^2.3.0", "yaml": "2.8.0", - "yargs": "18.0.0" + "yargs": "18.0.0", + "zod": ">=3.22.0" }, "devDependencies": { "@commitlint/cli": "^19.8.1", @@ -25,6 +26,9 @@ "@nx/js": "21.6.4", "@nx/node": "21.6.4", "@nx/workspace": "21.6.4", + "@swc-node/register": "~1.9.1", + "@swc/core": "~1.5.7", + "@swc/helpers": "~0.5.11", "@types/jest": "30.0.0", "@types/lodash": "4.17.17", "@types/node": "^24.0.3", diff --git a/plugins/zod/README.md b/plugins/zod/README.md new file mode 100644 index 0000000..8089fc4 --- /dev/null +++ b/plugins/zod/README.md @@ -0,0 +1,215 @@ +# @leancodepl/contractsgenerator-typescript-plugin-zod + +Plugin for generating Zod schemas for DTOs (Data Transfer Objects), Commands, Queries, Operations, Topics, and Enums. + +## Config + +- `input` - configuration passed to [Contracts Generator Server](https://github.com/leancodepl/contractsgenerator). All + paths are relative to directory from your current CWD. Unless you are using JavaScript files - in that case you can + use `__dirname` and `path.join`/`path.resolve` for paths relative to configuration file. + - `base` - base path for your backend code source. If you provide that then all the other properties are relative to + this directory. + + Then you can provide one of: + - `file` + or + - `include` and `exclude` - single globs or arrays of globs to match specific .cs files + or + - `project` - can be multiple + + For details on these options please refer to + [Contracts Generator Server](https://github.com/leancodepl/contractsgenerator). + +- `customTypes` - dictionary of custom types configuration where keys are the name of Known Type and value is custom + type name. Valid custom types include: String, Guid, Uri, Boolean, UInt8, Int8, Int16, UInt16, Int32, UInt32, Int64, + UInt64, Float32, Float64, DateOnly, TimeOnly, DateTimeOffset, TimeSpan. + +- `nameTransform` - function `(fullName: string) => string | undefined` which allows you to transform full name of the + DTO (like `LeanCode.Core.Contracts.User.UserDetailsDTO`). This is especially useful when you want to map namespaces, + for e.g. when you have conflicts, want to remove parts of the namespace (`LeanCode.Core.User.UserDetailsDTO` instead + of `LeanCode.Core.`**`Contracts`**`.User.UserDetailsDTO`). If the function returns `undefined`, the DTO is not + included in the output. + +- `fieldValidation` - function `(fieldPath: string, property: FieldValidationContext) => string | undefined` which + allows you to provide custom validation logic for specific fields. The function receives: + - `fieldPath`: Full path to the field (e.g., `"ExampleApp.Examples.Contracts.Booking.LocationDTO.Latitude"`) + - `property`: An object containing: + - `name`: Name of the property (e.g., `"Latitude"`) + - `isNullable`: Boolean indicating if the property is nullable + - `type`: The property type (`"string" | "number" | "boolean" | "array" | "object" | "enum" | "unknown"`) + - Returns: A string containing additional Zod validation code (e.g., `".min(1)"`, `".positive().max(90)"`), or + `undefined` to use the default schema. The string will be appended to the default schema code. + +## Features + +- Generates Zod schemas for DTOs, Commands, Queries, Operations, Topics, and Enums +- Uses PascalCase naming convention for schema names (e.g., `LocationDTO` → `LocationDTOSchema`) +- Maintains namespace structure based on nameTransform +- Handles nullable properties with `.nullable()` +- Supports interface inheritance with `.extend()` +- Handles generic types and arrays +- Generates enum schemas as `z.enum()` with metadata (values mapping and comments) +- Adds comments and attributes to `.meta()` for interfaces and enums +- Validates duplicate names in namespaces (same as contracts plugin) + +## Example + +### Config + +```js +module.exports = { + generates: { + "schemas.ts": { + plugins: ["zod"], + }, + }, + config: { + input: { + base: "../../../backend/src", + project: ["Core/Project.Core.Contracts/Project.Core.Contracts.csproj"], + }, + }, +} +``` + +### Output + +```typescript +import { z } from "zod" + +export namespace ExampleApp { + export namespace Examples { + export namespace Contracts { + export namespace Booking { + export const LocationDTOSchema = z.object({ + Latitude: z.number(), + Longitude: z.number(), + }) + + export const MoneyDTOSchema = z.object({ + Value: z.number(), + Currency: z.string(), + }) + + export const ServiceProviderTypeDTOSchema = z.enum({ Hairdresser: 0, BarberShop: 1, Groomer: 2 }).meta({ + "meta:enum": { Hairdresser: 0, BarberShop: 1, Groomer: 2 }, + }) + + export const MyReservationDTOSchema = z.object({ + Id: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + Price: ExampleApp.Examples.Contracts.Booking.MoneyDTOSchema, + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + }) + } + } + } +} +``` + +### With nameTransform + +```js +module.exports = { + generates: { + "schemas.ts": { + plugins: ["zod"], + }, + }, + config: { + input: { + base: "../../../backend/src", + project: ["Core/Project.Core.Contracts/Project.Core.Contracts.csproj"], + }, + nameTransform: nameWithNamespace => nameWithNamespace.split(".").at(-1), + }, +} +``` + +Output: + +```typescript +import { z } from "zod" + +export const LocationDTOSchema = z.object({ + Latitude: z.number(), + Longitude: z.number(), +}) + +export const MoneyDTOSchema = z.object({ + Value: z.number(), + Currency: z.string(), +}) + +export const ServiceProviderTypeDTOSchema = z.enum({ Hairdresser: 0, BarberShop: 1, Groomer: 2 }).meta({ + "meta:enum": { Hairdresser: 0, BarberShop: 1, Groomer: 2 }, +}) + +export const MyReservationDTOSchema = z.object({ + Id: z.string(), + Location: LocationDTOSchema, + Price: MoneyDTOSchema, + Type: ServiceProviderTypeDTOSchema, +}) +``` + +### With fieldValidation + +```js +module.exports = { + generates: { + "schemas.ts": { + plugins: ["zod"], + }, + }, + config: { + input: { + base: "../../../backend/src", + project: ["Core/Project.Core.Contracts/Project.Core.Contracts.csproj"], + }, + fieldValidation: (fieldPath, property) => { + // Add min length validation for string fields named "Name" + if (property.name === "Name" && property.type === "string") { + return ".min(1)" + } + // Add positive number validation for coordinates + if ( + (property.name === "Latitude" || property.name === "Longitude") && + property.type === "number" && + fieldPath.includes("LocationDTO") + ) { + return ".positive().max(90)" + } + // Add custom refine validation with options + if (property.name === "Value" && property.type === "number") { + return '.refine(val => val > 0, { message: "Must be positive" })' + } + return undefined + }, + }, +} +``` + +Output: + +```typescript +import { z } from "zod" + +export namespace ExampleApp { + export namespace Examples { + export namespace Contracts { + export namespace Booking { + export const LocationDTOSchema = z.object({ + Latitude: z.number().positive().max(90), + Longitude: z.number().positive().max(90), + }) + + export const ServiceProviderDetailsDTOSchema = z.object({ + Name: z.string().min(1), + // ... other properties + }) + } + } + } +} +``` diff --git a/plugins/zod/eslint.config.cjs b/plugins/zod/eslint.config.cjs new file mode 100644 index 0000000..4d1c926 --- /dev/null +++ b/plugins/zod/eslint.config.cjs @@ -0,0 +1,3 @@ +const baseConfig = require("../../eslint.base.config.cjs") + +module.exports = [...baseConfig] diff --git a/plugins/zod/jest.config.ts b/plugins/zod/jest.config.ts new file mode 100644 index 0000000..2d346f3 --- /dev/null +++ b/plugins/zod/jest.config.ts @@ -0,0 +1,17 @@ +/* eslint-disable */ +export default { + displayName: "zod", + preset: "../../jest.preset.js", + globals: {}, + testEnvironment: "node", + transform: { + "^.+\\.[tj]sx?$": [ + "ts-jest", + { + tsconfig: "/tsconfig.spec.json", + }, + ], + }, + moduleFileExtensions: ["ts", "tsx", "js", "jsx"], + coverageDirectory: "../../coverage/plugins/zod", +} diff --git a/plugins/zod/package.json b/plugins/zod/package.json new file mode 100644 index 0000000..2a644b3 --- /dev/null +++ b/plugins/zod/package.json @@ -0,0 +1,18 @@ +{ + "name": "@leancodepl/contractsgenerator-typescript-plugin-zod", + "version": "1.0.0", + "license": "Apache-2.0", + "repository": "https://github.com/leancodepl/contractsgenerator-typescript", + "dependencies": { + "@leancodepl/contractsgenerator-typescript-plugin": "1.1.3", + "@leancodepl/contractsgenerator-typescript-schema": "1.1.3", + "@leancodepl/contractsgenerator-typescript-types": "1.1.3", + "@leancodepl/contractsgenerator-typescript-values": "1.1.3", + "lodash": "^4.0.0", + "topological-sort": "0.3.0", + "zod": ">=4.0.0" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + } +} diff --git a/plugins/zod/project.json b/plugins/zod/project.json new file mode 100644 index 0000000..a458c3d --- /dev/null +++ b/plugins/zod/project.json @@ -0,0 +1,34 @@ +{ + "name": "zod", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "plugins/zod/src", + "projectType": "library", + "tags": ["plugin"], + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/plugins/zod", + "tsConfig": "plugins/zod/tsconfig.lib.json", + "packageJson": "plugins/zod/package.json", + "main": "plugins/zod/src/index.ts", + "assets": ["plugins/zod/*.md"] + } + }, + "lint": { + "executor": "@nx/eslint:lint" + }, + "test": { + "options": { + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "coverage": true + } + } + } + } +} diff --git a/plugins/zod/src/configuration.ts b/plugins/zod/src/configuration.ts new file mode 100644 index 0000000..461aa4d --- /dev/null +++ b/plugins/zod/src/configuration.ts @@ -0,0 +1,62 @@ +import z from "zod/v4" +import { PropertyTypeCategory } from "./utils/getPropertyTypeCategory" + +export type ZodGeneratorPluginConfiguration = z.infer + +export type FieldValidationContext = { + name: string + isNullable: boolean + type: PropertyTypeCategory +} + +export type FieldValidationFunction = (fieldPath: string, property: FieldValidationContext) => string | undefined + +export const fieldValidationReturnSchema = z.string().optional() + +export type GeneratorInput = z.infer + +export type CustomTypesMap = z.infer + +export const generatorInputSchema = z.strictObject({ + raw: z.string().optional(), + base: z.string().optional(), + file: z.string().optional(), + include: z.union([z.string(), z.array(z.string())]).optional(), + exclude: z.union([z.string(), z.array(z.string())]).optional(), + project: z.union([z.string(), z.array(z.string())]).optional(), + options: z.array(z.string()).optional(), +}) + +export const customTypesMapSchema = z.strictObject({ + String: z.string().optional(), + Guid: z.string().optional(), + Uri: z.string().optional(), + Boolean: z.string().optional(), + UInt8: z.string().optional(), + Int8: z.string().optional(), + Int16: z.string().optional(), + UInt16: z.string().optional(), + Int32: z.string().optional(), + UInt32: z.string().optional(), + Int64: z.string().optional(), + UInt64: z.string().optional(), + Float32: z.string().optional(), + Float64: z.string().optional(), + DateOnly: z.string().optional(), + TimeOnly: z.string().optional(), + DateTimeOffset: z.string().optional(), + TimeSpan: z.string().optional(), + DateTime: z.string().optional(), +}) + +export const zodGeneratorPluginConfigurationSchema = z.object({ + input: generatorInputSchema, + customTypes: customTypesMapSchema.optional(), + nameTransform: z + .function({ + input: [z.string()], + output: z.string().optional(), + }) + .optional(), + fieldValidation: z.custom().optional(), +}) diff --git a/plugins/zod/src/generators/generateEnumSchema.ts b/plugins/zod/src/generators/generateEnumSchema.ts new file mode 100644 index 0000000..8e5d360 --- /dev/null +++ b/plugins/zod/src/generators/generateEnumSchema.ts @@ -0,0 +1,53 @@ +import ts from "typescript" +import { SchemaEnum } from "@leancodepl/contractsgenerator-typescript-schema" +import { zodIdentifier } from "../utils/consts" +import { getSchemaName } from "../utils/getSchemaName" +import { ZodContext } from "../zodContext" + +export function generateEnumSchema(schemaEnum: SchemaEnum, context: ZodContext): ts.Statement[] { + const name = schemaEnum.getName(context.nameTransform) + if (name === undefined) return [] + + const schemaName = getSchemaName(name) + + const valuesObject = createValuesObject(schemaEnum) + const enumCall = createEnumSchema(valuesObject) + const zodEnumCall = applyMeta(enumCall, valuesObject) + + return [ + ts.factory.createVariableStatement( + [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration(schemaName, undefined, undefined, zodEnumCall)], + ts.NodeFlags.Const, + ), + ), + ] +} + +function createValuesObject(schemaEnum: SchemaEnum): ts.ObjectLiteralExpression { + const valuesObjectProperties = schemaEnum.members.map(member => { + const numericValue = member.value.value + return ts.factory.createPropertyAssignment( + ts.factory.createStringLiteral(member.name), + ts.factory.createNumericLiteral(numericValue), + ) + }) + + return ts.factory.createObjectLiteralExpression(valuesObjectProperties, true) +} + +function createEnumSchema(valuesObject: ts.ObjectLiteralExpression): ts.CallExpression { + return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(zodIdentifier, "enum"), undefined, [ + valuesObject, + ]) +} + +function applyMeta(schema: ts.Expression, valuesObject: ts.ObjectLiteralExpression): ts.Expression { + return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(schema, "meta"), undefined, [ + ts.factory.createObjectLiteralExpression( + [ts.factory.createPropertyAssignment(ts.factory.createStringLiteral("meta:enum"), valuesObject)], + true, + ), + ]) +} diff --git a/plugins/zod/src/generators/generateInterfaceSchema.ts b/plugins/zod/src/generators/generateInterfaceSchema.ts new file mode 100644 index 0000000..4e89d11 --- /dev/null +++ b/plugins/zod/src/generators/generateInterfaceSchema.ts @@ -0,0 +1,169 @@ +import ts from "typescript" +import { + isSchemaInterface, + isSchemaInternalType, + isSchemaKnownType, + SchemaInterface, +} from "@leancodepl/contractsgenerator-typescript-schema" +import { zodIdentifier } from "../utils/consts" +import { formatComment } from "../utils/formatComment" +import { getSchemaName } from "../utils/getSchemaName" +import { ZodContext } from "../zodContext" +import { generatePropertySchema, generateZodSchemaForType } from "./generatePropertySchema" + +export function generateInterfaceSchema(schemaInterface: SchemaInterface, context: ZodContext): ts.Statement[] { + if (schemaInterface.getIsAttribute(context.schemaEntities)) return [] + + const name = schemaInterface.getName(context.nameTransform) + if (name === undefined) return [] + + const fullName = schemaInterface.getFullName(context.nameTransform) + if (fullName === undefined) return [] + + const schemaName = getSchemaName(name) + + const properties = schemaInterface.properties.map(property => generatePropertySchema(property, context, fullName)) + + let zodObjectCall: ts.Expression = ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(zodIdentifier, "object"), + undefined, + [ts.factory.createObjectLiteralExpression(properties, true)], + ) + + zodObjectCall = applyExtends(zodObjectCall, schemaInterface, context) + zodObjectCall = applyComment(zodObjectCall, schemaInterface) + + return createSchemaStatement(zodObjectCall, schemaInterface, schemaName) +} + +function applyExtends( + zodObjectCall: ts.Expression, + schemaInterface: SchemaInterface, + context: ZodContext, +): ts.Expression { + if (schemaInterface.extendTypes.length === 0) { + return zodObjectCall + } + + let result = zodObjectCall + + for (const extendType of schemaInterface.extendTypes) { + if (isSchemaKnownType(extendType)) { + continue + } + + if (!isSchemaInternalType(extendType)) { + continue + } + + const extendedName = extendType.id + const extendedEntity = context.schemaEntities.find(e => e.id === extendedName) + + if (extendedEntity && isSchemaInterface(extendedEntity) && extendedEntity.getIsAttribute(context.schemaEntities)) { + continue + } + + const transformedExtendedName = context.nameTransform(extendedName) + + if (transformedExtendedName === undefined) { + continue + } + + const extendedParts = transformedExtendedName.split(".") + const extendedSchemaName = getSchemaName(transformedExtendedName) + const extendedNamespaceParts = extendedParts.slice(0, -1) + + let extendedSchemaRef: ts.Expression + if (extendedNamespaceParts.length === 0) { + extendedSchemaRef = ts.factory.createIdentifier(extendedSchemaName) + } else { + extendedSchemaRef = ts.factory.createIdentifier(extendedNamespaceParts[0]) + for (let i = 1; i < extendedNamespaceParts.length; i++) { + extendedSchemaRef = ts.factory.createPropertyAccessExpression(extendedSchemaRef, extendedNamespaceParts[i]) + } + extendedSchemaRef = ts.factory.createPropertyAccessExpression(extendedSchemaRef, extendedSchemaName) + } + + if (extendType.typeArguments.length > 0) { + const typeArgs = extendType.typeArguments.map(arg => generateZodSchemaForType(arg, context)) + extendedSchemaRef = ts.factory.createCallExpression(extendedSchemaRef, undefined, typeArgs) + } + + const shapeAccess = ts.factory.createPropertyAccessExpression(extendedSchemaRef, "shape") + + result = ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(result, "extend"), undefined, [ + shapeAccess, + ]) + } + + return result +} + +function applyComment(zodObjectCall: ts.Expression, schemaInterface: SchemaInterface): ts.Expression { + const comment = formatComment(schemaInterface.comment, schemaInterface.attributes) + if (!comment) { + return zodObjectCall + } + + const metaObject = ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment( + ts.factory.createIdentifier("comment"), + ts.factory.createStringLiteral(comment), + ), + ], + true, + ) + + return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(zodObjectCall, "meta"), undefined, [ + metaObject, + ]) +} + +function createSchemaStatement( + zodObjectCall: ts.Expression, + schemaInterface: SchemaInterface, + schemaName: string, +): ts.Statement[] { + if (schemaInterface.genericParameters.length > 0) { + const typeParameters = schemaInterface.genericParameters.map(p => + ts.factory.createParameterDeclaration( + undefined, + undefined, + p + "Schema", + undefined, + ts.factory.createTypeReferenceNode("z.ZodTypeAny"), + undefined, + ), + ) + + const arrowFunction = ts.factory.createArrowFunction( + undefined, + undefined, + typeParameters, + undefined, + ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken), + zodObjectCall, + ) + + return [ + ts.factory.createVariableStatement( + [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration(schemaName, undefined, undefined, arrowFunction)], + ts.NodeFlags.Const, + ), + ), + ] + } + + return [ + ts.factory.createVariableStatement( + [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration(schemaName, undefined, undefined, zodObjectCall)], + ts.NodeFlags.Const, + ), + ), + ] +} diff --git a/plugins/zod/src/generators/generateNamespace.ts b/plugins/zod/src/generators/generateNamespace.ts new file mode 100644 index 0000000..2510866 --- /dev/null +++ b/plugins/zod/src/generators/generateNamespace.ts @@ -0,0 +1,251 @@ +import { AssertionError } from "assert" +import { groupBy, toPairs } from "lodash" +import { TopologicalSort } from "topological-sort" +import ts from "typescript" +import { + isSchemaEnum, + isSchemaInterface, + isSchemaInternalType, + isSchemaKnownType, + SchemaEntity, + SchemaEnum, + SchemaInterface, + SchemaType, +} from "@leancodepl/contractsgenerator-typescript-schema" +import { ZodContext } from "../zodContext" +import { generateEnumSchema } from "./generateEnumSchema" +import { generateInterfaceSchema } from "./generateInterfaceSchema" + +export function generateNamespaces(schemaEntities: SchemaEntity[], context: ZodContext) { + const generatorNamespaces = extractNamespaces(schemaEntities, 0, undefined, context) + + return generateNamespace(generatorNamespaces, context) +} + +function generateNamespace(generatorNamespace: GeneratorNamespace, context: ZodContext): ts.Statement[] { + throwErrorForDuplicateNames(generatorNamespace, context) + + const childContext = { + ...context, + currentNamespace: [...context.currentNamespace, ...(generatorNamespace.name ? [generatorNamespace.name] : [])], + } + + const allEntities: SchemaEntity[] = [...generatorNamespace.interfaces, ...generatorNamespace.enums] + const sortedEntities = topologicalSortEntities(allEntities) + + const entityStatements = sortedEntities.flatMap(entity => + isSchemaInterface(entity) + ? generateInterfaceSchema(entity, childContext) + : generateEnumSchema(entity, childContext), + ) + + const sortedNamespaces = topologicalSortNamespaces(generatorNamespace.namespaces) + const namespaceStatements = sortedNamespaces.flatMap(ns => generateNamespace(ns, childContext)) + + const statements = [...entityStatements, ...namespaceStatements] + + if (!generatorNamespace.name) { + return statements + } + + return [ + ts.factory.createModuleDeclaration( + [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], + ts.factory.createIdentifier(generatorNamespace.name), + ts.factory.createModuleBlock(statements), + ts.NodeFlags.Namespace, + ), + ] +} + +function trySortNodes(sortOp: TopologicalSort): T[] { + try { + return [...sortOp.sort().values()].map(node => node.node) + } catch (error) { + if (error instanceof AssertionError && /Node .+ forms circular dependency: .+/.test(error.message)) { + throw new Error(`Error: circular references detected in contracts: ${error.message}`) + } + throw error + } +} + +function collectInternalTypeIds(type: SchemaType): string[] { + const ids: string[] = [] + + if (isSchemaInternalType(type)) { + ids.push(type.id) + for (const arg of type.typeArguments) { + ids.push(...collectInternalTypeIds(arg)) + } + } else if (isSchemaKnownType(type)) { + for (const arg of type.typeArguments) { + ids.push(...collectInternalTypeIds(arg)) + } + } + + return ids +} + +function getEntityDependencies(entity: SchemaEntity): string[] { + if (isSchemaEnum(entity)) { + return [] + } + + const deps: string[] = [] + + for (const property of entity.properties) { + deps.push(...collectInternalTypeIds(property.type)) + } + + for (const extendType of entity.extendTypes) { + deps.push(...collectInternalTypeIds(extendType)) + } + + return [...new Set(deps)] +} + +function topologicalSortEntities(entities: SchemaEntity[]): SchemaEntity[] { + const entityMap = new Map(entities.map(e => [e.id, e])) + const sortOp = new TopologicalSort(new Map(entities.map(e => [e.id, e]))) + + for (const entity of entities) { + for (const depId of getEntityDependencies(entity)) { + if (entityMap.has(depId)) { + sortOp.addEdge(depId, entity.id) + } + } + } + + return trySortNodes(sortOp) +} + +function getNamespaceDependencyIds(namespace: GeneratorNamespace): Set { + const deps = new Set() + + for (const iface of namespace.interfaces) { + for (const depId of getEntityDependencies(iface)) { + deps.add(depId) + } + } + + for (const childNs of namespace.namespaces) { + for (const depId of getNamespaceDependencyIds(childNs)) { + deps.add(depId) + } + } + + return deps +} + +function getNamespaceEntityIds(namespace: GeneratorNamespace): Set { + const ids = new Set() + + for (const iface of namespace.interfaces) { + ids.add(iface.id) + } + + for (const e of namespace.enums) { + ids.add(e.id) + } + + for (const childNs of namespace.namespaces) { + for (const id of getNamespaceEntityIds(childNs)) { + ids.add(id) + } + } + + return ids +} + +function topologicalSortNamespaces(namespaces: GeneratorNamespace[]): GeneratorNamespace[] { + if (namespaces.length <= 1) return namespaces + + const nsWithName = namespaces.filter((ns): ns is GeneratorNamespace & { name: string } => ns.name !== undefined) + const nsEntityIds = new Map(nsWithName.map(ns => [ns.name, getNamespaceEntityIds(ns)])) + + const sortOp = new TopologicalSort( + new Map(nsWithName.map(ns => [ns.name, ns])), + ) + + for (const ns of nsWithName) { + const dependencyIds = getNamespaceDependencyIds(ns) + + for (const otherNs of nsWithName) { + if (otherNs.name === ns.name) continue + const otherEntityIds = nsEntityIds.get(otherNs.name) + + if (otherEntityIds) { + for (const depId of dependencyIds) { + if (otherEntityIds.has(depId)) { + sortOp.addEdge(otherNs.name, ns.name) + break + } + } + } + } + } + + return trySortNodes(sortOp) +} + +type GeneratorNamespace = { + name?: string + interfaces: SchemaInterface[] + enums: SchemaEnum[] + namespaces: GeneratorNamespace[] +} + +const rootNamespace = "0 root namespace 0" + +function extractNamespaces( + schemaEntities: SchemaEntity[], + depth = 0, + name: string | undefined = undefined, + context: ZodContext, +): GeneratorNamespace { + const { [rootNamespace]: rootNamespaceEntities, ...namespaces } = groupBy(schemaEntities, schemaEntity => { + const parts = schemaEntity.getFullName(context.nameTransform)?.split(".").slice(0, -1) + + return parts?.[depth] ?? rootNamespace + }) + + return { + name, + interfaces: rootNamespaceEntities?.filter(isSchemaInterface) ?? [], + enums: rootNamespaceEntities?.filter(isSchemaEnum) ?? [], + namespaces: toPairs(namespaces).map(([name, schemaInterfaces]) => + extractNamespaces(schemaInterfaces, depth + 1, name, context), + ), + } +} + +function throwErrorForDuplicateNames(generatorNamespace: GeneratorNamespace, context: ZodContext) { + const interfaceNames = generatorNamespace.interfaces.map(i => i.getName(context.nameTransform)) + const enumNames = generatorNamespace.enums.map(e => e.getName(context.nameTransform)) + + const allNames = [...interfaceNames, ...enumNames].filter(name => name !== undefined) + + const namesOccurrencesCounts = allNames.reduce((acc, name) => { + acc.set(name, (acc.get(name) ?? 0) + 1) + return acc + }, new Map()) + + const duplicateNames = Array.from(namesOccurrencesCounts.entries()) + .filter(([_, count]) => count > 1) + .map(([name]) => name) + + if (duplicateNames.length === 0) { + return + } + + const names = duplicateNames.join(", ") + + if (context.currentNamespace.length > 0 || generatorNamespace.name) { + const fullNamespaceName = generatorNamespace.name + ? [...context.currentNamespace, generatorNamespace.name] + : context.currentNamespace + throw new Error(`Error: namespace ${fullNamespaceName.join(".")} has duplicate names: ${names}`) + } else { + throw new Error(`Error: duplicate names: ${names}`) + } +} diff --git a/plugins/zod/src/generators/generatePropertySchema.ts b/plugins/zod/src/generators/generatePropertySchema.ts new file mode 100644 index 0000000..0b7a4e7 --- /dev/null +++ b/plugins/zod/src/generators/generatePropertySchema.ts @@ -0,0 +1,190 @@ +import ts from "typescript" +import { + isSchemaGenericType, + isSchemaInternalType, + isSchemaKnownType, + leancode, + SchemaProperty, + SchemaType, +} from "@leancodepl/contractsgenerator-typescript-schema" +import { fieldValidationReturnSchema } from "../configuration" +import { zodIdentifier } from "../utils/consts" +import { + getPropertyTypeCategory, + knownTypeToCategory, + type PropertyTypeCategory, +} from "../utils/getPropertyTypeCategory" +import { getSchemaName } from "../utils/getSchemaName" +import { parseZodCode } from "../utils/parseZodCode" +import { ZodContext } from "../zodContext" +import type { FieldValidationContext } from "../configuration" + +export function generatePropertySchema( + property: SchemaProperty, + context: ZodContext, + interfaceFullName: string, +): ts.PropertyAssignment { + const defaultSchema = generateZodSchemaForType(property.type, context) + + let zodSchema = defaultSchema + if (context.configuration.fieldValidation) { + const fieldPath = `${interfaceFullName}.${property.name}` + const defaultSchemaCode = context.printNode(defaultSchema) + const propertyTypeCategory = getPropertyTypeCategory(property.type, context) + + const validationContext: FieldValidationContext = { + name: property.name, + isNullable: property.type.isNullable, + type: propertyTypeCategory, + } + + const customSchemaCode = context.configuration.fieldValidation(fieldPath, validationContext) + + if (customSchemaCode !== undefined) { + const validationResult = fieldValidationReturnSchema.safeParse(customSchemaCode) + if (!validationResult.success) { + throw new Error( + `Invalid return type from fieldValidation for ${fieldPath}: expected string or undefined. ${validationResult.error.message}`, + ) + } + const fullCode = `${defaultSchemaCode}${customSchemaCode}` + zodSchema = parseZodCode(fullCode) + } + } + + return ts.factory.createPropertyAssignment(ts.factory.createIdentifier(property.name), zodSchema) +} + +export function generateZodSchemaForType(type: SchemaType, context: ZodContext): ts.Expression { + let baseSchema: ts.Expression + + if (isSchemaKnownType(type)) { + baseSchema = generateKnownTypeSchema(type, context) + } else if (isSchemaInternalType(type)) { + baseSchema = generateInternalTypeSchema(type, context) + } else if (isSchemaGenericType(type)) { + baseSchema = generateGenericTypeSchema(type) + } else { + throw new Error(`Unknown type received: ${JSON.stringify(type)}`) + } + + if (type.isNullable) { + return ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(baseSchema, "nullable"), + undefined, + [], + ) + } + + return baseSchema +} + +function generateKnownTypeSchema( + type: { type: number; typeArguments: SchemaType[] }, + context: ZodContext, +): ts.Expression { + const KnownType = leancode.contracts.KnownType + + switch (type.type) { + case KnownType.Array: + if (type.typeArguments.length > 0) { + const elementSchema = generateZodSchemaForType(type.typeArguments[0], context) + + return ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(zodIdentifier, "array"), + undefined, + [elementSchema], + ) + } + + return ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(zodIdentifier, "array"), + undefined, + [createZodCall("any")], + ) + case KnownType.Map: + if (type.typeArguments.length === 2) { + const keySchema = generateZodSchemaForType(type.typeArguments[0], context) + const valueSchema = generateZodSchemaForType(type.typeArguments[1], context) + + return ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(zodIdentifier, "record"), + undefined, + [keySchema, valueSchema], + ) + } + + return ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(zodIdentifier, "record"), + undefined, + [createZodCall("string"), createZodCall("any")], + ) + case KnownType.Object: + case KnownType.Binary: + return createZodCall("any") + default: + return generateZodSchemaFromCategory(knownTypeToCategory[type.type] ?? "unknown") + } +} + +function generateZodSchemaFromCategory(category: PropertyTypeCategory): ts.Expression { + switch (category) { + case "string": + case "number": + case "boolean": + return createZodCall(category) + case "array": + case "object": + case "enum": + case "unknown": + default: + return createZodCall("any") + } +} + +function generateInternalTypeSchema( + type: { id: string; typeArguments: SchemaType[] }, + context: ZodContext, +): ts.Expression { + const transformedName = context.nameTransform(type.id) + + if (transformedName === undefined) { + throw new Error(`Cannot generate schema for excluded type: ${type.id}`) + } + + const schemaName = getSchemaName(transformedName) + const namespaceParts = transformedName.split(".").slice(0, -1) + + let expression: ts.Expression + if (namespaceParts.length === 0) { + expression = ts.factory.createIdentifier(schemaName) + } else { + expression = ts.factory.createIdentifier(namespaceParts[0]) + + for (let i = 1; i < namespaceParts.length; i++) { + expression = ts.factory.createPropertyAccessExpression(expression, namespaceParts[i]) + } + + expression = ts.factory.createPropertyAccessExpression(expression, schemaName) + } + + // If the type has generic arguments, call the schema function with them + if (type.typeArguments.length > 0) { + const args = type.typeArguments.map(arg => generateZodSchemaForType(arg, context)) + return ts.factory.createCallExpression(expression, undefined, args) + } + + return expression +} + +function generateGenericTypeSchema(type: { name: string }): ts.Expression { + return ts.factory.createIdentifier(getSchemaName(type.name)) +} + +function createZodCall(method: string): ts.CallExpression { + return ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(zodIdentifier, method), + undefined, + [], + ) +} diff --git a/plugins/zod/src/index.ts b/plugins/zod/src/index.ts new file mode 100644 index 0000000..aac3264 --- /dev/null +++ b/plugins/zod/src/index.ts @@ -0,0 +1,89 @@ +import ts from "typescript" +import { + GeneratorPlugin, + GeneratorPluginInstance, + GeneratorSessionContext, +} from "@leancodepl/contractsgenerator-typescript-plugin" +import { getTypesMap } from "@leancodepl/contractsgenerator-typescript-types" +import { zodGeneratorPluginConfigurationSchema } from "./configuration" +import { generateNamespaces } from "./generators/generateNamespace" +import { zodIdentifier } from "./utils/consts" +import { ZodContext } from "./zodContext" + +export type { FieldValidationContext, FieldValidationFunction } from "./configuration" + +class ZodGeneratorPlugin implements GeneratorPluginInstance { + configuration + + constructor( + unsafeConfig: unknown, + private context: GeneratorSessionContext, + ) { + this.configuration = zodGeneratorPluginConfigurationSchema.parse(unsafeConfig) + } + + async beforeAll() { + const importStatement = ts.factory.createImportDeclaration( + undefined, + ts.factory.createImportClause( + undefined, + undefined, + ts.factory.createNamedImports([ts.factory.createImportSpecifier(false, undefined, zodIdentifier)]), + ), + ts.factory.createStringLiteral("zod"), + undefined, + ) + + const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }) + const sourceFile = ts.factory.createSourceFile( + [importStatement], + ts.factory.createToken(ts.SyntaxKind.EndOfFileToken), + ts.NodeFlags.Synthesized, + ) + + return printer.printNode(ts.EmitHint.Unspecified, importStatement, sourceFile) + "\n\n" + } + + async generate() { + const schema = await this.context.getSchema(this.configuration.input) + + const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }) + + const printNode = (node: ts.Node) => + printer.printNode( + ts.EmitHint.Unspecified, + node, + ts.factory.createSourceFile([], ts.factory.createToken(ts.SyntaxKind.EndOfFileToken), ts.NodeFlags.Synthesized), + ) + + const context: ZodContext = { + currentNamespace: [], + nameTransform: this.configuration.nameTransform ?? (id => id), + typesMap: getTypesMap({ + customTypes: this.configuration.customTypes, + extensions: schema.protocol.extensions, + }), + schemaEntities: schema.entities, + printNode, + configuration: this.configuration, + } + + const namespaces = generateNamespaces(schema.entities, context) + + const sourceFile = ts.factory.createSourceFile( + namespaces, + ts.factory.createToken(ts.SyntaxKind.EndOfFileToken), + ts.NodeFlags.Synthesized, + ) + + return printNode(sourceFile) + } +} + +const zodGeneratorPlugin: GeneratorPlugin = { + instance(unsafeConfig, context) { + return new ZodGeneratorPlugin(unsafeConfig, context.session) + }, +} + +export default zodGeneratorPlugin diff --git a/plugins/zod/src/utils/consts.ts b/plugins/zod/src/utils/consts.ts new file mode 100644 index 0000000..2a46d49 --- /dev/null +++ b/plugins/zod/src/utils/consts.ts @@ -0,0 +1,3 @@ +import ts from "typescript" + +export const zodIdentifier = ts.factory.createIdentifier("z") diff --git a/plugins/zod/src/utils/formatComment.ts b/plugins/zod/src/utils/formatComment.ts new file mode 100644 index 0000000..4018113 --- /dev/null +++ b/plugins/zod/src/utils/formatComment.ts @@ -0,0 +1,58 @@ +import { + SchemaAttribute, + SchemaAttributeArgument, + SchemaAttributeNamedArgument, +} from "@leancodepl/contractsgenerator-typescript-schema" + +export function formatComment(comment: string | undefined, attributes: SchemaAttribute[]): string | undefined { + if (!comment && attributes.length === 0) { + return undefined + } + + const parts: string[] = [] + + if (comment) { + parts.push(comment) + } + + if (attributes.length > 0) { + const attributeComments = attributes.map(attr => formatAttribute(attr)) + parts.push(...attributeComments) + } + + return parts.length > 0 ? parts.join("\n") : undefined +} + +function formatAttribute(attribute: SchemaAttribute): string { + const formattedArguments = [...attribute.positionalArguments, ...attribute.namedArguments] + .map(formatArgument) + .join(", ") + + if (attribute.name === "System.ObsoleteAttribute") { + return `@deprecated ${formattedArguments}` + } + + let comment = attribute.name + + if (formattedArguments) { + comment += `(${formattedArguments})` + } + + return `@attribute ${comment}` +} + +function formatArgument(argument: SchemaAttributeArgument): string { + let formattedValue: string + + if (typeof argument.value.value === "string") { + formattedValue = `"${argument.value.value}"` + } else { + formattedValue = argument.value.value?.toString() ?? "null" + } + + if (argument instanceof SchemaAttributeNamedArgument) { + return `${argument.name}: ${formattedValue}` + } + + return formattedValue +} diff --git a/plugins/zod/src/utils/getPropertyTypeCategory.ts b/plugins/zod/src/utils/getPropertyTypeCategory.ts new file mode 100644 index 0000000..dac7844 --- /dev/null +++ b/plugins/zod/src/utils/getPropertyTypeCategory.ts @@ -0,0 +1,60 @@ +import { + isSchemaEnum, + isSchemaGenericType, + isSchemaInternalType, + isSchemaKnownType, + leancode, + type SchemaEntity, + type SchemaType, +} from "@leancodepl/contractsgenerator-typescript-schema" +import type { GenerateContext } from "@leancodepl/contractsgenerator-typescript-types" + +export type PropertyTypeCategory = "array" | "boolean" | "enum" | "number" | "object" | "record" | "string" | "unknown" + +export const knownTypeToCategory: Record = { + [leancode.contracts.KnownType.String]: "string", + [leancode.contracts.KnownType.Guid]: "string", + [leancode.contracts.KnownType.Uri]: "string", + [leancode.contracts.KnownType.DateOnly]: "string", + [leancode.contracts.KnownType.TimeOnly]: "string", + [leancode.contracts.KnownType.DateTimeOffset]: "string", + [leancode.contracts.KnownType.DateTime]: "string", + [leancode.contracts.KnownType.TimeSpan]: "string", + [leancode.contracts.KnownType.Boolean]: "boolean", + [leancode.contracts.KnownType.Int8]: "number", + [leancode.contracts.KnownType.UInt8]: "number", + [leancode.contracts.KnownType.Int16]: "number", + [leancode.contracts.KnownType.UInt16]: "number", + [leancode.contracts.KnownType.Int32]: "number", + [leancode.contracts.KnownType.UInt32]: "number", + [leancode.contracts.KnownType.Int64]: "number", + [leancode.contracts.KnownType.UInt64]: "number", + [leancode.contracts.KnownType.Float32]: "number", + [leancode.contracts.KnownType.Float64]: "number", + [leancode.contracts.KnownType.Array]: "array", + [leancode.contracts.KnownType.Map]: "record", + [leancode.contracts.KnownType.Object]: "object", +} + +export function getPropertyTypeCategory( + type: SchemaType, + context: GenerateContext & { schemaEntities?: SchemaEntity[] }, +): PropertyTypeCategory { + if (isSchemaKnownType(type)) { + return knownTypeToCategory[type.type] ?? "unknown" + } + + if (isSchemaInternalType(type)) { + const entity = context.schemaEntities?.find((e: SchemaEntity) => e.id === type.id) + if (entity && isSchemaEnum(entity)) { + return "enum" + } + return "object" + } + + if (isSchemaGenericType(type)) { + return "unknown" + } + + return "unknown" +} diff --git a/plugins/zod/src/utils/getSchemaName.ts b/plugins/zod/src/utils/getSchemaName.ts new file mode 100644 index 0000000..94859d4 --- /dev/null +++ b/plugins/zod/src/utils/getSchemaName.ts @@ -0,0 +1,4 @@ +export function getSchemaName(fullName: string): string { + const parts = fullName.split(".") + return parts.at(-1) + "Schema" +} diff --git a/plugins/zod/src/utils/parseZodCode.ts b/plugins/zod/src/utils/parseZodCode.ts new file mode 100644 index 0000000..4d9dd05 --- /dev/null +++ b/plugins/zod/src/utils/parseZodCode.ts @@ -0,0 +1,81 @@ +import ts from "typescript" + +export function parseZodCode(code: string): ts.Expression { + const sourceFile = ts.createSourceFile("temp.ts", code, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS) + + if (sourceFile.statements.length === 0) { + throw new Error(`Failed to parse Zod code: ${code}. No statements found.`) + } + + const statement = sourceFile.statements[0] + if (!ts.isExpressionStatement(statement)) { + throw new Error( + `Failed to parse Zod code: ${code}. Expected an expression statement, got ${ts.SyntaxKind[statement.kind]}.`, + ) + } + + const result = ts.transform(sourceFile, [ + context => { + const visitor: ts.Visitor = (node: ts.Node) => { + if (ts.isNumericLiteral(node)) { + const numValue = Number(node.text) + return Number.isNaN(numValue) + ? context.factory.createNumericLiteral(node.text) + : context.factory.createNumericLiteral(numValue) + } + + if (ts.isStringLiteral(node)) { + return context.factory.createStringLiteral(node.text) + } + + if (ts.isNoSubstitutionTemplateLiteral(node)) { + return context.factory.createNoSubstitutionTemplateLiteral(node.text, node.rawText) + } + + if (ts.isTemplateExpression(node)) { + const visitedHead = ts.visitNode(node.head, visitor) + if (!visitedHead || !ts.isTemplateHead(visitedHead)) { + throw new Error(`Failed to transform template head: expected TemplateHead`) + } + + const templateSpans = node.templateSpans.map(span => { + const visitedExpression = ts.visitNode(span.expression, visitor) + if (!visitedExpression || !ts.isExpression(visitedExpression)) { + throw new Error(`Failed to transform template expression: expected Expression`) + } + + const visitedLiteral = ts.visitNode(span.literal, visitor) + if (!visitedLiteral || (!ts.isTemplateMiddle(visitedLiteral) && !ts.isTemplateTail(visitedLiteral))) { + throw new Error(`Failed to transform template literal: expected TemplateMiddle or TemplateTail`) + } + + return context.factory.createTemplateSpan(visitedExpression, visitedLiteral) + }) + + return context.factory.createTemplateExpression(visitedHead, templateSpans) + } + + if (ts.isIdentifier(node)) { + return context.factory.createIdentifier(node.text) + } + + return ts.visitEachChild(node, visitor, context) + } + + return (sourceFile: ts.SourceFile) => { + const visited = ts.visitNode(sourceFile, visitor) ?? sourceFile + if (!ts.isSourceFile(visited)) { + throw new Error(`Failed to transform source file: expected SourceFile`) + } + return visited + } + }, + ]) + + const transformedStatement = result.transformed[0].statements[0] + if (!ts.isExpressionStatement(transformedStatement)) { + throw new Error(`Failed to transform Zod code: ${code}`) + } + + return transformedStatement.expression +} diff --git a/plugins/zod/src/zodContext.ts b/plugins/zod/src/zodContext.ts new file mode 100644 index 0000000..91aee28 --- /dev/null +++ b/plugins/zod/src/zodContext.ts @@ -0,0 +1,10 @@ +import ts from "typescript" +import { SchemaEntity } from "@leancodepl/contractsgenerator-typescript-schema" +import { GenerateContext } from "@leancodepl/contractsgenerator-typescript-types" +import { ZodGeneratorPluginConfiguration } from "./configuration" + +export interface ZodContext extends GenerateContext { + printNode: (node: ts.Node) => string + configuration: ZodGeneratorPluginConfiguration + schemaEntities: SchemaEntity[] +} diff --git a/plugins/zod/tsconfig.json b/plugins/zod/tsconfig.json new file mode 100644 index 0000000..62ebbd9 --- /dev/null +++ b/plugins/zod/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/plugins/zod/tsconfig.lib.json b/plugins/zod/tsconfig.lib.json new file mode 100644 index 0000000..33eca2c --- /dev/null +++ b/plugins/zod/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/plugins/zod/tsconfig.spec.json b/plugins/zod/tsconfig.spec.json new file mode 100644 index 0000000..ff08add --- /dev/null +++ b/plugins/zod/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/test/test/samples/circular.pb b/test/test/samples/circular.pb new file mode 100644 index 0000000..8c65964 Binary files /dev/null and b/test/test/samples/circular.pb differ diff --git a/test/test/src/__snapshots__/zodPlugin.spec.ts.snap b/test/test/src/__snapshots__/zodPlugin.spec.ts.snap new file mode 100644 index 0000000..78421eb --- /dev/null +++ b/test/test/src/__snapshots__/zodPlugin.spec.ts.snap @@ -0,0 +1,3531 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`zodPlugin applies custom field validation when provided 1`] = ` +Object { + "test.ts": "import { z } from \\"zod\\"; + +export const AuthSchema = z.object({}); +export const KnownClaimsSchema = z.object({}); +export const RolesSchema = z.object({}); +export const LocationDTOSchema = z.object({ + Latitude: z.number().positive().max(90), + Longitude: z.number().positive().max(90) +}); +export const ServiceProviderLogoUploadLinkDTOSchema = z.object({ + Link: z.string(), + RequiredHeaders: z.record(z.string(), z.string()).refine(val => { const test = { test: { test: 5 } }; return typeof val === \\"object\\" && val !== null; }) +}); +export const ServiceProviderLogoUploadLinkSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const MoneyDTOSchema = z.object({ + Value: z.number().refine(val => val > 0, { message: \\"Must be positive\\" }), + Currency: z.string().refine(val => (val ? val.length === 3 : false)) +}).meta({ + comment: \\"The DTO representing a monetary value, e.g. amount with a currency.\\\\nThe amount of money, in the smallest currency unit (e.g. grosz, cent).\\\\nThe (three letter) currency name, e.g. PLN, USD.\\" +}); +export const AddTimeslotSchema = z.object({ + ServiceProviderId: z.string().refine(val => val.length > 0), + Date: z.string().refine(val => (val ? val.length === 10 : false)), + StartTime: z.string().refine(val => val.startsWith(\`0\`) || val.startsWith(\`1\`)), + EndTime: z.string().refine(val => !isNaN(Number(val))), + Price: MoneyDTOSchema +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const IReservationRelatedSchema = z.object({ + ReservationId: z.string() +}); +export const IWhenOwnsReservationSchema = z.object({}); +export const CancelReservationSchema = z.object({}).extend(IReservationRelatedSchema.shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\\\n@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute\\" +}); +export const ReservationCancelledNotificationDTOSchema = z.object({ + ReservationId: z.string(), + CalendarDayId: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string().refine(val => val.length > 0), + ServiceProviderName: z.string(), + Date: z.string().refine(val => (val ? val.length === 10 : false)), + StartTime: z.string().refine(val => val.startsWith(\`0\`) || val.startsWith(\`1\`)), + EndTime: z.string().refine(val => !isNaN(Number(val))) +}); +export const ReservationCreatedNotificationDTOSchema = z.object({ + ReservationId: z.string(), + CalendarDayId: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string().refine(val => val.length > 0), + ServiceProviderName: z.string(), + Date: z.string().refine(val => (val ? val.length === 10 : false)), + StartTime: z.string().refine(val => val.startsWith(\`0\`) || val.startsWith(\`1\`)), + EndTime: z.string().refine(val => !isNaN(Number(val))) +}); +export const ReserveTimeslotSchema = z.object({ + CalendarDayId: z.string(), + TimeslotId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const TimeslotDTOSchema = z.object({ + Id: z.string(), + CalendarDayId: z.string(), + StartTime: z.string().refine(val => val.startsWith(\`0\`) || val.startsWith(\`1\`)), + EndTime: z.string().refine(val => !isNaN(Number(val))), + Price: MoneyDTOSchema, + IsReserved: z.boolean() +}); +export const AssignmentEmployerEmbedSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const AdminEmployeeDTOSchema = z.object({ + Id: z.string(), + Name: z.string().min(1) +}); +export const CreateEmployeeSchema = z.object({ + Name: z.string().min(1), + Email: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const EmployeeDTOSchema = z.object({ + Id: z.string(), + Name: z.string().min(1), + Email: z.string() +}); +export const AllEmployeesSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const SendCustomNotificationSchema = z.object({ + Content: z.string(), + ImageUrl: z.string().nullable() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const KratosIdentityDTOSchema = z.object({ + Id: z.string(), + CreatedAt: z.string(), + UpdatedAt: z.string(), + SchemaId: z.string(), + Email: z.string() +}); +export const PaginatedResultSchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Items: z.array(TResultSchema), + TotalCount: z.number() +}); +export const PaginatedQuerySchema = (TResultSchema: z.ZodTypeAny) => z.object({ + PageNumber: z.number(), + PageSize: z.number() +}); +export const SearchIdentitiesSchema = z.object({ + SchemaId: z.string().nullable(), + EmailPattern: z.string().nullable(), + GivenNamePattern: z.string().nullable(), + FamilyNamePattern: z.string().nullable() +}).extend(PaginatedQuerySchema(KratosIdentityDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const AdminProjectDTOSchema = z.object({ + Id: z.string(), + Name: z.string().min(1) +}); +export const AssignEmployeeToAssignmentSchema = z.object({ + AssignmentId: z.string(), + EmployeeId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const AssignmentWriteDTOSchema = z.object({ + Name: z.string().min(1) +}); +export const AssignmentDTOSchema = z.object({ + Id: z.string(), + AssignedEmployeeId: z.string().nullable() +}).extend(AssignmentWriteDTOSchema.shape); +export const AddAssignmentsToProjectSchema = z.object({ + ProjectId: z.string(), + Assignments: z.array(AssignmentWriteDTOSchema) +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const CreateProjectSchema = z.object({ + Name: z.string().min(1) +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const EmployeeAssignedToAssignmentDTOSchema = z.object({ + AssignmentId: z.string(), + EmployeeId: z.string() +}); +export const EmployeeAssignedToProjectAssignmentDTOSchema = z.object({ + ProjectId: z.string(), + AssignmentId: z.string() +}); +export const EmployeeAssignmentsTopicSchema = z.object({ + EmployeeId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const EmployeeUnassignedFromAssignmentDTOSchema = z.object({ + AssignmentId: z.string() +}); +export const EmployeeUnassignedFromProjectAssignmentDTOSchema = z.object({ + ProjectId: z.string(), + AssignmentId: z.string() +}); +export const ProjectDTOSchema = z.object({ + Id: z.string(), + Name: z.string().min(1) +}); +export const AllProjectsSchema = z.object({ + SortByNameDescending: z.boolean() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const ProjectDetailsDTOSchema = z.object({ + Assignments: z.array(AssignmentDTOSchema) +}).extend(ProjectDTOSchema.shape); +export const ProjectDetailsSchema = z.object({ + Id: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const ProjectEmployeesAssignmentsTopicSchema = z.object({ + ProjectId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const UnassignEmployeeFromAssignmentSchema = z.object({ + AssignmentId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const SortedQuerySchema = (TResultSchema: z.ZodTypeAny, TSortSchema: z.ZodTypeAny) => z.object({ + SortBy: TSortSchema, + SortByDescending: z.boolean() +}).extend(PaginatedQuerySchema(TResultSchema).shape); +export const DeleteOwnAccountSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const PermissionsSchema = z.object({}); +export const RatingAlreadySentSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"RateApp\\\\\\")\\" +}); +export const AdminFilterRangeSchema = (TSchema: z.ZodTypeAny) => z.object({ + From: TSchema.nullable(), + To: TSchema.nullable() +}); +export const AdminQueryResultSchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Total: z.number(), + Items: z.array(TResultSchema) +}); +export const AdminQuerySchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Page: z.number(), + PageSize: z.number(), + SortDescending: z.boolean().nullable(), + SortBy: z.string().nullable() +}); +export const AllProjectsAdminSchema = z.object({ + NameFilter: z.string().nullable() +}).extend(AdminQuerySchema(AdminProjectDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const AllEmployeesAdminSchema = z.object({ + NameFilter: z.string().nullable() +}).extend(AdminQuerySchema(AdminEmployeeDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const ReservationStatusDTOSchema = z.enum({ + \\"Pending\\": 0, + \\"Confirmed\\": 1, + \\"Rejected\\": 2, + \\"Paid\\": 3, + \\"Cancelled\\": 4, + \\"Completed\\": 5 +}).meta({ + \\"meta:enum\\": { + \\"Pending\\": 0, + \\"Confirmed\\": 1, + \\"Rejected\\": 2, + \\"Paid\\": 3, + \\"Cancelled\\": 4, + \\"Completed\\": 5 + } +}); +export const ServiceProviderTypeDTOSchema = z.enum({ + \\"Hairdresser\\": 0, + \\"BarberShop\\": 1, + \\"Groomer\\": 2 +}).meta({ + \\"meta:enum\\": { + \\"Hairdresser\\": 0, + \\"BarberShop\\": 1, + \\"Groomer\\": 2 + } +}); +export const ServiceProviderSummaryDTOSchema = z.object({ + Id: z.string(), + Name: z.string().min(1), + Type: ServiceProviderTypeDTOSchema, + Thumbnail: z.string().min(1).max(500), + IsPromotionActive: z.boolean(), + Address: z.string().refine(val => val !== undefined), + Location: LocationDTOSchema, + Ratings: z.number().refine(val => val >= 0 && val <= 5) +}); +export const ServiceProviderDetailsDTOSchema = z.object({ + Id: z.string(), + Name: z.string().min(1), + Description: z.string().refine(val => (val && val.length > 0 ? val.trim().length > 0 : false)), + Type: ServiceProviderTypeDTOSchema, + Address: z.string().refine(val => val !== undefined), + Location: LocationDTOSchema, + IsPromotionActive: z.boolean(), + Ratings: z.number().refine(val => val >= 0 && val <= 5), + CoverPhoto: z.string(), + Thumbnail: z.string().min(1).max(500), + Timeslots: z.array(TimeslotDTOSchema) +}); +export const ServiceProviderDetailsSchema = z.object({ + ServiceProviderId: z.string().refine(val => val.length > 0), + CalendarDate: z.string() +}).meta({ + comment: \\"The query will return details about service provider and all available timeslots from\\\\nto\\\\n +X days (configurable on query level).\\\\n@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const MyReservationDTOSchema = z.object({ + Id: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string().refine(val => val.length > 0), + ServiceProviderName: z.string(), + Type: ServiceProviderTypeDTOSchema, + Address: z.string().refine(val => val !== undefined), + Location: LocationDTOSchema, + Date: z.string().refine(val => (val ? val.length === 10 : false)), + StartTime: z.string().refine(val => val.startsWith(\`0\`) || val.startsWith(\`1\`)), + EndTime: z.string().refine(val => !isNaN(Number(val))), + Price: MoneyDTOSchema, + Status: ReservationStatusDTOSchema +}); +export const MyReservationsSchema = z.object({}).extend(PaginatedQuerySchema(MyReservationDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const MyReservationByTimeslotIdSchema = z.object({ + TimeslotId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const MyReservationByIdSchema = z.object({}).extend(IReservationRelatedSchema.shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\\\n@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute\\" +}); +export const CreateServiceProviderSchema = z.object({ + Name: z.string().min(1), + Type: ServiceProviderTypeDTOSchema, + Description: z.string().refine(val => (val && val.length > 0 ? val.trim().length > 0 : false)), + CoverPhoto: z.string(), + Thumbnail: z.string().min(1).max(500), + Address: z.string().refine(val => val !== undefined), + Location: LocationDTOSchema, + Ratings: z.number().refine(val => val >= 0 && val <= 5) +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const ServiceProviderSortFieldsDTOSchema = z.enum({ + \\"Name\\": 0, + \\"Type\\": 1, + \\"Ratings\\": 2 +}).meta({ + \\"meta:enum\\": { + \\"Name\\": 0, + \\"Type\\": 1, + \\"Ratings\\": 2 + } +}); +export const AllServiceProvidersSchema = z.object({ + NameFilter: z.string().nullable(), + TypeFilter: ServiceProviderTypeDTOSchema.nullable(), + PromotedOnly: z.boolean() +}).extend(SortedQuerySchema(ServiceProviderSummaryDTOSchema, ServiceProviderSortFieldsDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const AppRatingPlatformDTOSchema = z.enum({ + \\"Android\\": 0, + \\"IOS\\": 1 +}).meta({ + \\"meta:enum\\": { + \\"Android\\": 0, + \\"IOS\\": 1 + } +}); +export const SubmitAppRatingSchema = z.object({ + Rating: z.number(), + AdditionalComment: z.string().nullable(), + Platform: AppRatingPlatformDTOSchema, + SystemVersion: z.string(), + AppVersion: z.string(), + Metadata: z.record(z.string(), z.any()).nullable() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"RateApp\\\\\\")\\" +}); +export const PlatformDTOSchema = z.enum({ + \\"Android\\": 0, + \\"IOS\\": 1 +}).meta({ + \\"meta:enum\\": { + \\"Android\\": 0, + \\"IOS\\": 1 + } +}); +export const VersionSupportResultDTOSchema = z.enum({ + \\"UpdateRequired\\": 0, + \\"UpdateSuggested\\": 1, + \\"UpToDate\\": 2 +}).meta({ + \\"meta:enum\\": { + \\"UpdateRequired\\": 0, + \\"UpdateSuggested\\": 1, + \\"UpToDate\\": 2 + } +}); +export const VersionSupportDTOSchema = z.object({ + CurrentlySupportedVersion: z.string(), + MinimumRequiredVersion: z.string(), + Result: VersionSupportResultDTOSchema +}); +export const VersionSupportSchema = z.object({ + Platform: PlatformDTOSchema, + Version: z.string() +}); +", +} +`; + +exports[`zodPlugin can exclude DTOs via nameTransform 1`] = ` +Object { + "test.ts": "import { z } from \\"zod\\"; + +export namespace ExampleApp { + export namespace Examples { + export namespace TestContracts { + export namespace RemoveNamespace { + export const DTOFromRemovedNamespaceSchema = z.object({ + Latitude: z.number(), + Longitude: z.number() + }); + } + export namespace Shared { + export const ExtendedInterfaceSchema = z.object({ + Extended: z.number() + }); + export const ExtendingInterfaceSchema = z.object({ + Extending: z.number() + }).extend(ExampleApp.Examples.TestContracts.Shared.ExtendedInterfaceSchema.shape); + export const NestedInterfaceSchema = z.object({ + Nest: z.number() + }); + export const NestingInterfaceSchema = z.object({ + Nested: ExampleApp.Examples.TestContracts.Shared.NestedInterfaceSchema + }); + export const RemoveCommandDTOSchema = z.object({ + Name: z.string() + }); + export const RemoveCommandSchema = z.object({ + ProjectId: z.string(), + Items: z.array(ExampleApp.Examples.TestContracts.Shared.RemoveCommandDTOSchema) + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const RemoveOperationDTOSchema = z.object({ + Name: z.string() + }); + export const RemoveOperationSchema = z.object({ + ProjectId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const RemoveQueryDTOSchema = z.object({ + Id: z.string() + }); + export const RemoveQuerySchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const RemoveTopicSchema = z.object({ + ItemId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const RemoveTopicDTOSchema = z.object({ + ItemId: z.string() + }); + export const RemoveEnumSchema = z.enum({ + \\"Remove1\\": 0, + \\"Remove2\\": 1 + }).meta({ + \\"meta:enum\\": { + \\"Remove1\\": 0, + \\"Remove2\\": 1 + } + }); + } + } + } +} +", +} +`; + +exports[`zodPlugin generates JSON schemas from zod schemas with defaults 1`] = ` +Object { + "AddAssignmentsToProjectSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute", + "properties": Object { + "Assignments": Object { + "items": Object { + "additionalProperties": false, + "properties": Object { + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Name", + ], + "type": "object", + }, + "type": "array", + }, + "ProjectId": Object { + "type": "string", + }, + }, + "required": Array [ + "ProjectId", + "Assignments", + ], + "type": "object", + }, + "AddTimeslotSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "Date": Object { + "type": "string", + }, + "EndTime": Object { + "type": "string", + }, + "Price": Object { + "additionalProperties": false, + "comment": "The DTO representing a monetary value, e.g. amount with a currency. +The amount of money, in the smallest currency unit (e.g. grosz, cent). +The (three letter) currency name, e.g. PLN, USD.", + "properties": Object { + "Currency": Object { + "type": "string", + }, + "Value": Object { + "type": "number", + }, + }, + "required": Array [ + "Value", + "Currency", + ], + "type": "object", + }, + "ServiceProviderId": Object { + "type": "string", + }, + "StartTime": Object { + "type": "string", + }, + }, + "required": Array [ + "ServiceProviderId", + "Date", + "StartTime", + "EndTime", + "Price", + ], + "type": "object", + }, + "AdminEmployeeDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Id": Object { + "type": "string", + }, + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "Name", + ], + "type": "object", + }, + "AdminFilterRangeSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "From": Object { + "anyOf": Array [ + Object {}, + Object { + "type": "null", + }, + ], + }, + "To": Object { + "anyOf": Array [ + Object {}, + Object { + "type": "null", + }, + ], + }, + }, + "required": Array [ + "From", + "To", + ], + "type": "object", + }, + "AdminProjectDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Id": Object { + "type": "string", + }, + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "Name", + ], + "type": "object", + }, + "AdminQueryResultSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Items": Object { + "items": Object {}, + "type": "array", + }, + "Total": Object { + "type": "number", + }, + }, + "required": Array [ + "Total", + "Items", + ], + "type": "object", + }, + "AdminQuerySchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Page": Object { + "type": "number", + }, + "PageSize": Object { + "type": "number", + }, + "SortBy": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "SortDescending": Object { + "anyOf": Array [ + Object { + "type": "boolean", + }, + Object { + "type": "null", + }, + ], + }, + }, + "required": Array [ + "Page", + "PageSize", + "SortDescending", + "SortBy", + ], + "type": "object", + }, + "AllEmployeesAdminSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "NameFilter": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "Page": Object { + "type": "number", + }, + "PageSize": Object { + "type": "number", + }, + "SortBy": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "SortDescending": Object { + "anyOf": Array [ + Object { + "type": "boolean", + }, + Object { + "type": "null", + }, + ], + }, + }, + "required": Array [ + "NameFilter", + "Page", + "PageSize", + "SortDescending", + "SortBy", + ], + "type": "object", + }, + "AllEmployeesSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object {}, + "type": "object", + }, + "AllProjectsAdminSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "NameFilter": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "Page": Object { + "type": "number", + }, + "PageSize": Object { + "type": "number", + }, + "SortBy": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "SortDescending": Object { + "anyOf": Array [ + Object { + "type": "boolean", + }, + Object { + "type": "null", + }, + ], + }, + }, + "required": Array [ + "NameFilter", + "Page", + "PageSize", + "SortDescending", + "SortBy", + ], + "type": "object", + }, + "AllProjectsSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute", + "properties": Object { + "SortByNameDescending": Object { + "type": "boolean", + }, + }, + "required": Array [ + "SortByNameDescending", + ], + "type": "object", + }, + "AllServiceProvidersSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\")", + "properties": Object { + "NameFilter": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "PageNumber": Object { + "type": "number", + }, + "PageSize": Object { + "type": "number", + }, + "PromotedOnly": Object { + "type": "boolean", + }, + "SortBy": Object { + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "Name": 0, + "Ratings": 2, + "Type": 1, + }, + "type": "number", + }, + "SortByDescending": Object { + "type": "boolean", + }, + "TypeFilter": Object { + "anyOf": Array [ + Object { + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "BarberShop": 1, + "Groomer": 2, + "Hairdresser": 0, + }, + "type": "number", + }, + Object { + "type": "null", + }, + ], + }, + }, + "required": Array [ + "NameFilter", + "TypeFilter", + "PromotedOnly", + "SortBy", + "SortByDescending", + "PageNumber", + "PageSize", + ], + "type": "object", + }, + "AppRatingPlatformDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": Array [ + 0, + 1, + ], + "meta:enum": Object { + "Android": 0, + "IOS": 1, + }, + "type": "number", + }, + "AssignEmployeeToAssignmentSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "AssignmentId": Object { + "type": "string", + }, + "EmployeeId": Object { + "type": "string", + }, + }, + "required": Array [ + "AssignmentId", + "EmployeeId", + ], + "type": "object", + }, + "AssignmentDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "AssignedEmployeeId": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "Id": Object { + "type": "string", + }, + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "AssignedEmployeeId", + "Name", + ], + "type": "object", + }, + "AssignmentEmployerEmbedSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object {}, + "type": "object", + }, + "AssignmentWriteDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Name", + ], + "type": "object", + }, + "AuthSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object {}, + "type": "object", + }, + "CancelReservationSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\") +@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute", + "properties": Object { + "ReservationId": Object { + "type": "string", + }, + }, + "required": Array [ + "ReservationId", + ], + "type": "object", + }, + "CreateEmployeeSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "Email": Object { + "type": "string", + }, + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Name", + "Email", + ], + "type": "object", + }, + "CreateProjectSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute", + "properties": Object { + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Name", + ], + "type": "object", + }, + "CreateServiceProviderSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "Address": Object { + "type": "string", + }, + "CoverPhoto": Object { + "type": "string", + }, + "Description": Object { + "type": "string", + }, + "Location": Object { + "additionalProperties": false, + "properties": Object { + "Latitude": Object { + "type": "number", + }, + "Longitude": Object { + "type": "number", + }, + }, + "required": Array [ + "Latitude", + "Longitude", + ], + "type": "object", + }, + "Name": Object { + "type": "string", + }, + "Ratings": Object { + "type": "number", + }, + "Thumbnail": Object { + "type": "string", + }, + "Type": Object { + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "BarberShop": 1, + "Groomer": 2, + "Hairdresser": 0, + }, + "type": "number", + }, + }, + "required": Array [ + "Name", + "Type", + "Description", + "CoverPhoto", + "Thumbnail", + "Address", + "Location", + "Ratings", + ], + "type": "object", + }, + "DeleteOwnAccountSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\")", + "properties": Object {}, + "type": "object", + }, + "EmployeeAssignedToAssignmentDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "AssignmentId": Object { + "type": "string", + }, + "EmployeeId": Object { + "type": "string", + }, + }, + "required": Array [ + "AssignmentId", + "EmployeeId", + ], + "type": "object", + }, + "EmployeeAssignedToProjectAssignmentDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "AssignmentId": Object { + "type": "string", + }, + "ProjectId": Object { + "type": "string", + }, + }, + "required": Array [ + "ProjectId", + "AssignmentId", + ], + "type": "object", + }, + "EmployeeAssignmentsTopicSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute", + "properties": Object { + "EmployeeId": Object { + "type": "string", + }, + }, + "required": Array [ + "EmployeeId", + ], + "type": "object", + }, + "EmployeeDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Email": Object { + "type": "string", + }, + "Id": Object { + "type": "string", + }, + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "Name", + "Email", + ], + "type": "object", + }, + "EmployeeUnassignedFromAssignmentDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "AssignmentId": Object { + "type": "string", + }, + }, + "required": Array [ + "AssignmentId", + ], + "type": "object", + }, + "EmployeeUnassignedFromProjectAssignmentDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "AssignmentId": Object { + "type": "string", + }, + "ProjectId": Object { + "type": "string", + }, + }, + "required": Array [ + "ProjectId", + "AssignmentId", + ], + "type": "object", + }, + "IReservationRelatedSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "ReservationId": Object { + "type": "string", + }, + }, + "required": Array [ + "ReservationId", + ], + "type": "object", + }, + "IWhenOwnsReservationSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object {}, + "type": "object", + }, + "KnownClaimsSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object {}, + "type": "object", + }, + "KratosIdentityDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "CreatedAt": Object { + "type": "string", + }, + "Email": Object { + "type": "string", + }, + "Id": Object { + "type": "string", + }, + "SchemaId": Object { + "type": "string", + }, + "UpdatedAt": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "CreatedAt", + "UpdatedAt", + "SchemaId", + "Email", + ], + "type": "object", + }, + "LocationDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Latitude": Object { + "type": "number", + }, + "Longitude": Object { + "type": "number", + }, + }, + "required": Array [ + "Latitude", + "Longitude", + ], + "type": "object", + }, + "MoneyDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "The DTO representing a monetary value, e.g. amount with a currency. +The amount of money, in the smallest currency unit (e.g. grosz, cent). +The (three letter) currency name, e.g. PLN, USD.", + "properties": Object { + "Currency": Object { + "type": "string", + }, + "Value": Object { + "type": "number", + }, + }, + "required": Array [ + "Value", + "Currency", + ], + "type": "object", + }, + "MyReservationByIdSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\") +@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute", + "properties": Object { + "ReservationId": Object { + "type": "string", + }, + }, + "required": Array [ + "ReservationId", + ], + "type": "object", + }, + "MyReservationByTimeslotIdSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\")", + "properties": Object { + "TimeslotId": Object { + "type": "string", + }, + }, + "required": Array [ + "TimeslotId", + ], + "type": "object", + }, + "MyReservationDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Address": Object { + "type": "string", + }, + "Date": Object { + "type": "string", + }, + "EndTime": Object { + "type": "string", + }, + "Id": Object { + "type": "string", + }, + "Location": Object { + "additionalProperties": false, + "properties": Object { + "Latitude": Object { + "type": "number", + }, + "Longitude": Object { + "type": "number", + }, + }, + "required": Array [ + "Latitude", + "Longitude", + ], + "type": "object", + }, + "Price": Object { + "additionalProperties": false, + "comment": "The DTO representing a monetary value, e.g. amount with a currency. +The amount of money, in the smallest currency unit (e.g. grosz, cent). +The (three letter) currency name, e.g. PLN, USD.", + "properties": Object { + "Currency": Object { + "type": "string", + }, + "Value": Object { + "type": "number", + }, + }, + "required": Array [ + "Value", + "Currency", + ], + "type": "object", + }, + "ServiceProviderId": Object { + "type": "string", + }, + "ServiceProviderName": Object { + "type": "string", + }, + "StartTime": Object { + "type": "string", + }, + "Status": Object { + "enum": Array [ + 0, + 1, + 2, + 3, + 4, + 5, + ], + "meta:enum": Object { + "Cancelled": 4, + "Completed": 5, + "Confirmed": 1, + "Paid": 3, + "Pending": 0, + "Rejected": 2, + }, + "type": "number", + }, + "TimeslotId": Object { + "type": "string", + }, + "Type": Object { + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "BarberShop": 1, + "Groomer": 2, + "Hairdresser": 0, + }, + "type": "number", + }, + }, + "required": Array [ + "Id", + "TimeslotId", + "ServiceProviderId", + "ServiceProviderName", + "Type", + "Address", + "Location", + "Date", + "StartTime", + "EndTime", + "Price", + "Status", + ], + "type": "object", + }, + "MyReservationsSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\")", + "properties": Object { + "PageNumber": Object { + "type": "number", + }, + "PageSize": Object { + "type": "number", + }, + }, + "required": Array [ + "PageNumber", + "PageSize", + ], + "type": "object", + }, + "PaginatedQuerySchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "PageNumber": Object { + "type": "number", + }, + "PageSize": Object { + "type": "number", + }, + }, + "required": Array [ + "PageNumber", + "PageSize", + ], + "type": "object", + }, + "PaginatedResultSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Items": Object { + "items": Object {}, + "type": "array", + }, + "TotalCount": Object { + "type": "number", + }, + }, + "required": Array [ + "Items", + "TotalCount", + ], + "type": "object", + }, + "PermissionsSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object {}, + "type": "object", + }, + "PlatformDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": Array [ + 0, + 1, + ], + "meta:enum": Object { + "Android": 0, + "IOS": 1, + }, + "type": "number", + }, + "ProjectDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Id": Object { + "type": "string", + }, + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "Name", + ], + "type": "object", + }, + "ProjectDetailsDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Assignments": Object { + "items": Object { + "additionalProperties": false, + "properties": Object { + "AssignedEmployeeId": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "Id": Object { + "type": "string", + }, + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "AssignedEmployeeId", + "Name", + ], + "type": "object", + }, + "type": "array", + }, + "Id": Object { + "type": "string", + }, + "Name": Object { + "type": "string", + }, + }, + "required": Array [ + "Assignments", + "Id", + "Name", + ], + "type": "object", + }, + "ProjectDetailsSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute", + "properties": Object { + "Id": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + ], + "type": "object", + }, + "ProjectEmployeesAssignmentsTopicSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "ProjectId": Object { + "type": "string", + }, + }, + "required": Array [ + "ProjectId", + ], + "type": "object", + }, + "RatingAlreadySentSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"RateApp\\")", + "properties": Object {}, + "type": "object", + }, + "ReservationCancelledNotificationDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "CalendarDayId": Object { + "type": "string", + }, + "Date": Object { + "type": "string", + }, + "EndTime": Object { + "type": "string", + }, + "ReservationId": Object { + "type": "string", + }, + "ServiceProviderId": Object { + "type": "string", + }, + "ServiceProviderName": Object { + "type": "string", + }, + "StartTime": Object { + "type": "string", + }, + "TimeslotId": Object { + "type": "string", + }, + }, + "required": Array [ + "ReservationId", + "CalendarDayId", + "TimeslotId", + "ServiceProviderId", + "ServiceProviderName", + "Date", + "StartTime", + "EndTime", + ], + "type": "object", + }, + "ReservationCreatedNotificationDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "CalendarDayId": Object { + "type": "string", + }, + "Date": Object { + "type": "string", + }, + "EndTime": Object { + "type": "string", + }, + "ReservationId": Object { + "type": "string", + }, + "ServiceProviderId": Object { + "type": "string", + }, + "ServiceProviderName": Object { + "type": "string", + }, + "StartTime": Object { + "type": "string", + }, + "TimeslotId": Object { + "type": "string", + }, + }, + "required": Array [ + "ReservationId", + "CalendarDayId", + "TimeslotId", + "ServiceProviderId", + "ServiceProviderName", + "Date", + "StartTime", + "EndTime", + ], + "type": "object", + }, + "ReservationStatusDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": Array [ + 0, + 1, + 2, + 3, + 4, + 5, + ], + "meta:enum": Object { + "Cancelled": 4, + "Completed": 5, + "Confirmed": 1, + "Paid": 3, + "Pending": 0, + "Rejected": 2, + }, + "type": "number", + }, + "ReserveTimeslotSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\")", + "properties": Object { + "CalendarDayId": Object { + "type": "string", + }, + "TimeslotId": Object { + "type": "string", + }, + }, + "required": Array [ + "CalendarDayId", + "TimeslotId", + ], + "type": "object", + }, + "RolesSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object {}, + "type": "object", + }, + "SearchIdentitiesSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "EmailPattern": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "FamilyNamePattern": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "GivenNamePattern": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "PageNumber": Object { + "type": "number", + }, + "PageSize": Object { + "type": "number", + }, + "SchemaId": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + }, + "required": Array [ + "SchemaId", + "EmailPattern", + "GivenNamePattern", + "FamilyNamePattern", + "PageNumber", + "PageSize", + ], + "type": "object", + }, + "SendCustomNotificationSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\")", + "properties": Object { + "Content": Object { + "type": "string", + }, + "ImageUrl": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + }, + "required": Array [ + "Content", + "ImageUrl", + ], + "type": "object", + }, + "ServiceProviderDetailsDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Address": Object { + "type": "string", + }, + "CoverPhoto": Object { + "type": "string", + }, + "Description": Object { + "type": "string", + }, + "Id": Object { + "type": "string", + }, + "IsPromotionActive": Object { + "type": "boolean", + }, + "Location": Object { + "additionalProperties": false, + "properties": Object { + "Latitude": Object { + "type": "number", + }, + "Longitude": Object { + "type": "number", + }, + }, + "required": Array [ + "Latitude", + "Longitude", + ], + "type": "object", + }, + "Name": Object { + "type": "string", + }, + "Ratings": Object { + "type": "number", + }, + "Thumbnail": Object { + "type": "string", + }, + "Timeslots": Object { + "items": Object { + "additionalProperties": false, + "properties": Object { + "CalendarDayId": Object { + "type": "string", + }, + "EndTime": Object { + "type": "string", + }, + "Id": Object { + "type": "string", + }, + "IsReserved": Object { + "type": "boolean", + }, + "Price": Object { + "additionalProperties": false, + "comment": "The DTO representing a monetary value, e.g. amount with a currency. +The amount of money, in the smallest currency unit (e.g. grosz, cent). +The (three letter) currency name, e.g. PLN, USD.", + "properties": Object { + "Currency": Object { + "type": "string", + }, + "Value": Object { + "type": "number", + }, + }, + "required": Array [ + "Value", + "Currency", + ], + "type": "object", + }, + "StartTime": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "CalendarDayId", + "StartTime", + "EndTime", + "Price", + "IsReserved", + ], + "type": "object", + }, + "type": "array", + }, + "Type": Object { + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "BarberShop": 1, + "Groomer": 2, + "Hairdresser": 0, + }, + "type": "number", + }, + }, + "required": Array [ + "Id", + "Name", + "Description", + "Type", + "Address", + "Location", + "IsPromotionActive", + "Ratings", + "CoverPhoto", + "Thumbnail", + "Timeslots", + ], + "type": "object", + }, + "ServiceProviderDetailsSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "The query will return details about service provider and all available timeslots from +to + +X days (configurable on query level). +@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"user\\")", + "properties": Object { + "CalendarDate": Object { + "type": "string", + }, + "ServiceProviderId": Object { + "type": "string", + }, + }, + "required": Array [ + "ServiceProviderId", + "CalendarDate", + ], + "type": "object", + }, + "ServiceProviderLogoUploadLinkDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Link": Object { + "type": "string", + }, + "RequiredHeaders": Object { + "additionalProperties": Object { + "type": "string", + }, + "propertyNames": Object { + "type": "string", + }, + "type": "object", + }, + }, + "required": Array [ + "Link", + "RequiredHeaders", + ], + "type": "object", + }, + "ServiceProviderLogoUploadLinkSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object {}, + "type": "object", + }, + "ServiceProviderSortFieldsDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "Name": 0, + "Ratings": 2, + "Type": 1, + }, + "type": "number", + }, + "ServiceProviderSummaryDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Address": Object { + "type": "string", + }, + "Id": Object { + "type": "string", + }, + "IsPromotionActive": Object { + "type": "boolean", + }, + "Location": Object { + "additionalProperties": false, + "properties": Object { + "Latitude": Object { + "type": "number", + }, + "Longitude": Object { + "type": "number", + }, + }, + "required": Array [ + "Latitude", + "Longitude", + ], + "type": "object", + }, + "Name": Object { + "type": "string", + }, + "Ratings": Object { + "type": "number", + }, + "Thumbnail": Object { + "type": "string", + }, + "Type": Object { + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "BarberShop": 1, + "Groomer": 2, + "Hairdresser": 0, + }, + "type": "number", + }, + }, + "required": Array [ + "Id", + "Name", + "Type", + "Thumbnail", + "IsPromotionActive", + "Address", + "Location", + "Ratings", + ], + "type": "object", + }, + "ServiceProviderTypeDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "BarberShop": 1, + "Groomer": 2, + "Hairdresser": 0, + }, + "type": "number", + }, + "SubmitAppRatingSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"RateApp\\")", + "properties": Object { + "AdditionalComment": Object { + "anyOf": Array [ + Object { + "type": "string", + }, + Object { + "type": "null", + }, + ], + }, + "AppVersion": Object { + "type": "string", + }, + "Metadata": Object { + "anyOf": Array [ + Object { + "additionalProperties": Object {}, + "propertyNames": Object { + "type": "string", + }, + "type": "object", + }, + Object { + "type": "null", + }, + ], + }, + "Platform": Object { + "enum": Array [ + 0, + 1, + ], + "meta:enum": Object { + "Android": 0, + "IOS": 1, + }, + "type": "number", + }, + "Rating": Object { + "type": "number", + }, + "SystemVersion": Object { + "type": "string", + }, + }, + "required": Array [ + "Rating", + "AdditionalComment", + "Platform", + "SystemVersion", + "AppVersion", + "Metadata", + ], + "type": "object", + }, + "TimeslotDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "CalendarDayId": Object { + "type": "string", + }, + "EndTime": Object { + "type": "string", + }, + "Id": Object { + "type": "string", + }, + "IsReserved": Object { + "type": "boolean", + }, + "Price": Object { + "additionalProperties": false, + "comment": "The DTO representing a monetary value, e.g. amount with a currency. +The amount of money, in the smallest currency unit (e.g. grosz, cent). +The (three letter) currency name, e.g. PLN, USD.", + "properties": Object { + "Currency": Object { + "type": "string", + }, + "Value": Object { + "type": "number", + }, + }, + "required": Array [ + "Value", + "Currency", + ], + "type": "object", + }, + "StartTime": Object { + "type": "string", + }, + }, + "required": Array [ + "Id", + "CalendarDayId", + "StartTime", + "EndTime", + "Price", + "IsReserved", + ], + "type": "object", + }, + "UnassignEmployeeFromAssignmentSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "comment": "@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\"admin\\")", + "properties": Object { + "AssignmentId": Object { + "type": "string", + }, + }, + "required": Array [ + "AssignmentId", + ], + "type": "object", + }, + "VersionSupportDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "CurrentlySupportedVersion": Object { + "type": "string", + }, + "MinimumRequiredVersion": Object { + "type": "string", + }, + "Result": Object { + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "UpToDate": 2, + "UpdateRequired": 0, + "UpdateSuggested": 1, + }, + "type": "number", + }, + }, + "required": Array [ + "CurrentlySupportedVersion", + "MinimumRequiredVersion", + "Result", + ], + "type": "object", + }, + "VersionSupportResultDTOSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": Array [ + 0, + 1, + 2, + ], + "meta:enum": Object { + "UpToDate": 2, + "UpdateRequired": 0, + "UpdateSuggested": 1, + }, + "type": "number", + }, + "VersionSupportSchema": Object { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": Object { + "Platform": Object { + "enum": Array [ + 0, + 1, + ], + "meta:enum": Object { + "Android": 0, + "IOS": 1, + }, + "type": "number", + }, + "Version": Object { + "type": "string", + }, + }, + "required": Array [ + "Platform", + "Version", + ], + "type": "object", + }, +} +`; + +exports[`zodPlugin generates schemas with custom types map 1`] = ` +Object { + "test.ts": "import { z } from \\"zod\\"; + +export namespace LeanCode { + export namespace AppRating { + export namespace Contracts { + export const PermissionsSchema = z.object({}); + export const RatingAlreadySentSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"RateApp\\\\\\")\\" + }); + export const PlatformDTOSchema = z.enum({ + \\"Android\\": 0, + \\"IOS\\": 1 + }).meta({ + \\"meta:enum\\": { + \\"Android\\": 0, + \\"IOS\\": 1 + } + }); + export const SubmitAppRatingSchema = z.object({ + Rating: z.number(), + AdditionalComment: z.string().nullable(), + Platform: LeanCode.AppRating.Contracts.PlatformDTOSchema, + SystemVersion: z.string(), + AppVersion: z.string(), + Metadata: z.record(z.string(), z.any()).nullable() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"RateApp\\\\\\")\\" + }); + } + } + export namespace Contracts { + export namespace Admin { + export const AdminFilterRangeSchema = (TSchema: z.ZodTypeAny) => z.object({ + From: TSchema.nullable(), + To: TSchema.nullable() + }); + export const AdminQueryResultSchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Total: z.number(), + Items: z.array(TResultSchema) + }); + export const AdminQuerySchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Page: z.number(), + PageSize: z.number(), + SortDescending: z.boolean().nullable(), + SortBy: z.string().nullable() + }); + } + } + export namespace ForceUpdate { + export namespace Contracts { + export const PlatformDTOSchema = z.enum({ + \\"Android\\": 0, + \\"IOS\\": 1 + }).meta({ + \\"meta:enum\\": { + \\"Android\\": 0, + \\"IOS\\": 1 + } + }); + export const VersionSupportResultDTOSchema = z.enum({ + \\"UpdateRequired\\": 0, + \\"UpdateSuggested\\": 1, + \\"UpToDate\\": 2 + }).meta({ + \\"meta:enum\\": { + \\"UpdateRequired\\": 0, + \\"UpdateSuggested\\": 1, + \\"UpToDate\\": 2 + } + }); + export const VersionSupportDTOSchema = z.object({ + CurrentlySupportedVersion: z.string(), + MinimumRequiredVersion: z.string(), + Result: LeanCode.ForceUpdate.Contracts.VersionSupportResultDTOSchema + }); + export const VersionSupportSchema = z.object({ + Platform: LeanCode.ForceUpdate.Contracts.PlatformDTOSchema, + Version: z.string() + }); + } + } +} +export namespace ExampleApp { + export namespace Examples { + export namespace Contracts { + export const AuthSchema = z.object({}); + export const PaginatedResultSchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Items: z.array(TResultSchema), + TotalCount: z.number() + }); + export const PaginatedQuerySchema = (TResultSchema: z.ZodTypeAny) => z.object({ + PageNumber: z.number(), + PageSize: z.number() + }); + export const SortedQuerySchema = (TResultSchema: z.ZodTypeAny, TSortSchema: z.ZodTypeAny) => z.object({ + SortBy: TSortSchema, + SortByDescending: z.boolean() + }).extend(ExampleApp.Examples.Contracts.PaginatedQuerySchema(TResultSchema).shape); + export namespace Auth { + export const KnownClaimsSchema = z.object({}); + export const RolesSchema = z.object({}); + } + export namespace Booking { + export const LocationDTOSchema = z.object({ + Latitude: z.number(), + Longitude: z.number() + }); + export const MoneyDTOSchema = z.object({ + Value: z.number(), + Currency: z.string() + }).meta({ + comment: \\"The DTO representing a monetary value, e.g. amount with a currency.\\\\nThe amount of money, in the smallest currency unit (e.g. grosz, cent).\\\\nThe (three letter) currency name, e.g. PLN, USD.\\" + }); + export const ServiceProviderTypeDTOSchema = z.enum({ + \\"Hairdresser\\": 0, + \\"BarberShop\\": 1, + \\"Groomer\\": 2 + }).meta({ + \\"meta:enum\\": { + \\"Hairdresser\\": 0, + \\"BarberShop\\": 1, + \\"Groomer\\": 2 + } + }); + export namespace Management { + export const AddTimeslotSchema = z.object({ + ServiceProviderId: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: ExampleApp.Examples.Contracts.Booking.MoneyDTOSchema + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const CreateServiceProviderSchema = z.object({ + Name: z.string(), + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + Description: z.string(), + CoverPhoto: z.string(), + Thumbnail: z.string(), + Address: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + Ratings: z.number() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const ServiceProviderLogoUploadLinkDTOSchema = z.object({ + Link: z.string(), + RequiredHeaders: z.record(z.string(), z.string()) + }); + export const ServiceProviderLogoUploadLinkSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Reservations { + export const CancelReservationSchema = z.object({}).extend(ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute.IReservationRelatedSchema.shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\\\n@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute\\" + }); + export const ReservationCancelledNotificationDTOSchema = z.object({ + ReservationId: z.string(), + CalendarDayId: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string() + }); + export const ReservationCreatedNotificationDTOSchema = z.object({ + ReservationId: z.string(), + CalendarDayId: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string() + }); + export const ReserveTimeslotSchema = z.object({ + CalendarDayId: z.string(), + TimeslotId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + export const ReservationStatusDTOSchema = z.enum({ + \\"Pending\\": 0, + \\"Confirmed\\": 1, + \\"Rejected\\": 2, + \\"Paid\\": 3, + \\"Cancelled\\": 4, + \\"Completed\\": 5 + }).meta({ + \\"meta:enum\\": { + \\"Pending\\": 0, + \\"Confirmed\\": 1, + \\"Rejected\\": 2, + \\"Paid\\": 3, + \\"Cancelled\\": 4, + \\"Completed\\": 5 + } + }); + export const MyReservationDTOSchema = z.object({ + Id: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + Address: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + Date: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: ExampleApp.Examples.Contracts.Booking.MoneyDTOSchema, + Status: ExampleApp.Examples.Contracts.Booking.Reservations.ReservationStatusDTOSchema + }); + export const MyReservationsSchema = z.object({}).extend(ExampleApp.Examples.Contracts.PaginatedQuerySchema(ExampleApp.Examples.Contracts.Booking.Reservations.MyReservationDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + export const MyReservationByTimeslotIdSchema = z.object({ + TimeslotId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + export const MyReservationByIdSchema = z.object({}).extend(ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute.IReservationRelatedSchema.shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\\\n@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute\\" + }); + export namespace Authorization { + export namespace AuthorizeWhenOwnsReservationAttribute { + export const IReservationRelatedSchema = z.object({ + ReservationId: z.string() + }); + export const IWhenOwnsReservationSchema = z.object({}); + } + } + } + export namespace ServiceProviders { + export const ServiceProviderSummaryDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + Thumbnail: z.string(), + IsPromotionActive: z.boolean(), + Address: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + Ratings: z.number() + }); + export const TimeslotDTOSchema = z.object({ + Id: z.string(), + CalendarDayId: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: ExampleApp.Examples.Contracts.Booking.MoneyDTOSchema, + IsReserved: z.boolean() + }); + export const ServiceProviderDetailsDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Description: z.string(), + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + Address: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + IsPromotionActive: z.boolean(), + Ratings: z.number(), + CoverPhoto: z.string(), + Thumbnail: z.string(), + Timeslots: z.array(ExampleApp.Examples.Contracts.Booking.ServiceProviders.TimeslotDTOSchema) + }); + export const ServiceProviderDetailsSchema = z.object({ + ServiceProviderId: z.string(), + CalendarDate: z.string() + }).meta({ + comment: \\"The query will return details about service provider and all available timeslots from\\\\nto\\\\n +X days (configurable on query level).\\\\n@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + export const ServiceProviderSortFieldsDTOSchema = z.enum({ + \\"Name\\": 0, + \\"Type\\": 1, + \\"Ratings\\": 2 + }).meta({ + \\"meta:enum\\": { + \\"Name\\": 0, + \\"Type\\": 1, + \\"Ratings\\": 2 + } + }); + export const AllServiceProvidersSchema = z.object({ + NameFilter: z.string().nullable(), + TypeFilter: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema.nullable(), + PromotedOnly: z.boolean() + }).extend(ExampleApp.Examples.Contracts.SortedQuerySchema(ExampleApp.Examples.Contracts.Booking.ServiceProviders.ServiceProviderSummaryDTOSchema, ExampleApp.Examples.Contracts.Booking.ServiceProviders.ServiceProviderSortFieldsDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + } + } + export namespace Dashboards { + export const AssignmentEmployerEmbedSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Employees { + export const AdminEmployeeDTOSchema = z.object({ + Id: z.string(), + Name: z.string() + }); + export const AllEmployeesAdminSchema = z.object({ + NameFilter: z.string().nullable() + }).extend(LeanCode.Contracts.Admin.AdminQuerySchema(ExampleApp.Examples.Contracts.Employees.AdminEmployeeDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const CreateEmployeeSchema = z.object({ + Name: z.string(), + Email: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const EmployeeDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Email: z.string() + }); + export const AllEmployeesSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Firebase { + export const SendCustomNotificationSchema = z.object({ + Content: z.string(), + ImageUrl: z.string().nullable() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + } + export namespace Identities { + export const KratosIdentityDTOSchema = z.object({ + Id: z.string(), + CreatedAt: z.string(), + UpdatedAt: z.string(), + SchemaId: z.string(), + Email: z.string() + }); + export const SearchIdentitiesSchema = z.object({ + SchemaId: z.string().nullable(), + EmailPattern: z.string().nullable(), + GivenNamePattern: z.string().nullable(), + FamilyNamePattern: z.string().nullable() + }).extend(ExampleApp.Examples.Contracts.PaginatedQuerySchema(ExampleApp.Examples.Contracts.Identities.KratosIdentityDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Projects { + export const AdminProjectDTOSchema = z.object({ + Id: z.string(), + Name: z.string() + }); + export const AllProjectsAdminSchema = z.object({ + NameFilter: z.string().nullable() + }).extend(LeanCode.Contracts.Admin.AdminQuerySchema(ExampleApp.Examples.Contracts.Projects.AdminProjectDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const AssignEmployeeToAssignmentSchema = z.object({ + AssignmentId: z.string(), + EmployeeId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const AssignmentWriteDTOSchema = z.object({ + Name: z.string() + }); + export const AssignmentDTOSchema = z.object({ + Id: z.string(), + AssignedEmployeeId: z.string().nullable() + }).extend(ExampleApp.Examples.Contracts.Projects.AssignmentWriteDTOSchema.shape); + export const AddAssignmentsToProjectSchema = z.object({ + ProjectId: z.string(), + Assignments: z.array(ExampleApp.Examples.Contracts.Projects.AssignmentWriteDTOSchema) + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const CreateProjectSchema = z.object({ + Name: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const EmployeeAssignedToAssignmentDTOSchema = z.object({ + AssignmentId: z.string(), + EmployeeId: z.string() + }); + export const EmployeeAssignedToProjectAssignmentDTOSchema = z.object({ + ProjectId: z.string(), + AssignmentId: z.string() + }); + export const EmployeeAssignmentsTopicSchema = z.object({ + EmployeeId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const EmployeeUnassignedFromAssignmentDTOSchema = z.object({ + AssignmentId: z.string() + }); + export const EmployeeUnassignedFromProjectAssignmentDTOSchema = z.object({ + ProjectId: z.string(), + AssignmentId: z.string() + }); + export const ProjectDTOSchema = z.object({ + Id: z.string(), + Name: z.string() + }); + export const AllProjectsSchema = z.object({ + SortByNameDescending: z.boolean() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const ProjectDetailsDTOSchema = z.object({ + Assignments: z.array(ExampleApp.Examples.Contracts.Projects.AssignmentDTOSchema) + }).extend(ExampleApp.Examples.Contracts.Projects.ProjectDTOSchema.shape); + export const ProjectDetailsSchema = z.object({ + Id: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const ProjectEmployeesAssignmentsTopicSchema = z.object({ + ProjectId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const UnassignEmployeeFromAssignmentSchema = z.object({ + AssignmentId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Users { + export const DeleteOwnAccountSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + } + } + } +} +", +} +`; + +exports[`zodPlugin generates schemas with defaults 1`] = ` +Object { + "test.ts": "import { z } from \\"zod\\"; + +export namespace LeanCode { + export namespace AppRating { + export namespace Contracts { + export const PermissionsSchema = z.object({}); + export const RatingAlreadySentSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"RateApp\\\\\\")\\" + }); + export const PlatformDTOSchema = z.enum({ + \\"Android\\": 0, + \\"IOS\\": 1 + }).meta({ + \\"meta:enum\\": { + \\"Android\\": 0, + \\"IOS\\": 1 + } + }); + export const SubmitAppRatingSchema = z.object({ + Rating: z.number(), + AdditionalComment: z.string().nullable(), + Platform: LeanCode.AppRating.Contracts.PlatformDTOSchema, + SystemVersion: z.string(), + AppVersion: z.string(), + Metadata: z.record(z.string(), z.any()).nullable() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"RateApp\\\\\\")\\" + }); + } + } + export namespace Contracts { + export namespace Admin { + export const AdminFilterRangeSchema = (TSchema: z.ZodTypeAny) => z.object({ + From: TSchema.nullable(), + To: TSchema.nullable() + }); + export const AdminQueryResultSchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Total: z.number(), + Items: z.array(TResultSchema) + }); + export const AdminQuerySchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Page: z.number(), + PageSize: z.number(), + SortDescending: z.boolean().nullable(), + SortBy: z.string().nullable() + }); + } + } + export namespace ForceUpdate { + export namespace Contracts { + export const PlatformDTOSchema = z.enum({ + \\"Android\\": 0, + \\"IOS\\": 1 + }).meta({ + \\"meta:enum\\": { + \\"Android\\": 0, + \\"IOS\\": 1 + } + }); + export const VersionSupportResultDTOSchema = z.enum({ + \\"UpdateRequired\\": 0, + \\"UpdateSuggested\\": 1, + \\"UpToDate\\": 2 + }).meta({ + \\"meta:enum\\": { + \\"UpdateRequired\\": 0, + \\"UpdateSuggested\\": 1, + \\"UpToDate\\": 2 + } + }); + export const VersionSupportDTOSchema = z.object({ + CurrentlySupportedVersion: z.string(), + MinimumRequiredVersion: z.string(), + Result: LeanCode.ForceUpdate.Contracts.VersionSupportResultDTOSchema + }); + export const VersionSupportSchema = z.object({ + Platform: LeanCode.ForceUpdate.Contracts.PlatformDTOSchema, + Version: z.string() + }); + } + } +} +export namespace ExampleApp { + export namespace Examples { + export namespace Contracts { + export const AuthSchema = z.object({}); + export const PaginatedResultSchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Items: z.array(TResultSchema), + TotalCount: z.number() + }); + export const PaginatedQuerySchema = (TResultSchema: z.ZodTypeAny) => z.object({ + PageNumber: z.number(), + PageSize: z.number() + }); + export const SortedQuerySchema = (TResultSchema: z.ZodTypeAny, TSortSchema: z.ZodTypeAny) => z.object({ + SortBy: TSortSchema, + SortByDescending: z.boolean() + }).extend(ExampleApp.Examples.Contracts.PaginatedQuerySchema(TResultSchema).shape); + export namespace Auth { + export const KnownClaimsSchema = z.object({}); + export const RolesSchema = z.object({}); + } + export namespace Booking { + export const LocationDTOSchema = z.object({ + Latitude: z.number(), + Longitude: z.number() + }); + export const MoneyDTOSchema = z.object({ + Value: z.number(), + Currency: z.string() + }).meta({ + comment: \\"The DTO representing a monetary value, e.g. amount with a currency.\\\\nThe amount of money, in the smallest currency unit (e.g. grosz, cent).\\\\nThe (three letter) currency name, e.g. PLN, USD.\\" + }); + export const ServiceProviderTypeDTOSchema = z.enum({ + \\"Hairdresser\\": 0, + \\"BarberShop\\": 1, + \\"Groomer\\": 2 + }).meta({ + \\"meta:enum\\": { + \\"Hairdresser\\": 0, + \\"BarberShop\\": 1, + \\"Groomer\\": 2 + } + }); + export namespace Management { + export const AddTimeslotSchema = z.object({ + ServiceProviderId: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: ExampleApp.Examples.Contracts.Booking.MoneyDTOSchema + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const CreateServiceProviderSchema = z.object({ + Name: z.string(), + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + Description: z.string(), + CoverPhoto: z.string(), + Thumbnail: z.string(), + Address: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + Ratings: z.number() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const ServiceProviderLogoUploadLinkDTOSchema = z.object({ + Link: z.string(), + RequiredHeaders: z.record(z.string(), z.string()) + }); + export const ServiceProviderLogoUploadLinkSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Reservations { + export const CancelReservationSchema = z.object({}).extend(ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute.IReservationRelatedSchema.shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\\\n@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute\\" + }); + export const ReservationCancelledNotificationDTOSchema = z.object({ + ReservationId: z.string(), + CalendarDayId: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string() + }); + export const ReservationCreatedNotificationDTOSchema = z.object({ + ReservationId: z.string(), + CalendarDayId: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string() + }); + export const ReserveTimeslotSchema = z.object({ + CalendarDayId: z.string(), + TimeslotId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + export const ReservationStatusDTOSchema = z.enum({ + \\"Pending\\": 0, + \\"Confirmed\\": 1, + \\"Rejected\\": 2, + \\"Paid\\": 3, + \\"Cancelled\\": 4, + \\"Completed\\": 5 + }).meta({ + \\"meta:enum\\": { + \\"Pending\\": 0, + \\"Confirmed\\": 1, + \\"Rejected\\": 2, + \\"Paid\\": 3, + \\"Cancelled\\": 4, + \\"Completed\\": 5 + } + }); + export const MyReservationDTOSchema = z.object({ + Id: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + Address: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + Date: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: ExampleApp.Examples.Contracts.Booking.MoneyDTOSchema, + Status: ExampleApp.Examples.Contracts.Booking.Reservations.ReservationStatusDTOSchema + }); + export const MyReservationsSchema = z.object({}).extend(ExampleApp.Examples.Contracts.PaginatedQuerySchema(ExampleApp.Examples.Contracts.Booking.Reservations.MyReservationDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + export const MyReservationByTimeslotIdSchema = z.object({ + TimeslotId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + export const MyReservationByIdSchema = z.object({}).extend(ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute.IReservationRelatedSchema.shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\\\n@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute\\" + }); + export namespace Authorization { + export namespace AuthorizeWhenOwnsReservationAttribute { + export const IReservationRelatedSchema = z.object({ + ReservationId: z.string() + }); + export const IWhenOwnsReservationSchema = z.object({}); + } + } + } + export namespace ServiceProviders { + export const ServiceProviderSummaryDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + Thumbnail: z.string(), + IsPromotionActive: z.boolean(), + Address: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + Ratings: z.number() + }); + export const TimeslotDTOSchema = z.object({ + Id: z.string(), + CalendarDayId: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: ExampleApp.Examples.Contracts.Booking.MoneyDTOSchema, + IsReserved: z.boolean() + }); + export const ServiceProviderDetailsDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Description: z.string(), + Type: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema, + Address: z.string(), + Location: ExampleApp.Examples.Contracts.Booking.LocationDTOSchema, + IsPromotionActive: z.boolean(), + Ratings: z.number(), + CoverPhoto: z.string(), + Thumbnail: z.string(), + Timeslots: z.array(ExampleApp.Examples.Contracts.Booking.ServiceProviders.TimeslotDTOSchema) + }); + export const ServiceProviderDetailsSchema = z.object({ + ServiceProviderId: z.string(), + CalendarDate: z.string() + }).meta({ + comment: \\"The query will return details about service provider and all available timeslots from\\\\nto\\\\n +X days (configurable on query level).\\\\n@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + export const ServiceProviderSortFieldsDTOSchema = z.enum({ + \\"Name\\": 0, + \\"Type\\": 1, + \\"Ratings\\": 2 + }).meta({ + \\"meta:enum\\": { + \\"Name\\": 0, + \\"Type\\": 1, + \\"Ratings\\": 2 + } + }); + export const AllServiceProvidersSchema = z.object({ + NameFilter: z.string().nullable(), + TypeFilter: ExampleApp.Examples.Contracts.Booking.ServiceProviderTypeDTOSchema.nullable(), + PromotedOnly: z.boolean() + }).extend(ExampleApp.Examples.Contracts.SortedQuerySchema(ExampleApp.Examples.Contracts.Booking.ServiceProviders.ServiceProviderSummaryDTOSchema, ExampleApp.Examples.Contracts.Booking.ServiceProviders.ServiceProviderSortFieldsDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + } + } + export namespace Dashboards { + export const AssignmentEmployerEmbedSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Employees { + export const AdminEmployeeDTOSchema = z.object({ + Id: z.string(), + Name: z.string() + }); + export const AllEmployeesAdminSchema = z.object({ + NameFilter: z.string().nullable() + }).extend(LeanCode.Contracts.Admin.AdminQuerySchema(ExampleApp.Examples.Contracts.Employees.AdminEmployeeDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const CreateEmployeeSchema = z.object({ + Name: z.string(), + Email: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const EmployeeDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Email: z.string() + }); + export const AllEmployeesSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Firebase { + export const SendCustomNotificationSchema = z.object({ + Content: z.string(), + ImageUrl: z.string().nullable() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + } + export namespace Identities { + export const KratosIdentityDTOSchema = z.object({ + Id: z.string(), + CreatedAt: z.string(), + UpdatedAt: z.string(), + SchemaId: z.string(), + Email: z.string() + }); + export const SearchIdentitiesSchema = z.object({ + SchemaId: z.string().nullable(), + EmailPattern: z.string().nullable(), + GivenNamePattern: z.string().nullable(), + FamilyNamePattern: z.string().nullable() + }).extend(ExampleApp.Examples.Contracts.PaginatedQuerySchema(ExampleApp.Examples.Contracts.Identities.KratosIdentityDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Projects { + export const AdminProjectDTOSchema = z.object({ + Id: z.string(), + Name: z.string() + }); + export const AllProjectsAdminSchema = z.object({ + NameFilter: z.string().nullable() + }).extend(LeanCode.Contracts.Admin.AdminQuerySchema(ExampleApp.Examples.Contracts.Projects.AdminProjectDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const AssignEmployeeToAssignmentSchema = z.object({ + AssignmentId: z.string(), + EmployeeId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const AssignmentWriteDTOSchema = z.object({ + Name: z.string() + }); + export const AssignmentDTOSchema = z.object({ + Id: z.string(), + AssignedEmployeeId: z.string().nullable() + }).extend(ExampleApp.Examples.Contracts.Projects.AssignmentWriteDTOSchema.shape); + export const AddAssignmentsToProjectSchema = z.object({ + ProjectId: z.string(), + Assignments: z.array(ExampleApp.Examples.Contracts.Projects.AssignmentWriteDTOSchema) + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const CreateProjectSchema = z.object({ + Name: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const EmployeeAssignedToAssignmentDTOSchema = z.object({ + AssignmentId: z.string(), + EmployeeId: z.string() + }); + export const EmployeeAssignedToProjectAssignmentDTOSchema = z.object({ + ProjectId: z.string(), + AssignmentId: z.string() + }); + export const EmployeeAssignmentsTopicSchema = z.object({ + EmployeeId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const EmployeeUnassignedFromAssignmentDTOSchema = z.object({ + AssignmentId: z.string() + }); + export const EmployeeUnassignedFromProjectAssignmentDTOSchema = z.object({ + ProjectId: z.string(), + AssignmentId: z.string() + }); + export const ProjectDTOSchema = z.object({ + Id: z.string(), + Name: z.string() + }); + export const AllProjectsSchema = z.object({ + SortByNameDescending: z.boolean() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const ProjectDetailsDTOSchema = z.object({ + Assignments: z.array(ExampleApp.Examples.Contracts.Projects.AssignmentDTOSchema) + }).extend(ExampleApp.Examples.Contracts.Projects.ProjectDTOSchema.shape); + export const ProjectDetailsSchema = z.object({ + Id: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" + }); + export const ProjectEmployeesAssignmentsTopicSchema = z.object({ + ProjectId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + export const UnassignEmployeeFromAssignmentSchema = z.object({ + AssignmentId: z.string() + }).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" + }); + } + export namespace Users { + export const DeleteOwnAccountSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" + }); + } + } + } +} +", +} +`; + +exports[`zodPlugin generates schemas with nameTransform 1`] = ` +Object { + "test.ts": "import { z } from \\"zod\\"; + +export const AuthSchema = z.object({}); +export const KnownClaimsSchema = z.object({}); +export const RolesSchema = z.object({}); +export const LocationDTOSchema = z.object({ + Latitude: z.number(), + Longitude: z.number() +}); +export const ServiceProviderLogoUploadLinkDTOSchema = z.object({ + Link: z.string(), + RequiredHeaders: z.record(z.string(), z.string()) +}); +export const ServiceProviderLogoUploadLinkSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const MoneyDTOSchema = z.object({ + Value: z.number(), + Currency: z.string() +}).meta({ + comment: \\"The DTO representing a monetary value, e.g. amount with a currency.\\\\nThe amount of money, in the smallest currency unit (e.g. grosz, cent).\\\\nThe (three letter) currency name, e.g. PLN, USD.\\" +}); +export const AddTimeslotSchema = z.object({ + ServiceProviderId: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: MoneyDTOSchema +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const IReservationRelatedSchema = z.object({ + ReservationId: z.string() +}); +export const IWhenOwnsReservationSchema = z.object({}); +export const CancelReservationSchema = z.object({}).extend(IReservationRelatedSchema.shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\\\n@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute\\" +}); +export const ReservationCancelledNotificationDTOSchema = z.object({ + ReservationId: z.string(), + CalendarDayId: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string() +}); +export const ReservationCreatedNotificationDTOSchema = z.object({ + ReservationId: z.string(), + CalendarDayId: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Date: z.string(), + StartTime: z.string(), + EndTime: z.string() +}); +export const ReserveTimeslotSchema = z.object({ + CalendarDayId: z.string(), + TimeslotId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const TimeslotDTOSchema = z.object({ + Id: z.string(), + CalendarDayId: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: MoneyDTOSchema, + IsReserved: z.boolean() +}); +export const AssignmentEmployerEmbedSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const AdminEmployeeDTOSchema = z.object({ + Id: z.string(), + Name: z.string() +}); +export const CreateEmployeeSchema = z.object({ + Name: z.string(), + Email: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const EmployeeDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Email: z.string() +}); +export const AllEmployeesSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const SendCustomNotificationSchema = z.object({ + Content: z.string(), + ImageUrl: z.string().nullable() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const KratosIdentityDTOSchema = z.object({ + Id: z.string(), + CreatedAt: z.string(), + UpdatedAt: z.string(), + SchemaId: z.string(), + Email: z.string() +}); +export const PaginatedResultSchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Items: z.array(TResultSchema), + TotalCount: z.number() +}); +export const PaginatedQuerySchema = (TResultSchema: z.ZodTypeAny) => z.object({ + PageNumber: z.number(), + PageSize: z.number() +}); +export const SearchIdentitiesSchema = z.object({ + SchemaId: z.string().nullable(), + EmailPattern: z.string().nullable(), + GivenNamePattern: z.string().nullable(), + FamilyNamePattern: z.string().nullable() +}).extend(PaginatedQuerySchema(KratosIdentityDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const AdminProjectDTOSchema = z.object({ + Id: z.string(), + Name: z.string() +}); +export const AssignEmployeeToAssignmentSchema = z.object({ + AssignmentId: z.string(), + EmployeeId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const AssignmentWriteDTOSchema = z.object({ + Name: z.string() +}); +export const AssignmentDTOSchema = z.object({ + Id: z.string(), + AssignedEmployeeId: z.string().nullable() +}).extend(AssignmentWriteDTOSchema.shape); +export const AddAssignmentsToProjectSchema = z.object({ + ProjectId: z.string(), + Assignments: z.array(AssignmentWriteDTOSchema) +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const CreateProjectSchema = z.object({ + Name: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const EmployeeAssignedToAssignmentDTOSchema = z.object({ + AssignmentId: z.string(), + EmployeeId: z.string() +}); +export const EmployeeAssignedToProjectAssignmentDTOSchema = z.object({ + ProjectId: z.string(), + AssignmentId: z.string() +}); +export const EmployeeAssignmentsTopicSchema = z.object({ + EmployeeId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const EmployeeUnassignedFromAssignmentDTOSchema = z.object({ + AssignmentId: z.string() +}); +export const EmployeeUnassignedFromProjectAssignmentDTOSchema = z.object({ + ProjectId: z.string(), + AssignmentId: z.string() +}); +export const ProjectDTOSchema = z.object({ + Id: z.string(), + Name: z.string() +}); +export const AllProjectsSchema = z.object({ + SortByNameDescending: z.boolean() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const ProjectDetailsDTOSchema = z.object({ + Assignments: z.array(AssignmentDTOSchema) +}).extend(ProjectDTOSchema.shape); +export const ProjectDetailsSchema = z.object({ + Id: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AllowUnauthorizedAttribute\\" +}); +export const ProjectEmployeesAssignmentsTopicSchema = z.object({ + ProjectId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const UnassignEmployeeFromAssignmentSchema = z.object({ + AssignmentId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const SortedQuerySchema = (TResultSchema: z.ZodTypeAny, TSortSchema: z.ZodTypeAny) => z.object({ + SortBy: TSortSchema, + SortByDescending: z.boolean() +}).extend(PaginatedQuerySchema(TResultSchema).shape); +export const DeleteOwnAccountSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const PermissionsSchema = z.object({}); +export const RatingAlreadySentSchema = z.object({}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"RateApp\\\\\\")\\" +}); +export const AdminFilterRangeSchema = (TSchema: z.ZodTypeAny) => z.object({ + From: TSchema.nullable(), + To: TSchema.nullable() +}); +export const AdminQueryResultSchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Total: z.number(), + Items: z.array(TResultSchema) +}); +export const AdminQuerySchema = (TResultSchema: z.ZodTypeAny) => z.object({ + Page: z.number(), + PageSize: z.number(), + SortDescending: z.boolean().nullable(), + SortBy: z.string().nullable() +}); +export const AllProjectsAdminSchema = z.object({ + NameFilter: z.string().nullable() +}).extend(AdminQuerySchema(AdminProjectDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const AllEmployeesAdminSchema = z.object({ + NameFilter: z.string().nullable() +}).extend(AdminQuerySchema(AdminEmployeeDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const ReservationStatusDTOSchema = z.enum({ + \\"Pending\\": 0, + \\"Confirmed\\": 1, + \\"Rejected\\": 2, + \\"Paid\\": 3, + \\"Cancelled\\": 4, + \\"Completed\\": 5 +}).meta({ + \\"meta:enum\\": { + \\"Pending\\": 0, + \\"Confirmed\\": 1, + \\"Rejected\\": 2, + \\"Paid\\": 3, + \\"Cancelled\\": 4, + \\"Completed\\": 5 + } +}); +export const ServiceProviderTypeDTOSchema = z.enum({ + \\"Hairdresser\\": 0, + \\"BarberShop\\": 1, + \\"Groomer\\": 2 +}).meta({ + \\"meta:enum\\": { + \\"Hairdresser\\": 0, + \\"BarberShop\\": 1, + \\"Groomer\\": 2 + } +}); +export const ServiceProviderSummaryDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Type: ServiceProviderTypeDTOSchema, + Thumbnail: z.string(), + IsPromotionActive: z.boolean(), + Address: z.string(), + Location: LocationDTOSchema, + Ratings: z.number() +}); +export const ServiceProviderDetailsDTOSchema = z.object({ + Id: z.string(), + Name: z.string(), + Description: z.string(), + Type: ServiceProviderTypeDTOSchema, + Address: z.string(), + Location: LocationDTOSchema, + IsPromotionActive: z.boolean(), + Ratings: z.number(), + CoverPhoto: z.string(), + Thumbnail: z.string(), + Timeslots: z.array(TimeslotDTOSchema) +}); +export const ServiceProviderDetailsSchema = z.object({ + ServiceProviderId: z.string(), + CalendarDate: z.string() +}).meta({ + comment: \\"The query will return details about service provider and all available timeslots from\\\\nto\\\\n +X days (configurable on query level).\\\\n@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const MyReservationDTOSchema = z.object({ + Id: z.string(), + TimeslotId: z.string(), + ServiceProviderId: z.string(), + ServiceProviderName: z.string(), + Type: ServiceProviderTypeDTOSchema, + Address: z.string(), + Location: LocationDTOSchema, + Date: z.string(), + StartTime: z.string(), + EndTime: z.string(), + Price: MoneyDTOSchema, + Status: ReservationStatusDTOSchema +}); +export const MyReservationsSchema = z.object({}).extend(PaginatedQuerySchema(MyReservationDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const MyReservationByTimeslotIdSchema = z.object({ + TimeslotId: z.string() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const MyReservationByIdSchema = z.object({}).extend(IReservationRelatedSchema.shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\\\n@attribute ExampleApp.Examples.Contracts.Booking.Reservations.Authorization.AuthorizeWhenOwnsReservationAttribute\\" +}); +export const CreateServiceProviderSchema = z.object({ + Name: z.string(), + Type: ServiceProviderTypeDTOSchema, + Description: z.string(), + CoverPhoto: z.string(), + Thumbnail: z.string(), + Address: z.string(), + Location: LocationDTOSchema, + Ratings: z.number() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"admin\\\\\\")\\" +}); +export const ServiceProviderSortFieldsDTOSchema = z.enum({ + \\"Name\\": 0, + \\"Type\\": 1, + \\"Ratings\\": 2 +}).meta({ + \\"meta:enum\\": { + \\"Name\\": 0, + \\"Type\\": 1, + \\"Ratings\\": 2 + } +}); +export const AllServiceProvidersSchema = z.object({ + NameFilter: z.string().nullable(), + TypeFilter: ServiceProviderTypeDTOSchema.nullable(), + PromotedOnly: z.boolean() +}).extend(SortedQuerySchema(ServiceProviderSummaryDTOSchema, ServiceProviderSortFieldsDTOSchema).shape).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"user\\\\\\")\\" +}); +export const AppRatingPlatformDTOSchema = z.enum({ + \\"Android\\": 0, + \\"IOS\\": 1 +}).meta({ + \\"meta:enum\\": { + \\"Android\\": 0, + \\"IOS\\": 1 + } +}); +export const SubmitAppRatingSchema = z.object({ + Rating: z.number(), + AdditionalComment: z.string().nullable(), + Platform: AppRatingPlatformDTOSchema, + SystemVersion: z.string(), + AppVersion: z.string(), + Metadata: z.record(z.string(), z.any()).nullable() +}).meta({ + comment: \\"@attribute LeanCode.Contracts.Security.AuthorizeWhenHasAnyOfAttribute(\\\\\\"RateApp\\\\\\")\\" +}); +export const PlatformDTOSchema = z.enum({ + \\"Android\\": 0, + \\"IOS\\": 1 +}).meta({ + \\"meta:enum\\": { + \\"Android\\": 0, + \\"IOS\\": 1 + } +}); +export const VersionSupportResultDTOSchema = z.enum({ + \\"UpdateRequired\\": 0, + \\"UpdateSuggested\\": 1, + \\"UpToDate\\": 2 +}).meta({ + \\"meta:enum\\": { + \\"UpdateRequired\\": 0, + \\"UpdateSuggested\\": 1, + \\"UpToDate\\": 2 + } +}); +export const VersionSupportDTOSchema = z.object({ + CurrentlySupportedVersion: z.string(), + MinimumRequiredVersion: z.string(), + Result: VersionSupportResultDTOSchema +}); +export const VersionSupportSchema = z.object({ + Platform: PlatformDTOSchema, + Version: z.string() +}); +", +} +`; diff --git a/test/test/src/zodPlugin.spec.ts b/test/test/src/zodPlugin.spec.ts new file mode 100644 index 0000000..9314d6c --- /dev/null +++ b/test/test/src/zodPlugin.spec.ts @@ -0,0 +1,218 @@ +import { resolve } from "path" +import ts from "typescript" +import vm from "vm" +import { z } from "zod" +import { generate } from "@leancodepl/contractsgenerator-typescript" +import type { + FieldValidationContext, + FieldValidationFunction, +} from "@leancodepl/contractsgenerator-typescript-plugin-zod" +import "@leancodepl/contractsgenerator-typescript-plugin-zod" + +describe("zodPlugin", () => { + it("generates schemas with defaults", async () => { + const result = await generate({ + generates: { "test.ts": { plugins: ["zod"] } }, + config: { input: { raw: resolve(__dirname, "../samples/ExampleApp-1.0.pb") } }, + }) + + expect(result).toMatchSnapshot() + }) + + it("generates schemas with custom types map", async () => { + const result = await generate({ + generates: { "test.ts": { plugins: ["zod"] } }, + config: { + input: { raw: resolve(__dirname, "../samples/ExampleApp-1.0.pb") }, + customTypes: { DateTimeOffset: "ApiDateTimeOffset", DateOnly: "ApiDate", TimeOnly: "ApiTime" }, + }, + }) + + expect(result).toMatchSnapshot() + }) + + it("generates schemas with nameTransform", async () => { + const result = await generate({ + generates: { "test.ts": { plugins: ["zod"] } }, + config: { + input: { raw: resolve(__dirname, "../samples/ExampleApp-1.0.pb") }, + nameTransform: (id: string) => { + const parts = id.split(".") + + if (parts.includes("AppRating") && parts.at(-1) === "PlatformDTO") { + return `AppRating${parts.at(-1)}` + } + + return parts.at(-1) + }, + }, + }) + + expect(result).toMatchSnapshot() + }) + + it("throws exception when contracts contains circular references", async () => { + await expect( + generate({ + generates: { "test.ts": { plugins: ["zod"] } }, + config: { input: { raw: resolve(__dirname, "../samples/circular.pb") } }, + }), + ).rejects.toThrow(/Error: circular references detected in contracts: .+/) + }) + + it("can exclude DTOs via nameTransform", async () => { + const result = await generate({ + generates: { "test.ts": { plugins: ["zod"] } }, + config: { + input: { raw: resolve(__dirname, "../samples/contracts-exclusion.pb") }, + nameTransform: (id: string) => { + const parts = id.split(".") + + if (parts.includes("RemoveInterface")) { + return undefined + } + + return id + }, + }, + }) + + expect(result).toMatchSnapshot() + }) + + it("applies custom field validation when provided", async () => { + const result = await generate({ + generates: { "test.ts": { plugins: ["zod"] } }, + config: { + input: { raw: resolve(__dirname, "../samples/ExampleApp-1.0.pb") }, + customTypes: { DateTimeOffset: "ApiDateTimeOffset", DateOnly: "ApiDate", TimeOnly: "ApiTime" }, + nameTransform: (id: string) => { + const parts = id.split(".") + + if (parts.includes("AppRating") && parts.at(-1) === "PlatformDTO") { + return `AppRating${parts.at(-1)}` + } + + return parts.at(-1) + }, + fieldValidation: ((fieldPath: string, property: FieldValidationContext) => { + if (property.name === "Name" && property.type === "string") { + return ".min(1)" + } + + if ((property.name === "Latitude" || property.name === "Longitude") && property.type === "number") { + return ".positive().max(90)" + } + + if (property.name === "ServiceProviderId" && property.type === "string") { + return ".refine(val => val.length > 0)" + } + + if (property.name === "Date" && property.type === "string") { + return ".refine(val => (val ? val.length === 10 : false))" + } + + if (property.name === "StartTime" && property.type === "string") { + return ".refine(val => val.startsWith(`0`) || val.startsWith(`1`))" + } + + if (property.name === "EndTime" && property.type === "string") { + return ".refine(val => !isNaN(Number(val)))" + } + + if (property.name === "Currency" && property.type === "string") { + return ".refine(val => (val ? val.length === 3 : false))" + } + + if (property.name === "Value" && property.type === "number") { + return '.refine(val => val > 0, { message: "Must be positive" })' + } + + if (property.name === "Description" && property.type === "string") { + return ".refine(val => (val && val.length > 0 ? val.trim().length > 0 : false))" + } + + if (property.name === "Thumbnail" && property.type === "string") { + return ".min(1).max(500)" + } + + if (property.name === "Address" && property.type === "string") { + return ".refine(val => val !== undefined)" + } + + if (property.name === "Ratings" && property.type === "number") { + return ".refine(val => val >= 0 && val <= 5)" + } + + if (property.name === "RequiredHeaders" && property.type === "record") { + return '.refine(val => { const test = {test: { test: 5 }}; return typeof val === "object" && val !== null) }' + } + + return undefined + }) satisfies FieldValidationFunction, + }, + }) + + expect(result).toMatchSnapshot() + }) + + it("generates JSON schemas from zod schemas with defaults", async () => { + const result = await generate({ + generates: { "test.ts": { plugins: ["zod"] } }, + config: { + input: { raw: resolve(__dirname, "../samples/ExampleApp-1.0.pb") }, + customTypes: { DateTimeOffset: "ApiDateTimeOffset", DateOnly: "ApiDate", TimeOnly: "ApiTime" }, + nameTransform: (id: string) => { + const parts = id.split(".") + + if (parts.includes("AppRating") && parts.at(-1) === "PlatformDTO") { + return `AppRating${parts.at(-1)}` + } + + return parts.at(-1) + }, + }, + }) + + const generatedCode = result["test.ts"] + + const schemas = evaluateZodSchemas(generatedCode) + const jsonSchemas = schemasToJsonSchemas(schemas) + + expect(jsonSchemas).toMatchSnapshot() + }) +}) + +function evaluateZodSchemas(code: string): Record { + const exports: Record = {} + + const codeWithoutImportsx = code.replace(/^import .+$/gm, "") + const jsCode = ts.transpileModule(codeWithoutImportsx, { + compilerOptions: { module: ts.ModuleKind.NodeNext }, + }).outputText + + vm.runInNewContext(jsCode, { z, exports }) + + return exports +} + +function schemasToJsonSchemas(schemas: Record): Record { + const result: Record = {} + + for (const [name, schema] of Object.entries(schemas)) { + try { + if (typeof schema === "function") { + const instantiated = (schema as (arg: z.ZodTypeAny) => z.ZodTypeAny)(z.any()) + if (instantiated) { + result[name] = z.toJSONSchema(instantiated) + } + } else if (schema) { + result[name] = z.toJSONSchema(schema) + } + } catch { + // Skip schemas that can't be converted + } + } + + return result +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 9673411..59706ed 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -29,6 +29,7 @@ "@leancodepl/contractsgenerator-typescript-plugin-client": ["plugins/client/src/index.ts"], "@leancodepl/contractsgenerator-typescript-plugin-contracts": ["plugins/contracts/src/index.ts"], "@leancodepl/contractsgenerator-typescript-plugin-raw": ["plugins/raw/src/index.ts"], + "@leancodepl/contractsgenerator-typescript-plugin-zod": ["plugins/zod/src/index.ts"], "@leancodepl/contractsgenerator-typescript-schema": ["libs/schema/src/index.ts"], "@leancodepl/contractsgenerator-typescript-types": ["libs/types/src/index.ts"], "@leancodepl/contractsgenerator-typescript-values": ["libs/values/src/index.ts"]