diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a769cbe3..0e6113e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,8 +10,8 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 - run: yarn --frozen-lockfile - name: Lint run: yarn lint diff --git a/README.md b/README.md index f757a833..1707e43b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![npm version](https://img.shields.io/npm/v/typescript-json-schema.svg)](https://www.npmjs.com/package/typescript-json-schema) ![Test](https://github.com/YousefED/typescript-json-schema/workflows/Test/badge.svg) -Generate json-schemas from your Typescript sources. +Generate json-schemas from your Typescript sources. This library is lightweight and more or less in maintenance mode. For a more complete JSON schema generator, take a look at [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator). ## Features @@ -51,6 +51,9 @@ Options: --id Set schema id. [string] [default: ""] --defaultNumberType Default number type. [choices: "number", "integer"] [default: "number"] --tsNodeRegister Use ts-node/register (needed for require typescript files). [boolean] [default: false] + --constAsEnum Use enums with a single value when declaring constants. [boolean] [default: false] + --experimentalDecorators Use experimentalDecorators when loading typescript modules. + [boolean] [default: true] ``` ### Programmatic use diff --git a/api.md b/api.md index 86f81567..eeda3518 100644 --- a/api.md +++ b/api.md @@ -230,13 +230,20 @@ interface MySubObject { a: boolean; } +interface AnotherSubObject { + b: boolean; +} + interface MyObject { /** * @title empty# */ empty; - + /** + * @title filled + */ filled: MySubObject; + nonTitled: AnotherSubObject; } ``` @@ -485,6 +492,21 @@ interface MyObject { ``` +## [comments-comment](./test/programs/comments-comment) + +```ts +/** + * @$comment Object comment + */ +interface MyObject { + /** + * @$comment Property comment + */ + text: string; +} +``` + + ## [comments-from-lib](./test/programs/comments-from-lib) ```ts @@ -600,6 +622,25 @@ export interface MyObject { ``` +## [const-as-enum](./test/programs/const-as-enum) + +```ts +export interface MyObject { + reference: true; +} +``` + + +## [const-keyword](./test/programs/const-keyword) + +```ts +const fn = (value: T) => + ({ value }); + +export type Object = ReturnType>; +``` + + ## [custom-dates](./test/programs/custom-dates) ```ts @@ -650,6 +691,23 @@ class MyObject { ``` +## [default-properties-initializer](./test/programs/default-properties-initializer) + +```ts +export class MyObject { + varString: string = "foo"; + varSingleQuoted: string = 'bar'; + varNumber: number = 123; + varFloat: number = 3.21; + varNegative: number = -5; + varBoolean: boolean = true; + varNull: null = null; + varArray: number[] = [1, 2, 3]; + varStringArray: string[] = ["a", "b"]; +} +``` + + ## [enums-compiled-compute](./test/programs/enums-compiled-compute) ```ts @@ -1032,6 +1090,68 @@ export interface MyObject { ``` +## [key-in-key-of-multi](./test/programs/key-in-key-of-multi) + +```ts +type Util = { + utilKey1: { + utilDeepKey11: string; + utilDeepKey12: number; + }; + utilKey2: { + utilDeepKey21: boolean; + utilDeepKey22: null; + }; +}; + +export type Main = { + [Key in keyof Util]: { + [key: string]: Util[Key]; + }; +}; +``` + + +## [key-in-key-of-multi-underscores](./test/programs/key-in-key-of-multi-underscores) + +```ts +type Util = { + __2Underscores: { + utilDeepKey2: string; + }; + ___3Underscores: { + utilDeepKey3: string; + }; + ____4Underscores: { + utilDeepKey4: string; + }; +}; + +export type Main = { + [Key in keyof Util]: { + [key: string]: Util[Key]; + }; +}; +``` + + +## [key-in-key-of-single](./test/programs/key-in-key-of-single) + +```ts +type Util = { + utilKey: { + utilDeepKey: string; + }; +}; + +export type Main = { + [Key in keyof Util]: { + [key: string]: Util[Key]; + }; +}; +``` + + ## [map-types](./test/programs/map-types) ```ts @@ -1170,6 +1290,21 @@ export interface Never { ``` +## [no-ref](./test/programs/no-ref) + +```ts +type MySubType = { + id: string; +}; + +export type MyModule = { + address: MySubType & { extraProp: number }; + address2: MySubType; + address3: MySubType; +}; +``` + + ## [no-unrelated-definitions](./test/programs/no-unrelated-definitions) ```ts @@ -1191,6 +1326,17 @@ interface SomeOtherDefinition { ``` +## [numeric-keys-and-others](./test/programs/numeric-keys-and-others) + +```ts +interface NumericKeysAndOthers { + [key: number]: number; + a: string; + b: boolean; +} +``` + + ## [object-numeric-index](./test/programs/object-numeric-index) ```ts @@ -1280,6 +1426,26 @@ export class ObjectId {} ``` +## [satisfies-keyword](./test/programs/satisfies-keyword) + +```ts +interface Basic { + a: string; + b: number; + c: boolean; +} + +const myObject = { + a: "a" as const, + b: 1 as const, + c: true as const, +// tslint:disable-next-line:variable-name +} satisfies Basic; + +export type Specific = typeof myObject; +``` + + ## [strict-null-checks](./test/programs/strict-null-checks) ```ts @@ -1320,6 +1486,33 @@ class MyObject { ``` +## [string-template-literal](./test/programs/string-template-literal) + +```ts +interface MyObject { + a: `@${string}`, + b: `@${number}`, + c: `@${bigint}`, + d: `@${boolean}`, + e: `@${undefined}`, + f: `@${null}`, + g: `${string}@`, + h: `${number}@`, + i: `${string}@${number}`, + j: `${string}.${string}`, +} +``` + + +## [symbol](./test/programs/symbol) + +```ts +export type MyObject = { + a: symbol; +}; +``` + + ## [tsconfig](./test/programs/tsconfig) ```ts @@ -1353,6 +1546,13 @@ export interface IncludedOnlyByTsConfig { ``` +## [type-alias-never](./test/programs/type-alias-never) + +```ts +export type MyNever = never; +``` + + ## [type-alias-or](./test/programs/type-alias-or) ```ts @@ -1400,6 +1600,13 @@ type MyString = string; ``` +## [type-alias-undefined](./test/programs/type-alias-undefined) + +```ts +export type MyUndefined = undefined; +``` + + ## [type-aliases](./test/programs/type-aliases) ```ts @@ -1656,6 +1863,13 @@ export type MyTuple = [string, number, boolean?]; ``` +## [type-aliases-tuple-with-names](./test/programs/type-aliases-tuple-with-names) + +```ts +export type MyTuple = [a: string, b: 123, c?: boolean, ...d: number[]]; +``` + + ## [type-aliases-tuple-with-rest-element](./test/programs/type-aliases-tuple-with-rest-element) ```ts @@ -1764,8 +1978,37 @@ interface ChildFoo { } interface Foo { - readonly childFoos: Foo & ChildFoo; + readonly childFoos: Foo | ChildFoo; +} +``` + + +## [type-intersection-recursive-no-additional](./test/programs/type-intersection-recursive-no-additional) + +```ts +type MyRecursiveNode = { + next?: MyNode; } + +type MyNode = { + val: string; +} & MyRecursiveNode; + +type MyLinkedList = MyNode; +``` + + +## [type-literals](./test/programs/type-literals) + +```ts +type MyObject = { + param1: "1" | "2" | "3"; + param2: "1" | "2" | 3 | true; + /** @enum {string} */ + param3: "1" | "2" | "3"; + /** @enum {unknown} */ + param4: "1" | "2" | 3 | true; +}; ``` @@ -1894,6 +2137,34 @@ interface MyObject { ``` +## [type-union-strict-null-keep-description](./test/programs/type-union-strict-null-keep-description) + +```ts +/** + * Description of InnerObject. + */ +type InnerObject = { + /** + * Description of foo. + */ + foo: string; +}; + +/** + * Description of MyObject. + */ +type MyObject = { + + inner1?: InnerObject; + + /** + * Override description. + */ + inner2?: InnerObject; +}; +``` + + ## [type-union-tagged](./test/programs/type-union-tagged) ```ts @@ -1927,6 +2198,16 @@ interface MyObject { ``` +## [undefined-property](./test/programs/undefined-property) + +```ts +export type MyObject = { + a: string; + b: undefined; +}; +``` + + ## [unique-names](./test/programs/unique-names) ```ts diff --git a/package.json b/package.json index 8d306538..9604b5ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typescript-json-schema", - "version": "0.55.0", + "version": "0.68.0", "description": "typescript-json-schema generates JSON Schema files from your Typescript sources", "main": "dist/typescript-json-schema.js", "typings": "dist/typescript-json-schema.d.ts", @@ -41,25 +41,24 @@ "schema" ], "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/node": "^16.9.2", - "glob": "^7.1.7", - "path-equal": "^1.1.2", - "safe-stable-stringify": "^2.2.0", - "ts-node": "^10.9.1", - "typescript": "~4.8.2", - "yargs": "^17.1.1" + "@types/json-schema": "^7.0.15", + "@types/node": "^24.10.2", + "glob": "^13.0.6", + "path-equal": "^1.2.5", + "safe-stable-stringify": "^2.5.0", + "ts-node": "^10.9.2", + "typescript": "~5.9.3", + "yargs": "^18.0.0" }, "devDependencies": { - "@types/chai": "^4.2.21", - "@types/glob": "^7.1.4", - "@types/mocha": "^9.0.0", - "ajv": "^8.6.3", - "ajv-formats": "^2.1.1", - "chai": "^4.3.4", - "mocha": "^9.1.3", - "prettier": "^2.4.1", - "source-map-support": "^0.5.20", + "@types/chai": "^5.2.3", + "@types/mocha": "^10.0.10", + "ajv": "^8.20.0", + "ajv-formats": "^3.0.1", + "chai": "^6.2.2", + "mocha": "^11.7.5", + "prettier": "^3.8.3", + "source-map-support": "^0.5.21", "tslint": "^6.1.3" }, "scripts": { diff --git a/test/programs/abstract-class/schema.json b/test/programs/abstract-class/schema.json index 89da901f..7f2e4873 100644 --- a/test/programs/abstract-class/schema.json +++ b/test/programs/abstract-class/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/abstract-extends/schema.json b/test/programs/abstract-extends/schema.json index ae4c6d86..f2169ce0 100644 --- a/test/programs/abstract-extends/schema.json +++ b/test/programs/abstract-extends/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/annotation-default/schema.json b/test/programs/annotation-default/schema.json index 54ad958a..e227243a 100644 --- a/test/programs/annotation-default/schema.json +++ b/test/programs/annotation-default/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "varBoolean": { "default": true, diff --git a/test/programs/annotation-id/schema.json b/test/programs/annotation-id/schema.json index a37577c9..80b4eb0d 100644 --- a/test/programs/annotation-id/schema.json +++ b/test/programs/annotation-id/schema.json @@ -1,9 +1,11 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MySubObject": { "$id": "filled#", "type": "object", + "additionalProperties": false, "properties": { "a": { "type": "boolean" } }, diff --git a/test/programs/annotation-items/schema.json b/test/programs/annotation-items/schema.json index 316b2f34..e84ac158 100644 --- a/test/programs/annotation-items/schema.json +++ b/test/programs/annotation-items/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "a": { "items": { diff --git a/test/programs/annotation-ref/schema.json b/test/programs/annotation-ref/schema.json index c2651a34..6f4395bb 100644 --- a/test/programs/annotation-ref/schema.json +++ b/test/programs/annotation-ref/schema.json @@ -2,9 +2,11 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "MySubObject": { + "additionalProperties": false, "type": "object" } }, + "additionalProperties": false, "properties": { "externalRef": { "$ref": "http://my-schema.org" diff --git a/test/programs/annotation-required/schema.json b/test/programs/annotation-required/schema.json index ca051b8e..c8c4f2c8 100644 --- a/test/programs/annotation-required/schema.json +++ b/test/programs/annotation-required/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyDefaultObject": { + "additionalProperties": false, "properties": { "age": { "type": "number" @@ -17,6 +19,7 @@ "type": "object" }, "MySubObject": { + "additionalProperties": false, "properties": { "bool": { "type": "boolean" @@ -46,6 +49,7 @@ "type": "object" }, "MySubObject2": { + "additionalProperties": false, "properties": { "bool": { "type": "boolean" diff --git a/test/programs/annotation-title/main.ts b/test/programs/annotation-title/main.ts index af7b9d50..5a3f51f3 100644 --- a/test/programs/annotation-title/main.ts +++ b/test/programs/annotation-title/main.ts @@ -5,11 +5,18 @@ interface MySubObject { a: boolean; } +interface AnotherSubObject { + b: boolean; +} + interface MyObject { /** * @title empty# */ empty; - + /** + * @title filled + */ filled: MySubObject; + nonTitled: AnotherSubObject; } diff --git a/test/programs/annotation-title/schema.json b/test/programs/annotation-title/schema.json index 7d11b17b..d2b09ede 100644 --- a/test/programs/annotation-title/schema.json +++ b/test/programs/annotation-title/schema.json @@ -1,7 +1,19 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { + "AnotherSubObject": { + "additionalProperties": false, + "properties": { + "b": { + "type": "boolean" + } + }, + "required": ["b"], + "type": "object" + }, "MySubObject": { + "additionalProperties": false, "title": "filled#", "type": "object", "properties": { @@ -15,9 +27,13 @@ "title": "empty#" }, "filled": { - "$ref": "#/definitions/MySubObject" + "$ref": "#/definitions/MySubObject", + "title": "filled" + }, + "nonTitled": { + "$ref": "#/definitions/AnotherSubObject" } }, - "required": ["empty", "filled"], + "required": ["empty", "filled", "nonTitled"], "type": "object" } diff --git a/test/programs/annotation-tjs/schema.json b/test/programs/annotation-tjs/schema.json index 1ba52f39..477f8bd1 100644 --- a/test/programs/annotation-tjs/schema.json +++ b/test/programs/annotation-tjs/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "dateTime": { "format": "date-time", diff --git a/test/programs/any-unknown/schema.json b/test/programs/any-unknown/schema.json index c7088cd0..039760e1 100644 --- a/test/programs/any-unknown/schema.json +++ b/test/programs/any-unknown/schema.json @@ -1,5 +1,6 @@ { "type": "object", + "additionalProperties": false, "properties": { "a": {}, "b": {} diff --git a/test/programs/argument-id/schema.MyObject.json b/test/programs/argument-id/schema.MyObject.json index c16a13bb..582222ec 100644 --- a/test/programs/argument-id/schema.MyObject.json +++ b/test/programs/argument-id/schema.MyObject.json @@ -1,13 +1,13 @@ { "$id": "someSchemaId", "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "ReferenceType": { + "additionalProperties": false, "properties": { "reference": { - "enum": [ - true - ], + "const": true, "type": "boolean" } }, diff --git a/test/programs/array-and-description/schema.json b/test/programs/array-and-description/schema.json index f9be6bcf..14126456 100644 --- a/test/programs/array-and-description/schema.json +++ b/test/programs/array-and-description/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "description": { "type": "string" diff --git a/test/programs/builtin-names/schema.json b/test/programs/builtin-names/schema.json index 9c411a59..c19f242d 100644 --- a/test/programs/builtin-names/schema.json +++ b/test/programs/builtin-names/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Ext.Array": { + "additionalProperties": false, "type": "object" } }, diff --git a/test/programs/class-extends/schema.json b/test/programs/class-extends/schema.json index 4b9184fd..678701b9 100644 --- a/test/programs/class-extends/schema.json +++ b/test/programs/class-extends/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/class-single/schema.json b/test/programs/class-single/schema.json index 4b9184fd..678701b9 100644 --- a/test/programs/class-single/schema.json +++ b/test/programs/class-single/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/comments-comment/main.ts b/test/programs/comments-comment/main.ts new file mode 100644 index 00000000..35bd19a0 --- /dev/null +++ b/test/programs/comments-comment/main.ts @@ -0,0 +1,9 @@ +/** + * @$comment Object comment + */ +interface MyObject { + /** + * @$comment Property comment + */ + text: string; +} diff --git a/test/programs/comments-comment/schema.json b/test/programs/comments-comment/schema.json new file mode 100644 index 00000000..e6062458 --- /dev/null +++ b/test/programs/comments-comment/schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "$comment": "Object comment", + "properties": { + "text": { + "$comment": "Property comment", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" +} + diff --git a/test/programs/comments-from-lib/schema.json b/test/programs/comments-from-lib/schema.json index 2457b93c..ca5a9e8b 100644 --- a/test/programs/comments-from-lib/schema.json +++ b/test/programs/comments-from-lib/schema.json @@ -1,5 +1,6 @@ { "description": "Use this comment", + "additionalProperties": false, "type": "object", "properties": { "prop1": { diff --git a/test/programs/comments-imports/schema.json b/test/programs/comments-imports/schema.json index ebc25fad..aefa171e 100644 --- a/test/programs/comments-imports/schema.json +++ b/test/programs/comments-imports/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Color": { "description": "Description of Color.", @@ -7,6 +8,7 @@ "type": "string" }, "Text": { + "additionalProperties": false, "description": "Description of Text interface.", "properties": { "color": { diff --git a/test/programs/comments-inline-tags/schema.json b/test/programs/comments-inline-tags/schema.json index 5f72287f..38307a55 100644 --- a/test/programs/comments-inline-tags/schema.json +++ b/test/programs/comments-inline-tags/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "description": "This is MyObject. It extends {@link MyOtherObject} and {@link SomeOtherObject}.", "properties": { "prop1": { diff --git a/test/programs/comments-override/schema.json b/test/programs/comments-override/schema.json index 0629719c..360ce985 100644 --- a/test/programs/comments-override/schema.json +++ b/test/programs/comments-override/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MySubObject": { "additionalProperties": true, diff --git a/test/programs/comments/schema.json b/test/programs/comments/schema.json index febac880..302df4b6 100644 --- a/test/programs/comments/schema.json +++ b/test/programs/comments/schema.json @@ -19,6 +19,7 @@ "type": "array" }, "rotation": { + "additionalProperties": false, "description": "Description of rotation, a field with an anonymous type", "properties": { "yaw": { diff --git a/test/programs/const-as-enum/main.ts b/test/programs/const-as-enum/main.ts new file mode 100644 index 00000000..fd13ce55 --- /dev/null +++ b/test/programs/const-as-enum/main.ts @@ -0,0 +1,3 @@ +export interface MyObject { + reference: true; +} diff --git a/test/programs/const-as-enum/schema.json b/test/programs/const-as-enum/schema.json new file mode 100644 index 00000000..061c10c0 --- /dev/null +++ b/test/programs/const-as-enum/schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "reference": { + "enum": [ + true + ], + "type": "boolean" + } + }, + "required": [ + "reference" + ], + "type": "object" +} diff --git a/test/programs/const-keyword/main.ts b/test/programs/const-keyword/main.ts new file mode 100644 index 00000000..11087d3d --- /dev/null +++ b/test/programs/const-keyword/main.ts @@ -0,0 +1,4 @@ +const fn = (value: T) => + ({ value }); + +export type Object = ReturnType>; diff --git a/test/programs/const-keyword/schema.json b/test/programs/const-keyword/schema.json new file mode 100644 index 00000000..c2a28b7c --- /dev/null +++ b/test/programs/const-keyword/schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "value": { + "const": "value", + "type": "string" + } + }, + "required": ["value"], + "type": "object" +} + diff --git a/test/programs/custom-dates/schema.json b/test/programs/custom-dates/schema.json index 6da75ebc..07e4d266 100644 --- a/test/programs/custom-dates/schema.json +++ b/test/programs/custom-dates/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "foo.Date": { + "additionalProperties": false, "properties": { "day": { "type": "number" diff --git a/test/programs/dates/schema.json b/test/programs/dates/schema.json index fd6a408c..5ba132fb 100644 --- a/test/programs/dates/schema.json +++ b/test/programs/dates/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "var1": { "format": "date-time", diff --git a/test/programs/default-properties-initializer/main.ts b/test/programs/default-properties-initializer/main.ts new file mode 100644 index 00000000..88049ca5 --- /dev/null +++ b/test/programs/default-properties-initializer/main.ts @@ -0,0 +1,11 @@ +export class MyObject { + varString: string = "foo"; + varSingleQuoted: string = 'bar'; + varNumber: number = 123; + varFloat: number = 3.21; + varNegative: number = -5; + varBoolean: boolean = true; + varNull: null = null; + varArray: number[] = [1, 2, 3]; + varStringArray: string[] = ["a", "b"]; +} diff --git a/test/programs/default-properties-initializer/schema.json b/test/programs/default-properties-initializer/schema.json new file mode 100644 index 00000000..41df6430 --- /dev/null +++ b/test/programs/default-properties-initializer/schema.json @@ -0,0 +1,67 @@ +{ + "type": "object", + "properties": { + "varString": { + "type": "string", + "default": "foo" + }, + "varSingleQuoted": { + "type": "string", + "default": "bar" + }, + "varNumber": { + "type": "number", + "default": 123 + }, + "varFloat": { + "type": "number", + "default": 3.21 + }, + "varNegative": { + "type": "number", + "default": -5 + }, + "varBoolean": { + "type": "boolean", + "default": true + }, + "varNull": { + "type": "null", + "default": null + }, + "varArray": { + "type": "array", + "items": { + "type": "number" + }, + "default": [ + 1, + 2, + 3 + ] + }, + "varStringArray": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "a", + "b" + ] + } + }, + "additionalProperties": false, + "required": [ + "varArray", + "varBoolean", + "varFloat", + "varNegative", + "varNull", + "varNumber", + "varSingleQuoted", + "varString", + "varStringArray" + ], + "$schema": "http://json-schema.org/draft-07/schema#" +} diff --git a/test/programs/default-properties/schema.json b/test/programs/default-properties/schema.json index ebf855d3..17169a8d 100644 --- a/test/programs/default-properties/schema.json +++ b/test/programs/default-properties/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Foo": { "anyOf": [ diff --git a/test/programs/enums-compiled-compute/schema.json b/test/programs/enums-compiled-compute/schema.json index 3217bf03..5e9df0b4 100644 --- a/test/programs/enums-compiled-compute/schema.json +++ b/test/programs/enums-compiled-compute/schema.json @@ -1,10 +1,10 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "enum": [ - 1, 2, 4, - 6 + 6, + 1 ], "type": "number" } diff --git a/test/programs/enums-mixed/schema.json b/test/programs/enums-mixed/schema.json index 110931a4..3b91d6a3 100644 --- a/test/programs/enums-mixed/schema.json +++ b/test/programs/enums-mixed/schema.json @@ -1,13 +1,14 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Enum": { "enum": [ 0, 1, - null, + true, "str", - true + null ], "type": [ "number", diff --git a/test/programs/enums-number-initialized/schema.json b/test/programs/enums-number-initialized/schema.json index 480b2df6..01c66c33 100644 --- a/test/programs/enums-number-initialized/schema.json +++ b/test/programs/enums-number-initialized/schema.json @@ -1,10 +1,10 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "enum": [ - 1, 10, 11, - 12 + 12, + 1 ], "type": "number" } diff --git a/test/programs/enums-number/schema.json b/test/programs/enums-number/schema.json index 5f203b67..0f43dc0b 100644 --- a/test/programs/enums-number/schema.json +++ b/test/programs/enums-number/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Enum": { "enum": [ diff --git a/test/programs/enums-string/schema.json b/test/programs/enums-string/schema.json index 3944cfe8..1f7e1e67 100644 --- a/test/programs/enums-string/schema.json +++ b/test/programs/enums-string/schema.json @@ -1,11 +1,12 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Enum": { "enum": [ - "123", "x", - "y" + "y", + "123" ], "type": "string" } diff --git a/test/programs/enums-value-in-interface/schema.json b/test/programs/enums-value-in-interface/schema.json index 040e3919..6bf5f6b6 100644 --- a/test/programs/enums-value-in-interface/schema.json +++ b/test/programs/enums-value-in-interface/schema.json @@ -1,10 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "A.B": { - "enum": [ - 0 - ], + "const": 0, "type": "number" } }, diff --git a/test/programs/force-type-imported/schema.json b/test/programs/force-type-imported/schema.json index 79e831f7..eaa6e6c9 100644 --- a/test/programs/force-type-imported/schema.json +++ b/test/programs/force-type-imported/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Widget": { "type": "number" diff --git a/test/programs/force-type/schema.json b/test/programs/force-type/schema.json index 79e831f7..eaa6e6c9 100644 --- a/test/programs/force-type/schema.json +++ b/test/programs/force-type/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Widget": { "type": "number" diff --git a/test/programs/generate-all-types/schema.json b/test/programs/generate-all-types/schema.json index 0bdd50da..80abeced 100644 --- a/test/programs/generate-all-types/schema.json +++ b/test/programs/generate-all-types/schema.json @@ -2,15 +2,15 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "MyEnum": { - "enum": [ - 0 - ], + "const": 0, "type": "number" }, "MyInterface": { + "additionalProperties": false, "type": "object" }, "MyObject": { + "additionalProperties": false, "type": "object" } } diff --git a/test/programs/generic-anonymous/schema.json b/test/programs/generic-anonymous/schema.json index ebf99735..578582b9 100644 --- a/test/programs/generic-anonymous/schema.json +++ b/test/programs/generic-anonymous/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyGeneric": { + "additionalProperties": false, "properties": { "a": { "type": "number" @@ -17,6 +19,7 @@ "type": "object" }, "MyGeneric": { + "additionalProperties": false, "properties": { "a": { "type": "string" @@ -34,10 +37,10 @@ }, "properties": { "value1": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cstring%2Cnumber%3E" }, "value2": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cnumber%2Cstring%3E" } }, "required": [ diff --git a/test/programs/generic-arrays/schema.json b/test/programs/generic-arrays/schema.json index a023dfa3..36175fe1 100644 --- a/test/programs/generic-arrays/schema.json +++ b/test/programs/generic-arrays/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "numberArray": { "items": { diff --git a/test/programs/generic-multiargs/schema.json b/test/programs/generic-multiargs/schema.json index ebf99735..578582b9 100644 --- a/test/programs/generic-multiargs/schema.json +++ b/test/programs/generic-multiargs/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyGeneric": { + "additionalProperties": false, "properties": { "a": { "type": "number" @@ -17,6 +19,7 @@ "type": "object" }, "MyGeneric": { + "additionalProperties": false, "properties": { "a": { "type": "string" @@ -34,10 +37,10 @@ }, "properties": { "value1": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cstring%2Cnumber%3E" }, "value2": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cnumber%2Cstring%3E" } }, "required": [ diff --git a/test/programs/generic-multiple/schema.json b/test/programs/generic-multiple/schema.json index 8c85ce6f..34ac33d9 100644 --- a/test/programs/generic-multiple/schema.json +++ b/test/programs/generic-multiple/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyGeneric": { + "additionalProperties": false, "properties": { "field": { "type": "number" @@ -13,6 +15,7 @@ "type": "object" }, "MyGeneric": { + "additionalProperties": false, "properties": { "field": { "type": "string" @@ -26,10 +29,10 @@ }, "properties": { "value1": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cnumber%3E" }, "value2": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cstring%3E" } }, "required": [ diff --git a/test/programs/generic-recursive/schema.json b/test/programs/generic-recursive/schema.json index e27af0fd..3fc50458 100644 --- a/test/programs/generic-recursive/schema.json +++ b/test/programs/generic-recursive/schema.json @@ -3,9 +3,10 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "MyGeneric": { + "additionalProperties": false, "properties": { "field": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cstring%2Cnumber%3E" } }, "required": [ @@ -14,9 +15,10 @@ "type": "object" }, "MyGeneric": { + "additionalProperties": false, "properties": { "field": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cnumber%2Cstring%3E" } }, "required": [ @@ -25,9 +27,10 @@ "type": "object" }, "MyObject": { + "additionalProperties": false, "properties": { "value": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cstring%2Cnumber%3E" } }, "required": [ diff --git a/test/programs/generic-simple/schema.json b/test/programs/generic-simple/schema.json index 1fbdd571..e568f81d 100644 --- a/test/programs/generic-simple/schema.json +++ b/test/programs/generic-simple/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyGeneric": { + "additionalProperties": false, "properties": { "field": { "type": "number" @@ -15,7 +17,7 @@ }, "properties": { "value": { - "$ref": "#/definitions/MyGeneric" + "$ref": "#/definitions/MyGeneric%3Cnumber%3E" } }, "required": [ diff --git a/test/programs/ignored-required/schema.json b/test/programs/ignored-required/schema.json index 56b76ccd..0b176931 100644 --- a/test/programs/ignored-required/schema.json +++ b/test/programs/ignored-required/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "required": { "type": "boolean" diff --git a/test/programs/imports/schema.json b/test/programs/imports/schema.json index da58b264..d9f420ab 100644 --- a/test/programs/imports/schema.json +++ b/test/programs/imports/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyInterface": { + "additionalProperties": false, "properties": { "fieldInMain": { "type": "number" @@ -13,6 +15,7 @@ "type": "object" }, "MyInterface_1": { + "additionalProperties": false, "properties": { "fieldInModule1": { "type": "string" @@ -24,6 +27,7 @@ "type": "object" }, "MyInterface_2": { + "additionalProperties": false, "properties": { "fieldInModule2": { "type": "number" diff --git a/test/programs/interface-extends/schema.json b/test/programs/interface-extends/schema.json index 4b9184fd..678701b9 100644 --- a/test/programs/interface-extends/schema.json +++ b/test/programs/interface-extends/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/interface-multi/schema.json b/test/programs/interface-multi/schema.json index dbd7a28f..55265205 100644 --- a/test/programs/interface-multi/schema.json +++ b/test/programs/interface-multi/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MySubObject": { + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/interface-recursion/schema.json b/test/programs/interface-recursion/schema.json index 4744b0b7..8c959407 100644 --- a/test/programs/interface-recursion/schema.json +++ b/test/programs/interface-recursion/schema.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "MyObject": { + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/interface-single/schema.json b/test/programs/interface-single/schema.json index 4b9184fd..678701b9 100644 --- a/test/programs/interface-single/schema.json +++ b/test/programs/interface-single/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/key-in-key-of-multi-underscores/main.ts b/test/programs/key-in-key-of-multi-underscores/main.ts new file mode 100644 index 00000000..5493a989 --- /dev/null +++ b/test/programs/key-in-key-of-multi-underscores/main.ts @@ -0,0 +1,17 @@ +type Util = { + __2Underscores: { + utilDeepKey2: string; + }; + ___3Underscores: { + utilDeepKey3: string; + }; + ____4Underscores: { + utilDeepKey4: string; + }; +}; + +export type Main = { + [Key in keyof Util]: { + [key: string]: Util[Key]; + }; +}; diff --git a/test/programs/key-in-key-of-multi-underscores/schema.json b/test/programs/key-in-key-of-multi-underscores/schema.json new file mode 100644 index 00000000..56f59c79 --- /dev/null +++ b/test/programs/key-in-key-of-multi-underscores/schema.json @@ -0,0 +1,57 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "__2Underscores": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "utilDeepKey2": { + "type": "string" + } + }, + "required": [ + "utilDeepKey2" + ], + "type": "object" + }, + "type": "object" + }, + "___3Underscores": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "utilDeepKey3": { + "type": "string" + } + }, + "required": [ + "utilDeepKey3" + ], + "type": "object" + }, + "type": "object" + }, + "____4Underscores": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "utilDeepKey4": { + "type": "string" + } + }, + "required": [ + "utilDeepKey4" + ], + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "__2Underscores", + "___3Underscores", + "____4Underscores" + ], + "type": "object" +} diff --git a/test/programs/key-in-key-of-multi/main.ts b/test/programs/key-in-key-of-multi/main.ts new file mode 100644 index 00000000..a9b5a98a --- /dev/null +++ b/test/programs/key-in-key-of-multi/main.ts @@ -0,0 +1,16 @@ +type Util = { + utilKey1: { + utilDeepKey11: string; + utilDeepKey12: number; + }; + utilKey2: { + utilDeepKey21: boolean; + utilDeepKey22: null; + }; +}; + +export type Main = { + [Key in keyof Util]: { + [key: string]: Util[Key]; + }; +}; diff --git a/test/programs/key-in-key-of-multi/schema.json b/test/programs/key-in-key-of-multi/schema.json new file mode 100644 index 00000000..6a9a0235 --- /dev/null +++ b/test/programs/key-in-key-of-multi/schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "utilKey1": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "utilDeepKey11": { + "type": "string" + }, + "utilDeepKey12": { + "type": "number" + } + }, + "required": [ + "utilDeepKey11", + "utilDeepKey12" + ], + "type": "object" + }, + "type": "object" + }, + "utilKey2": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "utilDeepKey21": { + "type": "boolean" + }, + "utilDeepKey22": { + "type": "null" + } + }, + "required": [ + "utilDeepKey21", + "utilDeepKey22" + ], + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "utilKey1", + "utilKey2" + ], + "type": "object" +} + diff --git a/test/programs/key-in-key-of-single/main.ts b/test/programs/key-in-key-of-single/main.ts new file mode 100644 index 00000000..6bae4b61 --- /dev/null +++ b/test/programs/key-in-key-of-single/main.ts @@ -0,0 +1,11 @@ +type Util = { + utilKey: { + utilDeepKey: string; + }; +}; + +export type Main = { + [Key in keyof Util]: { + [key: string]: Util[Key]; + }; +}; diff --git a/test/programs/key-in-key-of-single/schema.json b/test/programs/key-in-key-of-single/schema.json new file mode 100644 index 00000000..40e2690a --- /dev/null +++ b/test/programs/key-in-key-of-single/schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "type": "object", + "properties": { + "utilKey": { + "type": "object", + "additionalProperties": { + "additionalProperties": false, + "type": "object", + "properties": { + "utilDeepKey": { + "type": "string" + } + }, + "required": [ + "utilDeepKey" + ] + } + } + }, + "required": [ + "utilKey" + ] +} \ No newline at end of file diff --git a/test/programs/map-types/schema.json b/test/programs/map-types/schema.json index 605e1387..444c375d 100644 --- a/test/programs/map-types/schema.json +++ b/test/programs/map-types/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyMap1": { "additionalProperties": { @@ -18,6 +19,7 @@ "type": "object" }, "MyType": { + "additionalProperties": false, "type": "object" } }, diff --git a/test/programs/module-interface-single/schema.json b/test/programs/module-interface-single/schema.json index 4b9184fd..678701b9 100644 --- a/test/programs/module-interface-single/schema.json +++ b/test/programs/module-interface-single/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "propA": { "type": "number" diff --git a/test/programs/namespace-deep-1/schema.json b/test/programs/namespace-deep-1/schema.json index 4104b30c..8309af76 100644 --- a/test/programs/namespace-deep-1/schema.json +++ b/test/programs/namespace-deep-1/schema.json @@ -3,6 +3,7 @@ "$ref": "#/definitions/RootNamespace.Def", "definitions": { "RootNamespace.Def": { + "additionalProperties": false, "properties": { "nest": { "$ref": "#/definitions/RootNamespace.Def" @@ -26,6 +27,7 @@ "type": "object" }, "RootNamespace.SubNamespace.HelperA": { + "additionalProperties": false, "properties": { "propA": { "type": "number" @@ -41,6 +43,7 @@ "type": "object" }, "RootNamespace.SubNamespace.HelperB": { + "additionalProperties": false, "properties": { "propA": { "$ref": "#/definitions/RootNamespace.SubNamespace.HelperA" diff --git a/test/programs/namespace-deep-2/schema.json b/test/programs/namespace-deep-2/schema.json index 1aa5d97e..0684e257 100644 --- a/test/programs/namespace-deep-2/schema.json +++ b/test/programs/namespace-deep-2/schema.json @@ -3,6 +3,7 @@ "$ref": "#/definitions/RootNamespace.SubNamespace.HelperA", "definitions": { "RootNamespace.Def": { + "additionalProperties": false, "properties": { "nest": { "$ref": "#/definitions/RootNamespace.Def" @@ -26,6 +27,7 @@ "type": "object" }, "RootNamespace.SubNamespace.HelperA": { + "additionalProperties": false, "properties": { "propA": { "type": "number" @@ -41,6 +43,7 @@ "type": "object" }, "RootNamespace.SubNamespace.HelperB": { + "additionalProperties": false, "properties": { "propA": { "$ref": "#/definitions/RootNamespace.SubNamespace.HelperA" diff --git a/test/programs/never/schema.json b/test/programs/never/schema.json index 25667e53..e13cf6c8 100644 --- a/test/programs/never/schema.json +++ b/test/programs/never/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "propA": { "type": "string" diff --git a/test/programs/no-ref/main.ts b/test/programs/no-ref/main.ts new file mode 100644 index 00000000..ee048861 --- /dev/null +++ b/test/programs/no-ref/main.ts @@ -0,0 +1,9 @@ +type MySubType = { + id: string; +}; + +export type MyModule = { + address: MySubType & { extraProp: number }; + address2: MySubType; + address3: MySubType; +}; diff --git a/test/programs/no-ref/schema.json b/test/programs/no-ref/schema.json new file mode 100644 index 00000000..ce7e65c0 --- /dev/null +++ b/test/programs/no-ref/schema.json @@ -0,0 +1,41 @@ +{ + "type": "object", + "properties": { + "address": { + "additionalProperties": false, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extraProp": { + "type": "number" + } + }, + "required": ["extraProp", "id"] + }, + "address2": { + "additionalProperties": false, + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"] + }, + "address3": { + "additionalProperties": false, + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "additionalProperties": false, + "required": ["address", "address2", "address3"], + "$schema": "http://json-schema.org/draft-07/schema#" +} diff --git a/test/programs/no-unrelated-definitions/schema.MyOtherObjectWithOverride.json b/test/programs/no-unrelated-definitions/schema.MyOtherObjectWithOverride.json new file mode 100644 index 00000000..a4aa2220 --- /dev/null +++ b/test/programs/no-unrelated-definitions/schema.MyOtherObjectWithOverride.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "SomeOtherDefinition": { + "type": "string" + } + }, + "properties": { + "sub": { + "$ref": "#/definitions/SomeOtherDefinition" + } + }, + "type": "object" +} diff --git a/test/programs/no-unrelated-definitions/schema.program.json b/test/programs/no-unrelated-definitions/schema.program.json new file mode 100644 index 00000000..4eb968c7 --- /dev/null +++ b/test/programs/no-unrelated-definitions/schema.program.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "MyObject": { + "properties": { + "sub": { + "$ref": "#/definitions/SomeDefinition" + } + }, + "type": "object" + }, + "MyOtherObject": { + "properties": { + "sub": { + "$ref": "#/definitions/SomeOtherDefinition" + } + }, + "type": "object" + }, + "SomeDefinition": { + "properties": { + "is": { + "type": "string" + } + }, + "type": "object" + }, + "SomeOtherDefinition": { + "properties": { + "is": { + "type": "string" + } + }, + "type": "object" + }, + "UnrelatedDefinition": { + "type": "string" + } + } +} diff --git a/test/programs/numeric-keys-and-others/main.ts b/test/programs/numeric-keys-and-others/main.ts new file mode 100644 index 00000000..d668aaad --- /dev/null +++ b/test/programs/numeric-keys-and-others/main.ts @@ -0,0 +1,5 @@ +interface NumericKeysAndOthers { + [key: number]: number; + a: string; + b: boolean; +} diff --git a/test/programs/numeric-keys-and-others/schema.json b/test/programs/numeric-keys-and-others/schema.json new file mode 100644 index 00000000..96b0c0a3 --- /dev/null +++ b/test/programs/numeric-keys-and-others/schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "number" + } + }, + "properties": { + "a": { + "type": "string" + }, + "b": { + "type": "boolean" + } + }, + "required": [ + "a", + "b" + ], + "type": "object" +} \ No newline at end of file diff --git a/test/programs/object-numeric-index-as-property/schema.json b/test/programs/object-numeric-index-as-property/schema.json index 490013d2..24962da0 100644 --- a/test/programs/object-numeric-index-as-property/schema.json +++ b/test/programs/object-numeric-index-as-property/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "objAnonymous": { "additionalProperties": false, diff --git a/test/programs/optionals-derived/schema.json b/test/programs/optionals-derived/schema.json index 85d076c3..b795054d 100644 --- a/test/programs/optionals-derived/schema.json +++ b/test/programs/optionals-derived/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "type": "object", "required": [ "baseRequired", "derivedRequired" ], "properties": { diff --git a/test/programs/optionals/schema.json b/test/programs/optionals/schema.json index 2d82cce9..d6dd1c89 100644 --- a/test/programs/optionals/schema.json +++ b/test/programs/optionals/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "optional": { "type": "number" diff --git a/test/programs/private-members/schema.json b/test/programs/private-members/schema.json index d25393ed..2c0c5235 100644 --- a/test/programs/private-members/schema.json +++ b/test/programs/private-members/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "publicMember": { "type": "string" diff --git a/test/programs/prop-override/schema.json b/test/programs/prop-override/schema.json index fd604067..fc5b7be6 100644 --- a/test/programs/prop-override/schema.json +++ b/test/programs/prop-override/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "_id": { "description": "Overrides aliased type definition with this JSDoc if at least TJS-type annotation is present", diff --git a/test/programs/satisfies-keyword/main.ts b/test/programs/satisfies-keyword/main.ts new file mode 100644 index 00000000..bf8029f3 --- /dev/null +++ b/test/programs/satisfies-keyword/main.ts @@ -0,0 +1,14 @@ +interface Basic { + a: string; + b: number; + c: boolean; +} + +const myObject = { + a: "a" as const, + b: 1 as const, + c: true as const, +// tslint:disable-next-line:variable-name +} satisfies Basic; + +export type Specific = typeof myObject; diff --git a/test/programs/satisfies-keyword/schema.json b/test/programs/satisfies-keyword/schema.json new file mode 100644 index 00000000..77121303 --- /dev/null +++ b/test/programs/satisfies-keyword/schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "a": { + "const": "a", + "type": "string" + }, + "b": { + "const": 1, + "type": "number" + }, + "c": { + "const": true, + "type": "boolean" + } + }, + "required": [ + "a", + "b", + "c" + ], + "type": "object" +} diff --git a/test/programs/strict-null-checks/schema.json b/test/programs/strict-null-checks/schema.json index 3d7ab469..6b9965b6 100644 --- a/test/programs/strict-null-checks/schema.json +++ b/test/programs/strict-null-checks/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "val": { "type": "number" @@ -14,23 +15,17 @@ "type": "number" }, "valTrue": { - "enum": [ - true - ], + "const": true, "type": "boolean" }, "valTrueOpt": { - "enum": [ - true - ], + "const": true, "type": "boolean" }, "valTrueOrNull": { "anyOf": [ { - "enum": [ - true - ], + "const": true, "type": "boolean" }, { diff --git a/test/programs/string-literals-inline/schema.json b/test/programs/string-literals-inline/schema.json index 809968bc..55c215f2 100644 --- a/test/programs/string-literals-inline/schema.json +++ b/test/programs/string-literals-inline/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "bar": { "type": "string" diff --git a/test/programs/string-literals/schema.json b/test/programs/string-literals/schema.json index 36f53123..de00a89d 100644 --- a/test/programs/string-literals/schema.json +++ b/test/programs/string-literals/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "result": { "enum": [ diff --git a/test/programs/string-template-literal/main.ts b/test/programs/string-template-literal/main.ts new file mode 100644 index 00000000..f554704e --- /dev/null +++ b/test/programs/string-template-literal/main.ts @@ -0,0 +1,12 @@ +interface MyObject { + a: `@${string}`, + b: `@${number}`, + c: `@${bigint}`, + d: `@${boolean}`, + e: `@${undefined}`, + f: `@${null}`, + g: `${string}@`, + h: `${number}@`, + i: `${string}@${number}`, + j: `${string}.${string}`, +} \ No newline at end of file diff --git a/test/programs/string-template-literal/schema.json b/test/programs/string-template-literal/schema.json new file mode 100644 index 00000000..cc1e1e08 --- /dev/null +++ b/test/programs/string-template-literal/schema.json @@ -0,0 +1,62 @@ +{ + "type": "object", + "properties": { + "a": { + "type": "string", + "pattern": "^@.*$" + }, + "b": { + "type": "string", + "pattern": "^@[0-9]*$" + }, + "c": { + "type": "string", + "pattern": "^@[0-9]*$" + }, + "d": { + "enum": [ + "@false", + "@true" + ], + "type": "string" + }, + "e": { + "type": "string", + "const": "@undefined" + }, + "f": { + "type": "string", + "const": "@null" + }, + "g": { + "type": "string", + "pattern": "^.*@$" + }, + "h": { + "type": "string", + "pattern": "^[0-9]*@$" + }, + "i": { + "type": "string", + "pattern": "^.*@[0-9]*$" + }, + "j": { + "type": "string", + "pattern": "^.*\\..*$" + } + }, + "additionalProperties": false, + "required": [ + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j" + ], + "$schema": "http://json-schema.org/draft-07/schema#" +} \ No newline at end of file diff --git a/test/programs/symbol/main.ts b/test/programs/symbol/main.ts new file mode 100644 index 00000000..cfc7904d --- /dev/null +++ b/test/programs/symbol/main.ts @@ -0,0 +1,3 @@ +export type MyObject = { + a: symbol; +}; diff --git a/test/programs/symbol/schema.json b/test/programs/symbol/schema.json new file mode 100644 index 00000000..c963eae3 --- /dev/null +++ b/test/programs/symbol/schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "type": "object", + "properties": { + "a": { + "type": "object" + } + }, + "required": [ + "a" + ] +} \ No newline at end of file diff --git a/test/programs/type-alias-never/main.ts b/test/programs/type-alias-never/main.ts new file mode 100644 index 00000000..38604b53 --- /dev/null +++ b/test/programs/type-alias-never/main.ts @@ -0,0 +1 @@ +export type MyNever = never; diff --git a/test/programs/type-alias-never/schema.json b/test/programs/type-alias-never/schema.json new file mode 100644 index 00000000..2481e112 --- /dev/null +++ b/test/programs/type-alias-never/schema.json @@ -0,0 +1 @@ +"Creating a schema for alias of never will fail" \ No newline at end of file diff --git a/test/programs/type-alias-or/schema.json b/test/programs/type-alias-or/schema.json index e021616e..0c901c29 100644 --- a/test/programs/type-alias-or/schema.json +++ b/test/programs/type-alias-or/schema.json @@ -1,10 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "A": { + "additionalProperties": false, "type": "object" }, "B": { + "additionalProperties": false, "type": "object" }, "C": { diff --git a/test/programs/type-alias-undefined/main.ts b/test/programs/type-alias-undefined/main.ts new file mode 100644 index 00000000..dba9eea5 --- /dev/null +++ b/test/programs/type-alias-undefined/main.ts @@ -0,0 +1 @@ +export type MyUndefined = undefined; diff --git a/test/programs/type-alias-undefined/schema.json b/test/programs/type-alias-undefined/schema.json new file mode 100644 index 00000000..102f279d --- /dev/null +++ b/test/programs/type-alias-undefined/schema.json @@ -0,0 +1 @@ +"Creating a schema for alias of undefined will fail" \ No newline at end of file diff --git a/test/programs/type-aliases-alias-ref/schema.json b/test/programs/type-aliases-alias-ref/schema.json index e100bbe8..b98e0ff6 100644 --- a/test/programs/type-aliases-alias-ref/schema.json +++ b/test/programs/type-aliases-alias-ref/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "prop": { "type": "number" diff --git a/test/programs/type-aliases-local-namsepace/schema.json b/test/programs/type-aliases-local-namsepace/schema.json index b99a5688..51e876dd 100644 --- a/test/programs/type-aliases-local-namsepace/schema.json +++ b/test/programs/type-aliases-local-namsepace/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "B.B": { + "additionalProperties": false, "properties": { "b": { } @@ -12,6 +14,7 @@ "type": "object" }, "C.C": { + "additionalProperties": false, "properties": { "c": { "$ref": "#/definitions/B.B" diff --git a/test/programs/type-aliases-multitype-array/schema.json b/test/programs/type-aliases-multitype-array/schema.json index ca5a1f7b..4eb71d6e 100644 --- a/test/programs/type-aliases-multitype-array/schema.json +++ b/test/programs/type-aliases-multitype-array/schema.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "MyObject": { + "additionalProperties": false, "properties": { "array": { "items": { diff --git a/test/programs/type-aliases-partial/schema.json b/test/programs/type-aliases-partial/schema.json index 798ddab5..b41bc0c0 100644 --- a/test/programs/type-aliases-partial/schema.json +++ b/test/programs/type-aliases-partial/schema.json @@ -1,5 +1,6 @@ { "type": "object", + "additionalProperties": false, "properties": { "foo": { "$ref": "#/definitions/Partial" @@ -14,6 +15,7 @@ ], "definitions": { "__type": { + "additionalProperties": false, "type": "object", "properties": { "x": { @@ -29,6 +31,7 @@ }, "__type_1": { "type": "object", + "additionalProperties": false, "properties": { "a": { "type": "number" diff --git a/test/programs/type-aliases-recursive-object-topref/schema.json b/test/programs/type-aliases-recursive-object-topref/schema.json index f3db0536..d11ace0c 100644 --- a/test/programs/type-aliases-recursive-object-topref/schema.json +++ b/test/programs/type-aliases-recursive-object-topref/schema.json @@ -6,6 +6,7 @@ "$ref": "#/definitions/MyObject" }, "MyObject": { + "additionalProperties": false, "properties": { "alias": { "$ref": "#/definitions/MyAlias" diff --git a/test/programs/type-aliases-tuple-with-names/main.ts b/test/programs/type-aliases-tuple-with-names/main.ts new file mode 100644 index 00000000..d594c52c --- /dev/null +++ b/test/programs/type-aliases-tuple-with-names/main.ts @@ -0,0 +1 @@ +export type MyTuple = [a: string, b: 123, c?: boolean, ...d: number[]]; diff --git a/test/programs/type-aliases-tuple-with-names/schema.json b/test/programs/type-aliases-tuple-with-names/schema.json new file mode 100644 index 00000000..e33e4866 --- /dev/null +++ b/test/programs/type-aliases-tuple-with-names/schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "items": [ + { + "title": "a", + "type": "string" + }, + { + "title": "b", + "type": "number", + "const": 123 + }, + { + "title": "c", + "type": "boolean" + } + ], + "minItems": 2, + "additionalItems": { + "title": "d", + "type": "number" + } +} diff --git a/test/programs/type-aliases-union-namespace/schema.json b/test/programs/type-aliases-union-namespace/schema.json index 1690f8b7..ee00df40 100644 --- a/test/programs/type-aliases-union-namespace/schema.json +++ b/test/programs/type-aliases-union-namespace/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "Cardinal": { "enum": [ diff --git a/test/programs/type-aliases/schema.json b/test/programs/type-aliases/schema.json index abd02bd6..da750719 100644 --- a/test/programs/type-aliases/schema.json +++ b/test/programs/type-aliases/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyAlias": { "$ref": "#/definitions/MySubObject", @@ -10,6 +11,7 @@ "type": "string" }, "MySubObject": { + "additionalProperties": false, "description": "My sub object", "properties": { "propA": { diff --git a/test/programs/type-anonymous/schema.json b/test/programs/type-anonymous/schema.json index 87c34470..da9e9668 100644 --- a/test/programs/type-anonymous/schema.json +++ b/test/programs/type-anonymous/schema.json @@ -1,7 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "FieldWithAnonType": { + "additionalProperties": false, "properties": { "SubfieldA": { "type": "number" @@ -13,6 +15,7 @@ ] }, "SubfieldC": { + "additionalProperties": false, "properties": { "SubsubfieldA": { "items": { diff --git a/test/programs/type-intersection-recursive-no-additional/main.ts b/test/programs/type-intersection-recursive-no-additional/main.ts new file mode 100644 index 00000000..73adb1e1 --- /dev/null +++ b/test/programs/type-intersection-recursive-no-additional/main.ts @@ -0,0 +1,9 @@ +type MyRecursiveNode = { + next?: MyNode; +} + +type MyNode = { + val: string; +} & MyRecursiveNode; + +type MyLinkedList = MyNode; \ No newline at end of file diff --git a/test/programs/type-intersection-recursive-no-additional/schema.json b/test/programs/type-intersection-recursive-no-additional/schema.json new file mode 100644 index 00000000..cecdca22 --- /dev/null +++ b/test/programs/type-intersection-recursive-no-additional/schema.json @@ -0,0 +1,21 @@ +{ + "$ref": "#/definitions/MyNode", + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "MyNode": { + "additionalProperties": false, + "properties": { + "next": { + "$ref": "#/definitions/MyNode" + }, + "val": { + "type": "string" + } + }, + "required": [ + "val" + ], + "type": "object" + } + } +} \ No newline at end of file diff --git a/test/programs/type-intersection-recursive/main.ts b/test/programs/type-intersection-recursive/main.ts index 138f3b57..a5c17469 100644 --- a/test/programs/type-intersection-recursive/main.ts +++ b/test/programs/type-intersection-recursive/main.ts @@ -2,5 +2,5 @@ interface ChildFoo { } interface Foo { - readonly childFoos: Foo & ChildFoo; + readonly childFoos: Foo | ChildFoo; } diff --git a/test/programs/type-intersection-recursive/schema.json b/test/programs/type-intersection-recursive/schema.json index a784da6c..aff6b55e 100644 --- a/test/programs/type-intersection-recursive/schema.json +++ b/test/programs/type-intersection-recursive/schema.json @@ -1,18 +1,21 @@ { + "$ref": "#/definitions/Foo", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "ChildFoo": { + "additionalProperties": false, "type": "object" }, "Foo": { + "additionalProperties": false, "properties": { "childFoos": { - "allOf": [ + "anyOf": [ { - "$ref": "#/definitions/Foo" + "$ref": "#/definitions/ChildFoo" }, { - "$ref": "#/definitions/ChildFoo" + "$ref": "#/definitions/Foo" } ] } diff --git a/test/programs/type-literals/main.ts b/test/programs/type-literals/main.ts new file mode 100644 index 00000000..4e3a3131 --- /dev/null +++ b/test/programs/type-literals/main.ts @@ -0,0 +1,8 @@ +type MyObject = { + param1: "1" | "2" | "3"; + param2: "1" | "2" | 3 | true; + /** @enum {string} */ + param3: "1" | "2" | "3"; + /** @enum {unknown} */ + param4: "1" | "2" | 3 | true; +}; diff --git a/test/programs/type-literals/schema.json b/test/programs/type-literals/schema.json new file mode 100644 index 00000000..ce97b1df --- /dev/null +++ b/test/programs/type-literals/schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "param1": { + "enum": ["1", "2", "3"], + "type": "string" + }, + "param2": { + "enum": ["1", "2", 3, true] + }, + "param3": { + "enum": ["1", "2", "3"], + "type": "string" + }, + "param4": { + "enum": ["1", "2", 3, true] + } + }, + "required": ["param1", "param2", "param3", "param4"], + "type": "object" +} diff --git a/test/programs/type-mapped-types/schema.json b/test/programs/type-mapped-types/schema.json index a29918f6..62ca7a4d 100644 --- a/test/programs/type-mapped-types/schema.json +++ b/test/programs/type-mapped-types/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "str1": { "type": "string" diff --git a/test/programs/type-no-aliases-recursive-topref/schema.json b/test/programs/type-no-aliases-recursive-topref/schema.json index 56159201..f86162cf 100644 --- a/test/programs/type-no-aliases-recursive-topref/schema.json +++ b/test/programs/type-no-aliases-recursive-topref/schema.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "MyObject": { + "additionalProperties": false, "properties": { "alias": { "$ref": "#/definitions/MyObject" diff --git a/test/programs/type-nullable/schema.json b/test/programs/type-nullable/schema.json index 988af06a..91036b03 100644 --- a/test/programs/type-nullable/schema.json +++ b/test/programs/type-nullable/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyType2": { "type": [ @@ -21,6 +22,7 @@ ] }, "MyType6": { + "additionalProperties": false, "type": "object" } }, @@ -72,6 +74,7 @@ "type": "number" } }, + "additionalProperties": false, "required": [ "foo" ], diff --git a/test/programs/type-primitives/schema.json b/test/programs/type-primitives/schema.json index ef6a8b40..dadd3a34 100644 --- a/test/programs/type-primitives/schema.json +++ b/test/programs/type-primitives/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "array1": { "default": null, diff --git a/test/programs/type-recursive/schema.json b/test/programs/type-recursive/schema.json index d2a59a30..ef024db2 100644 --- a/test/programs/type-recursive/schema.json +++ b/test/programs/type-recursive/schema.json @@ -3,6 +3,7 @@ "$ref": "#/definitions/TestChildren", "definitions": { "TestChild": { + "additionalProperties": false, "properties": { "type": { "type": "string" diff --git a/test/programs/type-union-strict-null-keep-description/main.ts b/test/programs/type-union-strict-null-keep-description/main.ts new file mode 100644 index 00000000..331be151 --- /dev/null +++ b/test/programs/type-union-strict-null-keep-description/main.ts @@ -0,0 +1,22 @@ +/** + * Description of InnerObject. + */ +type InnerObject = { + /** + * Description of foo. + */ + foo: string; +}; + +/** + * Description of MyObject. + */ +type MyObject = { + + inner1?: InnerObject; + + /** + * Override description. + */ + inner2?: InnerObject; +}; diff --git a/test/programs/type-union-strict-null-keep-description/schema.json b/test/programs/type-union-strict-null-keep-description/schema.json new file mode 100644 index 00000000..4758f995 --- /dev/null +++ b/test/programs/type-union-strict-null-keep-description/schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "description": "Description of MyObject.", + "properties": { + "inner1": { + "additionalProperties": false, + "description": "Description of InnerObject.", + "properties": { + "foo": { + "description": "Description of foo.", + "type": "string" + } + }, + "required": [ + "foo" + ], + "type": "object" + }, + "inner2": { + "additionalProperties": false, + "description": "Override description.", + "properties": { + "foo": { + "description": "Description of foo.", + "type": "string" + } + }, + "required": [ + "foo" + ], + "type": "object" + } + }, + "type": "object" +} + diff --git a/test/programs/type-union-tagged/schema.json b/test/programs/type-union-tagged/schema.json index 21829333..47ffa0b0 100644 --- a/test/programs/type-union-tagged/schema.json +++ b/test/programs/type-union-tagged/schema.json @@ -13,11 +13,10 @@ ], "definitions": { "Circle": { + "additionalProperties": false, "properties": { "kind": { - "enum": [ - "circle" - ], + "const": "circle", "type": "string" }, "radius": { @@ -31,14 +30,13 @@ "type": "object" }, "Rectangle": { + "additionalProperties": false, "properties": { "height": { "type": "number" }, "kind": { - "enum": [ - "rectangle" - ], + "const": "rectangle", "type": "string" }, "width": { @@ -53,11 +51,10 @@ "type": "object" }, "Square": { + "additionalProperties": false, "properties": { "kind": { - "enum": [ - "square" - ], + "const": "square", "type": "string" }, "size": { diff --git a/test/programs/type-union/schema.json b/test/programs/type-union/schema.json index b3ea47d8..6ea87de6 100644 --- a/test/programs/type-union/schema.json +++ b/test/programs/type-union/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "definitions": { "MyType1": { "type": [ diff --git a/test/programs/typeof-keyword/schema.json b/test/programs/typeof-keyword/schema.json index 40c55279..77b9eecf 100644 --- a/test/programs/typeof-keyword/schema.json +++ b/test/programs/typeof-keyword/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "foo": { "typeof": "function" diff --git a/test/programs/undefined-property/main.ts b/test/programs/undefined-property/main.ts new file mode 100644 index 00000000..2a684d7c --- /dev/null +++ b/test/programs/undefined-property/main.ts @@ -0,0 +1,4 @@ +export type MyObject = { + a: string; + b: undefined; +}; diff --git a/test/programs/undefined-property/schema.json b/test/programs/undefined-property/schema.json new file mode 100644 index 00000000..28db415d --- /dev/null +++ b/test/programs/undefined-property/schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "type": "object", + "properties": { + "a": { + "type": "string" + } + }, + "required": [ + "a" + ] +} \ No newline at end of file diff --git a/test/programs/unique-names-multiple-subdefinitions/schema.json b/test/programs/unique-names-multiple-subdefinitions/schema.json index 79b51025..e738adaa 100644 --- a/test/programs/unique-names-multiple-subdefinitions/schema.json +++ b/test/programs/unique-names-multiple-subdefinitions/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "sub": { "$ref": "#/definitions/SubObject.0eb4e9af" @@ -11,11 +12,10 @@ ], "definitions": { "SubObject.0eb4e9af": { + "additionalProperties": false, "properties": { "is": { - "enum": [ - "SubObject_1" - ], + "const": "SubObject_1", "type": "string" } }, diff --git a/test/programs/unique-names/schema.MyObject.f2191116.json b/test/programs/unique-names/schema.MyObject.f2191116.json index b177159e..cb63da87 100644 --- a/test/programs/unique-names/schema.MyObject.f2191116.json +++ b/test/programs/unique-names/schema.MyObject.f2191116.json @@ -1,11 +1,10 @@ { "type": "object", + "additionalProperties": false, "properties": { "is": { "type": "string", - "enum": [ - "MyObject_1" - ] + "const": "MyObject_1" } }, "required": [ diff --git a/test/programs/unique-names/schema.MyObject.fded1213.json b/test/programs/unique-names/schema.MyObject.fded1213.json index aeb2da1b..6b129d23 100644 --- a/test/programs/unique-names/schema.MyObject.fded1213.json +++ b/test/programs/unique-names/schema.MyObject.fded1213.json @@ -1,11 +1,10 @@ { "type": "object", + "additionalProperties": false, "properties": { "is": { "type": "string", - "enum": [ - "MyObject_2" - ] + "const": "MyObject_2" } }, "required": [ diff --git a/test/programs/user-symbols/schema.json b/test/programs/user-symbols/schema.json index 0a0e4c1a..8720501f 100644 --- a/test/programs/user-symbols/schema.json +++ b/test/programs/user-symbols/schema.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "Context": { + "additionalProperties": false, "properties": { "ip": { "type": "string" diff --git a/test/programs/user-validation-keywords/schema.json b/test/programs/user-validation-keywords/schema.json index a53aadd0..3726a3b6 100644 --- a/test/programs/user-validation-keywords/schema.json +++ b/test/programs/user-validation-keywords/schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "name": { "chance": { diff --git a/test/schema.test.ts b/test/schema.test.ts index 6b6bd3b3..90929e84 100644 --- a/test/schema.test.ts +++ b/test/schema.test.ts @@ -3,8 +3,10 @@ import addFormats from "ajv-formats"; import { assert } from "chai"; import { readFileSync } from "fs"; import { resolve } from "path"; -import { versionMajorMinor as typescriptVersionMajorMinor } from "typescript"; import * as TJS from "../typescript-json-schema"; +import { isRegExp } from "util/types"; + +const { versionMajorMinor: typescriptVersionMajorMinor } = TJS.ts; let ajvWarnings: string[] = []; const ajv = new Ajv({ @@ -44,6 +46,9 @@ export function assertSchema( if (!("required" in settings)) { settings.required = true; } + if (!("noExtraProps" in settings)) { + settings.noExtraProps = true; + } const files = [resolve(BASE + group + "/main.ts")]; const actual = TJS.generateSchema(TJS.getProgramFromFiles(files, compilerOptions), type, settings, files); @@ -59,7 +64,6 @@ export function assertSchema( // test against the meta schema if (actual !== null) { ajv.validateSchema(actual); - assert.equal(ajv.errors, null, "The schema is not valid"); // Compiling the schema can reveal warnings that validateSchema doesn't. @@ -83,6 +87,10 @@ export function assertSchemas( settings.required = true; } + if (!("noExtraProps" in settings)) { + settings.noExtraProps = true; + } + const generator = TJS.buildGenerator( TJS.getProgramFromFiles([resolve(BASE + group + "/main.ts")], compilerOptions), settings @@ -113,18 +121,30 @@ export function assertRejection( group: string, type: string, settings: TJS.PartialArgs = {}, - compilerOptions?: TJS.CompilerOptions + compilerOptions?: TJS.CompilerOptions, + errType?: RegExp | ErrorConstructor, ) { it(group + " should reject input", () => { let schema = null; - assert.throws(() => { + + const fn = () => { if (!("required" in settings)) { settings.required = true; } + if (!("noExtraProps" in settings)) { + settings.noExtraProps = true; + } + const files = [resolve(BASE + group + "/main.ts")]; schema = TJS.generateSchema(TJS.getProgramFromFiles(files, compilerOptions), type, settings, files); - }); + }; + + if (isRegExp(errType)) { + assert.throws(fn, errType || /.*/); + } else { + assert.throws(fn, errType); + } assert.equal(schema, null, "Expected no schema to be generated"); }); } @@ -157,6 +177,52 @@ describe("interfaces", () => { assert.deepEqual(schema.definitions!["MySubObject"], schemaOverride); } }); + it("should output the schemas set by setSchemaOverride with getSchemaForSymbol", () => { + const program = TJS.getProgramFromFiles([resolve(BASE + "interface-multi/main.ts")]); + const generator = TJS.buildGenerator(program); + assert(generator !== null); + + const schemaOverride1: TJS.Definition = { type: "string" }; + const schemaOverride2: TJS.Definition = { type: "integer" }; + + generator?.setSchemaOverride("MySubObject", schemaOverride1); + generator?.setSchemaOverride("MySubObject2", schemaOverride2); + const schema = generator?.getSchemaForSymbol("MySubObject"); + + // Should not change original schema object. + assert.deepEqual(schemaOverride1, { type: "string" }); + assert.deepEqual(schemaOverride2, { type: "integer" }); + + assert.deepEqual(schema, { ...schemaOverride1, $schema: "http://json-schema.org/draft-07/schema#" }); + }); + it("should output the schemas set by setSchemaOverride with getSchemaForSymbol and other overrides", () => { + const program = TJS.getProgramFromFiles([resolve(BASE + "interface-multi/main.ts")]); + const generator = TJS.buildGenerator(program); + assert(generator !== null); + const schemaOverride1: TJS.Definition = { type: "string" }; + const schemaOverride2: TJS.Definition = { type: "integer" }; + + generator?.setSchemaOverride("MySubObject1", schemaOverride1); + generator?.setSchemaOverride("MySubObject2", schemaOverride2); + const schema = generator?.getSchemaForSymbol("MySubObject1", true, true); + + // Should not change original schema object. + assert.deepEqual(schemaOverride1, { type: "string" }); + assert.deepEqual(schemaOverride2, { type: "integer" }); + + assert.deepEqual(schema, { + ...schemaOverride1, + $schema: "http://json-schema.org/draft-07/schema#", + definitions: { + MySubObject1: { + type: "string" + }, + MySubObject2: { + type: "integer" + } + } + }); + }); it("should ignore type aliases that have schema overrides", () => { const program = TJS.getProgramFromFiles([resolve(BASE + "type-alias-schema-override/main.ts")]); const generator = TJS.buildGenerator(program); @@ -221,6 +287,7 @@ describe("schema", () => { // useTypeAliasRef: true, // useRootRef: true // }); + assertSchema("type-literals", "MyObject"); assertSchema("type-no-aliases-recursive-topref", "MyAlias", { aliasRef: false, topRef: true, @@ -239,8 +306,10 @@ describe("schema", () => { assertSchema("type-aliases-recursive-anonymous", "MyAlias"); assertSchema("type-aliases-recursive-export", "MyObject"); */ + assertSchema("type-aliases-tuple-with-names", "MyTuple"); assertSchema("type-aliases-tuple-of-variable-length", "MyTuple"); assertSchema("type-aliases-tuple-with-rest-element", "MyTuple"); + assertRejection("type-alias-never", "MyNever", {}, {}, /Unsupported type: never/); }); describe("enums", () => { @@ -259,7 +328,22 @@ describe("schema", () => { }); assertSchema("type-union-tagged", "Shape"); assertSchema("type-aliases-union-namespace", "MyModel"); - assertSchema("type-intersection-recursive", "*"); + assertSchema("type-intersection-recursive", "Foo"); + assertSchema("type-intersection-recursive-no-additional", "MyLinkedList", { + noExtraProps: true, + }); + assertSchema("type-union-strict-null-keep-description", "MyObject", undefined, { + strictNullChecks: true, + }); + }); + + describe("no-refs", () => { + assertSchema("no-ref", "MyModule", { + ref: false, + aliasRef: false, + topRef: false, + noExtraProps: true, + }); }); describe("annotations", () => { @@ -297,6 +381,7 @@ describe("schema", () => { describe("comments", () => { assertSchema("comments", "MyObject"); + assertSchema("comments-comment", "MyObject"); assertSchema("comments-override", "MyObject"); assertSchema("comments-imports", "MyObject", { aliasRef: true, @@ -338,6 +423,8 @@ describe("schema", () => { assertSchema("default-properties", "MyObject"); + assertSchema("default-properties-initializer", "MyObject"); + // not supported yet #116 // assertSchema("interface-extra-props", "MyObject"); @@ -351,6 +438,7 @@ describe("schema", () => { assertSchema("array-empty", "MyEmptyArray"); assertSchema("map-types", "MyObject"); assertSchema("extra-properties", "MyObject"); + assertSchema("numeric-keys-and-others", "NumericKeysAndOthers"); }); describe("string literals", () => { @@ -358,6 +446,10 @@ describe("schema", () => { assertSchema("string-literals-inline", "MyObject"); }); + describe("template string", () => { + assertSchema("string-template-literal", "MyObject"); + }); + describe("custom dates", () => { assertSchema("custom-dates", "foo.Bar"); }); @@ -390,6 +482,13 @@ describe("schema", () => { }); }); + describe("undefined", () => { + assertSchema("undefined-property", "MyObject"); + + // Creating a schema for main type = undefined should fail + assertRejection("type-alias-undefined", "MyUndefined", undefined, undefined, /Not supported: root type undefined/); + }); + describe("other", () => { assertSchema("array-and-description", "MyObject"); @@ -421,6 +520,8 @@ describe("schema", () => { }); assertSchema("prop-override", "MyObject"); + + assertSchema("symbol", "MyObject"); }); describe("object index", () => { @@ -435,6 +536,12 @@ describe("schema", () => { describe("typeof globalThis", () => { assertSchema("type-globalThis", "Test"); }); + + describe("key in key of", () => { + assertSchema("key-in-key-of-single", "Main"); + assertSchema("key-in-key-of-multi", "Main"); + assertSchema("key-in-key-of-multi-underscores", "Main"); + }); }); describe("tsconfig.json", () => { @@ -471,19 +578,68 @@ describe("Functionality 'required' in annotation", () => { }); describe("when reusing a generator", () => { - it("should not add unrelated definitions to schemas", () => { - // regression test for https://github.com/YousefED/typescript-json-schema/issues/465 - const testProgramPath = BASE + "no-unrelated-definitions/"; - const program = TJS.programFromConfig(resolve(testProgramPath + "tsconfig.json")); - const generator = TJS.buildGenerator(program); + it("should not add unrelated definitions to schemas", () => { + // regression test for https://github.com/YousefED/typescript-json-schema/issues/465 + const testProgramPath = BASE + "no-unrelated-definitions/"; + const program = TJS.programFromConfig(resolve(testProgramPath + "tsconfig.json")); + const generator = TJS.buildGenerator(program); + + ["MyObject", "MyOtherObject"].forEach(symbolName => { + const expectedSchemaString = readFileSync(testProgramPath + `schema.${symbolName}.json`, "utf8"); + const expectedSchemaObject = JSON.parse(expectedSchemaString); + + const actualSchemaObject = generator?.getSchemaForSymbol(symbolName); + + assert.deepEqual(actualSchemaObject, expectedSchemaObject, `The schema for ${symbolName} is not as expected`); + }); + }); + + it("should not add unrelated schemaOverrides to schemas", () => { + const testProgramPath = BASE + "no-unrelated-definitions/"; + const program = TJS.programFromConfig(resolve(testProgramPath + "tsconfig.json")); + const generator = TJS.buildGenerator(program); - ["MyObject", "MyOtherObject"].forEach(symbolName => { - const expectedSchemaString = readFileSync(testProgramPath + `schema.${symbolName}.json`, "utf8"); - const expectedSchemaObject = JSON.parse(expectedSchemaString); + const schemaOverride: TJS.Definition = { type: "string" }; + generator?.setSchemaOverride("SomeOtherDefinition", schemaOverride); - const actualSchemaObject = generator?.getSchemaForSymbol(symbolName); + [ + { symbolName: "MyObject", schemaName: "MyObject" }, + { symbolName: "MyOtherObject", schemaName: "MyOtherObjectWithOverride" }, + ].forEach(({ symbolName, schemaName }) => { + const expectedSchemaString = readFileSync(`${testProgramPath}schema.${schemaName}.json`, "utf8"); + const expectedSchemaObject = JSON.parse(expectedSchemaString); - assert.deepEqual(actualSchemaObject, expectedSchemaObject, `The schema for ${symbolName} is not as expected`); + const actualSchemaObject = generator?.getSchemaForSymbol(symbolName); + + assert.deepEqual(actualSchemaObject, expectedSchemaObject, `The schema for ${symbolName} is not as expected`); + }); }); - }); + + it("should include all schemaOverrides when generating program schemas", () => { + const testProgramPath = BASE + "no-unrelated-definitions/"; + const program = TJS.programFromConfig(resolve(`${testProgramPath}tsconfig.json`)); + const generator = TJS.buildGenerator(program)!; + + const schemaOverride: TJS.Definition = { type: "string" }; + generator.setSchemaOverride("UnrelatedDefinition", schemaOverride); + + const expectedSchemaString = readFileSync(`${testProgramPath}schema.program.json`, "utf8"); + const expectedSchemaObject = JSON.parse(expectedSchemaString); + + const actualSchemaObject = TJS.generateSchema(program, "*", {}, undefined, generator); + + assert.deepEqual(actualSchemaObject, expectedSchemaObject, `The schema for whole program is not as expected`); + }); +}); + +describe("satisfies keyword - ignore from a \"satisfies\" and build by rally type", () => { + assertSchema("satisfies-keyword", "Specific"); +}); + +describe("const keyword", () => { + assertSchema("const-keyword", "Object"); +}); + +describe("constAsEnum option", () => { + assertSchema("const-as-enum", "MyObject", { constAsEnum: true }); }); diff --git a/tsconfig.json b/tsconfig.json index 2a7c0c73..abc3da5d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,37 +1,27 @@ { - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "dist", - "isolatedModules": false, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "declaration": true, - "noImplicitAny": true, - "suppressImplicitAnyIndexErrors": true, - "strictNullChecks": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "removeComments": true, - "noLib": false, - "preserveConstEnums": true, - "sourceMap": true, - "watch": false, - "typeRoots" : ["node_modules/@types"] - }, - "include": [ - "**/*.ts", - "node_modules/@types/**/*.d.ts" - ], - "exclude": [ - "node_modules", - "example", - "test/programs", - "dist" - ], - "compileOnSave": true, - "buildOnSave": false + "compilerOptions": { + "target": "es2015", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "dist", + "isolatedModules": false, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "removeComments": true, + "noLib": false, + "preserveConstEnums": true, + "sourceMap": true, + "typeRoots": ["node_modules/@types"] + }, + "include": ["**/*.ts", "node_modules/@types/**/*.d.ts"], + "exclude": ["node_modules", "example", "test/programs", "dist"], + "compileOnSave": true, + "buildOnSave": false } diff --git a/typescript-json-schema-cli.ts b/typescript-json-schema-cli.ts index 11eb182b..7d21d4f4 100644 --- a/typescript-json-schema-cli.ts +++ b/typescript-json-schema-cli.ts @@ -5,7 +5,7 @@ export function run() { const defaultArgs = getDefaultArgs(); // prettier-ignore - var args = require("yargs") + var args = require("yargs")(process.argv.slice(2)) .usage(helpText) .demand(2) .boolean("refs").default("refs", defaultArgs.ref) @@ -32,6 +32,8 @@ export function run() { .describe("esModuleInterop", "Use esModuleInterop when loading typescript modules.") .boolean("skipLibCheck").default("skipLibCheck", defaultArgs.skipLibCheck) .describe("skipLibCheck", "Use skipLibCheck when loading typescript modules.") + .boolean("experimentalDecorators").default("experimentalDecorators", defaultArgs.experimentalDecorators) + .describe("skipLibCheck", "Use experimentalDecorators when loading typescript modules.") .boolean("ignoreErrors").default("ignoreErrors", defaultArgs.ignoreErrors) .describe("ignoreErrors", "Generate even if the program has errors.") .alias("out", "o") @@ -53,6 +55,8 @@ export function run() { .describe("defaultNumberType", "Default number type.") .boolean("tsNodeRegister").default("tsNodeRegister", defaultArgs.tsNodeRegister) .describe("tsNodeRegister", "Use ts-node/register (needed for requiring typescript files).") + .boolean("constAsEnum").default("constAsEnum", defaultArgs.constAsEnum) + .describe("constAsEnum", "Use enums with a single value when declaring constants. Needed for OpenAPI compatibility") .argv; exec(args._[0], args._[1], { @@ -68,6 +72,7 @@ export function run() { strictNullChecks: args.strictNullChecks, esModuleInterop: args.esModuleInterop, skipLibCheck: args.skipLibCheck, + experimentalDecorators: args.experimentalDecorators, ignoreErrors: args.ignoreErrors, out: args.out, validationKeywords: args.validationKeywords, @@ -78,6 +83,7 @@ export function run() { id: args.id, defaultNumberType: args.defaultNumberType, tsNodeRegister: args.tsNodeRegister, + constAsEnum: args.constAsEnum, }); } diff --git a/typescript-json-schema.ts b/typescript-json-schema.ts index 41448513..a3e048d2 100644 --- a/typescript-json-schema.ts +++ b/typescript-json-schema.ts @@ -3,11 +3,11 @@ import { stringify } from "safe-stable-stringify"; import * as path from "path"; import { createHash } from "crypto"; import * as ts from "typescript"; -import { JSONSchema7 } from "json-schema"; +import { JSONSchema7, JSONSchema7TypeName } from "json-schema"; import { pathEqual } from "path-equal"; export { Program, CompilerOptions, Symbol } from "typescript"; -const vm = require("vm"); +export { ts }; const REGEX_FILE_NAME_OR_SPACE = /(\bimport\(".*?"\)|".*?")\.| /g; const REGEX_TSCONFIG_NAME = /^.*\.json$/; @@ -49,6 +49,7 @@ export function getDefaultArgs(): Args { strictNullChecks: false, esModuleInterop: false, skipLibCheck: false, + experimentalDecorators: true, ignoreErrors: false, out: "", validationKeywords: [], @@ -59,6 +60,7 @@ export function getDefaultArgs(): Args { id: "", defaultNumberType: "number", tsNodeRegister: false, + constAsEnum: false, }; } @@ -80,6 +82,7 @@ export type Args = { esModuleInterop: boolean; skipLibCheck: boolean; ignoreErrors: boolean; + experimentalDecorators: boolean; out: string; validationKeywords: string[]; include: string[]; @@ -89,6 +92,7 @@ export type Args = { id: string; defaultNumberType: "number" | "integer"; tsNodeRegister: boolean; + constAsEnum: boolean; }; export type PartialArgs = Partial; @@ -97,7 +101,6 @@ export type PrimitiveType = number | boolean | string | null; type MetaDefinitionFields = "ignore"; type RedefinedFields = - | "type" | "items" | "additionalItems" | "contains" @@ -116,9 +119,6 @@ type RedefinedFields = | "definitions"; export type DefinitionOrBoolean = Definition | boolean; export interface Definition extends Omit { - // The type field here is incompatible with the standard definition - type?: string | string[]; - // Non-standard fields propertyOrder?: string[]; defaultProperties?: string[]; @@ -151,6 +151,9 @@ export interface Definition extends Omit { }; } +/** A looser Definition type that allows for indexing with arbitrary strings. */ +type DefinitionIndex = { [key: string]: Definition[keyof Definition] }; + export type SymbolRef = { name: string; typeName: string; @@ -183,7 +186,7 @@ function extend(target: any, ..._: any[]): any { } function unique(arr: string[]): string[] { - const temp = {}; + const temp: Record = {}; for (const e of arr) { temp[e] = true; } @@ -245,6 +248,40 @@ function parseValue(symbol: ts.Symbol, key: string, value: string): any { } } +/** + * Evaluate a property initializer expression to its literal value, without + * executing any code. Only the literal forms that can be represented in a JSON + * Schema `default` are supported: string, number, boolean, null and arrays of + * those. Returns `undefined` for anything that is not a supported literal. + */ +function evaluateLiteralInitializer(node: ts.Node): PrimitiveType | any[] | undefined { + if (ts.isStringLiteralLike(node)) { + return node.text; + } else if (ts.isNumericLiteral(node)) { + return Number(node.text); + } else if (ts.isPrefixUnaryExpression(node) && node.operator === ts.SyntaxKind.MinusToken) { + const operand = evaluateLiteralInitializer(node.operand); + return typeof operand === "number" ? -operand : undefined; + } else if (node.kind === ts.SyntaxKind.TrueKeyword) { + return true; + } else if (node.kind === ts.SyntaxKind.FalseKeyword) { + return false; + } else if (node.kind === ts.SyntaxKind.NullKeyword) { + return null; + } else if (ts.isArrayLiteralExpression(node)) { + const values: any[] = []; + for (const element of node.elements) { + const value = evaluateLiteralInitializer(element); + if (value === undefined) { + return undefined; + } + values.push(value); + } + return values; + } + return undefined; +} + function extractLiteralValue(typ: ts.Type): PrimitiveType | undefined { let str = (typ).value; if (str === undefined) { @@ -286,12 +323,12 @@ function resolveTupleType(propertyType: ts.Type): ts.TupleTypeNode | null { return propertyType as any; } -const simpleTypesAllowedProperties = { +const simpleTypesAllowedProperties: Record = { type: true, description: true, }; -function addSimpleType(def: Definition, type: string): boolean { +function addSimpleType(def: Definition, type: JSONSchema7TypeName): boolean { for (const k in def) { if (!simpleTypesAllowedProperties[k]) { return false; @@ -330,11 +367,11 @@ function makeNullable(def: Definition): Definition { if (union) { union.push({ type: "null" }); } else { - const subdef = {}; - for (var k in def) { + const subdef: DefinitionIndex = {}; + for (var k in def as any) { if (def.hasOwnProperty(k)) { - subdef[k] = def[k]; - delete def[k]; + subdef[k] = def[k as keyof Definition]; + delete def[k as keyof typeof def]; } } def.anyOf = [subdef, { type: "null" }]; @@ -425,6 +462,7 @@ const validationKeywords = { $ref: true, id: true, $id: true, + $comment: true, title: true }; @@ -438,11 +476,12 @@ const annotationKeywords: { [k in keyof typeof validationKeywords]?: true } = { description: true, default: true, examples: true, + title: true, // A JSDoc $ref annotation can appear as a $ref. $ref: true, }; -const subDefinitions = { +const subDefinitions: Record = { items: true, additionalProperties: true, contains: true, @@ -489,6 +528,12 @@ export class JsonSchemaGenerator { */ private userValidationKeywords: ValidationKeywords; + /** + * If true, this makes constants be defined as enums with a single value. This is useful + * for cases where constant values are not supported, such as OpenAPI. + */ + private constAsEnum: boolean; + /** * Types are assigned names which are looked up by their IDs. This is the * map from type IDs to type names. @@ -514,6 +559,7 @@ export class JsonSchemaGenerator { this.inheritingTypes = inheritingTypes; this.tc = tc; this.userValidationKeywords = args.validationKeywords.reduce((acc, word) => ({ ...acc, [word]: true }), {}); + this.constAsEnum = args.constAsEnum; } public get ReffedDefinitions(): { [key: string]: Definition } { @@ -528,21 +574,23 @@ export class JsonSchemaGenerator { return false; } - private resetSchemaSpecificProperties() { + private resetSchemaSpecificProperties(includeAllOverrides: boolean = false) { this.reffedDefinitions = {}; this.typeIdsByName = {}; this.typeNamesById = {}; // restore schema overrides - this.schemaOverrides.forEach((value, key) => { - this.reffedDefinitions[key] = value; - }); + if (includeAllOverrides) { + this.schemaOverrides.forEach((value, key) => { + this.reffedDefinitions[key] = value; + }); + } } /** * Parse the comments of a symbol into the definition and other annotations. */ - private parseCommentsIntoDefinition(symbol: ts.Symbol, definition: Definition, otherAnnotations: {}): void { + private parseCommentsIntoDefinition(symbol: ts.Symbol, definition: Definition, otherAnnotations: Record): void { if (!symbol) { return; } @@ -554,16 +602,16 @@ export class JsonSchemaGenerator { if (comments.length) { definition.description = comments .map((comment) => { - const newlineNormalizedComment = comment.text.replace(/\r\n/g, "\n"); + const newlineNormalizedComment = comment.text.replace(/\r\n/g, "\n"); - // If a comment contains a "{@link XYZ}" inline tag that could not be - // resolved by the TS checker, then this comment will contain a trailing - // whitespace that we need to remove. - if (comment.kind === "linkText") { - return newlineNormalizedComment.trim(); - } + // If a comment contains a "{@link XYZ}" inline tag that could not be + // resolved by the TS checker, then this comment will contain a trailing + // whitespace that we need to remove. + if (comment.kind === "linkText") { + return newlineNormalizedComment.trim(); + } - return newlineNormalizedComment; + return newlineNormalizedComment; }) .join("").trim(); } @@ -605,7 +653,7 @@ export class JsonSchemaGenerator { if (match) { const k = match[1]; const v = match[2]; - definition[name] = { ...definition[name], [k]: v ? parseValue(symbol, k, v) : true }; + (definition as DefinitionIndex)[name] = { ...(definition as Record>)[name], [k]: v ? parseValue(symbol, k, v) : true }; return; } } @@ -613,16 +661,17 @@ export class JsonSchemaGenerator { // In TypeScript 3.7+, the "." is kept as part of the annotation name if (name.includes(".")) { const parts = name.split("."); - if (parts.length === 2 && subDefinitions[parts[0]]) { - definition[parts[0]] = { - ...definition[parts[0]], + const key = parts[0] as keyof Definition; + if (parts.length === 2 && subDefinitions[key]) { + (definition as DefinitionIndex)[key] = { + ...definition[key] as Record, [parts[1]]: text ? parseValue(symbol, name, text) : true, }; } } - if (validationKeywords[name] || this.userValidationKeywords[name]) { - definition[name] = text === undefined ? "" : parseValue(symbol, name, text); + if (validationKeywords[name as keyof typeof validationKeywords] || this.userValidationKeywords[name]) { + (definition as DefinitionIndex)[name] = text === undefined ? "" : parseValue(symbol, name, text); } else { // special annotations otherAnnotations[doc.name] = true; @@ -634,19 +683,28 @@ export class JsonSchemaGenerator { propertyType: ts.Type, reffedType: ts.Symbol, definition: Definition, - defaultNumberType = this.args.defaultNumberType + defaultNumberType = this.args.defaultNumberType, + ignoreUndefined = false, ): Definition { const tupleType = resolveTupleType(propertyType); if (tupleType) { // tuple const elemTypes: ts.NodeArray = (propertyType as any).typeArguments; - const fixedTypes = elemTypes.map((elType) => this.getTypeDefinition(elType as any)); + const targetTupleType = (propertyType as ts.TupleTypeReference).target; + + const fixedTypes = elemTypes.map((elType, index) => { + const def = this.getTypeDefinition(elType as any); + const label = targetTupleType.labeledElementDeclarations?.[index]?.name?.getFullText().trim(); + if (label) { + def.title = label; + } + return def; + }); definition.type = "array"; if (fixedTypes.length > 0) { definition.items = fixedTypes; } - const targetTupleType = (propertyType as ts.TupleTypeReference).target; definition.minItems = targetTupleType.minLength; if (targetTupleType.hasRestElement) { definition.additionalItems = fixedTypes[fixedTypes.length - 1]; @@ -674,11 +732,15 @@ export class JsonSchemaGenerator { } else if (flags & ts.TypeFlags.Boolean) { definition.type = "boolean"; } else if (flags & ts.TypeFlags.ESSymbol) { - definition.type = "symbol"; + definition.type = "object"; } else if (flags & ts.TypeFlags.Null) { definition.type = "null"; } else if (flags & ts.TypeFlags.Undefined || propertyTypeString === "void") { - definition.type = "undefined"; + if (!ignoreUndefined) { + throw new Error("Not supported: root type undefined"); + } + // will be deleted + definition.type = "undefined" as any; } else if (flags & ts.TypeFlags.Any || flags & ts.TypeFlags.Unknown) { // no type restriction, so that anything will match } else if (propertyTypeString === "Date" && !this.args.rejectDateType) { @@ -688,22 +750,86 @@ export class JsonSchemaGenerator { definition.type = "object"; definition.properties = {}; definition.additionalProperties = true; + } else if (propertyTypeString === "bigint") { + definition.type = "number"; + definition.properties = {}; + definition.additionalProperties = false; } else { const value = extractLiteralValue(propertyType); if (value !== undefined) { - definition.type = typeof value; - definition.enum = [value]; + // typeof value can be: "string", "boolean", "number", or "object" if value is null + const typeofValue = typeof value; + switch (typeofValue) { + case "string": + case "boolean": + definition.type = typeofValue; + break; + case "number": + definition.type = this.args.defaultNumberType; + break; + case "object": + definition.type = "null"; + break; + default: + throw new Error(`Not supported: ${value} as a enum value`); + } + if (this.constAsEnum) { + definition.enum = [value]; + } else { + definition.const = value; + } } else if (arrayType !== undefined) { if ( propertyType.flags & ts.TypeFlags.Object && (propertyType as ts.ObjectType).objectFlags & - (ts.ObjectFlags.Anonymous | ts.ObjectFlags.Interface | ts.ObjectFlags.Mapped) + (ts.ObjectFlags.Anonymous | ts.ObjectFlags.Interface | ts.ObjectFlags.Mapped) ) { definition.type = "object"; definition.additionalProperties = false; definition.patternProperties = { [NUMERIC_INDEX_PATTERN]: this.getTypeDefinition(arrayType), }; + if (!!Array.from((propertyType).members)?.find((member: [string]) => member[0] !== "__index")) { + this.getClassDefinition(propertyType, definition); + } + } else if (propertyType.flags & ts.TypeFlags.TemplateLiteral) { + definition.type = "string"; + // @ts-ignore + const {texts, types} = propertyType; + const pattern = []; + for (let i = 0; i < texts.length; i++) { + const text = texts[i].replace(/[\\^$.*+?()[\]{}|]/g, "\\$&"); + const type = types[i]; + + if (i === 0) { + pattern.push(`^`); + } + + if (type) { + if (type.flags & ts.TypeFlags.String) { + pattern.push(`${text}.*`); + } + + if (type.flags & ts.TypeFlags.Number + || type.flags & ts.TypeFlags.BigInt) { + pattern.push(`${text}[0-9]*`); + } + + if (type.flags & ts.TypeFlags.Undefined) { + pattern.push(`${text}undefined`); + } + + if (type.flags & ts.TypeFlags.Null) { + pattern.push(`${text}null`); + } + } + + + if (i === texts.length - 1) { + pattern.push(`${text}$`); + } + } + definition.pattern = pattern.join(""); } else { definition.type = "array"; if (!definition.items) { @@ -762,7 +888,7 @@ export class JsonSchemaGenerator { if (valDecl?.initializer) { let initial = valDecl.initializer; - while (ts.isTypeAssertion(initial)) { + while (ts.isTypeAssertionExpression(initial)) { initial = initial.expression; } @@ -772,24 +898,11 @@ export class JsonSchemaGenerator { } else if ((initial).kind && (initial).kind === ts.SyntaxKind.NoSubstitutionTemplateLiteral) { definition.default = initial.getText(); } else { - try { - const sandbox = { sandboxvar: null as any }; - vm.runInNewContext("sandboxvar=" + initial.getText(), sandbox); - - const val = sandbox.sandboxvar; - if ( - val === null || - typeof val === "string" || - typeof val === "number" || - typeof val === "boolean" || - Object.prototype.toString.call(val) === "[object Array]" - ) { - definition.default = val; - } else if (val) { - console.warn("unknown initializer for property " + propertyName + ": " + val); - } - } catch (e) { - console.warn("exception evaluating initializer for property " + propertyName); + const val = evaluateLiteralInitializer(initial); + if (val !== undefined) { + definition.default = val; + } else { + console.warn("unknown initializer for property " + propertyName + ": " + initial.getText()); } } } @@ -803,11 +916,11 @@ export class JsonSchemaGenerator { const members: ts.NodeArray = node.kind === ts.SyntaxKind.EnumDeclaration ? (node as ts.EnumDeclaration).members - : ts.createNodeArray([node as ts.EnumMember]); + : ts.factory.createNodeArray([node as ts.EnumMember]); var enumValues: (number | boolean | string | null)[] = []; - const enumTypes: string[] = []; + const enumTypes: JSONSchema7TypeName[] = []; - const addType = (type: string) => { + const addType = (type: JSONSchema7TypeName) => { if (enumTypes.indexOf(type) === -1) { enumTypes.push(type); } @@ -818,7 +931,7 @@ export class JsonSchemaGenerator { const constantValue = this.tc.getConstantValue(member); if (constantValue !== undefined) { enumValues.push(constantValue); - addType(typeof constantValue); + addType(typeof constantValue as JSONSchema7TypeName); // can be only string or number; } else { // try to extract the enums value; it will probably by a cast expression const initial: ts.Expression | undefined = member.initializer; @@ -854,7 +967,11 @@ export class JsonSchemaGenerator { } if (enumValues.length > 0) { - definition.enum = enumValues.sort(); + if (enumValues.length > 1) { + definition.enum = enumValues; + } else { + definition.const = enumValues[0]; + } } return definition; @@ -862,15 +979,14 @@ export class JsonSchemaGenerator { private getUnionDefinition( unionType: ts.UnionType, - prop: ts.Symbol, - unionModifier: string, + unionModifier: keyof Definition, definition: Definition ): Definition { const enumValues: PrimitiveType[] = []; - const simpleTypes: string[] = []; + const simpleTypes: JSONSchema7TypeName[] = []; const schemas: Definition[] = []; - const pushSimpleType = (type: string) => { + const pushSimpleType = (type: JSONSchema7TypeName) => { if (simpleTypes.indexOf(type) === -1) { simpleTypes.push(type); } @@ -888,22 +1004,19 @@ export class JsonSchemaGenerator { pushEnumValue(value); } else { const symbol = valueType.aliasSymbol; - const def = this.getTypeDefinition(valueType, undefined, undefined, symbol, symbol); - if (def.type === "undefined") { - if (prop) { - (prop).mayBeUndefined = true; - } - } else { - const keys = Object.keys(def); - if (keys.length === 1 && keys[0] === "type") { - if (typeof def.type !== "string") { - console.error("Expected only a simple type."); - } else { - pushSimpleType(def.type); - } + const def = this.getTypeDefinition(valueType, undefined, undefined, symbol, symbol, undefined, undefined, true); + if (def.type === "undefined" as any) { + continue; + } + const keys = Object.keys(def); + if (keys.length === 1 && keys[0] === "type") { + if (typeof def.type !== "string") { + console.error("Expected only a simple type."); } else { - schemas.push(def); + pushSimpleType(def.type); } + } else { + schemas.push(def); } } } @@ -919,7 +1032,7 @@ export class JsonSchemaGenerator { if (isOnlyBooleans) { pushSimpleType("boolean"); } else { - const enumSchema: Definition = { enum: enumValues.sort() }; + const enumSchema: Definition = enumValues.length > 1 ? { enum: enumValues.sort() } : { const: enumValues[0] }; // If all values are of the same primitive type, add a "type" field to the schema if ( @@ -953,20 +1066,24 @@ export class JsonSchemaGenerator { if (schemas.length === 1) { for (const k in schemas[0]) { if (schemas[0].hasOwnProperty(k)) { - definition[k] = schemas[0][k]; + if (k === "description" && definition.hasOwnProperty(k)) { + // If we already have a more specific description, don't overwrite it. + continue; + } + (definition as DefinitionIndex)[k] = schemas[0][k as keyof Definition]; } } } else { - definition[unionModifier] = schemas; + (definition as DefinitionIndex)[unionModifier] = schemas; } return definition; } private getIntersectionDefinition(intersectionType: ts.IntersectionType, definition: Definition): Definition { - const simpleTypes: string[] = []; + const simpleTypes: JSONSchema7TypeName[] = []; const schemas: Definition[] = []; - const pushSimpleType = (type: string) => { + const pushSimpleType = (type: JSONSchema7TypeName) => { if (simpleTypes.indexOf(type) === -1) { simpleTypes.push(type); } @@ -974,19 +1091,15 @@ export class JsonSchemaGenerator { for (const intersectionMember of intersectionType.types) { const def = this.getTypeDefinition(intersectionMember); - if (def.type === "undefined") { - console.error("Undefined in intersection makes no sense."); - } else { - const keys = Object.keys(def); - if (keys.length === 1 && keys[0] === "type") { - if (typeof def.type !== "string") { - console.error("Expected only a simple type."); - } else { - pushSimpleType(def.type); - } + const keys = Object.keys(def); + if (keys.length === 1 && keys[0] === "type") { + if (typeof def.type !== "string") { + console.error("Expected only a simple type."); } else { - schemas.push(def); + pushSimpleType(def.type); } + } else { + schemas.push(def); } } @@ -997,7 +1110,7 @@ export class JsonSchemaGenerator { if (schemas.length === 1) { for (const k in schemas[0]) { if (schemas[0].hasOwnProperty(k)) { - definition[k] = schemas[0][k]; + (definition as DefinitionIndex)[k] = schemas[0][k as keyof Definition]; } } } else { @@ -1022,9 +1135,9 @@ export class JsonSchemaGenerator { const clazz = node; const props = this.tc.getPropertiesOfType(clazzType).filter((prop) => { - // filter never - const propertyType = this.tc.getTypeOfSymbolAtLocation(prop, node); - if (ts.TypeFlags.Never === propertyType.getFlags()) { + // filter never and undefined + const propertyFlagType = this.tc.getTypeOfSymbolAtLocation(prop, node).getFlags(); + if (ts.TypeFlags.Never === propertyFlagType || ts.TypeFlags.Undefined === propertyFlagType) { return false; } if (!this.args.excludePrivate) { @@ -1035,8 +1148,8 @@ export class JsonSchemaGenerator { return !( decls && decls.filter((decl) => { - const mods = decl.modifiers; - return mods && mods.filter((mod) => mod.kind === ts.SyntaxKind.PrivateKeyword).length > 0; + const mods = (decl as any).modifiers; + return mods && mods.filter((mod: any) => mod.kind === ts.SyntaxKind.PrivateKeyword).length > 0; }).length > 0 ); }); @@ -1062,19 +1175,37 @@ export class JsonSchemaGenerator { } const indexSymbol: ts.Symbol = (indexSignature.parameters[0]).symbol; const indexType = this.tc.getTypeOfSymbolAtLocation(indexSymbol, node); - const isStringIndexed = indexType.flags === ts.TypeFlags.String; - if (indexType.flags !== ts.TypeFlags.Number && !isStringIndexed) { + const isIndexedObject = indexType.flags === ts.TypeFlags.String || indexType.flags === ts.TypeFlags.Number; + if (indexType.flags !== ts.TypeFlags.Number && !isIndexedObject) { throw new Error( "Not supported: IndexSignatureDeclaration with index symbol other than a number or a string" ); } const typ = this.tc.getTypeAtLocation(indexSignature.type!); - const def = this.getTypeDefinition(typ, undefined, "anyOf"); - - if (isStringIndexed) { + let def: Definition | undefined; + if (typ.flags & ts.TypeFlags.IndexedAccess) { + const targetName = ts.escapeLeadingUnderscores((clazzType).mapper?.target?.value); + const indexedAccessType = typ; + const symbols: Map = (indexedAccessType.objectType).members; + const targetSymbol = symbols?.get(targetName); + + if (targetSymbol) { + const targetNode = targetSymbol.getDeclarations()![0]; + const targetDef = this.getDefinitionForProperty(targetSymbol, targetNode); + if (targetDef) { + def = targetDef; + } + } + } + if (!def) { + def = this.getTypeDefinition(typ, undefined, "anyOf"); + } + if (isIndexedObject) { definition.type = "object"; - definition.additionalProperties = def; + if (!Object.keys(definition.patternProperties || {}).length) { + definition.additionalProperties = def; + } } else { definition.type = "array"; if (!definition.items) { @@ -1084,7 +1215,7 @@ export class JsonSchemaGenerator { } } - const propertyDefinitions = props.reduce((all, prop) => { + const propertyDefinitions = props.reduce>((all, prop) => { const propertyName = prop.getName(); const propDef = this.getDefinitionForProperty(prop, node); if (propDef != null) { @@ -1121,10 +1252,12 @@ export class JsonSchemaGenerator { const requiredProps = props.reduce((required: string[], prop: ts.Symbol) => { const def = {}; this.parseCommentsIntoDefinition(prop, def, {}); + const allUnionTypesFlags: number[] = (prop).links?.type?.types?.map?.((t: any) => t.flags) || []; if ( !(prop.flags & ts.SymbolFlags.Optional) && !(prop.flags & ts.SymbolFlags.Method) && - !(prop).mayBeUndefined && + !allUnionTypesFlags.includes(ts.TypeFlags.Undefined) && + !allUnionTypesFlags.includes(ts.TypeFlags.Void) && !def.hasOwnProperty("ignore") ) { required.push(prop.getName()); @@ -1181,10 +1314,12 @@ export class JsonSchemaGenerator { private getTypeDefinition( typ: ts.Type, asRef = this.args.ref, - unionModifier: string = "anyOf", + unionModifier: keyof Definition = "anyOf", prop?: ts.Symbol, reffedType?: ts.Symbol, - pairedSymbol?: ts.Symbol + pairedSymbol?: ts.Symbol, + forceNotRef: boolean = false, + ignoreUndefined = false, ): Definition { const definition: Definition = {}; // real definition @@ -1223,7 +1358,7 @@ export class JsonSchemaGenerator { const symbol = typ.getSymbol(); // FIXME: We can't just compare the name of the symbol - it ignores the namespace let isRawType = - !symbol || + !symbol || // Window is incorrectly marked as rawType here for some reason (this.tc.getFullyQualifiedName(symbol) !== "Window" && (this.tc.getFullyQualifiedName(symbol) === "Date" || @@ -1231,7 +1366,7 @@ export class JsonSchemaGenerator { this.tc.getIndexInfoOfType(typ, ts.IndexKind.Number) !== undefined)); if (isRawType && (typ as any).aliasSymbol?.escapedName && (typ as any).types) { - isRawType = false; + isRawType = false; } // special case: an union where all child are string literals -> make an enum instead @@ -1289,7 +1424,7 @@ export class JsonSchemaGenerator { // Handle recursive types if (!isRawType || !!typ.aliasSymbol) { - if (this.recursiveTypeRef.has(fullTypeName)) { + if (this.recursiveTypeRef.has(fullTypeName) && !forceNotRef) { asRef = true; } else { this.recursiveTypeRef.set(fullTypeName, definition); @@ -1300,12 +1435,12 @@ export class JsonSchemaGenerator { // We don't return the full definition, but we put it into // reffedDefinitions below. returnedDefinition = { - $ref: `${this.args.id}#/definitions/` + fullTypeName, + $ref: createRefURI(this.args.id, fullTypeName), }; } // Parse comments - const otherAnnotations = {}; + const otherAnnotations: Record = {}; this.parseCommentsIntoDefinition(reffedType!, definition, otherAnnotations); // handle comments in the type alias declaration this.parseCommentsIntoDefinition(symbol!, definition, otherAnnotations); this.parseCommentsIntoDefinition(typ.aliasSymbol!, definition, otherAnnotations); @@ -1317,8 +1452,12 @@ export class JsonSchemaGenerator { } // Create the actual definition only if is an inline definition, or - // if it will be a $ref and it is not yet created - if (!asRef || !this.reffedDefinitions[fullTypeName]) { + // if it will be a $ref and it is not yet created. + // Prioritise overrides. + const overrideDefinition = this.schemaOverrides.get(fullTypeName); + if (overrideDefinition) { + this.reffedDefinitions[fullTypeName] = overrideDefinition; + } else if (!asRef || !this.reffedDefinitions[fullTypeName]) { if (asRef) { // must be here to prevent recursivity problems let reffedDefinition: Definition; @@ -1336,8 +1475,8 @@ export class JsonSchemaGenerator { if (definition.type === undefined) { // if users override the type, do not try to infer it - if (typ.flags & ts.TypeFlags.Union) { - this.getUnionDefinition(typ as ts.UnionType, prop!, unionModifier, definition); + if (typ.flags & ts.TypeFlags.Union && (node === null || node.kind !== ts.SyntaxKind.EnumDeclaration)) { + this.getUnionDefinition(typ as ts.UnionType, unionModifier, definition); } else if (typ.flags & ts.TypeFlags.Intersection) { if (this.args.noExtraProps) { // extend object instead of using allOf because allOf does not work well with additional properties. See #107 @@ -1347,12 +1486,13 @@ export class JsonSchemaGenerator { const types = (typ).types; for (const member of types) { - const other = this.getTypeDefinition(member, false); + const other = this.getTypeDefinition(member, false, undefined, undefined, undefined, undefined, true); definition.type = other.type; // should always be object definition.properties = { ...definition.properties, ...other.properties, }; + if (Object.keys(other.default || {}).length > 0) { definition.default = extend(definition.default || {}, other.default); } @@ -1367,7 +1507,7 @@ export class JsonSchemaGenerator { if (pairedSymbol) { this.parseCommentsIntoDefinition(pairedSymbol, definition, {}); } - this.getDefinitionForRootType(typ, reffedType!, definition); + this.getDefinitionForRootType(typ, reffedType!, definition, undefined, ignoreUndefined); } else if ( node && (node.kind === ts.SyntaxKind.EnumDeclaration || node.kind === ts.SyntaxKind.EnumMember) @@ -1392,15 +1532,15 @@ export class JsonSchemaGenerator { this.recursiveTypeRef.delete(fullTypeName); // If the type was recursive (there is reffedDefinitions) - lets replace it to reference if (this.reffedDefinitions[fullTypeName]) { - const annotations = Object.entries(returnedDefinition).reduce((acc, [key, value]) => { - if (annotationKeywords[key] && typeof value !== undefined) { + const annotations = Object.entries(returnedDefinition).reduce>((acc, [key, value]) => { + if (annotationKeywords[key as keyof typeof annotationKeywords] && typeof value !== undefined) { acc[key] = value; } return acc; }, {}); returnedDefinition = { - $ref: `${this.args.id}#/definitions/` + fullTypeName, + $ref: createRefURI(this.args.id, fullTypeName), ...annotations, }; } @@ -1417,21 +1557,27 @@ export class JsonSchemaGenerator { this.schemaOverrides.set(symbolName, schema); } - public getSchemaForSymbol(symbolName: string, includeReffedDefinitions: boolean = true): Definition { - if (!this.allSymbols[symbolName]) { + public getSchemaForSymbol(symbolName: string, includeReffedDefinitions: boolean = true, includeAllOverrides: boolean = false): Definition { + const overrideDefinition = this.schemaOverrides.get(symbolName); + if (!this.allSymbols[symbolName] && !overrideDefinition) { throw new Error(`type ${symbolName} not found`); } - this.resetSchemaSpecificProperties(); + this.resetSchemaSpecificProperties(includeAllOverrides); - const def = this.getTypeDefinition( - this.allSymbols[symbolName], - this.args.topRef, - undefined, - undefined, - undefined, - this.userSymbols[symbolName] || undefined - ); + let def; + if (overrideDefinition) { + def = { ...overrideDefinition }; + } else { + def = overrideDefinition ? overrideDefinition : this.getTypeDefinition( + this.allSymbols[symbolName], + this.args.topRef, + undefined, + undefined, + undefined, + this.userSymbols[symbolName] || undefined + ); + } if (this.args.ref && includeReffedDefinitions && Object.keys(this.reffedDefinitions).length > 0) { def.definitions = this.reffedDefinitions; @@ -1444,13 +1590,17 @@ export class JsonSchemaGenerator { return def; } - public getSchemaForSymbols(symbolNames: string[], includeReffedDefinitions: boolean = true): Definition { - const root = { + public getSchemaForSymbols(symbolNames: string[], includeReffedDefinitions: boolean = true, includeAllOverrides: boolean = false): Definition { + const root: { + $id?: string, + $schema: string, + definitions: Record + } = { $schema: "http://json-schema.org/draft-07/schema#", definitions: {}, }; - this.resetSchemaSpecificProperties(); + this.resetSchemaSpecificProperties(includeAllOverrides); const id = this.args.id; @@ -1511,6 +1661,22 @@ export class JsonSchemaGenerator { } } +/** + * Generates the reference URI to the definition in the schema `id` + * containing the definition `name`. + * + * Encodes the `name` using `encodeURIComponent`. + * + * @see https://datatracker.ietf.org/doc/html/rfc3986 + * @param id the id of the schema containing the definition + * @param name the name of the definition + * @returns the URI pointing to the definition in the schema + */ +function createRefURI(id: string, name: string): string { + const encoded = encodeURIComponent(name); + return `${id}#/definitions/${encoded}`; +} + export function getProgramFromFiles( files: string[], jsonCompilerOptions: any = {}, @@ -1554,7 +1720,7 @@ export function buildGenerator( for (const pref in args) { if (args.hasOwnProperty(pref)) { - settings[pref] = args[pref]; + (settings as Record[keyof Args]>)[pref as keyof Args] = args[pref as keyof Args]; } } @@ -1648,7 +1814,7 @@ export function generateSchema( if (fullTypeName === "*") { // All types in file(s) - return generator.getSchemaForSymbols(generator.getMainFileSymbols(program, onlyIncludeFiles)); + return generator.getSchemaForSymbols(generator.getMainFileSymbols(program, onlyIncludeFiles), true, true); } else if (args.uniqueNames) { // Find the hashed type name to use as the root object const matchingSymbols = generator.getSymbols(fullTypeName); @@ -1714,6 +1880,8 @@ export async function exec(filePattern: string, fullTypeName: string, args = get strictNullChecks: args.strictNullChecks, esModuleInterop: args.esModuleInterop, skipLibCheck: args.skipLibCheck, + emitDecoratorMetadata: args.experimentalDecorators, + experimentalDecorators: args.experimentalDecorators, }); onlyIncludeFiles = onlyIncludeFiles.map(normalizeFileName); } diff --git a/yarn.lock b/yarn.lock index 7482dd3b..2a0e50c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,250 +3,251 @@ "@babel/code-frame@^7.0.0": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" - integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== + version "7.29.0" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz#7cd7a59f15b3cc0dcd803038f7792712a7d0b15c" + integrity sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw== dependencies: - "@babel/highlight" "^7.14.5" - -"@babel/helper-validator-identifier@^7.14.5": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" - integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== - -"@babel/highlight@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" - integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== - dependencies: - "@babel/helper-validator-identifier" "^7.14.5" - chalk "^2.0.0" + "@babel/helper-validator-identifier" "^7.28.5" js-tokens "^4.0.0" + picocolors "^1.1.1" + +"@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + "@jridgewell/resolve-uri@^3.0.3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + version "3.1.2" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + version "1.5.5" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + "@tsconfig/node10@^1.0.7": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" - integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== + version "1.0.12" + resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz#be57ceac1e4692b41be9de6be8c32a106636dba4" + integrity sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ== "@tsconfig/node12@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" - integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== + version "1.0.11" + resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" - integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== + version "1.0.3" + resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" - integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== - -"@types/chai@^4.2.21": - version "4.2.21" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.21.tgz#9f35a5643129df132cf3b5c1ec64046ea1af0650" - integrity sha512-yd+9qKmJxm496BOV9CMNaey8TWsikaZOwMRwPHQIjcOJM9oV+fi9ZMNw3JsVnbEEbo2gRTDnGEBv8pjyn67hNg== - -"@types/glob@^7.1.4": - version "7.1.4" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" - integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -"@types/json-schema@^7.0.9": - version "7.0.9" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" - integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== - -"@types/minimatch@*": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" - integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== - -"@types/mocha@^9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.0.0.tgz#3205bcd15ada9bc681ac20bef64e9e6df88fd297" - integrity sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA== - -"@types/node@*", "@types/node@^16.9.2": - version "16.9.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.2.tgz#81f5a039d6ed1941f8cc57506c74e7c2b8fc64b9" - integrity sha512-ZHty/hKoOLZvSz6BtP1g7tc7nUeJhoCf3flLjh8ZEv1vFKBWHXcnMbJMyN/pftSljNyy0kNW/UqI3DccnBnZ8w== - -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + version "1.0.4" + resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@types/chai@^5.2.3": + version "5.2.3" + resolved "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz#8e9cd9e1c3581fa6b341a5aed5588eb285be0b4a" + integrity sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA== + dependencies: + "@types/deep-eql" "*" + assertion-error "^2.0.1" + +"@types/deep-eql@*": + version "4.0.2" + resolved "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd" + integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== + +"@types/json-schema@^7.0.15": + version "7.0.15" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/mocha@^10.0.10": + version "10.0.10" + resolved "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz#91f62905e8d23cbd66225312f239454a23bebfa0" + integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q== + +"@types/node@^24.10.2": + version "24.12.2" + resolved "https://registry.npmjs.org/@types/node/-/node-24.12.2.tgz#353cb161dbf1785ea25e8829ba7ec574c5c629ac" + integrity sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g== + dependencies: + undici-types "~7.16.0" acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + version "8.3.5" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz#8a6b8ca8fc5b34685af15dabb44118663c296496" + integrity sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw== + dependencies: + acorn "^8.11.0" -acorn@^8.4.1: - version "8.5.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" - integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== +acorn@^8.11.0, acorn@^8.4.1: + version "8.16.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== +ajv-formats@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz#3d5dc762bca17679c3c2ea7e90ad6b7532309578" + integrity sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ== dependencies: ajv "^8.0.0" -ajv@^8.0.0, ajv@^8.6.3: - version "8.6.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764" - integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw== +ajv@^8.0.0, ajv@^8.20.0: + version "8.20.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz#304b3636add88ba7d936760dd50ece006dea95f9" + integrity sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA== dependencies: - fast-deep-equal "^3.1.1" + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-regex@^5.0.0: +ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-regex@^6.2.2: + version "6.2.2" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1" + integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== + ansi-styles@^3.2.1: version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" -anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" +ansi-styles@^6.1.0, ansi-styles@^6.2.1: + version "6.2.3" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041" + integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== arg@^4.1.0: version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== argparse@^1.0.7: version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +assertion-error@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz#f641a196b335690b1070bf00b6e7593fec190bf7" + integrity sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA== balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +balanced-match@^4.0.2: + version "4.0.4" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz#bfb10662feed8196a2c62e7c68e17720c274179a" + integrity sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA== brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + version "1.1.14" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz#d9de602370d91347cd9ddad1224d4fd701eb348b" + integrity sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== +brace-expansion@^2.0.2: + version "2.1.0" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" + integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== dependencies: - fill-range "^7.0.1" + balanced-match "^1.0.0" + +brace-expansion@^5.0.5: + version "5.0.5" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz#dcc3a37116b79f3e1b46db994ced5d570e930fdb" + integrity sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ== + dependencies: + balanced-match "^4.0.2" -browser-stdout@1.3.1: +browser-stdout@^1.3.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== buffer-from@^1.0.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== builtin-modules@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= + resolved "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ== camelcase@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" - integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== - -chai@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" - integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.1" - type-detect "^4.0.5" - -chalk@^2.0.0, chalk@^2.3.0: + version "6.3.0" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +chai@^6.2.2: + version "6.2.2" + resolved "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz#ae41b52c9aca87734505362717f3255facda360e" + integrity sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg== + +chalk@^2.3.0: version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" @@ -255,149 +256,165 @@ chalk@^2.0.0, chalk@^2.3.0: chalk@^4.1.0: version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= - -chokidar@3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" - integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" +chokidar@^4.0.1: + version "4.0.3" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz#7be37a4c03c9aee1ecfe862a4a23b2c70c205d30" + integrity sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA== + dependencies: + readdirp "^4.0.1" -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: string-width "^4.2.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" wrap-ansi "^7.0.0" +cliui@^9.0.1: + version "9.0.1" + resolved "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz#6f7890f386f6f1f79953adc1f78dec46fcc2d291" + integrity sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w== + dependencies: + string-width "^7.2.0" + strip-ansi "^7.1.0" + wrap-ansi "^9.0.0" + color-convert@^1.9.0: version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== commander@^2.12.1: version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== create-require@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -debug@4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== +cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.3.5: + version "4.4.3" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== dependencies: - ms "2.1.2" + ms "^2.1.3" decamelize@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" +diff@^4.0.1: + version "4.0.4" + resolved "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz#7a6dbfda325f25f07517e9b518f897c08332e07d" + integrity sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ== -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +diff@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz#3fb34d387cd76d803f6eebea67b921dab0182a9a" + integrity sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw== -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + +emoji-regex@^10.3.0: + version "10.6.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz#bf3d6e8f7f8fd22a65d9703475bc0147357a6b0d" + integrity sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== esprima@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" +fast-uri@^3.0.1: + version "3.1.2" + resolved "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz#8af3d4fc9d3e71b11572cc2673b514a7d1a8c8ec" + integrity sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ== -find-up@5.0.0: +find-up@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -405,444 +422,529 @@ find-up@5.0.0: flat@^5.0.2: version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== +foreground-child@^3.1.0: + version "3.3.1" + resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" + integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== + dependencies: + cross-spawn "^7.0.6" + signal-exit "^4.0.1" + fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-east-asian-width@^1.0.0: + version "1.5.0" + resolved "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz#ce7008fe345edcf5497a6f557cfa54bc318a9ce7" + integrity sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA== -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== +glob@^10.4.5: + version "10.5.0" + resolved "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz#8ec0355919cd3338c28428a23d4f24ecc5fe738c" + integrity sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg== dependencies: - is-glob "^4.0.1" - -glob@7.1.7, glob@^7.1.1, glob@^7.1.7: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + +glob@^13.0.6: + version "13.0.6" + resolved "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz#078666566a425147ccacfbd2e332deb66a2be71d" + integrity sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw== + dependencies: + minimatch "^10.2.2" + minipass "^7.1.3" + path-scurry "^2.0.2" + +glob@^7.1.1: + version "7.2.3" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - has-flag@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== +hasown@^2.0.3: + version "2.0.3" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz#5e5c2b15b60370a4c7930c383dfb76bf17bc403c" + integrity sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg== dependencies: - function-bind "^1.1.1" + function-bind "^1.1.2" -he@1.2.0: +he@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" inherits@2: version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-core-module@^2.2.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" - integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== +is-core-module@^2.16.1: + version "2.16.2" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz#3e07450a8080ebce3fbf0cac494f4d2ab324e082" + integrity sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA== dependencies: - has "^1.0.3" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + hasown "^2.0.3" is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-plain-obj@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== is-unicode-supported@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== isexe@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + version "3.14.2" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0" + integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg== dependencies: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.1" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== + dependencies: + argparse "^2.0.1" + json-schema-traverse@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" -log-symbols@4.1.0: +log-symbols@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: chalk "^4.1.0" is-unicode-supported "^0.1.0" +lru-cache@^10.2.0: + version "10.4.3" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== + +lru-cache@^11.0.0: + version "11.3.6" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-11.3.6.tgz#f0306ad6e9f0a5dc25b16aeba4e8f57b7ec2df55" + integrity sha512-Gf/KoL3C/MlI7Bt0PGI9I+TeTC/I6r/csU58N4BSNc4lppLBeKsOdFYkK+dX0ABDUMJNfCHTyPpzwwO21Awd3A== + make-error@^1.1.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -minimatch@3.0.4, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minimatch@^10.2.2: + version "10.2.5" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz#bd48687a0be38ed2961399105600f832095861d1" + integrity sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg== + dependencies: + brace-expansion "^5.0.5" + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.5" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" + integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== dependencies: brace-expansion "^1.1.7" -minimist@^1.2.5: +minimatch@^9.0.4, minimatch@^9.0.5: + version "9.0.9" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz#9b0cb9fcb78087f6fd7eababe2511c4d3d60574e" + integrity sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg== + dependencies: + brace-expansion "^2.0.2" + +minimist@^1.2.6: version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2, minipass@^7.1.3: + version "7.1.3" + resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz#79389b4eb1bb2d003a9bba87d492f2bd37bdc65b" + integrity sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== + mkdirp@^0.5.3: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mocha@^9.1.3: - version "9.1.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.1.3.tgz#8a623be6b323810493d8c8f6f7667440fa469fdb" - integrity sha512-Xcpl9FqXOAYqI3j79pEtHBBnQgVXIhpULjGQa7DVb0Po+VzmSIK9kanAiWLHoRR/dbZ2qpdPshuXr8l1VaHCzw== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.2" - debug "4.3.2" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.1.7" - growl "1.10.5" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "3.0.4" - ms "2.1.3" - nanoid "3.1.25" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - which "2.0.2" - workerpool "6.1.5" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3: + version "0.5.6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@^11.7.5: + version "11.7.5" + resolved "https://registry.npmjs.org/mocha/-/mocha-11.7.5.tgz#58f5bbfa5e0211ce7e5ee6128107cefc2515a627" + integrity sha512-mTT6RgopEYABzXWFx+GcJ+ZQ32kp4fMf0xvpZIIfSq9Z8lC/++MtcCnQ9t5FP2veYEP95FIYSvW+U9fV4xrlig== + dependencies: + browser-stdout "^1.3.1" + chokidar "^4.0.1" + debug "^4.3.5" + diff "^7.0.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^10.4.5" + he "^1.2.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^9.0.5" + ms "^2.1.3" + picocolors "^1.1.1" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^9.2.0" + yargs "^17.7.2" + yargs-parser "^21.1.1" + yargs-unparser "^2.0.0" + +ms@^2.1.3: version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoid@3.1.25: - version "3.1.25" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152" - integrity sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - once@^1.3.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" p-limit@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" -path-equal@^1.1.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/path-equal/-/path-equal-1.2.2.tgz#fa2997f0a829de22ec8f5f86461ca5590d49b832" - integrity sha512-AUJvbcle1Zgb1TgtftHYknlrgrSYyI1ytrYgSbKUHSybwqUDnbD2cw9PIWivuMvsN+GTXmr/DRN4VBXpHG6aGg== +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + +path-equal@^1.2.5: + version "1.2.5" + resolved "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz#9fcbdd5e5daee448e96f43f3bac06c666b5e982a" + integrity sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g== path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" - integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== +path-scurry@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz#6be0d0ee02a10d9e0de7a98bae65e182c9061f85" + integrity sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" -prettier@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" - integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +prettier@^3.8.3: + version "3.8.3" + resolved "https://registry.npmjs.org/prettier/-/prettier-3.8.3.tgz#560f2de55bf01b4c0503bc629d5df99b9a1d09b0" + integrity sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw== randombytes@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" +readdirp@^4.0.1: + version "4.1.2" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz#eb85801435fbf2a7ee58f19e0921b068fc69948d" + integrity sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg== require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-from-string@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== resolve@^1.3.2: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + version "1.22.12" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz#f5b2a680897c69c238a13cd16b15671f8b73549f" + integrity sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA== dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" + es-errors "^1.3.0" + is-core-module "^2.16.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" safe-buffer@^5.1.0: version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-stable-stringify@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.2.0.tgz#26a52f13a6988de16a0d88e20248f38e8a7d840c" - integrity sha512-C6AuMdYPuPV/P1leplHNu0lgc2LAElq/g3TdoksDCIVtBhr78o/CH03bt/9SKqugFbKU9CUjsNlCu0fjtQzQUw== +safe-stable-stringify@^2.5.0: + version "2.5.0" + resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== semver@^5.3.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + version "5.7.2" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" -source-map-support@^0.5.20: - version "0.5.20" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" - integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +source-map-support@^0.5.21: + version "0.5.21" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" source-map@^0.6.0: version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: - ansi-regex "^5.0.0" + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" -strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== +string-width@^7.0.0, string-width@^7.2.0: + version "7.2.0" + resolved "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz#b5bb8e2165ce275d4d43476dd2700ad9091db6dc" + integrity sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ== dependencies: - has-flag "^4.0.0" + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1, strip-ansi@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz#d22a269522836a627af8d04b5c3fd2c7fa3e32e3" + integrity sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w== + dependencies: + ansi-regex "^6.2.2" + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== supports-color@^5.3.0: version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: - is-number "^7.0.0" + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -ts-node@^10.9.1: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" @@ -860,12 +962,12 @@ ts-node@^10.9.1: tslib@^1.13.0, tslib@^1.8.1: version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslint@^6.1.3: version "6.1.3" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" + resolved "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" integrity sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg== dependencies: "@babel/code-frame" "^7.0.0" @@ -884,77 +986,97 @@ tslint@^6.1.3: tsutils@^2.29.0: version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + resolved "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== dependencies: tslib "^1.8.1" -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +typescript@~5.9.3: + version "5.9.3" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" + integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== -typescript@~4.8.2: - version "4.8.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790" - integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" +undici-types@~7.16.0: + version "7.16.0" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46" + integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== v8-compile-cache-lib@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -which@2.0.2: +which@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" -workerpool@6.1.5: - version "6.1.5" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.5.tgz#0f7cf076b6215fd7e1da903ff6f22ddd1886b581" - integrity sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw== +workerpool@^9.2.0: + version "9.3.4" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz#f6c92395b2141afd78e2a889e80cb338fe9fca41" + integrity sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg== + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + +wrap-ansi@^9.0.0: + version "9.0.2" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz#956832dea9494306e6d209eb871643bb873d7c98" + integrity sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww== + dependencies: + ansi-styles "^6.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== y18n@^5.0.5: version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@^22.0.0: + version "22.0.0" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz#87b82094051b0567717346ecd00fd14804b357c8" + integrity sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw== -yargs-unparser@2.0.0: +yargs-unparser@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== dependencies: camelcase "^6.0.0" @@ -962,38 +1084,37 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== 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.0" + string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^20.2.2" + yargs-parser "^21.1.1" -yargs@^17.1.1: - version "17.1.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.1.1.tgz#c2a8091564bdb196f7c0a67c1d12e5b85b8067ba" - integrity sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ== +yargs@^18.0.0: + version "18.0.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz#6c84259806273a746b09f579087b68a3c2d25bd1" + integrity sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg== dependencies: - cliui "^7.0.2" + cliui "^9.0.1" escalade "^3.1.1" get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" + string-width "^7.2.0" y18n "^5.0.5" - yargs-parser "^20.2.2" + yargs-parser "^22.0.0" yn@3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==