From 9af0269175aaf50cc6b4043ef4b0fba28e884aaa Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Thu, 12 Jun 2025 06:40:00 -0700 Subject: [PATCH 01/24] feat: decompose IR definition from basketry --- basketry.config.json | 11 + package-lock.json | 593 +++++-- package.json | 8 +- src/example.json | 3051 ++++++++++++++++++++++++++++++++++ src/example.test.ts | 16 + src/generated/.gitattributes | 8 + src/generated/types.ts | 1506 +++++++++++++++++ src/generator.ts | 13 - src/index.ts | 4 +- src/parser.ts | 8 - src/schema.json | 1247 ++++++++++++++ src/validator.ts | 35 + tsconfig.json | 3 +- 13 files changed, 6341 insertions(+), 162 deletions(-) create mode 100644 basketry.config.json create mode 100644 src/example.json create mode 100644 src/example.test.ts create mode 100644 src/generated/.gitattributes create mode 100644 src/generated/types.ts delete mode 100644 src/generator.ts delete mode 100644 src/parser.ts create mode 100644 src/schema.json create mode 100644 src/validator.ts diff --git a/basketry.config.json b/basketry.config.json new file mode 100644 index 0000000..58c941a --- /dev/null +++ b/basketry.config.json @@ -0,0 +1,11 @@ +{ + "source": "src/schema.json", + "parser": "@basketry/json-schema", + "generators": ["@basketry/typescript"], + "output": "src/generated", + "options": { + "typescript": { + "includeVersion": false + } + } +} diff --git a/package-lock.json b/package-lock.json index 20d3c4b..c3e4304 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,14 +9,16 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "basketry": "^0.0.29", - "case": "^1.6.3" + "ajv": "^8.17.1" }, "devDependencies": { + "@basketry/json-schema": "^0.2.0-alpha.4", + "@basketry/typescript": "^0.2.0-alpha.2", "@types/jest": "^27.4.0", "@types/node": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", + "basketry": "^0.2.0-alpha.14", "eslint": "^8.5.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.3", @@ -554,6 +556,32 @@ "node": ">=6.9.0" } }, + "node_modules/@basketry/json-schema": { + "version": "0.2.0-alpha.4", + "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-alpha.4.tgz", + "integrity": "sha512-ubjphn1TyLwcTbWIVuvWzML+sOZCvjk3mDbWOEE4UDcNo/Bstv9DDFggEkLI41r0TOJWOX6sonNvLhFS6Hmq5w==", + "dev": true, + "dependencies": { + "basketry": "^0.2.0-alpha.12", + "case": "^1.6.3", + "json-to-ast": "^2.1.0", + "pluralize": "^8.0.0", + "semver": "^7.3.5" + } + }, + "node_modules/@basketry/typescript": { + "version": "0.2.0-alpha.2", + "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-alpha.2.tgz", + "integrity": "sha512-TEPrv0g/l+7QwiSqN2P7Vyelt20NmQUo4t84psN/DInFqU2lVvISfqrLgnsxEiiLmWOdA5sjYk6Ac8oG810d0Q==", + "dev": true, + "dependencies": { + "basketry": "^0.2.0-alpha.10", + "case": "^1.6.3" + }, + "funding": { + "url": "https://github.com/sponsors/basketry" + } + }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -564,6 +592,7 @@ "version": "0.8.0", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "dev": true, "engines": { "node": ">= 12" } @@ -572,6 +601,7 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "dev": true, "dependencies": { "@cspotcode/source-map-consumer": "0.8.0" }, @@ -599,6 +629,22 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -608,6 +654,12 @@ "node": ">= 4" } }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.2", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", @@ -1409,22 +1461,26 @@ "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" + "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "dev": true }, "node_modules/@tsconfig/node12": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" + "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "dev": true }, "node_modules/@tsconfig/node14": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "dev": true }, "node_modules/@types/babel__core": { "version": "7.1.18", @@ -1525,7 +1581,8 @@ "node_modules/@types/node": { "version": "17.0.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz", - "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==" + "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==", + "dev": true }, "node_modules/@types/prettier": { "version": "2.4.3", @@ -1721,6 +1778,7 @@ "version": "8.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -1781,15 +1839,14 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -1836,6 +1893,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -1868,7 +1926,8 @@ "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true }, "node_modules/argparse": { "version": "2.0.1", @@ -2096,11 +2155,13 @@ "dev": true }, "node_modules/basketry": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.0.29.tgz", - "integrity": "sha512-r1OD3N1naq+aARGVy9dV/4AEOr3OLwTcQNbwgTA7iLZK5eYqZt234Ck+KqqqAUGGFn8Yb18uHL6z/LiIhPO/6Q==", + "version": "0.2.0-alpha.14", + "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-alpha.14.tgz", + "integrity": "sha512-Ho7zE1Tzy1oI6HChJr0mfI438Hy3xXBYE1m2f7RuIAMq9P+MoACU0VG/Rx1Cq6qalzsGw4sfm8ymO2NUq8b6EA==", + "dev": true, "dependencies": { "ajv": "^8.11.0", + "case": "^1.6.3", "chalk": "^4.1.2", "ts-node": "^10.7.0", "webpack-merge": "^5.8.0", @@ -2108,27 +2169,16 @@ }, "bin": { "basketry": "lib/cli.js" - } - }, - "node_modules/basketry/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://github.com/sponsors/basketry" } }, "node_modules/basketry/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, "dependencies": { "color-convert": "^2.0.1" }, @@ -2143,6 +2193,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2154,10 +2205,25 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/basketry/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/basketry/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2168,25 +2234,23 @@ "node_modules/basketry/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/basketry/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "engines": { "node": ">=8" } }, - "node_modules/basketry/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/basketry/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -2195,26 +2259,28 @@ } }, "node_modules/basketry/node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" } }, "node_modules/basketry/node_modules/yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, "engines": { "node": ">=12" } @@ -2342,6 +2408,7 @@ "version": "1.6.3", "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", + "dev": true, "engines": { "node": ">= 0.8.0" } @@ -2385,6 +2452,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -2395,6 +2463,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -2414,6 +2483,15 @@ "node": ">= 0.12.0" } }, + "node_modules/code-error-fragment": { + "version": "0.0.230", + "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", + "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -2465,7 +2543,8 @@ "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, "node_modules/cross-spawn": { "version": "6.0.5", @@ -2608,6 +2687,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, "engines": { "node": ">=0.3.1" } @@ -2696,7 +2776,8 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/enquirer": { "version": "2.3.6", @@ -2774,6 +2855,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, "engines": { "node": ">=6" } @@ -3081,6 +3163,22 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -3196,6 +3294,12 @@ "node": ">= 4" } }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/eslint/node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -3491,6 +3595,21 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ] + }, "node_modules/fastq": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", @@ -3545,6 +3664,15 @@ "node": ">=4" } }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -3623,6 +3751,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -3751,6 +3880,12 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4131,6 +4266,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } @@ -4196,6 +4332,7 @@ "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, "dependencies": { "isobject": "^3.0.1" }, @@ -4304,6 +4441,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -6167,10 +6305,9 @@ "dev": true }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -6178,6 +6315,19 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "node_modules/json-to-ast": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", + "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", + "dev": true, + "dependencies": { + "code-error-fragment": "0.0.230", + "grapheme-splitter": "^1.0.4" + }, + "engines": { + "node": ">= 4" + } + }, "node_modules/json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -6194,6 +6344,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -6314,7 +6465,8 @@ "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "node_modules/makeerror": { "version": "1.0.12", @@ -6785,6 +6937,15 @@ "node": ">=4" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6864,6 +7025,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, "engines": { "node": ">=6" } @@ -6924,6 +7086,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -7079,6 +7242,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, "dependencies": { "kind-of": "^6.0.2" }, @@ -7243,6 +7407,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7299,6 +7464,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7546,6 +7712,7 @@ "version": "10.7.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "dev": true, "dependencies": { "@cspotcode/source-map-support": "0.7.0", "@tsconfig/node10": "^1.0.7", @@ -7588,6 +7755,7 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, "engines": { "node": ">=0.4.0" } @@ -7671,6 +7839,7 @@ "version": "4.5.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7707,6 +7876,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -7720,7 +7890,8 @@ "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, "node_modules/v8-to-istanbul": { "version": "8.1.1", @@ -7795,11 +7966,13 @@ } }, "node_modules/webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, "dependencies": { "clone-deep": "^4.0.1", + "flat": "^5.0.2", "wildcard": "^2.0.0" }, "engines": { @@ -7864,9 +8037,10 @@ } }, "node_modules/wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true }, "node_modules/word-wrap": { "version": "1.2.3", @@ -7881,6 +8055,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7897,6 +8072,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -7911,6 +8087,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -7921,7 +8098,8 @@ "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/wrappy": { "version": "1.0.2", @@ -7978,6 +8156,7 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, "engines": { "node": ">=10" } @@ -8019,6 +8198,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, "engines": { "node": ">=6" } @@ -8416,6 +8596,29 @@ "to-fast-properties": "^2.0.0" } }, + "@basketry/json-schema": { + "version": "0.2.0-alpha.4", + "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-alpha.4.tgz", + "integrity": "sha512-ubjphn1TyLwcTbWIVuvWzML+sOZCvjk3mDbWOEE4UDcNo/Bstv9DDFggEkLI41r0TOJWOX6sonNvLhFS6Hmq5w==", + "dev": true, + "requires": { + "basketry": "^0.2.0-alpha.12", + "case": "^1.6.3", + "json-to-ast": "^2.1.0", + "pluralize": "^8.0.0", + "semver": "^7.3.5" + } + }, + "@basketry/typescript": { + "version": "0.2.0-alpha.2", + "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-alpha.2.tgz", + "integrity": "sha512-TEPrv0g/l+7QwiSqN2P7Vyelt20NmQUo4t84psN/DInFqU2lVvISfqrLgnsxEiiLmWOdA5sjYk6Ac8oG810d0Q==", + "dev": true, + "requires": { + "basketry": "^0.2.0-alpha.10", + "case": "^1.6.3" + } + }, "@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -8425,12 +8628,14 @@ "@cspotcode/source-map-consumer": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==" + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "dev": true }, "@cspotcode/source-map-support": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "dev": true, "requires": { "@cspotcode/source-map-consumer": "0.8.0" } @@ -8452,11 +8657,29 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true } } }, @@ -9071,22 +9294,26 @@ "@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" + "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "dev": true }, "@tsconfig/node12": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" + "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "dev": true }, "@tsconfig/node14": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "dev": true }, "@tsconfig/node16": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "dev": true }, "@types/babel__core": { "version": "7.1.18", @@ -9187,7 +9414,8 @@ "@types/node": { "version": "17.0.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz", - "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==" + "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==", + "dev": true }, "@types/prettier": { "version": "2.4.3", @@ -9308,7 +9536,8 @@ "acorn": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==" + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true }, "acorn-globals": { "version": "6.0.0", @@ -9351,15 +9580,14 @@ } }, "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" } }, "ansi-colors": { @@ -9388,7 +9616,8 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true }, "ansi-styles": { "version": "3.2.1", @@ -9412,7 +9641,8 @@ "arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true }, "argparse": { "version": "2.0.1", @@ -9585,32 +9815,24 @@ "dev": true }, "basketry": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.0.29.tgz", - "integrity": "sha512-r1OD3N1naq+aARGVy9dV/4AEOr3OLwTcQNbwgTA7iLZK5eYqZt234Ck+KqqqAUGGFn8Yb18uHL6z/LiIhPO/6Q==", + "version": "0.2.0-alpha.14", + "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-alpha.14.tgz", + "integrity": "sha512-Ho7zE1Tzy1oI6HChJr0mfI438Hy3xXBYE1m2f7RuIAMq9P+MoACU0VG/Rx1Cq6qalzsGw4sfm8ymO2NUq8b6EA==", + "dev": true, "requires": { "ajv": "^8.11.0", + "case": "^1.6.3", "chalk": "^4.1.2", "ts-node": "^10.7.0", "webpack-merge": "^5.8.0", "yargs": "^17.4.0" }, "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "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, "requires": { "color-convert": "^2.0.1" } @@ -9619,15 +9841,28 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -9635,44 +9870,44 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } }, "yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" } }, "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==" + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true } } }, @@ -9769,7 +10004,8 @@ "case": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", - "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==" + "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", + "dev": true }, "chalk": { "version": "2.4.2", @@ -9804,6 +10040,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -9814,6 +10051,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, "requires": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -9826,6 +10064,12 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, + "code-error-fragment": { + "version": "0.0.230", + "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", + "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==", + "dev": true + }, "collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -9874,7 +10118,8 @@ "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, "cross-spawn": { "version": "6.0.5", @@ -9988,7 +10233,8 @@ "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true }, "diff-sequences": { "version": "27.4.0", @@ -10054,7 +10300,8 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "enquirer": { "version": "2.3.6", @@ -10116,7 +10363,8 @@ "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true }, "escape-string-regexp": { "version": "1.0.5", @@ -10230,6 +10478,18 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -10309,6 +10569,12 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -10662,6 +10928,11 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==" + }, "fastq": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", @@ -10707,6 +10978,12 @@ "locate-path": "^2.0.0" } }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, "flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -10768,7 +11045,8 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true }, "get-intrinsic": { "version": "1.1.1", @@ -10855,6 +11133,12 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -11125,7 +11409,8 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true }, "is-generator-fn": { "version": "2.1.0", @@ -11167,6 +11452,7 @@ "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, "requires": { "isobject": "^3.0.1" } @@ -11241,7 +11527,8 @@ "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true }, "istanbul-lib-coverage": { "version": "3.2.0", @@ -12635,10 +12922,9 @@ "dev": true }, "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -12646,6 +12932,16 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "json-to-ast": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", + "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", + "dev": true, + "requires": { + "code-error-fragment": "0.0.230", + "grapheme-splitter": "^1.0.4" + } + }, "json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -12658,7 +12954,8 @@ "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true }, "kleur": { "version": "3.0.3", @@ -12751,7 +13048,8 @@ "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "makeerror": { "version": "1.0.12", @@ -13110,6 +13408,12 @@ "find-up": "^2.1.0" } }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -13166,7 +13470,8 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "queue-microtask": { "version": "1.2.3", @@ -13200,7 +13505,8 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true }, "require-from-string": { "version": "2.0.2", @@ -13304,6 +13610,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, "requires": { "kind-of": "^6.0.2" } @@ -13443,6 +13750,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -13484,6 +13792,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -13653,6 +13962,7 @@ "version": "10.7.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "dev": true, "requires": { "@cspotcode/source-map-support": "0.7.0", "@tsconfig/node10": "^1.0.7", @@ -13672,7 +13982,8 @@ "acorn-walk": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true } } }, @@ -13736,7 +14047,8 @@ "typescript": { "version": "4.5.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==" + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true }, "unbox-primitive": { "version": "1.0.1", @@ -13760,6 +14072,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -13773,7 +14086,8 @@ "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, "v8-to-istanbul": { "version": "8.1.1", @@ -13838,11 +14152,13 @@ "dev": true }, "webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, "requires": { "clone-deep": "^4.0.1", + "flat": "^5.0.2", "wildcard": "^2.0.0" } }, @@ -13895,9 +14211,10 @@ } }, "wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true }, "word-wrap": { "version": "1.2.3", @@ -13909,6 +14226,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -13919,6 +14237,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -13927,6 +14246,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -13934,7 +14254,8 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true } } }, @@ -13978,7 +14299,8 @@ "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true }, "yallist": { "version": "4.0.0", @@ -14010,7 +14332,8 @@ "yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true } } } diff --git a/package.json b/package.json index 7818500..c853f01 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,13 @@ "scripts": { "test": "jest", "clean": "run-s -s clean:*", - "create-snapshot": "ts-node ./src/snapshot/create-snapshot.ts", "lint": "run-s -s lint:*", "fix": "run-s -s fix:*", "clean:output": "rimraf lib", "start": "node ./lib/index.js", "prebuild": "run-s -s clean lint", "build": "tsc", + "postbuild": "node -e \"require('fs').copyFileSync('src/schema.json','lib/schema.json')\"", "lint:eslint": "eslint src/**/*.*", "fix:eslint": "eslint --fix src/**/*.*", "lint:prettier": "prettier -c .", @@ -33,10 +33,13 @@ }, "homepage": "https://github.com/basketry/ir#readme", "devDependencies": { + "@basketry/json-schema": "^0.2.0-alpha.4", + "@basketry/typescript": "^0.2.0-alpha.2", "@types/jest": "^27.4.0", "@types/node": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", + "basketry": "^0.2.0-alpha.14", "eslint": "^8.5.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.3", @@ -49,7 +52,6 @@ "typescript": "^4.5.5" }, "dependencies": { - "basketry": "^0.0.29", - "case": "^1.6.3" + "ajv": "^8.17.1" } } diff --git a/src/example.json b/src/example.json new file mode 100644 index 0000000..20ceb33 --- /dev/null +++ b/src/example.json @@ -0,0 +1,3051 @@ +{ + "$schema": "./schema.json", + "kind": "Service", + "basketry": "0.2", + "title": { "kind": "StringLiteral", "value": "BasketryExample" }, + "majorVersion": { "kind": "IntegerLiteral", "value": 1 }, + "sourcePaths": ["source/path.ext"], + "interfaces": [ + { + "kind": "Interface", + "name": { "kind": "StringLiteral", "value": "gizmo" }, + "methods": [ + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "getGizmos" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "OAuth2Scheme", + "type": { "value": "oauth2" }, + "name": { "kind": "StringLiteral", "value": "oauth2Auth" }, + "flows": [ + { + "kind": "OAuth2ImplicitFlow", + "type": { "value": "implicit" }, + "authorizationUrl": { + "kind": "StringLiteral", + "value": "https://example.com/auth" + }, + "scopes": [ + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "read:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Access gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "write:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Write gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "admin:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Manage gizmos" + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "search" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "default": { "kind": "StringLiteral", "value": "ASDF" }, + "rules": [] + }, + "meta": [ + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaString" }, + "value": { "kind": "UntypedLiteral", "value": "bar" } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaNumber" }, + "value": { "kind": "UntypedLiteral", "value": 1234 } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaBoolean" }, + "value": { "kind": "UntypedLiteral", "value": true } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaNull" }, + "value": { "kind": "UntypedLiteral", "value": null } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaObject" }, + "value": { + "kind": "UntypedLiteral", + "value": { "foo": "bar" } + } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaArray" }, + "value": { + "kind": "UntypedLiteral", + "value": [{ "foo": "bar" }] + } + } + ] + } + ], + "description": [ + { "kind": "StringLiteral", "value": "Only has a summary" } + ], + "deprecated": { "kind": "TrueLiteral", "value": true }, + "returns": { + "kind": "ReturnValue", + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "getGizmosResponse" + }, + "rules": [] + } + } + }, + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "updateGizmo" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "OAuth2Scheme", + "type": { "value": "oauth2" }, + "name": { "kind": "StringLiteral", "value": "oauth2Auth" }, + "flows": [ + { + "kind": "OAuth2ImplicitFlow", + "type": { "value": "implicit" }, + "authorizationUrl": { + "kind": "StringLiteral", + "value": "https://example.com/auth" + }, + "scopes": [ + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "read:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Access gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "write:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Write gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "admin:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Manage gizmos" + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "factors" }, + "description": [ + { "kind": "StringLiteral", "value": "array of primitive" } + ], + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [ + { + "kind": "ValidationRule", + "id": "ArrayMaxItems", + "max": { "kind": "NonNegativeIntegerLiteral", "value": 6 } + }, + { + "kind": "ValidationRule", + "id": "ArrayMinItems", + "min": { "kind": "NonNegativeIntegerLiteral", "value": 2 } + }, + { + "kind": "ValidationRule", + "id": "StringPattern", + "pattern": { + "kind": "NonEmptyStringLiteral", + "value": "[0-9a-fA-F]+" + } + } + ] + } + } + ], + "returns": { + "kind": "ReturnValue", + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "gizmo" }, + "rules": [] + } + } + }, + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "createGizmo" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "OAuth2Scheme", + "type": { "value": "oauth2" }, + "name": { "kind": "StringLiteral", "value": "oauth2Auth" }, + "flows": [ + { + "kind": "OAuth2ImplicitFlow", + "type": { "value": "implicit" }, + "authorizationUrl": { + "kind": "StringLiteral", + "value": "https://example.com/auth" + }, + "scopes": [ + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "read:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Access gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "write:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Write gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "admin:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Manage gizmos" + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "size" }, + "description": [ + { "kind": "StringLiteral", "value": "Anonymous enum" } + ], + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "createGizmoSize" + }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "small" }, + { "kind": "StringLiteral", "value": "medium" }, + { "kind": "StringLiteral", "value": "big" }, + { "kind": "StringLiteral", "value": "XL" } + ] + } + ] + } + } + ], + "description": [ + { + "kind": "StringLiteral", + "value": "Has a summary in addition to a description" + }, + { + "kind": "StringLiteral", + "value": "Has a description in addition to a summary" + } + ], + "returns": { + "kind": "ReturnValue", + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "gizmo" }, + "rules": [] + } + } + } + ], + "protocols": { + "kind": "InterfaceProtocols", + "http": [ + { + "kind": "HttpRoute", + "pattern": { "kind": "StringLiteral", "value": "/gizmos" }, + "methods": [ + { + "kind": "HttpMethod", + "name": { "kind": "StringLiteral", "value": "getGizmos" }, + "verb": { "kind": "HttpVerbLiteral", "value": "get" }, + "parameters": [ + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "search" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + } + ], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 200 + }, + "requestMediaTypes": [], + "responseMediaTypes": [ + { "kind": "StringLiteral", "value": "*/*" } + ] + }, + { + "kind": "HttpMethod", + "name": { "kind": "StringLiteral", "value": "updateGizmo" }, + "verb": { "kind": "HttpVerbLiteral", "value": "put" }, + "parameters": [ + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "factors" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + } + ], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 200 + }, + "requestMediaTypes": [], + "responseMediaTypes": [ + { "kind": "StringLiteral", "value": "*/*" } + ] + }, + { + "kind": "HttpMethod", + "name": { "kind": "StringLiteral", "value": "createGizmo" }, + "verb": { "kind": "HttpVerbLiteral", "value": "post" }, + "parameters": [ + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "size" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + } + ], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 201 + }, + "requestMediaTypes": [], + "responseMediaTypes": [ + { "kind": "StringLiteral", "value": "*/*" } + ] + } + ] + } + ] + } + }, + { + "kind": "Interface", + "name": { "kind": "StringLiteral", "value": "widget" }, + "methods": [ + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "getWidgets" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + } + ], + "parameters": [], + "returns": { + "kind": "ReturnValue", + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "widget" }, + "rules": [] + } + } + }, + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "putWidget" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + } + ], + "parameters": [] + }, + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "createWidget" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + } + ], + "parameters": [ + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "string" }, + "description": [ + { "kind": "StringLiteral", "value": "The new widget" } + ], + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "createWidgetString" + }, + "rules": [] + } + } + ], + "meta": [ + { + "kind": "MetaValue", + "key": { + "kind": "StringLiteral", + "value": "codegen-request-body-name" + }, + "value": { "kind": "UntypedLiteral", "value": "body" } + } + ] + }, + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "getWidgetFoo" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + } + ], + "parameters": [ + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "id" }, + "description": [ + { "kind": "StringLiteral", "value": "The widget ID" } + ], + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [ + { "kind": "ValidationRule", "id": "Required" }, + { + "kind": "ValidationRule", + "id": "StringMaxLength", + "length": { + "kind": "NonNegativeIntegerLiteral", + "value": 30 + } + } + ] + } + } + ], + "returns": { + "kind": "ReturnValue", + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "widget" }, + "rules": [] + } + } + }, + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "deleteWidgetFoo" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + } + ], + "parameters": [ + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "id" }, + "description": [ + { "kind": "StringLiteral", "value": "The widget ID" } + ], + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [ + { "kind": "ValidationRule", "id": "Required" }, + { + "kind": "ValidationRule", + "id": "StringMaxLength", + "length": { + "kind": "NonNegativeIntegerLiteral", + "value": 30 + } + } + ] + } + } + ] + } + ], + "protocols": { + "kind": "InterfaceProtocols", + "http": [ + { + "kind": "HttpRoute", + "pattern": { "kind": "StringLiteral", "value": "/widgets" }, + "methods": [ + { + "kind": "HttpMethod", + "name": { "kind": "StringLiteral", "value": "getWidgets" }, + "verb": { "kind": "HttpVerbLiteral", "value": "get" }, + "parameters": [], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 200 + }, + "requestMediaTypes": [], + "responseMediaTypes": [ + { "kind": "StringLiteral", "value": "*/*" } + ] + }, + { + "kind": "HttpMethod", + "name": { "kind": "StringLiteral", "value": "putWidget" }, + "verb": { "kind": "HttpVerbLiteral", "value": "put" }, + "parameters": [], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 200 + }, + "requestMediaTypes": [], + "responseMediaTypes": [] + }, + { + "kind": "HttpMethod", + "name": { "kind": "StringLiteral", "value": "createWidget" }, + "verb": { "kind": "HttpVerbLiteral", "value": "post" }, + "parameters": [ + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "string" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "body" + } + } + ], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 204 + }, + "requestMediaTypes": [ + { "kind": "StringLiteral", "value": "*/*" } + ], + "responseMediaTypes": [] + } + ] + }, + { + "kind": "HttpRoute", + "pattern": { + "kind": "StringLiteral", + "value": "/widgets/{id}/foo" + }, + "methods": [ + { + "kind": "HttpMethod", + "name": { "kind": "StringLiteral", "value": "getWidgetFoo" }, + "verb": { "kind": "HttpVerbLiteral", "value": "get" }, + "parameters": [ + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "id" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + } + } + ], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 200 + }, + "requestMediaTypes": [], + "responseMediaTypes": [ + { "kind": "StringLiteral", "value": "*/*" } + ] + }, + { + "kind": "HttpMethod", + "name": { "kind": "StringLiteral", "value": "deleteWidgetFoo" }, + "verb": { "kind": "HttpVerbLiteral", "value": "delete" }, + "parameters": [ + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "id" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + } + } + ], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 204 + }, + "requestMediaTypes": [], + "responseMediaTypes": [] + } + ] + } + ] + } + }, + { + "kind": "Interface", + "name": { "kind": "StringLiteral", "value": "exhaustive" }, + "methods": [ + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "exhaustiveFormats" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + } + ], + "parameters": [ + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "string-no-format" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "string-date" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "date" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringFormat", + "format": { + "kind": "NonEmptyStringLiteral", + "value": "date" + } + } + ] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "string-date-time" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { + "kind": "PrimitiveLiteral", + "value": "date-time" + }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringFormat", + "format": { + "kind": "NonEmptyStringLiteral", + "value": "date-time" + } + } + ] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "integer-no-format" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "integer-int32" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "integer-int64" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "long" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "number-no-format" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "number-float" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "float" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "number-double" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "double" }, + "rules": [] + } + } + ] + }, + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "exhaustiveParams" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + } + ], + "parameters": [ + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "string" }, + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "exhaustiveParamsString" + }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "query-string" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "query-enum" }, + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "exhaustiveParamsQueryEnum" + }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "one" }, + { "kind": "StringLiteral", "value": "two" }, + { "kind": "StringLiteral", "value": "three" } + ] + } + ] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "query-number" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "query-integer" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "query-boolean" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "query-string-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "query-enum-array" }, + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "exhaustiveParamsQueryEnumArray" + }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "one" }, + { "kind": "StringLiteral", "value": "two" }, + { "kind": "StringLiteral", "value": "three" } + ] + } + ] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "query-number-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "query-integer-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "query-boolean-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "path-string" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [{ "kind": "ValidationRule", "id": "Required" }] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "path-enum" }, + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "exhaustiveParamsPathEnum" + }, + "rules": [ + { "kind": "ValidationRule", "id": "Required" }, + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "one" }, + { "kind": "StringLiteral", "value": "two" }, + { "kind": "StringLiteral", "value": "three" } + ] + } + ] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "path-number" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [{ "kind": "ValidationRule", "id": "Required" }] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "path-integer" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "rules": [{ "kind": "ValidationRule", "id": "Required" }] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "path-boolean" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "rules": [{ "kind": "ValidationRule", "id": "Required" }] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "path-string-array" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [{ "kind": "ValidationRule", "id": "Required" }] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "path-enum-array" }, + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "exhaustiveParamsPathEnumArray" + }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [ + { "kind": "ValidationRule", "id": "Required" }, + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "one" }, + { "kind": "StringLiteral", "value": "two" }, + { "kind": "StringLiteral", "value": "three" } + ] + } + ] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "path-number-array" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [{ "kind": "ValidationRule", "id": "Required" }] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "path-integer-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [{ "kind": "ValidationRule", "id": "Required" }] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "path-boolean-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [{ "kind": "ValidationRule", "id": "Required" }] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "header-string" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "header-enum" }, + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "exhaustiveParamsHeaderEnum" + }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "one" }, + { "kind": "StringLiteral", "value": "two" }, + { "kind": "StringLiteral", "value": "three" } + ] + } + ] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "header-number" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "header-integer" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "header-boolean" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "header-string-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { "kind": "StringLiteral", "value": "header-enum-array" }, + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "exhaustiveParamsHeaderEnumArray" + }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "one" }, + { "kind": "StringLiteral", "value": "two" }, + { "kind": "StringLiteral", "value": "three" } + ] + } + ] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "header-number-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "header-integer-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [] + } + }, + { + "kind": "Parameter", + "name": { + "kind": "StringLiteral", + "value": "header-boolean-array" + }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "isArray": { "kind": "TrueLiteral", "value": true }, + "rules": [] + } + } + ], + "meta": [ + { + "kind": "MetaValue", + "key": { + "kind": "StringLiteral", + "value": "codegen-request-body-name" + }, + "value": { "kind": "UntypedLiteral", "value": "body" } + } + ] + } + ], + "protocols": { + "kind": "InterfaceProtocols", + "http": [ + { + "kind": "HttpRoute", + "pattern": { "kind": "StringLiteral", "value": "/exhaustive" }, + "methods": [ + { + "kind": "HttpMethod", + "name": { + "kind": "StringLiteral", + "value": "exhaustiveFormats" + }, + "verb": { "kind": "HttpVerbLiteral", "value": "get" }, + "parameters": [ + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "string-no-format" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "string-date" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "string-date-time" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "integer-no-format" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "integer-int32" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "integer-int64" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "number-no-format" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "number-float" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "number-double" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + } + ], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 204 + }, + "requestMediaTypes": [], + "responseMediaTypes": [] + } + ] + }, + { + "kind": "HttpRoute", + "pattern": { + "kind": "StringLiteral", + "value": "/exhaustive/{path-string}/{path-enum}/{path-number}/{path-integer}/{path-boolean}/{path-string-array}/{path-enum-array}/{path-number-array}/{path-integer-array}/{path-boolean-array}" + }, + "methods": [ + { + "kind": "HttpMethod", + "name": { + "kind": "StringLiteral", + "value": "exhaustiveParams" + }, + "verb": { "kind": "HttpVerbLiteral", "value": "get" }, + "parameters": [ + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "string" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "body" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-string" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "query-enum" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-number" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-integer" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-boolean" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-string-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-enum-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-number-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-integer-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "query-boolean-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "query" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "path-string" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + } + }, + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "path-enum" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + } + }, + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "path-number" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "path-integer" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "path-boolean" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "path-string-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "path-enum-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "path-number-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "path-integer-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "path-boolean-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "path" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-string" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + } + }, + { + "kind": "HttpParameter", + "name": { "kind": "StringLiteral", "value": "header-enum" }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-number" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-integer" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-boolean" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-string-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-enum-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-number-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-integer-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + }, + { + "kind": "HttpParameter", + "name": { + "kind": "StringLiteral", + "value": "header-boolean-array" + }, + "location": { + "kind": "HttpLocationLiteral", + "value": "header" + }, + "arrayFormat": { + "kind": "HttpArrayFormatLiteral", + "value": "csv" + } + } + ], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 204 + }, + "requestMediaTypes": [ + { "kind": "StringLiteral", "value": "*/*" } + ], + "responseMediaTypes": [] + } + ] + } + ] + } + }, + { + "kind": "Interface", + "name": { "kind": "StringLiteral", "value": "authPermutation" }, + "methods": [ + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "all-auth-schemes" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "BasicScheme", + "type": { "value": "basic" }, + "name": { "kind": "StringLiteral", "value": "basicAuth" } + } + ] + }, + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "BasicScheme", + "type": { "value": "basic" }, + "name": { + "kind": "StringLiteral", + "value": "alternate-basic-auth" + } + } + ] + }, + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + }, + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "OAuth2Scheme", + "type": { "value": "oauth2" }, + "name": { "kind": "StringLiteral", "value": "oauth2Auth" }, + "flows": [ + { + "kind": "OAuth2ImplicitFlow", + "type": { "value": "implicit" }, + "authorizationUrl": { + "kind": "StringLiteral", + "value": "https://example.com/auth" + }, + "scopes": [ + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "read:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Access gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "write:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Write gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "admin:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Manage gizmos" + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "kind": "Method", + "name": { "kind": "StringLiteral", "value": "combo-auth-schemes" }, + "security": [ + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "BasicScheme", + "type": { "value": "basic" }, + "name": { "kind": "StringLiteral", "value": "basicAuth" } + }, + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { "kind": "StringLiteral", "value": "apiKeyAuth" }, + "parameter": { "kind": "StringLiteral", "value": "x-apikey" }, + "in": { "value": "header" } + } + ] + }, + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "BasicScheme", + "type": { "value": "basic" }, + "name": { "kind": "StringLiteral", "value": "basicAuth" } + }, + { + "kind": "ApiKeyScheme", + "type": { "value": "apiKey" }, + "name": { + "kind": "StringLiteral", + "value": "alternateApiKeyAuth" + }, + "parameter": { "kind": "StringLiteral", "value": "apikey" }, + "in": { "value": "query" } + } + ] + }, + { + "kind": "SecurityOption", + "schemes": [ + { + "kind": "BasicScheme", + "type": { "value": "basic" }, + "name": { + "kind": "StringLiteral", + "value": "alternate-basic-auth" + } + }, + { + "kind": "OAuth2Scheme", + "type": { "value": "oauth2" }, + "name": { "kind": "StringLiteral", "value": "oauth2Auth" }, + "flows": [ + { + "kind": "OAuth2ImplicitFlow", + "type": { "value": "implicit" }, + "authorizationUrl": { + "kind": "StringLiteral", + "value": "https://example.com/auth" + }, + "scopes": [ + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "read:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Access gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "write:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Write gizmo data" + } + ] + }, + { + "kind": "OAuth2Scope", + "name": { + "kind": "StringLiteral", + "value": "admin:gizmos" + }, + "description": [ + { + "kind": "StringLiteral", + "value": "Manage gizmos" + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "protocols": { + "kind": "InterfaceProtocols", + "http": [ + { + "kind": "HttpRoute", + "pattern": { + "kind": "StringLiteral", + "value": "/authPermutations" + }, + "methods": [ + { + "kind": "HttpMethod", + "name": { + "kind": "StringLiteral", + "value": "all-auth-schemes" + }, + "verb": { "kind": "HttpVerbLiteral", "value": "get" }, + "parameters": [], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 200 + }, + "requestMediaTypes": [], + "responseMediaTypes": [] + }, + { + "kind": "HttpMethod", + "name": { + "kind": "StringLiteral", + "value": "combo-auth-schemes" + }, + "verb": { "kind": "HttpVerbLiteral", "value": "put" }, + "parameters": [], + "successCode": { + "kind": "HttpStatusCodeLiteral", + "value": 200 + }, + "requestMediaTypes": [], + "responseMediaTypes": [] + } + ] + } + ] + } + } + ], + "types": [ + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "gizmo" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "id" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringMaxLength", + "length": { "kind": "NonNegativeIntegerLiteral", "value": 30 } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "name" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "size" }, + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "productSize" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "small" }, + { "kind": "StringLiteral", "value": "medium" }, + { "kind": "StringLiteral", "value": "large" } + ] + } + ] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "widget" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "id" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringMaxLength", + "length": { "kind": "NonNegativeIntegerLiteral", "value": 30 } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "name" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringMaxLength", + "length": { "kind": "NonNegativeIntegerLiteral", "value": 30 } + }, + { + "kind": "ValidationRule", + "id": "StringPattern", + "pattern": { + "kind": "NonEmptyStringLiteral", + "value": "[0-9a-fA-F]+" + } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "fiz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "NumberMultipleOf", + "value": { "kind": "NonNegativeNumberLiteral", "value": 3 } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "buzz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "NumberMultipleOf", + "value": { "kind": "NonNegativeNumberLiteral", "value": 5 } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "fizbuzz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "NumberMultipleOf", + "value": { "kind": "NonNegativeNumberLiteral", "value": 15 } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "foo" }, + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "widgetFoo" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "size" }, + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "productSize" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "small" }, + { "kind": "StringLiteral", "value": "medium" }, + { "kind": "StringLiteral", "value": "large" } + ] + } + ] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "newWidget" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "name" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringMaxLength", + "length": { "kind": "NonNegativeIntegerLiteral", "value": 30 } + }, + { + "kind": "ValidationRule", + "id": "StringPattern", + "pattern": { + "kind": "NonEmptyStringLiteral", + "value": "[0-9a-fA-F]+" + } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "fiz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "NumberMultipleOf", + "value": { "kind": "NonNegativeNumberLiteral", "value": 3 } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "buzz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "NumberMultipleOf", + "value": { "kind": "NonNegativeNumberLiteral", "value": 5 } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "fizbuzz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "NumberMultipleOf", + "value": { "kind": "NonNegativeNumberLiteral", "value": 15 } + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "foo" }, + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "newWidgetFoo" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "size" }, + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "productSize" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "small" }, + { "kind": "StringLiteral", "value": "medium" }, + { "kind": "StringLiteral", "value": "large" } + ] + } + ] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "someType" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "a" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "nestedUnion" }, + "value": { + "kind": "ComplexValue", + "typeName": { + "kind": "StringLiteral", + "value": "someTypeNestedUnion" + }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "partA" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "a" }, + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "singleValueEnum" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [{ "kind": "StringLiteral", "value": "the value" }] + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "b" }, + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "multiValueEnum" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "the value" }, + { "kind": "StringLiteral", "value": "another value" } + ] + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "const" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "constant": { "kind": "StringLiteral", "value": "the only value" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [ + { "kind": "StringLiteral", "value": "the only value" } + ] + } + ] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "partB" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "g" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "h" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "e" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "f" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "c" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "d" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "partC" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "g" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "h" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "e" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "f" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "partD" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "g" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "h" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "cat" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "type" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "constant": { "kind": "StringLiteral", "value": "cat" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [{ "kind": "StringLiteral", "value": "cat" }] + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "lives" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "dog" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "type" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "constant": { "kind": "StringLiteral", "value": "dog" }, + "rules": [ + { + "kind": "ValidationRule", + "id": "StringEnum", + "values": [{ "kind": "StringLiteral", "value": "dog" }] + } + ] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "goodBoi" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "getGizmosResponse" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "data" }, + "value": { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "gizmo" }, + "rules": [], + "isArray": { "kind": "TrueLiteral", "value": true } + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "createWidgetString" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "name" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "exhaustiveParamsString" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "foo" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "bar" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "widgetFoo" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "fiz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "constant": { "kind": "NumberLiteral", "value": 123456 }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "buzz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [] + } + } + ], + "rules": [] + }, + { + "kind": "Type", + "name": { "kind": "StringLiteral", "value": "newWidgetFoo" }, + "properties": [ + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "fiz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "constant": { "kind": "NumberLiteral", "value": 123456 }, + "rules": [] + } + }, + { + "kind": "Property", + "name": { "kind": "StringLiteral", "value": "buzz" }, + "value": { + "kind": "PrimitiveValue", + "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "rules": [] + } + } + ], + "rules": [] + } + ], + "enums": [ + { + "kind": "Enum", + "name": { "kind": "StringLiteral", "value": "createGizmoSize" }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "small" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "medium" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "big" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "XL" } + } + ] + }, + { + "kind": "Enum", + "name": { "kind": "StringLiteral", "value": "exhaustiveParamsQueryEnum" }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "one" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "two" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "three" } + } + ] + }, + { + "kind": "Enum", + "name": { + "kind": "StringLiteral", + "value": "exhaustiveParamsQueryEnumArray" + }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "one" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "two" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "three" } + } + ] + }, + { + "kind": "Enum", + "name": { "kind": "StringLiteral", "value": "exhaustiveParamsPathEnum" }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "one" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "two" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "three" } + } + ] + }, + { + "kind": "Enum", + "name": { + "kind": "StringLiteral", + "value": "exhaustiveParamsPathEnumArray" + }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "one" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "two" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "three" } + } + ] + }, + { + "kind": "Enum", + "name": { + "kind": "StringLiteral", + "value": "exhaustiveParamsHeaderEnum" + }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "one" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "two" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "three" } + } + ] + }, + { + "kind": "Enum", + "name": { + "kind": "StringLiteral", + "value": "exhaustiveParamsHeaderEnumArray" + }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "one" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "two" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "three" } + } + ] + }, + { + "kind": "Enum", + "name": { "kind": "StringLiteral", "value": "productSize" }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "small" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "medium" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "large" } + } + ] + }, + { + "kind": "Enum", + "name": { "kind": "StringLiteral", "value": "singleValueEnum" }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "the value" } + } + ] + }, + { + "kind": "Enum", + "name": { "kind": "StringLiteral", "value": "multiValueEnum" }, + "members": [ + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "the value" } + }, + { + "kind": "EnumMember", + "content": { "kind": "StringLiteral", "value": "another value" } + } + ] + } + ], + "unions": [ + { + "kind": "SimpleUnion", + "name": { "kind": "StringLiteral", "value": "topLevelUnion" }, + "members": [ + { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "partA" }, + "rules": [] + }, + { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "partB" }, + "rules": [] + } + ] + }, + { + "kind": "SimpleUnion", + "name": { "kind": "StringLiteral", "value": "someTypeNestedUnion" }, + "members": [ + { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "partA" }, + "rules": [] + }, + { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "partB" }, + "rules": [] + } + ] + }, + { + "kind": "DiscriminatedUnion", + "name": { "kind": "StringLiteral", "value": "animal" }, + "discriminator": { "kind": "StringLiteral", "value": "type" }, + "members": [ + { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "cat" }, + "rules": [] + }, + { + "kind": "ComplexValue", + "typeName": { "kind": "StringLiteral", "value": "dog" }, + "rules": [] + } + ] + } + ], + "meta": [ + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaString" }, + "value": { "kind": "UntypedLiteral", "value": "bar" } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaNumber" }, + "value": { "kind": "UntypedLiteral", "value": 1234 } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaBoolean" }, + "value": { "kind": "UntypedLiteral", "value": true } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaNull" }, + "value": { "kind": "UntypedLiteral", "value": null } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaObject" }, + "value": { "kind": "UntypedLiteral", "value": { "foo": "bar" } } + }, + { + "kind": "MetaValue", + "key": { "kind": "StringLiteral", "value": "metaArray" }, + "value": { "kind": "UntypedLiteral", "value": [{ "foo": "bar" }] } + } + ] +} diff --git a/src/example.test.ts b/src/example.test.ts new file mode 100644 index 0000000..b9eafe1 --- /dev/null +++ b/src/example.test.ts @@ -0,0 +1,16 @@ +import * as example from './example.json'; +import { validate } from './validator'; + +describe('Example IR', () => { + it('is valid', () => { + const result = validate(example); + + expect(result.errors).toEqual([]); + }); + + it('is invalid', () => { + const result = validate({}); + + expect(result.errors).not.toEqual([]); + }); +}); diff --git a/src/generated/.gitattributes b/src/generated/.gitattributes new file mode 100644 index 0000000..fda8ccf --- /dev/null +++ b/src/generated/.gitattributes @@ -0,0 +1,8 @@ +# This code was generated by basketry@0.2.0-alpha.14 +# +# Changes to this file may cause incorrect behavior and will be lost if +# the code is regenerated. +# +# To learn more, visit: https://basketry.io + +types.ts linguist-generated=true diff --git a/src/generated/types.ts b/src/generated/types.ts new file mode 100644 index 0000000..387da62 --- /dev/null +++ b/src/generated/types.ts @@ -0,0 +1,1506 @@ +/** + * This code was generated by @basketry/typescript@0.2.0-alpha.2 + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. + * + * To make changes to the contents of this file: + * 1. Edit src/schema.json + * 2. Run the Basketry CLI + * + * About Basketry: https://basketry.io + * About @basketry/typescript: https://basketry.io/docs/components/@basketry/typescript + */ + +export type ApiKeySchemeInValue = 'header' | 'query' | 'cookie'; + +/** The format of an array in an HTTP request or response. */ +export type HttpArrayFormat = 'csv' | 'ssv' | 'tsv' | 'pipes' | 'multi'; + +export type HttpLocation = 'header' | 'query' | 'path' | 'formData' | 'body'; + +export type HttpVerb = + | 'get' + | 'post' + | 'put' + | 'patch' + | 'delete' + | 'head' + | 'options' + | 'trace'; + +/** The name of a primitive type. */ +export type Primitive = + | 'string' + | 'number' + | 'integer' + | 'long' + | 'float' + | 'double' + | 'boolean' + | 'date' + | 'date-time' + | 'null' + | 'binary' + | 'untyped'; + +export type ApiKeyScheme = { + kind: 'ApiKeyScheme'; + type: ApiKeySchemeType; + deprecated?: TrueLiteral; + name: StringLiteral; + description?: StringLiteral[]; + parameter: StringLiteral; + in: ApiKeySchemeIn; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type ApiKeySchemeIn = { + value: ApiKeySchemeInValue; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type ApiKeySchemeType = { + value: 'apiKey'; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type ArrayMaxItemsRule = { + kind: 'ValidationRule'; + id: 'ArrayMaxItems'; + max: NonNegativeIntegerLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type ArrayMinItemsRule = { + kind: 'ValidationRule'; + id: 'ArrayMinItems'; + min: NonNegativeIntegerLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type ArrayUniqueItemsRule = { + kind: 'ValidationRule'; + id: 'ArrayUniqueItems'; + required: boolean; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type BasicScheme = { + kind: 'BasicScheme'; + type: BasicSchemeType; + deprecated?: TrueLiteral; + name: StringLiteral; + description?: StringLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type BasicSchemeType = { + value: 'basic'; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +/** A boolean literal */ +export type BooleanLiteral = { + kind: 'BooleanLiteral'; + value: boolean; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type ComplexValue = { + kind: 'ComplexValue'; + + /** The name of a type, enum, or union defined in this Service. */ + typeName: StringLiteral; + isArray?: TrueLiteral; + rules: ValidationRule[]; +}; + +export type ConstantRule = { + kind: 'ValidationRule'; + id: 'Constant'; + value: ConstantRuleValue; +}; + +/** TODO: don't allow arrays, enums, or other unions in discriminated unions */ +export type DiscriminatedUnion = { + kind: 'DiscriminatedUnion'; + name: StringLiteral; + description?: StringLiteral[]; + discriminator: StringLiteral; + members: ComplexValue[]; + deprecated?: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type Enum = { + kind: 'Enum'; + name: StringLiteral; + description?: StringLiteral[]; + members: EnumMember[]; + deprecated?: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type EnumMember = { + kind: 'EnumMember'; + content: StringLiteral; + description?: StringLiteral[]; + deprecated?: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type HttpArrayFormatLiteral = { + kind: 'HttpArrayFormatLiteral'; + value: HttpArrayFormat; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type HttpLocationLiteral = { + kind: 'HttpLocationLiteral'; + value: HttpLocation; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type HttpMethod = { + kind: 'HttpMethod'; + name: StringLiteral; + verb: HttpVerbLiteral; + parameters: HttpParameter[]; + successCode: HttpStatusCodeLiteral; + requestMediaTypes: StringLiteral[]; + responseMediaTypes: StringLiteral[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type HttpParameter = { + kind: 'HttpParameter'; + name: StringLiteral; + location: HttpLocationLiteral; + arrayFormat?: HttpArrayFormatLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type HttpRoute = { + kind: 'HttpRoute'; + pattern: StringLiteral; + methods: HttpMethod[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type HttpStatusCodeLiteral = { + kind: 'HttpStatusCodeLiteral'; + value: number; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type HttpVerbLiteral = { + kind: 'HttpVerbLiteral'; + value: HttpVerb; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +/** An integer literal */ +export type IntegerLiteral = { + kind: 'IntegerLiteral'; + value: number; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type Interface = { + kind: 'Interface'; + name: StringLiteral; + description?: StringLiteral[]; + methods: Method[]; + protocols?: Protocols; + deprecated?: TrueLiteral; + meta?: MetaValue[]; +}; + +export type MapKey = { + kind: 'MapKey'; + value: MemberValue; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type MapProperties = { + kind: 'MapProperties'; + key: MapKey; + requiredKeys: StringLiteral[]; + value: MapValue; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type MapValue = { + kind: 'MapValue'; + value: MemberValue; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type MetaValue = { + kind: 'MetaValue'; + key: StringLiteral; + value: UntypedLiteral; +}; + +export type Method = { + kind: 'Method'; + name: StringLiteral; + security: SecurityOption[]; + description?: StringLiteral[]; + parameters: Parameter[]; + returns?: ReturnValue; + deprecated?: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +/** A string literal */ +export type NonEmptyStringLiteral = { + kind: 'NonEmptyStringLiteral'; + value: string; + + /** The location of this in the doc. */ + loc?: string; +}; + +export type NonNegativeIntegerLiteral = { + kind: 'NonNegativeIntegerLiteral'; + value: number; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type NonNegativeNumberLiteral = { + kind: 'NonNegativeNumberLiteral'; + value: number; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +/** A null literal */ +export type NullLiteral = { + kind: 'NullLiteral'; + value: any; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type NumberGteRule = { + kind: 'ValidationRule'; + id: 'NumberGTE'; + value: NumberLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type NumberGtRule = { + kind: 'ValidationRule'; + id: 'NumberGT'; + value: NumberLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +/** A number literal */ +export type NumberLiteral = { + kind: 'NumberLiteral'; + value: number; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type NumberLteRule = { + kind: 'ValidationRule'; + id: 'NumberLTE'; + value: NumberLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type NumberLtRule = { + kind: 'ValidationRule'; + id: 'NumberLT'; + value: NumberLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type NumberMultipleOfRule = { + kind: 'ValidationRule'; + id: 'NumberMultipleOf'; + value: NonNegativeNumberLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type OAuth2AuthorizationCodeFlow = { + kind: 'OAuth2AuthorizationCodeFlow'; + type: OAuth2AuthorizationCodeFlowType; + deprecated?: TrueLiteral; + authorizationUrl: StringLiteral; + tokenUrl: StringLiteral; + refreshUrl?: StringLiteral; + scopes: OAuth2Scope[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type OAuth2AuthorizationCodeFlowType = { + value: 'authorizationCode'; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type OAuth2ClientCredentialsFlow = { + kind: 'OAuth2ClientCredentialsFlow'; + type: OAuth2ClientCredentialsFlowType; + deprecated?: TrueLiteral; + tokenUrl: StringLiteral; + refreshUrl?: StringLiteral; + scopes: OAuth2Scope[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type OAuth2ClientCredentialsFlowType = { + value: 'clientCredentials'; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type OAuth2ImplicitFlow = { + kind: 'OAuth2ImplicitFlow'; + type: OAuth2ImplicitFlowType; + deprecated?: TrueLiteral; + authorizationUrl: StringLiteral; + refreshUrl?: StringLiteral; + scopes: OAuth2Scope[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type OAuth2ImplicitFlowType = { + value: 'implicit'; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type OAuth2PasswordFlow = { + kind: 'OAuth2PasswordFlow'; + type: OAuth2PasswordFlowType; + deprecated?: TrueLiteral; + tokenUrl: StringLiteral; + refreshUrl?: StringLiteral; + scopes: OAuth2Scope[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type OAuth2PasswordFlowType = { + value: 'password'; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type OAuth2Scheme = { + kind: 'OAuth2Scheme'; + type: OAuth2SchemeType; + deprecated?: TrueLiteral; + name: StringLiteral; + description?: StringLiteral[]; + flows: OAuth2Flow[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type OAuth2SchemeType = { + value: 'oauth2'; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type OAuth2Scope = { + kind: 'OAuth2Scope'; + name: StringLiteral; + description: StringLiteral[]; + deprecated?: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type ObjectAdditionalPropertiesRule = { + kind: 'ObjectValidationRule'; + id: 'ObjectAdditionalProperties'; + forbidden: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type ObjectMaxPropertiesRule = { + kind: 'ObjectValidationRule'; + id: 'ObjectMaxProperties'; + max: NonNegativeIntegerLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type ObjectMinPropertiesRule = { + kind: 'ObjectValidationRule'; + id: 'ObjectMinProperties'; + min: NonNegativeIntegerLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type Parameter = { + kind: 'Parameter'; + name: StringLiteral; + description?: StringLiteral[]; + value: MemberValue; + deprecated?: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type PrimitiveLiteral = { + kind: 'PrimitiveLiteral'; + value: Primitive; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type PrimitiveValue = { + kind: 'PrimitiveValue'; + typeName: PrimitiveLiteral; + isArray?: TrueLiteral; + constant?: PrimitiveValueConstant; + default?: PrimitiveValueDefault; + rules: ValidationRule[]; +}; + +export type Property = { + kind: 'Property'; + name: StringLiteral; + description?: StringLiteral[]; + value: MemberValue; + deprecated?: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type Protocols = { + kind: 'InterfaceProtocols'; + http?: HttpRoute[]; +}; + +export type RequiredRule = { + kind: 'ValidationRule'; + id: 'Required'; +}; + +export type ReturnValue = { + kind: 'ReturnValue'; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; + value: MemberValue; +}; + +export type SecurityOption = { + kind: 'SecurityOption'; + schemes: SecurityScheme[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +/** + * Intermediate Representation (IR) of a service. The Basketry Intermediate + * Representation (IR) defines a structured, machine-oriented format that abstracts + * over various Interface Definition Languages (IDLs) and Service Description + * Languages (SDLs). This standardized, language-agnostic schema allows tooling to + * consistently interpret the core attributes and behaviors of a service, + * independent of its underlying definition format. + * + * Basketry IR is optimized for automated workflows, enabling code generation, + * documentation, validation, and custom analysis through reusable components + * without requiring developers to manually interact with the raw representation. + * While a typical Basketry pipeline translates human-friendly specifications (such + * as OpenAPI) into this intermediate format, the IR serves as a foundational layer + * for building new generators, rules, and other automation tools. + */ +export type Service = { + kind: 'Service'; + + /** + * This string MUST be the version number of the Basketry Specification that the + * Intermediate Representation uses. The `basketry` field SHOULD be used by tooling + * to interpret the IR document. This is not related to the Service `majorVersion` + * string. + */ + basketry: '0.2'; + + /** The title of the service */ + title: StringLiteral; + + /** The major version of the Service (which is distinct from the Basketry Specification version). */ + majorVersion: IntegerLiteral; + + /** + * The path to the original source document for this service. All locations in the + * Intermediate Representation refer to ranges within this source document. + */ + sourcePaths: string[]; + + /** An array of Interfaces defined in this Service. */ + interfaces: Interface[]; + + /** An array of Types defined in this Service. */ + types: Type[]; + + /** An array of Enums defined in this Service. */ + enums: Enum[]; + + /** An array of Unions defined in this Service. */ + unions: Union[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +/** TODO: don't allow arrays in primitive unions */ +export type SimpleUnion = { + kind: 'SimpleUnion'; + name: StringLiteral; + description?: StringLiteral[]; + members: MemberValue[]; + deprecated?: TrueLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type StringEnumRule = { + kind: 'ValidationRule'; + id: 'StringEnum'; + values: StringLiteral[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type StringFormatRule = { + kind: 'ValidationRule'; + id: 'StringFormat'; + format: NonEmptyStringLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +/** A string literal */ +export type StringLiteral = { + kind: 'StringLiteral'; + value: string; + + /** The location of this in the doc. */ + loc?: string; +}; + +export type StringMaxLengthRule = { + kind: 'ValidationRule'; + id: 'StringMaxLength'; + length: NonNegativeIntegerLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type StringMinLengthRule = { + kind: 'ValidationRule'; + id: 'StringMinLength'; + length: NonNegativeIntegerLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type StringPatternRule = { + kind: 'ValidationRule'; + id: 'StringPattern'; + pattern: NonEmptyStringLiteral; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +/** A boolean literal whose value is always true */ +export type TrueLiteral = { + kind: 'TrueLiteral'; + value: true; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + +export type Type = { + kind: 'Type'; + name: StringLiteral; + description?: StringLiteral[]; + deprecated?: TrueLiteral; + properties: Property[]; + mapProperties?: MapProperties; + rules: ObjectValidationRule[]; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; + meta?: MetaValue[]; +}; + +export type UntypedLiteral = { + kind: 'UntypedLiteral'; + value: any; + loc?: string; +}; + +export type ConstantRuleValue = StringLiteral | NumberLiteral | BooleanLiteral; + +export type MemberValue = PrimitiveValue | ComplexValue; + +export function isPrimitiveValue(obj: MemberValue): obj is PrimitiveValue { + return obj.kind === 'PrimitiveValue'; +} + +export function isComplexValue(obj: MemberValue): obj is ComplexValue { + return obj.kind === 'ComplexValue'; +} + +export type OAuth2Flow = + | OAuth2ImplicitFlow + | OAuth2PasswordFlow + | OAuth2ClientCredentialsFlow + | OAuth2AuthorizationCodeFlow; + +export function isOAuth2ImplicitFlow( + obj: OAuth2Flow, +): obj is OAuth2ImplicitFlow { + return obj.kind === 'OAuth2ImplicitFlow'; +} + +export function isOAuth2PasswordFlow( + obj: OAuth2Flow, +): obj is OAuth2PasswordFlow { + return obj.kind === 'OAuth2PasswordFlow'; +} + +export function isOAuth2ClientCredentialsFlow( + obj: OAuth2Flow, +): obj is OAuth2ClientCredentialsFlow { + return obj.kind === 'OAuth2ClientCredentialsFlow'; +} + +export function isOAuth2AuthorizationCodeFlow( + obj: OAuth2Flow, +): obj is OAuth2AuthorizationCodeFlow { + return obj.kind === 'OAuth2AuthorizationCodeFlow'; +} + +export type ObjectValidationRule = + | ObjectMinPropertiesRule + | ObjectMaxPropertiesRule + | ObjectAdditionalPropertiesRule; + +export function isObjectMinPropertiesRule( + obj: ObjectValidationRule, +): obj is ObjectMinPropertiesRule { + return obj.id === 'ObjectMinProperties'; +} + +export function isObjectMaxPropertiesRule( + obj: ObjectValidationRule, +): obj is ObjectMaxPropertiesRule { + return obj.id === 'ObjectMaxProperties'; +} + +export function isObjectAdditionalPropertiesRule( + obj: ObjectValidationRule, +): obj is ObjectAdditionalPropertiesRule { + return obj.id === 'ObjectAdditionalProperties'; +} + +export type PrimitiveValueConstant = + | StringLiteral + | NumberLiteral + | BooleanLiteral + | NullLiteral; + +export type PrimitiveValueDefault = + | StringLiteral + | NumberLiteral + | BooleanLiteral + | NullLiteral; + +export type SecurityScheme = BasicScheme | ApiKeyScheme | OAuth2Scheme; + +export function isBasicScheme(obj: SecurityScheme): obj is BasicScheme { + return obj.kind === 'BasicScheme'; +} + +export function isApiKeyScheme(obj: SecurityScheme): obj is ApiKeyScheme { + return obj.kind === 'ApiKeyScheme'; +} + +export function isOAuth2Scheme(obj: SecurityScheme): obj is OAuth2Scheme { + return obj.kind === 'OAuth2Scheme'; +} + +/** + * A Union is a type that can be one of several different types. The `members` array + * contains the possible types that the Union can be. + */ +export type Union = SimpleUnion | DiscriminatedUnion; + +export function isSimpleUnion(obj: Union): obj is SimpleUnion { + return obj.kind === 'SimpleUnion'; +} + +export function isDiscriminatedUnion(obj: Union): obj is DiscriminatedUnion { + return obj.kind === 'DiscriminatedUnion'; +} + +/** A validation rule. */ +export type ValidationRule = + | RequiredRule + | ConstantRule + | StringMaxLengthRule + | StringMinLengthRule + | StringPatternRule + | StringFormatRule + | StringEnumRule + | NumberMultipleOfRule + | NumberGtRule + | NumberGteRule + | NumberLtRule + | NumberLteRule + | ArrayMaxItemsRule + | ArrayMinItemsRule + | ArrayUniqueItemsRule; + +export function isRequiredRule(obj: ValidationRule): obj is RequiredRule { + return obj.id === 'Required'; +} + +export function isConstantRule(obj: ValidationRule): obj is ConstantRule { + return obj.id === 'Constant'; +} + +export function isStringMaxLengthRule( + obj: ValidationRule, +): obj is StringMaxLengthRule { + return obj.id === 'StringMaxLength'; +} + +export function isStringMinLengthRule( + obj: ValidationRule, +): obj is StringMinLengthRule { + return obj.id === 'StringMinLength'; +} + +export function isStringPatternRule( + obj: ValidationRule, +): obj is StringPatternRule { + return obj.id === 'StringPattern'; +} + +export function isStringFormatRule( + obj: ValidationRule, +): obj is StringFormatRule { + return obj.id === 'StringFormat'; +} + +export function isStringEnumRule(obj: ValidationRule): obj is StringEnumRule { + return obj.id === 'StringEnum'; +} + +export function isNumberMultipleOfRule( + obj: ValidationRule, +): obj is NumberMultipleOfRule { + return obj.id === 'NumberMultipleOf'; +} + +export function isNumberGtRule(obj: ValidationRule): obj is NumberGtRule { + return obj.id === 'NumberGT'; +} + +export function isNumberGteRule(obj: ValidationRule): obj is NumberGteRule { + return obj.id === 'NumberGTE'; +} + +export function isNumberLtRule(obj: ValidationRule): obj is NumberLtRule { + return obj.id === 'NumberLT'; +} + +export function isNumberLteRule(obj: ValidationRule): obj is NumberLteRule { + return obj.id === 'NumberLTE'; +} + +export function isArrayMaxItemsRule( + obj: ValidationRule, +): obj is ArrayMaxItemsRule { + return obj.id === 'ArrayMaxItems'; +} + +export function isArrayMinItemsRule( + obj: ValidationRule, +): obj is ArrayMinItemsRule { + return obj.id === 'ArrayMinItems'; +} + +export function isArrayUniqueItemsRule( + obj: ValidationRule, +): obj is ArrayUniqueItemsRule { + return obj.id === 'ArrayUniqueItems'; +} diff --git a/src/generator.ts b/src/generator.ts deleted file mode 100644 index d298f7a..0000000 --- a/src/generator.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Generator } from 'basketry'; -import { kebab } from 'case'; - -const generator: Generator = (service) => [ - { - path: [ - `${kebab(service.title.value)}-v${service.majorVersion.value}-ir.json`, - ], - contents: JSON.stringify(service, null, 2), - }, -]; - -export default generator; diff --git a/src/index.ts b/src/index.ts index 019f873..a6f32e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,2 @@ -export * as generator from './generator'; -export * as parser from './parser'; +export * from './generated/types'; +export { validate } from './validator'; diff --git a/src/parser.ts b/src/parser.ts deleted file mode 100644 index 24f8c8f..0000000 --- a/src/parser.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Parser } from 'basketry'; - -const parser: Parser = (sourceContent) => ({ - service: JSON.parse(sourceContent), - violations: [], -}); - -export default parser; diff --git a/src/schema.json b/src/schema.json new file mode 100644 index 0000000..431ecee --- /dev/null +++ b/src/schema.json @@ -0,0 +1,1247 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "title": "Service", + "description": "Intermediate Representation (IR) of a service. The Basketry Intermediate Representation (IR) defines a structured, machine-oriented format that abstracts over various Interface Definition Languages (IDLs) and Service Description Languages (SDLs). This standardized, language-agnostic schema allows tooling to consistently interpret the core attributes and behaviors of a service, independent of its underlying definition format.\n\nBasketry IR is optimized for automated workflows, enabling code generation, documentation, validation, and custom analysis through reusable components without requiring developers to manually interact with the raw representation. While a typical Basketry pipeline translates human-friendly specifications (such as OpenAPI) into this intermediate format, the IR serves as a foundational layer for building new generators, rules, and other automation tools.", + "required": [ + "kind", + "basketry", + "title", + "majorVersion", + "sourcePaths", + "interfaces", + "types", + "enums", + "unions" + ], + "properties": { + "$schema": { "type": "string" }, + "kind": { "type": "string", "const": "Service" }, + "basketry": { + "description": "This string MUST be the version number of the Basketry Specification that the Intermediate Representation uses. The `basketry` field SHOULD be used by tooling to interpret the IR document. This is not related to the Service `majorVersion` string.", + "type": "string", + "const": "0.2" + }, + "title": { + "description": "The title of the service", + "$ref": "#/definitions/string" + }, + + "majorVersion": { + "description": "The major version of the Service (which is distinct from the Basketry Specification version).", + "$ref": "#/definitions/integer" + }, + "sourcePaths": { + "type": "array", + "description": "The path to the original source document for this service. All locations in the Intermediate Representation refer to ranges within this source document.", + "items": { "type": "string" } + }, + "interfaces": { + "description": "An array of Interfaces defined in this Service.", + "type": "array", + "items": { + "$ref": "#/definitions/interface" + } + }, + "types": { + "description": "An array of Types defined in this Service.", + "type": "array", + "items": { "$ref": "#/definitions/type" } + }, + "enums": { + "description": "An array of Enums defined in this Service.", + "type": "array", + "items": { "$ref": "#/definitions/enum" } + }, + "unions": { + "description": "An array of Unions defined in this Service.", + "type": "array", + "items": { "$ref": "#/definitions/union" } + }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false, + "definitions": { + "meta": { + "type": "array", + "items": { + "$ref": "#/definitions/metaValue" + } + }, + "metaValue": { + "type": "object", + "required": ["kind", "key", "value"], + "properties": { + "kind": { "type": "string", "const": "MetaValue" }, + "key": { "$ref": "#/definitions/string" }, + "value": { + "type": "object", + "required": ["kind", "value"], + "title": "UntypedLiteral", + "properties": { + "kind": { "type": "string", "const": "UntypedLiteral" }, + "value": {}, + "loc": { "type": "string" } + } + } + } + }, + + "interface": { + "type": "object", + "required": ["kind", "name", "methods"], + "properties": { + "kind": { "type": "string", "const": "Interface" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "methods": { + "type": "array", + "items": { "$ref": "#/definitions/method" } + }, + "protocols": { "$ref": "#/definitions/protocols" }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "method": { + "type": "object", + "required": ["kind", "name", "security", "parameters"], + "properties": { + "kind": { "type": "string", "const": "Method" }, + "name": { "$ref": "#/definitions/string" }, + "security": { + "type": "array", + "items": { "$ref": "#/definitions/securityOption" } + }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "parameters": { + "type": "array", + "items": { "$ref": "#/definitions/parameter" } + }, + "returns": { "$ref": "#/definitions/returnValue" }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "parameter": { + "type": "object", + "required": ["kind", "name", "value"], + "properties": { + "kind": { "type": "string", "const": "Parameter" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "value": { "$ref": "#/definitions/memberValue" }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "returnValue": { + "type": "object", + "allOf": [ + { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "ReturnValue" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" }, + "value": { "$ref": "#/definitions/memberValue" } + } + } + ] + }, + + "type": { + "type": "object", + "required": ["kind", "name", "properties", "rules"], + "properties": { + "kind": { "type": "string", "const": "Type" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "deprecated": { "$ref": "#/definitions/true" }, + "properties": { + "type": "array", + "items": { "$ref": "#/definitions/property" } + }, + "mapProperties": { "$ref": "#/definitions/mapProperties" }, + "rules": { + "type": "array", + "items": { "$ref": "#/definitions/objectValidationRule" } + }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "property": { + "type": "object", + "required": ["kind", "name", "value"], + "properties": { + "kind": { "type": "string", "const": "Property" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "value": { "$ref": "#/definitions/memberValue" }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "mapProperties": { + "type": "object", + "required": ["kind", "key", "requiredKeys", "value"], + "properties": { + "kind": { "type": "string", "const": "MapProperties" }, + "key": { "$ref": "#/definitions/mapKey" }, + "requiredKeys": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "value": { "$ref": "#/definitions/mapValue" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "mapKey": { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "MapKey" }, + "value": { "$ref": "#/definitions/memberValue" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "mapValue": { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "MapValue" }, + "value": { "$ref": "#/definitions/memberValue" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + + "enum": { + "type": "object", + "required": ["kind", "name", "members"], + "properties": { + "kind": { "type": "string", "const": "Enum" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "members": { + "type": "array", + "items": { "$ref": "#/definitions/enumMember" }, + "minItems": 1 + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "enumMember": { + "type": "object", + "required": ["kind", "content"], + "properties": { + "kind": { "type": "string", "const": "EnumMember" }, + "content": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + + "union": { + "discriminator": { + "propertyName": "kind" + }, + "description": "A Union is a type that can be one of several different types. The `members` array contains the possible types that the Union can be.", + "oneOf": [ + { "$ref": "#/definitions/simpleUnion" }, + { "$ref": "#/definitions/discriminatedUnion" } + ] + }, + "simpleUnion": { + "type": "object", + "required": ["kind", "name", "members"], + "description": "TODO: don't allow arrays in primitive unions", + "properties": { + "kind": { "type": "string", "const": "SimpleUnion" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "members": { + "type": "array", + "items": { "$ref": "#/definitions/memberValue" }, + "minItems": 1 + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "discriminatedUnion": { + "type": "object", + "required": ["kind", "name", "discriminator", "members"], + "description": "TODO: don't allow arrays, enums, or other unions in discriminated unions", + "properties": { + "kind": { "type": "string", "const": "DiscriminatedUnion" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "discriminator": { "$ref": "#/definitions/string" }, + "members": { + "type": "array", + "items": { "$ref": "#/definitions/complexValue" }, + "minItems": 1 + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + + "primitive": { + "description": "The name of a primitive type.", + "type": "string", + "enum": [ + "string", + "number", + "integer", + "long", + "float", + "double", + "boolean", + "date", + "date-time", + "null", + "binary", + "untyped" + ] + }, + "primitiveLiteral": { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "PrimitiveLiteral" }, + "value": { "$ref": "#/definitions/primitive" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "primitiveValue": { + "type": "object", + "required": ["kind", "typeName", "rules"], + "properties": { + "kind": { "type": "string", "const": "PrimitiveValue" }, + "typeName": { "$ref": "#/definitions/primitiveLiteral" }, + "isArray": { "$ref": "#/definitions/true" }, + "constant": { + "oneOf": [ + { "$ref": "#/definitions/string" }, + { "$ref": "#/definitions/number" }, + { "$ref": "#/definitions/boolean" }, + { "$ref": "#/definitions/null" } + ] + }, + "default": { + "oneOf": [ + { "$ref": "#/definitions/string" }, + { "$ref": "#/definitions/number" }, + { "$ref": "#/definitions/boolean" }, + { "$ref": "#/definitions/null" } + ] + }, + "rules": { + "type": "array", + "items": { "$ref": "#/definitions/validationRule" } + } + } + }, + "complexValue": { + "type": "object", + "required": ["kind", "typeName", "rules"], + "properties": { + "kind": { "type": "string", "const": "ComplexValue" }, + "typeName": { + "description": "The name of a type, enum, or union defined in this Service.", + "$ref": "#/definitions/string" + }, + "isArray": { "$ref": "#/definitions/true" }, + "rules": { + "type": "array", + "items": { "$ref": "#/definitions/validationRule" } + } + } + }, + "memberValue": { + "discriminator": { + "propertyName": "kind" + }, + "oneOf": [ + { "$ref": "#/definitions/primitiveValue" }, + { "$ref": "#/definitions/complexValue" } + ] + }, + + "protocols": { + "type": "object", + "required": ["kind"], + "properties": { + "kind": { "type": "string", "const": "InterfaceProtocols" }, + "http": { + "type": "array", + "items": { "$ref": "#/definitions/httpRoute" } + } + }, + "additionalProperties": false + }, + "httpVerb": { + "type": "string", + "enum": [ + "get", + "post", + "put", + "patch", + "delete", + "head", + "options", + "trace" + ] + }, + "httpStatusCodeLiteral": { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "HttpStatusCodeLiteral" }, + "value": { "type": "integer", "minimum": 100, "maximum": 599 }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "httpVerbLiteral": { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "HttpVerbLiteral" }, + "value": { "$ref": "#/definitions/httpVerb" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "httpLocation": { + "type": "string", + "enum": ["header", "query", "path", "formData", "body"] + }, + "httpLocationLiteral": { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "HttpLocationLiteral" }, + "value": { "$ref": "#/definitions/httpLocation" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "httpArrayFormat": { + "type": "string", + "description": "The format of an array in an HTTP request or response.", + "enum": ["csv", "ssv", "tsv", "pipes", "multi"] + }, + "httpArrayFormatLiteral": { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "HttpArrayFormatLiteral" }, + "value": { "$ref": "#/definitions/httpArrayFormat" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "httpRoute": { + "type": "object", + "required": ["kind", "pattern", "methods"], + "properties": { + "kind": { "type": "string", "const": "HttpRoute" }, + "pattern": { "$ref": "#/definitions/string" }, + "methods": { + "type": "array", + "items": { "$ref": "#/definitions/httpMethod" } + }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "httpMethod": { + "type": "object", + "required": [ + "kind", + "name", + "verb", + "parameters", + "successCode", + "requestMediaTypes", + "responseMediaTypes" + ], + "properties": { + "kind": { "type": "string", "const": "HttpMethod" }, + "name": { "$ref": "#/definitions/string" }, + "verb": { "$ref": "#/definitions/httpVerbLiteral" }, + "parameters": { + "type": "array", + "items": { "$ref": "#/definitions/httpParameter" } + }, + "successCode": { "$ref": "#/definitions/httpStatusCodeLiteral" }, + "requestMediaTypes": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "responseMediaTypes": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "httpParameter": { + "type": "object", + "required": ["kind", "name", "location"], + "properties": { + "kind": { "type": "string", "const": "HttpParameter" }, + "name": { "$ref": "#/definitions/string" }, + "location": { "$ref": "#/definitions/httpLocationLiteral" }, + "arrayFormat": { "$ref": "#/definitions/httpArrayFormatLiteral" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + + "securityOption": { + "type": "object", + "required": ["kind", "schemes"], + "properties": { + "kind": { "type": "string", "const": "SecurityOption" }, + "schemes": { + "type": "array", + "items": { "$ref": "#/definitions/securityScheme" } + }, + "loc": { "$ref": "#/definitions/range" } + } + }, + "securityScheme": { + "discriminator": { + "propertyName": "kind" + }, + "oneOf": [ + { "$ref": "#/definitions/basicScheme" }, + { "$ref": "#/definitions/apiKeyScheme" }, + { "$ref": "#/definitions/oAuth2Scheme" } + ] + }, + "basicScheme": { + "type": "object", + "required": ["kind", "type", "name"], + "properties": { + "kind": { "type": "string", "const": "BasicScheme" }, + "type": { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "string", + "const": "basic" + }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "name": { "$ref": "#/definitions/string" }, + "description": { "$ref": "#/definitions/string" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "apiKeyScheme": { + "type": "object", + "required": ["kind", "type", "name", "parameter", "in"], + "properties": { + "kind": { "type": "string", "const": "ApiKeyScheme" }, + "type": { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "string", + "const": "apiKey" + }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "parameter": { "$ref": "#/definitions/string" }, + "in": { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "string", + "enum": ["header", "query", "cookie"] + }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "oAuth2Scheme": { + "type": "object", + "required": ["kind", "type", "name", "flows"], + "properties": { + "kind": { "type": "string", "const": "OAuth2Scheme" }, + "type": { + "type": "object", + "required": ["value"], + "properties": { + "value": { "type": "string", "const": "oauth2" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "flows": { + "type": "array", + "items": { "$ref": "#/definitions/oAuth2Flow" } + }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "oAuth2Flow": { + "discriminator": { + "propertyName": "kind" + }, + "oneOf": [ + { "$ref": "#/definitions/oAuth2ImplicitFlow" }, + { "$ref": "#/definitions/oAuth2PasswordFlow" }, + { "$ref": "#/definitions/oAuth2ClientCredentialsFlow" }, + { "$ref": "#/definitions/oAuth2AuthorizationCodeFlow" } + ] + }, + "oAuth2ImplicitFlow": { + "type": "object", + "required": ["kind", "type", "authorizationUrl", "scopes"], + "properties": { + "kind": { "type": "string", "const": "OAuth2ImplicitFlow" }, + "type": { + "type": "object", + "required": ["value"], + "properties": { + "value": { "type": "string", "const": "implicit" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "authorizationUrl": { "$ref": "#/definitions/string" }, + "refreshUrl": { "$ref": "#/definitions/string" }, + "scopes": { + "type": "array", + "items": { "$ref": "#/definitions/oAuth2Scope" } + }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "oAuth2PasswordFlow": { + "type": "object", + "required": ["kind", "type", "tokenUrl", "scopes"], + "properties": { + "kind": { "type": "string", "const": "OAuth2PasswordFlow" }, + "type": { + "type": "object", + "required": ["value"], + "properties": { + "value": { "type": "string", "const": "password" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "tokenUrl": { "$ref": "#/definitions/string" }, + "refreshUrl": { "$ref": "#/definitions/string" }, + "scopes": { + "type": "array", + "items": { "$ref": "#/definitions/oAuth2Scope" } + }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "oAuth2ClientCredentialsFlow": { + "type": "object", + "required": ["kind", "type", "tokenUrl", "scopes"], + "properties": { + "kind": { "type": "string", "const": "OAuth2ClientCredentialsFlow" }, + "type": { + "type": "object", + "required": ["value"], + "properties": { + "value": { "type": "string", "const": "clientCredentials" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "tokenUrl": { "$ref": "#/definitions/string" }, + "refreshUrl": { "$ref": "#/definitions/string" }, + "scopes": { + "type": "array", + "items": { "$ref": "#/definitions/oAuth2Scope" } + }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "oAuth2AuthorizationCodeFlow": { + "type": "object", + "required": ["kind", "type", "authorizationUrl", "tokenUrl", "scopes"], + "properties": { + "kind": { "type": "string", "const": "OAuth2AuthorizationCodeFlow" }, + "type": { + "type": "object", + "required": ["value"], + "properties": { + "value": { "type": "string", "const": "authorizationCode" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "authorizationUrl": { "$ref": "#/definitions/string" }, + "tokenUrl": { "$ref": "#/definitions/string" }, + "refreshUrl": { "$ref": "#/definitions/string" }, + "scopes": { + "type": "array", + "items": { "$ref": "#/definitions/oAuth2Scope" } + }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + "oAuth2Scope": { + "type": "object", + "required": ["kind", "name", "description"], + "properties": { + "kind": { "type": "string", "const": "OAuth2Scope" }, + "name": { "$ref": "#/definitions/string" }, + "description": { + "type": "array", + "items": { "$ref": "#/definitions/string" } + }, + "deprecated": { "$ref": "#/definitions/deprecated" }, + "loc": { "$ref": "#/definitions/range" }, + "meta": { "$ref": "#/definitions/meta" } + }, + "additionalProperties": false + }, + + "string": { + "type": "object", + "required": ["kind", "value"], + "title": "StringLiteral", + "description": "A string literal", + "properties": { + "kind": { "type": "string", "const": "StringLiteral" }, + "value": { "type": "string" }, + "loc": { + "description": "The location of this in the doc.", + "$ref": "#/definitions/range" + } + }, + "additionalProperties": false + }, + "integer": { + "type": "object", + "required": ["kind", "value"], + "title": "IntegerLiteral", + "description": "An integer literal", + "properties": { + "kind": { "type": "string", "const": "IntegerLiteral" }, + "value": { "type": "integer" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "number": { + "type": "object", + "required": ["kind", "value"], + "title": "NumberLiteral", + "description": "A number literal", + "properties": { + "kind": { "type": "string", "const": "NumberLiteral" }, + "value": { "type": "integer" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "boolean": { + "type": "object", + "required": ["kind", "value"], + "title": "BooleanLiteral", + "description": "A boolean literal", + "properties": { + "kind": { "type": "string", "const": "BooleanLiteral" }, + "value": { "type": "boolean" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "null": { + "type": "object", + "required": ["kind", "value"], + "title": "NullLiteral", + "description": "A null literal", + "properties": { + "kind": { "type": "string", "const": "NullLiteral" }, + "value": { "type": "null" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "true": { + "type": "object", + "required": ["kind", "value"], + "title": "TrueLiteral", + "description": "A boolean literal whose value is always true", + "properties": { + "kind": { "type": "string", "const": "TrueLiteral" }, + "value": { "type": "boolean", "const": true }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "nonEmptyString": { + "type": "object", + "required": ["kind", "value"], + "title": "NonEmptyStringLiteral", + "description": "A string literal", + "properties": { + "kind": { "type": "string", "const": "NonEmptyStringLiteral" }, + "value": { "type": "string" }, + "loc": { + "description": "The location of this in the doc.", + "$ref": "#/definitions/range" + } + }, + "additionalProperties": false + }, + "nonNegativeInteger": { + "type": "object", + "required": ["kind", "value"], + "title": "NonNegativeIntegerLiteral", + "properties": { + "kind": { "type": "string", "const": "NonNegativeIntegerLiteral" }, + "value": { "type": "integer", "minimum": 0, "multipleOf": 1 }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "nonNegativeNumber": { + "type": "object", + "required": ["kind", "value"], + "title": "NonNegativeNumberLiteral", + "properties": { + "kind": { "type": "string", "const": "NonNegativeNumberLiteral" }, + "value": { "type": "number", "minimum": 0 }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + + "deprecated": { + "description": "A boolean value indicating that this item is deprecated.", + "$ref": "#/definitions/true" + }, + "range": { + "description": "A range in the source document encoded as a string. This string is a semicolon-separated list of numbers and MUST be in one of the following formats:\n- Single point: `;;` (eg. `\"4;12;88\"`)\n- Single row: `;;;;` (eg. `\"4;12;21;88;97\"`)\n- Multi row: `;;;;;` (eg. `\"4;12;6;3;88;164\"`)\n\nBoth the `row` and `column` values are 1-based. The `offset` values are 0-based.", + "type": "string", + "pattern": "^(\\d+:)((\\d+;){2}(\\d+)|(\\d+;){4}(\\d+)|(\\d+;){5}(\\d+))$" + }, + + "validationRule": { + "discriminator": { + "propertyName": "id" + }, + "description": "A validation rule.", + "oneOf": [ + { "$ref": "#/definitions/requiredRule" }, + { "$ref": "#/definitions/constantRule" }, + { "$ref": "#/definitions/stringMaxLengthRule" }, + { "$ref": "#/definitions/stringMinLengthRule" }, + { "$ref": "#/definitions/stringPatternRule" }, + { "$ref": "#/definitions/stringFormatRule" }, + { "$ref": "#/definitions/stringEnumRule" }, + { "$ref": "#/definitions/numberMultipleOfRule" }, + { "$ref": "#/definitions/numberGtRule" }, + { "$ref": "#/definitions/numberGteRule" }, + { "$ref": "#/definitions/numberLtRule" }, + { "$ref": "#/definitions/numberLteRule" }, + { "$ref": "#/definitions/arrayMaxItemsRule" }, + { "$ref": "#/definitions/arrayMinItemsRule" }, + { "$ref": "#/definitions/arrayUniqueItemsRule" } + ] + }, + "requiredRule": { + "title": "RequiredRule", + "type": "object", + "required": ["kind", "id"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "Required" + } + }, + "additionalProperties": false + }, + "constantRule": { + "title": "ConstantRule", + "type": "object", + "required": ["kind", "id", "value"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "Constant" + }, + "value": { + "oneOf": [ + { "$ref": "#/definitions/string" }, + { "$ref": "#/definitions/number" }, + { "$ref": "#/definitions/boolean" } + ] + } + }, + "additionalProperties": false + }, + "stringMaxLengthRule": { + "title": "StringMaxLengthRule", + "type": "object", + "required": ["kind", "id", "length"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "StringMaxLength" + }, + "length": { "$ref": "#/definitions/nonNegativeInteger" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "stringMinLengthRule": { + "title": "StringMinLengthRule", + "type": "object", + "required": ["kind", "id", "length"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "StringMinLength" + }, + "length": { "$ref": "#/definitions/nonNegativeInteger" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "stringPatternRule": { + "title": "StringPatternRule", + "type": "object", + "required": ["kind", "id", "pattern"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "StringPattern" + }, + "pattern": { "$ref": "#/definitions/nonEmptyString" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "stringFormatRule": { + "title": "StringFormatRule", + "type": "object", + "required": ["kind", "id", "format"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "StringFormat" + }, + "format": { "$ref": "#/definitions/nonEmptyString" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "stringEnumRule": { + "title": "StringEnumRule", + "type": "object", + "required": ["kind", "id", "values"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "StringEnum" + }, + "values": { + "type": "array", + "items": { "$ref": "#/definitions/string" }, + "minItems": 1 + }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "numberMultipleOfRule": { + "title": "NumberMultipleOfRule", + "type": "object", + "required": ["kind", "id", "value"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "NumberMultipleOf" + }, + "value": { "$ref": "#/definitions/nonNegativeNumber" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "numberGtRule": { + "title": "NumberGtRule", + "type": "object", + "required": ["kind", "id", "value"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "NumberGT" + }, + "value": { "$ref": "#/definitions/number" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "numberGteRule": { + "title": "NumberGteRule", + "type": "object", + "required": ["kind", "id", "value"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "NumberGTE" + }, + "value": { "$ref": "#/definitions/number" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "numberLtRule": { + "title": "NumberLtRule", + "type": "object", + "required": ["kind", "id", "value"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "NumberLT" + }, + "value": { "$ref": "#/definitions/number" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "numberLteRule": { + "title": "NumberLteRule", + "type": "object", + "required": ["kind", "id", "value"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "NumberLTE" + }, + "value": { "$ref": "#/definitions/number" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "arrayMaxItemsRule": { + "title": "ArrayMaxItemsRule", + "type": "object", + "required": ["kind", "id", "max"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "ArrayMaxItems" + }, + "max": { "$ref": "#/definitions/nonNegativeInteger" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "arrayMinItemsRule": { + "title": "ArrayMinItemsRule", + "type": "object", + "required": ["kind", "id", "min"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "ArrayMinItems" + }, + "min": { "$ref": "#/definitions/nonNegativeInteger" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "arrayUniqueItemsRule": { + "title": "ArrayUniqueItemsRule", + "type": "object", + "required": ["kind", "id", "required"], + "properties": { + "kind": { "type": "string", "const": "ValidationRule" }, + "id": { + "type": "string", + "const": "ArrayUniqueItems" + }, + "required": { + "type": "boolean" + }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + + "objectValidationRule": { + "discriminator": { + "propertyName": "id" + }, + "oneOf": [ + { "$ref": "#/definitions/objectMinPropertiesRule" }, + { "$ref": "#/definitions/objectMaxPropertiesRule" }, + { "$ref": "#/definitions/objectAdditionalPropertiesRule" } + ] + }, + "objectMinPropertiesRule": { + "title": "ObjectMinPropertiesRule", + "type": "object", + "required": ["kind", "id", "min"], + "properties": { + "kind": { "type": "string", "const": "ObjectValidationRule" }, + "id": { + "type": "string", + "const": "ObjectMinProperties" + }, + "min": { "$ref": "#/definitions/nonNegativeInteger" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "objectMaxPropertiesRule": { + "title": "ObjectMaxPropertiesRule", + "type": "object", + "required": ["kind", "id", "max"], + "properties": { + "kind": { "type": "string", "const": "ObjectValidationRule" }, + "id": { + "type": "string", + "const": "ObjectMaxProperties" + }, + "max": { "$ref": "#/definitions/nonNegativeInteger" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "objectAdditionalPropertiesRule": { + "title": "ObjectAdditionalPropertiesRule", + "type": "object", + "required": ["kind", "id", "forbidden"], + "properties": { + "kind": { "type": "string", "const": "ObjectValidationRule" }, + "id": { + "type": "string", + "const": "ObjectAdditionalProperties" + }, + "forbidden": { "$ref": "#/definitions/true" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + } + } +} diff --git a/src/validator.ts b/src/validator.ts new file mode 100644 index 0000000..1cbab4d --- /dev/null +++ b/src/validator.ts @@ -0,0 +1,35 @@ +import Ajv from 'ajv'; +import * as schema from './schema.json'; +import { Service } from './generated/types'; + +const ajv = new Ajv({ allErrors: true, strict: false }); +const runner = ajv.compile(schema); + +export type ParserError = { + code: 'PARSER_ERROR'; + message: string; + filepath?: string; +}; + +export function validate(service: any): { + service: Service | undefined; + errors: ParserError[]; +} { + const errors: ParserError[] = []; + + const isValid = runner(service); + + if (!isValid) { + for (const error of runner.errors ?? []) { + const message = `Invalid IR: \`#${error.instancePath}\` ${error.message}`; + + errors.push({ + code: 'PARSER_ERROR', + message, + }); + } + return { service: undefined, errors }; + } + + return { service: service as Service, errors }; +} diff --git a/tsconfig.json b/tsconfig.json index d8f8bc7..3104e3b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,8 @@ "sourceMap": true, "target": "es6", "declaration": true, - "strictNullChecks": true + "strictNullChecks": true, + "resolveJsonModule": true }, "include": ["src"], "exclude": ["**/*.test?.*"] From 10ef5b4846db96f70b27394aaa6cbff4dd0fa2fe Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Thu, 12 Jun 2025 06:44:20 -0700 Subject: [PATCH 02/24] chore: update funding --- .github/FUNDING.yml | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index b4bbad9..064422e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -github: [skonves] +github: [basketry] diff --git a/package.json b/package.json index c853f01..bd74408 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "url": "https://github.com/basketry/ir/issues" }, "homepage": "https://github.com/basketry/ir#readme", + "funding": "https://github.com/sponsors/basketry", "devDependencies": { "@basketry/json-schema": "^0.2.0-alpha.4", "@basketry/typescript": "^0.2.0-alpha.2", From 4b9347def14bdcb8311ce44e692e1a945bdf7064 Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Thu, 12 Jun 2025 06:49:01 -0700 Subject: [PATCH 03/24] docs: update README --- README.md | 44 ++++++++++---------------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 6e3d50a..c6f51c1 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,9 @@ [![main](https://github.com/basketry/ir/workflows/build/badge.svg?branch=main&event=push)](https://github.com/basketry/ir/actions?query=workflow%3Abuild+branch%3Amain+event%3Apush) -[![master](https://img.shields.io/npm/v/@basketry/ir)](https://www.npmjs.com/package/@basketry/ir) +[![main](https://img.shields.io/npm/v/@basketry/ir)](https://www.npmjs.com/package/@basketry/ir) -# Low-level Basketry IR components +# Basketry Intermediate Representation (IR) -This package provides a "raw IR" parser and generator for [Basketry](https://github.com/basketry/basketry)'s Intermediate Representation format. These tools are useful when debugging in-development components or when connecting a Basketry pipeline into another toolchain. - -[A list of full-featured Basketry components can be found on the wiki.](https://github.com/basketry/basketry/wiki#components) - -## Usage - -Read existing IR into a pipeline: - -```json -{ - "parser": "@basketry/ir/lib/parser", - ... -} -``` - -Write IR as a file: - -```json -{ - ... - "generators": ["@basketry/ir/lib/generator"] -} -``` +This package defines [Basketry](https://basketry.io)'s Intermediate Representation format. --- @@ -47,12 +25,10 @@ Note that the `lint` script is run prior to `build`. Auto-fixable linting or for ### Publish a new package version -1. Ensure latest code is published on the `main` branch. -1. Create the new version number with `npm version {major|minor|patch}` -1. Push the branch and the version tag: `git push origin main --follow-tags` - -The [publish workflow](https://github.com/basketry/ir/actions/workflows/publish.yml) will build and pack the new version then push the package to NPM. Note that publishing requires write access to the `main` branch. - ---- - -Generated with [generator-ts-console](https://www.npmjs.com/package/generator-ts-console) +1. Create new version + 1. Navigate to the [version workflow](https://github.com/basketry/ir/actions/workflows/version.yml) from the Actions tab. + 1. Manually dispatch the action with the appropriate inputs + 1. This will create a PR with the new version +1. Publish to NPM + 1. Review and merge the PR + 1. The [publish workflow](https://github.com/basketry/ir/actions/workflows/publish.yml) will create a git tag and publish the package on NPM From 015269768cc980fd91f3adbb3e31ecb2c579b0ac Mon Sep 17 00:00:00 2001 From: skonves Date: Thu, 12 Jun 2025 13:43:12 +0000 Subject: [PATCH 04/24] 0.2.0-alpha.0 Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c3e4304..81f7969 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@basketry/ir", - "version": "0.0.1", + "version": "0.2.0-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@basketry/ir", - "version": "0.0.1", + "version": "0.2.0-alpha.0", "license": "MIT", "dependencies": { "ajv": "^8.17.1" diff --git a/package.json b/package.json index bd74408..f73410a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@basketry/ir", - "version": "0.0.1", + "version": "0.2.0-alpha.0", "description": "Low-level Basketry IR components", "main": "./lib/index.js", "scripts": { From 7150ffa6d5f4bdb0243a21b14abdae8d16eaee2e Mon Sep 17 00:00:00 2001 From: Istvan Fedak Date: Sat, 12 Jul 2025 16:04:11 -0400 Subject: [PATCH 05/24] feat: add isNullable property to PrimitiveValue type and schema --- src/generated/types.ts | 1 + src/schema.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/generated/types.ts b/src/generated/types.ts index 387da62..272fa98 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -1003,6 +1003,7 @@ export type PrimitiveValue = { kind: 'PrimitiveValue'; typeName: PrimitiveLiteral; isArray?: TrueLiteral; + isNullable?: TrueLiteral; constant?: PrimitiveValueConstant; default?: PrimitiveValueDefault; rules: ValidationRule[]; diff --git a/src/schema.json b/src/schema.json index 431ecee..727dee8 100644 --- a/src/schema.json +++ b/src/schema.json @@ -376,6 +376,7 @@ "kind": { "type": "string", "const": "PrimitiveValue" }, "typeName": { "$ref": "#/definitions/primitiveLiteral" }, "isArray": { "$ref": "#/definitions/true" }, + "isNullable": { "$ref": "#/definitions/true" }, "constant": { "oneOf": [ { "$ref": "#/definitions/string" }, From ddec424e539d6481d67f03c8c4a11f9870473491 Mon Sep 17 00:00:00 2001 From: istvanfedak Date: Sat, 12 Jul 2025 20:13:59 +0000 Subject: [PATCH 06/24] 0.2.0-alpha.1 Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 81f7969..22f3407 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@basketry/ir", - "version": "0.2.0-alpha.0", + "version": "0.2.0-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@basketry/ir", - "version": "0.2.0-alpha.0", + "version": "0.2.0-alpha.1", "license": "MIT", "dependencies": { "ajv": "^8.17.1" diff --git a/package.json b/package.json index f73410a..c916659 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@basketry/ir", - "version": "0.2.0-alpha.0", + "version": "0.2.0-alpha.1", "description": "Low-level Basketry IR components", "main": "./lib/index.js", "scripts": { From 07d15463e0bb721b379bc94b1ee869b06ecb707c Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Sun, 13 Jul 2025 09:56:45 -0700 Subject: [PATCH 07/24] feat: model inclusive vs exclusive disjunctions for unions #4 --- src/example.json | 12 ++++++++++-- src/generated/types.ts | 20 ++++++++++++++++++++ src/schema.json | 15 +++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/example.json b/src/example.json index 20ceb33..2832eb2 100644 --- a/src/example.json +++ b/src/example.json @@ -2980,7 +2980,11 @@ "typeName": { "kind": "StringLiteral", "value": "partB" }, "rules": [] } - ] + ], + "disjunction": { + "kind": "DisjunctionKindLiteral", + "value": "inclusive" + } }, { "kind": "SimpleUnion", @@ -2996,7 +3000,11 @@ "typeName": { "kind": "StringLiteral", "value": "partB" }, "rules": [] } - ] + ], + "disjunction": { + "kind": "DisjunctionKindLiteral", + "value": "inclusive" + } }, { "kind": "DiscriminatedUnion", diff --git a/src/generated/types.ts b/src/generated/types.ts index 272fa98..527a362 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -14,6 +14,8 @@ export type ApiKeySchemeInValue = 'header' | 'query' | 'cookie'; +export type DisjunctionKind = 'inclusive' | 'exclusive'; + /** The format of an array in an HTTP request or response. */ export type HttpArrayFormat = 'csv' | 'ssv' | 'tsv' | 'pipes' | 'multi'; @@ -246,6 +248,23 @@ export type DiscriminatedUnion = { meta?: MetaValue[]; }; +export type DisjunctionKindLiteral = { + kind: 'DisjunctionKindLiteral'; + value: DisjunctionKind; + + /** + * A range in the source document encoded as a string. This string is a + * semicolon-separated list of numbers and MUST be in one of the following formats: + * - Single point: `;;` (eg. `"4;12;88"`) + * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) + * - Multi row: `;;;;;` (eg. + * `"4;12;6;3;88;164"`) + * + * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + */ + loc?: string; +}; + export type Enum = { kind: 'Enum'; name: StringLiteral; @@ -1145,6 +1164,7 @@ export type SimpleUnion = { name: StringLiteral; description?: StringLiteral[]; members: MemberValue[]; + disjunction?: DisjunctionKindLiteral; deprecated?: TrueLiteral; /** diff --git a/src/schema.json b/src/schema.json index 727dee8..6fbd34e 100644 --- a/src/schema.json +++ b/src/schema.json @@ -295,6 +295,20 @@ { "$ref": "#/definitions/discriminatedUnion" } ] }, + "disjunctionKindLiteral": { + "type": "object", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "DisjunctionKindLiteral" }, + "value": { "$ref": "#/definitions/disjunctionKind" }, + "loc": { "$ref": "#/definitions/range" } + }, + "additionalProperties": false + }, + "disjunctionKind": { + "type": "string", + "enum": ["inclusive", "exclusive"] + }, "simpleUnion": { "type": "object", "required": ["kind", "name", "members"], @@ -311,6 +325,7 @@ "items": { "$ref": "#/definitions/memberValue" }, "minItems": 1 }, + "disjunction": { "$ref": "#/definitions/disjunctionKindLiteral" }, "deprecated": { "$ref": "#/definitions/deprecated" }, "loc": { "$ref": "#/definitions/range" }, "meta": { "$ref": "#/definitions/meta" } From 3421fb6739ca61091523cc004e71f5ba1d6f3b83 Mon Sep 17 00:00:00 2001 From: skonves Date: Sun, 13 Jul 2025 16:58:28 +0000 Subject: [PATCH 08/24] 0.2.0-alpha.2 Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22f3407..52a0c45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@basketry/ir", - "version": "0.2.0-alpha.1", + "version": "0.2.0-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@basketry/ir", - "version": "0.2.0-alpha.1", + "version": "0.2.0-alpha.2", "license": "MIT", "dependencies": { "ajv": "^8.17.1" diff --git a/package.json b/package.json index c916659..3494c67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@basketry/ir", - "version": "0.2.0-alpha.1", + "version": "0.2.0-alpha.2", "description": "Low-level Basketry IR components", "main": "./lib/index.js", "scripts": { From 333c02a64aaf2338d3d5f6267a2ae89152d5fc02 Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Thu, 17 Jul 2025 20:07:51 -0700 Subject: [PATCH 09/24] feat: define optional explicily instead of as a rule --- src/generated/types.ts | 12 ++---------- src/schema.json | 16 ++-------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/generated/types.ts b/src/generated/types.ts index 527a362..4b2b6cc 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -216,6 +216,7 @@ export type ComplexValue = { /** The name of a type, enum, or union defined in this Service. */ typeName: StringLiteral; isArray?: TrueLiteral; + isOptional?: TrueLiteral; rules: ValidationRule[]; }; @@ -1023,6 +1024,7 @@ export type PrimitiveValue = { typeName: PrimitiveLiteral; isArray?: TrueLiteral; isNullable?: TrueLiteral; + isOptional?: TrueLiteral; constant?: PrimitiveValueConstant; default?: PrimitiveValueDefault; rules: ValidationRule[]; @@ -1054,11 +1056,6 @@ export type Protocols = { http?: HttpRoute[]; }; -export type RequiredRule = { - kind: 'ValidationRule'; - id: 'Required'; -}; - export type ReturnValue = { kind: 'ReturnValue'; @@ -1434,7 +1431,6 @@ export function isDiscriminatedUnion(obj: Union): obj is DiscriminatedUnion { /** A validation rule. */ export type ValidationRule = - | RequiredRule | ConstantRule | StringMaxLengthRule | StringMinLengthRule @@ -1450,10 +1446,6 @@ export type ValidationRule = | ArrayMinItemsRule | ArrayUniqueItemsRule; -export function isRequiredRule(obj: ValidationRule): obj is RequiredRule { - return obj.id === 'Required'; -} - export function isConstantRule(obj: ValidationRule): obj is ConstantRule { return obj.id === 'Constant'; } diff --git a/src/schema.json b/src/schema.json index 6fbd34e..06b1e5e 100644 --- a/src/schema.json +++ b/src/schema.json @@ -392,6 +392,7 @@ "typeName": { "$ref": "#/definitions/primitiveLiteral" }, "isArray": { "$ref": "#/definitions/true" }, "isNullable": { "$ref": "#/definitions/true" }, + "isOptional": { "$ref": "#/definitions/true" }, "constant": { "oneOf": [ { "$ref": "#/definitions/string" }, @@ -424,6 +425,7 @@ "$ref": "#/definitions/string" }, "isArray": { "$ref": "#/definitions/true" }, + "isOptional": { "$ref": "#/definitions/true" }, "rules": { "type": "array", "items": { "$ref": "#/definitions/validationRule" } @@ -952,7 +954,6 @@ }, "description": "A validation rule.", "oneOf": [ - { "$ref": "#/definitions/requiredRule" }, { "$ref": "#/definitions/constantRule" }, { "$ref": "#/definitions/stringMaxLengthRule" }, { "$ref": "#/definitions/stringMinLengthRule" }, @@ -969,19 +970,6 @@ { "$ref": "#/definitions/arrayUniqueItemsRule" } ] }, - "requiredRule": { - "title": "RequiredRule", - "type": "object", - "required": ["kind", "id"], - "properties": { - "kind": { "type": "string", "const": "ValidationRule" }, - "id": { - "type": "string", - "const": "Required" - } - }, - "additionalProperties": false - }, "constantRule": { "title": "ConstantRule", "type": "object", From 5ecf41c53b4232975cc383f706444c2e4e434025 Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Thu, 17 Jul 2025 20:08:28 -0700 Subject: [PATCH 10/24] feat: remove constant rule --- src/generated/types.ts | 13 ------------- src/schema.json | 21 --------------------- 2 files changed, 34 deletions(-) diff --git a/src/generated/types.ts b/src/generated/types.ts index 4b2b6cc..7b30c9c 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -220,12 +220,6 @@ export type ComplexValue = { rules: ValidationRule[]; }; -export type ConstantRule = { - kind: 'ValidationRule'; - id: 'Constant'; - value: ConstantRuleValue; -}; - /** TODO: don't allow arrays, enums, or other unions in discriminated unions */ export type DiscriminatedUnion = { kind: 'DiscriminatedUnion'; @@ -1324,8 +1318,6 @@ export type UntypedLiteral = { loc?: string; }; -export type ConstantRuleValue = StringLiteral | NumberLiteral | BooleanLiteral; - export type MemberValue = PrimitiveValue | ComplexValue; export function isPrimitiveValue(obj: MemberValue): obj is PrimitiveValue { @@ -1431,7 +1423,6 @@ export function isDiscriminatedUnion(obj: Union): obj is DiscriminatedUnion { /** A validation rule. */ export type ValidationRule = - | ConstantRule | StringMaxLengthRule | StringMinLengthRule | StringPatternRule @@ -1446,10 +1437,6 @@ export type ValidationRule = | ArrayMinItemsRule | ArrayUniqueItemsRule; -export function isConstantRule(obj: ValidationRule): obj is ConstantRule { - return obj.id === 'Constant'; -} - export function isStringMaxLengthRule( obj: ValidationRule, ): obj is StringMaxLengthRule { diff --git a/src/schema.json b/src/schema.json index 06b1e5e..d935527 100644 --- a/src/schema.json +++ b/src/schema.json @@ -954,7 +954,6 @@ }, "description": "A validation rule.", "oneOf": [ - { "$ref": "#/definitions/constantRule" }, { "$ref": "#/definitions/stringMaxLengthRule" }, { "$ref": "#/definitions/stringMinLengthRule" }, { "$ref": "#/definitions/stringPatternRule" }, @@ -970,26 +969,6 @@ { "$ref": "#/definitions/arrayUniqueItemsRule" } ] }, - "constantRule": { - "title": "ConstantRule", - "type": "object", - "required": ["kind", "id", "value"], - "properties": { - "kind": { "type": "string", "const": "ValidationRule" }, - "id": { - "type": "string", - "const": "Constant" - }, - "value": { - "oneOf": [ - { "$ref": "#/definitions/string" }, - { "$ref": "#/definitions/number" }, - { "$ref": "#/definitions/boolean" } - ] - } - }, - "additionalProperties": false - }, "stringMaxLengthRule": { "title": "StringMaxLengthRule", "type": "object", From 7c585047a03cf7e1931ff6287f8dbca93d2b13fc Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Thu, 17 Jul 2025 20:10:36 -0700 Subject: [PATCH 11/24] feat: remove stringEnum rule --- src/generated/types.ts | 23 ----------------------- src/schema.json | 20 -------------------- 2 files changed, 43 deletions(-) diff --git a/src/generated/types.ts b/src/generated/types.ts index 7b30c9c..f896740 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -1172,24 +1172,6 @@ export type SimpleUnion = { meta?: MetaValue[]; }; -export type StringEnumRule = { - kind: 'ValidationRule'; - id: 'StringEnum'; - values: StringLiteral[]; - - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ - loc?: string; -}; - export type StringFormatRule = { kind: 'ValidationRule'; id: 'StringFormat'; @@ -1427,7 +1409,6 @@ export type ValidationRule = | StringMinLengthRule | StringPatternRule | StringFormatRule - | StringEnumRule | NumberMultipleOfRule | NumberGtRule | NumberGteRule @@ -1461,10 +1442,6 @@ export function isStringFormatRule( return obj.id === 'StringFormat'; } -export function isStringEnumRule(obj: ValidationRule): obj is StringEnumRule { - return obj.id === 'StringEnum'; -} - export function isNumberMultipleOfRule( obj: ValidationRule, ): obj is NumberMultipleOfRule { diff --git a/src/schema.json b/src/schema.json index d935527..92a8078 100644 --- a/src/schema.json +++ b/src/schema.json @@ -958,7 +958,6 @@ { "$ref": "#/definitions/stringMinLengthRule" }, { "$ref": "#/definitions/stringPatternRule" }, { "$ref": "#/definitions/stringFormatRule" }, - { "$ref": "#/definitions/stringEnumRule" }, { "$ref": "#/definitions/numberMultipleOfRule" }, { "$ref": "#/definitions/numberGtRule" }, { "$ref": "#/definitions/numberGteRule" }, @@ -1029,25 +1028,6 @@ }, "additionalProperties": false }, - "stringEnumRule": { - "title": "StringEnumRule", - "type": "object", - "required": ["kind", "id", "values"], - "properties": { - "kind": { "type": "string", "const": "ValidationRule" }, - "id": { - "type": "string", - "const": "StringEnum" - }, - "values": { - "type": "array", - "items": { "$ref": "#/definitions/string" }, - "minItems": 1 - }, - "loc": { "$ref": "#/definitions/range" } - }, - "additionalProperties": false - }, "numberMultipleOfRule": { "title": "NumberMultipleOfRule", "type": "object", From 67ff198417884cac31a99313b3a8117a633d6a7b Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Mon, 21 Jul 2025 17:10:51 -0600 Subject: [PATCH 12/24] test: update example IR --- src/example.json | 284 ++++++++++++++++++++--------------------------- 1 file changed, 119 insertions(+), 165 deletions(-) diff --git a/src/example.json b/src/example.json index 2832eb2..db8f5bb 100644 --- a/src/example.json +++ b/src/example.json @@ -84,6 +84,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, "default": { "kind": "StringLiteral", "value": "ASDF" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] }, "meta": [ @@ -138,6 +139,7 @@ "kind": "StringLiteral", "value": "getGizmosResponse" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -219,6 +221,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -247,6 +250,7 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "gizmo" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -330,18 +334,8 @@ "kind": "StringLiteral", "value": "createGizmoSize" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "small" }, - { "kind": "StringLiteral", "value": "medium" }, - { "kind": "StringLiteral", "value": "big" }, - { "kind": "StringLiteral", "value": "XL" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } } ], @@ -360,6 +354,7 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "gizmo" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -477,6 +472,7 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "widget" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -530,6 +526,7 @@ "kind": "StringLiteral", "value": "createWidgetString" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -572,8 +569,8 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ - { "kind": "ValidationRule", "id": "Required" }, { "kind": "ValidationRule", "id": "StringMaxLength", @@ -591,6 +588,7 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "widget" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -622,8 +620,8 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ - { "kind": "ValidationRule", "id": "Required" }, { "kind": "ValidationRule", "id": "StringMaxLength", @@ -780,6 +778,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -789,6 +788,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "date" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -810,6 +810,7 @@ "kind": "PrimitiveLiteral", "value": "date-time" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -828,6 +829,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -837,6 +839,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -846,6 +849,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "long" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -855,6 +859,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -864,6 +869,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "float" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -873,6 +879,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "double" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -905,6 +912,7 @@ "kind": "StringLiteral", "value": "exhaustiveParamsString" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -914,6 +922,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -926,17 +935,8 @@ "kind": "StringLiteral", "value": "exhaustiveParamsQueryEnum" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "one" }, - { "kind": "StringLiteral", "value": "two" }, - { "kind": "StringLiteral", "value": "three" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -945,6 +945,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -954,6 +955,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -963,6 +965,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -976,6 +979,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -989,17 +993,8 @@ "value": "exhaustiveParamsQueryEnumArray" }, "isArray": { "kind": "TrueLiteral", "value": true }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "one" }, - { "kind": "StringLiteral", "value": "two" }, - { "kind": "StringLiteral", "value": "three" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -1012,6 +1007,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1025,6 +1021,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1038,6 +1035,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1047,7 +1045,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, - "rules": [{ "kind": "ValidationRule", "id": "Required" }] + "rules": [] } }, { @@ -1059,18 +1057,8 @@ "kind": "StringLiteral", "value": "exhaustiveParamsPathEnum" }, - "rules": [ - { "kind": "ValidationRule", "id": "Required" }, - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "one" }, - { "kind": "StringLiteral", "value": "two" }, - { "kind": "StringLiteral", "value": "three" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -1079,7 +1067,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, - "rules": [{ "kind": "ValidationRule", "id": "Required" }] + "rules": [] } }, { @@ -1088,7 +1076,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, - "rules": [{ "kind": "ValidationRule", "id": "Required" }] + "rules": [] } }, { @@ -1097,7 +1085,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, - "rules": [{ "kind": "ValidationRule", "id": "Required" }] + "rules": [] } }, { @@ -1107,7 +1095,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, "isArray": { "kind": "TrueLiteral", "value": true }, - "rules": [{ "kind": "ValidationRule", "id": "Required" }] + "rules": [] } }, { @@ -1120,18 +1108,8 @@ "value": "exhaustiveParamsPathEnumArray" }, "isArray": { "kind": "TrueLiteral", "value": true }, - "rules": [ - { "kind": "ValidationRule", "id": "Required" }, - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "one" }, - { "kind": "StringLiteral", "value": "two" }, - { "kind": "StringLiteral", "value": "three" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -1141,7 +1119,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, "isArray": { "kind": "TrueLiteral", "value": true }, - "rules": [{ "kind": "ValidationRule", "id": "Required" }] + "rules": [] } }, { @@ -1154,7 +1132,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, "isArray": { "kind": "TrueLiteral", "value": true }, - "rules": [{ "kind": "ValidationRule", "id": "Required" }] + "rules": [] } }, { @@ -1167,7 +1145,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, "isArray": { "kind": "TrueLiteral", "value": true }, - "rules": [{ "kind": "ValidationRule", "id": "Required" }] + "rules": [] } }, { @@ -1176,6 +1154,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1188,17 +1167,8 @@ "kind": "StringLiteral", "value": "exhaustiveParamsHeaderEnum" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "one" }, - { "kind": "StringLiteral", "value": "two" }, - { "kind": "StringLiteral", "value": "three" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -1207,6 +1177,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1216,6 +1187,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1225,6 +1197,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1238,6 +1211,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1251,17 +1225,8 @@ "value": "exhaustiveParamsHeaderEnumArray" }, "isArray": { "kind": "TrueLiteral", "value": true }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "one" }, - { "kind": "StringLiteral", "value": "two" }, - { "kind": "StringLiteral", "value": "three" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -1274,6 +1239,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1287,6 +1253,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -1300,6 +1267,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2128,6 +2096,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2143,6 +2112,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2152,17 +2122,8 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "productSize" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "small" }, - { "kind": "StringLiteral", "value": "medium" }, - { "kind": "StringLiteral", "value": "large" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } } ], @@ -2178,6 +2139,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2193,6 +2155,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2216,6 +2179,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2231,6 +2195,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2246,6 +2211,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2261,6 +2227,7 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "widgetFoo" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2270,17 +2237,8 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "productSize" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "small" }, - { "kind": "StringLiteral", "value": "medium" }, - { "kind": "StringLiteral", "value": "large" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } } ], @@ -2296,6 +2254,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2319,6 +2278,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2334,6 +2294,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2349,6 +2310,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [ { "kind": "ValidationRule", @@ -2364,6 +2326,7 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "newWidgetFoo" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2373,17 +2336,8 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "productSize" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "small" }, - { "kind": "StringLiteral", "value": "medium" }, - { "kind": "StringLiteral", "value": "large" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } } ], @@ -2399,6 +2353,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2411,6 +2366,7 @@ "kind": "StringLiteral", "value": "someTypeNestedUnion" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2427,13 +2383,8 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "singleValueEnum" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [{ "kind": "StringLiteral", "value": "the value" }] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -2442,16 +2393,8 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "multiValueEnum" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "the value" }, - { "kind": "StringLiteral", "value": "another value" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -2461,15 +2404,8 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, "constant": { "kind": "StringLiteral", "value": "the only value" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [ - { "kind": "StringLiteral", "value": "the only value" } - ] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } } ], @@ -2485,6 +2421,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2494,6 +2431,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2503,6 +2441,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2512,6 +2451,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2521,6 +2461,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2530,6 +2471,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2546,6 +2488,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2555,6 +2498,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2564,6 +2508,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2573,6 +2518,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2589,6 +2535,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2598,6 +2545,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2615,13 +2563,8 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, "constant": { "kind": "StringLiteral", "value": "cat" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [{ "kind": "StringLiteral", "value": "cat" }] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -2630,6 +2573,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "integer" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2647,13 +2591,8 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, "constant": { "kind": "StringLiteral", "value": "dog" }, - "rules": [ - { - "kind": "ValidationRule", - "id": "StringEnum", - "values": [{ "kind": "StringLiteral", "value": "dog" }] - } - ] + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } }, { @@ -2662,6 +2601,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "boolean" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2678,8 +2618,9 @@ "value": { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "gizmo" }, - "rules": [], - "isArray": { "kind": "TrueLiteral", "value": true } + "isArray": { "kind": "TrueLiteral", "value": true }, + "isOptional": { "kind": "TrueLiteral", "value": true }, + "rules": [] } } ], @@ -2695,6 +2636,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2711,6 +2653,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2720,6 +2663,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "string" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2737,6 +2681,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, "constant": { "kind": "NumberLiteral", "value": 123456 }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2746,6 +2691,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2763,6 +2709,7 @@ "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, "constant": { "kind": "NumberLiteral", "value": 123456 }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } }, @@ -2772,6 +2719,7 @@ "value": { "kind": "PrimitiveValue", "typeName": { "kind": "PrimitiveLiteral", "value": "number" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } } @@ -2973,11 +2921,13 @@ { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "partA" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] }, { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "partB" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } ], @@ -2993,11 +2943,13 @@ { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "partA" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] }, { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "partB" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } ], @@ -3014,11 +2966,13 @@ { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "cat" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] }, { "kind": "ComplexValue", "typeName": { "kind": "StringLiteral", "value": "dog" }, + "isOptional": { "kind": "TrueLiteral", "value": true }, "rules": [] } ] From d567321d4ec0aada827cbd1e8f4b9110d92c7876 Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Mon, 21 Jul 2025 17:11:03 -0600 Subject: [PATCH 13/24] feat: make complex types nullable --- src/generated/types.ts | 1 + src/schema.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/generated/types.ts b/src/generated/types.ts index f896740..2514496 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -216,6 +216,7 @@ export type ComplexValue = { /** The name of a type, enum, or union defined in this Service. */ typeName: StringLiteral; isArray?: TrueLiteral; + isNullable?: TrueLiteral; isOptional?: TrueLiteral; rules: ValidationRule[]; }; diff --git a/src/schema.json b/src/schema.json index 92a8078..b419fd0 100644 --- a/src/schema.json +++ b/src/schema.json @@ -425,6 +425,7 @@ "$ref": "#/definitions/string" }, "isArray": { "$ref": "#/definitions/true" }, + "isNullable": { "$ref": "#/definitions/true" }, "isOptional": { "$ref": "#/definitions/true" }, "rules": { "type": "array", From 0fe3f32184fb1e4750859fd707e151976c8969eb Mon Sep 17 00:00:00 2001 From: skonves Date: Tue, 22 Jul 2025 01:23:44 +0000 Subject: [PATCH 14/24] 0.2.0-alpha.3 Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 52a0c45..7d0e1ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@basketry/ir", - "version": "0.2.0-alpha.2", + "version": "0.2.0-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@basketry/ir", - "version": "0.2.0-alpha.2", + "version": "0.2.0-alpha.3", "license": "MIT", "dependencies": { "ajv": "^8.17.1" diff --git a/package.json b/package.json index 3494c67..3559eb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@basketry/ir", - "version": "0.2.0-alpha.2", + "version": "0.2.0-alpha.3", "description": "Low-level Basketry IR components", "main": "./lib/index.js", "scripts": { From 4166e4e43651dac8739ad033cc3395c1b115c5ef Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Wed, 23 Jul 2025 21:05:44 -0700 Subject: [PATCH 15/24] Upgrade to latest alphas --- package-lock.json | 78 +++++++++++++++++++++++++++--------------- package.json | 6 ++-- src/generated/types.ts | 2 +- 3 files changed, 55 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d0e1ea..fc804f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,13 +12,13 @@ "ajv": "^8.17.1" }, "devDependencies": { - "@basketry/json-schema": "^0.2.0-alpha.4", - "@basketry/typescript": "^0.2.0-alpha.2", + "@basketry/json-schema": "^0.2.0-alpha.5", + "@basketry/typescript": "^0.2.0-alpha.3", "@types/jest": "^27.4.0", "@types/node": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", - "basketry": "^0.2.0-alpha.14", + "basketry": "^0.2.0-alpha.17", "eslint": "^8.5.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.3", @@ -29,6 +29,9 @@ "ts-jest": "^27.1.3", "ts-node": "^10.4.0", "typescript": "^4.5.5" + }, + "funding": { + "url": "https://github.com/sponsors/basketry" } }, "node_modules/@babel/code-frame": { @@ -556,13 +559,25 @@ "node": ">=6.9.0" } }, + "node_modules/@basketry/ir": { + "version": "0.2.0-alpha.3", + "resolved": "https://registry.npmjs.org/@basketry/ir/-/ir-0.2.0-alpha.3.tgz", + "integrity": "sha512-Ik8UH6GbI+jpOuDdZvnqFASZyicwzKsRStLVtQNvS9Q+eqbOSvJ0wzEkMYw9WmljZCl9U45uHIKDvdOTs07g4Q==", + "dev": true, + "dependencies": { + "ajv": "^8.17.1" + }, + "funding": { + "url": "https://github.com/sponsors/basketry" + } + }, "node_modules/@basketry/json-schema": { - "version": "0.2.0-alpha.4", - "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-alpha.4.tgz", - "integrity": "sha512-ubjphn1TyLwcTbWIVuvWzML+sOZCvjk3mDbWOEE4UDcNo/Bstv9DDFggEkLI41r0TOJWOX6sonNvLhFS6Hmq5w==", + "version": "0.2.0-alpha.5", + "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-alpha.5.tgz", + "integrity": "sha512-7NrfYe9n/uzFrw7jRoWSR+ATOoBiYZzwM1e6wPy1nRCeeEaMFvbUB6yWdJadic9iWv+SG86R4JQNSOOo86Z+nw==", "dev": true, "dependencies": { - "basketry": "^0.2.0-alpha.12", + "basketry": "^0.2.0-alpha.17", "case": "^1.6.3", "json-to-ast": "^2.1.0", "pluralize": "^8.0.0", @@ -570,12 +585,12 @@ } }, "node_modules/@basketry/typescript": { - "version": "0.2.0-alpha.2", - "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-alpha.2.tgz", - "integrity": "sha512-TEPrv0g/l+7QwiSqN2P7Vyelt20NmQUo4t84psN/DInFqU2lVvISfqrLgnsxEiiLmWOdA5sjYk6Ac8oG810d0Q==", + "version": "0.2.0-alpha.3", + "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-alpha.3.tgz", + "integrity": "sha512-Y66QysgZPger3XLpksNSLfDh6d7a/gdLVG5oLZK2k2r+YiufBFj8EDx5OP38NYexIOpQrKSatp83cHT6SMQBBg==", "dev": true, "dependencies": { - "basketry": "^0.2.0-alpha.10", + "basketry": "^0.2.0-alpha.17", "case": "^1.6.3" }, "funding": { @@ -2155,12 +2170,12 @@ "dev": true }, "node_modules/basketry": { - "version": "0.2.0-alpha.14", - "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-alpha.14.tgz", - "integrity": "sha512-Ho7zE1Tzy1oI6HChJr0mfI438Hy3xXBYE1m2f7RuIAMq9P+MoACU0VG/Rx1Cq6qalzsGw4sfm8ymO2NUq8b6EA==", + "version": "0.2.0-alpha.17", + "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-alpha.17.tgz", + "integrity": "sha512-N7E1dWzFps7uu9PI3eVL3lTD/hSCrA/rIJMx72Zy9Xvl1BUWp0xznjzD1rMmCQSPihN0XYTm/WkmhedS2N02BQ==", "dev": true, "dependencies": { - "ajv": "^8.11.0", + "@basketry/ir": "^0.2.0-alpha.3", "case": "^1.6.3", "chalk": "^4.1.2", "ts-node": "^10.7.0", @@ -8596,13 +8611,22 @@ "to-fast-properties": "^2.0.0" } }, + "@basketry/ir": { + "version": "0.2.0-alpha.3", + "resolved": "https://registry.npmjs.org/@basketry/ir/-/ir-0.2.0-alpha.3.tgz", + "integrity": "sha512-Ik8UH6GbI+jpOuDdZvnqFASZyicwzKsRStLVtQNvS9Q+eqbOSvJ0wzEkMYw9WmljZCl9U45uHIKDvdOTs07g4Q==", + "dev": true, + "requires": { + "ajv": "^8.17.1" + } + }, "@basketry/json-schema": { - "version": "0.2.0-alpha.4", - "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-alpha.4.tgz", - "integrity": "sha512-ubjphn1TyLwcTbWIVuvWzML+sOZCvjk3mDbWOEE4UDcNo/Bstv9DDFggEkLI41r0TOJWOX6sonNvLhFS6Hmq5w==", + "version": "0.2.0-alpha.5", + "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-alpha.5.tgz", + "integrity": "sha512-7NrfYe9n/uzFrw7jRoWSR+ATOoBiYZzwM1e6wPy1nRCeeEaMFvbUB6yWdJadic9iWv+SG86R4JQNSOOo86Z+nw==", "dev": true, "requires": { - "basketry": "^0.2.0-alpha.12", + "basketry": "^0.2.0-alpha.17", "case": "^1.6.3", "json-to-ast": "^2.1.0", "pluralize": "^8.0.0", @@ -8610,12 +8634,12 @@ } }, "@basketry/typescript": { - "version": "0.2.0-alpha.2", - "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-alpha.2.tgz", - "integrity": "sha512-TEPrv0g/l+7QwiSqN2P7Vyelt20NmQUo4t84psN/DInFqU2lVvISfqrLgnsxEiiLmWOdA5sjYk6Ac8oG810d0Q==", + "version": "0.2.0-alpha.3", + "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-alpha.3.tgz", + "integrity": "sha512-Y66QysgZPger3XLpksNSLfDh6d7a/gdLVG5oLZK2k2r+YiufBFj8EDx5OP38NYexIOpQrKSatp83cHT6SMQBBg==", "dev": true, "requires": { - "basketry": "^0.2.0-alpha.10", + "basketry": "^0.2.0-alpha.17", "case": "^1.6.3" } }, @@ -9815,12 +9839,12 @@ "dev": true }, "basketry": { - "version": "0.2.0-alpha.14", - "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-alpha.14.tgz", - "integrity": "sha512-Ho7zE1Tzy1oI6HChJr0mfI438Hy3xXBYE1m2f7RuIAMq9P+MoACU0VG/Rx1Cq6qalzsGw4sfm8ymO2NUq8b6EA==", + "version": "0.2.0-alpha.17", + "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-alpha.17.tgz", + "integrity": "sha512-N7E1dWzFps7uu9PI3eVL3lTD/hSCrA/rIJMx72Zy9Xvl1BUWp0xznjzD1rMmCQSPihN0XYTm/WkmhedS2N02BQ==", "dev": true, "requires": { - "ajv": "^8.11.0", + "@basketry/ir": "^0.2.0-alpha.3", "case": "^1.6.3", "chalk": "^4.1.2", "ts-node": "^10.7.0", diff --git a/package.json b/package.json index 3559eb9..6416462 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,13 @@ "homepage": "https://github.com/basketry/ir#readme", "funding": "https://github.com/sponsors/basketry", "devDependencies": { - "@basketry/json-schema": "^0.2.0-alpha.4", - "@basketry/typescript": "^0.2.0-alpha.2", + "@basketry/json-schema": "^0.2.0-alpha.5", + "@basketry/typescript": "^0.2.0-alpha.3", "@types/jest": "^27.4.0", "@types/node": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", - "basketry": "^0.2.0-alpha.14", + "basketry": "^0.2.0-alpha.17", "eslint": "^8.5.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.3", diff --git a/src/generated/types.ts b/src/generated/types.ts index 2514496..42976aa 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -1,5 +1,5 @@ /** - * This code was generated by @basketry/typescript@0.2.0-alpha.2 + * This code was generated by @basketry/typescript@0.2.0-alpha.3 * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. From fc44fca2bd677ceac467b418a6f6dc353dfaa479 Mon Sep 17 00:00:00 2001 From: skonves Date: Thu, 31 Jul 2025 00:26:51 +0000 Subject: [PATCH 16/24] 0.2.0-rc.0 Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fc804f2..f38d6d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@basketry/ir", - "version": "0.2.0-alpha.3", + "version": "0.2.0-rc.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@basketry/ir", - "version": "0.2.0-alpha.3", + "version": "0.2.0-rc.0", "license": "MIT", "dependencies": { "ajv": "^8.17.1" diff --git a/package.json b/package.json index 6416462..94fe8b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@basketry/ir", - "version": "0.2.0-alpha.3", + "version": "0.2.0-rc.0", "description": "Low-level Basketry IR components", "main": "./lib/index.js", "scripts": { From 3dd841c98ad648a8db4390c20ada16506ff6856a Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Wed, 30 Jul 2025 20:11:45 -0700 Subject: [PATCH 17/24] Upgrade to RC packages --- package-lock.json | 66 +++++++++++++++++++++++------------------------ package.json | 6 ++--- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index f38d6d9..8ac2118 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,13 +12,13 @@ "ajv": "^8.17.1" }, "devDependencies": { - "@basketry/json-schema": "^0.2.0-alpha.5", - "@basketry/typescript": "^0.2.0-alpha.3", + "@basketry/json-schema": "^0.2.0-rc.0", + "@basketry/typescript": "^0.2.0-rc.0", "@types/jest": "^27.4.0", "@types/node": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", - "basketry": "^0.2.0-alpha.17", + "basketry": "^0.2.0-rc.1", "eslint": "^8.5.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.3", @@ -560,9 +560,9 @@ } }, "node_modules/@basketry/ir": { - "version": "0.2.0-alpha.3", - "resolved": "https://registry.npmjs.org/@basketry/ir/-/ir-0.2.0-alpha.3.tgz", - "integrity": "sha512-Ik8UH6GbI+jpOuDdZvnqFASZyicwzKsRStLVtQNvS9Q+eqbOSvJ0wzEkMYw9WmljZCl9U45uHIKDvdOTs07g4Q==", + "version": "0.2.0-rc.0", + "resolved": "https://registry.npmjs.org/@basketry/ir/-/ir-0.2.0-rc.0.tgz", + "integrity": "sha512-MqanZpGhs3KflBmKU5mLSlm0p5wfVrLi02zXQ8qsMc72Xmxf17cU9q8xVZ4rmnuVEG4d6zKio6BZTSJDDu32GQ==", "dev": true, "dependencies": { "ajv": "^8.17.1" @@ -572,12 +572,12 @@ } }, "node_modules/@basketry/json-schema": { - "version": "0.2.0-alpha.5", - "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-alpha.5.tgz", - "integrity": "sha512-7NrfYe9n/uzFrw7jRoWSR+ATOoBiYZzwM1e6wPy1nRCeeEaMFvbUB6yWdJadic9iWv+SG86R4JQNSOOo86Z+nw==", + "version": "0.2.0-rc.0", + "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-rc.0.tgz", + "integrity": "sha512-sDTntwKWr4bdTx/v3l3hmosOVhvqOVXmmSEdKUHFYT5wTF8VSFgMENQy6rsEqajpHW7U8V2usY2BL7lkrgxkvw==", "dev": true, "dependencies": { - "basketry": "^0.2.0-alpha.17", + "basketry": "^0.2.0-rc.1", "case": "^1.6.3", "json-to-ast": "^2.1.0", "pluralize": "^8.0.0", @@ -585,12 +585,12 @@ } }, "node_modules/@basketry/typescript": { - "version": "0.2.0-alpha.3", - "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-alpha.3.tgz", - "integrity": "sha512-Y66QysgZPger3XLpksNSLfDh6d7a/gdLVG5oLZK2k2r+YiufBFj8EDx5OP38NYexIOpQrKSatp83cHT6SMQBBg==", + "version": "0.2.0-rc.0", + "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-rc.0.tgz", + "integrity": "sha512-BzseH0zXwyWGdgtF4E3/UVabJwZrFWegetMYGZKEgI0kie2Xru06/vs8q6EVcdF+MRfi1E4cVkgDP8m8bqvkpQ==", "dev": true, "dependencies": { - "basketry": "^0.2.0-alpha.17", + "basketry": "^0.2.0-rc.1", "case": "^1.6.3" }, "funding": { @@ -2170,12 +2170,12 @@ "dev": true }, "node_modules/basketry": { - "version": "0.2.0-alpha.17", - "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-alpha.17.tgz", - "integrity": "sha512-N7E1dWzFps7uu9PI3eVL3lTD/hSCrA/rIJMx72Zy9Xvl1BUWp0xznjzD1rMmCQSPihN0XYTm/WkmhedS2N02BQ==", + "version": "0.2.0-rc.1", + "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-rc.1.tgz", + "integrity": "sha512-kgcN6dYk32CwDnbEyyRt9vVBkDtJFxzmn7hzqYdTV0RUIy9oBsZtRtleAW00IRSIBDfUu8ffLUIZZE2q0nGJUQ==", "dev": true, "dependencies": { - "@basketry/ir": "^0.2.0-alpha.3", + "@basketry/ir": "^0.2.0-rc.0", "case": "^1.6.3", "chalk": "^4.1.2", "ts-node": "^10.7.0", @@ -8612,21 +8612,21 @@ } }, "@basketry/ir": { - "version": "0.2.0-alpha.3", - "resolved": "https://registry.npmjs.org/@basketry/ir/-/ir-0.2.0-alpha.3.tgz", - "integrity": "sha512-Ik8UH6GbI+jpOuDdZvnqFASZyicwzKsRStLVtQNvS9Q+eqbOSvJ0wzEkMYw9WmljZCl9U45uHIKDvdOTs07g4Q==", + "version": "0.2.0-rc.0", + "resolved": "https://registry.npmjs.org/@basketry/ir/-/ir-0.2.0-rc.0.tgz", + "integrity": "sha512-MqanZpGhs3KflBmKU5mLSlm0p5wfVrLi02zXQ8qsMc72Xmxf17cU9q8xVZ4rmnuVEG4d6zKio6BZTSJDDu32GQ==", "dev": true, "requires": { "ajv": "^8.17.1" } }, "@basketry/json-schema": { - "version": "0.2.0-alpha.5", - "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-alpha.5.tgz", - "integrity": "sha512-7NrfYe9n/uzFrw7jRoWSR+ATOoBiYZzwM1e6wPy1nRCeeEaMFvbUB6yWdJadic9iWv+SG86R4JQNSOOo86Z+nw==", + "version": "0.2.0-rc.0", + "resolved": "https://registry.npmjs.org/@basketry/json-schema/-/json-schema-0.2.0-rc.0.tgz", + "integrity": "sha512-sDTntwKWr4bdTx/v3l3hmosOVhvqOVXmmSEdKUHFYT5wTF8VSFgMENQy6rsEqajpHW7U8V2usY2BL7lkrgxkvw==", "dev": true, "requires": { - "basketry": "^0.2.0-alpha.17", + "basketry": "^0.2.0-rc.1", "case": "^1.6.3", "json-to-ast": "^2.1.0", "pluralize": "^8.0.0", @@ -8634,12 +8634,12 @@ } }, "@basketry/typescript": { - "version": "0.2.0-alpha.3", - "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-alpha.3.tgz", - "integrity": "sha512-Y66QysgZPger3XLpksNSLfDh6d7a/gdLVG5oLZK2k2r+YiufBFj8EDx5OP38NYexIOpQrKSatp83cHT6SMQBBg==", + "version": "0.2.0-rc.0", + "resolved": "https://registry.npmjs.org/@basketry/typescript/-/typescript-0.2.0-rc.0.tgz", + "integrity": "sha512-BzseH0zXwyWGdgtF4E3/UVabJwZrFWegetMYGZKEgI0kie2Xru06/vs8q6EVcdF+MRfi1E4cVkgDP8m8bqvkpQ==", "dev": true, "requires": { - "basketry": "^0.2.0-alpha.17", + "basketry": "^0.2.0-rc.1", "case": "^1.6.3" } }, @@ -9839,12 +9839,12 @@ "dev": true }, "basketry": { - "version": "0.2.0-alpha.17", - "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-alpha.17.tgz", - "integrity": "sha512-N7E1dWzFps7uu9PI3eVL3lTD/hSCrA/rIJMx72Zy9Xvl1BUWp0xznjzD1rMmCQSPihN0XYTm/WkmhedS2N02BQ==", + "version": "0.2.0-rc.1", + "resolved": "https://registry.npmjs.org/basketry/-/basketry-0.2.0-rc.1.tgz", + "integrity": "sha512-kgcN6dYk32CwDnbEyyRt9vVBkDtJFxzmn7hzqYdTV0RUIy9oBsZtRtleAW00IRSIBDfUu8ffLUIZZE2q0nGJUQ==", "dev": true, "requires": { - "@basketry/ir": "^0.2.0-alpha.3", + "@basketry/ir": "^0.2.0-rc.0", "case": "^1.6.3", "chalk": "^4.1.2", "ts-node": "^10.7.0", diff --git a/package.json b/package.json index 94fe8b8..b616e75 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,13 @@ "homepage": "https://github.com/basketry/ir#readme", "funding": "https://github.com/sponsors/basketry", "devDependencies": { - "@basketry/json-schema": "^0.2.0-alpha.5", - "@basketry/typescript": "^0.2.0-alpha.3", + "@basketry/json-schema": "^0.2.0-rc.0", + "@basketry/typescript": "^0.2.0-rc.0", "@types/jest": "^27.4.0", "@types/node": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", - "basketry": "^0.2.0-alpha.17", + "basketry": "^0.2.0-rc.1", "eslint": "^8.5.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.3", From d80db255906f8eee490bfa06aeb32eb15ced7976 Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Wed, 30 Jul 2025 20:12:32 -0700 Subject: [PATCH 18/24] chore: npm audit fix --- package-lock.json | 1170 ++++++++++++++++++++++++++------------------- 1 file changed, 677 insertions(+), 493 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ac2118..48a3aef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,12 +35,14 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" @@ -86,13 +88,10 @@ } }, "node_modules/@babel/core/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, "bin": { "json5": "lib/cli.js" }, @@ -101,9 +100,9 @@ } }, "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -119,28 +118,21 @@ } }, "node_modules/@babel/generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", - "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", + "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.8", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/parser": "^7.28.0", + "@babel/types": "^7.28.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", @@ -160,9 +152,9 @@ } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -180,40 +172,11 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", - "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, "engines": { "node": ">=6.9.0" } @@ -282,10 +245,19 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "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==", "dev": true, "engines": { "node": ">=6.9.0" @@ -301,38 +273,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", - "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz", + "integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==", "dev": true, "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "node_modules/@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/types": "^7.28.0" }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.10.tgz", - "integrity": "sha512-Sm/S9Or6nN8uiFsQU1yodyDW3MWXQhFeqzMPM+t8MJjM+pLsnFVxFZzkpXKvUXh+Gz9cbMoYYs484+Jw/NTEFQ==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -503,57 +463,45 @@ } }, "node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.10.tgz", - "integrity": "sha512-yzuaYXoRJBGMlBhsMJoUW7G1UmSb/eXr/JHYM/MsOJgavJibLwASijW7oXBdw3NQ6T0bW7Ty5P/VarOs9cHmqw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", + "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.16.8", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.16.10", - "@babel/types": "^7.16.8", - "debug": "^4.1.0", - "globals": "^11.1.0" + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.0", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/types": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", - "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1411,6 +1359,41 @@ "node": ">=8" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2301,9 +2284,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "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, "dependencies": { "balanced-match": "^1.0.0", @@ -2311,12 +2294,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -2391,6 +2374,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2562,9 +2558,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "dependencies": { "nice-try": "^1.0.4", @@ -2578,9 +2574,9 @@ } }, "node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -2770,6 +2766,20 @@ "node": ">=8" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.49", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.49.tgz", @@ -2849,6 +2859,51 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -3244,9 +3299,9 @@ "dev": true }, "node_modules/eslint/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -3483,9 +3538,9 @@ } }, "node_modules/execa/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -3656,9 +3711,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -3708,14 +3763,16 @@ "dev": true }, "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz", + "integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==", "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.35" }, "engines": { "node": ">= 6" @@ -3742,10 +3799,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/functional-red-black-tree": { "version": "1.0.1", @@ -3772,14 +3832,24 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3794,6 +3864,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3889,6 +3972,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -3932,9 +4027,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "engines": { "node": ">= 0.4" @@ -3944,12 +4039,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -3958,6 +4053,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -4487,9 +4594,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -6302,15 +6409,15 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-parse-better-errors": { @@ -6344,9 +6451,9 @@ } }, "node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -6441,18 +6548,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -6469,9 +6564,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -6492,6 +6587,15 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -6517,34 +6621,34 @@ } }, "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.3", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, "node_modules/mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "dependencies": { - "mime-db": "1.51.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" @@ -6560,9 +6664,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -6620,9 +6724,9 @@ } }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -6893,15 +6997,15 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -7045,6 +7149,12 @@ "node": ">=6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -7114,6 +7224,12 @@ "node": ">=0.10.0" } }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -7239,13 +7355,10 @@ } }, "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -7617,15 +7730,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7639,14 +7743,15 @@ } }, "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { "node": ">=6" @@ -7709,13 +7814,10 @@ } }, "node_modules/ts-jest/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, "bin": { "json5": "lib/cli.js" }, @@ -7879,9 +7981,9 @@ } }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, "engines": { "node": ">= 4.0.0" @@ -7896,6 +7998,16 @@ "punycode": "^2.1.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -8058,9 +8170,9 @@ "dev": true }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -8135,9 +8247,9 @@ } }, "node_modules/ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, "engines": { "node": ">=8.3.0" @@ -8176,12 +8288,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -8221,12 +8327,14 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "requires": { - "@babel/highlight": "^7.16.7" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" } }, "@babel/compat-data": { @@ -8259,18 +8367,15 @@ }, "dependencies": { "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, "source-map": { @@ -8282,22 +8387,16 @@ } }, "@babel/generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", - "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", + "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", "dev": true, "requires": { - "@babel/types": "^7.16.8", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@babel/parser": "^7.28.0", + "@babel/types": "^7.28.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" } }, "@babel/helper-compilation-targets": { @@ -8313,9 +8412,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -8329,34 +8428,11 @@ "@babel/types": "^7.16.7" } }, - "@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } + "@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true }, "@babel/helper-module-imports": { "version": "7.16.7", @@ -8407,10 +8483,16 @@ "@babel/types": "^7.16.7" } }, + "@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true + }, "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "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==", "dev": true }, "@babel/helper-validator-option": { @@ -8420,33 +8502,24 @@ "dev": true }, "@babel/helpers": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", - "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz", + "integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==", "dev": true, "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2" } }, - "@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/types": "^7.28.0" } }, - "@babel/parser": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.10.tgz", - "integrity": "sha512-Sm/S9Or6nN8uiFsQU1yodyDW3MWXQhFeqzMPM+t8MJjM+pLsnFVxFZzkpXKvUXh+Gz9cbMoYYs484+Jw/NTEFQ==", - "dev": true - }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -8565,50 +8638,39 @@ } }, "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" } }, "@babel/traverse": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.10.tgz", - "integrity": "sha512-yzuaYXoRJBGMlBhsMJoUW7G1UmSb/eXr/JHYM/MsOJgavJibLwASijW7oXBdw3NQ6T0bW7Ty5P/VarOs9cHmqw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", + "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.16.8", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.16.10", - "@babel/types": "^7.16.8", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.0", + "debug": "^4.3.1" } }, "@babel/types": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", - "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" } }, "@basketry/ir": { @@ -9265,6 +9327,38 @@ } } }, + "@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -9936,9 +10030,9 @@ } }, "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "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, "requires": { "balanced-match": "^1.0.0", @@ -9946,12 +10040,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browser-process-hrtime": { @@ -10007,6 +10101,16 @@ "get-intrinsic": "^1.0.2" } }, + "call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -10146,9 +10250,9 @@ "dev": true }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "requires": { "nice-try": "^1.0.4", @@ -10159,9 +10263,9 @@ }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true } } @@ -10309,6 +10413,17 @@ } } }, + "dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "requires": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + } + }, "electron-to-chromium": { "version": "1.4.49", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.49.tgz", @@ -10373,6 +10488,39 @@ "unbox-primitive": "^1.0.1" } }, + "es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true + }, + "es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "requires": { + "es-errors": "^1.3.0" + } + }, + "es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "requires": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + } + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -10549,9 +10697,9 @@ "dev": true }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -10851,9 +10999,9 @@ }, "dependencies": { "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -10985,9 +11133,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -11025,14 +11173,16 @@ "dev": true }, "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz", + "integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==", "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.35" } }, "fs.realpath": { @@ -11049,9 +11199,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true }, "functional-red-black-tree": { @@ -11073,14 +11223,21 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" } }, "get-package-type": { @@ -11089,6 +11246,16 @@ "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, + "get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "requires": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + } + }, "get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -11151,6 +11318,12 @@ "slash": "^3.0.0" } }, + "gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true + }, "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -11185,18 +11358,27 @@ "dev": true }, "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true }, "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "requires": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" + } + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2" } }, "hosted-git-info": { @@ -11574,9 +11756,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -12934,9 +13116,9 @@ } }, "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true }, "json-parse-better-errors": { @@ -12967,9 +13149,9 @@ } }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -13043,15 +13225,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -13062,9 +13235,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -13084,6 +13257,12 @@ "tmpl": "1.0.5" } }, + "math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true + }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -13103,28 +13282,28 @@ "dev": true }, "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.3", + "picomatch": "^2.3.1" } }, "mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { - "mime-db": "1.51.0" + "mime-db": "1.52.0" } }, "mimic-fn": { @@ -13134,9 +13313,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -13191,9 +13370,9 @@ }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true } } @@ -13394,15 +13573,15 @@ } }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pidtree": { @@ -13497,6 +13676,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -13537,6 +13722,12 @@ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -13622,13 +13813,10 @@ } }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true }, "shallow-clone": { "version": "3.0.1", @@ -13920,12 +14108,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -13936,14 +14118,15 @@ } }, "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" } }, "tr46": { @@ -13972,13 +14155,10 @@ }, "dependencies": { "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true } } }, @@ -14087,9 +14267,9 @@ } }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true }, "uri-js": { @@ -14101,6 +14281,16 @@ "punycode": "^2.1.0" } }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -14241,9 +14431,9 @@ "dev": true }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "wrap-ansi": { @@ -14302,9 +14492,9 @@ } }, "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, "requires": {} }, @@ -14326,12 +14516,6 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", From 5ce6469813172cac6aedfd6d6199822261355195 Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Wed, 30 Jul 2025 20:13:35 -0700 Subject: [PATCH 19/24] Regenerate types --- src/generated/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generated/types.ts b/src/generated/types.ts index 42976aa..501e1ea 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -1,5 +1,5 @@ /** - * This code was generated by @basketry/typescript@0.2.0-alpha.3 + * This code was generated by @basketry/typescript@0.2.0-rc.0 * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. From 1f6c44d344ff6df779bd37f64cd0afe18b8bd264 Mon Sep 17 00:00:00 2001 From: skonves Date: Thu, 31 Jul 2025 03:19:16 +0000 Subject: [PATCH 20/24] 0.2.0-rc.1 Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 48a3aef..3aa5340 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@basketry/ir", - "version": "0.2.0-rc.0", + "version": "0.2.0-rc.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@basketry/ir", - "version": "0.2.0-rc.0", + "version": "0.2.0-rc.1", "license": "MIT", "dependencies": { "ajv": "^8.17.1" diff --git a/package.json b/package.json index b616e75..9723006 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@basketry/ir", - "version": "0.2.0-rc.0", + "version": "0.2.0-rc.1", "description": "Low-level Basketry IR components", "main": "./lib/index.js", "scripts": { From 474ae4da6e520a47865a9143198bcf9d9b88e499 Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Sat, 9 Aug 2025 19:59:43 -0700 Subject: [PATCH 21/24] Update documentation --- src/generated/types.ts | 1121 ++++++++++++++++++---------------------- src/schema.json | 459 ++++++++++++---- 2 files changed, 858 insertions(+), 722 deletions(-) diff --git a/src/generated/types.ts b/src/generated/types.ts index 501e1ea..fa3e87e 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -55,16 +55,7 @@ export type ApiKeyScheme = { parameter: StringLiteral; in: ApiKeySchemeIn; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; meta?: MetaValue[]; }; @@ -72,86 +63,44 @@ export type ApiKeyScheme = { export type ApiKeySchemeIn = { value: ApiKeySchemeInValue; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; export type ApiKeySchemeType = { value: 'apiKey'; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies the maximum number of items in an array. */ export type ArrayMaxItemsRule = { kind: 'ValidationRule'; id: 'ArrayMaxItems'; max: NonNegativeIntegerLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies the minimum number of items in an array. */ export type ArrayMinItemsRule = { kind: 'ValidationRule'; id: 'ArrayMinItems'; min: NonNegativeIntegerLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies that all items in an array MUST be unique. */ export type ArrayUniqueItemsRule = { kind: 'ValidationRule'; id: 'ArrayUniqueItems'; required: boolean; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -162,16 +111,7 @@ export type BasicScheme = { name: StringLiteral; description?: StringLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; meta?: MetaValue[]; }; @@ -179,160 +119,194 @@ export type BasicScheme = { export type BasicSchemeType = { value: 'basic'; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; -/** A boolean literal */ +/** Represents a boolean value exactly as it appears in the original source document. */ export type BooleanLiteral = { kind: 'BooleanLiteral'; value: boolean; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** Represents a value whose type is defined elsewhere in the Service as a named type, enum, or union. */ export type ComplexValue = { kind: 'ComplexValue'; - /** The name of a type, enum, or union defined in this Service. */ + /** + * The name of a type, enum, or union defined in this Service. The casing MUST match + * the casing of the referenced type, enum, or union definition exactly. + */ typeName: StringLiteral; + + /** A boolean value that indicates whether the value is an array. */ isArray?: TrueLiteral; + + /** + * Indicates whether the value MAY explicitly be set to `null`. When `true`, the + * type definition allows `null` as a valid value in addition to what is specified + * by `typeName`. Implementations MAY interpret `null` according to the closest + * equivalent in the target language or platform. (This differs from `isOptional`, + * where the value is not required to appear at all in the data structure or + * message.) + */ isNullable?: TrueLiteral; + + /** + * Indicates whether the value MAY be omitted entirely. When `true`, the value is + * not required to appear in the data structure or message. (This differs from + * `isNullable`, where the value is present but MAY explicitly be `null`.) If this + * value is not present, tooling MUST consider the value to be required. + */ isOptional?: TrueLiteral; + + /** + * A set of constraints that apply to the value, such as limits on length, numeric + * range, or array size. These rules define additional validation beyond the basic + * type definition and are distinct from rules that apply to a containing type. + */ rules: ValidationRule[]; }; -/** TODO: don't allow arrays, enums, or other unions in discriminated unions */ +/** + * A Discriminated Union defines a member value that may be one of several possible + * object types, with an explicit discriminator property whose value identifies + * which type is present. This approach allows implementations to unambiguously + * determine the type at runtime without inspecting the full structure of the value. + * Discriminated unions are commonly used when member types share overlapping shapes + * or when reliable deserialization across languages and tools is required. + */ export type DiscriminatedUnion = { kind: 'DiscriminatedUnion'; + + /** + * The name of the union. This name MUST be unique within the Service across all + * other types, enums, and unions. This value MAY be represented in any casing. + * Generators MUST NOT assume any particular casing for this value and SHOULD + * represent it in a language-idiomatic way. + */ name: StringLiteral; + + /** + * An array of strings that describe the union. Each item in the array SHOULD be + * considered a separate paragraph. These values MAY include Markdown formatting. + */ description?: StringLiteral[]; + + /** + * The name of the discriminator property. This property MUST exist in all union + * member types and MUST use identical casing across all of them. + */ discriminator: StringLiteral; + + /** An array of the possible member values that make up the union. */ members: ComplexValue[]; + + /** A boolean value that indicates whether the union is deprecated. */ deprecated?: TrueLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of the union in the source document(s). */ loc?: string; + + /** An array of metadata values for the union. */ meta?: MetaValue[]; }; export type DisjunctionKindLiteral = { kind: 'DisjunctionKindLiteral'; - value: DisjunctionKind; /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + * In an inclusive disjunction, a value MUST fully match at least one union member + * and MAY also match others. In an exclusive disjunction, a value MUST fully match + * exactly one union member and MUST NOT match any others. */ + value: DisjunctionKind; + + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** + * An Enum defines a named set of constant values that represent all valid options + * for a particular member value. + */ export type Enum = { kind: 'Enum'; + + /** + * The name of the enum. This name MUST be unique within the Service across all + * other types, enums, and unions. This value MAY be represented in any casing. + * Generators MUST NOT assume any particular casing for this value and SHOULD + * represent it in a language-idiomatic way. + */ name: StringLiteral; + + /** + * An array of strings that describe the enum. Each item in the array SHOULD be + * considered a separate paragraph. These values MAY include Markdown formatting. + */ description?: StringLiteral[]; - members: EnumMember[]; - deprecated?: TrueLiteral; /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + * An array of the constant values that make up the enum. Each member defines a + * single allowed value along with its optional description. */ + members: EnumMember[]; + + /** A boolean value that indicates whether the enum is deprecated. */ + deprecated?: TrueLiteral; + + /** The encoded location of the enum in the source document(s). */ loc?: string; + + /** An array of metadata values for the enum. */ meta?: MetaValue[]; }; +/** Represents a single constant value within an enum. */ export type EnumMember = { kind: 'EnumMember'; + + /** The constant value that represents the enum member. This value MUST be unique within the enum. */ content: StringLiteral; - description?: StringLiteral[]; - deprecated?: TrueLiteral; /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + * An array of strings that describe the enum member. Each item in the array SHOULD + * be considered a separate paragraph. These values MAY include Markdown formatting. */ + description?: StringLiteral[]; + + /** A boolean value that indicates whether the enum member is deprecated. */ + deprecated?: TrueLiteral; + + /** The encoded location of the enum member in the source document(s). */ loc?: string; + + /** An array of metadata values for the enum member. */ meta?: MetaValue[]; }; +/** + * Represents the format of an array in an HTTP request or response as it appears in + * the original source document. + */ export type HttpArrayFormatLiteral = { kind: 'HttpArrayFormatLiteral'; value: HttpArrayFormat; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** Represents the location of an HTTP parameter as it appears in the original source document. */ export type HttpLocationLiteral = { kind: 'HttpLocationLiteral'; value: HttpLocation; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -345,16 +319,7 @@ export type HttpMethod = { requestMediaTypes: StringLiteral[]; responseMediaTypes: StringLiteral[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -364,16 +329,7 @@ export type HttpParameter = { location: HttpLocationLiteral; arrayFormat?: HttpArrayFormatLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -382,167 +338,202 @@ export type HttpRoute = { pattern: StringLiteral; methods: HttpMethod[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** Represents an HTTP status code as it appears in the original source document. */ export type HttpStatusCodeLiteral = { kind: 'HttpStatusCodeLiteral'; value: number; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** Represents an HTTP verb string as it appears in the original source document. */ export type HttpVerbLiteral = { kind: 'HttpVerbLiteral'; - value: HttpVerb; /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + * The HTTP verb as a lowercase string. Generators MAY represent this value in a + * language- or platform-idiomatic casing. */ + value: HttpVerb; + + /** The encoded location of this node in the source document(s). */ loc?: string; }; -/** An integer literal */ +/** Represents an integer value exactly as it appears in the original source document. */ export type IntegerLiteral = { kind: 'IntegerLiteral'; value: number; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** + * An Interface defines a cohesive set of related methods that collectively + * represent a functional contract within a service. Interfaces act as the primary + * grouping mechanism for operations and are protocol-agnostic by default. They + * provide a stable, language-neutral abstraction of service capabilities, ensuring + * that tooling can target a wide range of programming languages and frameworks + * without losing semantic meaning. + */ export type Interface = { kind: 'Interface'; + + /** + * The name of the interface. This name MUST be unique within the Service. This + * value MAY be represented in any casing. Generators MUST NOT assume any particular + * casing for this value and SHOULD represent it in a language-idiomatic way. + */ name: StringLiteral; + + /** + * An array of strings that describe the interface. Each item in the array SHOULD be + * considered a separate paragraph. These values MAY include Markdown formatting. + */ description?: StringLiteral[]; + + /** An array of methods defined by this interface. */ methods: Method[]; + + /** + * Any protocol-specific information about the interface. This information is not + * part of the core interface structure and definition, but MAY be used by tooling + * to generate code for specific protocols. + */ protocols?: Protocols; + + /** A boolean value that indicates whether the interface is deprecated. */ deprecated?: TrueLiteral; + + /** An array of metadata values for the interface. */ meta?: MetaValue[]; }; +/** Defines the allowed shape and constraints for keys in Map Properties. */ export type MapKey = { kind: 'MapKey'; + + /** The type definition for the map’s keys, which MAY be either a primitive or complex value. */ value: MemberValue; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of the map key in the source document(s). */ loc?: string; + + /** An array of metadata values for the map key. */ meta?: MetaValue[]; }; +/** + * Map properties define the allowed shape for values associated with dynamically + * named keys in a type. They are used when the set of field names is not known in + * advance, allowing instances of the type to contain any number of keys that + * conform to a shared schema. Unlike properties, which represent explicitly named + * fields that are the same for all instances of a type, map properties describe + * rules for dynamically named fields that may vary between instances. + */ export type MapProperties = { kind: 'MapProperties'; + + /** + * The shape of the keys that are allowed in the map. This value defines the data + * shape and constraints for the map keys. + */ key: MapKey; + + /** + * An array of key names that MUST be present in every instance of the map. Each + * entry specifies a required key that MUST conform to the map’s value definition. + * The array MAY be empty. + */ requiredKeys: StringLiteral[]; - value: MapValue; /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + * The shape of the values that are allowed in the map. This value defines the data + * shape and constraints for the map values. */ + value: MapValue; + + /** The encoded location of the map properties in the source document(s). */ loc?: string; + + /** An array of metadata values for the map properties. */ meta?: MetaValue[]; }; +/** Defines the allowed shape and constraints for values in Map Properties. */ export type MapValue = { kind: 'MapValue'; + + /** The type definition for the map’s values, which MAY be either a primitive or complex value. */ value: MemberValue; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of the map key in the source document(s). */ loc?: string; + + /** An array of metadata values for the map key. */ meta?: MetaValue[]; }; +/** Metadata in the form of a key-value pair. */ export type MetaValue = { kind: 'MetaValue'; + + /** The key of the metadata value. */ key: StringLiteral; + + /** An untyped literal value. Implementations MUST NOT assume any particular type for this value. */ value: UntypedLiteral; }; +/** + * A Method defines a single operation that can be performed on a service. Methods + * are the primary means of interacting with a service and are associated with a + * specific interface. They define the input parameters, output values, and any + * security requirements for executing the operation. + */ export type Method = { kind: 'Method'; + + /** + * The name of the method. This name MUST be unique within the Service. This value + * MAY be represented in any casing. Generators MUST NOT assume any particular + * casing for this value and SHOULD represent it in a language-idiomatic way. + */ name: StringLiteral; - security: SecurityOption[]; + + /** + * An array of strings that describe the interface. Each item in the array SHOULD be + * considered a separate paragraph. These values MAY include Markdown formatting. + */ description?: StringLiteral[]; + + /** + * An array of parameters that are required for the method. Each parameter defines + * its own name, value definition, and optional constraints. + */ parameters: Parameter[]; + security: SecurityOption[]; + + /** The value that is returned by the method. This value is defined by the method’s return type. */ returns?: ReturnValue; + + /** A boolean value that indicates whether the method is deprecated. */ deprecated?: TrueLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of the method in the source document(s). */ loc?: string; + + /** An array of metadata values for the method. */ meta?: MetaValue[]; }; -/** A string literal */ +/** Represents a non-empty string value exactly as it appears in the original source document. */ export type NonEmptyStringLiteral = { kind: 'NonEmptyStringLiteral'; value: string; @@ -551,163 +542,89 @@ export type NonEmptyStringLiteral = { loc?: string; }; +/** Represents a non-negative integer value exactly as it appears in the original source document. */ export type NonNegativeIntegerLiteral = { kind: 'NonNegativeIntegerLiteral'; value: number; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** Represents a non-negative numeric value exactly as it appears in the original source document. */ export type NonNegativeNumberLiteral = { kind: 'NonNegativeNumberLiteral'; value: number; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; -/** A null literal */ +/** Represents a null value exactly as it appears in the original source document. */ export type NullLiteral = { kind: 'NullLiteral'; value: any; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies a number that MUST be greater than or equal to a given value. */ export type NumberGteRule = { kind: 'ValidationRule'; id: 'NumberGTE'; value: NumberLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies a number that MUST be greater than a given value. */ export type NumberGtRule = { kind: 'ValidationRule'; id: 'NumberGT'; value: NumberLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; -/** A number literal */ +/** Represents a numeric value exactly as it appears in the original source document. */ export type NumberLiteral = { kind: 'NumberLiteral'; value: number; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies a number that MUST be less than or equal to a given value. */ export type NumberLteRule = { kind: 'ValidationRule'; id: 'NumberLTE'; value: NumberLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies a number that MUST be less than a given value. */ export type NumberLtRule = { kind: 'ValidationRule'; id: 'NumberLT'; value: NumberLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies a multiple of a number. */ export type NumberMultipleOfRule = { kind: 'ValidationRule'; id: 'NumberMultipleOf'; value: NonNegativeNumberLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -720,16 +637,7 @@ export type OAuth2AuthorizationCodeFlow = { refreshUrl?: StringLiteral; scopes: OAuth2Scope[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; meta?: MetaValue[]; }; @@ -737,16 +645,7 @@ export type OAuth2AuthorizationCodeFlow = { export type OAuth2AuthorizationCodeFlowType = { value: 'authorizationCode'; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -758,16 +657,7 @@ export type OAuth2ClientCredentialsFlow = { refreshUrl?: StringLiteral; scopes: OAuth2Scope[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; meta?: MetaValue[]; }; @@ -775,16 +665,7 @@ export type OAuth2ClientCredentialsFlow = { export type OAuth2ClientCredentialsFlowType = { value: 'clientCredentials'; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -796,16 +677,7 @@ export type OAuth2ImplicitFlow = { refreshUrl?: StringLiteral; scopes: OAuth2Scope[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; meta?: MetaValue[]; }; @@ -813,16 +685,7 @@ export type OAuth2ImplicitFlow = { export type OAuth2ImplicitFlowType = { value: 'implicit'; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -834,16 +697,7 @@ export type OAuth2PasswordFlow = { refreshUrl?: StringLiteral; scopes: OAuth2Scope[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; meta?: MetaValue[]; }; @@ -851,16 +705,7 @@ export type OAuth2PasswordFlow = { export type OAuth2PasswordFlowType = { value: 'password'; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -872,16 +717,7 @@ export type OAuth2Scheme = { description?: StringLiteral[]; flows: OAuth2Flow[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; meta?: MetaValue[]; }; @@ -889,16 +725,7 @@ export type OAuth2Scheme = { export type OAuth2SchemeType = { value: 'oauth2'; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -908,16 +735,7 @@ export type OAuth2Scope = { description: StringLiteral[]; deprecated?: TrueLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; meta?: MetaValue[]; }; @@ -927,73 +745,69 @@ export type ObjectAdditionalPropertiesRule = { id: 'ObjectAdditionalProperties'; forbidden: TrueLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** + * A validation rule that specifies the maximum number of properties on an object. + * This rule MAY be ignored by tooling if the object type does not define any Map + * Properties. + */ export type ObjectMaxPropertiesRule = { kind: 'ObjectValidationRule'; id: 'ObjectMaxProperties'; max: NonNegativeIntegerLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** + * A validation rule that specifies the minimum number of properties on an object. + * This rule MAY be ignored by tooling if the object type does not define any Map + * Properties. + */ export type ObjectMinPropertiesRule = { kind: 'ObjectValidationRule'; id: 'ObjectMinProperties'; min: NonNegativeIntegerLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** + * A Parameter defines an input value accepted by a method. Parameters define the + * contract for the information a method caller MUST (or MAY) provide, ensuring + * consistent behavior across all implementations of the service. + */ export type Parameter = { kind: 'Parameter'; + + /** + * The name of the parameter. This name MUST be unique within the method. This value + * MAY be represented in any casing. Generators MUST NOT assume any particular + * casing for this value and SHOULD represent it in a language-idiomatic way. + */ name: StringLiteral; + + /** + * An array of strings that describe the parameter. Each item in the array SHOULD be + * considered a separate paragraph. These values MAY include Markdown formatting. + */ description?: StringLiteral[]; + + /** The value of the parameter. This value defines the data shape and constraints for the parameter. */ value: MemberValue; + + /** A boolean value that indicates whether the parameter is deprecated. */ deprecated?: TrueLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of the parameter in the source document(s). */ loc?: string; + + /** An array of metadata values for the parameter. */ meta?: MetaValue[]; }; @@ -1001,48 +815,96 @@ export type PrimitiveLiteral = { kind: 'PrimitiveLiteral'; value: Primitive; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** + * Represents a value whose type is one of the built-in primitives (such as string, + * number, boolean, or null). Unlike a complex value, a primitive value does not + * reference other types, enums, or unions—it directly describes a base data type. + */ export type PrimitiveValue = { kind: 'PrimitiveValue'; + + /** The name of the primitive type. */ typeName: PrimitiveLiteral; + + /** A boolean value that indicates whether the value is an array. */ isArray?: TrueLiteral; + + /** + * Indicates whether the value MAY explicitly be set to `null`. When `true`, the + * type definition allows `null` as a valid value in addition to what is specified + * by `typeName`. Implementations MAY interpret `null` according to the closest + * equivalent in the target language or platform. (This differs from `isOptional`, + * where the value is not required to appear at all in the data structure or + * message.) + */ isNullable?: TrueLiteral; + + /** + * Indicates whether the value MAY be omitted entirely. When `true`, the value is + * not required to appear in the data structure or message. (This differs from + * `isNullable`, where the value is present but MAY explicitly be `null`.) If this + * value is not present, tooling MUST consider the value to be required. + */ isOptional?: TrueLiteral; + + /** + * A single, fixed allowed value. This value MUST be compatible with the type + * specified by `typeName`. When defined, this value is the only valid value for the + * field, and tooling or validation MUST reject any other value. + */ constant?: PrimitiveValueConstant; + + /** + * A value to be assumed or applied when none is provided. This value MUST be + * compatible with the type specified by `typeName`. A default does not restrict + * other valid values—it simply acts as the initial value when the field is omitted + */ default?: PrimitiveValueDefault; + + /** + * A set of constraints that apply to the value, such as limits on length, numeric + * range, or array size. These rules define additional validation beyond the basic + * type definition and are distinct from rules that apply to a containing type. + */ rules: ValidationRule[]; }; +/** + * A Property defines a named field within a type, representing a fixed part of that + * type’s structure. Each property specifies the field’s name, its data shape, and + * optional descriptive context. Properties are used when the set of field names is + * known in advance and does not vary between instances of the type. + */ export type Property = { kind: 'Property'; + + /** + * The name of the property. This name MUST be unique within a type. This value MAY + * be represented in any casing. Generators MUST NOT assume any particular casing + * for this value and SHOULD represent it in a language-idiomatic way. + */ name: StringLiteral; + + /** + * An array of strings that describe the property. Each item in the array SHOULD be + * considered a separate paragraph. These values MAY include Markdown formatting. + */ description?: StringLiteral[]; + + /** The value of the property. This value defines the data shape and constraints for the property. */ value: MemberValue; + + /** A boolean value that indicates whether the property is deprecated. */ deprecated?: TrueLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of the property in the source document(s). */ loc?: string; + + /** An array of metadata values for the property. */ meta?: MetaValue[]; }; @@ -1051,38 +913,31 @@ export type Protocols = { http?: HttpRoute[]; }; +/** + * A ReturnValue defines the output produced by a method, specifying the value’s + * data shape and constraints. + */ export type ReturnValue = { kind: 'ReturnValue'; /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + * The value that is returned by the method. This value defines the data shape and + * constraints for the return value. */ + value: MemberValue; + + /** The encoded location of the return value in the source document(s). */ loc?: string; + + /** An array of metadata values for the return value. */ meta?: MetaValue[]; - value: MemberValue; }; export type SecurityOption = { kind: 'SecurityOption'; schemes: SecurityScheme[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; @@ -1119,8 +974,10 @@ export type Service = { majorVersion: IntegerLiteral; /** - * The path to the original source document for this service. All locations in the - * Intermediate Representation refer to ranges within this source document. + * An array of paths to the original source documents for this service. These paths + * are relative to the directory of the config file that produced the IR. All + * locations in the Intermediate Representation refer to ranges within these source + * documents. */ sourcePaths: string[]; @@ -1136,62 +993,75 @@ export type Service = { /** An array of Unions defined in this Service. */ unions: Union[]; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of the service in the source document(s). */ loc?: string; + + /** An array of metadata values for the service. */ meta?: MetaValue[]; }; -/** TODO: don't allow arrays in primitive unions */ +/** + * A Simple Union defines a member value that may be one of several possible + * primitive or complex types, without any additional field to indicate which type + * is in use. Implementations must determine the actual type based on the value + * itself. Simple unions are typically used for cases where the set of possible + * types is small and easily distinguishable without an explicit discriminator. + */ export type SimpleUnion = { kind: 'SimpleUnion'; + + /** + * The name of the union. This name MUST be unique within the Service across all + * other types, enums, and unions. This value MAY be represented in any casing. + * Generators MUST NOT assume any particular casing for this value and SHOULD + * represent it in a language-idiomatic way. + */ name: StringLiteral; + + /** + * An array of strings that describe the union. Each item in the array SHOULD be + * considered a separate paragraph. These values MAY include Markdown formatting. + */ description?: StringLiteral[]; + + /** An array of the possible member values that make up the union. */ members: MemberValue[]; - disjunction?: DisjunctionKindLiteral; - deprecated?: TrueLiteral; /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + * Indicates whether the union’s members are inclusive or exclusive. In an inclusive + * disjunction, a value MUST fully match at least one member and MAY also match + * others. In an exclusive disjunction, a value MUST fully match exactly one member + * and MUST NOT match any others. If this value is not present, tooling SHOULD + * consider the union to be inclusive. */ + disjunction?: DisjunctionKindLiteral; + + /** A boolean value that indicates whether the union is deprecated. */ + deprecated?: TrueLiteral; + + /** The encoded location of the union in the source document(s). */ loc?: string; + + /** An array of metadata values for the union. */ meta?: MetaValue[]; }; +/** + * A validation rule that specifies a format that a string SHOULD conform to. This + * rule is distinct from `StringPattern` because it allows for additional named + * formats beyond regular expressions. Implementations SHOULD interpret the format + * according to the closest equivalent in the target language or platform. + */ export type StringFormatRule = { kind: 'ValidationRule'; id: 'StringFormat'; format: NonEmptyStringLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; -/** A string literal */ +/** Represents a string value exactly as it appears in the original source document. */ export type StringLiteral = { kind: 'StringLiteral'; value: string; @@ -1200,104 +1070,109 @@ export type StringLiteral = { loc?: string; }; +/** A validation rule that specifies the maximum length of a string. */ export type StringMaxLengthRule = { kind: 'ValidationRule'; id: 'StringMaxLength'; length: NonNegativeIntegerLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies the minimum length of a string. */ export type StringMinLengthRule = { kind: 'ValidationRule'; id: 'StringMinLength'; length: NonNegativeIntegerLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** A validation rule that specifies a regular expression pattern that a string MUST match. */ export type StringPatternRule = { kind: 'ValidationRule'; id: 'StringPattern'; pattern: NonEmptyStringLiteral; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; -/** A boolean literal whose value is always true */ +/** Represents a boolean `true` value exactly as it appears in the original source document. */ export type TrueLiteral = { kind: 'TrueLiteral'; value: true; - /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. - */ + /** The encoded location of this node in the source document(s). */ loc?: string; }; +/** + * A Type defines the structure of a data shape used within a service. Types are + * reusable, named contracts that describe how data is organized and validated + * across interfaces and methods. They provide a stable, language-neutral + * representation of complex data models, allowing tooling to interact iwth strongly + * typed artifacts in any target language while preserving the semantics and + * constraints defined in the original service description + */ export type Type = { kind: 'Type'; + + /** + * The name of the type. This name MUST be unique within the Service across all + * other types, enums, and unions. This value MAY be represented in any casing. + * Generators MUST NOT assume any particular casing for this value and SHOULD + * represent it in a language-idiomatic way. + */ name: StringLiteral; + + /** + * An array of strings that describe the type. Each item in the array SHOULD be + * considered a separate paragraph. These values MAY include Markdown formatting. + */ description?: StringLiteral[]; + + /** A boolean value that indicates whether the type is deprecated. */ deprecated?: TrueLiteral; + + /** + * An array of named properties that make up the structure of the type. Each + * property has its own name, value definition, and optional constraints. Properties + * SHOULD be used when the type’s structure is defined by a fixed set of known field + * names. + */ properties: Property[]; + + /** + * An optional set of allowed key and value shapes when the type represents a + * dynamic map or dictionary rather than a fixed set of fields. Map properties + * SHOULD be used when the type’s structure is defined by arbitrary keys whose + * values share a common schema. + */ mapProperties?: MapProperties; - rules: ObjectValidationRule[]; /** - * A range in the source document encoded as a string. This string is a - * semicolon-separated list of numbers and MUST be in one of the following formats: - * - Single point: `;;` (eg. `"4;12;88"`) - * - Single row: `;;;;` (eg. `"4;12;21;88;97"`) - * - Multi row: `;;;;;` (eg. - * `"4;12;6;3;88;164"`) - * - * Both the `row` and `column` values are 1-based. The `offset` values are 0-based. + * A set of constraints that apply to the overall structure of the type. These rules + * are specific to the type itself and are distinct from rules that apply to + * property definitions. */ + rules: ObjectValidationRule[]; + + /** The encoded location of the type in the source document(s). */ loc?: string; + + /** An array of metadata values for the type. */ meta?: MetaValue[]; }; +/** An untyped literal value. Implementations MUST NOT assume any particular type for this value. */ export type UntypedLiteral = { kind: 'UntypedLiteral'; value: any; + + /** The encoded location of the untyped literal value in the source document(s). */ loc?: string; }; @@ -1364,12 +1239,22 @@ export function isObjectAdditionalPropertiesRule( return obj.id === 'ObjectAdditionalProperties'; } +/** + * A single, fixed allowed value. This value MUST be compatible with the type + * specified by `typeName`. When defined, this value is the only valid value for the + * field, and tooling or validation MUST reject any other value. + */ export type PrimitiveValueConstant = | StringLiteral | NumberLiteral | BooleanLiteral | NullLiteral; +/** + * A value to be assumed or applied when none is provided. This value MUST be + * compatible with the type specified by `typeName`. A default does not restrict + * other valid values—it simply acts as the initial value when the field is omitted + */ export type PrimitiveValueDefault = | StringLiteral | NumberLiteral diff --git a/src/schema.json b/src/schema.json index b419fd0..35e8d94 100644 --- a/src/schema.json +++ b/src/schema.json @@ -33,7 +33,7 @@ }, "sourcePaths": { "type": "array", - "description": "The path to the original source document for this service. All locations in the Intermediate Representation refer to ranges within this source document.", + "description": "An array of paths to the original source documents for this service. These paths are relative to the directory of the config file that produced the IR. All locations in the Intermediate Representation refer to ranges within these source documents.", "items": { "type": "string" } }, "interfaces": { @@ -58,8 +58,14 @@ "type": "array", "items": { "$ref": "#/definitions/union" } }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "loc": { + "description": "The encoded location of the service in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the service.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false, "definitions": { @@ -71,18 +77,26 @@ }, "metaValue": { "type": "object", + "description": "Metadata in the form of a key-value pair.", "required": ["kind", "key", "value"], "properties": { "kind": { "type": "string", "const": "MetaValue" }, - "key": { "$ref": "#/definitions/string" }, + "key": { + "description": "The key of the metadata value.", + "$ref": "#/definitions/string" + }, "value": { + "description": "An untyped literal value. Implementations MUST NOT assume any particular type for this value.", "type": "object", "required": ["kind", "value"], "title": "UntypedLiteral", "properties": { "kind": { "type": "string", "const": "UntypedLiteral" }, "value": {}, - "loc": { "type": "string" } + "loc": { + "description": "The encoded location of the untyped literal value in the source document(s).", + "type": "string" + } } } } @@ -90,197 +104,351 @@ "interface": { "type": "object", + "description": "An Interface defines a cohesive set of related methods that collectively represent a functional contract within a service. Interfaces act as the primary grouping mechanism for operations and are protocol-agnostic by default. They provide a stable, language-neutral abstraction of service capabilities, ensuring that tooling can target a wide range of programming languages and frameworks without losing semantic meaning.", "required": ["kind", "name", "methods"], "properties": { "kind": { "type": "string", "const": "Interface" }, - "name": { "$ref": "#/definitions/string" }, + "name": { + "$ref": "#/definitions/string", + "description": "The name of the interface. This name MUST be unique within the Service. This value MAY be represented in any casing. Generators MUST NOT assume any particular casing for this value and SHOULD represent it in a language-idiomatic way." + }, "description": { + "description": "An array of strings that describe the interface. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "type": "array", "items": { "$ref": "#/definitions/string" } }, "methods": { + "description": "An array of methods defined by this interface.", "type": "array", "items": { "$ref": "#/definitions/method" } }, - "protocols": { "$ref": "#/definitions/protocols" }, - "deprecated": { "$ref": "#/definitions/deprecated" }, - "meta": { "$ref": "#/definitions/meta" } + "protocols": { + "description": "Any protocol-specific information about the interface. This information is not part of the core interface structure and definition, but MAY be used by tooling to generate code for specific protocols.", + "$ref": "#/definitions/protocols" + }, + "deprecated": { + "description": "A boolean value that indicates whether the interface is deprecated.", + "$ref": "#/definitions/true" + }, + "meta": { + "description": "An array of metadata values for the interface.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "method": { "type": "object", + "description": "A Method defines a single operation that can be performed on a service. Methods are the primary means of interacting with a service and are associated with a specific interface. They define the input parameters, output values, and any security requirements for executing the operation.", "required": ["kind", "name", "security", "parameters"], "properties": { "kind": { "type": "string", "const": "Method" }, - "name": { "$ref": "#/definitions/string" }, - "security": { - "type": "array", - "items": { "$ref": "#/definitions/securityOption" } + "name": { + "description": "The name of the method. This name MUST be unique within the Service. This value MAY be represented in any casing. Generators MUST NOT assume any particular casing for this value and SHOULD represent it in a language-idiomatic way.", + "$ref": "#/definitions/string" }, "description": { + "description": "An array of strings that describe the interface. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "type": "array", "items": { "$ref": "#/definitions/string" } }, "parameters": { + "description": "An array of parameters that are required for the method. Each parameter defines its own name, value definition, and optional constraints.", "type": "array", "items": { "$ref": "#/definitions/parameter" } }, - "returns": { "$ref": "#/definitions/returnValue" }, - "deprecated": { "$ref": "#/definitions/deprecated" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "security": { + "type": "array", + "items": { "$ref": "#/definitions/securityOption" } + }, + "returns": { + "description": "The value that is returned by the method. This value is defined by the method’s return type.", + "$ref": "#/definitions/returnValue" + }, + "deprecated": { + "description": "A boolean value that indicates whether the method is deprecated.", + "$ref": "#/definitions/true" + }, + "loc": { + "description": "The encoded location of the method in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the method.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "parameter": { "type": "object", + "description": "A Parameter defines an input value accepted by a method. Parameters define the contract for the information a method caller MUST (or MAY) provide, ensuring consistent behavior across all implementations of the service.", "required": ["kind", "name", "value"], "properties": { "kind": { "type": "string", "const": "Parameter" }, - "name": { "$ref": "#/definitions/string" }, + "name": { + "description": "The name of the parameter. This name MUST be unique within the method. This value MAY be represented in any casing. Generators MUST NOT assume any particular casing for this value and SHOULD represent it in a language-idiomatic way.", + "$ref": "#/definitions/string" + }, "description": { + "description": "An array of strings that describe the parameter. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "type": "array", "items": { "$ref": "#/definitions/string" } }, - "value": { "$ref": "#/definitions/memberValue" }, - "deprecated": { "$ref": "#/definitions/deprecated" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "value": { + "description": "The value of the parameter. This value defines the data shape and constraints for the parameter.", + "$ref": "#/definitions/memberValue" + }, + "deprecated": { + "description": "A boolean value that indicates whether the parameter is deprecated.", + "$ref": "#/definitions/true" + }, + "loc": { + "description": "The encoded location of the parameter in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the parameter.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "returnValue": { "type": "object", - "allOf": [ - { - "type": "object", - "required": ["kind", "value"], - "properties": { - "kind": { "type": "string", "const": "ReturnValue" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" }, - "value": { "$ref": "#/definitions/memberValue" } - } + "description": "A ReturnValue defines the output produced by a method, specifying the value’s data shape and constraints.", + "required": ["kind", "value"], + "properties": { + "kind": { "type": "string", "const": "ReturnValue" }, + "value": { + "description": "The value that is returned by the method. This value defines the data shape and constraints for the return value.", + "$ref": "#/definitions/memberValue" + }, + "loc": { + "description": "The encoded location of the return value in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the return value.", + "$ref": "#/definitions/meta" } - ] + } }, "type": { "type": "object", + "description": "A Type defines the structure of a data shape used within a service. Types are reusable, named contracts that describe how data is organized and validated across interfaces and methods. They provide a stable, language-neutral representation of complex data models, allowing tooling to interact iwth strongly typed artifacts in any target language while preserving the semantics and constraints defined in the original service description", "required": ["kind", "name", "properties", "rules"], "properties": { "kind": { "type": "string", "const": "Type" }, - "name": { "$ref": "#/definitions/string" }, + "name": { + "description": "The name of the type. This name MUST be unique within the Service across all other types, enums, and unions. This value MAY be represented in any casing. Generators MUST NOT assume any particular casing for this value and SHOULD represent it in a language-idiomatic way.", + "$ref": "#/definitions/string" + }, "description": { + "description": "An array of strings that describe the type. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "type": "array", "items": { "$ref": "#/definitions/string" } }, - "deprecated": { "$ref": "#/definitions/true" }, + "deprecated": { + "description": "A boolean value that indicates whether the type is deprecated.", + "$ref": "#/definitions/true" + }, "properties": { + "description": "An array of named properties that make up the structure of the type. Each property has its own name, value definition, and optional constraints. Properties SHOULD be used when the type’s structure is defined by a fixed set of known field names.", "type": "array", "items": { "$ref": "#/definitions/property" } }, - "mapProperties": { "$ref": "#/definitions/mapProperties" }, + "mapProperties": { + "description": "An optional set of allowed key and value shapes when the type represents a dynamic map or dictionary rather than a fixed set of fields. Map properties SHOULD be used when the type’s structure is defined by arbitrary keys whose values share a common schema.", + "$ref": "#/definitions/mapProperties" + }, "rules": { + "description": "A set of constraints that apply to the overall structure of the type. These rules are specific to the type itself and are distinct from rules that apply to property definitions.", "type": "array", "items": { "$ref": "#/definitions/objectValidationRule" } }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "loc": { + "description": "The encoded location of the type in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the type.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "property": { "type": "object", + "description": "A Property defines a named field within a type, representing a fixed part of that type’s structure. Each property specifies the field’s name, its data shape, and optional descriptive context. Properties are used when the set of field names is known in advance and does not vary between instances of the type.", "required": ["kind", "name", "value"], "properties": { "kind": { "type": "string", "const": "Property" }, - "name": { "$ref": "#/definitions/string" }, + "name": { + "description": "The name of the property. This name MUST be unique within a type. This value MAY be represented in any casing. Generators MUST NOT assume any particular casing for this value and SHOULD represent it in a language-idiomatic way.", + "$ref": "#/definitions/string" + }, "description": { + "description": "An array of strings that describe the property. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "type": "array", "items": { "$ref": "#/definitions/string" } }, - "value": { "$ref": "#/definitions/memberValue" }, - "deprecated": { "$ref": "#/definitions/deprecated" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "value": { + "description": "The value of the property. This value defines the data shape and constraints for the property.", + "$ref": "#/definitions/memberValue" + }, + "deprecated": { + "description": "A boolean value that indicates whether the property is deprecated.", + "$ref": "#/definitions/true" + }, + "loc": { + "description": "The encoded location of the property in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the property.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "mapProperties": { "type": "object", + "description": "Map properties define the allowed shape for values associated with dynamically named keys in a type. They are used when the set of field names is not known in advance, allowing instances of the type to contain any number of keys that conform to a shared schema. Unlike properties, which represent explicitly named fields that are the same for all instances of a type, map properties describe rules for dynamically named fields that may vary between instances.", "required": ["kind", "key", "requiredKeys", "value"], "properties": { "kind": { "type": "string", "const": "MapProperties" }, - "key": { "$ref": "#/definitions/mapKey" }, + "key": { + "description": "The shape of the keys that are allowed in the map. This value defines the data shape and constraints for the map keys.", + "$ref": "#/definitions/mapKey" + }, "requiredKeys": { + "description": "An array of key names that MUST be present in every instance of the map. Each entry specifies a required key that MUST conform to the map’s value definition. The array MAY be empty.", "type": "array", "items": { "$ref": "#/definitions/string" } }, - "value": { "$ref": "#/definitions/mapValue" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "value": { + "description": "The shape of the values that are allowed in the map. This value defines the data shape and constraints for the map values.", + "$ref": "#/definitions/mapValue" + }, + "loc": { + "description": "The encoded location of the map properties in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the map properties.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "mapKey": { "type": "object", + "description": "Defines the allowed shape and constraints for keys in Map Properties.", "required": ["kind", "value"], "properties": { "kind": { "type": "string", "const": "MapKey" }, - "value": { "$ref": "#/definitions/memberValue" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "value": { + "description": "The type definition for the map’s keys, which MAY be either a primitive or complex value.", + "$ref": "#/definitions/memberValue" + }, + "loc": { + "description": "The encoded location of the map key in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the map key.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "mapValue": { "type": "object", + "description": "Defines the allowed shape and constraints for values in Map Properties.", "required": ["kind", "value"], "properties": { "kind": { "type": "string", "const": "MapValue" }, - "value": { "$ref": "#/definitions/memberValue" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "value": { + "description": "The type definition for the map’s values, which MAY be either a primitive or complex value.", + "$ref": "#/definitions/memberValue" + }, + "loc": { + "description": "The encoded location of the map key in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the map key.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "enum": { "type": "object", + "description": "An Enum defines a named set of constant values that represent all valid options for a particular member value.", "required": ["kind", "name", "members"], "properties": { "kind": { "type": "string", "const": "Enum" }, - "name": { "$ref": "#/definitions/string" }, + "name": { + "description": "The name of the enum. This name MUST be unique within the Service across all other types, enums, and unions. This value MAY be represented in any casing. Generators MUST NOT assume any particular casing for this value and SHOULD represent it in a language-idiomatic way.", + "$ref": "#/definitions/string" + }, "description": { + "description": "An array of strings that describe the enum. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "type": "array", "items": { "$ref": "#/definitions/string" } }, "members": { "type": "array", + "description": "An array of the constant values that make up the enum. Each member defines a single allowed value along with its optional description.", "items": { "$ref": "#/definitions/enumMember" }, "minItems": 1 }, - "deprecated": { "$ref": "#/definitions/deprecated" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "deprecated": { + "description": "A boolean value that indicates whether the enum is deprecated.", + "$ref": "#/definitions/true" + }, + "loc": { + "description": "The encoded location of the enum in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the enum.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "enumMember": { "type": "object", + "description": "Represents a single constant value within an enum.", "required": ["kind", "content"], "properties": { "kind": { "type": "string", "const": "EnumMember" }, - "content": { "$ref": "#/definitions/string" }, + "content": { + "description": "The constant value that represents the enum member. This value MUST be unique within the enum.", + "$ref": "#/definitions/string" + }, "description": { + "description": "An array of strings that describe the enum member. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "type": "array", "items": { "$ref": "#/definitions/string" } }, - "deprecated": { "$ref": "#/definitions/deprecated" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "deprecated": { + "description": "A boolean value that indicates whether the enum member is deprecated.", + "$ref": "#/definitions/true" + }, + "loc": { + "description": "The encoded location of the enum member in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the enum member.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, @@ -300,7 +468,10 @@ "required": ["kind", "value"], "properties": { "kind": { "type": "string", "const": "DisjunctionKindLiteral" }, - "value": { "$ref": "#/definitions/disjunctionKind" }, + "value": { + "description": "In an inclusive disjunction, a value MUST fully match at least one union member and MAY also match others. In an exclusive disjunction, a value MUST fully match exactly one union member and MUST NOT match any others.", + "$ref": "#/definitions/disjunctionKind" + }, "loc": { "$ref": "#/definitions/range" } }, "additionalProperties": false @@ -312,46 +483,80 @@ "simpleUnion": { "type": "object", "required": ["kind", "name", "members"], - "description": "TODO: don't allow arrays in primitive unions", + "description": "A Simple Union defines a member value that may be one of several possible primitive or complex types, without any additional field to indicate which type is in use. Implementations must determine the actual type based on the value itself. Simple unions are typically used for cases where the set of possible types is small and easily distinguishable without an explicit discriminator.", "properties": { "kind": { "type": "string", "const": "SimpleUnion" }, - "name": { "$ref": "#/definitions/string" }, + "name": { + "description": "The name of the union. This name MUST be unique within the Service across all other types, enums, and unions. This value MAY be represented in any casing. Generators MUST NOT assume any particular casing for this value and SHOULD represent it in a language-idiomatic way.", + "$ref": "#/definitions/string" + }, "description": { "type": "array", + "description": "An array of strings that describe the union. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "items": { "$ref": "#/definitions/string" } }, "members": { "type": "array", + "description": "An array of the possible member values that make up the union.", "items": { "$ref": "#/definitions/memberValue" }, "minItems": 1 }, - "disjunction": { "$ref": "#/definitions/disjunctionKindLiteral" }, - "deprecated": { "$ref": "#/definitions/deprecated" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "disjunction": { + "description": "Indicates whether the union’s members are inclusive or exclusive. In an inclusive disjunction, a value MUST fully match at least one member and MAY also match others. In an exclusive disjunction, a value MUST fully match exactly one member and MUST NOT match any others. If this value is not present, tooling SHOULD consider the union to be inclusive.", + "$ref": "#/definitions/disjunctionKindLiteral" + }, + "deprecated": { + "description": "A boolean value that indicates whether the union is deprecated.", + "$ref": "#/definitions/true" + }, + "loc": { + "description": "The encoded location of the union in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the union.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, "discriminatedUnion": { "type": "object", "required": ["kind", "name", "discriminator", "members"], - "description": "TODO: don't allow arrays, enums, or other unions in discriminated unions", + "description": "A Discriminated Union defines a member value that may be one of several possible object types, with an explicit discriminator property whose value identifies which type is present. This approach allows implementations to unambiguously determine the type at runtime without inspecting the full structure of the value. Discriminated unions are commonly used when member types share overlapping shapes or when reliable deserialization across languages and tools is required.", "properties": { "kind": { "type": "string", "const": "DiscriminatedUnion" }, - "name": { "$ref": "#/definitions/string" }, + "name": { + "description": "The name of the union. This name MUST be unique within the Service across all other types, enums, and unions. This value MAY be represented in any casing. Generators MUST NOT assume any particular casing for this value and SHOULD represent it in a language-idiomatic way.", + "$ref": "#/definitions/string" + }, "description": { "type": "array", + "description": "An array of strings that describe the union. Each item in the array SHOULD be considered a separate paragraph. These values MAY include Markdown formatting.", "items": { "$ref": "#/definitions/string" } }, - "discriminator": { "$ref": "#/definitions/string" }, + "discriminator": { + "description": "The name of the discriminator property. This property MUST exist in all union member types and MUST use identical casing across all of them.", + "$ref": "#/definitions/string" + }, "members": { "type": "array", + "description": "An array of the possible member values that make up the union.", "items": { "$ref": "#/definitions/complexValue" }, "minItems": 1 }, - "deprecated": { "$ref": "#/definitions/deprecated" }, - "loc": { "$ref": "#/definitions/range" }, - "meta": { "$ref": "#/definitions/meta" } + "deprecated": { + "description": "A boolean value that indicates whether the union is deprecated.", + "$ref": "#/definitions/true" + }, + "loc": { + "description": "The encoded location of the union in the source document(s).", + "$ref": "#/definitions/range" + }, + "meta": { + "description": "An array of metadata values for the union.", + "$ref": "#/definitions/meta" + } }, "additionalProperties": false }, @@ -386,14 +591,28 @@ }, "primitiveValue": { "type": "object", + "description": "Represents a value whose type is one of the built-in primitives (such as string, number, boolean, or null). Unlike a complex value, a primitive value does not reference other types, enums, or unions—it directly describes a base data type.", "required": ["kind", "typeName", "rules"], "properties": { "kind": { "type": "string", "const": "PrimitiveValue" }, - "typeName": { "$ref": "#/definitions/primitiveLiteral" }, - "isArray": { "$ref": "#/definitions/true" }, - "isNullable": { "$ref": "#/definitions/true" }, - "isOptional": { "$ref": "#/definitions/true" }, + "typeName": { + "description": "The name of the primitive type.", + "$ref": "#/definitions/primitiveLiteral" + }, + "isArray": { + "description": "A boolean value that indicates whether the value is an array.", + "$ref": "#/definitions/true" + }, + "isNullable": { + "description": "Indicates whether the value MAY explicitly be set to `null`. When `true`, the type definition allows `null` as a valid value in addition to what is specified by `typeName`. Implementations MAY interpret `null` according to the closest equivalent in the target language or platform. (This differs from `isOptional`, where the value is not required to appear at all in the data structure or message.)", + "$ref": "#/definitions/true" + }, + "isOptional": { + "description": "Indicates whether the value MAY be omitted entirely. When `true`, the value is not required to appear in the data structure or message. (This differs from `isNullable`, where the value is present but MAY explicitly be `null`.) If this value is not present, tooling MUST consider the value to be required.", + "$ref": "#/definitions/true" + }, "constant": { + "description": "A single, fixed allowed value. This value MUST be compatible with the type specified by `typeName`. When defined, this value is the only valid value for the field, and tooling or validation MUST reject any other value.", "oneOf": [ { "$ref": "#/definitions/string" }, { "$ref": "#/definitions/number" }, @@ -402,6 +621,7 @@ ] }, "default": { + "description": "A value to be assumed or applied when none is provided. This value MUST be compatible with the type specified by `typeName`. A default does not restrict other valid values—it simply acts as the initial value when the field is omitted", "oneOf": [ { "$ref": "#/definitions/string" }, { "$ref": "#/definitions/number" }, @@ -410,6 +630,7 @@ ] }, "rules": { + "description": "A set of constraints that apply to the value, such as limits on length, numeric range, or array size. These rules define additional validation beyond the basic type definition and are distinct from rules that apply to a containing type.", "type": "array", "items": { "$ref": "#/definitions/validationRule" } } @@ -417,17 +638,28 @@ }, "complexValue": { "type": "object", + "description": "Represents a value whose type is defined elsewhere in the Service as a named type, enum, or union.", "required": ["kind", "typeName", "rules"], "properties": { "kind": { "type": "string", "const": "ComplexValue" }, "typeName": { - "description": "The name of a type, enum, or union defined in this Service.", + "description": "The name of a type, enum, or union defined in this Service. The casing MUST match the casing of the referenced type, enum, or union definition exactly.", "$ref": "#/definitions/string" }, - "isArray": { "$ref": "#/definitions/true" }, - "isNullable": { "$ref": "#/definitions/true" }, - "isOptional": { "$ref": "#/definitions/true" }, + "isArray": { + "description": "A boolean value that indicates whether the value is an array.", + "$ref": "#/definitions/true" + }, + "isNullable": { + "description": "Indicates whether the value MAY explicitly be set to `null`. When `true`, the type definition allows `null` as a valid value in addition to what is specified by `typeName`. Implementations MAY interpret `null` according to the closest equivalent in the target language or platform. (This differs from `isOptional`, where the value is not required to appear at all in the data structure or message.)", + "$ref": "#/definitions/true" + }, + "isOptional": { + "description": "Indicates whether the value MAY be omitted entirely. When `true`, the value is not required to appear in the data structure or message. (This differs from `isNullable`, where the value is present but MAY explicitly be `null`.) If this value is not present, tooling MUST consider the value to be required.", + "$ref": "#/definitions/true" + }, "rules": { + "description": "A set of constraints that apply to the value, such as limits on length, numeric range, or array size. These rules define additional validation beyond the basic type definition and are distinct from rules that apply to a containing type.", "type": "array", "items": { "$ref": "#/definitions/validationRule" } } @@ -470,6 +702,7 @@ }, "httpStatusCodeLiteral": { "type": "object", + "description": "Represents an HTTP status code as it appears in the original source document.", "required": ["kind", "value"], "properties": { "kind": { "type": "string", "const": "HttpStatusCodeLiteral" }, @@ -481,9 +714,13 @@ "httpVerbLiteral": { "type": "object", "required": ["kind", "value"], + "description": "Represents an HTTP verb string as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "HttpVerbLiteral" }, - "value": { "$ref": "#/definitions/httpVerb" }, + "value": { + "description": "The HTTP verb as a lowercase string. Generators MAY represent this value in a language- or platform-idiomatic casing.", + "$ref": "#/definitions/httpVerb" + }, "loc": { "$ref": "#/definitions/range" } }, "additionalProperties": false @@ -494,6 +731,7 @@ }, "httpLocationLiteral": { "type": "object", + "description": "Represents the location of an HTTP parameter as it appears in the original source document.", "required": ["kind", "value"], "properties": { "kind": { "type": "string", "const": "HttpLocationLiteral" }, @@ -509,6 +747,7 @@ }, "httpArrayFormatLiteral": { "type": "object", + "description": "Represents the format of an array in an HTTP request or response as it appears in the original source document.", "required": ["kind", "value"], "properties": { "kind": { "type": "string", "const": "HttpArrayFormatLiteral" }, @@ -615,7 +854,7 @@ }, "additionalProperties": false }, - "deprecated": { "$ref": "#/definitions/deprecated" }, + "deprecated": { "$ref": "#/definitions/true" }, "name": { "$ref": "#/definitions/string" }, "description": { "$ref": "#/definitions/string" }, "loc": { "$ref": "#/definitions/range" }, @@ -640,7 +879,7 @@ }, "additionalProperties": false }, - "deprecated": { "$ref": "#/definitions/deprecated" }, + "deprecated": { "$ref": "#/definitions/true" }, "name": { "$ref": "#/definitions/string" }, "description": { "type": "array", @@ -678,7 +917,7 @@ }, "additionalProperties": false }, - "deprecated": { "$ref": "#/definitions/deprecated" }, + "deprecated": { "$ref": "#/definitions/true" }, "name": { "$ref": "#/definitions/string" }, "description": { "type": "array", @@ -718,7 +957,7 @@ }, "additionalProperties": false }, - "deprecated": { "$ref": "#/definitions/deprecated" }, + "deprecated": { "$ref": "#/definitions/true" }, "authorizationUrl": { "$ref": "#/definitions/string" }, "refreshUrl": { "$ref": "#/definitions/string" }, "scopes": { @@ -744,7 +983,7 @@ }, "additionalProperties": false }, - "deprecated": { "$ref": "#/definitions/deprecated" }, + "deprecated": { "$ref": "#/definitions/true" }, "tokenUrl": { "$ref": "#/definitions/string" }, "refreshUrl": { "$ref": "#/definitions/string" }, "scopes": { @@ -770,7 +1009,7 @@ }, "additionalProperties": false }, - "deprecated": { "$ref": "#/definitions/deprecated" }, + "deprecated": { "$ref": "#/definitions/true" }, "tokenUrl": { "$ref": "#/definitions/string" }, "refreshUrl": { "$ref": "#/definitions/string" }, "scopes": { @@ -796,7 +1035,7 @@ }, "additionalProperties": false }, - "deprecated": { "$ref": "#/definitions/deprecated" }, + "deprecated": { "$ref": "#/definitions/true" }, "authorizationUrl": { "$ref": "#/definitions/string" }, "tokenUrl": { "$ref": "#/definitions/string" }, "refreshUrl": { "$ref": "#/definitions/string" }, @@ -819,7 +1058,7 @@ "type": "array", "items": { "$ref": "#/definitions/string" } }, - "deprecated": { "$ref": "#/definitions/deprecated" }, + "deprecated": { "$ref": "#/definitions/true" }, "loc": { "$ref": "#/definitions/range" }, "meta": { "$ref": "#/definitions/meta" } }, @@ -830,7 +1069,7 @@ "type": "object", "required": ["kind", "value"], "title": "StringLiteral", - "description": "A string literal", + "description": "Represents a string value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "StringLiteral" }, "value": { "type": "string" }, @@ -845,7 +1084,7 @@ "type": "object", "required": ["kind", "value"], "title": "IntegerLiteral", - "description": "An integer literal", + "description": "Represents an integer value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "IntegerLiteral" }, "value": { "type": "integer" }, @@ -857,7 +1096,7 @@ "type": "object", "required": ["kind", "value"], "title": "NumberLiteral", - "description": "A number literal", + "description": "Represents a numeric value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "NumberLiteral" }, "value": { "type": "integer" }, @@ -869,7 +1108,7 @@ "type": "object", "required": ["kind", "value"], "title": "BooleanLiteral", - "description": "A boolean literal", + "description": "Represents a boolean value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "BooleanLiteral" }, "value": { "type": "boolean" }, @@ -881,7 +1120,7 @@ "type": "object", "required": ["kind", "value"], "title": "NullLiteral", - "description": "A null literal", + "description": "Represents a null value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "NullLiteral" }, "value": { "type": "null" }, @@ -893,7 +1132,7 @@ "type": "object", "required": ["kind", "value"], "title": "TrueLiteral", - "description": "A boolean literal whose value is always true", + "description": "Represents a boolean `true` value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "TrueLiteral" }, "value": { "type": "boolean", "const": true }, @@ -905,10 +1144,10 @@ "type": "object", "required": ["kind", "value"], "title": "NonEmptyStringLiteral", - "description": "A string literal", + "description": "Represents a non-empty string value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "NonEmptyStringLiteral" }, - "value": { "type": "string" }, + "value": { "type": "string", "minLength": 1 }, "loc": { "description": "The location of this in the doc.", "$ref": "#/definitions/range" @@ -920,6 +1159,7 @@ "type": "object", "required": ["kind", "value"], "title": "NonNegativeIntegerLiteral", + "description": "Represents a non-negative integer value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "NonNegativeIntegerLiteral" }, "value": { "type": "integer", "minimum": 0, "multipleOf": 1 }, @@ -931,6 +1171,7 @@ "type": "object", "required": ["kind", "value"], "title": "NonNegativeNumberLiteral", + "description": "Represents a non-negative numeric value exactly as it appears in the original source document.", "properties": { "kind": { "type": "string", "const": "NonNegativeNumberLiteral" }, "value": { "type": "number", "minimum": 0 }, @@ -939,12 +1180,8 @@ "additionalProperties": false }, - "deprecated": { - "description": "A boolean value indicating that this item is deprecated.", - "$ref": "#/definitions/true" - }, "range": { - "description": "A range in the source document encoded as a string. This string is a semicolon-separated list of numbers and MUST be in one of the following formats:\n- Single point: `;;` (eg. `\"4;12;88\"`)\n- Single row: `;;;;` (eg. `\"4;12;21;88;97\"`)\n- Multi row: `;;;;;` (eg. `\"4;12;6;3;88;164\"`)\n\nBoth the `row` and `column` values are 1-based. The `offset` values are 0-based.", + "description": "The encoded location of this node in the source document(s).", "type": "string", "pattern": "^(\\d+:)((\\d+;){2}(\\d+)|(\\d+;){4}(\\d+)|(\\d+;){5}(\\d+))$" }, @@ -971,6 +1208,7 @@ }, "stringMaxLengthRule": { "title": "StringMaxLengthRule", + "description": "A validation rule that specifies the maximum length of a string.", "type": "object", "required": ["kind", "id", "length"], "properties": { @@ -986,6 +1224,7 @@ }, "stringMinLengthRule": { "title": "StringMinLengthRule", + "description": "A validation rule that specifies the minimum length of a string.", "type": "object", "required": ["kind", "id", "length"], "properties": { @@ -1001,6 +1240,7 @@ }, "stringPatternRule": { "title": "StringPatternRule", + "description": "A validation rule that specifies a regular expression pattern that a string MUST match.", "type": "object", "required": ["kind", "id", "pattern"], "properties": { @@ -1016,6 +1256,7 @@ }, "stringFormatRule": { "title": "StringFormatRule", + "description": "A validation rule that specifies a format that a string SHOULD conform to. This rule is distinct from `StringPattern` because it allows for additional named formats beyond regular expressions. Implementations SHOULD interpret the format according to the closest equivalent in the target language or platform.", "type": "object", "required": ["kind", "id", "format"], "properties": { @@ -1031,6 +1272,7 @@ }, "numberMultipleOfRule": { "title": "NumberMultipleOfRule", + "description": "A validation rule that specifies a multiple of a number.", "type": "object", "required": ["kind", "id", "value"], "properties": { @@ -1046,6 +1288,7 @@ }, "numberGtRule": { "title": "NumberGtRule", + "description": "A validation rule that specifies a number that MUST be greater than a given value.", "type": "object", "required": ["kind", "id", "value"], "properties": { @@ -1061,6 +1304,7 @@ }, "numberGteRule": { "title": "NumberGteRule", + "description": "A validation rule that specifies a number that MUST be greater than or equal to a given value.", "type": "object", "required": ["kind", "id", "value"], "properties": { @@ -1076,6 +1320,7 @@ }, "numberLtRule": { "title": "NumberLtRule", + "description": "A validation rule that specifies a number that MUST be less than a given value.", "type": "object", "required": ["kind", "id", "value"], "properties": { @@ -1091,6 +1336,7 @@ }, "numberLteRule": { "title": "NumberLteRule", + "description": "A validation rule that specifies a number that MUST be less than or equal to a given value.", "type": "object", "required": ["kind", "id", "value"], "properties": { @@ -1106,6 +1352,7 @@ }, "arrayMaxItemsRule": { "title": "ArrayMaxItemsRule", + "description": "A validation rule that specifies the maximum number of items in an array.", "type": "object", "required": ["kind", "id", "max"], "properties": { @@ -1121,6 +1368,7 @@ }, "arrayMinItemsRule": { "title": "ArrayMinItemsRule", + "description": "A validation rule that specifies the minimum number of items in an array.", "type": "object", "required": ["kind", "id", "min"], "properties": { @@ -1136,6 +1384,7 @@ }, "arrayUniqueItemsRule": { "title": "ArrayUniqueItemsRule", + "description": "A validation rule that specifies that all items in an array MUST be unique.", "type": "object", "required": ["kind", "id", "required"], "properties": { @@ -1164,6 +1413,7 @@ }, "objectMinPropertiesRule": { "title": "ObjectMinPropertiesRule", + "description": "A validation rule that specifies the minimum number of properties on an object. This rule MAY be ignored by tooling if the object type does not define any Map Properties.", "type": "object", "required": ["kind", "id", "min"], "properties": { @@ -1179,6 +1429,7 @@ }, "objectMaxPropertiesRule": { "title": "ObjectMaxPropertiesRule", + "description": "A validation rule that specifies the maximum number of properties on an object. This rule MAY be ignored by tooling if the object type does not define any Map Properties.", "type": "object", "required": ["kind", "id", "max"], "properties": { From ba34409552447b9af32ed3c5998380278c825cc2 Mon Sep 17 00:00:00 2001 From: skonves Date: Sun, 10 Aug 2025 03:00:21 +0000 Subject: [PATCH 22/24] 0.2.0-rc.2 Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3aa5340..1e90e01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@basketry/ir", - "version": "0.2.0-rc.1", + "version": "0.2.0-rc.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@basketry/ir", - "version": "0.2.0-rc.1", + "version": "0.2.0-rc.2", "license": "MIT", "dependencies": { "ajv": "^8.17.1" diff --git a/package.json b/package.json index 9723006..80b3d0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@basketry/ir", - "version": "0.2.0-rc.1", + "version": "0.2.0-rc.2", "description": "Low-level Basketry IR components", "main": "./lib/index.js", "scripts": { From be95594319b1d868de2cb65c5d90532da72859f5 Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Sun, 10 Aug 2025 15:12:43 -0700 Subject: [PATCH 23/24] Update README --- README.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c6f51c1..f308c40 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,78 @@ # Basketry Intermediate Representation (IR) -This package defines [Basketry](https://basketry.io)'s Intermediate Representation format. +This package defines the formal [Basketry](https://basketry.io) Intermediate Representation format. ---- +View the human-readable documentation at [basketry.io/docs/specification/v0.2](https://basketry.io/docs/specification/v0.2). + +## Overview + +The Basketry Intermediate Representation (IR) is the shared data model that connects all Basketry components. Every Basketry pipeline passes data in this format, making the IR the single source of truth for how services, methods, types, etc are represented. The IR is defined in an authoritative JSON Schema and serves as the foundation for the entire Basketry ecosystem. + +### Use the types + +Types can be imported from package: + +```ts +import { Service } from '@basketry/ir'; + +function doSomething(service: Service): void { + // TODO: Do something with the service +} +``` + +### Validate IR + +For tooling that produces IR (like a Parser), you can use the validate method to ensure your IR conforms to the schema: + +```ts +import { validate } from '@basketry/ir'; + +const ir: any = { + // TODO: Define a service object +}; + +// `service` will be a valid Service or `undefined` +// `errors` is an array of any errors +const { service, errors } = validate(ir); +``` + +### Import the schema + +The raw JSON Schema is also included in the package: + +```ts +import schema from '@basketry/ir/lib/schema.json'; + +// TODO: Do something with the schema +``` + +## Use Cases + +### Documentation + +The IR’s JSON Schema also serves as the source for the published specification at [basketry.io/docs/specification/v0.2](https://basketry.io/docs/specification/v0.2). This documentation is generated directly from the schema, ensuring it’s always in sync with the actual contract used by Basketry core and its components. Contributors updating the schema can automatically update the public-facing spec, making it a reliable reference for anyone building with or on top of Basketry. + +### Parsers + +Parsers are responsible for converting human-oriented service definition formats (like OpenAPI, JSON Schema, or other SDLs) into the Basketry IR. With the authoritative JSON Schema as a guide, parser authors can ensure their output matches the IR exactly, making it immediately compatible with any generator or rule in the ecosystem. This reduces the need for format-specific generators and encourages a healthy, shared tooling ecosystem. + +### Rules + +Rules act as automated reviewers, inspecting the IR to enforce architectural, style, or compliance guidelines. By working against the IR, rules can be applied universally, regardless of the original service definition format. This allows organizations to maintain high standards across diverse APIs and tech stacks, with validation that’s both consistent and easy to maintain. + +### Generators + +Generators take the IR as input and produce tangible outputs — code, documentation, SDKs, tests, or anything else that can be derived from a service definition. Because the IR is consistent and language-agnostic, generator authors can focus entirely on producing quality output without worrying about inconsistencies in the input. ## For contributors: ### Run this project +1. Clone this repo 1. Install packages: `npm ci` +1. Generate types: `npx basketry` 1. Build the code: `npm run build` -1. Run it! `npm start` Note that the `lint` script is run prior to `build`. Auto-fixable linting or formatting errors may be fixed by running `npm run fix`. From bc6b8766475e431c909ee4bd0c104cb09b120d29 Mon Sep 17 00:00:00 2001 From: skonves Date: Sun, 10 Aug 2025 22:15:28 +0000 Subject: [PATCH 24/24] 0.2.0-rc.3 Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e90e01..99af572 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@basketry/ir", - "version": "0.2.0-rc.2", + "version": "0.2.0-rc.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@basketry/ir", - "version": "0.2.0-rc.2", + "version": "0.2.0-rc.3", "license": "MIT", "dependencies": { "ajv": "^8.17.1" diff --git a/package.json b/package.json index 80b3d0a..e16c264 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@basketry/ir", - "version": "0.2.0-rc.2", + "version": "0.2.0-rc.3", "description": "Low-level Basketry IR components", "main": "./lib/index.js", "scripts": {