From 79b94e5870ca8a3bdb24128fdba7cf66a7d39815 Mon Sep 17 00:00:00 2001 From: inferrinizzard Date: Sun, 12 May 2024 15:05:23 -0700 Subject: [PATCH] chore: ESLint fixes (#2558) * standardise json formatting * add file association for schema files * install eslint packages * add eslint config * remove tslint * eslint autofix * update eslint rules, eslintignore * add lint:fix script * update eslint rules, eslintignore * add lint:fix script * add import rules * add import rules * update import rules * reduce excess style rules * downgrade remaining to warnings * fix enum values fixup! fix enum values * add all missing accessibility modifiers fixup! add all missing accessibility modifiers fixup! add all missing accessibility modifiers * fix nullish errors * update import rules * fix all require imports * fix all imports * reduce excess style rules * fix any types fixup! fix any types fixup! fix any types * fix misc errors * downgrade remaining to warnings * return types * fix types errors * fix json import for test tsconfig * auto lint fix * fix lint errors in extension * fix lint errors in Elixir * make ref.pushElement public * fix misc * fix accidental public in CSharp raw text get * fix new lint errors --- package-lock.json | 12076 ++-------------- package.json | 1 + packages/quicktype-core/package.json | 6 +- packages/quicktype-core/src/Annotation.ts | 3 +- .../quicktype-core/src/ConvenienceRenderer.ts | 128 +- packages/quicktype-core/src/CycleBreaker.ts | 13 +- packages/quicktype-core/src/DateTime.ts | 11 +- packages/quicktype-core/src/DeclarationIR.ts | 27 +- packages/quicktype-core/src/GatherNames.ts | 35 +- packages/quicktype-core/src/Graph.ts | 27 +- packages/quicktype-core/src/GraphRewriting.ts | 145 +- .../quicktype-core/src/MakeTransformations.ts | 81 +- packages/quicktype-core/src/MarkovChain.ts | 32 +- packages/quicktype-core/src/Messages.ts | 33 +- packages/quicktype-core/src/Naming.ts | 136 +- packages/quicktype-core/src/Renderer.ts | 123 +- .../quicktype-core/src/RendererOptions.ts | 54 +- packages/quicktype-core/src/Run.ts | 166 +- packages/quicktype-core/src/Source.ts | 40 +- packages/quicktype-core/src/TargetLanguage.ts | 58 +- packages/quicktype-core/src/Transformers.ts | 358 +- packages/quicktype-core/src/Type.ts | 263 +- packages/quicktype-core/src/TypeBuilder.ts | 166 +- packages/quicktype-core/src/TypeGraph.ts | 120 +- packages/quicktype-core/src/TypeUtils.ts | 66 +- packages/quicktype-core/src/UnifyClasses.ts | 26 +- packages/quicktype-core/src/UnionBuilder.ts | 90 +- .../src/attributes/AccessorNames.ts | 39 +- .../src/attributes/Constraints.ts | 47 +- .../src/attributes/Description.ts | 50 +- .../src/attributes/EnumValues.ts | 14 +- .../src/attributes/StringTypes.ts | 75 +- .../src/attributes/TypeAttributes.ts | 55 +- .../src/attributes/TypeNames.ts | 89 +- .../src/attributes/URIAttributes.ts | 24 +- packages/quicktype-core/src/index.ts | 48 +- .../src/input/CompressedJSON.ts | 80 +- .../src/input/FetchingJSONSchemaStore.ts | 8 +- .../quicktype-core/src/input/Inference.ts | 65 +- packages/quicktype-core/src/input/Inputs.ts | 97 +- .../src/input/JSONSchemaInput.ts | 363 +- .../src/input/JSONSchemaStore.ts | 16 +- .../src/input/PostmanCollection.ts | 11 +- .../quicktype-core/src/input/io/NodeIO.ts | 13 +- .../src/input/io/get-stream/buffer-stream.ts | 6 +- .../src/input/io/get-stream/index.ts | 22 +- packages/quicktype-core/src/language/All.ts | 43 +- packages/quicktype-core/src/language/CJSON.ts | 621 +- .../quicktype-core/src/language/CPlusPlus.ts | 285 +- .../quicktype-core/src/language/CSharp.ts | 207 +- .../quicktype-core/src/language/Crystal.ts | 43 +- packages/quicktype-core/src/language/Dart.ts | 100 +- .../quicktype-core/src/language/Elixir.ts | 83 +- packages/quicktype-core/src/language/Elm.ts | 93 +- .../quicktype-core/src/language/Golang.ts | 57 +- .../quicktype-core/src/language/Haskell.ts | 63 +- .../quicktype-core/src/language/JSONSchema.ts | 61 +- packages/quicktype-core/src/language/Java.ts | 237 +- .../quicktype-core/src/language/JavaScript.ts | 109 +- .../src/language/JavaScriptPropTypes.ts | 75 +- .../src/language/JavaScriptUnicodeMaps.ts | 3 +- .../quicktype-core/src/language/Kotlin.ts | 96 +- .../src/language/Objective-C.ts | 122 +- packages/quicktype-core/src/language/Php.ts | 175 +- packages/quicktype-core/src/language/Pike.ts | 34 +- .../quicktype-core/src/language/Python.ts | 260 +- packages/quicktype-core/src/language/Rust.ts | 78 +- .../quicktype-core/src/language/Scala3.ts | 76 +- .../quicktype-core/src/language/Smithy4s.ts | 66 +- packages/quicktype-core/src/language/Swift.ts | 158 +- .../src/language/TypeScriptEffectSchema.ts | 62 +- .../src/language/TypeScriptFlow.ts | 57 +- .../src/language/TypeScriptZod.ts | 106 +- .../quicktype-core/src/language/ruby/index.ts | 120 +- .../src/language/ruby/keywords.ts | 8 +- .../src/rewrites/CombineClasses.ts | 21 +- .../src/rewrites/ExpandStrings.ts | 35 +- .../src/rewrites/FlattenStrings.ts | 14 +- .../src/rewrites/FlattenUnions.ts | 19 +- .../quicktype-core/src/rewrites/InferMaps.ts | 18 +- .../src/rewrites/ReplaceObjectType.ts | 12 +- .../src/rewrites/ResolveIntersections.ts | 73 +- .../quicktype-core/src/support/Acronyms.ts | 10 +- packages/quicktype-core/src/support/Chance.ts | 31 +- .../quicktype-core/src/support/Comments.ts | 20 +- .../quicktype-core/src/support/Converters.ts | 6 +- .../quicktype-core/src/support/Strings.ts | 100 +- .../quicktype-core/src/support/Support.ts | 60 +- packages/quicktype-core/src/types.ts | 6 + packages/quicktype-graphql-input/src/index.ts | 169 +- .../quicktype-typescript-input/src/index.ts | 12 +- packages/quicktype-vscode/src/extension.ts | 169 +- src/CompressedJSONFromStream.ts | 16 +- src/GraphQLIntrospection.ts | 10 +- src/TypeSource.ts | 6 +- src/URLGrammar.ts | 14 +- src/index.ts | 192 +- test/tsconfig.json | 3 +- tsconfig.json | 3 +- 99 files changed, 5877 insertions(+), 14046 deletions(-) create mode 100644 packages/quicktype-core/src/types.ts diff --git a/package-lock.json b/package-lock.json index 4923f1c64..1dd564e76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,7 @@ { "name": "quicktype", "version": "23.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -45,6 +45,7 @@ "@types/shelljs": "^0.8.15", "@types/stream-json": "^1.7.3", "@types/urijs": "^1.19.25", + "@types/wordwrap": "^1.0.3", "@typescript-eslint/eslint-plugin": "^6.3.0", "@typescript-eslint/parser": "^6.3.0", "ajv": "^5.5.2", @@ -72,8 +73,7 @@ }, "node_modules/@75lb/deep-merge": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.1.tgz", - "integrity": "sha512-xvgv6pkMGBA6GwdyJbNAnDmfAIR/DfWhrj9jgWh3TY7gRm3KO46x/GPjRg6wJ0nOepwqrNxFfojebh0Df4h4Tw==", + "license": "MIT", "dependencies": { "lodash.assignwith": "^4.2.0", "typical": "^7.1.1" @@ -84,17 +84,15 @@ }, "node_modules/@75lb/deep-merge/node_modules/typical": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", - "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==", + "license": "MIT", "engines": { "node": ">=12.17" } }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -109,7 +107,7 @@ "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=12" + "node": ">=6.0.0" } }, "node_modules/@ampproject/remapping/node_modules/@jridgewell/trace-mapping": { @@ -148,30 +146,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz", - "integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", - "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz", + "integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.1", + "@babel/generator": "^7.24.5", "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", + "@babel/helper-module-transforms": "^7.24.5", + "@babel/helpers": "^7.24.5", + "@babel/parser": "^7.24.5", "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -196,9 +194,9 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.1.tgz", - "integrity": "sha512-d5guuzMlPeDfZIbpQ8+g1NaCNuAGBBGNECh0HVqz1sjOeVLh2CEaifuOysCH18URW6R7pqXINvf5PaR/dC6jLQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.5.tgz", + "integrity": "sha512-gsUcqS/fPlgAw1kOtpss7uhY6E9SFFANQ6EFX5GTvzUwaV0+sGaZWk6xq22MOdeT9wfxyokW3ceCUvOiRtZciQ==", "dev": true, "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", @@ -210,7 +208,7 @@ }, "peerDependencies": { "@babel/core": "^7.11.0", - "eslint": "^7.5.0 || ^8.0.0" + "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": { @@ -232,9 +230,9 @@ } }, "node_modules/@babel/eslint-plugin": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/eslint-plugin/-/eslint-plugin-7.23.5.tgz", - "integrity": "sha512-03+E/58Hoo/ui69gR+beFdGpplpoVK0BSIdke2iw4/Bz7eGN0ssRenNlnU4nmbkowNQOPCStKSwFr8H6DiY49g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/eslint-plugin/-/eslint-plugin-7.24.5.tgz", + "integrity": "sha512-5n3K9Zv13VOa9SG2ZiX0WV7A0ddApRn6vsV8zBojCsxnCbYKLjCDvzDfVxS7C4STmjQDOXU1uk/ppxxDTC860w==", "dev": true, "dependencies": { "eslint-rule-composer": "^0.3.0" @@ -244,16 +242,16 @@ }, "peerDependencies": { "@babel/eslint-parser": "^7.11.0", - "eslint": "^7.5.0 || ^8.0.0" + "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/@babel/generator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", - "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", + "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", "dev": true, "dependencies": { - "@babel/types": "^7.24.0", + "@babel/types": "^7.24.5", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -372,16 +370,16 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz", + "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.24.3", + "@babel/helper-simple-access": "^7.24.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -391,33 +389,33 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz", + "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -433,9 +431,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -451,26 +449,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz", - "integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz", + "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==", "dev": true, "dependencies": { "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.5", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -494,9 +492,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", - "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -573,9 +571,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", - "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", + "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -585,9 +583,9 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.1.tgz", - "integrity": "sha512-T9ko/35G+Bkl+win48GduaPlhSlOjjE5s1TeiEcD+QpxlLQnoEfb/nO/T+TQqkm+ipFwORn+rB8w14iJ/uD0bg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.5.tgz", + "integrity": "sha512-GWO0mgzNMLWaSYM4z4NVIuY0Cd1fl8cPnuetuddu5w/qGuvt5Y7oUi/kvvQGK9xgOkFJDQX2heIvTRn/OQ1XTg==", "dev": true, "dependencies": { "core-js-pure": "^3.30.2", @@ -612,19 +610,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", + "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -642,13 +640,13 @@ } }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -657,14 +655,12 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -686,719 +682,358 @@ "node": ">=16" } }, - "node_modules/@esbuild/aix-ppc64": { + "node_modules/@esbuild/win32-x64": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", - "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", "cpu": [ - "ppc64" + "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ - "aix" + "win32" ], "engines": { "node": ">=12" } }, - "node_modules/@esbuild/android-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", - "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", - "cpu": [ - "arm" - ], + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", "dev": true, - "optional": true, - "os": [ - "android" - ], + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@esbuild/android-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", - "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", - "cpu": [ - "arm64" - ], + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", "dev": true, - "optional": true, - "os": [ - "android" - ], + "license": "MIT", "engines": { - "node": ">=12" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@esbuild/android-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", - "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", - "cpu": [ - "x64" - ], + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", "dev": true, - "optional": true, - "os": [ - "android" - ], + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", - "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", - "cpu": [ - "arm64" - ], + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", - "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", - "cpu": [ - "x64" - ], + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } + "license": "Python-2.0" }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", - "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", - "cpu": [ - "arm64" - ], + "node_modules/@eslint/eslintrc/node_modules/fast-deep-equal": { + "version": "3.1.3", "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } + "license": "MIT" }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", - "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", - "cpu": [ - "x64" - ], + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@esbuild/linux-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", - "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", - "cpu": [ - "arm" - ], + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } + "license": "MIT" }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", - "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", - "cpu": [ - "arm64" - ], + "node_modules/@eslint/js": { + "version": "8.57.0", "dev": true, - "optional": true, - "os": [ - "linux" - ], + "license": "MIT", "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", - "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", - "cpu": [ - "ia32" - ], + "node_modules/@glideapps/ts-necessities": { + "version": "2.2.3", + "license": "MIT" + }, + "node_modules/@graphql-eslint/eslint-plugin": { + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@graphql-eslint/eslint-plugin/-/eslint-plugin-3.20.1.tgz", + "integrity": "sha512-RbwVlz1gcYG62sECR1u0XqMh8w5e5XMCCZoMvPQ3nJzEBCTfXLGX727GBoRmSvY1x4gJmqNZ1lsOX7lZY14RIw==", "dev": true, - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@graphql-tools/code-file-loader": "^7.3.6", + "@graphql-tools/graphql-tag-pluck": "^7.3.6", + "@graphql-tools/utils": "^9.0.0", + "chalk": "^4.1.2", + "debug": "^4.3.4", + "fast-glob": "^3.2.12", + "graphql-config": "^4.4.0", + "graphql-depth-limit": "^1.1.0", + "lodash.lowercase": "^4.3.0", + "tslib": "^2.4.1" + }, "engines": { "node": ">=12" + }, + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", - "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", - "cpu": [ - "loong64" - ], + "node_modules/@graphql-eslint/eslint-plugin/node_modules/@graphql-tools/code-file-loader": { + "version": "7.3.23", + "resolved": "https://registry.npmjs.org/@graphql-tools/code-file-loader/-/code-file-loader-7.3.23.tgz", + "integrity": "sha512-8Wt1rTtyTEs0p47uzsPJ1vAtfAx0jmxPifiNdmo9EOCuUPyQGEbMaik/YkqZ7QUFIEYEQu+Vgfo8tElwOPtx5Q==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "dependencies": { + "@graphql-tools/graphql-tag-pluck": "7.5.2", + "@graphql-tools/utils": "^9.2.1", + "globby": "^11.0.3", + "tslib": "^2.4.0", + "unixify": "^1.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", - "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", - "cpu": [ - "mips64el" - ], + "node_modules/@graphql-eslint/eslint-plugin/node_modules/@graphql-tools/graphql-tag-pluck": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.5.2.tgz", + "integrity": "sha512-RW+H8FqOOLQw0BPXaahYepVSRjuOHw+7IL8Opaa5G5uYGOBxoXR7DceyQ7BcpMgktAOOmpDNQ2WtcboChOJSRA==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "dependencies": { + "@babel/parser": "^7.16.8", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8", + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", - "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", - "cpu": [ - "ppc64" - ], + "node_modules/@graphql-eslint/eslint-plugin/node_modules/@graphql-tools/utils": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", + "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "dependencies": { + "@graphql-typed-document-node/core": "^3.1.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", - "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } + "node_modules/@graphql-eslint/eslint-plugin/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", - "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", - "cpu": [ - "s390x" - ], + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@esbuild/linux-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", - "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", - "cpu": [ - "x64" - ], + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", "dev": true, - "optional": true, - "os": [ - "linux" - ], + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, "engines": { - "node": ">=12" + "node": ">=10.10.0" } }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", - "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", - "cpu": [ - "x64" - ], + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", "dev": true, - "optional": true, - "os": [ - "netbsd" - ], + "license": "Apache-2.0", "engines": { - "node": ">=12" + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", - "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", - "cpu": [ - "x64" - ], + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } + "license": "BSD-3-Clause" }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", - "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", - "cpu": [ - "x64" - ], + "node_modules/@isaacs/cliui": { + "version": "8.0.2", "dev": true, - "optional": true, - "os": [ - "sunos" - ], + "license": "ISC", + "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" + }, "engines": { "node": ">=12" } }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", - "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", - "cpu": [ - "arm64" - ], + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", "dev": true, - "optional": true, - "os": [ - "win32" - ], + "license": "MIT", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", - "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", - "cpu": [ - "ia32" - ], + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", "dev": true, - "optional": true, - "os": [ - "win32" - ], + "license": "MIT", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@esbuild/win32-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", - "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", - "cpu": [ - "x64" - ], + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } + "license": "MIT" }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", "dev": true, + "license": "MIT", "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", "dev": true, + "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@eslint/eslintrc/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", "dev": true, + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=8" } }, - "node_modules/@glideapps/ts-necessities": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.2.3.tgz", - "integrity": "sha512-gXi0awOZLHk3TbW55GZLCPP6O+y/b5X1pBXKBVckFONSwF1z1E5ND2BGJsghQFah+pW7pkkyFb2VhUQI2qhL5w==" - }, - "node_modules/@graphql-eslint/eslint-plugin": { - "version": "3.20.1", - "resolved": "https://registry.npmjs.org/@graphql-eslint/eslint-plugin/-/eslint-plugin-3.20.1.tgz", - "integrity": "sha512-RbwVlz1gcYG62sECR1u0XqMh8w5e5XMCCZoMvPQ3nJzEBCTfXLGX727GBoRmSvY1x4gJmqNZ1lsOX7lZY14RIw==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@graphql-tools/code-file-loader": "^7.3.6", - "@graphql-tools/graphql-tag-pluck": "^7.3.6", - "@graphql-tools/utils": "^9.0.0", - "chalk": "^4.1.2", - "debug": "^4.3.4", - "fast-glob": "^3.2.12", - "graphql-config": "^4.4.0", - "graphql-depth-limit": "^1.1.0", - "lodash.lowercase": "^4.3.0", - "tslib": "^2.4.1" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=12" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "node": ">=6.0.0" } }, - "node_modules/@graphql-eslint/eslint-plugin/node_modules/@graphql-tools/code-file-loader": { - "version": "7.3.23", - "resolved": "https://registry.npmjs.org/@graphql-tools/code-file-loader/-/code-file-loader-7.3.23.tgz", - "integrity": "sha512-8Wt1rTtyTEs0p47uzsPJ1vAtfAx0jmxPifiNdmo9EOCuUPyQGEbMaik/YkqZ7QUFIEYEQu+Vgfo8tElwOPtx5Q==", + "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@graphql-tools/graphql-tag-pluck": "7.5.2", - "@graphql-tools/utils": "^9.2.1", - "globby": "^11.0.3", - "tslib": "^2.4.0", - "unixify": "^1.0.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-eslint/eslint-plugin/node_modules/@graphql-tools/graphql-tag-pluck": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.5.2.tgz", - "integrity": "sha512-RW+H8FqOOLQw0BPXaahYepVSRjuOHw+7IL8Opaa5G5uYGOBxoXR7DceyQ7BcpMgktAOOmpDNQ2WtcboChOJSRA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.16.8", - "@babel/plugin-syntax-import-assertions": "^7.20.0", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-eslint/eslint-plugin/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-eslint/eslint-plugin/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - }, - "node_modules/@graphql-typed-document-node/core": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", - "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", - "dev": true, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", - "dev": true - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "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" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -1414,13 +1049,11 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -1428,8 +1061,7 @@ }, "node_modules/@mark.probst/typescript-json-schema": { "version": "0.55.0", - "resolved": "https://registry.npmjs.org/@mark.probst/typescript-json-schema/-/typescript-json-schema-0.55.0.tgz", - "integrity": "sha512-jI48mSnRgFQxXiE/UTUCVCpX8lK3wCFKLF1Ss2aEreboKNuLQGt3e0/YFqWVHe/WENxOaqiJvwOz+L/SrN2+qQ==", + "license": "BSD-3-Clause", "dependencies": { "@types/json-schema": "^7.0.9", "@types/node": "^16.9.2", @@ -1446,13 +1078,11 @@ }, "node_modules/@mark.probst/typescript-json-schema/node_modules/@types/node": { "version": "16.18.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.11.tgz", - "integrity": "sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==" + "license": "MIT" }, "node_modules/@mark.probst/typescript-json-schema/node_modules/typescript": { "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1484,10 +1114,10 @@ "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "*" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { @@ -1523,9 +1153,8 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1536,18 +1165,16 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1592,16 +1219,16 @@ "dev": true }, "node_modules/@peculiar/webcrypto": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz", - "integrity": "sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.6.tgz", + "integrity": "sha512-YBcMfqNSwn3SujUJvAaySy5tlYbYm6tVt9SKoXu8BaTdKGROiJDgPR3TXpZdAKUfklzm3lRapJEAltiMQtBgZg==", "dev": true, "dependencies": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.5", "tslib": "^2.6.2", - "webcrypto-core": "^1.7.8" + "webcrypto-core": "^1.7.9" }, "engines": { "node": ">=10.12.0" @@ -1615,9 +1242,8 @@ }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=14" @@ -1642,69 +1268,59 @@ "dev": true }, "node_modules/@rushstack/eslint-patch": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.8.0.tgz", - "integrity": "sha512-0HejFckBN2W+ucM6cUOlwsByTKt9/+0tWhqUffNIcHqCXkthY/mZ7AuYPK/2IIaGWhdl0h+tICDO0ssLMd6XMQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.2.tgz", + "integrity": "sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw==", "dev": true }, "node_modules/@tootallnate/once": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/@tsconfig/node10": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" + "license": "MIT" }, "node_modules/@tsconfig/node18": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-1.0.1.tgz", - "integrity": "sha512-sNFeK6X2ATlhlvzyH4kKYQlfHXE2f2/wxtB9ClvYXevWpmwkUT7VaSrjIN9E76Qebz8qP5JOJJ9jD3QoD/Z9TA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/browser-or-node": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/browser-or-node/-/browser-or-node-1.3.2.tgz", - "integrity": "sha512-CkvJrvVMI4ZHbiL+Df22Owzq1IYnHnoSrM8s6Dmy4MRdqvdFi9bHsIvyFrSGJPOxvFI9Y3MqY2gFCqIafJBcfw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/command-line-args": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", - "integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/command-line-usage": { "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.4.tgz", - "integrity": "sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/glob": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dev": true, + "license": "MIT", "dependencies": { "@types/minimatch": "*", "@types/node": "*" @@ -1712,20 +1328,23 @@ }, "node_modules/@types/graphql": { "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-0.11.8.tgz", - "integrity": "sha512-xGWx4kx9JKlqxDrZA12gw5qi2lvxPNLxnQQcoTXVX83MuGcXcpb7TADatGyGW51GaaXQOQTbjw3x4HuL3ULBaA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/is-url": { + "version": "1.2.32", + "resolved": "https://registry.npmjs.org/@types/is-url/-/is-url-1.2.32.tgz", + "integrity": "sha512-46VLdbWI8Sc+hPexQ6NLNR2YpoDyDZIpASHkJQ2Yr+Kf9Giw6LdCTkwOdsnHKPQeh7xTjTmSnxbE8qpxYuCiHA==", "dev": true }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" + "license": "MIT" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -1741,29 +1360,25 @@ }, "node_modules/@types/minimatch": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/mocha": { "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { "version": "18.19.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz", - "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==", + "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/node-persist": { "version": "3.1.8", - "resolved": "https://registry.npmjs.org/@types/node-persist/-/node-persist-3.1.8.tgz", - "integrity": "sha512-QLidg6/SadZYPrTKxtxL1A85XBoQlG40bhoMdhu6DH6+eNCMr2j+RGfFZ9I9+IY8W/PDwQonJ+iBWD62jZjMfg==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -1776,33 +1391,32 @@ }, "node_modules/@types/pako": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.0.tgz", - "integrity": "sha1-6q6DZNG391LiY7w/1o3+yY5hNsU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/pluralize": { "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.30.tgz", - "integrity": "sha512-kVww6xZrW/db5BR9OqiT71J9huRdQ+z/r+LbDuT7/EK50mCmj5FoaIARnVv0rvjUS/YpDox0cDU9lpQT011VBA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/readable-stream": { "version": "4.0.10", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.10.tgz", - "integrity": "sha512-AbUKBjcC8SHmImNi4yK2bbjogQlkFSg7shZCcicxPQapniOlajG8GCc39lvXzCWX4lLRRs7DM3VAeSlqmEVZUA==", - "dev": true + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + } }, "node_modules/@types/semver": { "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/shelljs": { "version": "0.8.15", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.15.tgz", - "integrity": "sha512-vzmnCHl6hViPu9GNLQJ+DZFd6BQI2DBTUeOvYHqkWQLMfKAAQYMb/xAmZkTogZI/vqXHCWkqDRymDI5p0QTi5Q==", "dev": true, + "license": "MIT", "dependencies": { "@types/glob": "~7.2.0", "@types/node": "*" @@ -1810,18 +1424,16 @@ }, "node_modules/@types/stream-chain": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stream-chain/-/stream-chain-2.0.1.tgz", - "integrity": "sha512-D+Id9XpcBpampptkegH7WMsEk6fUdf9LlCIX7UhLydILsqDin4L0QT7ryJR0oycwC7OqohIzdfcMHVZ34ezNGg==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/stream-json": { "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@types/stream-json/-/stream-json-1.7.3.tgz", - "integrity": "sha512-Jqsyq5VPOTWorvEmzWhEWH5tJnHA+bB8vt/Zzb11vSDj8esfSHDMj2rbVjP0mfJQzl3YBJSXBBq08iiyaBK3KA==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "@types/stream-chain": "*" @@ -1829,19 +1441,22 @@ }, "node_modules/@types/unicode-properties": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@types/unicode-properties/-/unicode-properties-1.3.0.tgz", - "integrity": "sha512-kDVlxpdkCfgvzfXcglkr7j4OSMjCEEo/Jloj4tFuldYZpQ9Uypy7FGXPhNstoj4eGvhddwuu5n0EfI+XdWVoVA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/urijs": { "version": "1.19.25", - "resolved": "https://registry.npmjs.org/@types/urijs/-/urijs-1.19.25.tgz", - "integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==" + "license": "MIT" }, "node_modules/@types/vscode": { "version": "1.88.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.88.0.tgz", - "integrity": "sha512-rWY+Bs6j/f1lvr8jqZTyp5arRMfovdxolcqGi+//+cPDOh8SBvzXH90e7BiSXct5HJ9HGW6jATchbRTpTJpEkw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/wordwrap": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/wordwrap/-/wordwrap-1.0.3.tgz", + "integrity": "sha512-jx39cOYWJxZxVOZeNHvLVoDLRUFcYtIJaurC6C0qzCovIB3GPDbMDbYvoWi9D1B2PtIE16rElQOFR4Y+8QbUgw==", "dev": true }, "node_modules/@types/ws": { @@ -2225,15 +1840,13 @@ }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/@vscode/test-cli": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.6.tgz", - "integrity": "sha512-4i61OUv5PQr3GxhHOuUgHdgBDfIO/kXTPCsEyFiMaY4SOqQTgkTmyZLagHehjOgCfsXdcrJa3zgQ7zoc+Dh6hQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/mocha": "^10.0.2", "c8": "^9.1.0", @@ -2251,18 +1864,16 @@ }, "node_modules/@vscode/test-cli/node_modules/brace-expansion": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/@vscode/test-cli/node_modules/glob": { "version": "10.3.12", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", - "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.6", @@ -2282,9 +1893,8 @@ }, "node_modules/@vscode/test-cli/node_modules/minimatch": { "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2297,9 +1907,8 @@ }, "node_modules/@vscode/test-cli/node_modules/supports-color": { "version": "9.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", - "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2309,9 +1918,8 @@ }, "node_modules/@vscode/test-cli/node_modules/yargs": { "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -2327,9 +1935,8 @@ }, "node_modules/@vscode/test-electron": { "version": "2.3.9", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.9.tgz", - "integrity": "sha512-z3eiChaCQXMqBnk2aHHSEkobmC2VRalFQN0ApOAtydL172zXGxTwGrRtviT5HnUB+Q+G3vtEYFtuQkYqBzYgMA==", "dev": true, + "license": "MIT", "dependencies": { "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", @@ -2342,9 +1949,8 @@ }, "node_modules/@vscode/vsce": { "version": "2.25.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.25.0.tgz", - "integrity": "sha512-VXMCGUaP6wKBadA7vFQdsksxkBAMoh4ecZgXBwauZMASAgnwYesHyLnqIyWYeRwjy2uEpitHvz/1w5ENnR30pg==", "dev": true, + "license": "MIT", "dependencies": { "azure-devops-node-api": "^12.5.0", "chalk": "^2.4.2", @@ -2381,9 +1987,8 @@ }, "node_modules/@vscode/vsce/node_modules/chalk": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -2393,16 +1998,12 @@ "node": ">=4" } }, - "node_modules/@vscode/vsce/node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "node_modules/@vscode/vsce/node_modules/commander": { + "version": "6.2.1", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">= 6" } }, "node_modules/@whatwg-node/events": { @@ -2445,8 +2046,7 @@ }, "node_modules/abort-controller": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", "dependencies": { "event-target-shim": "^5.0.0" }, @@ -2456,8 +2056,7 @@ }, "node_modules/acorn": { "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -2467,26 +2066,23 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/agent-base": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, + "license": "MIT", "dependencies": { "debug": "4" }, @@ -2496,9 +2092,8 @@ }, "node_modules/ajv": { "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, + "license": "MIT", "dependencies": { "co": "^4.6.0", "fast-deep-equal": "^1.0.0", @@ -2508,26 +2103,23 @@ }, "node_modules/ansi-colors": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -2537,9 +2129,8 @@ }, "node_modules/anymatch": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2548,15 +2139,6 @@ "node": ">= 8" } }, - "node_modules/anymatch/node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/are-docs-informative": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", @@ -2568,14 +2150,7 @@ }, "node_modules/arg": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "license": "MIT" }, "node_modules/aria-query": { "version": "5.3.0", @@ -2588,8 +2163,7 @@ }, "node_modules/array-back": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "license": "MIT", "engines": { "node": ">=6" } @@ -2817,15 +2391,13 @@ }, "node_modules/asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/available-typed-arrays": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "license": "MIT", "dependencies": { "possible-typed-array-names": "^1.0.0" }, @@ -2856,9 +2428,8 @@ }, "node_modules/azure-devops-node-api": { "version": "12.5.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", - "integrity": "sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==", "dev": true, + "license": "MIT", "dependencies": { "tunnel": "0.0.6", "typed-rest-client": "^1.8.4" @@ -2866,13 +2437,10 @@ }, "node_modules/balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "funding": [ { "type": "github", @@ -2886,13 +2454,13 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/binary-extensions": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -2902,9 +2470,8 @@ }, "node_modules/bl": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "buffer": "^5.5.0", @@ -2914,8 +2481,6 @@ }, "node_modules/bl/node_modules/buffer": { "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { @@ -2931,6 +2496,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "optional": true, "dependencies": { "base64-js": "^1.3.1", @@ -2939,9 +2505,8 @@ }, "node_modules/bl/node_modules/readable-stream": { "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "inherits": "^2.0.3", @@ -2954,9 +2519,8 @@ }, "node_modules/boolbase": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/boolean": { "version": "3.2.0", @@ -2966,8 +2530,7 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2975,9 +2538,8 @@ }, "node_modules/braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -2987,9 +2549,8 @@ }, "node_modules/brfs": { "version": "1.6.1", - "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz", - "integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==", "dev": true, + "license": "MIT", "dependencies": { "quote-stream": "^1.0.1", "resolve": "^1.1.5", @@ -3002,14 +2563,12 @@ }, "node_modules/browser-or-node": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-3.0.0.tgz", - "integrity": "sha512-iczIdVJzGEYhP5DqQxYM9Hh7Ztpqqi+CXZpSmX8ALFs9ecXkQIeqRyM6TfxEfMVpwhl3dSuDvxdzzo9sUOIVBQ==" + "license": "MIT" }, "node_modules/browser-stdout": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/browserslist": { "version": "4.23.0", @@ -3045,8 +2604,6 @@ }, "node_modules/buffer": { "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "funding": [ { "type": "github", @@ -3061,6 +2618,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -3068,27 +2626,24 @@ }, "node_modules/buffer-crc32": { "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/buffer-equal": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", - "integrity": "sha512-RgSV6InVQ9ODPdLWJ5UAqBqJBOg370Nz6ZQtRzpt6nUjc8v0St97uJ4PYC6NztqIScrAXafKM3mZPMygSe1ggA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/buffer-from": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/busboy": { "version": "1.6.0", @@ -3104,9 +2659,8 @@ }, "node_modules/c8": { "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", "dev": true, + "license": "ISC", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", @@ -3129,9 +2683,8 @@ }, "node_modules/c8/node_modules/yargs": { "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -3147,9 +2700,8 @@ }, "node_modules/call-bind": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -3166,18 +2718,16 @@ }, "node_modules/callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase": { "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3186,9 +2736,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001600", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", - "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==", + "version": "1.0.30001614", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz", + "integrity": "sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog==", "dev": true, "funding": [ { @@ -3207,8 +2757,7 @@ }, "node_modules/chalk": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3222,8 +2771,7 @@ }, "node_modules/chalk-template": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", - "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", + "license": "MIT", "dependencies": { "chalk": "^4.1.2" }, @@ -3236,8 +2784,7 @@ }, "node_modules/chalk/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -3250,8 +2797,7 @@ }, "node_modules/chalk/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -3261,16 +2807,14 @@ }, "node_modules/chalk/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/chalk/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -3286,9 +2830,8 @@ }, "node_modules/cheerio": { "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", "dev": true, + "license": "MIT", "dependencies": { "cheerio-select": "^2.1.0", "dom-serializer": "^2.0.0", @@ -3307,9 +2850,8 @@ }, "node_modules/cheerio-select": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0", "css-select": "^5.1.0", @@ -3324,9 +2866,8 @@ }, "node_modules/chokidar": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -3346,32 +2887,10 @@ "fsevents": "~2.3.2" } }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/chokidar/node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/chownr": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true, + "license": "ISC", "optional": true }, "node_modules/ci-info": { @@ -3403,8 +2922,7 @@ }, "node_modules/cliui": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -3416,9 +2934,8 @@ }, "node_modules/co": { "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true, + "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" @@ -3426,43 +2943,37 @@ }, "node_modules/cockatiel": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cockatiel/-/cockatiel-3.1.2.tgz", - "integrity": "sha512-5yARKww0dWyWg2/3xZeXgoxjHLwpVqFptj9Zy7qioJ6+/L0ARM184sgMUrQDjxw7ePJWlGhV998mKhzrxT0/Kg==", "dev": true, + "license": "MIT", "engines": { "node": ">=16" } }, "node_modules/collection-utils": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collection-utils/-/collection-utils-1.0.1.tgz", - "integrity": "sha512-LA2YTIlR7biSpXkKYwwuzGjwL5rjWEZVOSnvdUc7gObvWe4WkjxOpfrdhoP7Hs09YWDVfg0Mal9BpAqLfVEzQg==" + "license": "Apache-2.0" }, "node_modules/color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "1.1.3" } }, "node_modules/color-convert/node_modules/color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -3472,8 +2983,7 @@ }, "node_modules/command-line-args": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", - "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "license": "MIT", "dependencies": { "array-back": "^3.1.0", "find-replace": "^3.0.0", @@ -3486,8 +2996,7 @@ }, "node_modules/command-line-usage": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.1.tgz", - "integrity": "sha512-NCyznE//MuTjwi3y84QVUGEOT+P5oto1e1Pk/jFPVdPPfsG03qpTIl3yw6etR+v73d0lXsoojRpvbru2sqePxQ==", + "license": "MIT", "dependencies": { "array-back": "^6.2.2", "chalk-template": "^0.4.0", @@ -3500,29 +3009,18 @@ }, "node_modules/command-line-usage/node_modules/array-back": { "version": "6.2.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", - "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "license": "MIT", "engines": { "node": ">=12.17" } }, "node_modules/command-line-usage/node_modules/typical": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", - "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==", + "license": "MIT", "engines": { "node": ">=12.17" } }, - "node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/comment-parser": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", @@ -3534,17 +3032,15 @@ }, "node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "license": "MIT" }, "node_modules/concat-stream": { "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "engines": [ "node >= 0.8" ], + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -3554,9 +3050,8 @@ }, "node_modules/concat-stream/node_modules/readable-stream": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -3569,14 +3064,13 @@ }, "node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/core-js-pure": { - "version": "3.36.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.36.1.tgz", - "integrity": "sha512-NXCvHvSVYSrewP0L5OhltzXeWFJLo2AL2TYnj6iLV3Bw8mM62wAQMNgUCRI6EBu6hVVpbCxmOPlxh1Ikw2PfUA==", + "version": "3.37.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.37.0.tgz", + "integrity": "sha512-d3BrpyFr5eD4KcbRvQ3FTUx/KWmaDesr7+a3+1+P46IUnNoEt+oiLijPINZMEon7w9oGkIINWxrBAU9DEciwFQ==", "dev": true, "hasInstallScript": true, "funding": { @@ -3586,8 +3080,7 @@ }, "node_modules/core-util-is": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "license": "MIT" }, "node_modules/cosmiconfig": { "version": "8.0.0", @@ -3604,6 +3097,24 @@ "node": ">=14" } }, + "node_modules/cosmiconfig/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/cosmiconfig/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/create-eslint-index": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/create-eslint-index/-/create-eslint-index-1.0.0.tgz", @@ -3618,22 +3129,19 @@ }, "node_modules/create-require": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + "license": "MIT" }, "node_modules/cross-fetch": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "license": "MIT", "dependencies": { "node-fetch": "^2.6.12" } }, "node_modules/cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -3645,9 +3153,8 @@ }, "node_modules/css-select": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", @@ -3661,9 +3168,8 @@ }, "node_modules/css-what": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">= 6" }, @@ -3736,9 +3242,8 @@ }, "node_modules/debug": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -3753,9 +3258,8 @@ }, "node_modules/decamelize": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3765,9 +3269,8 @@ }, "node_modules/decompress-response": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "mimic-response": "^3.1.0" @@ -3781,9 +3284,8 @@ }, "node_modules/deep-equal": { "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", "dev": true, + "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.0", "call-bind": "^1.0.5", @@ -3813,15 +3315,13 @@ }, "node_modules/deep-equal/node_modules/isarray": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deep-extend": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=4.0.0" @@ -3829,15 +3329,13 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/define-data-property": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -3852,9 +3350,8 @@ }, "node_modules/define-properties": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -3869,9 +3366,8 @@ }, "node_modules/delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -3887,9 +3383,8 @@ }, "node_modules/detect-libc": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", "dev": true, + "license": "Apache-2.0", "optional": true, "engines": { "node": ">=8" @@ -3897,8 +3392,7 @@ }, "node_modules/diff": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -3917,9 +3411,8 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -3929,9 +3422,8 @@ }, "node_modules/dom-serializer": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, + "license": "MIT", "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", @@ -3943,21 +3435,19 @@ }, "node_modules/domelementtype": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/fb55" } - ] + ], + "license": "BSD-2-Clause" }, "node_modules/domhandler": { "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "domelementtype": "^2.3.0" }, @@ -3970,9 +3460,8 @@ }, "node_modules/domutils": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", @@ -3993,18 +3482,16 @@ }, "node_modules/duplexer2": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "readable-stream": "^2.0.2" } }, "node_modules/duplexer2/node_modules/readable-stream": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -4017,34 +3504,30 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.717", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.717.tgz", - "integrity": "sha512-6Fmg8QkkumNOwuZ/5mIbMU9WI3H2fmn5ajcVya64I5Yr5CcNmO7vcLt0Y7c96DCiMO5/9G+4sI2r6eEvdg1F7A==", + "version": "1.4.751", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.751.tgz", + "integrity": "sha512-2DEPi++qa89SMGRhufWTiLmzqyuGmNF3SK4+PQetW1JKiZdEpF4XQonJXJCzyuYSA6mauiMhbyVhqYAP45Hvfw==", "dev": true }, "node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "license": "MIT" }, "node_modules/encoding": { "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "license": "MIT", "dependencies": { "iconv-lite": "^0.6.2" } }, "node_modules/end-of-stream": { "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "once": "^1.4.0" @@ -4064,9 +3547,8 @@ }, "node_modules/enhanced-resolve": { "version": "5.16.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -4077,9 +3559,8 @@ }, "node_modules/entities": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.12" }, @@ -4097,9 +3578,9 @@ } }, "node_modules/es-abstract": { - "version": "1.23.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.2.tgz", - "integrity": "sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", @@ -4141,11 +3622,11 @@ "safe-regex-test": "^1.0.3", "string.prototype.trim": "^1.2.9", "string.prototype.trimend": "^1.0.8", - "string.prototype.trimstart": "^1.0.7", + "string.prototype.trimstart": "^1.0.8", "typed-array-buffer": "^1.0.2", "typed-array-byte-length": "^1.0.1", "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.5", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", "which-typed-array": "^1.1.15" }, @@ -4158,9 +3639,8 @@ }, "node_modules/es-define-property": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -4170,18 +3650,16 @@ }, "node_modules/es-errors": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-get-iterator": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.3", @@ -4199,19 +3677,18 @@ }, "node_modules/es-get-iterator/node_modules/isarray": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/es-iterator-helpers": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz", - "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==", + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", "dev": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", + "es-abstract": "^1.23.3", "es-errors": "^1.3.0", "es-set-tostringtag": "^2.0.3", "function-bind": "^1.1.2", @@ -4282,10 +3759,9 @@ }, "node_modules/esbuild": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", - "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -4320,26 +3796,23 @@ }, "node_modules/escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/escodegen": { "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esprima": "^3.1.3", "estraverse": "^4.2.0", @@ -4357,33 +3830,18 @@ "source-map": "~0.6.1" } }, - "node_modules/escodegen/node_modules/esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha512-AWwVMNxwhN8+NIPQzAQZCm7RkLC4RbM3B1OobMuyp3i+w73X57KCKaVIxaRZb+DYCojq7rspo+fmuQfAboyhFg==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/escodegen/node_modules/estraverse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/escodegen/node_modules/levn": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -4394,9 +3852,8 @@ }, "node_modules/escodegen/node_modules/optionator": { "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -4411,8 +3868,6 @@ }, "node_modules/escodegen/node_modules/prelude-ls": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -4420,9 +3875,8 @@ }, "node_modules/escodegen/node_modules/type-check": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "~1.1.2" }, @@ -4432,9 +3886,8 @@ }, "node_modules/eslint": { "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -4794,9 +4247,9 @@ } }, "node_modules/eslint-plugin-cypress": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.1.tgz", - "integrity": "sha512-eLHLWP5Q+I4j2AWepYq0PgFEei9/s5LvjuSqWrxurkg1YZ8ltxdvMNmdSf0drnsNo57CTgYY/NIHHLRSWejR7w==", + "version": "2.15.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.2.tgz", + "integrity": "sha512-CtcFEQTDKyftpI22FVGpx8bkpKyYXBlNge6zSo0pl5/qJvBAnzaD76Vu2AsP16d6mTj478Ldn2mhgrWV+Xr0vQ==", "dev": true, "dependencies": { "globals": "^13.20.0" @@ -5175,9 +4628,9 @@ } }, "node_modules/eslint-plugin-jsonc": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.14.1.tgz", - "integrity": "sha512-Tei6G4N7pZulP5MHi0EIdtseiCqUPkDMd0O8Zrw4muMIlsjJ5/B9X+U3Pfo6B7l0mTL9LN9FwuWT70dRJ6z7tg==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.15.1.tgz", + "integrity": "sha512-PVFrqIJa8BbM/e828RSn0SwB/Z5ye+2LDuy2XqG6AymNgPsfApRRcznsbxP7VrjdLEU4Nb+g9n/d6opyp0jp9A==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -5250,9 +4703,9 @@ } }, "node_modules/eslint-plugin-mocha": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.1.tgz", - "integrity": "sha512-G85ALUgKaLzuEuHhoW3HVRgPTmia6njQC3qCG6CEvA8/Ja9PDZnRZOuzekMki+HaViEQXINuYsmhp5WR5/4MfA==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.3.tgz", + "integrity": "sha512-emc4TVjq5Ht0/upR+psftuz6IBG5q279p+1dSRDeHf+NS9aaerBi3lXKo1SEzwC29hFIW21gO89CEWSvRsi8IQ==", "dev": true, "dependencies": { "eslint-utils": "^3.0.0", @@ -5397,9 +4850,9 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", - "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, "engines": { "node": ">=10" @@ -5574,13 +5027,13 @@ } }, "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/scope-manager": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.4.0.tgz", - "integrity": "sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz", + "integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0" + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5591,9 +5044,9 @@ } }, "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.4.0.tgz", - "integrity": "sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz", + "integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5604,19 +5057,19 @@ } }, "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.4.0.tgz", - "integrity": "sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz", + "integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5632,18 +5085,18 @@ } }, "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/utils": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.4.0.tgz", - "integrity": "sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz", + "integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.4.0", - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/typescript-estree": "7.4.0", - "semver": "^7.5.4" + "@types/json-schema": "^7.0.15", + "@types/semver": "^7.5.8", + "@typescript-eslint/scope-manager": "7.8.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "semver": "^7.6.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5657,13 +5110,13 @@ } }, "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.4.0.tgz", - "integrity": "sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz", + "integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.4.0", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "7.8.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5683,9 +5136,9 @@ } }, "node_modules/eslint-plugin-vitest/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -5698,9 +5151,9 @@ } }, "node_modules/eslint-plugin-yml": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.13.2.tgz", - "integrity": "sha512-1i71VhmsG5UxE41rIJmJjhlTTxYy7upAY5Hqj8AdBc7rfJzRIZr3a2spuOS8+N7ZDCWsHAWY3J6lzQNQHDv6Uw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.14.0.tgz", + "integrity": "sha512-ESUpgYPOcAYQO9czugcX5OqRvn/ydDVwGCPXY4YjPqc09rHaUVUA6IE6HLQys4rXk/S+qx3EwTd1wHCwam/OWQ==", "dev": true, "dependencies": { "debug": "^4.3.2", @@ -5742,9 +5195,8 @@ }, "node_modules/eslint-scope": { "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -5785,9 +5237,8 @@ }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -5797,9 +5248,8 @@ }, "node_modules/eslint/node_modules/ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5811,11 +5261,15 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -5825,21 +5279,40 @@ }, "node_modules/eslint/node_modules/fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/espree": { "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -5853,10 +5326,9 @@ } }, "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "version": "3.1.3", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -5873,9 +5345,8 @@ }, "node_modules/esquery": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -5885,9 +5356,8 @@ }, "node_modules/esrecurse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -5897,17 +5367,14 @@ }, "node_modules/estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true, "engines": { "node": ">=0.10.0" @@ -5915,33 +5382,28 @@ }, "node_modules/event-target-shim": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/events": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", "engines": { "node": ">=0.8.x" } }, "node_modules/exec-sh": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.1.tgz", - "integrity": "sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg==", "dev": true, + "license": "MIT", "dependencies": { "merge": "^1.1.3" } }, "node_modules/exit": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true, "engines": { "node": ">= 0.8.0" @@ -5949,9 +5411,8 @@ }, "node_modules/expand-template": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", "dev": true, + "license": "(MIT OR WTFPL)", "optional": true, "engines": { "node": ">=6" @@ -5971,9 +5432,8 @@ }, "node_modules/falafel": { "version": "2.2.5", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.5.tgz", - "integrity": "sha512-HuC1qF9iTnHDnML9YZAdCDQwT0yKl/U55K4XSUXqGAA2GLoafFgWRqdAbhWJxXaYD4pyoVxAJ8wH670jMpI9DQ==", "dev": true, + "license": "MIT", "dependencies": { "acorn": "^7.1.1", "isarray": "^2.0.1" @@ -5984,9 +5444,8 @@ }, "node_modules/falafel/node_modules/acorn": { "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -5996,9 +5455,8 @@ }, "node_modules/falafel/node_modules/isarray": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-decode-uri-component": { "version": "1.0.1", @@ -6008,9 +5466,8 @@ }, "node_modules/fast-deep-equal": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-diff": { "version": "1.3.0", @@ -6034,29 +5491,15 @@ "node": ">=8.6.0" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-printf": { "version": "1.6.9", @@ -6096,27 +5539,24 @@ }, "node_modules/fastq": { "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/fd-slicer": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, + "license": "MIT", "dependencies": { "pend": "~1.2.0" } }, "node_modules/file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -6126,9 +5566,8 @@ }, "node_modules/fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -6138,8 +5577,7 @@ }, "node_modules/find-replace": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "license": "MIT", "dependencies": { "array-back": "^3.0.1" }, @@ -6149,9 +5587,8 @@ }, "node_modules/find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -6165,18 +5602,16 @@ }, "node_modules/flat": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, + "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, "node_modules/flat-cache": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -6188,24 +5623,21 @@ }, "node_modules/flatted": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/for-each": { "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, + "license": "MIT", "dependencies": { "is-callable": "^1.1.3" } }, "node_modules/foreground-child": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dev": true, + "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -6219,9 +5651,8 @@ }, "node_modules/form-data": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -6233,35 +5664,18 @@ }, "node_modules/fs-constants": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } + "license": "ISC" }, "node_modules/function-bind": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6286,9 +5700,8 @@ }, "node_modules/functions-have-names": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6304,17 +5717,15 @@ }, "node_modules/get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -6378,15 +5789,13 @@ }, "node_modules/github-from-package": { "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6403,22 +5812,20 @@ } }, "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "version": "5.1.2", "dev": true, + "license": "ISC", "dependencies": { - "is-glob": "^4.0.3" + "is-glob": "^4.0.1" }, "engines": { - "node": ">=10.13.0" + "node": ">= 6" } }, "node_modules/globals": { "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -6430,12 +5837,13 @@ } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -6466,9 +5874,8 @@ }, "node_modules/gopd": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -6478,9 +5885,8 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/grapheme-splitter": { "version": "1.0.4", @@ -6490,14 +5896,12 @@ }, "node_modules/graphemer": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/graphql": { "version": "0.11.7", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.11.7.tgz", - "integrity": "sha512-x7uDjyz8Jx+QPbpCFCMQ8lltnQa4p4vSYHx6ADe8rVYRTdsyhCJbvSty5DAsLVmU6cGakl+r8HQYolKHxk/tiw==", + "license": "MIT", "dependencies": { "iterall": "1.1.3" } @@ -6882,37 +6286,36 @@ } }, "node_modules/has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "version": "1.0.3", "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, "engines": { "node": ">= 0.4.0" } }, "node_modules/has-bigints": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/has-property-descriptors": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -6934,9 +6337,8 @@ }, "node_modules/has-symbols": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -6946,9 +6348,8 @@ }, "node_modules/has-tostringtag": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, + "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, @@ -6961,9 +6362,8 @@ }, "node_modules/hasown": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -6973,29 +6373,30 @@ }, "node_modules/he": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, + "license": "MIT", "bin": { "he": "bin/he" } }, "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true + "version": "4.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } }, "node_modules/html-escaper": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/htmlparser2": { "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -7004,6 +6405,7 @@ "url": "https://github.com/sponsors/fb55" } ], + "license": "MIT", "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", @@ -7013,9 +6415,8 @@ }, "node_modules/http-proxy-agent": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/once": "1", "agent-base": "6", @@ -7027,9 +6428,8 @@ }, "node_modules/https-proxy-agent": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "6", "debug": "4" @@ -7040,8 +6440,7 @@ }, "node_modules/iconv-lite": { "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -7051,8 +6450,6 @@ }, "node_modules/ieee754": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "funding": [ { "type": "github", @@ -7066,28 +6463,26 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/immediate": { "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -7113,9 +6508,8 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -7131,8 +6525,7 @@ }, "node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -7140,14 +6533,12 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "license": "ISC" }, "node_modules/ini": { "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true, + "license": "ISC", "optional": true }, "node_modules/internal-slot": { @@ -7166,15 +6557,13 @@ }, "node_modules/interpret": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-arguments": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -7225,9 +6614,8 @@ }, "node_modules/is-bigint": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "license": "MIT", "dependencies": { "has-bigints": "^1.0.1" }, @@ -7237,9 +6625,8 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -7249,9 +6636,8 @@ }, "node_modules/is-boolean-object": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -7292,9 +6678,8 @@ }, "node_modules/is-callable": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -7331,9 +6716,8 @@ }, "node_modules/is-date-object": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -7346,9 +6730,8 @@ }, "node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7367,8 +6750,7 @@ }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", "engines": { "node": ">=8" } @@ -7400,9 +6782,8 @@ }, "node_modules/is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -7421,9 +6802,8 @@ }, "node_modules/is-map": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7442,18 +6822,16 @@ }, "node_modules/is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-number-object": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -7476,18 +6854,16 @@ }, "node_modules/is-path-inside": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -7504,9 +6880,8 @@ }, "node_modules/is-regex": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -7520,9 +6895,8 @@ }, "node_modules/is-set": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7544,17 +6918,15 @@ }, "node_modules/is-stream": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-string": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -7567,9 +6939,8 @@ }, "node_modules/is-symbol": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, + "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" }, @@ -7597,9 +6968,8 @@ }, "node_modules/is-unicode-supported": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -7609,14 +6979,12 @@ }, "node_modules/is-url": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==" + "license": "MIT" }, "node_modules/is-weakmap": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7635,9 +7003,8 @@ }, "node_modules/is-weakset": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -7648,14 +7015,12 @@ }, "node_modules/isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/isomorphic-ws": { "version": "5.0.0", @@ -7668,18 +7033,16 @@ }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-report": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -7691,18 +7054,16 @@ }, "node_modules/istanbul-lib-report/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -7712,9 +7073,8 @@ }, "node_modules/istanbul-reports": { "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -7725,8 +7085,7 @@ }, "node_modules/iterall": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.1.3.tgz", - "integrity": "sha512-Cu/kb+4HiNSejAPhSaN1VukdNTTi/r4/e+yykqjlG/IW+1gZH5b4+Bq3whDX4tvbYugta3r8KTMUiqT3fIGxuQ==" + "license": "MIT" }, "node_modules/iterator.prototype": { "version": "1.1.2", @@ -7743,9 +7102,8 @@ }, "node_modules/jackspeak": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -7769,9 +7127,8 @@ } }, "node_modules/js-base64": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", - "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==" + "version": "3.7.7", + "license": "BSD-3-Clause" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -7788,18 +7145,6 @@ "node": ">=0.10.0" } }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsdoc-type-pratt-parser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", @@ -7835,9 +7180,8 @@ }, "node_modules/json-buffer": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -7853,15 +7197,13 @@ }, "node_modules/json-schema-traverse": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json5": { "version": "2.2.3", @@ -7895,9 +7237,8 @@ }, "node_modules/jsonc-parser": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsx-ast-utils": { "version": "3.3.5", @@ -7916,9 +7257,8 @@ }, "node_modules/jszip": { "version": "3.10.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", "dev": true, + "license": "(MIT OR GPL-3.0-or-later)", "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", @@ -7928,9 +7268,8 @@ }, "node_modules/jszip/node_modules/readable-stream": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -7943,10 +7282,9 @@ }, "node_modules/keytar": { "version": "7.9.0", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", - "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "dependencies": { "node-addon-api": "^4.3.0", @@ -7955,9 +7293,8 @@ }, "node_modules/keyv": { "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -7982,18 +7319,16 @@ }, "node_modules/leven": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -8004,9 +7339,8 @@ }, "node_modules/lie": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", "dev": true, + "license": "MIT", "dependencies": { "immediate": "~3.0.5" } @@ -8019,18 +7353,16 @@ }, "node_modules/linkify-it": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", "dev": true, + "license": "MIT", "dependencies": { "uc.micro": "^1.0.1" } }, "node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -8043,18 +7375,15 @@ }, "node_modules/lodash": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "license": "MIT" }, "node_modules/lodash.assignwith": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", - "integrity": "sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g==" + "license": "MIT" }, "node_modules/lodash.camelcase": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + "license": "MIT" }, "node_modules/lodash.get": { "version": "4.4.2", @@ -8070,9 +7399,8 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.zip": { "version": "4.2.0", @@ -8082,9 +7410,8 @@ }, "node_modules/log-symbols": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -8119,9 +7446,8 @@ }, "node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8131,18 +7457,16 @@ }, "node_modules/magic-string": { "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", "dev": true, + "license": "MIT", "dependencies": { "vlq": "^0.2.2" } }, "node_modules/make-dir": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -8155,14 +7479,12 @@ }, "node_modules/make-error": { "version": "1.3.4", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", - "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==" + "license": "ISC" }, "node_modules/markdown-it": { "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1", "entities": "~2.1.0", @@ -8174,41 +7496,41 @@ "markdown-it": "bin/markdown-it.js" } }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, "node_modules/markdown-it/node_modules/entities": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", "dev": true, + "license": "BSD-2-Clause", "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } }, "node_modules/mdurl": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/merge": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/merge-source-map": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", - "integrity": "sha512-PGSmS0kfnTnMJCzJ16BLLCEe6oeYCamKFFdQKshi4BmM6FUwipjVOcBFGxqtQtirtAG4iZvHlqST9CpZKqlRjA==", "dev": true, + "license": "MIT", "dependencies": { "source-map": "^0.5.6" } }, "node_modules/merge-source-map/node_modules/source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -8260,9 +7582,8 @@ }, "node_modules/mime": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -8272,18 +7593,16 @@ }, "node_modules/mime-db": { "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -8293,9 +7612,8 @@ }, "node_modules/mimic-response": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=10" @@ -8315,8 +7633,7 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -8326,34 +7643,30 @@ }, "node_modules/minimist": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/minipass": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/mkdirp-classic": { "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/mocha": { "version": "10.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", - "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", @@ -8384,19 +7697,21 @@ "node": ">= 14.0.0" } }, + "node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, "node_modules/mocha/node_modules/brace-expansion": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/mocha/node_modules/chokidar": { "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -8404,6 +7719,7 @@ "url": "https://paulmillr.com/funding/" } ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -8422,9 +7738,8 @@ }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -8433,18 +7748,16 @@ }, "node_modules/mocha/node_modules/diff": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -8454,9 +7767,8 @@ }, "node_modules/mocha/node_modules/glob": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8471,32 +7783,29 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -8506,24 +7815,13 @@ }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mocha/node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -8536,9 +7834,8 @@ }, "node_modules/mocha/node_modules/yargs": { "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -8554,45 +7851,39 @@ }, "node_modules/mocha/node_modules/yargs-parser": { "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/moment": { "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "license": "MIT", "engines": { "node": "*" } }, "node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mute-stream": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/napi-build-utils": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/natural-compare-lite": { "version": "1.4.0", @@ -8602,9 +7893,8 @@ }, "node_modules/node-abi": { "version": "3.57.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.57.0.tgz", - "integrity": "sha512-Dp+A9JWxRaKuHP35H77I4kCKesDy5HUDEmScia2FyncMTOXASMyg251F5PhFoDA5uqBrDDffiLpbqnrZmNXW+g==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "semver": "^7.3.5" @@ -8615,15 +7905,13 @@ }, "node_modules/node-addon-api": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/node-fetch": { "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -8641,9 +7929,8 @@ }, "node_modules/node-persist": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/node-persist/-/node-persist-4.0.1.tgz", - "integrity": "sha512-QtRjwAlcOQChQpfG6odtEhxYmA3nS5XYr+bx9JRjwahl1TM3sm9J3CCn51/MI0eoHRb2DrkEsCOFo8sq8jG5sQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.12.0" } @@ -8666,6 +7953,12 @@ "validate-npm-package-license": "^3.0.1" } }, + "node_modules/normalize-package-data/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/normalize-package-data/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -8676,22 +7969,17 @@ } }, "node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "version": "3.0.0", "dev": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/nth-check": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0" }, @@ -8719,18 +8007,16 @@ }, "node_modules/object-inspect": { "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-is": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -8744,9 +8030,8 @@ }, "node_modules/object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -8851,17 +8136,15 @@ }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/optionator": { "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, + "license": "MIT", "dependencies": { "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", @@ -8876,9 +8159,8 @@ }, "node_modules/p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -8891,9 +8173,8 @@ }, "node_modules/p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -8915,14 +8196,12 @@ }, "node_modules/pako": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" + "license": "(MIT AND Zlib)" }, "node_modules/parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -8950,27 +8229,24 @@ }, "node_modules/parse-semver": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", - "integrity": "sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^5.1.0" } }, "node_modules/parse-semver/node_modules/semver": { "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver" } }, "node_modules/parse5": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "dev": true, + "license": "MIT", "dependencies": { "entities": "^4.4.0" }, @@ -8980,9 +8256,8 @@ }, "node_modules/parse5-htmlparser2-tree-adapter": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", "dev": true, + "license": "MIT", "dependencies": { "domhandler": "^5.0.2", "parse5": "^7.0.0" @@ -8993,46 +8268,40 @@ }, "node_modules/path-equal": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz", - "integrity": "sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==" + "license": "MIT" }, "node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/path-scurry": { "version": "1.10.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", - "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -9046,9 +8315,8 @@ }, "node_modules/path-scurry/node_modules/lru-cache": { "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, + "license": "ISC", "engines": { "node": "14 || >=16.14" } @@ -9064,9 +8332,8 @@ }, "node_modules/pend": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/picocolors": { "version": "1.0.0", @@ -9076,9 +8343,8 @@ }, "node_modules/picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -9100,26 +8366,23 @@ }, "node_modules/pluralize": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/possible-typed-array-names": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/prebuild-install": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", - "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "detect-libc": "^2.0.0", @@ -9144,18 +8407,16 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -9180,22 +8441,19 @@ }, "node_modules/process": { "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", "engines": { "node": ">= 0.6.0" } }, "node_modules/process-nextick-args": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "license": "MIT" }, "node_modules/promise-timeout": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/promise-timeout/-/promise-timeout-1.3.0.tgz", - "integrity": "sha512-5yANTE0tmi5++POym6OgtFmwfDvOXABD9oj/jLQr5GPEyuNEb7jH4wbbANJceJid49jwhi1RddxnhnEAb/doqg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/prop-types": { "version": "15.8.1", @@ -9219,9 +8477,8 @@ }, "node_modules/pump": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "end-of-stream": "^1.1.0", @@ -9230,9 +8487,8 @@ }, "node_modules/punycode": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -9263,9 +8519,8 @@ }, "node_modules/qs": { "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.6" }, @@ -9278,8 +8533,6 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -9294,7 +8547,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/quicktype": { "resolved": "packages/quicktype-vscode", @@ -9314,9 +8568,8 @@ }, "node_modules/quote-stream": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", - "integrity": "sha512-kKr2uQ2AokadPjvTyKJQad9xELbZwYzWlNfI3Uz2j/ib5u6H9lDP7fUUR//rMycd0gv4Z5P1qXMfXR8YpIxrjQ==", "dev": true, + "license": "MIT", "dependencies": { "buffer-equal": "0.0.1", "minimist": "^1.1.3", @@ -9344,18 +8597,16 @@ }, "node_modules/randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/rc": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "optional": true, "dependencies": { "deep-extend": "^0.6.0", @@ -9369,9 +8620,8 @@ }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=0.10.0" @@ -9385,9 +8635,8 @@ }, "node_modules/read": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", "dev": true, + "license": "ISC", "dependencies": { "mute-stream": "~0.0.4" }, @@ -9499,8 +8748,7 @@ }, "node_modules/readable-stream": { "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -9514,8 +8762,6 @@ }, "node_modules/readable-stream/node_modules/safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -9529,21 +8775,20 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/readable-stream/node_modules/string_decoder": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } }, "node_modules/readdirp": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -9567,6 +8812,19 @@ "node": ">= 4" } }, + "node_modules/recast/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/recast/node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -9575,8 +8833,6 @@ }, "node_modules/rechoir": { "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "dependencies": { "resolve": "^1.1.6" @@ -9648,9 +8904,8 @@ }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.6", "define-properties": "^1.2.1", @@ -9714,8 +8969,7 @@ }, "node_modules/require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -9748,9 +9002,8 @@ }, "node_modules/resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -9766,9 +9019,8 @@ }, "node_modules/reusify": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -9776,9 +9028,8 @@ }, "node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -9805,8 +9056,6 @@ }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -9822,6 +9071,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -9852,8 +9102,7 @@ }, "node_modules/safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "license": "MIT" }, "node_modules/safe-regex-test": { "version": "1.0.3", @@ -9882,14 +9131,12 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "license": "MIT" }, "node_modules/sax": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/scslre": { "version": "0.2.0", @@ -9904,9 +9151,8 @@ }, "node_modules/semver": { "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -9925,18 +9171,16 @@ }, "node_modules/serialize-javascript": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/set-function-length": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -9951,9 +9195,8 @@ }, "node_modules/set-function-name": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -9966,21 +9209,18 @@ }, "node_modules/setimmediate": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/shallow-copy": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", - "integrity": "sha512-b6i4ZpVuUxB9h5gfCxPiusKYkqTMOjEbBs4wMaFbkfia4yFv92UKZ6Df8WXcKbn08JNL/abvg3FnMAOfakDvUw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -9990,18 +9230,16 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/shelljs": { "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -10016,9 +9254,8 @@ }, "node_modules/side-channel": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -10034,9 +9271,8 @@ }, "node_modules/signal-exit": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -10046,8 +9282,6 @@ }, "node_modules/simple-concat": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true, "funding": [ { @@ -10063,12 +9297,11 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "optional": true }, "node_modules/simple-get": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", "dev": true, "funding": [ { @@ -10084,6 +9317,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "optional": true, "dependencies": { "decompress-response": "^6.0.0", @@ -10102,9 +9336,8 @@ }, "node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -10153,18 +9386,16 @@ }, "node_modules/static-eval": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.1.1.tgz", - "integrity": "sha512-MgWpQ/ZjGieSVB3eOJVs4OA2LT/q1vx98KPCTTQPzq/aLr0YUXTsgryTXr4SLfR0ZfUUCiedM9n/ABeDIyy4mA==", "dev": true, + "license": "MIT", "dependencies": { "escodegen": "^2.1.0" } }, "node_modules/static-eval/node_modules/escodegen": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -10181,11 +9412,22 @@ "source-map": "~0.6.1" } }, + "node_modules/static-eval/node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/static-module": { "version": "2.2.5", - "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz", - "integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==", "dev": true, + "license": "MIT", "dependencies": { "concat-stream": "~1.6.0", "convert-source-map": "^1.5.1", @@ -10205,21 +9447,18 @@ }, "node_modules/static-module/node_modules/convert-source-map": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/static-module/node_modules/object-inspect": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz", - "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/static-module/node_modules/readable-stream": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -10232,9 +9471,8 @@ }, "node_modules/stop-iteration-iterator": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", "dev": true, + "license": "MIT", "dependencies": { "internal-slot": "^1.0.4" }, @@ -10244,21 +9482,18 @@ }, "node_modules/stream-chain": { "version": "2.2.5", - "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-2.2.5.tgz", - "integrity": "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==" + "license": "BSD-3-Clause" }, "node_modules/stream-json": { "version": "1.8.0", - "resolved": "https://registry.npmjs.org/stream-json/-/stream-json-1.8.0.tgz", - "integrity": "sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw==", + "license": "BSD-3-Clause", "dependencies": { "stream-chain": "^2.2.5" } }, "node_modules/stream-read-all": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stream-read-all/-/stream-read-all-3.0.1.tgz", - "integrity": "sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A==", + "license": "MIT", "engines": { "node": ">=10" } @@ -10274,8 +9509,7 @@ }, "node_modules/string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -10294,16 +9528,14 @@ }, "node_modules/string-to-stream": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-3.0.1.tgz", - "integrity": "sha512-Hl092MV3USJuUCC6mfl9sPzGloA3K5VwdIeJjYIkXY/8K+mUvaeEabWJgArp+xXrsWxCajeT2pc4axbVhIZJyg==", + "license": "MIT", "dependencies": { "readable-stream": "^3.4.0" } }, "node_modules/string-to-stream/node_modules/readable-stream": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -10315,8 +9547,7 @@ }, "node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -10329,9 +9560,8 @@ "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -10418,8 +9648,7 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -10430,9 +9659,8 @@ "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -10463,9 +9691,8 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -10475,9 +9702,8 @@ }, "node_modules/supports-color": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -10517,8 +9743,7 @@ }, "node_modules/table-layout": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-3.0.2.tgz", - "integrity": "sha512-rpyNZYRw+/C+dYkcQ3Pr+rLxW4CfHpXjPDnG7lYhdRoUcZTUt+KEsX+94RGp/aVp/MQU35JCITv2T/beY4m+hw==", + "license": "MIT", "dependencies": { "@75lb/deep-merge": "^1.1.1", "array-back": "^6.2.2", @@ -10537,34 +9762,30 @@ }, "node_modules/table-layout/node_modules/array-back": { "version": "6.2.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", - "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "license": "MIT", "engines": { "node": ">=12.17" } }, "node_modules/table-layout/node_modules/typical": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", - "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==", + "license": "MIT", "engines": { "node": ">=12.17" } }, "node_modules/tapable": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/tar-fs": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "chownr": "^1.1.1", @@ -10575,9 +9796,8 @@ }, "node_modules/tar-stream": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "bl": "^4.0.3", @@ -10592,9 +9812,8 @@ }, "node_modules/tar-stream/node_modules/readable-stream": { "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "inherits": "^2.0.3", @@ -10607,9 +9826,8 @@ }, "node_modules/test-exclude": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -10621,15 +9839,13 @@ }, "node_modules/text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/through2": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, + "license": "MIT", "dependencies": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" @@ -10637,9 +9853,8 @@ }, "node_modules/through2/node_modules/readable-stream": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -10652,8 +9867,7 @@ }, "node_modules/tiny-inflate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.2.tgz", - "integrity": "sha1-k9nez/yIBb1X6uQxDwt0Xptvs6c=" + "license": "MIT" }, "node_modules/tiny-invariant": { "version": "1.3.3", @@ -10663,9 +9877,8 @@ }, "node_modules/tmp": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.14" } @@ -10681,9 +9894,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -10693,14 +9905,12 @@ }, "node_modules/tr46": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "license": "MIT" }, "node_modules/ts-api-utils": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=16" }, @@ -10710,8 +9920,7 @@ }, "node_modules/ts-node": { "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -10800,24 +10009,21 @@ }, "node_modules/tslib": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/tunnel": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, "node_modules/tunnel-agent": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, + "license": "Apache-2.0", "optional": true, "dependencies": { "safe-buffer": "^5.0.1" @@ -10828,9 +10034,8 @@ }, "node_modules/type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -10840,9 +10045,8 @@ }, "node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -10925,9 +10129,8 @@ }, "node_modules/typed-rest-client": { "version": "1.8.11", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", - "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", "dev": true, + "license": "MIT", "dependencies": { "qs": "^6.9.1", "tunnel": "0.0.6", @@ -10936,14 +10139,12 @@ }, "node_modules/typedarray": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/typescript": { "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -10954,17 +10155,15 @@ }, "node_modules/typical": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/uc.micro": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/unbox-primitive": { "version": "1.0.2", @@ -10983,19 +10182,16 @@ }, "node_modules/underscore": { "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/undici-types": { "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "license": "MIT" }, "node_modules/unicode-properties": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.4.1.tgz", - "integrity": "sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==", + "license": "MIT", "dependencies": { "base64-js": "^1.3.0", "unicode-trie": "^2.0.0" @@ -11003,13 +10199,11 @@ }, "node_modules/unicode-properties/node_modules/pako": { "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==" + "license": "MIT" }, "node_modules/unicode-properties/node_modules/unicode-trie": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", - "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", + "license": "MIT", "dependencies": { "pako": "^0.2.5", "tiny-inflate": "^1.0.0" @@ -11017,9 +10211,8 @@ }, "node_modules/unicode-trie": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-0.3.1.tgz", - "integrity": "sha512-WgVuO0M2jDl7hVfbPgXv2LUrD81HM0bQj/bvLGiw6fJ4Zo8nNFnDrA0/hU2Te/wz6pjxCm5cxJwtLjo2eyV51Q==", "dev": true, + "license": "MIT", "dependencies": { "pako": "^0.2.5", "tiny-inflate": "^1.0.0" @@ -11027,9 +10220,8 @@ }, "node_modules/unicode-trie/node_modules/pako": { "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/unixify": { "version": "1.0.0", @@ -11043,6 +10235,18 @@ "node": ">=0.10.0" } }, + "node_modules/unixify/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", @@ -11075,23 +10279,20 @@ }, "node_modules/uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/urijs": { "version": "1.19.11", - "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", - "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==" + "license": "MIT" }, "node_modules/url-join": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/urlpattern-polyfill": { "version": "8.0.2", @@ -11101,19 +10302,16 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "license": "MIT" }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + "license": "MIT" }, "node_modules/v8-to-istanbul": { "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, + "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -11125,9 +10323,8 @@ }, "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -11164,9 +10361,8 @@ }, "node_modules/vlq": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/vscode-json-languageservice": { "version": "4.2.1", @@ -11207,9 +10403,8 @@ }, "node_modules/watch": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/watch/-/watch-1.0.2.tgz", - "integrity": "sha1-NApxe952Vyb6CqB9ch4BR6VR3ww=", "dev": true, + "license": "Apache-2.0", "dependencies": { "exec-sh": "^0.2.0", "minimist": "^1.2.0" @@ -11231,9 +10426,9 @@ } }, "node_modules/webcrypto-core": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", - "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.9.tgz", + "integrity": "sha512-FE+a4PPkOmBbgNDIyRmcHhgXn+2ClRl3JzJdDu/P4+B8y81LqKe6RAsI9b3lAOHe1T1BMkSjsRHTYRikImZnVA==", "dev": true, "dependencies": { "@peculiar/asn1-schema": "^2.3.8", @@ -11251,18 +10446,15 @@ }, "node_modules/webidl-conversions": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + "license": "BSD-2-Clause" }, "node_modules/whatwg-fetch": { "version": "3.6.2", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", - "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" + "license": "MIT" }, "node_modules/whatwg-url": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -11270,9 +10462,8 @@ }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -11285,9 +10476,8 @@ }, "node_modules/which-boxed-primitive": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, + "license": "MIT", "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -11333,9 +10523,8 @@ }, "node_modules/which-collection": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", "dev": true, + "license": "MIT", "dependencies": { "is-map": "^2.0.1", "is-set": "^2.0.1", @@ -11348,9 +10537,8 @@ }, "node_modules/which-typed-array": { "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, + "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", @@ -11367,36 +10555,31 @@ }, "node_modules/word-wrap": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/wordwrap": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + "license": "MIT" }, "node_modules/wordwrapjs": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz", - "integrity": "sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==", + "license": "MIT", "engines": { "node": ">=12.17" } }, "node_modules/workerpool": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -11412,9 +10595,8 @@ "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -11429,9 +10611,8 @@ }, "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11444,9 +10625,8 @@ }, "node_modules/wrap-ansi-cjs/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11456,8 +10636,7 @@ }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11470,8 +10649,7 @@ }, "node_modules/wrap-ansi/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11481,13 +10659,12 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "license": "ISC" }, "node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", + "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", "dev": true, "peer": true, "engines": { @@ -11508,9 +10685,8 @@ }, "node_modules/xml2js": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", "dev": true, + "license": "MIT", "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" @@ -11521,9 +10697,8 @@ }, "node_modules/xmlbuilder": { "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4.0" } @@ -11539,31 +10714,27 @@ }, "node_modules/xtend": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4" } }, "node_modules/y18n": { "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yaml": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", - "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "license": "ISC", "bin": { "yaml": "bin.mjs" }, @@ -11590,8 +10761,7 @@ }, "node_modules/yargs": { "version": "17.6.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", - "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -11607,17 +10777,15 @@ }, "node_modules/yargs-parser": { "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, + "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -11630,9 +10798,8 @@ }, "node_modules/yauzl": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -11640,26 +10807,23 @@ }, "node_modules/yazl": { "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3" } }, "node_modules/yn": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -11672,7 +10836,6 @@ "license": "Apache-2.0", "dependencies": { "@glideapps/ts-necessities": "2.2.3", - "@types/urijs": "^1.19.25", "browser-or-node": "^3.0.0", "collection-utils": "^1.0.1", "cross-fetch": "^4.0.0", @@ -11689,23 +10852,20 @@ }, "devDependencies": { "@types/browser-or-node": "^1.3.2", + "@types/is-url": "^1.2.32", "@types/node": "18.19.31", "@types/pako": "^1.0.0", "@types/pluralize": "0.0.30", "@types/readable-stream": "4.0.10", "@types/unicode-properties": "^1.3.0", + "@types/urijs": "^1.19.25", + "@types/wordwrap": "^1.0.3", "typescript": "4.9.5" } }, - "packages/quicktype-core/node_modules/js-base64": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", - "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==" - }, "packages/quicktype-core/node_modules/pluralize": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "license": "MIT", "engines": { "node": ">=4" } @@ -11738,22 +10898,27 @@ }, "packages/quicktype-typescript-input/node_modules/@glideapps/ts-necessities": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.1.2.tgz", - "integrity": "sha512-tLjfhinr6doUBcWi7BWnkT2zT6G5UhiZftsiIH6xVvykeXE+FU7Wr0MyqwmqideWlDD5rG+VjVLptLviGo04CA==" + "license": "MIT" + }, + "packages/quicktype-typescript-input/node_modules/browser-or-node": { + "version": "1.3.0", + "license": "MIT" }, "packages/quicktype-typescript-input/node_modules/isomorphic-fetch": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", + "license": "MIT", "dependencies": { "node-fetch": "^1.0.1", "whatwg-fetch": ">=0.10.0" } }, + "packages/quicktype-typescript-input/node_modules/js-base64": { + "version": "2.6.4", + "license": "BSD-3-Clause" + }, "packages/quicktype-typescript-input/node_modules/node-fetch": { "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "license": "MIT", "dependencies": { "encoding": "^0.1.11", "is-stream": "^1.0.1" @@ -11761,8 +10926,7 @@ }, "packages/quicktype-typescript-input/node_modules/quicktype-core": { "version": "20.0.0", - "resolved": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-20.0.0.tgz", - "integrity": "sha512-zuvQAk/i4STnhLC4t3nNWPr6u5ArHBW+TME3jA7YQQMp1UdDsFD+4lzqt49b73aYhhmrk9BlO/fX7PcRR5l6YQ==", + "license": "Apache-2.0", "dependencies": { "@glideapps/ts-necessities": "2.1.2", "@types/urijs": "^1.19.8", @@ -11783,8 +10947,7 @@ }, "packages/quicktype-typescript-input/node_modules/readable-stream": { "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -11797,8 +10960,7 @@ }, "packages/quicktype-typescript-input/node_modules/yaml": { "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "license": "ISC", "engines": { "node": ">= 6" } @@ -11829,16 +10991,16 @@ } }, "packages/quicktype-vscode/node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz", - "integrity": "sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz", + "integrity": "sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/type-utils": "7.6.0", - "@typescript-eslint/utils": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/scope-manager": "7.8.0", + "@typescript-eslint/type-utils": "7.8.0", + "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.3.1", @@ -11864,15 +11026,15 @@ } }, "packages/quicktype-vscode/node_modules/@typescript-eslint/parser": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz", - "integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.8.0.tgz", + "integrity": "sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.7.1", - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/typescript-estree": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1", + "@typescript-eslint/scope-manager": "7.8.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0", "debug": "^4.3.4" }, "engines": { @@ -11891,89 +11053,14 @@ } } }, - "packages/quicktype-vscode/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz", - "integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/quicktype-vscode/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz", - "integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/quicktype-vscode/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz", - "integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/quicktype-vscode/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz", - "integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.7.1", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "packages/quicktype-vscode/node_modules/@typescript-eslint/scope-manager": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz", - "integrity": "sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz", + "integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0" + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -11984,13 +11071,13 @@ } }, "packages/quicktype-vscode/node_modules/@typescript-eslint/type-utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz", - "integrity": "sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz", + "integrity": "sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.6.0", - "@typescript-eslint/utils": "7.6.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/utils": "7.8.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -12011,9 +11098,9 @@ } }, "packages/quicktype-vscode/node_modules/@typescript-eslint/types": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.6.0.tgz", - "integrity": "sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz", + "integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -12024,13 +11111,13 @@ } }, "packages/quicktype-vscode/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz", - "integrity": "sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz", + "integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -12052,17 +11139,17 @@ } }, "packages/quicktype-vscode/node_modules/@typescript-eslint/utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.6.0.tgz", - "integrity": "sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz", + "integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.15", "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/typescript-estree": "7.6.0", + "@typescript-eslint/scope-manager": "7.8.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/typescript-estree": "7.8.0", "semver": "^7.6.0" }, "engines": { @@ -12077,12 +11164,12 @@ } }, "packages/quicktype-vscode/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz", - "integrity": "sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz", + "integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", + "@typescript-eslint/types": "7.8.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -12119,9 +11206,8 @@ }, "packages/quicktype-vscode/node_modules/typescript": { "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -12140,8861 +11226,5 @@ "unicode-trie": "^0.3.0" } } - }, - "dependencies": { - "@75lb/deep-merge": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.1.tgz", - "integrity": "sha512-xvgv6pkMGBA6GwdyJbNAnDmfAIR/DfWhrj9jgWh3TY7gRm3KO46x/GPjRg6wJ0nOepwqrNxFfojebh0Df4h4Tw==", - "requires": { - "lodash.assignwith": "^4.2.0", - "typical": "^7.1.1" - }, - "dependencies": { - "typical": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", - "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==" - } - } - }, - "@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true - }, - "@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - } - } - }, - "@ardatan/sync-fetch": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@ardatan/sync-fetch/-/sync-fetch-0.0.1.tgz", - "integrity": "sha512-xhlTqH0m31mnsG0tIP4ETgfSB6gXDaYYsUWTrlUV93fFQPI9dd8hE0Ot6MHLCtqgB32hwJAC3YZMWlXZw7AleA==", - "dev": true, - "requires": { - "node-fetch": "^2.6.1" - } - }, - "@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", - "dev": true, - "requires": { - "@babel/highlight": "^7.24.2", - "picocolors": "^1.0.0" - } - }, - "@babel/compat-data": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz", - "integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==", - "dev": true - }, - "@babel/core": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", - "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.1", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "@babel/eslint-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.1.tgz", - "integrity": "sha512-d5guuzMlPeDfZIbpQ8+g1NaCNuAGBBGNECh0HVqz1sjOeVLh2CEaifuOysCH18URW6R7pqXINvf5PaR/dC6jLQ==", - "dev": true, - "requires": { - "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.1" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "@babel/eslint-plugin": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/eslint-plugin/-/eslint-plugin-7.23.5.tgz", - "integrity": "sha512-03+E/58Hoo/ui69gR+beFdGpplpoVK0BSIdke2iw4/Bz7eGN0ssRenNlnU4nmbkowNQOPCStKSwFr8H6DiY49g==", - "dev": true, - "requires": { - "eslint-rule-composer": "^0.3.0" - } - }, - "@babel/generator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", - "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", - "dev": true, - "requires": { - "@babel/types": "^7.24.0", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - } - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", - "dev": true, - "peer": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - } - } - }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true - }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-module-imports": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", - "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", - "dev": true, - "requires": { - "@babel/types": "^7.24.0" - } - }, - "@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", - "dev": true - }, - "@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", - "dev": true - }, - "@babel/helpers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz", - "integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==", - "dev": true, - "requires": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" - } - }, - "@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, - "@babel/parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", - "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", - "dev": true - }, - "@babel/plugin-syntax-flow": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.24.1.tgz", - "integrity": "sha512-sxi2kLTI5DeW5vDtMUsk4mTPwvlUDbjOnoWayhynCwrw4QXRld4QEYwqzY8JmQXaJUtgUuCIurtSRH5sn4c7mA==", - "dev": true, - "peer": true, - "requires": { - "@babel/helper-plugin-utils": "^7.24.0" - } - }, - "@babel/plugin-syntax-import-assertions": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.1.tgz", - "integrity": "sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.24.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", - "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", - "dev": true, - "peer": true, - "requires": { - "@babel/helper-plugin-utils": "^7.24.0" - } - }, - "@babel/plugin-transform-react-jsx": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.23.4.tgz", - "integrity": "sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==", - "dev": true, - "peer": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-jsx": "^7.23.3", - "@babel/types": "^7.23.4" - } - }, - "@babel/runtime": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", - "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.14.0" - } - }, - "@babel/runtime-corejs3": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.1.tgz", - "integrity": "sha512-T9ko/35G+Bkl+win48GduaPlhSlOjjE5s1TeiEcD+QpxlLQnoEfb/nO/T+TQqkm+ipFwORn+rB8w14iJ/uD0bg==", - "dev": true, - "requires": { - "core-js-pure": "^3.30.2", - "regenerator-runtime": "^0.14.0" - } - }, - "@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" - } - }, - "@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - } - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - } - }, - "@es-joy/jsdoccomment": { - "version": "0.41.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", - "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", - "dev": true, - "requires": { - "comment-parser": "1.4.1", - "esquery": "^1.5.0", - "jsdoc-type-pratt-parser": "~4.0.0" - } - }, - "@esbuild/aix-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", - "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", - "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", - "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", - "dev": true, - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", - "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", - "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", - "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", - "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", - "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", - "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", - "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", - "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", - "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", - "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", - "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", - "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", - "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", - "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", - "dev": true, - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", - "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", - "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", - "dev": true, - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", - "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", - "dev": true, - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", - "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", - "dev": true, - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", - "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", - "dev": true, - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", - "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", - "dev": true, - "optional": true - }, - "@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^3.3.0" - } - }, - "@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true - }, - "@glideapps/ts-necessities": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.2.3.tgz", - "integrity": "sha512-gXi0awOZLHk3TbW55GZLCPP6O+y/b5X1pBXKBVckFONSwF1z1E5ND2BGJsghQFah+pW7pkkyFb2VhUQI2qhL5w==" - }, - "@graphql-eslint/eslint-plugin": { - "version": "3.20.1", - "resolved": "https://registry.npmjs.org/@graphql-eslint/eslint-plugin/-/eslint-plugin-3.20.1.tgz", - "integrity": "sha512-RbwVlz1gcYG62sECR1u0XqMh8w5e5XMCCZoMvPQ3nJzEBCTfXLGX727GBoRmSvY1x4gJmqNZ1lsOX7lZY14RIw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@graphql-tools/code-file-loader": "^7.3.6", - "@graphql-tools/graphql-tag-pluck": "^7.3.6", - "@graphql-tools/utils": "^9.0.0", - "chalk": "^4.1.2", - "debug": "^4.3.4", - "fast-glob": "^3.2.12", - "graphql-config": "^4.4.0", - "graphql-depth-limit": "^1.1.0", - "lodash.lowercase": "^4.3.0", - "tslib": "^2.4.1" - }, - "dependencies": { - "@graphql-tools/code-file-loader": { - "version": "7.3.23", - "resolved": "https://registry.npmjs.org/@graphql-tools/code-file-loader/-/code-file-loader-7.3.23.tgz", - "integrity": "sha512-8Wt1rTtyTEs0p47uzsPJ1vAtfAx0jmxPifiNdmo9EOCuUPyQGEbMaik/YkqZ7QUFIEYEQu+Vgfo8tElwOPtx5Q==", - "dev": true, - "requires": { - "@graphql-tools/graphql-tag-pluck": "7.5.2", - "@graphql-tools/utils": "^9.2.1", - "globby": "^11.0.3", - "tslib": "^2.4.0", - "unixify": "^1.0.0" - } - }, - "@graphql-tools/graphql-tag-pluck": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.5.2.tgz", - "integrity": "sha512-RW+H8FqOOLQw0BPXaahYepVSRjuOHw+7IL8Opaa5G5uYGOBxoXR7DceyQ7BcpMgktAOOmpDNQ2WtcboChOJSRA==", - "dev": true, - "requires": { - "@babel/parser": "^7.16.8", - "@babel/plugin-syntax-import-assertions": "^7.20.0", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0" - } - }, - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "requires": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - } - }, - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "@graphql-typed-document-node/core": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", - "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", - "dev": true, - "requires": {} - }, - "@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", - "dev": true - }, - "@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "requires": { - "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" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - }, - "wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - } - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - } - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" - }, - "@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - }, - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@mark.probst/typescript-json-schema": { - "version": "0.55.0", - "resolved": "https://registry.npmjs.org/@mark.probst/typescript-json-schema/-/typescript-json-schema-0.55.0.tgz", - "integrity": "sha512-jI48mSnRgFQxXiE/UTUCVCpX8lK3wCFKLF1Ss2aEreboKNuLQGt3e0/YFqWVHe/WENxOaqiJvwOz+L/SrN2+qQ==", - "requires": { - "@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.9.4", - "yargs": "^17.1.1" - }, - "dependencies": { - "@types/node": { - "version": "16.18.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.11.tgz", - "integrity": "sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==" - }, - "typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==" - } - } - }, - "@next/eslint-plugin-next": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.5.6.tgz", - "integrity": "sha512-ng7pU/DDsxPgT6ZPvuprxrkeew3XaRf4LAT4FabaEO/hAbvVx4P7wqnqdbTdDn1kgTvsI4tpIgT4Awn/m0bGbg==", - "dev": true, - "requires": { - "glob": "7.1.7" - }, - "dependencies": { - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "@nicolo-ribaudo/eslint-scope-5-internals": { - "version": "5.1.1-v1", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", - "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==", - "dev": true, - "requires": { - "eslint-scope": "5.1.1" - }, - "dependencies": { - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@peculiar/asn1-schema": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", - "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", - "dev": true, - "requires": { - "asn1js": "^3.0.5", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "@peculiar/json-schema": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", - "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", - "dev": true, - "requires": { - "tslib": "^2.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "@peculiar/webcrypto": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz", - "integrity": "sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==", - "dev": true, - "requires": { - "@peculiar/asn1-schema": "^2.3.8", - "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2", - "webcrypto-core": "^1.7.8" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true - }, - "@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", - "dev": true - }, - "@repeaterjs/repeater": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.4.tgz", - "integrity": "sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==", - "dev": true - }, - "@rushstack/eslint-patch": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.8.0.tgz", - "integrity": "sha512-0HejFckBN2W+ucM6cUOlwsByTKt9/+0tWhqUffNIcHqCXkthY/mZ7AuYPK/2IIaGWhdl0h+tICDO0ssLMd6XMQ==", - "dev": true - }, - "@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true - }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" - }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" - }, - "@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" - }, - "@tsconfig/node18": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-1.0.1.tgz", - "integrity": "sha512-sNFeK6X2ATlhlvzyH4kKYQlfHXE2f2/wxtB9ClvYXevWpmwkUT7VaSrjIN9E76Qebz8qP5JOJJ9jD3QoD/Z9TA==", - "dev": true - }, - "@types/browser-or-node": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/browser-or-node/-/browser-or-node-1.3.2.tgz", - "integrity": "sha512-CkvJrvVMI4ZHbiL+Df22Owzq1IYnHnoSrM8s6Dmy4MRdqvdFi9bHsIvyFrSGJPOxvFI9Y3MqY2gFCqIafJBcfw==", - "dev": true - }, - "@types/command-line-args": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", - "integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==", - "dev": true - }, - "@types/command-line-usage": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.4.tgz", - "integrity": "sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg==", - "dev": true - }, - "@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/graphql": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-0.11.8.tgz", - "integrity": "sha512-xGWx4kx9JKlqxDrZA12gw5qi2lvxPNLxnQQcoTXVX83MuGcXcpb7TADatGyGW51GaaXQOQTbjw3x4HuL3ULBaA==", - "dev": true - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true - }, - "@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" - }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true - }, - "@types/lodash": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", - "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", - "dev": true - }, - "@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true - }, - "@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", - "dev": true - }, - "@types/node": { - "version": "18.19.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz", - "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==", - "requires": { - "undici-types": "~5.26.4" - } - }, - "@types/node-persist": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/@types/node-persist/-/node-persist-3.1.8.tgz", - "integrity": "sha512-QLidg6/SadZYPrTKxtxL1A85XBoQlG40bhoMdhu6DH6+eNCMr2j+RGfFZ9I9+IY8W/PDwQonJ+iBWD62jZjMfg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true - }, - "@types/pako": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.0.tgz", - "integrity": "sha1-6q6DZNG391LiY7w/1o3+yY5hNsU=", - "dev": true - }, - "@types/pluralize": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.30.tgz", - "integrity": "sha512-kVww6xZrW/db5BR9OqiT71J9huRdQ+z/r+LbDuT7/EK50mCmj5FoaIARnVv0rvjUS/YpDox0cDU9lpQT011VBA==", - "dev": true - }, - "@types/readable-stream": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.10.tgz", - "integrity": "sha512-AbUKBjcC8SHmImNi4yK2bbjogQlkFSg7shZCcicxPQapniOlajG8GCc39lvXzCWX4lLRRs7DM3VAeSlqmEVZUA==", - "dev": true - }, - "@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, - "@types/shelljs": { - "version": "0.8.15", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.15.tgz", - "integrity": "sha512-vzmnCHl6hViPu9GNLQJ+DZFd6BQI2DBTUeOvYHqkWQLMfKAAQYMb/xAmZkTogZI/vqXHCWkqDRymDI5p0QTi5Q==", - "dev": true, - "requires": { - "@types/glob": "~7.2.0", - "@types/node": "*" - } - }, - "@types/stream-chain": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stream-chain/-/stream-chain-2.0.1.tgz", - "integrity": "sha512-D+Id9XpcBpampptkegH7WMsEk6fUdf9LlCIX7UhLydILsqDin4L0QT7ryJR0oycwC7OqohIzdfcMHVZ34ezNGg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/stream-json": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@types/stream-json/-/stream-json-1.7.3.tgz", - "integrity": "sha512-Jqsyq5VPOTWorvEmzWhEWH5tJnHA+bB8vt/Zzb11vSDj8esfSHDMj2rbVjP0mfJQzl3YBJSXBBq08iiyaBK3KA==", - "dev": true, - "requires": { - "@types/node": "*", - "@types/stream-chain": "*" - } - }, - "@types/unicode-properties": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@types/unicode-properties/-/unicode-properties-1.3.0.tgz", - "integrity": "sha512-kDVlxpdkCfgvzfXcglkr7j4OSMjCEEo/Jloj4tFuldYZpQ9Uypy7FGXPhNstoj4eGvhddwuu5n0EfI+XdWVoVA==", - "dev": true - }, - "@types/urijs": { - "version": "1.19.25", - "resolved": "https://registry.npmjs.org/@types/urijs/-/urijs-1.19.25.tgz", - "integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==" - }, - "@types/vscode": { - "version": "1.88.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.88.0.tgz", - "integrity": "sha512-rWY+Bs6j/f1lvr8jqZTyp5arRMfovdxolcqGi+//+cPDOh8SBvzXH90e7BiSXct5HJ9HGW6jATchbRTpTJpEkw==", - "dev": true - }, - "@types/ws": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", - "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz", - "integrity": "sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "5.62.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - } - }, - "@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - } - } - }, - "@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4" - } - }, - "@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" - } - }, - "@typescript-eslint/type-utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", - "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - } - }, - "@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "@typescript-eslint/utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", - "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", - "dev": true, - "requires": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" - } - }, - "@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "@vscode/test-cli": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.6.tgz", - "integrity": "sha512-4i61OUv5PQr3GxhHOuUgHdgBDfIO/kXTPCsEyFiMaY4SOqQTgkTmyZLagHehjOgCfsXdcrJa3zgQ7zoc+Dh6hQ==", - "dev": true, - "requires": { - "@types/mocha": "^10.0.2", - "c8": "^9.1.0", - "chokidar": "^3.5.3", - "enhanced-resolve": "^5.15.0", - "glob": "^10.3.10", - "minimatch": "^9.0.3", - "mocha": "^10.2.0", - "supports-color": "^9.4.0", - "yargs": "^17.7.2" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "glob": { - "version": "10.3.12", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", - "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", - "dev": true, - "requires": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.6", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.10.2" - } - }, - "minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "supports-color": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", - "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", - "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - } - } - }, - "@vscode/test-electron": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.9.tgz", - "integrity": "sha512-z3eiChaCQXMqBnk2aHHSEkobmC2VRalFQN0ApOAtydL172zXGxTwGrRtviT5HnUB+Q+G3vtEYFtuQkYqBzYgMA==", - "dev": true, - "requires": { - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "jszip": "^3.10.1", - "semver": "^7.5.2" - } - }, - "@vscode/vsce": { - "version": "2.25.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.25.0.tgz", - "integrity": "sha512-VXMCGUaP6wKBadA7vFQdsksxkBAMoh4ecZgXBwauZMASAgnwYesHyLnqIyWYeRwjy2uEpitHvz/1w5ENnR30pg==", - "dev": true, - "requires": { - "azure-devops-node-api": "^12.5.0", - "chalk": "^2.4.2", - "cheerio": "^1.0.0-rc.9", - "cockatiel": "^3.1.2", - "commander": "^6.2.1", - "form-data": "^4.0.0", - "glob": "^7.0.6", - "hosted-git-info": "^4.0.2", - "jsonc-parser": "^3.2.0", - "keytar": "^7.7.0", - "leven": "^3.1.0", - "markdown-it": "^12.3.2", - "mime": "^1.3.4", - "minimatch": "^3.0.3", - "parse-semver": "^1.1.1", - "read": "^1.0.7", - "semver": "^7.5.2", - "tmp": "^0.2.1", - "typed-rest-client": "^1.8.4", - "url-join": "^4.0.1", - "xml2js": "^0.5.0", - "yauzl": "^2.3.1", - "yazl": "^2.2.2" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true - }, - "@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", - "dev": true, - "requires": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" - } - }, - "@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", - "dev": true, - "requires": { - "@whatwg-node/events": "^0.0.3", - "busboy": "^1.6.0", - "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "dependencies": { - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - } - } - }, - "are-docs-informative": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", - "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", - "dev": true - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, - "requires": { - "dequal": "^2.0.3" - } - }, - "array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==" - }, - "array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", - "dev": true, - "requires": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - } - }, - "array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - } - }, - "array.prototype.findlastindex": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", - "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - } - }, - "array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, - "array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, - "array.prototype.toreversed": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", - "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, - "array.prototype.tosorted": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", - "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", - "dev": true, - "requires": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.1.0", - "es-shim-unscopables": "^1.0.2" - } - }, - "arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" - } - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true - }, - "asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "dev": true, - "requires": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "ast-types": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz", - "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==", - "dev": true, - "requires": { - "tslib": "^2.0.1" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "requires": { - "possible-typed-array-names": "^1.0.0" - } - }, - "axe-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz", - "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==", - "dev": true - }, - "axobject-query": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", - "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", - "dev": true, - "requires": { - "dequal": "^2.0.3" - } - }, - "azure-devops-node-api": { - "version": "12.5.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", - "integrity": "sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==", - "dev": true, - "requires": { - "tunnel": "0.0.6", - "typed-rest-client": "^1.8.4" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "boolean": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", - "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "brfs": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz", - "integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==", - "dev": true, - "requires": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^2.2.0", - "through2": "^2.0.0" - } - }, - "browser-or-node": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-3.0.0.tgz", - "integrity": "sha512-iczIdVJzGEYhP5DqQxYM9Hh7Ztpqqi+CXZpSmX8ALFs9ecXkQIeqRyM6TfxEfMVpwhl3dSuDvxdzzo9sUOIVBQ==" - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" - } - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true - }, - "buffer-equal": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", - "integrity": "sha512-RgSV6InVQ9ODPdLWJ5UAqBqJBOg370Nz6ZQtRzpt6nUjc8v0St97uJ4PYC6NztqIScrAXafKM3mZPMygSe1ggA==", - "dev": true - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dev": true, - "requires": { - "streamsearch": "^1.1.0" - } - }, - "c8": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@istanbuljs/schema": "^0.1.3", - "find-up": "^5.0.0", - "foreground-child": "^3.1.1", - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-report": "^3.0.1", - "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", - "v8-to-istanbul": "^9.0.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1" - }, - "dependencies": { - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - } - } - }, - "call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, - "requires": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001600", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", - "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "chalk-template": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", - "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", - "requires": { - "chalk": "^4.1.2" - } - }, - "chance": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.11.tgz", - "integrity": "sha512-kqTg3WWywappJPqtgrdvbA380VoXO2eu9VCV895JgbyHsaErXdyHK9LOZ911OvAk6L0obK7kDk9CGs8+oBawVA==", - "dev": true - }, - "cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", - "dev": true, - "requires": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" - } - }, - "cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - } - }, - "chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.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" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - } - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true, - "optional": true - }, - "ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true - }, - "clean-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", - "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "cockatiel": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cockatiel/-/cockatiel-3.1.2.tgz", - "integrity": "sha512-5yARKww0dWyWg2/3xZeXgoxjHLwpVqFptj9Zy7qioJ6+/L0ARM184sgMUrQDjxw7ePJWlGhV998mKhzrxT0/Kg==", - "dev": true - }, - "collection-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collection-utils/-/collection-utils-1.0.1.tgz", - "integrity": "sha512-LA2YTIlR7biSpXkKYwwuzGjwL5rjWEZVOSnvdUc7gObvWe4WkjxOpfrdhoP7Hs09YWDVfg0Mal9BpAqLfVEzQg==" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - }, - "dependencies": { - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - } - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "command-line-args": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", - "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", - "requires": { - "array-back": "^3.1.0", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" - } - }, - "command-line-usage": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.1.tgz", - "integrity": "sha512-NCyznE//MuTjwi3y84QVUGEOT+P5oto1e1Pk/jFPVdPPfsG03qpTIl3yw6etR+v73d0lXsoojRpvbru2sqePxQ==", - "requires": { - "array-back": "^6.2.2", - "chalk-template": "^0.4.0", - "table-layout": "^3.0.0", - "typical": "^7.1.1" - }, - "dependencies": { - "array-back": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", - "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==" - }, - "typical": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", - "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==" - } - } - }, - "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true - }, - "comment-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", - "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, - "convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "core-js-pure": { - "version": "3.36.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.36.1.tgz", - "integrity": "sha512-NXCvHvSVYSrewP0L5OhltzXeWFJLo2AL2TYnj6iLV3Bw8mM62wAQMNgUCRI6EBu6hVVpbCxmOPlxh1Ikw2PfUA==", - "dev": true - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "cosmiconfig": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.0.0.tgz", - "integrity": "sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==", - "dev": true, - "requires": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - } - }, - "create-eslint-index": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/create-eslint-index/-/create-eslint-index-1.0.0.tgz", - "integrity": "sha512-nXvJjnfDytOOaPOonX0h0a1ggMoqrhdekGeZkD6hkcWYvlCWhU719tKFVh8eU04CnMwu3uwe1JjwuUF2C3k2qg==", - "dev": true, - "requires": { - "lodash.get": "^4.3.0" - } - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "requires": { - "node-fetch": "^2.6.12" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - } - }, - "css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true - }, - "damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true - }, - "data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", - "dev": true, - "requires": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - } - }, - "data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - } - }, - "data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", - "dev": true, - "requires": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - } - }, - "dataloader": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.2.2.tgz", - "integrity": "sha512-8YnDaaf7N3k/q5HnTJVuzSyLETjoZjVmHc4AeKAzOvKHEFQKcn64OKBfzHYtE9zGjctNM7V9I0MfnUVLpi7M5g==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "optional": true, - "requires": { - "mimic-response": "^3.1.0" - } - }, - "deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "optional": true - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "requires": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - } - }, - "define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "requires": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true - }, - "dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true - }, - "detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "dev": true, - "optional": true - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - } - }, - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0" - } - }, - "domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "requires": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - } - }, - "dset": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.3.tgz", - "integrity": "sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==", - "dev": true - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.4.717", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.717.tgz", - "integrity": "sha512-6Fmg8QkkumNOwuZ/5mIbMU9WI3H2fmn5ajcVya64I5Yr5CcNmO7vcLt0Y7c96DCiMO5/9G+4sI2r6eEvdg1F7A==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "requires": { - "iconv-lite": "^0.6.2" - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "optional": true, - "requires": { - "once": "^1.4.0" - } - }, - "enhance-visitors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/enhance-visitors/-/enhance-visitors-1.0.0.tgz", - "integrity": "sha512-+29eJLiUixTEDRaZ35Vu8jP3gPLNcQQkQkOQjLp2X+6cZGGPDD/uasbFzvLsJKnGZnvmyZ0srxudwOtskHeIDA==", - "dev": true, - "requires": { - "lodash": "^4.13.1" - } - }, - "enhanced-resolve": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.23.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.2.tgz", - "integrity": "sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.5", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" - } - }, - "es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.2.4" - } - }, - "es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true - }, - "es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "es-iterator-helpers": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz", - "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.2" - } - }, - "es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, - "requires": { - "es-errors": "^1.3.0" - } - }, - "es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" - } - }, - "es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "requires": { - "hasown": "^2.0.0" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "esbuild": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", - "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", - "dev": true, - "requires": { - "@esbuild/aix-ppc64": "0.20.2", - "@esbuild/android-arm": "0.20.2", - "@esbuild/android-arm64": "0.20.2", - "@esbuild/android-x64": "0.20.2", - "@esbuild/darwin-arm64": "0.20.2", - "@esbuild/darwin-x64": "0.20.2", - "@esbuild/freebsd-arm64": "0.20.2", - "@esbuild/freebsd-x64": "0.20.2", - "@esbuild/linux-arm": "0.20.2", - "@esbuild/linux-arm64": "0.20.2", - "@esbuild/linux-ia32": "0.20.2", - "@esbuild/linux-loong64": "0.20.2", - "@esbuild/linux-mips64el": "0.20.2", - "@esbuild/linux-ppc64": "0.20.2", - "@esbuild/linux-riscv64": "0.20.2", - "@esbuild/linux-s390x": "0.20.2", - "@esbuild/linux-x64": "0.20.2", - "@esbuild/netbsd-x64": "0.20.2", - "@esbuild/openbsd-x64": "0.20.2", - "@esbuild/sunos-x64": "0.20.2", - "@esbuild/win32-arm64": "0.20.2", - "@esbuild/win32-ia32": "0.20.2", - "@esbuild/win32-x64": "0.20.2" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "dev": true, - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha512-AWwVMNxwhN8+NIPQzAQZCm7RkLC4RbM3B1OobMuyp3i+w73X57KCKaVIxaRZb+DYCojq7rspo+fmuQfAboyhFg==", - "dev": true - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "eslint-ast-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz", - "integrity": "sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA==", - "dev": true, - "requires": { - "lodash.get": "^4.4.2", - "lodash.zip": "^4.2.0" - } - }, - "eslint-compat-utils": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.0.tgz", - "integrity": "sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==", - "dev": true, - "requires": { - "semver": "^7.5.4" - } - }, - "eslint-config-canonical": { - "version": "41.4.2", - "resolved": "https://registry.npmjs.org/eslint-config-canonical/-/eslint-config-canonical-41.4.2.tgz", - "integrity": "sha512-ayP7OPe7Mh0Vf1K8PXQshekyeM3dNcEVwoJAu5ozrZXftaY36NPaH57Oj1FcmMzr2gpc3WbjQ5frVqxnqjnKMg==", - "dev": true, - "requires": { - "@babel/core": "^7.23.0", - "@babel/eslint-parser": "^7.22.15", - "@babel/eslint-plugin": "^7.22.10", - "@babel/plugin-syntax-import-assertions": "^7.22.5", - "@graphql-eslint/eslint-plugin": "^3.20.1", - "@next/eslint-plugin-next": "^13.5.4", - "@rushstack/eslint-patch": "^1.5.1", - "@typescript-eslint/eslint-plugin": "^6.7.5", - "@typescript-eslint/parser": "^6.7.5", - "eslint-config-prettier": "^9.0.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-ava": "^14.0.0", - "eslint-plugin-canonical": "^4.14.0", - "eslint-plugin-cypress": "^2.15.1", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-flowtype": "^8.0.3", - "eslint-plugin-fp": "^2.3.0", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jest": "^27.4.2", - "eslint-plugin-jsdoc": "^46.8.2", - "eslint-plugin-jsonc": "^2.10.0", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-lodash": "^7.4.0", - "eslint-plugin-mocha": "^10.2.0", - "eslint-plugin-modules-newline": "0.0.6", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^5.0.1", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-regexp": "^1.15.0", - "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-typescript-sort-keys": "^3.0.0", - "eslint-plugin-unicorn": "^48.0.1", - "eslint-plugin-vitest": "^0.3.2", - "eslint-plugin-yml": "^1.10.0", - "eslint-plugin-zod": "^1.4.0", - "prettier": "^3.0.3", - "ramda": "^0.29.1", - "yaml-eslint-parser": "^1.2.2" - }, - "dependencies": { - "eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", - "dev": true, - "requires": {} - }, - "eslint-plugin-canonical": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-canonical/-/eslint-plugin-canonical-4.18.0.tgz", - "integrity": "sha512-0Egc0FKOnCRdu3bFEJhfHkdkusIgW0UxdemukkowZQnQsnf12FHSJ7K26b+tZ5pKB7cTyECSaqvEpoIJfplX4g==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "^6.1.0", - "chance": "^1.1.11", - "debug": "^4.3.4", - "eslint-import-resolver-typescript": "^3.5.3", - "eslint-module-utils": "^2.7.4", - "is-get-set-prop": "^1.0.0", - "is-js-type": "^2.0.0", - "is-obj-prop": "^1.0.0", - "is-proto-prop": "^2.0.0", - "lodash": "^4.17.21", - "natural-compare": "^1.4.0", - "recast": "^0.23.2", - "roarr": "^7.14.2", - "ts-unused-exports": "^9.0.3", - "xregexp": "^5.1.1" - } - }, - "eslint-plugin-prettier": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", - "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" - } - }, - "synckit": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", - "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", - "dev": true, - "requires": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" - } - }, - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "eslint-config-prettier": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", - "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", - "dev": true, - "requires": { - "get-stdin": "^6.0.0" - } - }, - "eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-import-resolver-typescript": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", - "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", - "dev": true, - "requires": { - "debug": "^4.3.4", - "enhanced-resolve": "^5.12.0", - "eslint-module-utils": "^2.7.4", - "fast-glob": "^3.3.1", - "get-tsconfig": "^4.5.0", - "is-core-module": "^2.11.0", - "is-glob": "^4.0.3" - } - }, - "eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", - "dev": true, - "requires": { - "debug": "^3.2.7" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-plugin-ava": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-14.0.0.tgz", - "integrity": "sha512-XmKT6hppaipwwnLVwwvQliSU6AF1QMHiNoLD5JQfzhUhf0jY7CO0O624fQrE+Y/fTb9vbW8r77nKf7M/oHulxw==", - "dev": true, - "requires": { - "enhance-visitors": "^1.0.0", - "eslint-utils": "^3.0.0", - "espree": "^9.0.0", - "espurify": "^2.1.1", - "import-modules": "^2.1.0", - "micro-spelling-correcter": "^1.1.1", - "pkg-dir": "^5.0.0", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "eslint-plugin-canonical": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-canonical/-/eslint-plugin-canonical-3.4.0.tgz", - "integrity": "sha512-akY2RpJD3VC2XXsU/02VsbzkHfybsZTsruOKPI7pJzQ+lZaS3UGM1H0vUKf0itXsbMHHJbIT78hUXU2d2HemZQ==", - "dev": true, - "requires": { - "is-get-set-prop": "^1.0.0", - "is-js-type": "^2.0.0", - "is-obj-prop": "^1.0.0", - "is-proto-prop": "^2.0.0", - "lodash": "^4.17.21", - "natural-compare": "^1.4.0", - "ts-unused-exports": "^9.0.3", - "xregexp": "^5.1.1" - } - }, - "eslint-plugin-cypress": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.1.tgz", - "integrity": "sha512-eLHLWP5Q+I4j2AWepYq0PgFEei9/s5LvjuSqWrxurkg1YZ8ltxdvMNmdSf0drnsNo57CTgYY/NIHHLRSWejR7w==", - "dev": true, - "requires": { - "globals": "^13.20.0" - } - }, - "eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, - "requires": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "eslint-plugin-eslint-comments": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", - "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "ignore": "^5.0.5" - } - }, - "eslint-plugin-flowtype": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz", - "integrity": "sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ==", - "dev": true, - "requires": { - "lodash": "^4.17.21", - "string-natural-compare": "^3.0.1" - } - }, - "eslint-plugin-fp": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-fp/-/eslint-plugin-fp-2.3.0.tgz", - "integrity": "sha512-3n2oHibwoIxAht9/+ZaTldhI6brXORgl8oNXqZd+d9xuAQt2SBJ2/aml0oQRMWvXrgsz2WG6wfC++NjzSG3prA==", - "dev": true, - "requires": { - "create-eslint-index": "^1.0.0", - "eslint-ast-utils": "^1.0.0", - "lodash": "^4.13.1", - "req-all": "^0.1.0" - } - }, - "eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", - "dev": true, - "requires": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", - "semver": "^6.3.1", - "tsconfig-paths": "^3.15.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "eslint-plugin-jest": { - "version": "27.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", - "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "^5.10.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - } - }, - "@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - } - } - }, - "eslint-plugin-jsdoc": { - "version": "46.10.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", - "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", - "dev": true, - "requires": { - "@es-joy/jsdoccomment": "~0.41.0", - "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.1", - "debug": "^4.3.4", - "escape-string-regexp": "^4.0.0", - "esquery": "^1.5.0", - "is-builtin-module": "^3.2.1", - "semver": "^7.5.4", - "spdx-expression-parse": "^4.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - } - } - }, - "eslint-plugin-json": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-json/-/eslint-plugin-json-3.1.0.tgz", - "integrity": "sha512-MrlG2ynFEHe7wDGwbUuFPsaT2b1uhuEFhJ+W1f1u+1C2EkXmTYJp4B1aAdQQ8M+CC3t//N/oRKiIVw14L2HR1g==", - "dev": true, - "requires": { - "lodash": "^4.17.21", - "vscode-json-languageservice": "^4.1.6" - } - }, - "eslint-plugin-jsonc": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.14.1.tgz", - "integrity": "sha512-Tei6G4N7pZulP5MHi0EIdtseiCqUPkDMd0O8Zrw4muMIlsjJ5/B9X+U3Pfo6B7l0mTL9LN9FwuWT70dRJ6z7tg==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "eslint-compat-utils": "^0.5.0", - "espree": "^9.6.1", - "graphemer": "^1.4.0", - "jsonc-eslint-parser": "^2.0.4", - "natural-compare": "^1.4.0", - "synckit": "^0.6.0" - } - }, - "eslint-plugin-jsx-a11y": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz", - "integrity": "sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.23.2", - "aria-query": "^5.3.0", - "array-includes": "^3.1.7", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "=4.7.0", - "axobject-query": "^3.2.1", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "es-iterator-helpers": "^1.0.15", - "hasown": "^2.0.0", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.entries": "^1.1.7", - "object.fromentries": "^2.0.7" - }, - "dependencies": { - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - } - } - }, - "eslint-plugin-lodash": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-lodash/-/eslint-plugin-lodash-7.4.0.tgz", - "integrity": "sha512-Tl83UwVXqe1OVeBRKUeWcfg6/pCW1GTRObbdnbEJgYwjxp5Q92MEWQaH9+dmzbRt6kvYU1Mp893E79nJiCSM8A==", - "dev": true, - "requires": { - "lodash": "^4.17.21" - } - }, - "eslint-plugin-mocha": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.1.tgz", - "integrity": "sha512-G85ALUgKaLzuEuHhoW3HVRgPTmia6njQC3qCG6CEvA8/Ja9PDZnRZOuzekMki+HaViEQXINuYsmhp5WR5/4MfA==", - "dev": true, - "requires": { - "eslint-utils": "^3.0.0", - "globals": "^13.24.0", - "rambda": "^7.4.0" - } - }, - "eslint-plugin-modules-newline": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-modules-newline/-/eslint-plugin-modules-newline-0.0.6.tgz", - "integrity": "sha512-69NpBr68U6pmXL+y+KHl/64PwRarceC3/sCNUVxRbe0gPI32SIw8AtdpkqNiJYCa2yMd4lRrkrnU09Yio7KVzA==", - "dev": true, - "requires": { - "requireindex": "~1.1.0" - } - }, - "eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", - "dev": true, - "requires": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "eslint-plugin-promise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", - "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", - "dev": true, - "requires": {} - }, - "eslint-plugin-react": { - "version": "7.34.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz", - "integrity": "sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==", - "dev": true, - "requires": { - "array-includes": "^3.1.7", - "array.prototype.findlast": "^1.2.4", - "array.prototype.flatmap": "^1.3.2", - "array.prototype.toreversed": "^1.1.2", - "array.prototype.tosorted": "^1.1.3", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.17", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.7", - "object.fromentries": "^2.0.7", - "object.hasown": "^1.1.3", - "object.values": "^1.1.7", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.10" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "requires": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "eslint-plugin-react-hooks": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", - "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", - "dev": true, - "requires": {} - }, - "eslint-plugin-regexp": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.15.0.tgz", - "integrity": "sha512-YEtQPfdudafU7RBIFci81R/Q1yErm0mVh3BkGnXD2Dk8DLwTFdc2ITYH1wCnHKim2gnHfPFgrkh+b2ozyyU7ag==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "comment-parser": "^1.1.2", - "grapheme-splitter": "^1.0.4", - "jsdoctypeparser": "^9.0.0", - "refa": "^0.11.0", - "regexp-ast-analysis": "^0.6.0", - "scslre": "^0.2.0" - } - }, - "eslint-plugin-simple-import-sort": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", - "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", - "dev": true, - "requires": {} - }, - "eslint-plugin-typescript-sort-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-typescript-sort-keys/-/eslint-plugin-typescript-sort-keys-3.2.0.tgz", - "integrity": "sha512-GutszvriaVtwmn7pQjuj9/9o0iXhD7XZs0/424+zsozdRr/fdg5e8206t478Vnqnqi1GjuxcAolj1kf74KnhPA==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "^5.0.0", - "json-schema": "^0.4.0", - "natural-compare-lite": "^1.4.0" - } - }, - "eslint-plugin-unicorn": { - "version": "48.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz", - "integrity": "sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.5", - "@eslint-community/eslint-utils": "^4.4.0", - "ci-info": "^3.8.0", - "clean-regexp": "^1.0.0", - "esquery": "^1.5.0", - "indent-string": "^4.0.0", - "is-builtin-module": "^3.2.1", - "jsesc": "^3.0.2", - "lodash": "^4.17.21", - "pluralize": "^8.0.0", - "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.27", - "regjsparser": "^0.10.0", - "semver": "^7.5.4", - "strip-indent": "^3.0.0" - }, - "dependencies": { - "jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", - "dev": true - }, - "pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true - } - } - }, - "eslint-plugin-vitest": { - "version": "0.3.26", - "resolved": "https://registry.npmjs.org/eslint-plugin-vitest/-/eslint-plugin-vitest-0.3.26.tgz", - "integrity": "sha512-oxe5JSPgRjco8caVLTh7Ti8PxpwJdhSV0hTQAmkFcNcmy/9DnqLB/oNVRA11RmVRP//2+jIIT6JuBEcpW3obYg==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "^7.1.1" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.4.0.tgz", - "integrity": "sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0" - } - }, - "@typescript-eslint/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.4.0.tgz", - "integrity": "sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.4.0.tgz", - "integrity": "sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - } - }, - "@typescript-eslint/utils": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.4.0.tgz", - "integrity": "sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.4.0", - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/typescript-estree": "7.4.0", - "semver": "^7.5.4" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.4.0.tgz", - "integrity": "sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.4.0", - "eslint-visitor-keys": "^3.4.1" - } - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "eslint-plugin-yml": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.13.2.tgz", - "integrity": "sha512-1i71VhmsG5UxE41rIJmJjhlTTxYy7upAY5Hqj8AdBc7rfJzRIZr3a2spuOS8+N7ZDCWsHAWY3J6lzQNQHDv6Uw==", - "dev": true, - "requires": { - "debug": "^4.3.2", - "eslint-compat-utils": "^0.5.0", - "lodash": "^4.17.21", - "natural-compare": "^1.4.0", - "yaml-eslint-parser": "^1.2.1" - } - }, - "eslint-plugin-zod": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-zod/-/eslint-plugin-zod-1.4.0.tgz", - "integrity": "sha512-i9WzQGw2X5fQcuQh33mA8DQjZJM/yuyZvs1Fc5EyTidX7Ed/g832+1FEQ4u5gtXy+jZ+DVsB5+oMHj4tIOfeZg==", - "dev": true, - "requires": {} - }, - "eslint-rule-composer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", - "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", - "dev": true - }, - "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true - }, - "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "requires": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "espurify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-2.1.1.tgz", - "integrity": "sha512-zttWvnkhcDyGOhSH4vO2qCBILpdCMv/MX8lp4cqgRkQoDRGK2oZxi2GfWhlP2dIXmk7BaKeOTuzbHhyC68o8XQ==", - "dev": true - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" - }, - "exec-sh": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.1.tgz", - "integrity": "sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg==", - "dev": true, - "requires": { - "merge": "^1.1.3" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true, - "optional": true - }, - "extract-files": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/extract-files/-/extract-files-11.0.0.tgz", - "integrity": "sha512-FuoE1qtbJ4bBVvv94CC7s0oTnKUGvQs+Rjf1L2SJFfS+HTVVjhPFtehPdQ0JiGPqVNfSSZvL5yzHHQq2Z4WNhQ==", - "dev": true - }, - "falafel": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.5.tgz", - "integrity": "sha512-HuC1qF9iTnHDnML9YZAdCDQwT0yKl/U55K4XSUXqGAA2GLoafFgWRqdAbhWJxXaYD4pyoVxAJ8wH670jMpI9DQ==", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "isarray": "^2.0.1" - }, - "dependencies": { - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "fast-decode-uri-component": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", - "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", - "dev": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fast-printf": { - "version": "1.6.9", - "resolved": "https://registry.npmjs.org/fast-printf/-/fast-printf-1.6.9.tgz", - "integrity": "sha512-FChq8hbz65WMj4rstcQsFB0O7Cy++nmbNfLYnD9cYv2cRn8EG6k/MGn9kO/tjO66t09DLDugj3yL+V2o6Qftrg==", - "dev": true, - "requires": { - "boolean": "^3.1.4" - } - }, - "fast-querystring": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-querystring/-/fast-querystring-1.1.2.tgz", - "integrity": "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==", - "dev": true, - "requires": { - "fast-decode-uri-component": "^1.0.1" - } - }, - "fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "dev": true, - "requires": { - "punycode": "^1.3.2" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true - } - } - }, - "fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "requires": { - "array-back": "^3.0.1" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "requires": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, - "foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - } - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true, - "optional": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true - }, - "function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - } - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - } - }, - "get-set-props": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-set-props/-/get-set-props-0.1.0.tgz", - "integrity": "sha512-7oKuKzAGKj0ag+eWZwcGw2fjiZ78tXnXQoBgY0aU7ZOxTu4bB7hSuQSDgtKy978EDH062P5FmD2EWiDpQS9K9Q==", - "dev": true - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true - }, - "get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", - "dev": true, - "requires": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - } - }, - "get-tsconfig": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", - "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", - "dev": true, - "requires": { - "resolve-pkg-maps": "^1.0.0" - } - }, - "github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true, - "optional": true - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.3" - } - }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "graphql": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.11.7.tgz", - "integrity": "sha512-x7uDjyz8Jx+QPbpCFCMQ8lltnQa4p4vSYHx6ADe8rVYRTdsyhCJbvSty5DAsLVmU6cGakl+r8HQYolKHxk/tiw==", - "requires": { - "iterall": "1.1.3" - } - }, - "graphql-config": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-4.5.0.tgz", - "integrity": "sha512-x6D0/cftpLUJ0Ch1e5sj1TZn6Wcxx4oMfmhaG9shM0DKajA9iR+j1z86GSTQ19fShbGvrSSvbIQsHku6aQ6BBw==", - "dev": true, - "requires": { - "@graphql-tools/graphql-file-loader": "^7.3.7", - "@graphql-tools/json-file-loader": "^7.3.7", - "@graphql-tools/load": "^7.5.5", - "@graphql-tools/merge": "^8.2.6", - "@graphql-tools/url-loader": "^7.9.7", - "@graphql-tools/utils": "^9.0.0", - "cosmiconfig": "8.0.0", - "jiti": "1.17.1", - "minimatch": "4.2.3", - "string-env-interpolation": "1.0.1", - "tslib": "^2.4.0" - }, - "dependencies": { - "@graphql-tools/graphql-file-loader": { - "version": "7.5.17", - "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.17.tgz", - "integrity": "sha512-hVwwxPf41zOYgm4gdaZILCYnKB9Zap7Ys9OhY1hbwuAuC4MMNY9GpUjoTU3CQc3zUiPoYStyRtUGkHSJZ3HxBw==", - "dev": true, - "requires": { - "@graphql-tools/import": "6.7.18", - "@graphql-tools/utils": "^9.2.1", - "globby": "^11.0.3", - "tslib": "^2.4.0", - "unixify": "^1.0.0" - }, - "dependencies": { - "@graphql-tools/import": { - "version": "6.7.18", - "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-6.7.18.tgz", - "integrity": "sha512-XQDdyZTp+FYmT7as3xRWH/x8dx0QZA2WZqfMF5EWb36a0PiH7WwlRQYIdyYXj8YCLpiWkeBXgBRHmMnwEYR8iQ==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^9.2.1", - "resolve-from": "5.0.0", - "tslib": "^2.4.0" - } - } - } - }, - "@graphql-tools/json-file-loader": { - "version": "7.4.18", - "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-7.4.18.tgz", - "integrity": "sha512-AJ1b6Y1wiVgkwsxT5dELXhIVUPs/u3VZ8/0/oOtpcoyO/vAeM5rOvvWegzicOOnQw8G45fgBRMkkRfeuwVt6+w==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^9.2.1", - "globby": "^11.0.3", - "tslib": "^2.4.0", - "unixify": "^1.0.0" - } - }, - "@graphql-tools/load": { - "version": "7.8.14", - "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-7.8.14.tgz", - "integrity": "sha512-ASQvP+snHMYm+FhIaLxxFgVdRaM0vrN9wW2BKInQpktwWTXVyk+yP5nQUCEGmn0RTdlPKrffBaigxepkEAJPrg==", - "dev": true, - "requires": { - "@graphql-tools/schema": "^9.0.18", - "@graphql-tools/utils": "^9.2.1", - "p-limit": "3.1.0", - "tslib": "^2.4.0" - }, - "dependencies": { - "@graphql-tools/schema": { - "version": "9.0.19", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", - "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", - "dev": true, - "requires": { - "@graphql-tools/merge": "^8.4.1", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - } - } - } - }, - "@graphql-tools/merge": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.2.tgz", - "integrity": "sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0" - } - }, - "@graphql-tools/url-loader": { - "version": "7.17.18", - "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-7.17.18.tgz", - "integrity": "sha512-ear0CiyTj04jCVAxi7TvgbnGDIN2HgqzXzwsfcqiVg9cvjT40NcMlZ2P1lZDgqMkZ9oyLTV8Bw6j+SyG6A+xPw==", - "dev": true, - "requires": { - "@ardatan/sync-fetch": "^0.0.1", - "@graphql-tools/delegate": "^9.0.31", - "@graphql-tools/executor-graphql-ws": "^0.0.14", - "@graphql-tools/executor-http": "^0.1.7", - "@graphql-tools/executor-legacy-ws": "^0.0.11", - "@graphql-tools/utils": "^9.2.1", - "@graphql-tools/wrap": "^9.4.2", - "@types/ws": "^8.0.0", - "@whatwg-node/fetch": "^0.8.0", - "isomorphic-ws": "^5.0.0", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.11", - "ws": "^8.12.0" - }, - "dependencies": { - "@graphql-tools/delegate": { - "version": "9.0.35", - "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-9.0.35.tgz", - "integrity": "sha512-jwPu8NJbzRRMqi4Vp/5QX1vIUeUPpWmlQpOkXQD2r1X45YsVceyUUBnktCrlJlDB4jPRVy7JQGwmYo3KFiOBMA==", - "dev": true, - "requires": { - "@graphql-tools/batch-execute": "^8.5.22", - "@graphql-tools/executor": "^0.0.20", - "@graphql-tools/schema": "^9.0.19", - "@graphql-tools/utils": "^9.2.1", - "dataloader": "^2.2.2", - "tslib": "^2.5.0", - "value-or-promise": "^1.0.12" - }, - "dependencies": { - "@graphql-tools/batch-execute": { - "version": "8.5.22", - "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.5.22.tgz", - "integrity": "sha512-hcV1JaY6NJQFQEwCKrYhpfLK8frSXDbtNMoTur98u10Cmecy1zrqNKSqhEyGetpgHxaJRqszGzKeI3RuroDN6A==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^9.2.1", - "dataloader": "^2.2.2", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - } - }, - "@graphql-tools/executor": { - "version": "0.0.20", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-0.0.20.tgz", - "integrity": "sha512-GdvNc4vszmfeGvUqlcaH1FjBoguvMYzxAfT6tDd4/LgwymepHhinqLNA5otqwVLW+JETcDaK7xGENzFomuE6TA==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^9.2.1", - "@graphql-typed-document-node/core": "3.2.0", - "@repeaterjs/repeater": "^3.0.4", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - } - }, - "@graphql-tools/schema": { - "version": "9.0.19", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", - "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", - "dev": true, - "requires": { - "@graphql-tools/merge": "^8.4.1", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - } - } - } - }, - "@graphql-tools/executor-graphql-ws": { - "version": "0.0.14", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-0.0.14.tgz", - "integrity": "sha512-P2nlkAsPZKLIXImFhj0YTtny5NQVGSsKnhi7PzXiaHSXc6KkzqbWZHKvikD4PObanqg+7IO58rKFpGXP7eeO+w==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^9.2.1", - "@repeaterjs/repeater": "3.0.4", - "@types/ws": "^8.0.0", - "graphql-ws": "5.12.1", - "isomorphic-ws": "5.0.0", - "tslib": "^2.4.0", - "ws": "8.13.0" - } - }, - "@graphql-tools/executor-http": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-0.1.10.tgz", - "integrity": "sha512-hnAfbKv0/lb9s31LhWzawQ5hghBfHS+gYWtqxME6Rl0Aufq9GltiiLBcl7OVVOnkLF0KhwgbYP1mB5VKmgTGpg==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^9.2.1", - "@repeaterjs/repeater": "^3.0.4", - "@whatwg-node/fetch": "^0.8.1", - "dset": "^3.1.2", - "extract-files": "^11.0.0", - "meros": "^1.2.1", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - } - }, - "@graphql-tools/executor-legacy-ws": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-0.0.11.tgz", - "integrity": "sha512-4ai+NnxlNfvIQ4c70hWFvOZlSUN8lt7yc+ZsrwtNFbFPH/EroIzFMapAxM9zwyv9bH38AdO3TQxZ5zNxgBdvUw==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^9.2.1", - "@types/ws": "^8.0.0", - "isomorphic-ws": "5.0.0", - "tslib": "^2.4.0", - "ws": "8.13.0" - } - }, - "@graphql-tools/wrap": { - "version": "9.4.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-9.4.2.tgz", - "integrity": "sha512-DFcd9r51lmcEKn0JW43CWkkI2D6T9XI1juW/Yo86i04v43O9w2/k4/nx2XTJv4Yv+iXwUw7Ok81PGltwGJSDSA==", - "dev": true, - "requires": { - "@graphql-tools/delegate": "^9.0.31", - "@graphql-tools/schema": "^9.0.18", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - }, - "dependencies": { - "@graphql-tools/schema": { - "version": "9.0.19", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", - "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", - "dev": true, - "requires": { - "@graphql-tools/merge": "^8.4.1", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - } - } - } - } - } - }, - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "requires": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - } - }, - "minimatch": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.3.tgz", - "integrity": "sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - }, - "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, - "requires": {} - } - } - }, - "graphql-depth-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/graphql-depth-limit/-/graphql-depth-limit-1.1.0.tgz", - "integrity": "sha512-+3B2BaG8qQ8E18kzk9yiSdAa75i/hnnOwgSeAxVJctGQPvmeiLtqKOYF6HETCyRjiF7Xfsyal0HbLlxCQkgkrw==", - "dev": true, - "requires": { - "arrify": "^1.0.1" - } - }, - "graphql-ws": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.12.1.tgz", - "integrity": "sha512-umt4f5NnMK46ChM2coO36PTFhHouBrK9stWWBczERguwYrGnPNxJ9dimU6IyOBfOkC6Izhkg4H8+F51W/8CYDg==", - "dev": true, - "requires": {} - }, - "has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "dev": true - }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "requires": { - "es-define-property": "^1.0.0" - } - }, - "has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.3" - } - }, - "hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "requires": { - "function-bind": "^1.1.2" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" - } - }, - "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - } - }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "import-modules": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.1.0.tgz", - "integrity": "sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A==", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true, - "optional": true - }, - "internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - } - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", - "dev": true - }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, - "requires": { - "builtin-modules": "^3.3.0" - }, - "dependencies": { - "builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true - } - } - }, - "is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true - }, - "is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, - "requires": { - "hasown": "^2.0.0" - } - }, - "is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", - "dev": true, - "requires": { - "is-typed-array": "^1.1.13" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-finalizationregistry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", - "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-get-set-prop": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-get-set-prop/-/is-get-set-prop-1.0.0.tgz", - "integrity": "sha512-DvAYZ1ZgGUz4lzxKMPYlt08qAUqyG9ckSg2pIjfvcQ7+pkVNUHk8yVLXOnCLe5WKXhLop8oorWFBJHpwWQpszQ==", - "dev": true, - "requires": { - "get-set-props": "^0.1.0", - "lowercase-keys": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-js-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-js-type/-/is-js-type-2.0.0.tgz", - "integrity": "sha512-Aj13l47+uyTjlQNHtXBV8Cji3jb037vxwMWCgopRR8h6xocgBGW3qG8qGlIOEmbXQtkKShKuBM9e8AA1OeQ+xw==", - "dev": true, - "requires": { - "js-types": "^1.0.0" - } - }, - "is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", - "dev": true - }, - "is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-obj-prop": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-obj-prop/-/is-obj-prop-1.0.0.tgz", - "integrity": "sha512-5Idb61slRlJlsAzi0Wsfwbp+zZY+9LXKUAZpvT/1ySw+NxKLRWfa0Bzj+wXI3fX5O9hiddm5c3DAaRSNP/yl2w==", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0", - "obj-props": "^1.0.0" - } - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, - "is-proto-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-proto-prop/-/is-proto-prop-2.0.0.tgz", - "integrity": "sha512-jl3NbQ/fGLv5Jhan4uX+Ge9ohnemqyblWVVCpAvtTQzNFvV2xhJq+esnkIbYQ9F1nITXoLfDDQLp7LBw/zzncg==", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0", - "proto-props": "^2.0.0" - } - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", - "dev": true - }, - "is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", - "dev": true, - "requires": { - "call-bind": "^1.0.7" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==" - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, - "requires": { - "which-typed-array": "^1.1.14" - } - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==" - }, - "is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", - "dev": true - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-weakset": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", - "dev": true, - "requires": {} - }, - "istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true - }, - "istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "iterall": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.1.3.tgz", - "integrity": "sha512-Cu/kb+4HiNSejAPhSaN1VukdNTTi/r4/e+yykqjlG/IW+1gZH5b4+Bq3whDX4tvbYugta3r8KTMUiqT3fIGxuQ==" - }, - "iterator.prototype": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", - "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", - "dev": true, - "requires": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" - } - }, - "jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", - "dev": true, - "requires": { - "@isaacs/cliui": "^8.0.2", - "@pkgjs/parseargs": "^0.11.0" - } - }, - "jiti": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.17.1.tgz", - "integrity": "sha512-NZIITw8uZQFuzQimqjUxIrIcEdxYDFIe/0xYfIlVXTkiBjjyBEvgasj5bb0/cHtPRD/NziPbT312sFrkI5ALpw==", - "dev": true - }, - "js-base64": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", - "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-types": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz", - "integrity": "sha512-bfwqBW9cC/Lp7xcRpug7YrXm0IVw+T9e3g4mCYnv0Pjr3zIzU9PCQElYU9oSGAWzXlbdl9X5SAMPejO9sxkeUw==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "jsdoc-type-pratt-parser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", - "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", - "dev": true - }, - "jsdoctypeparser": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", - "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "jsonc-eslint-parser": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.0.tgz", - "integrity": "sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==", - "dev": true, - "requires": { - "acorn": "^8.5.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", - "semver": "^7.3.5" - } - }, - "jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true - }, - "jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "requires": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - } - }, - "jszip": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "dev": true, - "requires": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, - "keytar": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", - "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", - "dev": true, - "optional": true, - "requires": { - "node-addon-api": "^4.3.0", - "prebuild-install": "^7.0.1" - } - }, - "keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "requires": { - "json-buffer": "3.0.1" - } - }, - "language-subtag-registry": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", - "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", - "dev": true - }, - "language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "requires": { - "language-subtag-registry": "^0.3.20" - } - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dev": true, - "requires": { - "immediate": "~3.0.5" - } - }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dev": true, - "requires": { - "uc.micro": "^1.0.1" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lodash.assignwith": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", - "integrity": "sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g==" - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true - }, - "lodash.lowercase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.lowercase/-/lodash.lowercase-4.3.0.tgz", - "integrity": "sha512-UcvP1IZYyDKyEL64mmrwoA1AbFu5ahojhTtkOUr1K9dbuxzS9ev8i4TxMMGCqRC9TE8uDaSoufNAXxRPNTseVA==", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.zip": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", - "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==", - "dev": true - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "dev": true, - "requires": { - "vlq": "^0.2.2" - } - }, - "make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "requires": { - "semver": "^7.5.3" - } - }, - "make-error": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", - "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==" - }, - "markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", - "dev": true, - "requires": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "dependencies": { - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true - } - } - }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "merge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", - "dev": true - }, - "merge-source-map": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", - "integrity": "sha512-PGSmS0kfnTnMJCzJ16BLLCEe6oeYCamKFFdQKshi4BmM6FUwipjVOcBFGxqtQtirtAG4iZvHlqST9CpZKqlRjA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - } - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "meros": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/meros/-/meros-1.3.0.tgz", - "integrity": "sha512-2BNGOimxEz5hmjUG2FwoxCt5HN7BXdaWyFqEwxPTrJzVdABtrL4TiHTcsWSFAxPQ/tOnEaQEJh3qWq71QRMY+w==", - "dev": true, - "requires": {} - }, - "micro-spelling-correcter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/micro-spelling-correcter/-/micro-spelling-correcter-1.1.1.tgz", - "integrity": "sha512-lkJ3Rj/mtjlRcHk6YyCbvZhyWTOzdBvTHsxMmZSk5jxN1YyVSQ+JETAom55mdzfcyDrY/49Z7UCW760BK30crg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "optional": true - }, - "min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true - }, - "minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", - "dev": true - }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true, - "optional": true - }, - "mocha": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", - "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", - "dev": true, - "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.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" - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - } - } - }, - "moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true, - "optional": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, - "node-abi": { - "version": "3.57.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.57.0.tgz", - "integrity": "sha512-Dp+A9JWxRaKuHP35H77I4kCKesDy5HUDEmScia2FyncMTOXASMyg251F5PhFoDA5uqBrDDffiLpbqnrZmNXW+g==", - "dev": true, - "optional": true, - "requires": { - "semver": "^7.3.5" - } - }, - "node-addon-api": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", - "dev": true, - "optional": true - }, - "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-persist": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/node-persist/-/node-persist-4.0.1.tgz", - "integrity": "sha512-QtRjwAlcOQChQpfG6odtEhxYmA3nS5XYr+bx9JRjwahl1TM3sm9J3CCn51/MI0eoHRb2DrkEsCOFo8sq8jG5sQ==", - "dev": true - }, - "node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - } - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "requires": { - "boolbase": "^1.0.0" - } - }, - "obj-props": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/obj-props/-/obj-props-1.4.0.tgz", - "integrity": "sha512-p7p/7ltzPDiBs6DqxOrIbtRdwxxVRBj5ROukeNb9RgA+fawhrz5n2hpNz8DDmYR//tviJSj7nUnlppGmONkjiQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true - }, - "object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true - }, - "object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - }, - "object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - } - }, - "object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - } - }, - "object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - } - }, - "object.hasown": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", - "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", - "dev": true, - "requires": { - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - } - }, - "object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "requires": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "parse-semver": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", - "integrity": "sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==", - "dev": true, - "requires": { - "semver": "^5.1.0" - }, - "dependencies": { - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - } - } - }, - "parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "requires": { - "entities": "^4.4.0" - } - }, - "parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "requires": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - } - }, - "path-equal": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz", - "integrity": "sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-scurry": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", - "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", - "dev": true, - "requires": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "dev": true - } - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pkg-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", - "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", - "dev": true, - "requires": { - "find-up": "^5.0.0" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" - }, - "possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true - }, - "prebuild-install": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", - "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true - }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "promise-timeout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/promise-timeout/-/promise-timeout-1.3.0.tgz", - "integrity": "sha512-5yANTE0tmi5++POym6OgtFmwfDvOXABD9oj/jLQr5GPEyuNEb7jH4wbbANJceJid49jwhi1RddxnhnEAb/doqg==", - "dev": true - }, - "prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "proto-props": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proto-props/-/proto-props-2.0.0.tgz", - "integrity": "sha512-2yma2tog9VaRZY2mn3Wq51uiSW4NcPYT1cQdBagwyrznrilKSZwIZ0UG3ZPL/mx+axEns0hE35T5ufOYZXEnBQ==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "optional": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true - }, - "pvtsutils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", - "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", - "dev": true, - "requires": { - "tslib": "^2.6.1" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", - "dev": true - }, - "qs": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", - "dev": true, - "requires": { - "side-channel": "^1.0.6" - } - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "quicktype": { - "version": "file:packages/quicktype-vscode", - "requires": { - "@types/mocha": "^10.0.6", - "@types/node": "18.x", - "@types/node-persist": "^3.1.8", - "@types/readable-stream": "^4.0.10", - "@types/vscode": "^1.87.0", - "@typescript-eslint/eslint-plugin": "^7.0.2", - "@typescript-eslint/parser": "^7.7.0", - "@vscode/test-cli": "^0.0.6", - "@vscode/test-electron": "^2.3.9", - "@vscode/vsce": "^2.25.0", - "eslint": "^8.56.0", - "node-persist": "^4.0.1", - "quicktype-core": "file:../quicktype-core", - "quicktype-typescript-input": "file:../quicktype-typescript-input", - "typescript": "^5.3.3", - "unicode-properties": "github:quicktype/unicode-properties#dist" - }, - "dependencies": { - "@typescript-eslint/eslint-plugin": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz", - "integrity": "sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/type-utils": "7.6.0", - "@typescript-eslint/utils": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - } - }, - "@typescript-eslint/parser": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz", - "integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "7.7.1", - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/typescript-estree": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1", - "debug": "^4.3.4" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz", - "integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1" - } - }, - "@typescript-eslint/types": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz", - "integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz", - "integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz", - "integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.7.1", - "eslint-visitor-keys": "^3.4.3" - } - } - } - }, - "@typescript-eslint/scope-manager": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz", - "integrity": "sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0" - } - }, - "@typescript-eslint/type-utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz", - "integrity": "sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "7.6.0", - "@typescript-eslint/utils": "7.6.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - } - }, - "@typescript-eslint/types": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.6.0.tgz", - "integrity": "sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz", - "integrity": "sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - } - }, - "@typescript-eslint/utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.6.0.tgz", - "integrity": "sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.15", - "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/typescript-estree": "7.6.0", - "semver": "^7.6.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz", - "integrity": "sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.6.0", - "eslint-visitor-keys": "^3.4.3" - } - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true - }, - "unicode-properties": { - "version": "git+ssh://git@github.com/quicktype/unicode-properties.git#d5fddfea1ef9d05c6479a979e225476063e13f52", - "dev": true, - "from": "unicode-properties@github:quicktype/unicode-properties#dist", - "requires": { - "brfs": "^1.4.0", - "unicode-trie": "^0.3.0" - } - } - } - }, - "quicktype-core": { - "version": "file:packages/quicktype-core", - "requires": { - "@glideapps/ts-necessities": "2.2.3", - "@types/browser-or-node": "^1.3.2", - "@types/node": "18.19.31", - "@types/pako": "^1.0.0", - "@types/pluralize": "0.0.30", - "@types/readable-stream": "4.0.10", - "@types/unicode-properties": "^1.3.0", - "@types/urijs": "^1.19.25", - "browser-or-node": "^3.0.0", - "collection-utils": "^1.0.1", - "cross-fetch": "^4.0.0", - "is-url": "^1.2.4", - "js-base64": "^3.7.7", - "lodash": "^4.17.21", - "pako": "^1.0.6", - "pluralize": "^8.0.0", - "readable-stream": "4.5.2", - "typescript": "4.9.5", - "unicode-properties": "^1.4.1", - "urijs": "^1.19.1", - "wordwrap": "^1.0.0", - "yaml": "^2.4.1" - }, - "dependencies": { - "js-base64": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", - "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==" - }, - "pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==" - } - } - }, - "quicktype-graphql-input": { - "version": "file:packages/quicktype-graphql-input", - "requires": { - "@types/graphql": "^0.11.7", - "@types/node": "18.19.31", - "collection-utils": "^1.0.1", - "graphql": "^0.11.7", - "quicktype-core": "file:../quicktype-core", - "typescript": "4.9.5" - } - }, - "quicktype-typescript-input": { - "version": "file:packages/quicktype-typescript-input", - "requires": { - "@mark.probst/typescript-json-schema": "0.55.0", - "@types/node": "18.19.31", - "quicktype-core": "file:../quicktype-core", - "typescript": "4.9.5" - }, - "dependencies": { - "@glideapps/ts-necessities": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.1.2.tgz", - "integrity": "sha512-tLjfhinr6doUBcWi7BWnkT2zT6G5UhiZftsiIH6xVvykeXE+FU7Wr0MyqwmqideWlDD5rG+VjVLptLviGo04CA==" - }, - "isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", - "requires": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "quicktype-core": { - "version": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-20.0.0.tgz", - "integrity": "sha512-zuvQAk/i4STnhLC4t3nNWPr6u5ArHBW+TME3jA7YQQMp1UdDsFD+4lzqt49b73aYhhmrk9BlO/fX7PcRR5l6YQ==", - "requires": { - "@glideapps/ts-necessities": "2.1.2", - "@types/urijs": "^1.19.8", - "browser-or-node": "^1.2.1", - "collection-utils": "^1.0.1", - "is-url": "^1.2.4", - "isomorphic-fetch": "^2.2.1", - "js-base64": "^2.4.3", - "lodash": "^4.17.21", - "pako": "^1.0.6", - "pluralize": "^7.0.0", - "readable-stream": "2.3.7", - "unicode-properties": "^1.4.1", - "urijs": "^1.19.1", - "wordwrap": "^1.0.0", - "yaml": "^1.5.0" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" - } - } - }, - "quote-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", - "integrity": "sha512-kKr2uQ2AokadPjvTyKJQad9xELbZwYzWlNfI3Uz2j/ib5u6H9lDP7fUUR//rMycd0gv4Z5P1qXMfXR8YpIxrjQ==", - "dev": true, - "requires": { - "buffer-equal": "0.0.1", - "minimist": "^1.1.3", - "through2": "^2.0.0" - } - }, - "rambda": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", - "integrity": "sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==", - "dev": true - }, - "ramda": { - "version": "0.29.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.29.1.tgz", - "integrity": "sha512-OfxIeWzd4xdUNxlWhgFazxsA/nl3mS4/jGZI5n00uWOoSSFRhC1b6gl6xvmzUamgmqELraWp0J/qqVlXYPDPyA==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "optional": true - } - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", - "dev": true, - "requires": { - "mute-stream": "~0.0.4" - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } - } - }, - "readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", - "requires": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - } - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "recast": { - "version": "0.23.6", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.6.tgz", - "integrity": "sha512-9FHoNjX1yjuesMwuthAmPKabxYQdOgihFYmT5ebXfYGBcnqXZf3WOVz+5foEZ8Y83P4ZY6yQD5GMmtV+pgCCAQ==", - "dev": true, - "requires": { - "ast-types": "^0.16.1", - "esprima": "~4.0.0", - "source-map": "~0.6.1", - "tiny-invariant": "^1.3.3", - "tslib": "^2.0.1" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "refa": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/refa/-/refa-0.11.0.tgz", - "integrity": "sha512-486O8/pQXwj9jV0mVvUnTsxq0uknpBnNJ0eCUhkZqJRQ8KutrT1PhzmumdCeM1hSBF2eMlFPmwECRER4IbKXlQ==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.5.0" - } - }, - "reflect.getprototypeof": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", - "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.1", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" - } - }, - "regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true - }, - "regexp-ast-analysis": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.6.0.tgz", - "integrity": "sha512-OLxjyjPkVH+rQlBLb1I/P/VTmamSjGkvN5PTV5BXP432k3uVz727J7H29GA5IFiY0m7e1xBN7049Wn59FY3DEQ==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.5.0", - "refa": "^0.11.0" - } - }, - "regexp-tree": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", - "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", - "dev": true - }, - "regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", - "dev": true, - "requires": { - "call-bind": "^1.0.6", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "regjsparser": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", - "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true - } - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", - "dev": true - }, - "req-all": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/req-all/-/req-all-0.1.0.tgz", - "integrity": "sha512-ZdvPr8uXy9ujX3KujwE2P1HWkMYgogIhqeAeyb47MqWjSfyxERSm0TNbN/IapCCmWDufXab04AYrRgObaJCJ6Q==", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" - }, - "requireindex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.1.0.tgz", - "integrity": "sha512-LBnkqsDE7BZKvqylbmn7lTIVdpx4K/QCduRATpO5R+wtPmky/a8pN1bO2D6wXppn1497AJF9mNjqAXr6bdl9jg==", - "dev": true - }, - "resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "requires": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "roarr": { - "version": "7.21.1", - "resolved": "https://registry.npmjs.org/roarr/-/roarr-7.21.1.tgz", - "integrity": "sha512-3niqt5bXFY1InKU8HKWqqYTYjtrBaxBMnXELXCXUYgtNYGUtZM5rB46HIC430AyacL95iEniGf7RgqsesykLmQ==", - "dev": true, - "requires": { - "fast-printf": "^1.6.9", - "safe-stable-stringify": "^2.4.3", - "semver-compare": "^1.0.0" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", - "dev": true, - "requires": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-regex": "^1.1.4" - } - }, - "safe-stable-stringify": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", - "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sax": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", - "dev": true - }, - "scslre": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/scslre/-/scslre-0.2.0.tgz", - "integrity": "sha512-4hc49fUMmX3jM0XdFUAPBrs1xwEcdHa0KyjEsjFs+Zfc66mpFpq5YmRgDtl+Ffo6AtJIilfei+yKw8fUn3N88w==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.5.0", - "refa": "^0.11.0", - "regexp-ast-analysis": "^0.6.0" - } - }, - "semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", - "dev": true - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "requires": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - } - }, - "set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "requires": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true - }, - "shallow-copy": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", - "integrity": "sha512-b6i4ZpVuUxB9h5gfCxPiusKYkqTMOjEbBs4wMaFbkfia4yFv92UKZ6Df8WXcKbn08JNL/abvg3FnMAOfakDvUw==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - } - }, - "signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "optional": true - }, - "simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, - "optional": true, - "requires": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - }, - "dependencies": { - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - } - } - }, - "spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true - }, - "spdx-expression-parse": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", - "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", - "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", - "dev": true - }, - "static-eval": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.1.1.tgz", - "integrity": "sha512-MgWpQ/ZjGieSVB3eOJVs4OA2LT/q1vx98KPCTTQPzq/aLr0YUXTsgryTXr4SLfR0ZfUUCiedM9n/ABeDIyy4mA==", - "dev": true, - "requires": { - "escodegen": "^2.1.0" - }, - "dependencies": { - "escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "requires": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "source-map": "~0.6.1" - } - } - } - }, - "static-module": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz", - "integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==", - "dev": true, - "requires": { - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "~1.9.0", - "falafel": "^2.1.0", - "has": "^1.0.1", - "magic-string": "^0.22.4", - "merge-source-map": "1.0.4", - "object-inspect": "~1.4.0", - "quote-stream": "~1.0.2", - "readable-stream": "~2.3.3", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.0", - "through2": "~2.0.3" - }, - "dependencies": { - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "object-inspect": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz", - "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==", - "dev": true - }, - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, - "stop-iteration-iterator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", - "dev": true, - "requires": { - "internal-slot": "^1.0.4" - } - }, - "stream-chain": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-2.2.5.tgz", - "integrity": "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==" - }, - "stream-json": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/stream-json/-/stream-json-1.8.0.tgz", - "integrity": "sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw==", - "requires": { - "stream-chain": "^2.2.5" - } - }, - "stream-read-all": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stream-read-all/-/stream-read-all-3.0.1.tgz", - "integrity": "sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A==" - }, - "streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "string-env-interpolation": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-env-interpolation/-/string-env-interpolation-1.0.1.tgz", - "integrity": "sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg==", - "dev": true - }, - "string-natural-compare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", - "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==", - "dev": true - }, - "string-to-stream": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-3.0.1.tgz", - "integrity": "sha512-Hl092MV3USJuUCC6mfl9sPzGloA3K5VwdIeJjYIkXY/8K+mUvaeEabWJgArp+xXrsWxCajeT2pc4axbVhIZJyg==", - "requires": { - "readable-stream": "^3.4.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "string-width-cjs": { - "version": "npm:string-width@4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "string.prototype.matchall": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", - "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "regexp.prototype.flags": "^1.5.2", - "set-function-name": "^2.0.2", - "side-channel": "^1.0.6" - } - }, - "string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" - } - }, - "string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - } - }, - "string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-ansi-cjs": { - "version": "npm:strip-ansi@6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - }, - "strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "requires": { - "min-indent": "^1.0.0" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "synckit": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.6.2.tgz", - "integrity": "sha512-Vhf+bUa//YSTYKseDiiEuQmhGCoIF3CVBhunm3r/DQnYiGT4JssmnKQc44BIyOZRK2pKjXXAgbhfmbeoC9CJpA==", - "dev": true, - "requires": { - "tslib": "^2.3.1" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "table-layout": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-3.0.2.tgz", - "integrity": "sha512-rpyNZYRw+/C+dYkcQ3Pr+rLxW4CfHpXjPDnG7lYhdRoUcZTUt+KEsX+94RGp/aVp/MQU35JCITv2T/beY4m+hw==", - "requires": { - "@75lb/deep-merge": "^1.1.1", - "array-back": "^6.2.2", - "command-line-args": "^5.2.1", - "command-line-usage": "^7.0.0", - "stream-read-all": "^3.0.1", - "typical": "^7.1.1", - "wordwrapjs": "^5.1.0" - }, - "dependencies": { - "array-back": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", - "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==" - }, - "typical": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", - "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==" - } - } - }, - "tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true - }, - "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "optional": true, - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, - "tiny-inflate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.2.tgz", - "integrity": "sha1-k9nez/yIBb1X6uQxDwt0Xptvs6c=" - }, - "tiny-invariant": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", - "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", - "dev": true - }, - "tmp": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", - "dev": true, - "requires": {} - }, - "ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, - "ts-unused-exports": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ts-unused-exports/-/ts-unused-exports-9.0.5.tgz", - "integrity": "sha512-1XAXaH2i4Al/aZO06pWDn9MUgTN0KQi+fvWudiWfHUTHAav45gzrx7Xq6JAsu6+LoMlVoyGvNvZSPW3KTjDncA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "tsconfig-paths": "^3.9.0" - } - }, - "tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - } - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" - } - }, - "typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - } - }, - "typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - } - }, - "typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" - } - }, - "typed-rest-client": { - "version": "1.8.11", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", - "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", - "dev": true, - "requires": { - "qs": "^6.9.1", - "tunnel": "0.0.6", - "underscore": "^1.12.1" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" - }, - "typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==" - }, - "uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - } - }, - "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" - }, - "unicode-properties": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.4.1.tgz", - "integrity": "sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==", - "requires": { - "base64-js": "^1.3.0", - "unicode-trie": "^2.0.0" - }, - "dependencies": { - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==" - }, - "unicode-trie": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", - "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", - "requires": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - } - } - }, - "unicode-trie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-0.3.1.tgz", - "integrity": "sha512-WgVuO0M2jDl7hVfbPgXv2LUrD81HM0bQj/bvLGiw6fJ4Zo8nNFnDrA0/hU2Te/wz6pjxCm5cxJwtLjo2eyV51Q==", - "dev": true, - "requires": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - }, - "dependencies": { - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", - "dev": true - } - } - }, - "unixify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unixify/-/unixify-1.0.0.tgz", - "integrity": "sha512-6bc58dPYhCMHHuwxldQxO3RRNZ4eCogZ/st++0+fcC1nr0jiGUtAdBJ2qzmLQWSxbtz42pWt4QQMiZ9HvZf5cg==", - "dev": true, - "requires": { - "normalize-path": "^2.1.1" - } - }, - "update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urijs": { - "version": "1.19.11", - "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", - "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==" - }, - "url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", - "dev": true - }, - "urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" - }, - "v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - } - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - }, - "dependencies": { - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - } - } - }, - "value-or-promise": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", - "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", - "dev": true - }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", - "dev": true - }, - "vscode-json-languageservice": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.2.1.tgz", - "integrity": "sha512-xGmv9QIWs2H8obGbWg+sIPI/3/pFgj/5OWBhNzs00BkYQ9UaB2F6JJaGB/2/YOZJ3BvLXQTC4Q7muqU25QgAhA==", - "dev": true, - "requires": { - "jsonc-parser": "^3.0.0", - "vscode-languageserver-textdocument": "^1.0.3", - "vscode-languageserver-types": "^3.16.0", - "vscode-nls": "^5.0.0", - "vscode-uri": "^3.0.3" - } - }, - "vscode-languageserver-textdocument": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", - "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", - "dev": true - }, - "vscode-languageserver-types": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", - "dev": true - }, - "vscode-nls": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.2.0.tgz", - "integrity": "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==", - "dev": true - }, - "vscode-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", - "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", - "dev": true - }, - "watch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/watch/-/watch-1.0.2.tgz", - "integrity": "sha1-NApxe952Vyb6CqB9ch4BR6VR3ww=", - "dev": true, - "requires": { - "exec-sh": "^0.2.0", - "minimist": "^1.2.0" - } - }, - "web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "dev": true - }, - "webcrypto-core": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", - "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", - "dev": true, - "requires": { - "@peculiar/asn1-schema": "^2.3.8", - "@peculiar/json-schema": "^1.1.12", - "asn1js": "^3.0.1", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - } - } - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-fetch": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", - "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", - "dev": true, - "requires": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", - "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", - "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", - "dev": true, - "requires": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" - } - }, - "which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - } - }, - "word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "wordwrapjs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz", - "integrity": "sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==" - }, - "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - } - } - }, - "wrap-ansi-cjs": { - "version": "npm:wrap-ansi@7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", - "dev": true, - "peer": true, - "requires": {} - }, - "xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - } - }, - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "dev": true - }, - "xregexp": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-5.1.1.tgz", - "integrity": "sha512-fKXeVorD+CzWvFs7VBuKTYIW63YD1e1osxwQ8caZ6o1jg6pDAbABDG54LCIq0j5cy7PjRvGIq6sef9DYPXpncg==", - "dev": true, - "requires": { - "@babel/runtime-corejs3": "^7.16.5" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yaml": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", - "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==" - }, - "yaml-eslint-parser": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/yaml-eslint-parser/-/yaml-eslint-parser-1.2.2.tgz", - "integrity": "sha512-pEwzfsKbTrB8G3xc/sN7aw1v6A6c/pKxLAkjclnAyo5g5qOh6eL9WGu0o3cSDQZKrTNk4KL4lQSwZW+nBkANEg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^3.0.0", - "lodash": "^4.17.21", - "yaml": "^2.0.0" - } - }, - "yargs": { - "version": "17.6.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", - "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - } - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3" - } - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } } } diff --git a/package.json b/package.json index 150332161..4b723ca95 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "@types/shelljs": "^0.8.15", "@types/stream-json": "^1.7.3", "@types/urijs": "^1.19.25", + "@types/wordwrap": "^1.0.3", "@typescript-eslint/eslint-plugin": "^6.3.0", "@typescript-eslint/parser": "^6.3.0", "ajv": "^5.5.2", diff --git a/packages/quicktype-core/package.json b/packages/quicktype-core/package.json index cfe9dc95d..580100e8d 100644 --- a/packages/quicktype-core/package.json +++ b/packages/quicktype-core/package.json @@ -12,11 +12,10 @@ }, "dependencies": { "@glideapps/ts-necessities": "2.2.3", - "@types/urijs": "^1.19.25", "browser-or-node": "^3.0.0", "collection-utils": "^1.0.1", - "is-url": "^1.2.4", "cross-fetch": "^4.0.0", + "is-url": "^1.2.4", "js-base64": "^3.7.7", "lodash": "^4.17.21", "pako": "^1.0.6", @@ -29,11 +28,14 @@ }, "devDependencies": { "@types/browser-or-node": "^1.3.2", + "@types/is-url": "^1.2.32", "@types/node": "18.19.31", "@types/pako": "^1.0.0", "@types/pluralize": "0.0.30", "@types/readable-stream": "4.0.10", "@types/unicode-properties": "^1.3.0", + "@types/urijs": "^1.19.25", + "@types/wordwrap": "^1.0.3", "typescript": "4.9.5" }, "files": [ diff --git a/packages/quicktype-core/src/Annotation.ts b/packages/quicktype-core/src/Annotation.ts index 8a912f305..1b3a937bf 100644 --- a/packages/quicktype-core/src/Annotation.ts +++ b/packages/quicktype-core/src/Annotation.ts @@ -1,7 +1,8 @@ +// eslint-disable-next-line @typescript-eslint/no-extraneous-class export class AnnotationData {} export class IssueAnnotationData extends AnnotationData { - constructor(readonly message: string) { + public constructor(public readonly message: string) { super(); } } diff --git a/packages/quicktype-core/src/ConvenienceRenderer.ts b/packages/quicktype-core/src/ConvenienceRenderer.ts index ec80df6f5..2c9c6ff42 100644 --- a/packages/quicktype-core/src/ConvenienceRenderer.ts +++ b/packages/quicktype-core/src/ConvenienceRenderer.ts @@ -1,32 +1,41 @@ import { - setUnion, - setFilter, iterableEnumerate, iterableSome, mapFilter, - mapSortBy, mapFilterMap, - mapSome + mapSome, + mapSortBy, + setFilter, + setUnion } from "collection-utils"; +import _wordwrap from "wordwrap"; -import { Type, ClassType, EnumType, UnionType, TypeKind, ClassProperty, MapType, ObjectType } from "./Type"; -import { separateNamedTypes, nullableFromUnion, matchTypeExhaustive, isNamedType } from "./TypeUtils"; -import { Namespace, Name, Namer, FixedName, SimpleName, DependencyName, keywordNamespace } from "./Naming"; -import { Renderer, BlankLineConfig, RenderContext, ForEachPosition } from "./Renderer"; -import { defined, panic, nonNull, assert } from "./support/Support"; +import { enumCaseNames, getAccessorName, objectPropertyNames, unionMemberName } from "./attributes/AccessorNames"; +import { descriptionTypeAttributeKind, propertyDescriptionsTypeAttributeKind } from "./attributes/Description"; +import { TypeAttributeKind } from "./attributes/TypeAttributes"; +import { type Declaration, type DeclarationIR, cycleBreakerTypesForGraph, declarationsForGraph } from "./DeclarationIR"; +import { DependencyName, FixedName, type Name, type Namer, Namespace, SimpleName, keywordNamespace } from "./Naming"; +import { type BlankLineConfig, type ForEachPosition, type RenderContext, Renderer } from "./Renderer"; +import { type Sourcelike, serializeRenderResult, sourcelikeToSource } from "./Source"; +import { type Comment, type CommentOptions, isStringComment } from "./support/Comments"; import { trimEnd } from "./support/Strings"; -import { Sourcelike, sourcelikeToSource, serializeRenderResult } from "./Source"; - -import { declarationsForGraph, DeclarationIR, cycleBreakerTypesForGraph, Declaration } from "./DeclarationIR"; +import { assert, defined, nonNull, panic } from "./support/Support"; +import { type TargetLanguage } from "./TargetLanguage"; +import { type Transformation, followTargetType, transformationForType } from "./Transformers"; +import { + type ClassProperty, + ClassType, + EnumType, + MapType, + ObjectType, + type Type, + type TypeKind, + UnionType +} from "./Type"; import { TypeAttributeStoreView } from "./TypeGraph"; -import { TypeAttributeKind } from "./attributes/TypeAttributes"; -import { descriptionTypeAttributeKind, propertyDescriptionsTypeAttributeKind } from "./attributes/Description"; -import { enumCaseNames, objectPropertyNames, unionMemberName, getAccessorName } from "./attributes/AccessorNames"; -import { transformationForType, followTargetType, Transformation } from "./Transformers"; -import { TargetLanguage } from "./TargetLanguage"; -import { type Comment, isStringComment, type CommentOptions } from "./support/Comments"; +import { isNamedType, matchTypeExhaustive, nullableFromUnion, separateNamedTypes } from "./TypeUtils"; -const wordWrap: (s: string) => string = require("wordwrap")(90); +const wordWrap: (s: string) => string = _wordwrap(90); export const topLevelNameOrder = 1; @@ -50,7 +59,10 @@ function splitDescription(descriptions: Iterable | undefined): string[] .map(l => l.trim()); } -export type ForbiddenWordsInfo = { names: (Name | string)[]; includeGlobalForbidden: boolean }; +export interface ForbiddenWordsInfo { + includeGlobalForbidden: boolean; + names: Array; +} const assignedNameAttributeKind = new TypeAttributeKind("assignedName"); const assignedPropertyNamesAttributeKind = new TypeAttributeKind>("assignedPropertyNames"); @@ -59,37 +71,54 @@ const assignedCaseNamesAttributeKind = new TypeAttributeKind | undefined; + private _globalNamespace: Namespace | undefined; + private _nameStoreView: TypeAttributeStoreView | undefined; + private _propertyNamesStoreView: TypeAttributeStoreView> | undefined; + private _memberNamesStoreView: TypeAttributeStoreView> | undefined; + private _caseNamesStoreView: TypeAttributeStoreView> | undefined; + private _namesForTransformations: Map | undefined; private _namedTypeNamer: Namer | undefined; - // @ts-ignore: FIXME: Make this `Namer | undefined` + + // @ts-expect-error: FIXME: Make this `Namer | undefined` private _unionMemberNamer: Namer | null; - // @ts-ignore: FIXME: Make this `Namer | undefined` + + // @ts-expect-error: FIXME: Make this `Namer | undefined` private _enumCaseNamer: Namer | null; private _declarationIR: DeclarationIR | undefined; - private _namedTypes: ReadonlyArray | undefined; + + private _namedTypes: readonly Type[] | undefined; + private _namedObjects: Set | undefined; + private _namedEnums: Set | undefined; + private _namedUnions: Set | undefined; + private _haveUnions: boolean | undefined; + private _haveMaps: boolean | undefined; + private _haveOptionalProperties: boolean | undefined; + private _cycleBreakerTypes?: Set | undefined; private _alphabetizeProperties = false; - constructor(targetLanguage: TargetLanguage, renderContext: RenderContext) { + public constructor(targetLanguage: TargetLanguage, renderContext: RenderContext) { super(targetLanguage, renderContext); } - get topLevels(): ReadonlyMap { + public get topLevels(): ReadonlyMap { return this.typeGraph.topLevels; } @@ -148,6 +177,7 @@ export abstract class ConvenienceRenderer extends Renderer { if (isNamedType(type)) { return type; } + return undefined; } @@ -218,18 +248,22 @@ export abstract class ConvenienceRenderer extends Renderer { for (const [name, t] of this.topLevels) { this.nameStoreView.setForTopLevel(name, this.addNameForTopLevel(t, name)); } + for (const o of objects) { const name = this.addNameForNamedType(o); this.addPropertyNames(o, name); } + for (const e of enums) { const name = this.addNameForNamedType(e); this.addEnumCaseNames(e, name); } + for (const u of namedUnions) { const name = this.addNameForNamedType(u); this.addUnionMemberNames(u, name); } + for (const t of this.typeGraph.allTypesUnordered()) { this.addNameForTransformation(t); } @@ -302,6 +336,7 @@ export abstract class ConvenienceRenderer extends Renderer { if (name === undefined) { return panic("No name for transformation"); } + return name; } @@ -334,15 +369,18 @@ export abstract class ConvenienceRenderer extends Renderer { forbiddenNames.push(nameOrString); } } + let namespace = defined(this._otherForbiddenNamespaces).get(namespaceName); if (forbiddenStrings.length > 0 && namespace === undefined) { namespace = keywordNamespace(namespaceName, forbiddenStrings); this._otherForbiddenNamespaces = defined(this._otherForbiddenNamespaces).set(namespaceName, namespace); } + let forbiddenNamespaces = new Set(); if (info.includeGlobalForbidden) { forbiddenNamespaces = forbiddenNamespaces.add(defined(this._globalForbiddenNamespace)); } + if (namespace !== undefined) { forbiddenNamespaces = forbiddenNamespaces.add(namespace); } @@ -401,14 +439,17 @@ export abstract class ConvenienceRenderer extends Renderer { } else { name = this.makeNameForProperty(o, className, p, jsonName, assignedName); } + if (name === undefined) return undefined; if (ns === undefined) { ns = new Namespace(o.getCombinedName(), this.globalNamespace, forbiddenNamespaces, forbiddenNames); } + ns.add(name); for (const depName of this.makePropertyDependencyNames(o, className, p, jsonName, name)) { ns.add(depName); } + return name; }); defined(this._propertyNamesStoreView).set(o, names); @@ -419,6 +460,7 @@ export abstract class ConvenienceRenderer extends Renderer { if (isFixed) { return new FixedName(defined(assignedName)); } + return new DependencyName(nonNull(this._unionMemberNamer), unionMemberNameOrder, lookup => { if (assignedName !== undefined) return assignedName; return this.proposeUnionMemberName(u, unionName, t, lookup); @@ -440,11 +482,13 @@ export abstract class ConvenienceRenderer extends Renderer { } else { ns = new Namespace(u.getCombinedName(), this.globalNamespace, forbiddenNamespaces, forbiddenNames); } + let names = new Map(); for (const t of u.members) { const name = this.makeNameForUnionMember(u, unionName, followTargetType(t)); names.set(t, ns.add(name)); } + defined(this._memberNamesStoreView).set(u, names); } @@ -477,6 +521,7 @@ export abstract class ConvenienceRenderer extends Renderer { } else { ns = new Namespace(e.getCombinedName(), this.globalNamespace, forbiddenNamespaces, forbiddenNames); } + let names = new Map(); const accessorNames = enumCaseNames(e, this.targetLanguage.name); for (const caseName of e.cases) { @@ -487,8 +532,10 @@ export abstract class ConvenienceRenderer extends Renderer { } else { name = this.makeNameForEnumCase(e, enumName, caseName, assignedName); } + names.set(caseName, ns.add(name)); } + defined(this._caseNamesStoreView).set(e, names); } @@ -503,6 +550,7 @@ export abstract class ConvenienceRenderer extends Renderer { const sortedMap = mapSortBy(filteredMap, (_, n) => defined(names.get(defined(propertyNameds.get(n))))); return new Set(sortedMap.values()); } + return t.getChildren(); } @@ -609,6 +657,7 @@ export abstract class ConvenienceRenderer extends Renderer { s => this.canBreakCycles(s) ); } + return this._cycleBreakerTypes.has(t); } @@ -623,6 +672,7 @@ export abstract class ConvenienceRenderer extends Renderer { } else { topLevels = this.topLevels; } + return this.forEachWithBlankLines(topLevels, blankLocations, (t, name, pos) => f(t, this.nameStoreView.getForTopLevel(name), pos) ); @@ -631,7 +681,7 @@ export abstract class ConvenienceRenderer extends Renderer { protected forEachDeclaration( blankLocations: BlankLineConfig, f: (decl: Declaration, position: ForEachPosition) => void - ) { + ): void { this.forEachWithBlankLines( iterableEnumerate(defined(this._declarationIR).declarations), blankLocations, @@ -639,7 +689,7 @@ export abstract class ConvenienceRenderer extends Renderer { ); } - setAlphabetizeProperties(value: boolean): void { + public setAlphabetizeProperties(value: boolean): void { this._alphabetizeProperties = value; } @@ -696,10 +746,11 @@ export abstract class ConvenienceRenderer extends Renderer { sortOrder: ((n: Name, t: Type) => string) | null, f: (name: Name, t: Type, position: ForEachPosition) => void ): void { - const iterateMembers = members === null ? u.members : members; + const iterateMembers = members ?? u.members; if (sortOrder === null) { - sortOrder = n => defined(this.names.get(n)); + sortOrder = (n): string => defined(this.names.get(n)); } + const memberNames = mapFilter(defined(this._memberNamesStoreView).get(u), (_, t) => iterateMembers.has(t)); const sortedMemberNames = mapSortBy(memberNames, sortOrder); this.forEachWithBlankLines(sortedMemberNames, blankLocations, f); @@ -724,7 +775,7 @@ export abstract class ConvenienceRenderer extends Renderer { protected forEachSpecificNamedType( blankLocations: BlankLineConfig, - types: Iterable<[any, T]>, + types: Iterable<[T, T]>, f: (t: T, name: Name, position: ForEachPosition) => void ): void { this.forEachWithBlankLines(types, blankLocations, (t, _, pos) => f(t, this.nameForNamedType(t), pos)); @@ -737,7 +788,7 @@ export abstract class ConvenienceRenderer extends Renderer { | ((o: ObjectType, objectName: Name, position: ForEachPosition) => void) ): void { // FIXME: This is ugly. - this.forEachSpecificNamedType(blankLocations, defined(this._namedObjects).entries(), f as any); + this.forEachSpecificNamedType(blankLocations, defined(this._namedObjects).entries(), f); } protected forEachEnum( @@ -766,6 +817,7 @@ export abstract class ConvenienceRenderer extends Renderer { firstUnionByValue.set(v, u); } } + this.forEachWithBlankLines(firstUnionByValue, blankLocations, f); } @@ -782,7 +834,7 @@ export abstract class ConvenienceRenderer extends Renderer { if (t instanceof ObjectType) { // FIXME: This is ugly. We can't runtime check that the function // takes full object types if we have them. - (objectFunc as any)(t, name, pos); + objectFunc(t, name, pos); } else if (t instanceof EnumType) { enumFunc(t, name, pos); } else if (t instanceof UnionType) { @@ -833,6 +885,7 @@ export abstract class ConvenienceRenderer extends Renderer { if (beforeComment !== undefined) { this.emitLine(beforeComment); } + let first = true; for (const line of lines) { let start = first ? firstLineStart : lineStart; @@ -848,6 +901,7 @@ export abstract class ConvenienceRenderer extends Renderer { this.emitLine(start, line); } } + if (afterComment !== undefined) { this.emitLine(afterComment); } @@ -868,7 +922,7 @@ export abstract class ConvenienceRenderer extends Renderer { makePropertyRow: (name: Name, jsonName: string, p: ClassProperty) => Sourcelike[] ): void { let table: Sourcelike[][] = []; - const emitTable = () => { + const emitTable = (): void => { if (table.length === 0) return; this.emitTable(table); table = []; @@ -880,6 +934,7 @@ export abstract class ConvenienceRenderer extends Renderer { emitTable(); this.emitDescription(description); } + table.push(makePropertyRow(name, jsonName, p)); }); emitTable(); @@ -888,12 +943,13 @@ export abstract class ConvenienceRenderer extends Renderer { private processGraph(): void { this._declarationIR = declarationsForGraph( this.typeGraph, - this.needsTypeDeclarationBeforeUse ? t => this.canBeForwardDeclared(t) : undefined, + this.needsTypeDeclarationBeforeUse ? (t): boolean => this.canBeForwardDeclared(t) : undefined, t => this.childrenOfType(t), t => { if (t instanceof UnionType) { return this.unionNeedsName(t); } + return isNamedType(t); } ); @@ -920,11 +976,12 @@ export abstract class ConvenienceRenderer extends Renderer { const processed = new Set(); const queue = Array.from(this.typeGraph.topLevels.values()); - function visit(t: Type) { + function visit(t: Type): void { if (visitedTypes.has(t)) return; for (const c of t.getChildren()) { queue.push(c); } + visitedTypes.add(t); processed.add(process(t)); } @@ -934,6 +991,7 @@ export abstract class ConvenienceRenderer extends Renderer { if (maybeType === undefined) { break; } + visit(maybeType); } diff --git a/packages/quicktype-core/src/CycleBreaker.ts b/packages/quicktype-core/src/CycleBreaker.ts index d3eba6321..9497d9140 100644 --- a/packages/quicktype-core/src/CycleBreaker.ts +++ b/packages/quicktype-core/src/CycleBreaker.ts @@ -1,18 +1,22 @@ import { assert, panic } from "./support/Support"; -export function breakCycles(outEdges: number[][], chooseBreaker: (cycle: number[]) => [number, T]): [number, T][] { +export function breakCycles( + outEdges: number[][], + chooseBreaker: (cycle: number[]) => [number, T] +): Array<[number, T]> { const numNodes = outEdges.length; const inEdges: number[][] = []; const inDegree: number[] = []; const outDegree: number[] = []; const done: boolean[] = []; - const results: [number, T][] = []; + const results: Array<[number, T]> = []; for (let i = 0; i < numNodes; i++) { inEdges.push([]); inDegree.push(0); outDegree.push(outEdges[i].length); done.push(false); } + for (let i = 0; i < numNodes; i++) { for (const n of outEdges[i]) { inEdges[n].push(i); @@ -54,6 +58,7 @@ export function breakCycles(outEdges: number[][], chooseBreaker: (cycle: numb done[i] = true; continue; } + assert(inDegree[i] === 0 || outDegree[i] === 0, "Can't have nodes in the worklist with in and out edges"); removeNode(i); @@ -82,6 +87,7 @@ export function breakCycles(outEdges: number[][], chooseBreaker: (cycle: numb if (maybeEdge === undefined) { return panic("Presumed cycle is not a cycle"); } + const maybeFirst = path.indexOf(maybeEdge); if (maybeFirst === undefined) { // No cycle yet, continue @@ -93,11 +99,12 @@ export function breakCycles(outEdges: number[][], chooseBreaker: (cycle: numb // We found a cycle - break it const cycle = path.slice(maybeFirst); const [breakNode, info] = chooseBreaker(cycle); - assert(cycle.indexOf(breakNode) >= 0, "Breaker chose an invalid node"); + assert(cycle.includes(breakNode), "Breaker chose an invalid node"); removeNode(breakNode); results.push([breakNode, info]); break; } + continue; } diff --git a/packages/quicktype-core/src/DateTime.ts b/packages/quicktype-core/src/DateTime.ts index 20d0340b8..9f2bc4ae8 100644 --- a/packages/quicktype-core/src/DateTime.ts +++ b/packages/quicktype-core/src/DateTime.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ // https://github.com/epoberezkin/ajv/blob/4d76c6fb813b136b6ec4fe74990bc97233d75dea/lib/compile/formats.js /* @@ -29,9 +30,9 @@ const DAYS = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; const TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i; export interface DateTimeRecognizer { - isDate(s: string): boolean; - isTime(s: string): boolean; - isDateTime(s: string): boolean; + isDate: (s: string) => boolean; + isDateTime: (s: string) => boolean; + isTime: (s: string) => boolean; } const DATE_TIME_SEPARATOR = /t|\s/i; @@ -39,7 +40,7 @@ const DATE_TIME_SEPARATOR = /t|\s/i; export class DefaultDateTimeRecognizer implements DateTimeRecognizer { isDate(str: string) { // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - const matches = str.match(DATE); + const matches = DATE.exec(str); if (matches === null) return false; const month = +matches[2]; @@ -48,7 +49,7 @@ export class DefaultDateTimeRecognizer implements DateTimeRecognizer { } isTime(str: string): boolean { - const matches = str.match(TIME); + const matches = TIME.exec(str); if (matches === null) return false; const hour = +matches[1]; diff --git a/packages/quicktype-core/src/DeclarationIR.ts b/packages/quicktype-core/src/DeclarationIR.ts index 8b36dbd51..f3f15ce0f 100644 --- a/packages/quicktype-core/src/DeclarationIR.ts +++ b/packages/quicktype-core/src/DeclarationIR.ts @@ -1,10 +1,10 @@ -import { setUnionInto, setFilter, iterableFirst, setSubtract, setIntersect } from "collection-utils"; +import { iterableFirst, setFilter, setIntersect, setSubtract, setUnionInto } from "collection-utils"; -import { TypeGraph } from "./TypeGraph"; -import { Type } from "./Type"; -import { panic, defined, assert } from "./support/Support"; import { Graph } from "./Graph"; import { messageError } from "./Messages"; +import { assert, defined, panic } from "./support/Support"; +import { type Type } from "./Type"; +import { type TypeGraph } from "./TypeGraph"; export type DeclarationKind = "forward" | "define"; @@ -14,28 +14,29 @@ export interface Declaration { } export class DeclarationIR { - readonly declarations: ReadonlyArray; + public readonly declarations: readonly Declaration[]; - constructor(declarations: Iterable, readonly forwardedTypes: Set) { + public constructor( + declarations: Iterable, + public readonly forwardedTypes: Set + ) { this.declarations = Array.from(declarations); } } -function findBreaker( - t: Type, - path: ReadonlyArray, - canBreak: ((t: Type) => boolean) | undefined -): Type | undefined { +function findBreaker(t: Type, path: readonly Type[], canBreak: ((t: Type) => boolean) | undefined): Type | undefined { const index = path.indexOf(t); if (index < 0) return undefined; if (canBreak === undefined) { return path[index]; } + const potentialBreakers = path.slice(0, index + 1).reverse(); const maybeBreaker = potentialBreakers.find(canBreak); if (maybeBreaker === undefined) { return panic("Found a cycle that cannot be broken"); } + return maybeBreaker; } @@ -147,6 +148,7 @@ export function declarationsForGraph( for (const t of declarationNeeded) { declarations.push({ kind: "define", type: t }); } + return; } @@ -160,9 +162,11 @@ export function declarationsForGraph( if (forwardDeclarable.size === 0) { return messageError("IRNoForwardDeclarableTypeInCycle", {}); } + for (const t of forwardDeclarable) { declarations.push({ kind: "forward", type: t }); } + setUnionInto(forwardedTypes, forwardDeclarable); const rest = setSubtract(component, forwardDeclarable); const restGraph = new Graph(rest, true, t => setIntersect(childrenOfType(t), rest)); @@ -170,6 +174,7 @@ export function declarationsForGraph( for (const t of forwardDeclarable) { declarations.push({ kind: "define", type: t }); } + return; } diff --git a/packages/quicktype-core/src/GatherNames.ts b/packages/quicktype-core/src/GatherNames.ts index 40d1f4b05..4d8142d07 100644 --- a/packages/quicktype-core/src/GatherNames.ts +++ b/packages/quicktype-core/src/GatherNames.ts @@ -1,38 +1,41 @@ +import { setMap, setSortBy, setUnion } from "collection-utils"; import * as pluralize from "pluralize"; -import { setUnion, setMap, setSortBy } from "collection-utils"; -import { TypeGraph } from "./TypeGraph"; -import { Type, ObjectType } from "./Type"; -import { matchCompoundType, nullableFromUnion } from "./TypeUtils"; -import { TypeNames, namesTypeAttributeKind, TooManyTypeNames, tooManyNamesThreshold } from "./attributes/TypeNames"; -import { defined, panic, assert } from "./support/Support"; +import { TooManyTypeNames, TypeNames, namesTypeAttributeKind, tooManyNamesThreshold } from "./attributes/TypeNames"; +import { assert, defined, panic } from "./support/Support"; import { transformationForType } from "./Transformers"; +import { ObjectType, type Type } from "./Type"; +import { type TypeGraph } from "./TypeGraph"; +import { matchCompoundType, nullableFromUnion } from "./TypeUtils"; class UniqueQueue { private readonly _present = new Set(); - private _queue: (T | undefined)[] = []; + + private _queue: Array = []; + private _front = 0; - get size(): number { + public get size(): number { return this._queue.length - this._front; } - get isEmpty(): boolean { + public get isEmpty(): boolean { return this.size <= 0; } - push(v: T): void { + public push(v: T): void { if (this._present.has(v)) return; this._queue.push(v); this._present.add(v); } - unshift(): T { + public unshift(): T { assert(!this.isEmpty, "Trying to unshift from an empty queue"); const v = this._queue[this._front]; if (v === undefined) { return panic("Value should have been present in queue"); } + this._queue[this._front] = undefined; this._front += 1; this._present.delete(v); @@ -99,7 +102,7 @@ export function gatherNames(graph: TypeGraph, destructive: boolean, debugPrint: // null means there are too many const namesForType = new Map | null>(); - function addNames(t: Type, names: ReadonlySet | null) { + function addNames(t: Type, names: ReadonlySet | null): void { // Always use the type's given names if it has some if (t.hasNames) { const originalNames = t.getNames(); @@ -123,6 +126,7 @@ export function gatherNames(graph: TypeGraph, destructive: boolean, debugPrint: if (newNames !== null && newNames.size >= tooManyNamesThreshold) { newNames = null; } + namesForType.set(t, newNames); const transformation = transformationForType(t); @@ -204,14 +208,16 @@ export function gatherNames(graph: TypeGraph, destructive: boolean, debugPrint: if (existing === undefined) { existing = new Set(); } + existing = setUnion(existing, alternatives); if (existing.size < tooManyNamesThreshold) { return existing; } + return null; } - function processType(ancestor: Type | undefined, t: Type, alternativeSuffix: string | undefined) { + function processType(ancestor: Type | undefined, t: Type, alternativeSuffix: string | undefined): void { const names = defined(namesForType.get(t)); let processedEntry = pairsProcessed.get(ancestor); @@ -263,6 +269,7 @@ export function gatherNames(graph: TypeGraph, destructive: boolean, debugPrint: if (ancestorAlternatives !== undefined) { ancestorAlternativesForType.set(t, ancestorAlternatives); } + if (directAlternatives !== undefined) { directAlternativesForType.set(t, directAlternatives); } @@ -310,6 +317,7 @@ export function gatherNames(graph: TypeGraph, destructive: boolean, debugPrint: directAlternativesForType.set(t, null); continue; } + let alternatives = directAlternativesForType.get(t); if (alternatives === null) continue; if (alternatives === undefined) { @@ -343,6 +351,7 @@ export function gatherNames(graph: TypeGraph, destructive: boolean, debugPrint: } else { alternatives = new Set(); } + if (ancestorAlternatives !== null && ancestorAlternatives !== undefined) { alternatives = setUnion(alternatives, ancestorAlternatives); } diff --git a/packages/quicktype-core/src/Graph.ts b/packages/quicktype-core/src/Graph.ts index fcff0a56a..df186ce9c 100644 --- a/packages/quicktype-core/src/Graph.ts +++ b/packages/quicktype-core/src/Graph.ts @@ -1,6 +1,6 @@ import { setMap } from "collection-utils"; -import { defined, repeated, assert, repeatedCall } from "./support/Support"; +import { assert, defined, repeated, repeatedCall } from "./support/Support"; function countComponentGraphNodes(components: number[][]): number { if (components.length === 0) return 0; @@ -64,6 +64,7 @@ function stronglyConnectedComponents(successors: number[][]): number[][] { onStack[w] = false; scc.push(w); } while (w !== v); + sccs.push(scc); } } @@ -92,6 +93,7 @@ function buildComponentOfNodeMap(successors: number[][], components: number[][]) componentOfNode[n] = c; } } + return componentOfNode; } @@ -166,11 +168,17 @@ function findRoots(successors: number[][]): number[] { } export class Graph { - private readonly _nodes: ReadonlyArray; + private readonly _nodes: readonly T[]; + private readonly _indexByNode: ReadonlyMap; + private readonly _successors: number[][]; - constructor(nodes: Iterable, invertDirection: boolean, edges: number[][] | ((node: T) => ReadonlySet)) { + public constructor( + nodes: Iterable, + invertDirection: boolean, + edges: number[][] | ((node: T) => ReadonlySet) + ) { this._nodes = Array.from(nodes); this._indexByNode = new Map(this._nodes.map((n, i): [T, number] => [n, i])); let edgesArray: number[][]; @@ -183,24 +191,25 @@ export class Graph { if (invertDirection) { edgesArray = invertEdges(edgesArray); } + this._successors = edgesArray; } - get size(): number { + public get size(): number { return this._nodes.length; } - get nodes(): ReadonlyArray { + public get nodes(): readonly T[] { return this._nodes; } - findRoots(): ReadonlySet { + public findRoots(): ReadonlySet { const roots = findRoots(this._successors); return new Set(roots.map(n => this._nodes[n])); } // The subgraph starting at `root` must be acyclic. - dfsTraversal(root: T, preOrder: boolean, process: (node: T) => void): void { + public dfsTraversal(root: T, preOrder: boolean, process: (node: T) => void): void { const visited = repeated(this.size, false); const visit = (v: number): void => { @@ -223,7 +232,7 @@ export class Graph { visit(defined(this._indexByNode.get(root))); } - stronglyConnectedComponents(): Graph> { + public stronglyConnectedComponents(): Graph> { const components = stronglyConnectedComponents(this._successors); const componentSuccessors = buildMetaSuccessors(this._successors, components); return new Graph( @@ -233,7 +242,7 @@ export class Graph { ); } - makeDot(includeNode: (n: T) => boolean, nodeLabel: (n: T) => string): string { + public makeDot(includeNode: (n: T) => boolean, nodeLabel: (n: T) => string): string { const lines: string[] = []; lines.push("digraph G {"); lines.push(" ordering = out;"); diff --git a/packages/quicktype-core/src/GraphRewriting.ts b/packages/quicktype-core/src/GraphRewriting.ts index b3610ad80..d3c78d811 100644 --- a/packages/quicktype-core/src/GraphRewriting.ts +++ b/packages/quicktype-core/src/GraphRewriting.ts @@ -1,30 +1,32 @@ -import { mapMap, EqualityMap } from "collection-utils"; +import { EqualityMap, mapMap } from "collection-utils"; -import { PrimitiveTypeKind, Type, ClassProperty, MaybeTypeIdentity } from "./Type"; -import { combineTypeAttributesOfTypes } from "./TypeUtils"; +import { type TypeAttributes, combineTypeAttributes, emptyTypeAttributes } from "./attributes/TypeAttributes"; +import { assert, indentationString, panic } from "./support/Support"; +import { type ClassProperty, type MaybeTypeIdentity, type PrimitiveTypeKind, type Type } from "./Type"; +// eslint-disable-next-line import/no-cycle +import { type StringTypeMapping, TypeBuilder } from "./TypeBuilder"; import { - TypeGraph, - TypeRef, + type TypeGraph, + type TypeRef, + assertTypeRefGraph, derefTypeRef, + isTypeRef, typeAndAttributesForTypeRef, - assertTypeRefGraph, - typeRefIndex, - isTypeRef + typeRefIndex } from "./TypeGraph"; -import { TypeAttributes, emptyTypeAttributes, combineTypeAttributes } from "./attributes/TypeAttributes"; -import { assert, panic, indentationString } from "./support/Support"; -import { TypeBuilder, StringTypeMapping } from "./TypeBuilder"; +import { combineTypeAttributesOfTypes } from "./TypeUtils"; export interface TypeLookerUp { - lookupTypeRefs(typeRefs: TypeRef[], forwardingRef?: TypeRef): TypeRef | undefined; - reconstituteTypeRef(typeRef: TypeRef, attributes?: TypeAttributes, forwardingRef?: TypeRef): TypeRef; + lookupTypeRefs: (typeRefs: TypeRef[], forwardingRef?: TypeRef) => TypeRef | undefined; + reconstituteTypeRef: (typeRef: TypeRef, attributes?: TypeAttributes, forwardingRef?: TypeRef) => TypeRef; } export class TypeReconstituter { private _wasUsed = false; + private _typeRef: TypeRef | undefined = undefined; - constructor( + public constructor( private readonly _typeBuilder: TBuilder, private readonly _makeClassUnique: boolean, private readonly _typeAttributes: TypeAttributes, @@ -43,10 +45,11 @@ export class TypeReconstituter { return this._typeBuilder; } - getResult(): TypeRef { + public getResult(): TypeRef { if (this._typeRef === undefined) { return panic("Type was not reconstituted"); } + return this._typeRef; } @@ -62,20 +65,20 @@ export class TypeReconstituter { this.register(tref); } - lookup(tref: TypeRef): TypeRef | undefined; - lookup(trefs: Iterable): ReadonlyArray | undefined; - lookup(trefs: TypeRef | Iterable): TypeRef | ReadonlyArray | undefined { + public lookup(tref: TypeRef): TypeRef | undefined; + public lookup(trefs: Iterable): readonly TypeRef[] | undefined; + public lookup(trefs: TypeRef | Iterable): TypeRef | readonly TypeRef[] | undefined { assert(!this._wasUsed, "Cannot lookup constituents after building type"); if (isTypeRef(trefs)) { return this._typeBuilder.lookupTypeRefs([trefs], undefined, false); } else { const maybeRefs = Array.from(trefs).map(tref => this._typeBuilder.lookupTypeRefs([tref], undefined, false)); if (maybeRefs.some(tref => tref === undefined)) return undefined; - return maybeRefs as ReadonlyArray; + return maybeRefs as readonly TypeRef[]; } } - lookupMap(trefs: ReadonlyMap): ReadonlyMap | undefined { + public lookupMap(trefs: ReadonlyMap): ReadonlyMap | undefined { const resultValues = this.lookup(trefs.values()); if (resultValues === undefined) return undefined; assert(resultValues.length === trefs.size, "Didn't get back the correct number of types"); @@ -85,12 +88,13 @@ export class TypeReconstituter { result.set(k, resultValues[i]); i += 1; } + return result; } - reconstitute(tref: TypeRef): TypeRef; - reconstitute(trefs: Iterable): ReadonlyArray; - reconstitute(trefs: TypeRef | Iterable): TypeRef | ReadonlyArray { + public reconstitute(tref: TypeRef): TypeRef; + public reconstitute(trefs: Iterable): readonly TypeRef[]; + public reconstitute(trefs: TypeRef | Iterable): TypeRef | readonly TypeRef[] { assert(this._wasUsed, "Cannot reconstitute constituents before building type"); if (isTypeRef(trefs)) { return this._typeBuilder.reconstituteTypeRef(trefs); @@ -99,43 +103,46 @@ export class TypeReconstituter { } } - reconstituteMap(trefs: ReadonlyMap): ReadonlyMap { + public reconstituteMap(trefs: ReadonlyMap): ReadonlyMap { return mapMap(trefs, tref => this._typeBuilder.reconstituteTypeRef(tref)); } - getPrimitiveType(kind: PrimitiveTypeKind): void { + public getPrimitiveType(kind: PrimitiveTypeKind): void { this.register(this.builderForNewType().getPrimitiveType(kind, this._typeAttributes, this._forwardingRef)); } - getEnumType(cases: ReadonlySet): void { + public getEnumType(cases: ReadonlySet): void { this.register(this.builderForNewType().getEnumType(this._typeAttributes, cases, this._forwardingRef)); } - getUniqueMapType(): void { + public getUniqueMapType(): void { this.registerAndAddAttributes(this.builderForNewType().getUniqueMapType(this._forwardingRef)); } - getMapType(values: TypeRef): void { + public getMapType(values: TypeRef): void { this.register(this.builderForNewType().getMapType(this._typeAttributes, values, this._forwardingRef)); } - getUniqueArrayType(): void { + public getUniqueArrayType(): void { this.registerAndAddAttributes(this.builderForNewType().getUniqueArrayType(this._forwardingRef)); } - getArrayType(items: TypeRef): void { + public getArrayType(items: TypeRef): void { this.register(this.builderForNewType().getArrayType(this._typeAttributes, items, this._forwardingRef)); } - setArrayItems(items: TypeRef): void { + public setArrayItems(items: TypeRef): void { this.builderForSetting().setArrayItems(this.getResult(), items); } - makeClassProperty(tref: TypeRef, isOptional: boolean): ClassProperty { + public makeClassProperty(tref: TypeRef, isOptional: boolean): ClassProperty { return this._typeBuilder.makeClassProperty(tref, isOptional); } - getObjectType(properties: ReadonlyMap, additionalProperties: TypeRef | undefined): void { + public getObjectType( + properties: ReadonlyMap, + additionalProperties: TypeRef | undefined + ): void { this.register( this.builderForNewType().getUniqueObjectType( this._typeAttributes, @@ -146,7 +153,7 @@ export class TypeReconstituter { ); } - getUniqueObjectType( + public getUniqueObjectType( properties: ReadonlyMap | undefined, additionalProperties: TypeRef | undefined ): void { @@ -160,48 +167,49 @@ export class TypeReconstituter { ); } - getClassType(properties: ReadonlyMap): void { + public getClassType(properties: ReadonlyMap): void { if (this._makeClassUnique) { this.getUniqueClassType(false, properties); return; } + this.register(this.builderForNewType().getClassType(this._typeAttributes, properties, this._forwardingRef)); } - getUniqueClassType(isFixed: boolean, properties: ReadonlyMap | undefined): void { + public getUniqueClassType(isFixed: boolean, properties: ReadonlyMap | undefined): void { this.register( this.builderForNewType().getUniqueClassType(this._typeAttributes, isFixed, properties, this._forwardingRef) ); } - setObjectProperties( + public setObjectProperties( properties: ReadonlyMap, additionalProperties: TypeRef | undefined ): void { this.builderForSetting().setObjectProperties(this.getResult(), properties, additionalProperties); } - getUnionType(members: ReadonlySet): void { + public getUnionType(members: ReadonlySet): void { this.register(this.builderForNewType().getUnionType(this._typeAttributes, members, this._forwardingRef)); } - getUniqueUnionType(): void { + public getUniqueUnionType(): void { this.register( this.builderForNewType().getUniqueUnionType(this._typeAttributes, undefined, this._forwardingRef) ); } - getIntersectionType(members: ReadonlySet): void { + public getIntersectionType(members: ReadonlySet): void { this.register(this.builderForNewType().getIntersectionType(this._typeAttributes, members, this._forwardingRef)); } - getUniqueIntersectionType(members?: ReadonlySet): void { + public getUniqueIntersectionType(members?: ReadonlySet): void { this.register( this.builderForNewType().getUniqueIntersectionType(this._typeAttributes, members, this._forwardingRef) ); } - setSetOperationMembers(members: ReadonlySet): void { + public setSetOperationMembers(members: ReadonlySet): void { this.builderForSetting().setSetOperationMembers(this.getResult(), members); } } @@ -210,10 +218,11 @@ export abstract class BaseGraphRewriteBuilder extends TypeBuilder implements Typ protected readonly reconstitutedTypes: Map = new Map(); private _lostTypeAttributes = false; + private _printIndent = 0; - constructor( - readonly originalGraph: TypeGraph, + public constructor( + public readonly originalGraph: TypeGraph, stringTypeMapping: StringTypeMapping, alphabetizeProperties: boolean, graphHasProvenanceAttributes: boolean, @@ -229,7 +238,7 @@ export abstract class BaseGraphRewriteBuilder extends TypeBuilder implements Typ ); } - withForwardingRef( + public withForwardingRef( maybeForwardingRef: TypeRef | undefined, typeCreator: (forwardingRef: TypeRef) => TypeRef ): TypeRef { @@ -243,29 +252,39 @@ export abstract class BaseGraphRewriteBuilder extends TypeBuilder implements Typ return actualRef; } - reconstituteType(t: Type, attributes?: TypeAttributes, forwardingRef?: TypeRef): TypeRef { + public reconstituteType(t: Type, attributes?: TypeAttributes, forwardingRef?: TypeRef): TypeRef { return this.reconstituteTypeRef(t.typeRef, attributes, forwardingRef); } - abstract lookupTypeRefs(typeRefs: TypeRef[], forwardingRef?: TypeRef, replaceSet?: boolean): TypeRef | undefined; + public abstract lookupTypeRefs( + typeRefs: TypeRef[], + forwardingRef?: TypeRef, + replaceSet?: boolean + ): TypeRef | undefined; protected abstract forceReconstituteTypeRef( originalRef: TypeRef, attributes?: TypeAttributes, maybeForwardingRef?: TypeRef ): TypeRef; - reconstituteTypeRef(originalRef: TypeRef, attributes?: TypeAttributes, maybeForwardingRef?: TypeRef): TypeRef { + public reconstituteTypeRef( + originalRef: TypeRef, + attributes?: TypeAttributes, + maybeForwardingRef?: TypeRef + ): TypeRef { const maybeRef = this.lookupTypeRefs([originalRef], maybeForwardingRef); if (maybeRef !== undefined) { if (attributes !== undefined) { this.addAttributes(maybeRef, attributes); } + return maybeRef; } + return this.forceReconstituteTypeRef(originalRef, attributes, maybeForwardingRef); } - reconstituteTypeAttributes(attributes: TypeAttributes): TypeAttributes { + public reconstituteTypeAttributes(attributes: TypeAttributes): TypeAttributes { return mapMap(attributes, (v, a) => a.reconstitute(this, v)); } @@ -274,6 +293,7 @@ export abstract class BaseGraphRewriteBuilder extends TypeBuilder implements Typ for (const originalRef of typeRefs) { assertTypeRefGraph(originalRef, this.originalGraph); } + if (forwardingRef !== undefined) { assertTypeRefGraph(forwardingRef, this.typeGraph); } @@ -287,18 +307,19 @@ export abstract class BaseGraphRewriteBuilder extends TypeBuilder implements Typ return indentationString(this._printIndent); } - finish(): TypeGraph { + public finish(): TypeGraph { for (const [name, t] of this.originalGraph.topLevels) { this.addTopLevel(name, this.reconstituteType(t)); } + return super.finish(); } - setLostTypeAttributes(): void { + public setLostTypeAttributes(): void { this._lostTypeAttributes = true; } - get lostTypeAttributes(): boolean { + public get lostTypeAttributes(): boolean { return this._lostTypeAttributes; } } @@ -306,7 +327,7 @@ export abstract class BaseGraphRewriteBuilder extends TypeBuilder implements Typ export class GraphRemapBuilder extends BaseGraphRewriteBuilder { private readonly _attributeSources: Map = new Map(); - constructor( + public constructor( originalGraph: TypeGraph, stringTypeMapping: StringTypeMapping, alphabetizeProperties: boolean, @@ -328,6 +349,7 @@ export class GraphRemapBuilder extends BaseGraphRewriteBuilder { maybeSources = [target]; this._attributeSources.set(target, maybeSources); } + maybeSources.push(source); } } @@ -347,7 +369,7 @@ export class GraphRemapBuilder extends BaseGraphRewriteBuilder { return panic("We can't add forwarding intersections when we're removing forwarding intersections"); } - lookupTypeRefs(typeRefs: TypeRef[], forwardingRef?: TypeRef): TypeRef | undefined { + public lookupTypeRefs(typeRefs: TypeRef[], forwardingRef?: TypeRef): TypeRef | undefined { assert(forwardingRef === undefined, "We can't have a forwarding ref when we remap"); this.assertTypeRefsToReconstitute(typeRefs, forwardingRef); @@ -389,6 +411,7 @@ export class GraphRemapBuilder extends BaseGraphRewriteBuilder { if (attributes === undefined) { attributes = emptyTypeAttributes; } + if (attributeSources === undefined) { attributes = combineTypeAttributes( "union", @@ -402,6 +425,7 @@ export class GraphRemapBuilder extends BaseGraphRewriteBuilder { this.reconstituteTypeAttributes(combineTypeAttributesOfTypes("union", attributeSources)) ); } + const newAttributes = attributes; const reconstituter = new TypeReconstituter( @@ -425,9 +449,10 @@ export class GraphRemapBuilder extends BaseGraphRewriteBuilder { export class GraphRewriteBuilder extends BaseGraphRewriteBuilder { private readonly _setsToReplaceByMember: Map>; + private readonly _reconstitutedUnions: EqualityMap, TypeRef> = new EqualityMap(); - constructor( + public constructor( originalGraph: TypeGraph, stringTypeMapping: StringTypeMapping, alphabetizeProperties: boolean, @@ -459,7 +484,7 @@ export class GraphRewriteBuilder extends BaseGraphRewriteBuilder } } - registerUnion(typeRefs: TypeRef[], reconstituted: TypeRef): void { + public registerUnion(typeRefs: TypeRef[], reconstituted: TypeRef): void { const set = new Set(typeRefs); assert(!this._reconstitutedUnions.has(set), "Cannot register reconstituted set twice"); this._reconstitutedUnions.set(set, reconstituted); @@ -482,6 +507,7 @@ export class GraphRewriteBuilder extends BaseGraphRewriteBuilder this.reconstitutedTypes.set(index, forwardingRef); this._setsToReplaceByMember.delete(index); } + const result = this._replacer(typesToReplace, this, forwardingRef); assert(result === forwardingRef, "The forwarding ref got lost when replacing"); @@ -543,7 +569,7 @@ export class GraphRewriteBuilder extends BaseGraphRewriteBuilder } /* - reconstituteTypeUnmodified(originalType: Type): TypeRef { + public reconstituteTypeUnmodified(originalType: Type): TypeRef { const reconstituter = new TypeReconstituter( this, this.alphabetizeProperties, @@ -558,7 +584,7 @@ export class GraphRewriteBuilder extends BaseGraphRewriteBuilder // If the union of these type refs have been, or are supposed to be, reconstituted to // one target type, return it. Otherwise return undefined. - lookupTypeRefs(typeRefs: TypeRef[], forwardingRef?: TypeRef, replaceSet = true): TypeRef | undefined { + public lookupTypeRefs(typeRefs: TypeRef[], forwardingRef?: TypeRef, replaceSet = true): TypeRef | undefined { this.assertTypeRefsToReconstitute(typeRefs, forwardingRef); // Check whether we have already reconstituted them. That means ensuring @@ -572,6 +598,7 @@ export class GraphRewriteBuilder extends BaseGraphRewriteBuilder break; } } + if (allEqual) { return this.forwardIfNecessary(forwardingRef, maybeRef); } @@ -588,11 +615,13 @@ export class GraphRewriteBuilder extends BaseGraphRewriteBuilder if (maybeSet === undefined) { return undefined; } + for (let i = 1; i < typeRefs.length; i++) { if (this._setsToReplaceByMember.get(typeRefIndex(typeRefs[i])) !== maybeSet) { return undefined; } } + // Yes, this set is requested to be replaced, so do it. if (!replaceSet) return undefined; return this.replaceSet(maybeSet, forwardingRef); diff --git a/packages/quicktype-core/src/MakeTransformations.ts b/packages/quicktype-core/src/MakeTransformations.ts index 4e44d89f5..106eebbd5 100644 --- a/packages/quicktype-core/src/MakeTransformations.ts +++ b/packages/quicktype-core/src/MakeTransformations.ts @@ -1,40 +1,40 @@ -import { setFilter, iterableFirst, mapMapEntries, withDefault, iterableSome, arraySortByInto } from "collection-utils"; +import { arraySortByInto, iterableFirst, iterableSome, mapMapEntries, setFilter, withDefault } from "collection-utils"; -import { TypeGraph, TypeRef, typeRefIndex } from "./TypeGraph"; -import { TargetLanguage } from "./TargetLanguage"; -import { - UnionType, - TypeKind, - EnumType, - Type, - ArrayType, - PrimitiveType, - isNumberTypeKind, - isPrimitiveStringTypeKind, - targetTypeKindForTransformedStringTypeKind, - PrimitiveStringTypeKind -} from "./Type"; -import { GraphRewriteBuilder } from "./GraphRewriting"; -import { defined, assert, panic } from "./support/Support"; +import { minMaxLengthForType, minMaxValueForType } from "./attributes/Constraints"; +import { StringTypes } from "./attributes/StringTypes"; +import { type TypeAttributes, combineTypeAttributes, emptyTypeAttributes } from "./attributes/TypeAttributes"; +import { type GraphRewriteBuilder } from "./GraphRewriting"; +import { type RunContext } from "./Run"; +import { assert, defined, panic } from "./support/Support"; +import { type TargetLanguage } from "./TargetLanguage"; import { - UnionInstantiationTransformer, - DecodingChoiceTransformer, - Transformation, - transformationTypeAttributeKind, - StringMatchTransformer, - StringProducerTransformer, + ArrayDecodingTransformer, ChoiceTransformer, - Transformer, + DecodingChoiceTransformer, DecodingTransformer, - ParseStringTransformer, - ArrayDecodingTransformer, MinMaxLengthCheckTransformer, - MinMaxValueTransformer + MinMaxValueTransformer, + ParseStringTransformer, + StringMatchTransformer, + StringProducerTransformer, + Transformation, + type Transformer, + UnionInstantiationTransformer, + transformationTypeAttributeKind } from "./Transformers"; -import { TypeAttributes, emptyTypeAttributes, combineTypeAttributes } from "./attributes/TypeAttributes"; -import { StringTypes } from "./attributes/StringTypes"; -import { RunContext } from "./Run"; -import { minMaxLengthForType, minMaxValueForType } from "./attributes/Constraints"; +import { + ArrayType, + EnumType, + type PrimitiveStringTypeKind, + type PrimitiveType, + type Type, + type TypeKind, + UnionType, + isNumberTypeKind, + isPrimitiveStringTypeKind, + targetTypeKindForTransformedStringTypeKind +} from "./Type"; +import { type TypeGraph, type TypeRef, typeRefIndex } from "./TypeGraph"; function transformationAttributes( graph: TypeGraph, @@ -46,9 +46,10 @@ function transformationAttributes( if (debugPrintTransformations) { console.log(`transformation for ${typeRefIndex(reconstitutedTargetType)}:`); transformation.debugPrint(); - console.log(`reverse:`); + console.log("reverse:"); transformation.reverse.debugPrint(); } + return transformationTypeAttributeKind.makeAttributes(transformation); } @@ -97,9 +98,11 @@ function replaceUnion( if (targetTypeMember !== undefined) { return builder.reconstituteType(targetTypeMember); } + return builder.getPrimitiveType(targetTypeKind); } } + return builder.reconstituteType(t); } @@ -115,7 +118,7 @@ function replaceUnion( ? builder.getUnionType(union.getAttributes(), reconstitutedMemberSet) : defined(iterableFirst(reconstitutedMemberSet)); - function memberForKind(kind: TypeKind) { + function memberForKind(kind: TypeKind): number { return defined(reconstitutedMembersByKind.get(kind)); } @@ -124,7 +127,7 @@ function replaceUnion( return new UnionInstantiationTransformer(graph, memberTypeRef); } - function transformerForKind(kind: TypeKind) { + function transformerForKind(kind: TypeKind): DecodingTransformer | undefined { const member = union.findMember(kind); if (member === undefined) return undefined; const memberTypeRef = memberForKind(kind); @@ -136,6 +139,7 @@ function replaceUnion( if (maybeStringType === undefined) { maybeStringType = builder.getStringType(emptyTypeAttributes, StringTypes.unrestricted); } + return maybeStringType; } @@ -146,6 +150,7 @@ function replaceUnion( if (minMax === undefined) { return consumer(memberRef); } + const [min, max] = minMax; return new MinMaxLengthCheckTransformer(graph, getStringType(), consumer(memberRef), min, max); } else if (t instanceof EnumType && transformedTypes.has(t)) { @@ -180,7 +185,7 @@ function replaceUnion( transformerForClass === undefined || transformerForMap === undefined, "Can't have both class and map in a transformed union" ); - const transformerForObject = transformerForClass !== undefined ? transformerForClass : transformerForMap; + const transformerForObject = transformerForClass ?? transformerForMap; const transformer = new DecodingChoiceTransformer( graph, @@ -343,18 +348,23 @@ export function makeTransformations(ctx: RunContext, graph: TypeGraph, targetLan if (t instanceof UnionType) { return replaceUnion(t, builder, forwardingRef, transformedTypes, ctx.debugPrintTransformations); } + if (t instanceof ArrayType) { return replaceArray(t, builder, forwardingRef, ctx.debugPrintTransformations); } + if (t instanceof EnumType) { return replaceEnum(t, builder, forwardingRef, ctx.debugPrintTransformations); } + if (t.kind === "string") { return replaceString(t as PrimitiveType, builder, forwardingRef, ctx.debugPrintTransformations); } + if (isNumberTypeKind(t.kind)) { return replaceNumber(t as PrimitiveType, builder, forwardingRef, ctx.debugPrintTransformations); } + if (isPrimitiveStringTypeKind(t.kind)) { return replaceTransformedStringType( t as PrimitiveType, @@ -364,6 +374,7 @@ export function makeTransformations(ctx: RunContext, graph: TypeGraph, targetLan ctx.debugPrintTransformations ); } + return panic(`Cannot make transformation for type ${t.kind}`); } diff --git a/packages/quicktype-core/src/MarkovChain.ts b/packages/quicktype-core/src/MarkovChain.ts index 1c1b730a6..dec67dc1f 100644 --- a/packages/quicktype-core/src/MarkovChain.ts +++ b/packages/quicktype-core/src/MarkovChain.ts @@ -1,23 +1,24 @@ -import { panic, assert, inflateBase64 } from "./support/Support"; import { encodedMarkovChain } from "./EncodedMarkovChain"; +import { assert, inflateBase64, panic } from "./support/Support"; // This must be null, not undefined, because we read it from JSON. export type SubTrie = number | null | Trie; -export type Trie = { - count: number; +export interface Trie { arr: SubTrie[]; -}; + count: number; +} -export type MarkovChain = { - trie: Trie; +export interface MarkovChain { depth: number; -}; + trie: Trie; +} function makeTrie(): Trie { const arr: SubTrie[] = []; for (let i = 0; i < 128; i++) { arr.push(null); } + return { count: 0, arr }; } @@ -35,6 +36,7 @@ function lookup(t: Trie, seq: string, i: number): Trie | number | undefined { if (n === null) { return undefined; } + if (typeof n === "object") { return lookup(n, seq, i + 1); } else { @@ -52,12 +54,14 @@ function increment(t: Trie, seq: string, i: number): void { if (typeof t !== "object") { return panic("Malformed trie"); } + let n = t.arr[first]; if (n === null) { n = 0; } else if (typeof n === "object") { return panic("Malformed trie"); } + t.arr[first] = n + 1; t.count += 1; return; @@ -67,10 +71,12 @@ function increment(t: Trie, seq: string, i: number): void { if (st === null) { t.arr[first] = st = makeTrie(); } + if (typeof st !== "object") { return panic("Malformed trie"); } - return increment(st, seq, i + 1); + + increment(st, seq, i + 1); } export function train(lines: string[], depth: number): MarkovChain { @@ -93,6 +99,7 @@ export function evaluateFull(mc: MarkovChain, word: string): [number, number[]] if (word.length < depth) { return [1, []]; } + let p = 1; const scores: number[] = []; for (let i = depth; i <= word.length; i++) { @@ -100,12 +107,15 @@ export function evaluateFull(mc: MarkovChain, word: string): [number, number[]] if (typeof cp === "object") { return panic("Did we mess up the depth?"); } + if (cp === undefined) { cp = 0.0001; } + scores.push(cp); p = p * cp; } + return [Math.pow(p, 1 / (word.length - depth + 1)), scores]; } @@ -113,7 +123,7 @@ export function evaluate(mc: MarkovChain, word: string): number { return evaluateFull(mc, word)[0]; } -function randomInt(lower: number, upper: number) { +function randomInt(lower: number, upper: number): number { const range = upper - lower; return lower + Math.floor(Math.random() * range); } @@ -124,14 +134,17 @@ export function generate(mc: MarkovChain, state: string, unseenWeight: number): if (typeof t === "number") { return panic("Wrong depth?"); } + if (t === undefined) { return String.fromCharCode(randomInt(32, 127)); } + const counts = t.arr.map((x, i) => (x === null ? (i === 0 ? 0 : unseenWeight) : (x as number))); let n = 0; for (const c of counts) { n += c; } + const r = randomInt(0, n); let sum = 0; for (let i = 0; i < counts.length; i++) { @@ -140,6 +153,7 @@ export function generate(mc: MarkovChain, state: string, unseenWeight: number): return String.fromCharCode(i); } } + return panic("We screwed up bookkeeping, or randomInt"); } diff --git a/packages/quicktype-core/src/Messages.ts b/packages/quicktype-core/src/Messages.ts index d740163ec..0c945480a 100644 --- a/packages/quicktype-core/src/Messages.ts +++ b/packages/quicktype-core/src/Messages.ts @@ -1,5 +1,6 @@ -import { StringMap } from "./support/Support"; -import { Ref } from "./input/JSONSchemaInput"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { type Ref } from "./input/JSONSchemaInput"; +import { type StringMap } from "./support/Support"; export type ErrorProperties = | { kind: "InternalError"; properties: { message: string } } @@ -7,11 +8,11 @@ export type ErrorProperties = // Misc | { kind: "MiscJSONParseError"; - properties: { description: string; address: string; message: string }; + properties: { address: string; description: string; message: string }; } | { kind: "MiscReadError"; properties: { fileOrURL: string; message: string } } | { kind: "MiscUnicodeHighSurrogateWithoutLowSurrogate"; properties: {} } - | { kind: "MiscInvalidMinMaxConstraint"; properties: { min: number; max: number } } + | { kind: "MiscInvalidMinMaxConstraint"; properties: { max: number; min: number } } // Inference | { kind: "InferenceJSONReferenceNotRooted"; properties: { reference: string } } @@ -25,9 +26,9 @@ export type ErrorProperties = | { kind: "SchemaRefMustBeString"; properties: { actual: string; ref: Ref } } | { kind: "SchemaAdditionalTypesForbidRequired"; properties: { ref: Ref } } | { kind: "SchemaNoTypeSpecified"; properties: { ref: Ref } } - | { kind: "SchemaInvalidType"; properties: { type: string; ref: Ref } } + | { kind: "SchemaInvalidType"; properties: { ref: Ref; type: string } } | { kind: "SchemaFalseNotSupported"; properties: { ref: Ref } } - | { kind: "SchemaInvalidJSONSchemaType"; properties: { type: string; ref: Ref } } + | { kind: "SchemaInvalidJSONSchemaType"; properties: { ref: Ref; type: string } } | { kind: "SchemaRequiredMustBeStringOrStringArray"; properties: { actual: any; ref: Ref } } | { kind: "SchemaRequiredElementMustBeString"; properties: { element: any; ref: Ref } } | { kind: "SchemaTypeMustBeStringOrStringArray"; properties: { actual: any } } @@ -37,7 +38,7 @@ export type ErrorProperties = | { kind: "SchemaWrongAccessorEntryArrayLength"; properties: { operation: string; ref: Ref } } | { kind: "SchemaSetOperationCasesIsNotArray"; - properties: { operation: string; cases: any; ref: Ref }; + properties: { cases: any; operation: string; ref: Ref }; } | { kind: "SchemaMoreThanOneUnionMemberName"; properties: { names: string[] } } | { kind: "SchemaCannotGetTypesFromBoolean"; properties: { ref: string } } @@ -74,7 +75,7 @@ export type ErrorProperties = | { kind: "IRNoEmptyUnions"; properties: {} } // Rendering - | { kind: "RendererUnknownOptionValue"; properties: { value: string; name: string } } + | { kind: "RendererUnknownOptionValue"; properties: { name: string; value: string } } // TypeScript input | { kind: "TypeScriptCompilerError"; properties: { message: string } }; @@ -164,16 +165,15 @@ const errorMessages: ErrorMessages = { TypeScriptCompilerError: "TypeScript error: ${message}" }; -export type ErrorPropertiesForName = Extract extends { properties: infer P } - ? P - : never; +export type ErrorPropertiesForName = + Extract extends { properties: infer P } ? P : never; export class QuickTypeError extends Error { - constructor( - readonly errorMessage: string, - readonly messageName: string, - userMessage: string, - readonly properties: StringMap + public constructor( + public readonly errorMessage: string, + public readonly messageName: string, + public userMessage: string, + public readonly properties: StringMap ) { super(userMessage); } @@ -193,6 +193,7 @@ export function messageError(kind: N, properties: ErrorPro } else if (typeof value !== "string") { value = JSON.stringify(value); } + userMessage = userMessage.replace("${" + name + "}", value); } diff --git a/packages/quicktype-core/src/Naming.ts b/packages/quicktype-core/src/Naming.ts index a8508ca51..6b2b2b825 100644 --- a/packages/quicktype-core/src/Naming.ts +++ b/packages/quicktype-core/src/Naming.ts @@ -1,27 +1,30 @@ import { - setUnion, - setUnionInto, - setMap, - setFilter, + iterableEvery, iterableFind, - iterableSome, + iterableFirst, iterableMinBy, - setGroupBy, + iterableSome, + mapMergeInto, + setFilter, setFilterMap, - iterableFirst, - iterableEvery, - mapMergeInto + setGroupBy, + setMap, + setUnion, + setUnionInto } from "collection-utils"; -import { defined, assert, panic } from "./support/Support"; +import { assert, defined, panic } from "./support/Support"; export class Namespace { - readonly forbiddenNamespaces: ReadonlySet; - readonly additionalForbidden: ReadonlySet; + public readonly forbiddenNamespaces: ReadonlySet; + + public readonly additionalForbidden: ReadonlySet; + private readonly _children = new Set(); + private readonly _members = new Set(); - constructor( + public constructor( _name: string, parent: Namespace | undefined, forbiddenNamespaces: Iterable, @@ -38,20 +41,20 @@ export class Namespace { this._children.add(child); } - get children(): ReadonlySet { + public get children(): ReadonlySet { return this._children; } - get members(): ReadonlySet { + public get members(): ReadonlySet { return this._members; } - get forbiddenNameds(): ReadonlySet { + public get forbiddenNameds(): ReadonlySet { // FIXME: cache return setUnion(this.additionalForbidden, ...Array.from(this.forbiddenNamespaces).map(ns => ns.members)); } - add(named: TName): TName { + public add(named: TName): TName { this._members.add(named); return named; } @@ -77,13 +80,17 @@ export type NameStyle = (rawName: string) => string; export class Namer { private readonly _prefixes: ReadonlySet; - constructor(readonly name: string, readonly nameStyle: NameStyle, prefixes: string[]) { + public constructor( + public readonly name: string, + public readonly nameStyle: NameStyle, + public prefixes: string[] + ) { this._prefixes = new Set(prefixes); } // The namesIterable comes directly out of the context and will // be modified if we assign - assignNames( + public assignNames( names: ReadonlyMap, forbiddenNamesIterable: Iterable, namesToAssignIterable: Iterable @@ -135,6 +142,7 @@ export class Namer { nameToTry = `${originalName}_${suffixNumber.toString()}`; suffixNumber++; } + const styledName = name.namingFunction.nameStyle(nameToTry); const assigned = name.nameAssignments(forbiddenNames, styledName); if (assigned === null) continue; @@ -177,30 +185,36 @@ export abstract class Name { private readonly _associates = new Set(); // If a Named is fixed, the namingFunction is undefined. - constructor(private readonly _namingFunction: Namer | undefined, readonly order: number) {} + public constructor( + private readonly _namingFunction: Namer | undefined, + public readonly order: number + ) {} - addAssociate(associate: AssociatedName): void { + public addAssociate(associate: AssociatedName): void { this._associates.add(associate); } - abstract get dependencies(): ReadonlyArray; + public abstract get dependencies(): readonly Name[]; - isFixed(): this is FixedName { + public isFixed(): this is FixedName { return this instanceof FixedName; } - get namingFunction(): Namer { + public get namingFunction(): Namer { return defined(this._namingFunction); } // Must return at least one proposal. The proposals are considered in order. - abstract proposeUnstyledNames(names: ReadonlyMap): ReadonlySet; + public abstract proposeUnstyledNames(names: ReadonlyMap): ReadonlySet; - firstProposedName(names: ReadonlyMap): string { + public firstProposedName(names: ReadonlyMap): string { return defined(iterableFirst(this.proposeUnstyledNames(names))); } - nameAssignments(forbiddenNames: ReadonlySet, assignedName: string): ReadonlyMap | null { + public nameAssignments( + forbiddenNames: ReadonlySet, + assignedName: string + ): ReadonlyMap | null { if (forbiddenNames.has(assignedName)) return null; const assignments = new Map([[this, assignedName]]); for (const an of this._associates) { @@ -208,31 +222,33 @@ export abstract class Name { if (forbiddenNames.has(associatedAssignedName)) { return null; } + assignments.set(an, associatedAssignedName); } + return assignments; } } // FIXME: FixedNameds should optionally be user-configurable export class FixedName extends Name { - constructor(private readonly _fixedName: string) { + public constructor(private readonly _fixedName: string) { super(undefined, 0); } - get dependencies(): ReadonlyArray { + public get dependencies(): readonly Name[] { return []; } - addAssociate(_: AssociatedName): never { + public addAssociate(_: AssociatedName): never { return panic("Cannot add associates to fixed names"); } - get fixedName(): string { + public get fixedName(): string { return this._fixedName; } - proposeUnstyledNames(_?: ReadonlyMap): ReadonlySet { + public proposeUnstyledNames(_?: ReadonlyMap): ReadonlySet { return panic("Only fixedName should be called on FixedName."); } } @@ -240,30 +256,34 @@ export class FixedName extends Name { export class SimpleName extends Name { private readonly _unstyledNames: ReadonlySet; - constructor(unstyledNames: Iterable, namingFunction: Namer, order: number) { + public constructor(unstyledNames: Iterable, namingFunction: Namer, order: number) { super(namingFunction, order); this._unstyledNames = new Set(unstyledNames); } - get dependencies(): ReadonlyArray { + public get dependencies(): readonly Name[] { return []; } - proposeUnstyledNames(_?: ReadonlyMap): ReadonlySet { + public proposeUnstyledNames(_?: ReadonlyMap): ReadonlySet { return this._unstyledNames; } } export class AssociatedName extends Name { - constructor(private readonly _sponsor: Name, order: number, readonly getName: (sponsorName: string) => string) { + public constructor( + private readonly _sponsor: Name, + order: number, + public readonly getName: (sponsorName: string) => string + ) { super(undefined, order); } - get dependencies(): ReadonlyArray { + public get dependencies(): readonly Name[] { return [this._sponsor]; } - proposeUnstyledNames(_?: ReadonlyMap): never { + public proposeUnstyledNames(_?: ReadonlyMap): never { return panic("AssociatedName must be assigned via its sponsor"); } } @@ -271,7 +291,7 @@ export class AssociatedName extends Name { export class DependencyName extends Name { private readonly _dependencies: ReadonlySet; - constructor( + public constructor( namingFunction: Namer | undefined, order: number, private readonly _proposeUnstyledName: (lookup: (n: Name) => string) => string @@ -285,11 +305,11 @@ export class DependencyName extends Name { this._dependencies = new Set(dependencies); } - get dependencies(): ReadonlyArray { + public get dependencies(): readonly Name[] { return Array.from(this._dependencies); } - proposeUnstyledNames(names: ReadonlyMap): ReadonlySet { + public proposeUnstyledNames(names: ReadonlyMap): ReadonlySet { return new Set([ this._proposeUnstyledName(n => { assert(this._dependencies.has(n), "DependencyName proposer is not pure"); @@ -299,11 +319,12 @@ export class DependencyName extends Name { } } -export function keywordNamespace(name: string, keywords: string[]) { +export function keywordNamespace(name: string, keywords: string[]): Namespace { const ns = new Namespace(name, undefined, [], []); for (const kw of keywords) { ns.add(new FixedName(kw)); } + return ns; } @@ -313,27 +334,29 @@ function allNamespacesRecursively(namespaces: Iterable): ReadonlySet< class NamingContext { private readonly _names: Map = new Map(); + private readonly _namedsForName: Map> = new Map(); - readonly namespaces: ReadonlySet; - constructor(rootNamespaces: Iterable) { + public readonly namespaces: ReadonlySet; + + public constructor(rootNamespaces: Iterable) { this.namespaces = allNamespacesRecursively(rootNamespaces); } - get names(): ReadonlyMap { + public get names(): ReadonlyMap { return this._names; } - isReadyToBeNamed = (named: Name): boolean => { + public isReadyToBeNamed(named: Name): boolean { if (this._names.has(named)) return false; return named.dependencies.every((n: Name) => this._names.has(n)); - }; + } - areForbiddensFullyNamed(namespace: Namespace): boolean { + public areForbiddensFullyNamed(namespace: Namespace): boolean { return iterableEvery(namespace.forbiddenNameds, n => this._names.has(n)); } - isConflicting = (namedNamespace: Namespace, proposed: string): boolean => { + public isConflicting(namedNamespace: Namespace, proposed: string): boolean { const namedsForProposed = this._namedsForName.get(proposed); // If the name is not assigned at all, there is no conflict. if (namedsForProposed === undefined) return false; @@ -343,10 +366,11 @@ class NamingContext { return true; } } + return false; - }; + } - assign = (named: Name, namedNamespace: Namespace, name: string): void => { + public assign(named: Name, namedNamespace: Namespace, name: string): void { assert(!this.names.has(named), `Name "${name}" assigned twice`); assert(!this.isConflicting(namedNamespace, name), `Assigned name "${name}" conflicts`); this._names.set(named, name); @@ -355,8 +379,9 @@ class NamingContext { namedsForName = new Set(); this._namedsForName.set(name, namedsForName); } + namedsForName.add(named); - }; + } } // Naming algorithm @@ -378,7 +403,9 @@ export function assignNames(rootNamespaces: Iterable): ReadonlyMap ctx.areForbiddensFullyNamed(ns)); - const readyNamespace = iterableFind(unfinishedNamespaces, ns => iterableSome(ns.members, ctx.isReadyToBeNamed)); + const readyNamespace = iterableFind(unfinishedNamespaces, ns => + iterableSome(ns.members, member => ctx.isReadyToBeNamed(member)) + ); if (readyNamespace === undefined) { // FIXME: Check for cycles? @@ -393,7 +420,7 @@ export function assignNames(rootNamespaces: Iterable): ReadonlyMap ctx.isReadyToBeNamed(member)); const minOrderName = iterableMinBy(allReadyNames, n => n.order); if (minOrderName === undefined) break; const minOrder = minOrderName.order; @@ -413,6 +440,7 @@ export function assignNames(rootNamespaces: Iterable): ReadonlyMap; +export interface RenderResult { names: ReadonlyMap; -}; + sources: ReadonlyMap; +} export type BlankLinePosition = "none" | "interposing" | "leading" | "leading-and-interposing"; export type BlankLineConfig = BlankLinePosition | [BlankLinePosition, number]; -function getBlankLineConfig(cfg: BlankLineConfig): { position: BlankLinePosition; count: number } { +function getBlankLineConfig(cfg: BlankLineConfig): { count: number; position: BlankLinePosition } { if (Array.isArray(cfg)) { return { position: cfg[0], count: cfg[1] }; } + return { position: cfg, count: 1 }; } @@ -36,100 +37,106 @@ function lineIndentation(line: string): { indent: number; text: string | null } return { indent, text: line.substring(i) }; } } + return { indent: 0, text: null }; } -export type RenderContext = { - typeGraph: TypeGraph; +export interface RenderContext { leadingComments?: Comment[]; -}; + typeGraph: TypeGraph; +} export type ForEachPosition = "first" | "last" | "middle" | "only"; class EmitContext { private _lastNewline?: NewlineSource; - // @ts-ignore: Initialized in startEmit, which is called from the constructor - private _emitted: Sourcelike[]; - // @ts-ignore: Initialized in startEmit, which is called from the constructor - private _currentEmitTarget: Sourcelike[]; - // @ts-ignore: Initialized in startEmit, which is called from the constructor + + private readonly _emitted: Sourcelike[]; + + private readonly _currentEmitTarget: Sourcelike[]; + private _numBlankLinesNeeded: number; - // @ts-ignore: Initialized in startEmit, which is called from the constructor + private _preventBlankLine: boolean; - constructor() { + public constructor() { this._currentEmitTarget = this._emitted = []; this._numBlankLinesNeeded = 0; this._preventBlankLine = true; // no blank lines at start of file } - get isEmpty(): boolean { + public get isEmpty(): boolean { return this._emitted.length === 0; } - get isNested(): boolean { + public get isNested(): boolean { return this._emitted !== this._currentEmitTarget; } - get source(): Sourcelike[] { + public get source(): Sourcelike[] { return this._emitted; } - private pushItem(item: Sourcelike): void { + public pushItem(item: Sourcelike): void { this._currentEmitTarget.push(item); this._preventBlankLine = false; } - emitNewline(): void { + public emitNewline(): void { const nl = newline(); this.pushItem(nl); this._lastNewline = nl; } - emitItem(item: Sourcelike): void { + public emitItem(item: Sourcelike): void { if (!this.isEmpty) { for (let i = 0; i < this._numBlankLinesNeeded; i++) { this.emitNewline(); } } + this._numBlankLinesNeeded = 0; this.pushItem(item); } - containsItem(item: Sourcelike): boolean { + public containsItem(item: Sourcelike): boolean { const existingItem = this._currentEmitTarget.find((value: Sourcelike) => item === value); return existingItem !== undefined; } - ensureBlankLine(numBlankLines: number): void { + public ensureBlankLine(numBlankLines: number): void { if (this._preventBlankLine) return; this._numBlankLinesNeeded = Math.max(this._numBlankLinesNeeded, numBlankLines); } - preventBlankLine(): void { + public preventBlankLine(): void { this._numBlankLinesNeeded = 0; this._preventBlankLine = true; } - changeIndent(offset: number): void { + public changeIndent(offset: number): void { if (this._lastNewline === undefined) { return panic("Cannot change indent for the first line"); } + this._lastNewline.indentationChange += offset; } } export abstract class Renderer { protected readonly typeGraph: TypeGraph; + protected readonly leadingComments: Comment[] | undefined; private _names: ReadonlyMap | undefined; - private _finishedFiles: Map; - private _finishedEmitContexts: Map; + + private readonly _finishedFiles: Map; + + private readonly _finishedEmitContexts: Map; private _emitContext: EmitContext; - constructor( + public constructor( protected readonly targetLanguage: TargetLanguage, renderContext: RenderContext ) { @@ -141,19 +148,20 @@ export abstract class Renderer { this._emitContext = new EmitContext(); } - ensureBlankLine(numBlankLines = 1): void { + // FIXME: make protected once JavaDateTimeRenderer is refactored + public ensureBlankLine(numBlankLines = 1): void { this._emitContext.ensureBlankLine(numBlankLines); } - preventBlankLine(): void { + protected preventBlankLine(): void { this._emitContext.preventBlankLine(); } - emitItem(item: Sourcelike): void { + protected emitItem(item: Sourcelike): void { this._emitContext.emitItem(item); } - emitItemOnce(item: Sourcelike): boolean { + protected emitItemOnce(item: Sourcelike): boolean { if (this._emitContext.containsItem(item)) { return false; } @@ -162,7 +170,7 @@ export abstract class Renderer { return true; } - emitLineOnce(...lineParts: Sourcelike[]): void { + protected emitLineOnce(...lineParts: Sourcelike[]): void { let lineEmitted = true; if (lineParts.length === 1) { lineEmitted = this.emitItemOnce(lineParts[0]); @@ -175,16 +183,18 @@ export abstract class Renderer { } } - emitLine(...lineParts: Sourcelike[]): void { + // FIXME: make protected once JavaDateTimeRenderer is refactored + public emitLine(...lineParts: Sourcelike[]): void { if (lineParts.length === 1) { this._emitContext.emitItem(lineParts[0]); } else if (lineParts.length > 1) { this._emitContext.emitItem(lineParts); } + this._emitContext.emitNewline(); } - emitMultiline(linesString: string): void { + protected emitMultiline(linesString: string): void { const lines = linesString.split("\n"); const numLines = lines.length; if (numLines === 0) return; @@ -203,12 +213,13 @@ export abstract class Renderer { this._emitContext.emitNewline(); } } + if (currentIndent !== 0) { this.changeIndent(-currentIndent); } } - gatherSource(emitter: () => void): Sourcelike[] { + protected gatherSource(emitter: () => void): Sourcelike[] { const oldEmitContext = this._emitContext; this._emitContext = new EmitContext(); emitter(); @@ -218,19 +229,19 @@ export abstract class Renderer { return source; } - emitGatheredSource(items: Sourcelike[]): void { + protected emitGatheredSource(items: Sourcelike[]): void { for (const item of items) { this._emitContext.emitItem(item); } } - emitAnnotated(annotation: AnnotationData, emitter: () => void): void { + protected emitAnnotated(annotation: AnnotationData, emitter: () => void): void { const lines = this.gatherSource(emitter); const source = sourcelikeToSource(lines); this._emitContext.emitItem(annotated(annotation, source)); } - emitIssue(message: string, emitter: () => void): void { + protected emitIssue(message: string, emitter: () => void): void { this.emitAnnotated(new IssueAnnotationData(message), emitter); } @@ -241,11 +252,11 @@ export abstract class Renderer { this._emitContext.emitNewline(); }; - changeIndent(offset: number): void { + protected changeIndent(offset: number): void { this._emitContext.changeIndent(offset); } - iterableForEach(iterable: Iterable, emitter: (v: T, position: ForEachPosition) => void): void { + protected iterableForEach(iterable: Iterable, emitter: (v: T, position: ForEachPosition) => void): void { const items = Array.from(iterable); let onFirst = true; for (const [i, v] of iterableEnumerate(items)) { @@ -256,7 +267,7 @@ export abstract class Renderer { } } - forEach( + protected forEach( iterable: Iterable<[K, V]>, interposedBlankLines: number, leadingBlankLines: number, @@ -269,24 +280,26 @@ export abstract class Renderer { } else { this.ensureBlankLine(interposedBlankLines); } + emitter(v, k, position); didEmit = true; }); return didEmit; } - forEachWithBlankLines( + protected forEachWithBlankLines( iterable: Iterable<[K, V]>, blankLineConfig: BlankLineConfig, emitter: (v: V, k: K, position: ForEachPosition) => void ): boolean { const { position, count } = getBlankLineConfig(blankLineConfig); - const interposing = ["interposing", "leading-and-interposing"].indexOf(position) >= 0; - const leading = ["leading", "leading-and-interposing"].indexOf(position) >= 0; + const interposing = ["interposing", "leading-and-interposing"].includes(position); + const leading = ["leading", "leading-and-interposing"].includes(position); return this.forEach(iterable, interposing ? count : 0, leading ? count : 0, emitter); } - indent(fn: () => void): void { + // FIXME: make protected once JavaDateTimeRenderer is refactored + public indent(fn: () => void): void { this.changeIndent(1); fn(); this.changeIndent(-1); @@ -295,7 +308,7 @@ export abstract class Renderer { protected abstract setUpNaming(): Iterable; protected abstract emitSource(givenOutputFilename: string): void; - private assignNames(): ReadonlyMap { + protected assignNames(): ReadonlyMap { return assignNames(this.setUpNaming()); } @@ -323,19 +336,21 @@ export abstract class Renderer { this._emitContext = new EmitContext(); } - render(givenOutputFilename: string): RenderResult { + public render(givenOutputFilename: string): RenderResult { this._names = this.assignNames(); this.emitSource(givenOutputFilename); if (!this._emitContext.isEmpty) { this.finishFile(givenOutputFilename); } + return { sources: this._finishedFiles, names: this._names }; } - get names(): ReadonlyMap { + public get names(): ReadonlyMap { if (this._names === undefined) { return panic("Names accessed before they were assigned"); } + return this._names; } } diff --git a/packages/quicktype-core/src/RendererOptions.ts b/packages/quicktype-core/src/RendererOptions.ts index 9ef964b42..77f95c228 100644 --- a/packages/quicktype-core/src/RendererOptions.ts +++ b/packages/quicktype-core/src/RendererOptions.ts @@ -1,7 +1,10 @@ -import { assert } from "./support/Support"; -import { messageError } from "./Messages"; +// eslint-disable-next-line @typescript-eslint/no-redeclare import { hasOwnProperty } from "collection-utils"; +import { messageError } from "./Messages"; +import { assert } from "./support/Support"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "./types"; + /** * Primary options show up in the web UI in the "Language" settings tab, * secondary options in "Other". @@ -9,17 +12,17 @@ import { hasOwnProperty } from "collection-utils"; export type OptionKind = "primary" | "secondary"; export interface OptionDefinition { - name: string; - type: StringConstructor | BooleanConstructor; - kind?: OptionKind; - renderer?: boolean; alias?: string; - multiple?: boolean; defaultOption?: boolean; - defaultValue?: any; - typeLabel?: string; + defaultValue?: FixMeOptionsAnyType; description: string; + kind?: OptionKind; legalValues?: string[]; + multiple?: boolean; + name: string; + renderer?: boolean; + type: StringConstructor | BooleanConstructor; + typeLabel?: string; } /** @@ -27,23 +30,24 @@ export interface OptionDefinition { * subclasses, `BooleanOption`, `EnumOption`, or `StringOption`. */ export abstract class Option { - readonly definition: OptionDefinition; + public readonly definition: OptionDefinition; - constructor(definition: OptionDefinition) { + public constructor(definition: OptionDefinition) { definition.renderer = true; this.definition = definition; assert(definition.kind !== undefined, "Renderer option kind must be defined"); } - getValue(values: { [name: string]: any }): T { + public getValue(values: FixMeOptionsType): T { const value = values[this.definition.name]; if (value === undefined) { return this.definition.defaultValue; } + return value; } - get cliDefinitions(): { display: OptionDefinition[]; actual: OptionDefinition[] } { + public get cliDefinitions(): { actual: OptionDefinition[]; display: OptionDefinition[] } { return { actual: [this.definition], display: [this.definition] }; } } @@ -51,14 +55,15 @@ export abstract class Option { export type OptionValueType = O extends Option ? T : never; export type OptionValues = { [P in keyof T]: OptionValueType }; -export function getOptionValues }>( +export function getOptionValues }>( options: T, - untypedOptionValues: { [name: string]: any } + untypedOptionValues: FixMeOptionsType ): OptionValues { - const optionValues: { [name: string]: any } = {}; + const optionValues: FixMeOptionsType = {}; for (const name of Object.getOwnPropertyNames(options)) { optionValues[name] = options[name].getValue(untypedOptionValues); } + return optionValues as OptionValues; } @@ -72,7 +77,7 @@ export class BooleanOption extends Option { * @param defaultValue The default value. * @param kind Whether it's a primary or secondary option. */ - constructor(name: string, description: string, defaultValue: boolean, kind: OptionKind = "primary") { + public constructor(name: string, description: string, defaultValue: boolean, kind: OptionKind = "primary") { super({ name, kind, @@ -82,7 +87,7 @@ export class BooleanOption extends Option { }); } - get cliDefinitions(): { display: OptionDefinition[]; actual: OptionDefinition[] } { + public get cliDefinitions(): { actual: OptionDefinition[]; display: OptionDefinition[] } { const negated = Object.assign({}, this.definition, { name: `no-${this.definition.name}`, defaultValue: !this.definition.defaultValue @@ -97,7 +102,7 @@ export class BooleanOption extends Option { }; } - getValue(values: { [name: string]: any }): boolean { + public getValue(values: FixMeOptionsType): boolean { let value = values[this.definition.name]; if (value === undefined) { value = this.definition.defaultValue; @@ -123,7 +128,7 @@ export class BooleanOption extends Option { } export class StringOption extends Option { - constructor( + public constructor( name: string, description: string, typeLabel: string, @@ -145,16 +150,17 @@ export class StringOption extends Option { export class EnumOption extends Option { private readonly _values: { [name: string]: T }; - constructor( + public constructor( name: string, description: string, - values: [string, T][], + values: Array<[string, T]>, defaultValue: string | undefined = undefined, kind: OptionKind = "primary" ) { if (defaultValue === undefined) { defaultValue = values[0][0]; } + const definition = { name, kind, @@ -172,14 +178,16 @@ export class EnumOption extends Option { } } - getValue(values: { [name: string]: any }): T { + public getValue(values: FixMeOptionsType): T { let name: string = values[this.definition.name]; if (name === undefined) { name = this.definition.defaultValue; } + if (!hasOwnProperty(this._values, name)) { return messageError("RendererUnknownOptionValue", { value: name, name: this.definition.name }); } + return this._values[name]; } } diff --git a/packages/quicktype-core/src/Run.ts b/packages/quicktype-core/src/Run.ts index 195417cb9..dac66c17e 100644 --- a/packages/quicktype-core/src/Run.ts +++ b/packages/quicktype-core/src/Run.ts @@ -1,43 +1,48 @@ import { mapFirst } from "collection-utils"; -import * as targetLanguages from "./language/All"; -import { TargetLanguage, MultiFileRenderResult } from "./TargetLanguage"; -import { SerializedRenderResult, Annotation, Location, Span } from "./Source"; -import { assert } from "./support/Support"; -import { combineClasses } from "./rewrites/CombineClasses"; -import { inferMaps } from "./rewrites/InferMaps"; -import { TypeBuilder, StringTypeMapping } from "./TypeBuilder"; -import { TypeGraph, noneToAny, optionalToNullable, removeIndirectionIntersections } from "./TypeGraph"; import { initTypeNames } from "./attributes/TypeNames"; import { gatherNames } from "./GatherNames"; +import { InputData } from "./input/Inputs"; +import * as targetLanguages from "./language/All"; +import { makeTransformations } from "./MakeTransformations"; +import { messageError } from "./Messages"; +import { combineClasses } from "./rewrites/CombineClasses"; import { expandStrings } from "./rewrites/ExpandStrings"; +import { flattenStrings } from "./rewrites/FlattenStrings"; import { flattenUnions } from "./rewrites/FlattenUnions"; -import { resolveIntersections } from "./rewrites/ResolveIntersections"; +import { inferMaps } from "./rewrites/InferMaps"; import { replaceObjectType } from "./rewrites/ReplaceObjectType"; -import { messageError } from "./Messages"; -import { InputData } from "./input/Inputs"; -import { flattenStrings } from "./rewrites/FlattenStrings"; -import { makeTransformations } from "./MakeTransformations"; -import { TransformedStringTypeKind } from "./Type"; +import { resolveIntersections } from "./rewrites/ResolveIntersections"; +import { type Annotation, type Location, type SerializedRenderResult, type Span } from "./Source"; import { type Comment } from "./support/Comments"; +import { assert } from "./support/Support"; +import { type MultiFileRenderResult, type TargetLanguage } from "./TargetLanguage"; +import { type TransformedStringTypeKind } from "./Type"; +import { type StringTypeMapping, TypeBuilder } from "./TypeBuilder"; +import { type TypeGraph, noneToAny, optionalToNullable, removeIndirectionIntersections } from "./TypeGraph"; +import { type FixMeOptionsType } from "./types"; export function getTargetLanguage(nameOrInstance: string | TargetLanguage): TargetLanguage { if (typeof nameOrInstance === "object") { return nameOrInstance; } + const language = targetLanguages.languageNamed(nameOrInstance); if (language !== undefined) { return language; } + return messageError("DriverUnknownOutputLanguage", { lang: nameOrInstance }); } -export type RendererOptions = { [name: string]: string | boolean }; +export interface RendererOptions { + [name: string]: string | boolean; +} export interface InferenceFlag { description: string; - negationDescription: string; explanation: string; + negationDescription: string; order: number; stringType?: TransformedStringTypeKind; } @@ -117,57 +122,57 @@ export type InferenceFlags = { [F in InferenceFlagName]: boolean }; * The options type for the main quicktype entry points, * `quicktypeMultiFile` and `quicktype`. */ -export type NonInferenceOptions = { - /** - * The target language for which to produce code. This can be either an instance of `TargetLanguage`, - * or a string specifying one of the names for quicktype's built-in target languages. For example, - * both `cs` and `csharp` will generate C#. - */ - lang: string | TargetLanguage; - /** The input data from which to produce types */ - inputData: InputData; - /** Put class properties in alphabetical order, instead of in the order found in the JSON */ - alphabetizeProperties: boolean; +export interface NonInferenceOptions { /** Make all class property optional */ allPropertiesOptional: boolean; + /** Put class properties in alphabetical order, instead of in the order found in the JSON */ + alphabetizeProperties: boolean; + /** Check that we're propagating all type attributes (unless we actually can't) */ + checkProvenance: boolean; /** - * Make top-levels classes from JSON fixed. That means even if two top-level classes are exactly - * the same, quicktype will still generate two separate types for them. - */ - fixedTopLevels: boolean; - /** Don't render output. This is mainly useful for benchmarking. */ - noRender: boolean; - /** If given, output these comments at the beginning of the main output file */ - leadingComments?: Comment[]; - /** Options for the target language's renderer */ - rendererOptions: RendererOptions; - /** String to use for one indentation level. If not given, use the target language's default. */ - indentation: string | undefined; - /** Name of the output file. Note that quicktype will not write that file, but you'll get its name - * back as a key in the resulting `Map`. + * Print name gathering debug information to the console. This might help to figure out why + * your types get weird names, but the output is quite arcane. */ - outputFilename: string; + debugPrintGatherNames: boolean; /** Print the type graph to the console at every processing step */ debugPrintGraph: boolean; - /** Check that we're propagating all type attributes (unless we actually can't) */ - checkProvenance: boolean; /** * Print type reconstitution debug information to the console. You'll only ever need this if * you're working deep inside quicktype-core. */ debugPrintReconstitution: boolean; - /** - * Print name gathering debug information to the console. This might help to figure out why - * your types get weird names, but the output is quite arcane. - */ - debugPrintGatherNames: boolean; - /** Print all transformations to the console prior to generating code */ - debugPrintTransformations: boolean; - /** Print the time it took for each pass to run */ - debugPrintTimes: boolean; /** Print schema resolving steps */ debugPrintSchemaResolving: boolean; -}; + /** Print the time it took for each pass to run */ + debugPrintTimes: boolean; + /** Print all transformations to the console prior to generating code */ + debugPrintTransformations: boolean; + /** + * Make top-levels classes from JSON fixed. That means even if two top-level classes are exactly + * the same, quicktype will still generate two separate types for them. + */ + fixedTopLevels: boolean; + /** String to use for one indentation level. If not given, use the target language's default. */ + indentation: string | undefined; + /** The input data from which to produce types */ + inputData: InputData; + /** + * The target language for which to produce code. This can be either an instance of `TargetLanguage`, + * or a string specifying one of the names for quicktype's built-in target languages. For example, + * both `cs` and `csharp` will generate C#. + */ + lang: string | TargetLanguage; + /** If given, output these comments at the beginning of the main output file */ + leadingComments?: Comment[]; + /** Don't render output. This is mainly useful for benchmarking. */ + noRender: boolean; + /** Name of the output file. Note that quicktype will not write that file, but you'll get its name + * back as a key in the resulting `Map`. + */ + outputFilename: string; + /** Options for the target language's renderer */ + rendererOptions: RendererOptions; +} export type Options = NonInferenceOptions & InferenceFlags; @@ -192,19 +197,19 @@ const defaultOptions: NonInferenceOptions = { }; export interface RunContext { - stringTypeMapping: StringTypeMapping; debugPrintReconstitution: boolean; - debugPrintTransformations: boolean; debugPrintSchemaResolving: boolean; + debugPrintTransformations: boolean; + stringTypeMapping: StringTypeMapping; - timeSync(name: string, f: () => Promise): Promise; - time(name: string, f: () => T): T; + time: (name: string, f: () => T) => T; + timeSync: (name: string, f: () => Promise) => Promise; } interface GraphInputs { - targetLanguage: TargetLanguage; - stringTypeMapping: StringTypeMapping; conflateNumbers: boolean; + stringTypeMapping: StringTypeMapping; + targetLanguage: TargetLanguage; typeBuilder: TypeBuilder; } @@ -213,6 +218,7 @@ function makeDefaultInferenceFlags(): InferenceFlags { for (const flag of inferenceFlagNames) { flags[flag] = true; } + return flags; } @@ -221,19 +227,19 @@ export const defaultInferenceFlags = makeDefaultInferenceFlags(); class Run implements RunContext { private readonly _options: Options; - constructor(options: Partial) { + public constructor(options: Partial) { // We must not overwrite defaults with undefined values, which // we sometimes get. this._options = Object.assign({}, defaultOptions, defaultInferenceFlags); for (const k of Object.getOwnPropertyNames(options)) { - const v = (options as any)[k]; + const v = (options as FixMeOptionsType)[k]; if (v !== undefined) { - (this._options as any)[k] = v; + (this._options as FixMeOptionsType)[k] = v; } } } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const targetLanguage = getTargetLanguage(this._options.lang); const mapping = new Map(targetLanguage.stringTypeMapping); for (const flag of inferenceFlagNames) { @@ -242,38 +248,41 @@ class Run implements RunContext { mapping.set(stringType, "string"); } } + return mapping; } - get debugPrintReconstitution(): boolean { + public get debugPrintReconstitution(): boolean { return this._options.debugPrintReconstitution === true; } - get debugPrintTransformations(): boolean { + public get debugPrintTransformations(): boolean { return this._options.debugPrintTransformations; } - get debugPrintSchemaResolving(): boolean { + public get debugPrintSchemaResolving(): boolean { return this._options.debugPrintSchemaResolving; } - async timeSync(name: string, f: () => Promise): Promise { + public async timeSync(name: string, f: () => Promise): Promise { const start = Date.now(); const result = await f(); const end = Date.now(); if (this._options.debugPrintTimes) { console.log(`${name} took ${end - start}ms`); } + return result; } - time(name: string, f: () => T): T { + public time(name: string, f: () => T): T { const start = Date.now(); const result = f(); const end = Date.now(); if (this._options.debugPrintTimes) { console.log(`${name} took ${end - start}ms`); } + return result; } @@ -361,6 +370,7 @@ class Run implements RunContext { )) ); } + if (!unionsDone) { this.time( "flatten unions", @@ -436,6 +446,7 @@ class Run implements RunContext { if (newGraph === graph) { break; } + graph = newGraph; } } @@ -502,6 +513,7 @@ class Run implements RunContext { if (this._options.debugPrintGraph) { console.log("\n# gather names"); } + this.time("gather names", () => gatherNames(graph, !allInputs.needSchemaProcessing, this._options.debugPrintGatherNames) ); @@ -513,10 +525,9 @@ class Run implements RunContext { } private makeSimpleTextResult(lines: string[]): MultiFileRenderResult { - return new Map([[this._options.outputFilename, { lines, annotations: [] }]] as [ - string, - SerializedRenderResult - ][]); + return new Map([[this._options.outputFilename, { lines, annotations: [] }]] as Array< + [string, SerializedRenderResult] + >); } private preRun(): MultiFileRenderResult | [InputData, TargetLanguage] { @@ -525,7 +536,7 @@ class Run implements RunContext { const targetLanguage = getTargetLanguage(this._options.lang); const inputData = this._options.inputData; - const needIR = inputData.needIR || targetLanguage.names.indexOf("schema") < 0; + const needIR = inputData.needIR || !targetLanguage.names.includes("schema"); const schemaString = needIR ? undefined : inputData.singleStringSchemaSource(); if (schemaString !== undefined) { @@ -538,7 +549,7 @@ class Run implements RunContext { return [inputData, targetLanguage]; } - async run(): Promise { + public async run(): Promise { const preRunResult = this.preRun(); if (!Array.isArray(preRunResult)) { return preRunResult; @@ -551,7 +562,7 @@ class Run implements RunContext { return this.renderGraph(targetLanguage, graph); } - runSync(): MultiFileRenderResult { + public runSync(): MultiFileRenderResult { const preRunResult = this.preRun(); if (!Array.isArray(preRunResult)) { return preRunResult; @@ -613,8 +624,10 @@ export function combineRenderResults(result: MultiFileRenderResult): SerializedR if (first === undefined) { return { lines: [], annotations: [] }; } + return first; } + let lines: string[] = []; let annotations: Annotation[] = []; for (const [filename, srr] of result) { @@ -624,6 +637,7 @@ export function combineRenderResults(result: MultiFileRenderResult): SerializedR srr.annotations.map(ann => ({ annotation: ann.annotation, span: offsetSpan(ann.span, offset) })) ); } + return { lines, annotations }; } diff --git a/packages/quicktype-core/src/Source.ts b/packages/quicktype-core/src/Source.ts index 6898480af..fcf004546 100644 --- a/packages/quicktype-core/src/Source.ts +++ b/packages/quicktype-core/src/Source.ts @@ -1,9 +1,9 @@ import { arrayIntercalate, iterableMax, withDefault } from "collection-utils"; -import { AnnotationData } from "./Annotation"; +import { type AnnotationData } from "./Annotation"; import { Name } from "./Naming"; -import { defined, assertNever, panic, assert } from "./support/Support"; import { repeatString } from "./support/Strings"; +import { assert, assertNever, defined, panic } from "./support/Support"; export type Source = | TextSource @@ -20,28 +20,28 @@ export interface TextSource { } export interface NewlineSource { - kind: "newline"; // Number of indentation levels (not spaces!) to change // the rest of the source by. Positive numbers mean // indent more, negative mean indent less. The most // common value will be zero, for no change in // indentation. indentationChange: number; + kind: "newline"; } export interface SequenceSource { kind: "sequence"; - sequence: ReadonlyArray; + sequence: readonly Source[]; } export interface TableSource { kind: "table"; - table: ReadonlyArray>; + table: ReadonlyArray; } export interface AnnotatedSource { - kind: "annotated"; annotation: AnnotationData; + kind: "annotated"; source: Source; } @@ -63,7 +63,7 @@ export function newline(): NewlineSource { } export type Sourcelike = Source | string | Name | SourcelikeArray; -export interface SourcelikeArray extends Array {} +export type SourcelikeArray = Sourcelike[]; export function sourcelikeToSource(sl: Sourcelike): Source { if (sl instanceof Array) { @@ -72,22 +72,26 @@ export function sourcelikeToSource(sl: Sourcelike): Source { sequence: sl.map(sourcelikeToSource) }; } + if (typeof sl === "string") { const lines = sl.split("\n"); if (lines.length === 1) { return { kind: "text", text: sl }; } + return { kind: "sequence", sequence: arrayIntercalate( newline(), - lines.map((l: string) => ({ kind: "text", text: l } as Source)) + lines.map((l: string) => ({ kind: "text", text: l }) as Source) ) }; } + if (sl instanceof Name) { return { kind: "name", named: sl }; } + return sl; } @@ -103,6 +107,7 @@ export function maybeAnnotated(doAnnotate: boolean, annotation: AnnotationData, if (!doAnnotate) { return sl; } + return annotated(annotation, sl); } @@ -115,14 +120,14 @@ export function modifySource(modifier: (serialized: string) => string, sl: Sourc } export interface Location { + column: number; // Both of these are zero-based. line: number; - column: number; } export interface Span { - start: Location; end: Location; + start: Location; } export interface Annotation { @@ -131,8 +136,8 @@ export interface Annotation { } export interface SerializedRenderResult { + annotations: readonly Annotation[]; lines: string[]; - annotations: ReadonlyArray; } function sourceLineLength(source: Source, names: ReadonlyMap): number { @@ -206,6 +211,7 @@ export function serializeRenderResult( for (const s of source.sequence) { serializeToStringArray(s); } + break; case "table": const t = source.table; @@ -218,6 +224,7 @@ export function serializeRenderResult( for (let i = 0; i < numColumns; i++) { columnWidths.push(defined(iterableMax(widths.map(l => withDefault(l[i], 0))))); } + for (let y = 0; y < numRows; y++) { indentIfNeeded(); const row = defined(t[y]); @@ -231,11 +238,13 @@ export function serializeRenderResult( currentLine.push(repeatString(" ", colWidth - srcWidth)); } } + if (y < numRows - 1) { finishLine(); indentNeeded = indent; } } + break; case "annotated": const start = currentLocation(); @@ -264,10 +273,10 @@ export function serializeRenderResult( return { lines, annotations: annotations }; } -export type MultiWord = { - source: Sourcelike; +export interface MultiWord { needsParens: boolean; -}; + source: Sourcelike; +} export function singleWord(...source: Sourcelike[]): MultiWord { return { source, needsParens: false }; @@ -278,11 +287,13 @@ export function multiWord(separator: Sourcelike, ...words: Sourcelike[]): MultiW if (words.length === 1) { return singleWord(words[0]); } + const items: Sourcelike[] = []; for (let i = 0; i < words.length; i++) { if (i > 0) items.push(separator); items.push(words[i]); } + return { source: items, needsParens: true }; } @@ -290,5 +301,6 @@ export function parenIfNeeded({ source, needsParens }: MultiWord): Sourcelike { if (needsParens) { return ["(", source, ")"]; } + return source; } diff --git a/packages/quicktype-core/src/TargetLanguage.ts b/packages/quicktype-core/src/TargetLanguage.ts index f1c3a90bf..19f6bfea7 100644 --- a/packages/quicktype-core/src/TargetLanguage.ts +++ b/packages/quicktype-core/src/TargetLanguage.ts @@ -1,63 +1,67 @@ import { mapMap } from "collection-utils"; -import { TypeGraph } from "./TypeGraph"; -import { Renderer, RenderContext } from "./Renderer"; -import { OptionDefinition, Option } from "./RendererOptions"; -import { serializeRenderResult, SerializedRenderResult } from "./Source"; -import { StringTypeMapping } from "./TypeBuilder"; -import { defined } from "./support/Support"; import { ConvenienceRenderer } from "./ConvenienceRenderer"; -import { Type } from "./Type"; -import { DateTimeRecognizer, DefaultDateTimeRecognizer } from "./DateTime"; +import { type DateTimeRecognizer, DefaultDateTimeRecognizer } from "./DateTime"; +import { type RenderContext, type Renderer } from "./Renderer"; +import { type Option, type OptionDefinition } from "./RendererOptions"; +import { type SerializedRenderResult, serializeRenderResult } from "./Source"; import { type Comment } from "./support/Comments"; +import { defined } from "./support/Support"; +import { type Type } from "./Type"; +import { type StringTypeMapping } from "./TypeBuilder"; +import { type TypeGraph } from "./TypeGraph"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "./types"; export type MultiFileRenderResult = ReadonlyMap; export abstract class TargetLanguage { - constructor( - readonly displayName: string, - readonly names: string[], - readonly extension: string + public constructor( + public readonly displayName: string, + public readonly names: string[], + public readonly extension: string ) {} - protected abstract getOptions(): Option[]; + protected abstract getOptions(): Array>; - get optionDefinitions(): OptionDefinition[] { + public get optionDefinitions(): OptionDefinition[] { return this.getOptions().map(o => o.definition); } - get cliOptionDefinitions(): { display: OptionDefinition[]; actual: OptionDefinition[] } { + public get cliOptionDefinitions(): { actual: OptionDefinition[]; display: OptionDefinition[] } { let actual: OptionDefinition[] = []; let display: OptionDefinition[] = []; for (const { cliDefinitions } of this.getOptions()) { actual = actual.concat(cliDefinitions.actual); display = display.concat(cliDefinitions.display); } + return { actual, display }; } - get name(): string { + public get name(): string { return defined(this.names[0]); } - protected abstract makeRenderer(renderContext: RenderContext, optionValues: { [name: string]: any }): Renderer; + protected abstract makeRenderer(renderContext: RenderContext, optionValues: FixMeOptionsType): Renderer; - renderGraphAndSerialize( + public renderGraphAndSerialize( typeGraph: TypeGraph, givenOutputFilename: string, alphabetizeProperties: boolean, leadingComments: Comment[] | undefined, - rendererOptions: { [name: string]: any }, + rendererOptions: FixMeOptionsType, indentation?: string ): MultiFileRenderResult { if (indentation === undefined) { indentation = this.defaultIndentation; } + const renderContext = { typeGraph, leadingComments }; const renderer = this.makeRenderer(renderContext, rendererOptions); - if ((renderer as any).setAlphabetizeProperties !== undefined) { - (renderer as ConvenienceRenderer).setAlphabetizeProperties(alphabetizeProperties); + if (renderer instanceof ConvenienceRenderer) { + renderer.setAlphabetizeProperties(alphabetizeProperties); } + const renderResult = renderer.render(givenOutputFilename); return mapMap(renderResult.sources, s => serializeRenderResult(s, renderResult.names, defined(indentation))); } @@ -66,27 +70,27 @@ export abstract class TargetLanguage { return " "; } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { return new Map(); } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return false; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return false; } - get supportsFullObjectType(): boolean { + public get supportsFullObjectType(): boolean { return false; } - needsTransformerForType(_t: Type): boolean { + public needsTransformerForType(_t: Type): boolean { return false; } - get dateTimeRecognizer(): DateTimeRecognizer { + public get dateTimeRecognizer(): DateTimeRecognizer { return new DefaultDateTimeRecognizer(); } } diff --git a/packages/quicktype-core/src/Transformers.ts b/packages/quicktype-core/src/Transformers.ts index e64752358..d6bbb49f7 100644 --- a/packages/quicktype-core/src/Transformers.ts +++ b/packages/quicktype-core/src/Transformers.ts @@ -1,25 +1,26 @@ import { - setUnionInto, + addHashCode, areEqual, - hashCodeOf, + arraySortByInto, definedMap, - addHashCode, definedMapWithDefault, - arraySortByInto, - hashString + hashCodeOf, + hashString, + setUnionInto } from "collection-utils"; -import { UnionType, Type, EnumType, PrimitiveType, TypeKind } from "./Type"; import { TypeAttributeKind } from "./attributes/TypeAttributes"; -import { panic, assert, indentationString } from "./support/Support"; -import { BaseGraphRewriteBuilder } from "./GraphRewriting"; -import { TypeRef, derefTypeRef, TypeGraph } from "./TypeGraph"; +import { type BaseGraphRewriteBuilder } from "./GraphRewriting"; +import { assert, indentationString, panic } from "./support/Support"; +import { EnumType, PrimitiveType, type Type, type TypeKind, UnionType } from "./Type"; +import { type TypeGraph, type TypeRef, derefTypeRef } from "./TypeGraph"; function debugStringForType(t: Type): string { const target = followTargetType(t); if (t === target) { return t.kind; } + return `${t.kind} (${target.kind})`; } @@ -28,33 +29,36 @@ function getNumberOfNodes(xfer: Transformer | undefined): number { } export abstract class Transformer { - constructor(readonly kind: string, protected readonly graph: TypeGraph, readonly sourceTypeRef: TypeRef) {} + public constructor( + public readonly kind: string, + protected readonly graph: TypeGraph, + public readonly sourceTypeRef: TypeRef + ) {} - get sourceType(): Type { + public get sourceType(): Type { return derefTypeRef(this.sourceTypeRef, this.graph); } /** This must return a newly constructed set. */ - getChildren(): Set { + public getChildren(): Set { return new Set([this.sourceType]); } - getNumberOfNodes(): number { + public getNumberOfNodes(): number { return 1; } - abstract get canFail(): boolean; + public abstract get canFail(): boolean; - abstract reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer; + public abstract reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer; - abstract reconstitute(builder: TBuilder): Transformer; + public abstract reconstitute(builder: TBuilder): Transformer; - equals(other: any): boolean { - if (!(other instanceof Transformer)) return false; + public equals(other: T): boolean { return this.sourceTypeRef === other.sourceTypeRef; } - hashCode(): number { + public hashCode(): number { return hashCodeOf(this.sourceTypeRef); } @@ -66,34 +70,39 @@ export abstract class Transformer { return; } - debugPrint(indent: number): void { + public debugPrint(indent: number): void { console.log(indentationString(indent) + this.debugDescription()); this.debugPrintContinuations(indent + 1); } } export abstract class ProducerTransformer extends Transformer { - constructor(kind: string, graph: TypeGraph, sourceTypeRef: TypeRef, readonly consumer: Transformer | undefined) { + public constructor( + kind: string, + graph: TypeGraph, + sourceTypeRef: TypeRef, + public readonly consumer: Transformer | undefined + ) { super(kind, graph, sourceTypeRef); } - getChildren(): Set { + public getChildren(): Set { const children = super.getChildren(); if (this.consumer === undefined) return children; return setUnionInto(children, this.consumer.getChildren()); } - getNumberOfNodes(): number { + public getNumberOfNodes(): number { return super.getNumberOfNodes() + getNumberOfNodes(this.consumer); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof ProducerTransformer)) return false; return areEqual(this.consumer, other.consumer); } - hashCode(): number { + public hashCode(): number { const h = super.hashCode(); return addHashCode(h, hashCodeOf(this.consumer)); } @@ -105,25 +114,30 @@ export abstract class ProducerTransformer extends Transformer { } export abstract class MatchTransformer extends Transformer { - constructor(kind: string, graph: TypeGraph, sourceTypeRef: TypeRef, readonly transformer: Transformer) { + public constructor( + kind: string, + graph: TypeGraph, + sourceTypeRef: TypeRef, + public readonly transformer: Transformer + ) { super(kind, graph, sourceTypeRef); } - getChildren(): Set { + public getChildren(): Set { return setUnionInto(super.getChildren(), this.transformer.getChildren()); } - getNumberOfNodes(): number { + public getNumberOfNodes(): number { return super.getNumberOfNodes() + this.transformer.getNumberOfNodes(); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof MatchTransformer)) return false; return this.transformer.equals(other.transformer); } - hashCode(): number { + public hashCode(): number { const h = super.hashCode(); return addHashCode(h, this.transformer.hashCode()); } @@ -134,15 +148,15 @@ export abstract class MatchTransformer extends Transformer { } export class DecodingTransformer extends ProducerTransformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined) { + public constructor(graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined) { super("decode", graph, sourceTypeRef, consumer); } - get canFail(): boolean { + public get canFail(): boolean { return false; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { if (continuationTransformer !== undefined) { return panic("Reversing a decoding transformer cannot have a continuation"); } @@ -157,7 +171,7 @@ export class DecodingTransformer extends ProducerTransformer { } } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new DecodingTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -165,30 +179,30 @@ export class DecodingTransformer extends ProducerTransformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; return other instanceof DecodingTransformer; } } export class EncodingTransformer extends Transformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef) { + public constructor(graph: TypeGraph, sourceTypeRef: TypeRef) { super("encode", graph, sourceTypeRef); } - get canFail(): boolean { + public get canFail(): boolean { return false; } - reverse(_targetTypeRef: TypeRef, _continuationTransformer: Transformer | undefined): Transformer { + public reverse(_targetTypeRef: TypeRef, _continuationTransformer: Transformer | undefined): Transformer { return panic("Can't reverse encoding transformer"); } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new EncodingTransformer(builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef)); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof EncodingTransformer)) return false; return true; @@ -196,35 +210,35 @@ export class EncodingTransformer extends Transformer { } export class ArrayDecodingTransformer extends ProducerTransformer { - constructor( + public constructor( graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined, private readonly _itemTargetTypeRef: TypeRef, - readonly itemTransformer: Transformer + public readonly itemTransformer: Transformer ) { super("decode-array", graph, sourceTypeRef, consumer); } - getChildren(): Set { + public getChildren(): Set { const children = super.getChildren(); children.add(this.itemTargetType); return setUnionInto(children, this.itemTransformer.getChildren()); } - getNumberOfNodes(): number { + public getNumberOfNodes(): number { return super.getNumberOfNodes() + this.itemTransformer.getNumberOfNodes(); } - get canFail(): boolean { + public get canFail(): boolean { return false; } - get itemTargetType(): Type { + public get itemTargetType(): Type { return derefTypeRef(this._itemTargetTypeRef, this.graph); } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { if (continuationTransformer !== undefined) { return panic("Reversing a decoding transformer cannot have a continuation"); } @@ -251,7 +265,7 @@ export class ArrayDecodingTransformer extends ProducerTransformer { } } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new ArrayDecodingTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -261,14 +275,14 @@ export class ArrayDecodingTransformer extends ProducerTransformer { ); } - hashCode(): number { + public hashCode(): number { let h = super.hashCode(); h = addHashCode(h, hashCodeOf(this._itemTargetTypeRef)); h = addHashCode(h, this.itemTransformer.hashCode()); return h; } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof ArrayDecodingTransformer)) return false; if (!areEqual(this._itemTargetTypeRef, other._itemTargetTypeRef)) return false; @@ -282,38 +296,38 @@ export class ArrayDecodingTransformer extends ProducerTransformer { } export class ArrayEncodingTransformer extends Transformer { - constructor( + public constructor( graph: TypeGraph, sourceTypeRef: TypeRef, private readonly _itemTargetTypeRef: TypeRef, - readonly itemTransformer: Transformer + public readonly itemTransformer: Transformer ) { super("encode-array", graph, sourceTypeRef); } - getChildren(): Set { + public getChildren(): Set { const children = super.getChildren(); children.add(this.itemTargetType); return setUnionInto(children, this.itemTransformer.getChildren()); } - getNumberOfNodes(): number { + public getNumberOfNodes(): number { return super.getNumberOfNodes() + this.itemTransformer.getNumberOfNodes(); } - get canFail(): boolean { + public get canFail(): boolean { return false; } - get itemTargetType(): Type { + public get itemTargetType(): Type { return derefTypeRef(this._itemTargetTypeRef, this.graph); } - reverse(_targetTypeRef: TypeRef, _continuationTransformer: Transformer | undefined): Transformer { + public reverse(_targetTypeRef: TypeRef, _continuationTransformer: Transformer | undefined): Transformer { return panic("Can't reverse array encoding transformer"); } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new ArrayEncodingTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -322,13 +336,13 @@ export class ArrayEncodingTransformer extends Transformer { ); } - hashCode(): number { + public hashCode(): number { let h = super.hashCode(); h = addHashCode(h, hashCodeOf(this._itemTargetTypeRef)); return addHashCode(h, this.itemTransformer.hashCode()); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof ArrayEncodingTransformer)) return false; if (!areEqual(this._itemTargetTypeRef, other._itemTargetTypeRef)) return false; @@ -342,32 +356,38 @@ export class ArrayEncodingTransformer extends Transformer { } export class ChoiceTransformer extends Transformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef, public readonly transformers: ReadonlyArray) { + public constructor( + graph: TypeGraph, + sourceTypeRef: TypeRef, + public readonly transformers: readonly Transformer[] + ) { super("choice", graph, sourceTypeRef); assert(transformers.length > 0, "Choice must have at least one transformer"); } - getChildren(): Set { + public getChildren(): Set { let children = super.getChildren(); for (const xfer of this.transformers) { setUnionInto(children, xfer.getChildren()); } + return children; } - getNumberOfNodes(): number { + public getNumberOfNodes(): number { let n = 0; for (const xfer of this.transformers) { n += xfer.getNumberOfNodes(); } + return super.getNumberOfNodes() + n; } - get canFail(): boolean { + public get canFail(): boolean { return this.transformers.some(xfer => xfer.canFail); } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { const transformers = this.transformers.map(xfer => xfer.reverse(targetTypeRef, continuationTransformer)); if (transformers.every(xfer => xfer instanceof UnionMemberMatchTransformer)) { const memberMatchers = transformers as UnionMemberMatchTransformer[]; @@ -382,10 +402,11 @@ export class ChoiceTransformer extends Transformer { ); } } + return new ChoiceTransformer(this.graph, targetTypeRef, transformers); } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new ChoiceTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -393,13 +414,13 @@ export class ChoiceTransformer extends Transformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof ChoiceTransformer)) return false; return areEqual(this.transformers, other.transformers); } - hashCode(): number { + public hashCode(): number { const h = super.hashCode(); return addHashCode(h, hashCodeOf(this.transformers)); } @@ -412,23 +433,23 @@ export class ChoiceTransformer extends Transformer { } export class DecodingChoiceTransformer extends Transformer { - constructor( + public constructor( graph: TypeGraph, sourceTypeRef: TypeRef, - readonly nullTransformer: Transformer | undefined, - readonly integerTransformer: Transformer | undefined, - readonly doubleTransformer: Transformer | undefined, - readonly boolTransformer: Transformer | undefined, - readonly stringTransformer: Transformer | undefined, - readonly arrayTransformer: Transformer | undefined, - readonly objectTransformer: Transformer | undefined + public readonly nullTransformer: Transformer | undefined, + public readonly integerTransformer: Transformer | undefined, + public readonly doubleTransformer: Transformer | undefined, + public readonly boolTransformer: Transformer | undefined, + public readonly stringTransformer: Transformer | undefined, + public readonly arrayTransformer: Transformer | undefined, + public readonly objectTransformer: Transformer | undefined ) { super("decoding-choice", graph, sourceTypeRef); } - get transformers(): ReadonlyArray { + public get transformers(): readonly Transformer[] { const transformers: Transformer[] = []; - function add(xfer: Transformer | undefined) { + function add(xfer: Transformer | undefined): void { if (xfer === undefined) return; transformers.push(xfer); } @@ -444,27 +465,29 @@ export class DecodingChoiceTransformer extends Transformer { return transformers; } - getChildren(): Set { + public getChildren(): Set { let children = super.getChildren(); for (const xfer of this.transformers) { setUnionInto(children, xfer.getChildren()); } + return children; } - getNumberOfNodes(): number { + public getNumberOfNodes(): number { let n = super.getNumberOfNodes(); for (const xfer of this.transformers) { n += getNumberOfNodes(xfer); } + return n; } - get canFail(): boolean { + public get canFail(): boolean { return false; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { assert( continuationTransformer === undefined, "Reversing a decoding transformer can't have a target transformer" @@ -473,7 +496,7 @@ export class DecodingChoiceTransformer extends Transformer { let transformers = new Map(); let memberMatchTransformers = new Map(); - function addCase(reversed: Transformer) { + function addCase(reversed: Transformer): void { if (reversed instanceof UnionMemberMatchTransformer) { const memberType = reversed.memberType; let arr = memberMatchTransformers.get(memberType); @@ -481,6 +504,7 @@ export class DecodingChoiceTransformer extends Transformer { arr = []; memberMatchTransformers.set(memberType, arr); } + arr.push(reversed); } else { const kind = reversed.sourceType.kind; @@ -489,19 +513,21 @@ export class DecodingChoiceTransformer extends Transformer { arr = []; transformers.set(kind, arr); } + arr.push(reversed); } } - function reverseAndAdd(transformer: Transformer) { + function reverseAndAdd(transformer: Transformer): void { const reversed = transformer.reverse(targetTypeRef, undefined); - let cases: ReadonlyArray = []; + let cases: readonly Transformer[] = []; // Flatten nested ChoiceTransformers if (reversed instanceof ChoiceTransformer) { cases = reversed.transformers; } else { cases = [reversed]; } + for (const xfer of cases) { addCase(xfer); } @@ -551,8 +577,8 @@ export class DecodingChoiceTransformer extends Transformer { return new ChoiceTransformer(this.graph, targetTypeRef, resultingTransformers); } - reconstitute(builder: TBuilder): Transformer { - function reconstitute(xf: Transformer | undefined) { + public reconstitute(builder: TBuilder): Transformer { + function reconstitute(xf: Transformer | undefined): Transformer | undefined { if (xf === undefined) return undefined; return xf.reconstitute(builder); } @@ -570,7 +596,7 @@ export class DecodingChoiceTransformer extends Transformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof DecodingChoiceTransformer)) return false; if (!areEqual(this.nullTransformer, other.nullTransformer)) return false; @@ -583,7 +609,7 @@ export class DecodingChoiceTransformer extends Transformer { return true; } - hashCode(): number { + public hashCode(): number { let h = super.hashCode(); h = addHashCode(h, hashCodeOf(this.nullTransformer)); h = addHashCode(h, hashCodeOf(this.integerTransformer)); @@ -603,35 +629,41 @@ export class DecodingChoiceTransformer extends Transformer { } export class UnionMemberMatchTransformer extends MatchTransformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef, transformer: Transformer, readonly memberTypeRef: TypeRef) { + public constructor( + graph: TypeGraph, + sourceTypeRef: TypeRef, + transformer: Transformer, + public readonly memberTypeRef: TypeRef + ) { super("union-member-match", graph, sourceTypeRef, transformer); } - get sourceType(): UnionType { + public get sourceType(): UnionType { const t = derefTypeRef(this.sourceTypeRef, this.graph); if (!(t instanceof UnionType)) { return panic("The source of a union member match transformer must be a union type"); } + return t; } - get canFail(): boolean { + public get canFail(): boolean { return true; } - get memberType(): Type { + public get memberType(): Type { return derefTypeRef(this.memberTypeRef, this.graph); } - getChildren(): Set { + public getChildren(): Set { return super.getChildren().add(this.memberType); } - reverse(_targetTypeRef: TypeRef, _continuationTransformer: Transformer | undefined): Transformer { + public reverse(_targetTypeRef: TypeRef, _continuationTransformer: Transformer | undefined): Transformer { return panic("Can't reverse union member match transformer"); } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new UnionMemberMatchTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -640,13 +672,13 @@ export class UnionMemberMatchTransformer extends MatchTransformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof UnionMemberMatchTransformer)) return false; return this.memberTypeRef === other.memberTypeRef; } - hashCode(): number { + public hashCode(): number { const h = super.hashCode(); return addHashCode(h, hashCodeOf(this.memberTypeRef)); } @@ -660,23 +692,29 @@ export class UnionMemberMatchTransformer extends MatchTransformer { * This matches strings and enum cases. */ export class StringMatchTransformer extends MatchTransformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef, transformer: Transformer, readonly stringCase: string) { + public constructor( + graph: TypeGraph, + sourceTypeRef: TypeRef, + transformer: Transformer, + public readonly stringCase: string + ) { super("string-match", graph, sourceTypeRef, transformer); } - get sourceType(): EnumType | PrimitiveType { + public get sourceType(): EnumType | PrimitiveType { const t = derefTypeRef(this.sourceTypeRef, this.graph); if (!(t instanceof EnumType) && !(t instanceof PrimitiveType && t.kind === "string")) { return panic("The source of a string match transformer must be an enum or string type"); } + return t; } - get canFail(): boolean { + public get canFail(): boolean { return true; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { return this.transformer.reverse( targetTypeRef, new StringProducerTransformer( @@ -688,7 +726,7 @@ export class StringMatchTransformer extends MatchTransformer { ); } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new StringMatchTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -697,13 +735,13 @@ export class StringMatchTransformer extends MatchTransformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof StringMatchTransformer)) return false; return this.stringCase !== other.stringCase; } - hashCode(): number { + public hashCode(): number { const h = super.hashCode(); return addHashCode(h, hashString(this.stringCase)); } @@ -714,15 +752,15 @@ export class StringMatchTransformer extends MatchTransformer { } export class UnionInstantiationTransformer extends Transformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef) { + public constructor(graph: TypeGraph, sourceTypeRef: TypeRef) { super("union-instantiation", graph, sourceTypeRef); } - get canFail(): boolean { + public get canFail(): boolean { return false; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { if (continuationTransformer === undefined) { return panic("Union instantiation transformer reverse must have a continuation"); } @@ -730,11 +768,11 @@ export class UnionInstantiationTransformer extends Transformer { return new UnionMemberMatchTransformer(this.graph, targetTypeRef, continuationTransformer, this.sourceTypeRef); } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new UnionInstantiationTransformer(builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef)); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; return other instanceof UnionInstantiationTransformer; } @@ -744,15 +782,20 @@ export class UnionInstantiationTransformer extends Transformer { * Produces a string or an enum case. */ export class StringProducerTransformer extends ProducerTransformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined, readonly result: string) { + public constructor( + graph: TypeGraph, + sourceTypeRef: TypeRef, + consumer: Transformer | undefined, + public readonly result: string + ) { super("string-producer", graph, sourceTypeRef, consumer); } - get canFail(): boolean { + public get canFail(): boolean { return false; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { if (continuationTransformer === undefined) { return panic("Reversing a string producer transformer must have a continuation"); } @@ -772,7 +815,7 @@ export class StringProducerTransformer extends ProducerTransformer { } } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new StringProducerTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -781,13 +824,13 @@ export class StringProducerTransformer extends ProducerTransformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; if (!(other instanceof StringProducerTransformer)) return false; return this.result === other.result; } - hashCode(): number { + public hashCode(): number { const h = super.hashCode(); return addHashCode(h, hashCodeOf(this.consumer)); } @@ -798,15 +841,15 @@ export class StringProducerTransformer extends ProducerTransformer { } export class ParseStringTransformer extends ProducerTransformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined) { + public constructor(graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined) { super("parse-string", graph, sourceTypeRef, consumer); } - get canFail(): boolean { + public get canFail(): boolean { return true; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { if (this.consumer === undefined) { return new StringifyTransformer(this.graph, targetTypeRef, continuationTransformer); } else { @@ -817,7 +860,7 @@ export class ParseStringTransformer extends ProducerTransformer { } } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new ParseStringTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -825,22 +868,22 @@ export class ParseStringTransformer extends ProducerTransformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; return other instanceof ParseStringTransformer; } } export class StringifyTransformer extends ProducerTransformer { - constructor(graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined) { + public constructor(graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined) { super("stringify", graph, sourceTypeRef, consumer); } - get canFail(): boolean { + public get canFail(): boolean { return false; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { if (this.consumer === undefined) { return new ParseStringTransformer(this.graph, targetTypeRef, continuationTransformer); } else { @@ -851,7 +894,7 @@ export class StringifyTransformer extends ProducerTransformer { } } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new StringifyTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -859,28 +902,28 @@ export class StringifyTransformer extends ProducerTransformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; return other instanceof StringifyTransformer; } } export class MinMaxLengthCheckTransformer extends ProducerTransformer { - constructor( + public constructor( graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined, - readonly minLength: number | undefined, - readonly maxLength: number | undefined + public readonly minLength: number | undefined, + public readonly maxLength: number | undefined ) { super("min-max-length-check", graph, sourceTypeRef, consumer); } - get canFail(): boolean { + public get canFail(): boolean { return true; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { if (this.consumer === undefined) { return new MinMaxLengthCheckTransformer( this.graph, @@ -903,7 +946,7 @@ export class MinMaxLengthCheckTransformer extends ProducerTransformer { } } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new MinMaxLengthCheckTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -913,7 +956,7 @@ export class MinMaxLengthCheckTransformer extends ProducerTransformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; return ( other instanceof MinMaxLengthCheckTransformer && @@ -924,21 +967,21 @@ export class MinMaxLengthCheckTransformer extends ProducerTransformer { } export class MinMaxValueTransformer extends ProducerTransformer { - constructor( + public constructor( graph: TypeGraph, sourceTypeRef: TypeRef, consumer: Transformer | undefined, - readonly minimum: number | undefined, - readonly maximum: number | undefined + public readonly minimum: number | undefined, + public readonly maximum: number | undefined ) { super("min-max-value-check", graph, sourceTypeRef, consumer); } - get canFail(): boolean { + public get canFail(): boolean { return true; } - reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { + public reverse(targetTypeRef: TypeRef, continuationTransformer: Transformer | undefined): Transformer { if (this.consumer === undefined) { return new MinMaxValueTransformer( this.graph, @@ -961,7 +1004,7 @@ export class MinMaxValueTransformer extends ProducerTransformer { } } - reconstitute(builder: TBuilder): Transformer { + public reconstitute(builder: TBuilder): Transformer { return new MinMaxValueTransformer( builder.typeGraph, builder.reconstituteTypeRef(this.sourceTypeRef), @@ -971,7 +1014,7 @@ export class MinMaxValueTransformer extends ProducerTransformer { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!super.equals(other)) return false; return ( other instanceof MinMaxValueTransformer && this.minimum === other.minimum && this.maximum === other.maximum @@ -980,21 +1023,21 @@ export class MinMaxValueTransformer extends ProducerTransformer { } export class Transformation { - constructor( + public constructor( private readonly _graph: TypeGraph, private readonly _targetTypeRef: TypeRef, - readonly transformer: Transformer + public readonly transformer: Transformer ) {} - get sourceType(): Type { + public get sourceType(): Type { return this.transformer.sourceType; } - get targetType(): Type { + public get targetType(): Type { return derefTypeRef(this._targetTypeRef, this._graph); } - get reverse(): Transformation { + public get reverse(): Transformation { return new Transformation( this._graph, this.transformer.sourceTypeRef, @@ -1002,11 +1045,11 @@ export class Transformation { ); } - getChildren(): Set { + public getChildren(): Set { return this.transformer.getChildren().add(this.targetType); } - reconstitute(builder: TBuilder): Transformation { + public reconstitute(builder: TBuilder): Transformation { return new Transformation( builder.typeGraph, builder.reconstituteTypeRef(this._targetTypeRef), @@ -1014,45 +1057,48 @@ export class Transformation { ); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!(other instanceof Transformation)) return false; return this._targetTypeRef === other._targetTypeRef && this.transformer.equals(other.transformer); } - hashCode(): number { + public hashCode(): number { let h = hashCodeOf(this._targetTypeRef); h = addHashCode(h, this.transformer.hashCode()); return h; } - debugPrint(): void { + public debugPrint(): void { this.transformer.debugPrint(0); console.log(`-> ${debugStringForType(this.targetType)}`); } } class TransformationTypeAttributeKind extends TypeAttributeKind { - constructor() { + public constructor() { super("transformation"); } - appliesToTypeKind(_kind: TypeKind): boolean { + public appliesToTypeKind(_kind: TypeKind): boolean { return true; } - get inIdentity(): boolean { + public get inIdentity(): boolean { return true; } - children(xf: Transformation): Set { + public children(xf: Transformation): Set { return xf.getChildren(); } - reconstitute(builder: TBuilder, xf: Transformation): Transformation { + public reconstitute( + builder: TBuilder, + xf: Transformation + ): Transformation { return xf.reconstitute(builder); } - stringify(_: Transformation): string { + public stringify(_: Transformation): string { return "transformation"; } } diff --git a/packages/quicktype-core/src/Type.ts b/packages/quicktype-core/src/Type.ts index 7a16f06d3..cdbae768e 100644 --- a/packages/quicktype-core/src/Type.ts +++ b/packages/quicktype-core/src/Type.ts @@ -1,33 +1,35 @@ import { + addHashCode, + areEqual, + definedMap, + // eslint-disable-next-line @typescript-eslint/no-redeclare + hasOwnProperty, + hashCodeInit, + hashCodeOf, iterableEvery, iterableFind, iterableSome, - toReadonlySet, - hashCodeOf, - areEqual, + mapFilter, + mapFromObject, mapMap, - setMap, - mapSortByKey, mapSome, - mapFilter, - setSortBy, + mapSortByKey, + mapSortToArray, setFilter, + setMap, + setSortBy, setUnionInto, - mapSortToArray, - definedMap, - hashCodeInit, - addHashCode, - hasOwnProperty, - mapFromObject + toReadonlySet } from "collection-utils"; -import { defined, panic, assert } from "./support/Support"; -import { TypeReconstituter, BaseGraphRewriteBuilder } from "./GraphRewriting"; -import { TypeNames, namesTypeAttributeKind } from "./attributes/TypeNames"; -import { TypeAttributes } from "./attributes/TypeAttributes"; -import { messageAssert } from "./Messages"; -import { TypeRef, attributesForTypeRef, derefTypeRef, TypeGraph, typeRefIndex } from "./TypeGraph"; +import { type TypeAttributes } from "./attributes/TypeAttributes"; +import { type TypeNames, namesTypeAttributeKind } from "./attributes/TypeNames"; import { uriInferenceAttributesProducer } from "./attributes/URIAttributes"; +import { type BaseGraphRewriteBuilder, type TypeReconstituter } from "./GraphRewriting"; +import { messageAssert } from "./Messages"; +import { assert, defined, panic } from "./support/Support"; +// eslint-disable-next-line import/no-cycle +import { type TypeGraph, type TypeRef, attributesForTypeRef, derefTypeRef, typeRefIndex } from "./TypeGraph"; /** * `jsonSchema` is the `format` to be used to represent this string type in @@ -37,11 +39,11 @@ import { uriInferenceAttributesProducer } from "./attributes/URIAttributes"; * For transformed type kinds that map to an existing primitive type, `primitive` * must specify that type kind. */ -export type TransformedStringTypeTargets = { +export interface TransformedStringTypeTargets { + attributesProducer?: (s: string) => TypeAttributes; jsonSchema: string; primitive: PrimitiveNonStringTypeKind | undefined; - attributesProducer?: (s: string) => TypeAttributes; -}; +} /** * All the transformed string type kinds and the JSON Schema formats and @@ -108,16 +110,21 @@ function triviallyStructurallyCompatible(x: Type, y: Type): boolean { export class TypeIdentity { private readonly _hashCode: number; - constructor(private readonly _kind: TypeKind, private readonly _components: ReadonlyArray) { + public constructor( + private readonly _kind: TypeKind, + // FIXME: strongly type this + private readonly _components: readonly unknown[] + ) { let h = hashCodeInit; h = addHashCode(h, hashCodeOf(this._kind)); for (const c of _components) { h = addHashCode(h, hashCodeOf(c)); } + this._hashCode = h; } - equals(other: any): boolean { + public equals(other: T): boolean { if (!(other instanceof TypeIdentity)) return false; if (this._kind !== other._kind) return false; const n = this._components.length; @@ -125,10 +132,11 @@ export class TypeIdentity { for (let i = 0; i < n; i++) { if (!areEqual(this._components[i], other._components[i])) return false; } + return true; } - hashCode(): number { + public hashCode(): number { return this._hashCode; } } @@ -137,61 +145,65 @@ export class TypeIdentity { export type MaybeTypeIdentity = TypeIdentity | undefined; export abstract class Type { - abstract readonly kind: TypeKind; + public abstract readonly kind: TypeKind; - constructor(readonly typeRef: TypeRef, protected readonly graph: TypeGraph) {} + public constructor( + public readonly typeRef: TypeRef, + protected readonly graph: TypeGraph + ) {} - get index(): number { + public get index(): number { return typeRefIndex(this.typeRef); } // This must return a newly allocated set - abstract getNonAttributeChildren(): Set; + public abstract getNonAttributeChildren(): Set; - getChildren(): ReadonlySet { + public getChildren(): ReadonlySet { let result = this.getNonAttributeChildren(); for (const [k, v] of this.getAttributes()) { if (k.children === undefined) continue; setUnionInto(result, k.children(v)); } + return result; } - getAttributes(): TypeAttributes { + public getAttributes(): TypeAttributes { return attributesForTypeRef(this.typeRef, this.graph); } - get hasNames(): boolean { + public get hasNames(): boolean { return namesTypeAttributeKind.tryGetInAttributes(this.getAttributes()) !== undefined; } - getNames(): TypeNames { + public getNames(): TypeNames { return defined(namesTypeAttributeKind.tryGetInAttributes(this.getAttributes())); } - getCombinedName(): string { + public getCombinedName(): string { return this.getNames().combinedName; } - abstract get isNullable(): boolean; + public abstract get isNullable(): boolean; // FIXME: Remove `isPrimitive` - abstract isPrimitive(): this is PrimitiveType; - abstract get identity(): MaybeTypeIdentity; - abstract reconstitute( + public abstract isPrimitive(): this is PrimitiveType; + public abstract get identity(): MaybeTypeIdentity; + public abstract reconstitute( builder: TypeReconstituter, canonicalOrder: boolean ): void; - get debugPrintKind(): string { + public get debugPrintKind(): string { return this.kind; } - equals(other: any): boolean { + public equals(other: T): boolean { if (!(other instanceof Type)) return false; return this.typeRef === other.typeRef; } - hashCode(): number { + public hashCode(): number { return hashCodeOf(this.typeRef); } @@ -203,7 +215,7 @@ export abstract class Type { queue: (a: Type, b: Type) => boolean ): boolean; - structurallyCompatible(other: Type, conflateNumbers = false): boolean { + public structurallyCompatible(other: Type, conflateNumbers = false): boolean { function kindsCompatible(kind1: TypeKind, kind2: TypeKind): boolean { if (kind1 === kind2) return true; if (!conflateNumbers) return false; @@ -215,11 +227,11 @@ export abstract class Type { if (triviallyStructurallyCompatible(this, other)) return true; if (!kindsCompatible(this.kind, other.kind)) return false; - const workList: [Type, Type][] = [[this, other]]; + const workList: Array<[Type, Type]> = [[this, other]]; // This contains a set of pairs which are the type pairs // we have already determined to be equal. We can't just // do comparison recursively because types can have cycles. - const done: [number, number][] = []; + const done: Array<[number, number]> = []; let failed: boolean; const queue = (x: Type, y: Type): boolean => { @@ -228,6 +240,7 @@ export abstract class Type { failed = true; return false; } + workList.push([x, y]); return true; }; @@ -249,6 +262,7 @@ export abstract class Type { break; } } + if (found) continue; done.push([ai, bi]); } @@ -261,11 +275,11 @@ export abstract class Type { return true; } - getParentTypes(): ReadonlySet { + public getParentTypes(): ReadonlySet { return this.graph.getParentsOfType(this); } - getAncestorsNotInSet(set: ReadonlySet): ReadonlySet { + public getAncestorsNotInSet(set: ReadonlySet): ReadonlySet { const workList: Type[] = [this]; const processed = new Set(); const ancestors = new Set(); @@ -287,6 +301,7 @@ export abstract class Type { } } } + return ancestors; } } @@ -305,27 +320,31 @@ export function primitiveTypeIdentity(kind: PrimitiveTypeKind, attributes: TypeA } export class PrimitiveType extends Type { - constructor(typeRef: TypeRef, graph: TypeGraph, public readonly kind: PrimitiveTypeKind) { + public constructor( + typeRef: TypeRef, + graph: TypeGraph, + public readonly kind: PrimitiveTypeKind + ) { super(typeRef, graph); } - get isNullable(): boolean { + public get isNullable(): boolean { return this.kind === "null" || this.kind === "any" || this.kind === "none"; } - isPrimitive(): this is PrimitiveType { + public isPrimitive(): this is PrimitiveType { return true; } - getNonAttributeChildren(): Set { + public getNonAttributeChildren(): Set { return new Set(); } - get identity(): MaybeTypeIdentity { + public get identity(): MaybeTypeIdentity { return primitiveTypeIdentity(this.kind, this.getAttributes()); } - reconstitute(builder: TypeReconstituter): void { + public reconstitute(builder: TypeReconstituter): void { builder.getPrimitiveType(this.kind); } @@ -346,14 +365,19 @@ export function arrayTypeIdentity(attributes: TypeAttributes, itemsRef: TypeRef) export class ArrayType extends Type { public readonly kind = "array"; - constructor(typeRef: TypeRef, graph: TypeGraph, private _itemsRef?: TypeRef) { + public constructor( + typeRef: TypeRef, + graph: TypeGraph, + private _itemsRef?: TypeRef + ) { super(typeRef, graph); } - setItems(itemsRef: TypeRef) { + public setItems(itemsRef: TypeRef): void { if (this._itemsRef !== undefined) { return panic("Can only set array items once"); } + this._itemsRef = itemsRef; } @@ -361,30 +385,31 @@ export class ArrayType extends Type { if (this._itemsRef === undefined) { return panic("Array items accessed before they were set"); } + return this._itemsRef; } - get items(): Type { + public get items(): Type { return derefTypeRef(this.getItemsRef(), this.graph); } - getNonAttributeChildren(): Set { + public getNonAttributeChildren(): Set { return new Set([this.items]); } - get isNullable(): boolean { + public get isNullable(): boolean { return false; } - isPrimitive(): this is PrimitiveType { + public isPrimitive(): this is PrimitiveType { return false; } - get identity(): MaybeTypeIdentity { + public get identity(): MaybeTypeIdentity { return arrayTypeIdentity(this.getAttributes(), this.getItemsRef()); } - reconstitute(builder: TypeReconstituter): void { + public reconstitute(builder: TypeReconstituter): void { const itemsRef = this.getItemsRef(); const maybeItems = builder.lookup(itemsRef); if (maybeItems === undefined) { @@ -405,30 +430,38 @@ export class ArrayType extends Type { } export class GenericClassProperty { - constructor(readonly typeData: T, readonly isOptional: boolean) {} + public constructor( + public readonly typeData: T, + public readonly isOptional: boolean + ) {} - equals(other: any): boolean { + public equals(other: GenericClassProperty): boolean { if (!(other instanceof GenericClassProperty)) { return false; } + return areEqual(this.typeData, other.typeData) && this.isOptional === other.isOptional; } - hashCode(): number { + public hashCode(): number { return hashCodeOf(this.typeData) + (this.isOptional ? 17 : 23); } } export class ClassProperty extends GenericClassProperty { - constructor(typeRef: TypeRef, readonly graph: TypeGraph, isOptional: boolean) { + public constructor( + typeRef: TypeRef, + public readonly graph: TypeGraph, + isOptional: boolean + ) { super(typeRef, isOptional); } - get typeRef(): TypeRef { + public get typeRef(): TypeRef { return this.typeData; } - get type(): Type { + public get type(): Type { return derefTypeRef(this.typeRef, this.graph); } } @@ -458,11 +491,11 @@ export function mapTypeIdentify( } export class ObjectType extends Type { - constructor( + public constructor( typeRef: TypeRef, graph: TypeGraph, public readonly kind: ObjectTypeKind, - readonly isFixed: boolean, + public readonly isFixed: boolean, private _properties: ReadonlyMap | undefined, private _additionalPropertiesRef: TypeRef | undefined ) { @@ -472,6 +505,7 @@ export class ObjectType extends Type { if (_properties !== undefined) { assert(_properties.size === 0); } + assert(!isFixed); } else if (kind === "class") { assert(_additionalPropertiesRef === undefined); @@ -480,7 +514,10 @@ export class ObjectType extends Type { } } - setProperties(properties: ReadonlyMap, additionalPropertiesRef: TypeRef | undefined) { + public setProperties( + properties: ReadonlyMap, + additionalPropertiesRef: TypeRef | undefined + ): void { assert(this._properties === undefined, "Tried to set object properties twice"); if (this instanceof MapType) { @@ -495,11 +532,11 @@ export class ObjectType extends Type { this._additionalPropertiesRef = additionalPropertiesRef; } - getProperties(): ReadonlyMap { + public getProperties(): ReadonlyMap { return defined(this._properties); } - getSortedProperties(): ReadonlyMap { + public getSortedProperties(): ReadonlyMap { return mapSortByKey(this.getProperties()); } @@ -508,30 +545,31 @@ export class ObjectType extends Type { return this._additionalPropertiesRef; } - getAdditionalProperties(): Type | undefined { + public getAdditionalProperties(): Type | undefined { const tref = this.getAdditionalPropertiesRef(); if (tref === undefined) return undefined; return derefTypeRef(tref, this.graph); } - getNonAttributeChildren(): Set { + public getNonAttributeChildren(): Set { const types = mapSortToArray(this.getProperties(), (_, k) => k).map(([_, p]) => p.type); const additionalProperties = this.getAdditionalProperties(); if (additionalProperties !== undefined) { types.push(additionalProperties); } + return new Set(types); } - get isNullable(): boolean { + public get isNullable(): boolean { return false; } - isPrimitive(): this is PrimitiveType { + public isPrimitive(): this is PrimitiveType { return false; } - get identity(): MaybeTypeIdentity { + public get identity(): MaybeTypeIdentity { if (this.isFixed) return undefined; return objectTypeIdentify( this.kind, @@ -541,7 +579,10 @@ export class ObjectType extends Type { ); } - reconstitute(builder: TypeReconstituter, canonicalOrder: boolean): void { + public reconstitute( + builder: TypeReconstituter, + canonicalOrder: boolean + ): void { const sortedProperties = this.getSortedProperties(); const propertiesInNewOrder = canonicalOrder ? sortedProperties : this.getProperties(); const maybePropertyTypes = builder.lookupMap(mapMap(sortedProperties, cp => cp.typeRef)); @@ -569,6 +610,7 @@ export class ObjectType extends Type { } else { builder.getClassType(properties); } + break; default: return panic(`Invalid object type kind ${this.kind}`); @@ -614,6 +656,7 @@ export class ObjectType extends Type { return false; } } + if (failed) return false; const thisAdditionalProperties = this.getAdditionalProperties(); @@ -625,7 +668,7 @@ export class ObjectType extends Type { } export class ClassType extends ObjectType { - constructor( + public constructor( typeRef: TypeRef, graph: TypeGraph, isFixed: boolean, @@ -636,7 +679,7 @@ export class ClassType extends ObjectType { } export class MapType extends ObjectType { - constructor(typeRef: TypeRef, graph: TypeGraph, valuesRef: TypeRef | undefined) { + public constructor(typeRef: TypeRef, graph: TypeGraph, valuesRef: TypeRef | undefined) { super( typeRef, graph, @@ -648,7 +691,7 @@ export class MapType extends ObjectType { } // FIXME: Remove and use `getAdditionalProperties()` instead. - get values(): Type { + public get values(): Type { return defined(this.getAdditionalProperties()); } } @@ -661,27 +704,31 @@ export function enumTypeIdentity(attributes: TypeAttributes, cases: ReadonlySet< export class EnumType extends Type { public readonly kind = "enum"; - constructor(typeRef: TypeRef, graph: TypeGraph, readonly cases: ReadonlySet) { + public constructor( + typeRef: TypeRef, + graph: TypeGraph, + public readonly cases: ReadonlySet + ) { super(typeRef, graph); } - get isNullable(): boolean { + public get isNullable(): boolean { return false; } - isPrimitive(): this is PrimitiveType { + public isPrimitive(): this is PrimitiveType { return false; } - get identity(): MaybeTypeIdentity { + public get identity(): MaybeTypeIdentity { return enumTypeIdentity(this.getAttributes(), this.cases); } - getNonAttributeChildren(): Set { + public getNonAttributeChildren(): Set { return new Set(); } - reconstitute(builder: TypeReconstituter): void { + public reconstitute(builder: TypeReconstituter): void { builder.getEnumType(this.cases); } @@ -708,10 +755,12 @@ export function setOperationCasesEqual( if (tb !== undefined) { if (membersEqual(ta, tb)) return true; } + if (conflateNumbers) { if (ta.kind === "integer" && iterableSome(mb, t => t.kind === "double")) return true; if (ta.kind === "double" && iterableSome(mb, t => t.kind === "integer")) return true; } + return false; }); } @@ -737,7 +786,7 @@ export function intersectionTypeIdentity( } export abstract class SetOperationType extends Type { - constructor( + public constructor( typeRef: TypeRef, graph: TypeGraph, public readonly kind: TypeKind, @@ -746,10 +795,11 @@ export abstract class SetOperationType extends Type { super(typeRef, graph); } - setMembers(memberRefs: ReadonlySet): void { + public setMembers(memberRefs: ReadonlySet): void { if (this._memberRefs !== undefined) { return panic("Can only set map members once"); } + this._memberRefs = memberRefs; } @@ -757,27 +807,28 @@ export abstract class SetOperationType extends Type { if (this._memberRefs === undefined) { return panic("Map members accessed before they were set"); } + return this._memberRefs; } - get members(): ReadonlySet { + public get members(): ReadonlySet { return setMap(this.getMemberRefs(), tref => derefTypeRef(tref, this.graph)); } - get sortedMembers(): ReadonlySet { + public get sortedMembers(): ReadonlySet { return this.getNonAttributeChildren(); } - getNonAttributeChildren(): Set { + public getNonAttributeChildren(): Set { // FIXME: We're assuming no two members of the same kind. return setSortBy(this.members, t => t.kind); } - isPrimitive(): this is PrimitiveType { + public isPrimitive(): this is PrimitiveType { return false; } - get identity(): MaybeTypeIdentity { + public get identity(): MaybeTypeIdentity { return setOperationTypeIdentity(this.kind, this.getAttributes(), this.getMemberRefs()); } @@ -808,15 +859,18 @@ export abstract class SetOperationType extends Type { } export class IntersectionType extends SetOperationType { - constructor(typeRef: TypeRef, graph: TypeGraph, memberRefs?: ReadonlySet) { + public constructor(typeRef: TypeRef, graph: TypeGraph, memberRefs?: ReadonlySet) { super(typeRef, graph, "intersection", memberRefs); } - get isNullable(): boolean { + public get isNullable(): boolean { return panic("isNullable not implemented for IntersectionType"); } - reconstitute(builder: TypeReconstituter, canonicalOrder: boolean): void { + public reconstitute( + builder: TypeReconstituter, + canonicalOrder: boolean + ): void { this.reconstituteSetOperation(builder, canonicalOrder, members => { if (members === undefined) { builder.getUniqueIntersectionType(); @@ -828,31 +882,31 @@ export class IntersectionType extends SetOperationType { } export class UnionType extends SetOperationType { - constructor(typeRef: TypeRef, graph: TypeGraph, memberRefs?: ReadonlySet) { + public constructor(typeRef: TypeRef, graph: TypeGraph, memberRefs?: ReadonlySet) { super(typeRef, graph, "union", memberRefs); if (memberRefs !== undefined) { messageAssert(memberRefs.size > 0, "IRNoEmptyUnions", {}); } } - setMembers(memberRefs: ReadonlySet): void { + public setMembers(memberRefs: ReadonlySet): void { messageAssert(memberRefs.size > 0, "IRNoEmptyUnions", {}); super.setMembers(memberRefs); } - get stringTypeMembers(): ReadonlySet { + public get stringTypeMembers(): ReadonlySet { return setFilter(this.members, t => isPrimitiveStringTypeKind(t.kind) || t.kind === "enum"); } - findMember(kind: TypeKind): Type | undefined { + public findMember(kind: TypeKind): Type | undefined { return iterableFind(this.members, t => t.kind === kind); } - get isNullable(): boolean { + public get isNullable(): boolean { return this.findMember("null") !== undefined; } - get isCanonical(): boolean { + public get isCanonical(): boolean { const members = this.members; if (members.size <= 1) return false; const kinds = setMap(members, t => t.kind); @@ -870,7 +924,10 @@ export class UnionType extends SetOperationType { return true; } - reconstitute(builder: TypeReconstituter, canonicalOrder: boolean): void { + public reconstitute( + builder: TypeReconstituter, + canonicalOrder: boolean + ): void { this.reconstituteSetOperation(builder, canonicalOrder, members => { if (members === undefined) { builder.getUniqueUnionType(); diff --git a/packages/quicktype-core/src/TypeBuilder.ts b/packages/quicktype-core/src/TypeBuilder.ts index d7d0a4b59..2b4275be8 100644 --- a/packages/quicktype-core/src/TypeBuilder.ts +++ b/packages/quicktype-core/src/TypeBuilder.ts @@ -1,73 +1,75 @@ import { EqualityMap, - mapMap, - mapSortByKey, + areEqual, + definedMap, iterableEvery, mapFilter, mapFind, - areEqual, + mapMap, + mapSortByKey, setUnionManyInto, - definedMap, withDefault } from "collection-utils"; +// eslint-disable-next-line import/no-cycle +import { StringTypes, stringTypesTypeAttributeKind } from "./attributes/StringTypes"; +import { + TypeAttributeKind, + type TypeAttributes, + combineTypeAttributes, + emptyTypeAttributes +} from "./attributes/TypeAttributes"; +import { assert, defined, panic } from "./support/Support"; +// eslint-disable-next-line import/no-cycle import { - PrimitiveTypeKind, - Type, - PrimitiveType, - EnumType, - MapType, ArrayType, - ClassType, - UnionType, - PrimitiveStringTypeKind, ClassProperty, + ClassType, + EnumType, IntersectionType, + MapType, + type MaybeTypeIdentity, ObjectType, - primitiveTypeIdentity, - enumTypeIdentity, - mapTypeIdentify, + type PrimitiveStringTypeKind, + PrimitiveType, + type PrimitiveTypeKind, + type TransformedStringTypeKind, + type Type, + type TypeIdentity, + type TypeKind, + UnionType, arrayTypeIdentity, classTypeIdentity, - unionTypeIdentity, + enumTypeIdentity, intersectionTypeIdentity, - MaybeTypeIdentity, - TypeIdentity, - TransformedStringTypeKind, isPrimitiveStringTypeKind, + mapTypeIdentify, + primitiveTypeIdentity, transformedStringTypeKinds, - TypeKind + unionTypeIdentity } from "./Type"; -import { TypeGraph, TypeRef, makeTypeRef, derefTypeRef, typeRefIndex, assertTypeRefGraph } from "./TypeGraph"; -import { - TypeAttributes, - combineTypeAttributes, - TypeAttributeKind, - emptyTypeAttributes -} from "./attributes/TypeAttributes"; -import { defined, assert, panic } from "./support/Support"; -import { stringTypesTypeAttributeKind, StringTypes } from "./attributes/StringTypes"; +import { TypeGraph, type TypeRef, assertTypeRefGraph, derefTypeRef, makeTypeRef, typeRefIndex } from "./TypeGraph"; // FIXME: Don't infer provenance. All original types should be present in // non-inferred form in the final graph. class ProvenanceTypeAttributeKind extends TypeAttributeKind> { - constructor() { + public constructor() { super("provenance"); } - appliesToTypeKind(_kind: TypeKind): boolean { + public appliesToTypeKind(_kind: TypeKind): boolean { return true; } - combine(arr: Set[]): Set { + public combine(arr: Array>): Set { return setUnionManyInto(new Set(), arr); } - makeInferred(p: Set): Set { + public makeInferred(p: Set): Set { return p; } - stringify(p: Set): string { + public stringify(p: Set): string { return Array.from(p) .sort() .map(i => i.toString()) @@ -95,22 +97,25 @@ export function getNoStringTypeMapping(): StringTypeMapping { ) ); } + return noStringTypeMapping; } export class TypeBuilder { - readonly typeGraph: TypeGraph; + public readonly typeGraph: TypeGraph; protected readonly topLevels: Map = new Map(); - protected readonly types: (Type | undefined)[] = []; + + protected readonly types: Array = []; + private readonly typeAttributes: TypeAttributes[] = []; private _addedForwardingIntersection = false; - constructor( + public constructor( typeGraphSerial: number, private readonly _stringTypeMapping: StringTypeMapping, - readonly canonicalOrder: boolean, + public readonly canonicalOrder: boolean, private readonly _allPropertiesOptional: boolean, private readonly _addProvenanceAttributes: boolean, inheritsProvenanceAttributes: boolean @@ -122,7 +127,7 @@ export class TypeBuilder { this.typeGraph = new TypeGraph(this, typeGraphSerial, _addProvenanceAttributes || inheritsProvenanceAttributes); } - addTopLevel(name: string, tref: TypeRef): void { + public addTopLevel(name: string, tref: TypeRef): void { // assert(t.typeGraph === this.typeGraph, "Adding top-level to wrong type graph"); assert(!this.topLevels.has(name), "Trying to add top-level with existing name"); assert( @@ -132,7 +137,7 @@ export class TypeBuilder { this.topLevels.set(name, tref); } - reserveTypeRef(): TypeRef { + public reserveTypeRef(): TypeRef { const index = this.types.length; // console.log(`reserving ${index}`); this.types.push(undefined); @@ -159,6 +164,7 @@ export class TypeBuilder { if (attributes.size !== filtered.size) { this.setLostTypeAttributes(); } + return filtered; } @@ -181,31 +187,34 @@ export class TypeBuilder { this.assertTypeRefGraph(forwardingRef); assert(this.types[typeRefIndex(forwardingRef)] === undefined); } - const tref = forwardingRef !== undefined ? forwardingRef : this.reserveTypeRef(); + + const tref = forwardingRef ?? this.reserveTypeRef(); if (attributes !== undefined) { const index = typeRefIndex(tref); this.typeAttributes[index] = combineTypeAttributes("union", this.typeAttributes[index], attributes); } + const t = creator(tref); this.commitType(tref, t); return tref; } - typeAtIndex(index: number): Type { + public typeAtIndex(index: number): Type { const maybeType = this.types[index]; if (maybeType === undefined) { return panic("Trying to deref an undefined type in a type builder"); } + return maybeType; } - atIndex(index: number): [Type, TypeAttributes] { + public atIndex(index: number): [Type, TypeAttributes] { const t = this.typeAtIndex(index); const attribtues = this.typeAttributes[index]; return [t, attribtues]; } - addAttributes(tref: TypeRef, attributes: TypeAttributes): void { + public addAttributes(tref: TypeRef, attributes: TypeAttributes): void { this.assertTypeRefGraph(tref); const index = typeRefIndex(tref); const existingAttributes = this.typeAttributes[index]; @@ -222,11 +231,12 @@ export class TypeBuilder { if (maybeType !== undefined) { attributes = this.filterTypeAttributes(maybeType, attributes); } + const nonIdentityAttributes = mapFilter(attributes, (_, k) => !k.inIdentity); this.typeAttributes[index] = combineTypeAttributes("union", existingAttributes, nonIdentityAttributes); } - finish(): TypeGraph { + public finish(): TypeGraph { this.typeGraph.freeze(this.topLevels, this.types.map(defined), this.typeAttributes); return this.typeGraph; } @@ -246,7 +256,7 @@ export class TypeBuilder { return this.addForwardingIntersection(forwardingRef, tref); } - get didAddForwardingIntersection(): boolean { + public get didAddForwardingIntersection(): boolean { return this._addedForwardingIntersection; } @@ -274,6 +284,7 @@ export class TypeBuilder { } else { maybeTypeRef = this._typeForIdentity.get(identity); } + if (maybeTypeRef !== undefined) { const result = this.forwardIfNecessary(forwardingRef, maybeTypeRef); if (attributes !== undefined) { @@ -286,6 +297,7 @@ export class TypeBuilder { mapFilter(attributes, (_, k) => !k.inIdentity) ); } + return result; } @@ -298,7 +310,11 @@ export class TypeBuilder { this.registerTypeForIdentity(t.identity, t.typeRef); } - getPrimitiveType(kind: PrimitiveTypeKind, maybeAttributes?: TypeAttributes, forwardingRef?: TypeRef): TypeRef { + public getPrimitiveType( + kind: PrimitiveTypeKind, + maybeAttributes?: TypeAttributes, + forwardingRef?: TypeRef + ): TypeRef { const attributes = withDefault(maybeAttributes, emptyTypeAttributes); // FIXME: Why do date/time types need a StringTypes attribute? // FIXME: Remove this from here and put it into flattenStrings @@ -306,9 +322,11 @@ export class TypeBuilder { if (isPrimitiveStringTypeKind(kind) && kind !== "string") { kind = stringTypeMappingGet(this._stringTypeMapping, kind); } + if (kind === "string") { return this.getStringType(attributes, stringTypes, forwardingRef); } + return this.getOrAddType( () => primitiveTypeIdentity(kind, attributes), tr => new PrimitiveType(tr, this.typeGraph, kind), @@ -317,7 +335,11 @@ export class TypeBuilder { ); } - getStringType(attributes: TypeAttributes, stringTypes: StringTypes | undefined, forwardingRef?: TypeRef): TypeRef { + public getStringType( + attributes: TypeAttributes, + stringTypes: StringTypes | undefined, + forwardingRef?: TypeRef + ): TypeRef { const existingStringTypes = mapFind(attributes, (_, k) => k === stringTypesTypeAttributeKind); assert( (stringTypes === undefined) !== (existingStringTypes === undefined), @@ -330,6 +352,7 @@ export class TypeBuilder { stringTypesTypeAttributeKind.makeAttributes(defined(stringTypes)) ); } + return this.getOrAddType( () => primitiveTypeIdentity("string", attributes), tr => new PrimitiveType(tr, this.typeGraph, "string"), @@ -338,7 +361,7 @@ export class TypeBuilder { ); } - getEnumType(attributes: TypeAttributes, cases: ReadonlySet, forwardingRef?: TypeRef): TypeRef { + public getEnumType(attributes: TypeAttributes, cases: ReadonlySet, forwardingRef?: TypeRef): TypeRef { return this.getOrAddType( () => enumTypeIdentity(attributes, cases), tr => new EnumType(tr, this.typeGraph, cases), @@ -347,11 +370,11 @@ export class TypeBuilder { ); } - makeClassProperty(tref: TypeRef, isOptional: boolean): ClassProperty { + public makeClassProperty(tref: TypeRef, isOptional: boolean): ClassProperty { return new ClassProperty(tref, this.typeGraph, isOptional); } - getUniqueObjectType( + public getUniqueObjectType( attributes: TypeAttributes, properties: ReadonlyMap | undefined, additionalProperties: TypeRef | undefined, @@ -367,11 +390,11 @@ export class TypeBuilder { ); } - getUniqueMapType(forwardingRef?: TypeRef): TypeRef { + public getUniqueMapType(forwardingRef?: TypeRef): TypeRef { return this.addType(forwardingRef, tr => new MapType(tr, this.typeGraph, undefined), undefined); } - getMapType(attributes: TypeAttributes, values: TypeRef, forwardingRef?: TypeRef): TypeRef { + public getMapType(attributes: TypeAttributes, values: TypeRef, forwardingRef?: TypeRef): TypeRef { this.assertTypeRefGraph(values); return this.getOrAddType( @@ -382,7 +405,7 @@ export class TypeBuilder { ); } - setObjectProperties( + public setObjectProperties( ref: TypeRef, properties: ReadonlyMap, additionalProperties: TypeRef | undefined @@ -393,15 +416,16 @@ export class TypeBuilder { if (!(type instanceof ObjectType)) { return panic("Tried to set properties of non-object type"); } + type.setProperties(this.modifyPropertiesIfNecessary(properties), additionalProperties); this.registerType(type); } - getUniqueArrayType(forwardingRef?: TypeRef): TypeRef { + public getUniqueArrayType(forwardingRef?: TypeRef): TypeRef { return this.addType(forwardingRef, tr => new ArrayType(tr, this.typeGraph, undefined), undefined); } - getArrayType(attributes: TypeAttributes, items: TypeRef, forwardingRef?: TypeRef): TypeRef { + public getArrayType(attributes: TypeAttributes, items: TypeRef, forwardingRef?: TypeRef): TypeRef { this.assertTypeRefGraph(items); return this.getOrAddType( @@ -412,30 +436,35 @@ export class TypeBuilder { ); } - setArrayItems(ref: TypeRef, items: TypeRef): void { + public setArrayItems(ref: TypeRef, items: TypeRef): void { this.assertTypeRefGraph(items); const type = derefTypeRef(ref, this.typeGraph); if (!(type instanceof ArrayType)) { return panic("Tried to set items of non-array type"); } + type.setItems(items); this.registerType(type); } - modifyPropertiesIfNecessary(properties: ReadonlyMap): ReadonlyMap { + public modifyPropertiesIfNecessary( + properties: ReadonlyMap + ): ReadonlyMap { properties.forEach(p => this.assertTypeRefGraph(p.typeRef)); if (this.canonicalOrder) { properties = mapSortByKey(properties); } + if (this._allPropertiesOptional) { properties = mapMap(properties, cp => this.makeClassProperty(cp.typeRef, true)); } + return properties; } - getClassType( + public getClassType( attributes: TypeAttributes, properties: ReadonlyMap, forwardingRef?: TypeRef @@ -451,7 +480,7 @@ export class TypeBuilder { // FIXME: Maybe just distinguish between this and `getClassType` // via a flag? That would make `ClassType.map` simpler. - getUniqueClassType( + public getUniqueClassType( attributes: TypeAttributes, isFixed: boolean, properties: ReadonlyMap | undefined, @@ -465,7 +494,7 @@ export class TypeBuilder { ); } - getUnionType(attributes: TypeAttributes, members: ReadonlySet, forwardingRef?: TypeRef): TypeRef { + public getUnionType(attributes: TypeAttributes, members: ReadonlySet, forwardingRef?: TypeRef): TypeRef { this.assertTypeRefSetGraph(members); return this.getOrAddType( @@ -477,7 +506,7 @@ export class TypeBuilder { } // FIXME: why do we sometimes call this with defined members??? - getUniqueUnionType( + public getUniqueUnionType( attributes: TypeAttributes, members: ReadonlySet | undefined, forwardingRef?: TypeRef @@ -487,7 +516,11 @@ export class TypeBuilder { return this.addType(forwardingRef, tref => new UnionType(tref, this.typeGraph, members), attributes); } - getIntersectionType(attributes: TypeAttributes, members: ReadonlySet, forwardingRef?: TypeRef): TypeRef { + public getIntersectionType( + attributes: TypeAttributes, + members: ReadonlySet, + forwardingRef?: TypeRef + ): TypeRef { this.assertTypeRefSetGraph(members); return this.getOrAddType( @@ -499,7 +532,7 @@ export class TypeBuilder { } // FIXME: why do we sometimes call this with defined members??? - getUniqueIntersectionType( + public getUniqueIntersectionType( attributes: TypeAttributes, members: ReadonlySet | undefined, forwardingRef?: TypeRef @@ -509,18 +542,19 @@ export class TypeBuilder { return this.addType(forwardingRef, tref => new IntersectionType(tref, this.typeGraph, members), attributes); } - setSetOperationMembers(ref: TypeRef, members: ReadonlySet): void { + public setSetOperationMembers(ref: TypeRef, members: ReadonlySet): void { this.assertTypeRefSetGraph(members); const type = derefTypeRef(ref, this.typeGraph); if (!(type instanceof UnionType || type instanceof IntersectionType)) { return panic("Tried to set members of non-set-operation type"); } + type.setMembers(members); this.registerType(type); } - setLostTypeAttributes(): void { + public setLostTypeAttributes(): void { return; } } diff --git a/packages/quicktype-core/src/TypeGraph.ts b/packages/quicktype-core/src/TypeGraph.ts index 09993039e..cdd8d5ea6 100644 --- a/packages/quicktype-core/src/TypeGraph.ts +++ b/packages/quicktype-core/src/TypeGraph.ts @@ -1,14 +1,22 @@ -import { iterableFirst, setFilter, setUnionManyInto, setSubtract, mapMap, mapSome, setMap } from "collection-utils"; +import { iterableFirst, mapMap, mapSome, setFilter, setMap, setSubtract, setUnionManyInto } from "collection-utils"; -import { Type, ClassType, UnionType, IntersectionType } from "./Type"; -import { separateNamedTypes, SeparatedNamedTypes, isNamedType, combineTypeAttributesOfTypes } from "./TypeUtils"; -import { defined, assert, panic, mustNotHappen } from "./support/Support"; -import { TypeBuilder, StringTypeMapping, getNoStringTypeMapping, provenanceTypeAttributeKind } from "./TypeBuilder"; -import { GraphRewriteBuilder, GraphRemapBuilder, BaseGraphRewriteBuilder } from "./GraphRewriting"; +import { type TypeAttributeKind, type TypeAttributes, emptyTypeAttributes } from "./attributes/TypeAttributes"; import { TypeNames, namesTypeAttributeKind } from "./attributes/TypeNames"; import { Graph } from "./Graph"; -import { TypeAttributeKind, TypeAttributes, emptyTypeAttributes } from "./attributes/TypeAttributes"; +// eslint-disable-next-line import/no-cycle +import { type BaseGraphRewriteBuilder, GraphRemapBuilder, GraphRewriteBuilder } from "./GraphRewriting"; import { messageError } from "./Messages"; +import { assert, defined, mustNotHappen, panic } from "./support/Support"; +// eslint-disable-next-line import/no-cycle +import { ClassType, IntersectionType, type Type, UnionType } from "./Type"; +// eslint-disable-next-line import/no-cycle +import { + type StringTypeMapping, + type TypeBuilder, + getNoStringTypeMapping, + provenanceTypeAttributeKind +} from "./TypeBuilder"; +import { type SeparatedNamedTypes, combineTypeAttributesOfTypes, isNamedType, separateNamedTypes } from "./TypeUtils"; export type TypeRef = number; @@ -17,7 +25,7 @@ const indexMask = (1 << indexBits) - 1; const serialBits = 31 - indexBits; const serialMask = (1 << serialBits) - 1; -export function isTypeRef(x: any): x is TypeRef { +export function isTypeRef(x: unknown): x is TypeRef { return typeof x === "number"; } @@ -69,7 +77,10 @@ export function typeAndAttributesForTypeRef( export class TypeAttributeStore { private readonly _topLevelValues: Map = new Map(); - constructor(private readonly _typeGraph: TypeGraph, private _values: (TypeAttributes | undefined)[]) {} + public constructor( + private readonly _typeGraph: TypeGraph, + private _values: Array + ) {} private getTypeIndex(t: Type): number { const tref = t.typeRef; @@ -77,86 +88,90 @@ export class TypeAttributeStore { return typeRefIndex(tref); } - attributesForType(t: Type): TypeAttributes { + public attributesForType(t: Type): TypeAttributes { const index = this.getTypeIndex(t); const maybeAttributes = this._values[index]; if (maybeAttributes !== undefined) { return maybeAttributes; } + return emptyTypeAttributes; } - attributesForTopLevel(name: string): TypeAttributes { + public attributesForTopLevel(name: string): TypeAttributes { const maybeAttributes = this._topLevelValues.get(name); if (maybeAttributes !== undefined) { return maybeAttributes; } + return emptyTypeAttributes; } - private setInMap(attributes: TypeAttributes, kind: TypeAttributeKind, value: T): TypeAttributes { + public setInMap(attributes: TypeAttributes, kind: TypeAttributeKind, value: T): TypeAttributes { // FIXME: This is potentially super slow return new Map(attributes).set(kind, value); } - set(kind: TypeAttributeKind, t: Type, value: T): void { + public set(kind: TypeAttributeKind, t: Type, value: T): void { const index = this.getTypeIndex(t); while (index >= this._values.length) { this._values.push(undefined); } + this._values[index] = this.setInMap(this.attributesForType(t), kind, value); } - setForTopLevel(kind: TypeAttributeKind, topLevelName: string, value: T): void { + public setForTopLevel(kind: TypeAttributeKind, topLevelName: string, value: T): void { this._topLevelValues.set(topLevelName, this.setInMap(this.attributesForTopLevel(topLevelName), kind, value)); } - private tryGetInMap(attributes: TypeAttributes, kind: TypeAttributeKind): T | undefined { + public tryGetInMap(attributes: TypeAttributes, kind: TypeAttributeKind): T | undefined { return attributes.get(kind); } - tryGet(kind: TypeAttributeKind, t: Type): T | undefined { + public tryGet(kind: TypeAttributeKind, t: Type): T | undefined { return this.tryGetInMap(this.attributesForType(t), kind); } - tryGetForTopLevel(kind: TypeAttributeKind, topLevelName: string): T | undefined { + public tryGetForTopLevel(kind: TypeAttributeKind, topLevelName: string): T | undefined { return this.tryGetInMap(this.attributesForTopLevel(topLevelName), kind); } } export class TypeAttributeStoreView { - constructor( + public constructor( private readonly _attributeStore: TypeAttributeStore, private readonly _definition: TypeAttributeKind ) {} - set(t: Type, value: T): void { + public set(t: Type, value: T): void { this._attributeStore.set(this._definition, t, value); } - setForTopLevel(name: string, value: T): void { + public setForTopLevel(name: string, value: T): void { this._attributeStore.setForTopLevel(this._definition, name, value); } - tryGet(t: Type): T | undefined { + public tryGet(t: Type): T | undefined { return this._attributeStore.tryGet(this._definition, t); } - get(t: Type): T { + public get(t: Type): T { return defined(this.tryGet(t)); } - tryGetForTopLevel(name: string): T | undefined { + public tryGetForTopLevel(name: string): T | undefined { return this._attributeStore.tryGetForTopLevel(this._definition, name); } - getForTopLevel(name: string): T { + public getForTopLevel(name: string): T { return defined(this.tryGetForTopLevel(name)); } } export class TypeGraph { private _typeBuilder?: TypeBuilder; + private _attributeStore: TypeAttributeStore | undefined = undefined; // FIXME: OrderedMap? We lose the order in PureScript right now, though, @@ -165,13 +180,13 @@ export class TypeGraph { private _types?: Type[]; - private _parents: Set[] | undefined = undefined; + private _parents: Array> | undefined = undefined; private _printOnRewrite = false; - constructor( + public constructor( typeBuilder: TypeBuilder, - readonly serial: number, + public readonly serial: number, private readonly _haveProvenanceAttributes: boolean ) { this._typeBuilder = typeBuilder; @@ -181,14 +196,14 @@ export class TypeGraph { return this._typeBuilder === undefined; } - get attributeStore(): TypeAttributeStore { + public get attributeStore(): TypeAttributeStore { return defined(this._attributeStore); } - freeze( + public freeze( topLevels: ReadonlyMap, types: Type[], - typeAttributes: (TypeAttributes | undefined)[] + typeAttributes: Array ): void { assert(!this.isFrozen, "Tried to freeze TypeGraph a second time"); for (const t of types) { @@ -206,22 +221,24 @@ export class TypeGraph { this._topLevels = mapMap(topLevels, tref => derefTypeRef(tref, this)); } - get topLevels(): ReadonlyMap { + public get topLevels(): ReadonlyMap { assert(this.isFrozen, "Cannot get top-levels from a non-frozen graph"); return this._topLevels; } - typeAtIndex(index: number): Type { + public typeAtIndex(index: number): Type { if (this._typeBuilder !== undefined) { return this._typeBuilder.typeAtIndex(index); } + return defined(this._types)[index]; } - atIndex(index: number): [Type, TypeAttributes] { + public atIndex(index: number): [Type, TypeAttributes] { if (this._typeBuilder !== undefined) { return this._typeBuilder.atIndex(index); } + const t = this.typeAtIndex(index); return [t, defined(this._attributeStore).attributesForType(t)]; } @@ -248,14 +265,15 @@ export class TypeGraph { for (const [, t] of this.topLevels) { addFromType(t); } + return new Set(types); } - allNamedTypes(): ReadonlySet { + public allNamedTypes(): ReadonlySet { return this.filterTypes(isNamedType); } - allNamedTypesSeparated(): SeparatedNamedTypes { + public allNamedTypesSeparated(): SeparatedNamedTypes { const types = this.allNamedTypes(); return separateNamedTypes(types); } @@ -274,7 +292,7 @@ export class TypeGraph { return result; } - setPrintOnRewrite(): void { + public setPrintOnRewrite(): void { this._printOnRewrite = true; } @@ -302,7 +320,7 @@ export class TypeGraph { // That particular TypeBuilder will have to take as inputs types in the old // graph, but return types in the new graph. Recursive types must be handled // carefully. - rewrite( + public rewrite( title: string, stringTypeMapping: StringTypeMapping, alphabetizeProperties: boolean, @@ -338,7 +356,7 @@ export class TypeGraph { return removeIndirectionIntersections(newGraph, stringTypeMapping, debugPrintReconstitution); } - remap( + public remap( title: string, stringTypeMapping: StringTypeMapping, alphabetizeProperties: boolean, @@ -372,7 +390,7 @@ export class TypeGraph { return newGraph; } - garbageCollect(alphabetizeProperties: boolean, debugPrintReconstitution: boolean): TypeGraph { + public garbageCollect(alphabetizeProperties: boolean, debugPrintReconstitution: boolean): TypeGraph { const newGraph = this.remap( "GC", getNoStringTypeMapping(), @@ -384,7 +402,8 @@ export class TypeGraph { return newGraph; } - rewriteFixedPoint(alphabetizeProperties: boolean, debugPrintReconstitution: boolean): TypeGraph { + public rewriteFixedPoint(alphabetizeProperties: boolean, debugPrintReconstitution: boolean): TypeGraph { + // eslint-disable-next-line @typescript-eslint/no-this-alias let graph: TypeGraph = this; for (;;) { const newGraph = this.rewrite( @@ -399,20 +418,21 @@ export class TypeGraph { if (graph.allTypesUnordered().size === newGraph.allTypesUnordered().size) { return graph; } + graph = newGraph; } } - allTypesUnordered(): ReadonlySet { + public allTypesUnordered(): ReadonlySet { assert(this.isFrozen, "Tried to get all graph types before it was frozen"); return new Set(defined(this._types)); } - makeGraph(invertDirection: boolean, childrenOfType: (t: Type) => ReadonlySet): Graph { + public makeGraph(invertDirection: boolean, childrenOfType: (t: Type) => ReadonlySet): Graph { return new Graph(defined(this._types), invertDirection, childrenOfType); } - getParentsOfType(t: Type): Set { + public getParentsOfType(t: Type): Set { assertTypeRefGraph(t.typeRef, this); if (this._parents === undefined) { const parents = defined(this._types).map(_ => new Set()); @@ -422,12 +442,14 @@ export class TypeGraph { parents[index] = parents[index].add(p); } } + this._parents = parents; } + return this._parents[t.index]; } - printGraph(): void { + public printGraph(): void { const types = defined(this._types); for (let i = 0; i < types.length; i++) { const t = types[i]; @@ -441,12 +463,14 @@ export class TypeGraph { .join(",")}` ); } + for (const [kind, value] of t.getAttributes()) { const maybeString = kind.stringify(value); if (maybeString !== undefined) { parts.push(maybeString); } } + console.log(`${i}: ${parts.join(" | ")}`); } } @@ -461,6 +485,7 @@ export function noneToAny( if (noneTypes.size === 0) { return graph; } + assert(noneTypes.size === 1, "Cannot have more than one none type"); return graph.rewrite( "none to any", @@ -495,11 +520,13 @@ export function optionalToNullable( } else { members = new Set([builder.reconstituteType(t), nullType]); } + const attributes = namesTypeAttributeKind.setDefaultInAttributes(t.getAttributes(), () => TypeNames.make(new Set([name]), new Set(), true) ); ref = builder.getUnionType(attributes, members); } + return builder.makeClassProperty(ref, p.isOptional); }); if (c.isFixed) { @@ -517,6 +544,7 @@ export function optionalToNullable( if (classesWithOptional.size === 0) { return graph; } + return graph.rewrite( "optional to nullable", stringTypeMapping, @@ -536,7 +564,7 @@ export function removeIndirectionIntersections( stringTypeMapping: StringTypeMapping, debugPrintRemapping: boolean ): TypeGraph { - const map: [Type, Type][] = []; + const map: Array<[Type, Type]> = []; for (const t of graph.allTypesUnordered()) { if (!(t instanceof IntersectionType)) continue; @@ -548,10 +576,12 @@ export function removeIndirectionIntersections( map.push([t, member]); break; } + if (seen.has(member)) { // FIXME: Technically, this is an any type. return panic("There's a cycle of intersection types"); } + seen.add(member); current = member; } diff --git a/packages/quicktype-core/src/TypeUtils.ts b/packages/quicktype-core/src/TypeUtils.ts index 36fb166a9..b2ae456f7 100644 --- a/packages/quicktype-core/src/TypeUtils.ts +++ b/packages/quicktype-core/src/TypeUtils.ts @@ -1,31 +1,33 @@ -import { setFilter, setSortBy, iterableFirst, setUnion, EqualityMap } from "collection-utils"; +import { EqualityMap, iterableFirst, setFilter, setSortBy, setUnion } from "collection-utils"; -import { defined, panic, assert, assertNever } from "./support/Support"; +// eslint-disable-next-line import/no-cycle +import { type StringTypes, stringTypesTypeAttributeKind } from "./attributes/StringTypes"; import { - TypeAttributes, + type CombinationKind, + type TypeAttributes, combineTypeAttributes, - emptyTypeAttributes, - CombinationKind + emptyTypeAttributes } from "./attributes/TypeAttributes"; +import { assert, assertNever, defined, panic } from "./support/Support"; import { - Type, - PrimitiveType, ArrayType, + type ClassProperty, + ClassType, EnumType, - ObjectType, MapType, - ClassType, - ClassProperty, - SetOperationType, + ObjectType, + type PrimitiveType, + type SetOperationType, + type Type, UnionType, isPrimitiveStringTypeKind } from "./Type"; -import { stringTypesTypeAttributeKind, StringTypes } from "./attributes/StringTypes"; export function assertIsObject(t: Type): ObjectType { if (t instanceof ObjectType) { return t; } + return panic("Supposed object type is not an object type"); } @@ -33,15 +35,12 @@ export function assertIsClass(t: Type): ClassType { if (!(t instanceof ClassType)) { return panic("Supposed class type is not a class type"); } + return t; } export function setOperationMembersRecursively( - setOperation: T, - combinationKind: CombinationKind | undefined -): [ReadonlySet, TypeAttributes]; -export function setOperationMembersRecursively( - setOperations: T[], + setOperations: T | T[], combinationKind: CombinationKind | undefined ): [ReadonlySet, TypeAttributes]; export function setOperationMembersRecursively( @@ -63,6 +62,7 @@ export function setOperationMembersRecursively( if (combinationKind !== undefined) { attributes = combineTypeAttributes(combinationKind, attributes, t.getAttributes()); } + for (const m of so.members) { process(m); } @@ -78,6 +78,7 @@ export function setOperationMembersRecursively( for (const so of setOperations) { process(so); } + return [members, attributes]; } @@ -102,6 +103,7 @@ export function makeGroupsToFlatten( maybeSet.add(defined(iterableFirst(members))); } } + maybeSet.add(u); typeGroups.set(members, maybeSet); } @@ -125,7 +127,7 @@ export function isAnyOrNull(t: Type): boolean { // introduced. export function removeNullFromUnion( t: UnionType, - sortBy: boolean | ((t: Type) => any) = false + sortBy: boolean | ((t: Type) => string | number) = false ): [PrimitiveType | null, ReadonlySet] { function sort(s: ReadonlySet): ReadonlySet { if (sortBy === false) return s; @@ -137,6 +139,7 @@ export function removeNullFromUnion( if (nullType === undefined) { return [null, sort(t.members)]; } + return [nullType as PrimitiveType, sort(setFilter(t.members, m => m.kind !== "null"))]; } @@ -144,9 +147,11 @@ export function removeNullFromType(t: Type): [PrimitiveType | null, ReadonlySet< if (t.kind === "null") { return [t as PrimitiveType, new Set()]; } + if (!(t instanceof UnionType)) { return [null, new Set([t])]; } + return removeNullFromUnion(t); } @@ -166,20 +171,21 @@ export function getNullAsOptional(cp: ClassProperty): [boolean, ReadonlySet= 0; + return ["class", "union", "enum", "object"].includes(t.kind); } -export type SeparatedNamedTypes = { - objects: ReadonlySet; +export interface SeparatedNamedTypes { enums: ReadonlySet; + objects: ReadonlySet; unions: ReadonlySet; -}; +} export function separateNamedTypes(types: Iterable): SeparatedNamedTypes { const objects = setFilter( @@ -206,6 +212,7 @@ export function directlyReachableSingleNamedType(type: Type): Type | undefined { ) { return new Set([t]); } + return null; }); assert(definedTypes.size <= 1, "Cannot have more than one defined type per top-level"); @@ -218,14 +225,15 @@ export function stringTypesForType(t: PrimitiveType): StringTypes { if (stringTypes === undefined) { return panic("All strings must have a string type attribute"); } + return stringTypes; } -export type StringTypeMatchers = { +export interface StringTypeMatchers { + dateTimeType?: (dateTimeType: PrimitiveType) => U; dateType?: (dateType: PrimitiveType) => U; timeType?: (timeType: PrimitiveType) => U; - dateTimeType?: (dateTimeType: PrimitiveType) => U; -}; +} export function matchTypeExhaustive( t: Type, @@ -249,8 +257,10 @@ export function matchTypeExhaustive( if (t.kind === "string") { return stringType(t); } + return transformedStringType(t); } + const kind = t.kind; const f = { none: noneType, @@ -286,7 +296,7 @@ export function matchType( unionType: (unionType: UnionType) => U, transformedStringType?: (transformedStringType: PrimitiveType) => U ): U { - function typeNotSupported(t: Type) { + function typeNotSupported(t: Type): never { return panic(`Unsupported type ${t.kind} in non-exhaustive match`); } @@ -305,7 +315,7 @@ export function matchType( typeNotSupported, enumType, unionType, - transformedStringType || typeNotSupported + transformedStringType ?? typeNotSupported ); } @@ -321,7 +331,7 @@ export function matchCompoundType( return; } - return matchTypeExhaustive( + matchTypeExhaustive( t, ignore, ignore, diff --git a/packages/quicktype-core/src/UnifyClasses.ts b/packages/quicktype-core/src/UnifyClasses.ts index cb445ae82..8fe16817c 100644 --- a/packages/quicktype-core/src/UnifyClasses.ts +++ b/packages/quicktype-core/src/UnifyClasses.ts @@ -1,13 +1,13 @@ import { iterableFirst, setUnionInto } from "collection-utils"; -import { Type, ClassProperty, UnionType, ObjectType } from "./Type"; +import { type TypeAttributes, combineTypeAttributes, emptyTypeAttributes } from "./attributes/TypeAttributes"; +import { type BaseGraphRewriteBuilder, type GraphRewriteBuilder, type TypeLookerUp } from "./GraphRewriting"; +import { assert, defined, panic } from "./support/Support"; +import { type ClassProperty, type ObjectType, type Type, UnionType } from "./Type"; +import { type TypeBuilder } from "./TypeBuilder"; +import { type TypeRef, derefTypeRef } from "./TypeGraph"; import { assertIsObject } from "./TypeUtils"; -import { TypeBuilder } from "./TypeBuilder"; -import { TypeLookerUp, GraphRewriteBuilder, BaseGraphRewriteBuilder } from "./GraphRewriting"; -import { UnionBuilder, TypeRefUnionAccumulator } from "./UnionBuilder"; -import { panic, assert, defined } from "./support/Support"; -import { TypeAttributes, combineTypeAttributes, emptyTypeAttributes } from "./attributes/TypeAttributes"; -import { TypeRef, derefTypeRef } from "./TypeGraph"; +import { TypeRefUnionAccumulator, UnionBuilder } from "./UnionBuilder"; function getCliqueProperties( clique: ObjectType[], @@ -28,11 +28,14 @@ function getCliqueProperties( if (additionalProperties === undefined) { additionalProperties = new Set(); } + if (additional !== undefined) { additionalProperties.add(additional); } } + // FIXME: refactor this + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < properties.length; i++) { let [name, types, isOptional] = properties[i]; const maybeProperty = o.getProperties().get(name); @@ -45,6 +48,7 @@ function getCliqueProperties( if (maybeProperty.isOptional) { isOptional = true; } + types.add(maybeProperty.type); } @@ -64,9 +68,9 @@ function getCliqueProperties( } function countProperties(clique: ObjectType[]): { - hasProperties: boolean; hasAdditionalProperties: boolean; hasNonAnyAdditionalProperties: boolean; + hasProperties: boolean; } { let hasProperties = false; let hasAdditionalProperties = false; @@ -75,6 +79,7 @@ function countProperties(clique: ObjectType[]): { if (o.getProperties().size > 0) { hasProperties = true; } + const additional = o.getAdditionalProperties(); if (additional !== undefined) { hasAdditionalProperties = true; @@ -83,11 +88,12 @@ function countProperties(clique: ObjectType[]): { } } } + return { hasProperties, hasAdditionalProperties, hasNonAnyAdditionalProperties }; } export class UnifyUnionBuilder extends UnionBuilder { - constructor( + public constructor( typeBuilder: BaseGraphRewriteBuilder, private readonly _makeObjectTypes: boolean, private readonly _makeClassesFixed: boolean, @@ -126,6 +132,7 @@ export class UnifyUnionBuilder extends UnionBuilder cp.typeRef) ); } + const additionalPropertyTypes = new Set( objectTypes .filter(o => o.getAdditionalProperties() !== undefined) @@ -145,6 +152,7 @@ export class UnifyUnionBuilder extends UnionBuilder { readonly arrayData: TArrayData; - readonly objectData: TObjectData; - readonly enumCases: ReadonlySet; - getMemberKinds(): TypeAttributeMap; + getMemberKinds: () => TypeAttributeMap; readonly lostTypeAttributes: boolean; + + readonly objectData: TObjectData; } export type TypeAttributeMap = Map; @@ -61,6 +68,7 @@ function addAttributesToBuilder( arr = []; builder.set(kind, arr); } + arr.push(newAttributes); } @@ -76,16 +84,18 @@ function moveAttributes(map: TypeAttributeMap, fromKind: export class UnionAccumulator implements UnionTypeProvider { private readonly _nonStringTypeAttributes: TypeAttributeMapBuilder = new Map(); + private readonly _stringTypeAttributes: TypeAttributeMapBuilder = new Map(); - readonly arrayData: TArray[] = []; - readonly objectData: TObject[] = []; + public readonly arrayData: TArray[] = []; + + public readonly objectData: TObject[] = []; private readonly _enumCases: Set = new Set(); private _lostTypeAttributes = false; - constructor(private readonly _conflateNumbers: boolean) {} + public constructor(private readonly _conflateNumbers: boolean) {} private have(kind: TypeKind): boolean { return ( @@ -93,17 +103,19 @@ export class UnionAccumulator implements UnionTypeProvider implements UnionTypeProvider implements UnionTypeProvider implements UnionTypeProvider, attributes: TypeAttributes): void { + public addEnum(cases: ReadonlySet, attributes: TypeAttributes): void { const maybeStringAttributes = this._stringTypeAttributes.get("string"); if (maybeStringAttributes !== undefined) { addAttributesToBuilder(this._stringTypeAttributes, "string", attributes); return; } + addAttributesToBuilder(this._nonStringTypeAttributes, "enum", attributes); setUnionInto(this._enumCases, cases); } - addStringCases(cases: string[], attributes: TypeAttributes): void { + public addStringCases(cases: string[], attributes: TypeAttributes): void { this.addFullStringType(attributes, StringTypes.fromCases(cases)); } - addStringCase(s: string, count: number, attributes: TypeAttributes): void { + + public addStringCase(s: string, count: number, attributes: TypeAttributes): void { this.addFullStringType(attributes, StringTypes.fromCase(s, count)); } - get enumCases(): ReadonlySet { + public get enumCases(): ReadonlySet { return this._enumCases; } - getMemberKinds(): TypeAttributeMap { + public getMemberKinds(): TypeAttributeMap { assert(!(this.have("enum") && this.have("string")), "We can't have both strings and enums in the same union"); let merged = mapMerge( @@ -201,19 +218,21 @@ export class UnionAccumulator implements UnionTypeProvider): [ReadonlyMap (s === undefined ? new Set(path) : setUnionInto(s, path))); @@ -273,10 +293,12 @@ function attributesForTypes(types: Iterable): [ReadonlyMap ); } - addTypes(types: Iterable): TypeAttributes { + public addTypes(types: Iterable): TypeAttributes { const [attributesMap, unionAttributes] = attributesForTypes(types); for (const [t, attributes] of attributesMap) { this.addType(t, attributes); } + return unionAttributes; } } export abstract class UnionBuilder { - constructor(protected readonly typeBuilder: TBuilder) {} + public constructor(protected readonly typeBuilder: TBuilder) {} protected abstract makeObject( objects: TObjectData, @@ -354,14 +377,16 @@ export abstract class UnionBuilder, unique: boolean, typeAttributes: TypeAttributes, @@ -396,6 +421,7 @@ export abstract class UnionBuilder; export type AccessorNames = Map; class AccessorNamesTypeAttributeKind extends TypeAttributeKind { - constructor() { + public constructor() { super("accessorNames"); } - makeInferred(_: AccessorNames): undefined { + public makeInferred(_: AccessorNames): undefined { return undefined; } } @@ -79,15 +80,15 @@ export function getAccessorName( // up its union's identifier(s), and then look up the member's accessor entries for that // identifier. Of course we might find more than one, potentially conflicting. class UnionIdentifierTypeAttributeKind extends TypeAttributeKind> { - constructor() { + public constructor() { super("unionIdentifier"); } - combine(arr: ReadonlySet[]): ReadonlySet { + public combine(arr: Array>): ReadonlySet { return setUnionManyInto(new Set(), arr); } - makeInferred(_: ReadonlySet): ReadonlySet { + public makeInferred(_: ReadonlySet): ReadonlySet { return new Set(); } } @@ -104,15 +105,16 @@ export function makeUnionIdentifierAttribute(): TypeAttributes { } class UnionMemberNamesTypeAttributeKind extends TypeAttributeKind> { - constructor() { + public constructor() { super("unionMemberNames"); } - combine(arr: Map[]): Map { + public combine(arr: Array>): Map { const result = new Map(); for (const m of arr) { mapMergeInto(result, m); } + return result; } } @@ -166,11 +168,12 @@ export function unionMemberName(u: UnionType, member: Type, language: string): [ return [first, isFixed]; } -function isAccessorEntry(x: any): x is string | { [language: string]: string } { +function isAccessorEntry(x: unknown): x is string | { [language: string]: string } { if (typeof x === "string") { return true; } - return isStringMap(x, (v: any): v is string => typeof v === "string"); + + return isStringMap(x, (v: unknown): v is string => typeof v === "string"); } function makeAccessorEntry(ae: string | { [language: string]: string }): AccessorEntry { @@ -178,7 +181,7 @@ function makeAccessorEntry(ae: string | { [language: string]: string }): Accesso return mapFromObject(ae); } -export function makeAccessorNames(x: any): AccessorNames { +export function makeAccessorNames(x: unknown): AccessorNames { // FIXME: Do proper error reporting const stringMap = checkStringMap(x, isAccessorEntry); return mapMap(mapFromObject(stringMap), makeAccessorEntry); diff --git a/packages/quicktype-core/src/attributes/Constraints.ts b/packages/quicktype-core/src/attributes/Constraints.ts index a0370f4cc..09fb79564 100644 --- a/packages/quicktype-core/src/attributes/Constraints.ts +++ b/packages/quicktype-core/src/attributes/Constraints.ts @@ -1,9 +1,10 @@ -import { Type, TypeKind } from "../Type"; -import { TypeAttributeKind } from "./TypeAttributes"; -import { assert } from "../support/Support"; +import { type JSONSchemaAttributes, type JSONSchemaType, type Ref } from "../input/JSONSchemaInput"; +import { type JSONSchema } from "../input/JSONSchemaStore"; import { messageError } from "../Messages"; -import { JSONSchemaType, JSONSchemaAttributes, Ref } from "../input/JSONSchemaInput"; -import { JSONSchema } from "../input/JSONSchemaStore"; +import { assert } from "../support/Support"; +import { type Type, type TypeKind } from "../Type"; + +import { TypeAttributeKind } from "./TypeAttributes"; // This can't be an object type, unfortunately, because it's in the // type's identity and as such must be comparable and hashable with @@ -15,27 +16,29 @@ function checkMinMaxConstraint(minmax: MinMaxConstraint): MinMaxConstraint | und if (typeof min === "number" && typeof max === "number" && min > max) { return messageError("MiscInvalidMinMaxConstraint", { min, max }); } + if (min === undefined && max === undefined) { return undefined; } + return minmax; } export class MinMaxConstraintTypeAttributeKind extends TypeAttributeKind { - constructor( + public constructor( name: string, - private _typeKinds: Set, + private readonly _typeKinds: Set, private _minSchemaProperty: string, private _maxSchemaProperty: string ) { super(name); } - get inIdentity(): boolean { + public get inIdentity(): boolean { return true; } - combine(arr: MinMaxConstraint[]): MinMaxConstraint | undefined { + public combine(arr: MinMaxConstraint[]): MinMaxConstraint | undefined { assert(arr.length > 0); let [min, max] = arr[0]; @@ -46,16 +49,18 @@ export class MinMaxConstraintTypeAttributeKind extends TypeAttributeKind 0); let [min, max] = arr[0]; @@ -66,32 +71,35 @@ export class MinMaxConstraintTypeAttributeKind extends TypeAttributeKind { - constructor() { + public constructor() { super("pattern"); } - get inIdentity(): boolean { + public get inIdentity(): boolean { return true; } - combine(arr: string[]): string { + public combine(arr: string[]): string { assert(arr.length > 0); return arr.map(p => `(${p})`).join("|"); } - intersect(_arr: string[]): string | undefined { + public intersect(_arr: string[]): string | undefined { /** FIXME!!! what is the intersection of regexps? */ return undefined; } - makeInferred(_: string): undefined { + public makeInferred(_: string): undefined { return undefined; } - addToSchema(schema: { [name: string]: unknown }, t: Type, attr: string): void { + public addToSchema(schema: { [name: string]: unknown }, t: Type, attr: string): void { if (t.kind !== "string") return; schema.pattern = attr; } diff --git a/packages/quicktype-core/src/attributes/Description.ts b/packages/quicktype-core/src/attributes/Description.ts index 6684b95c3..a1f64efcd 100644 --- a/packages/quicktype-core/src/attributes/Description.ts +++ b/packages/quicktype-core/src/attributes/Description.ts @@ -1,20 +1,28 @@ import { + iterableFirst, mapFilterMap, mapFromObject, - setUnion, - iterableFirst, - setUnionManyInto, mapMergeWithInto, - setSubtract + setSubtract, + setUnion, + setUnionManyInto } from "collection-utils"; // There's a cyclic import here. Ignoring now because it requires a large refactor. // skipcq: JS-E1008 -import { TypeAttributeKind, emptyTypeAttributes } from "./TypeAttributes"; // FIXME: This is a circular import -import { JSONSchemaType, Ref, JSONSchemaAttributes, PathElementKind, PathElement } from "../input/JSONSchemaInput"; -import { JSONSchema } from "../input/JSONSchemaStore"; -import { Type } from "../Type"; +// eslint-disable-next-line import/no-cycle +import { + type JSONSchemaAttributes, + type JSONSchemaType, + type PathElement, + PathElementKind, + type Ref +} from "../input/JSONSchemaInput"; +import { type JSONSchema } from "../input/JSONSchemaStore"; +import { type Type } from "../Type"; + +import { TypeAttributeKind, emptyTypeAttributes } from "./TypeAttributes"; export function addDescriptionToSchema( schema: { [name: string]: unknown }, @@ -25,31 +33,33 @@ export function addDescriptionToSchema( } class DescriptionTypeAttributeKind extends TypeAttributeKind> { - constructor() { + public constructor() { super("description"); } - combine(attrs: ReadonlySet[]): ReadonlySet { + public combine(attrs: Array>): ReadonlySet { return setUnionManyInto(new Set(), attrs); } - makeInferred(_: ReadonlySet): undefined { + public makeInferred(_: ReadonlySet): undefined { return undefined; } - addToSchema(schema: { [name: string]: unknown }, _t: Type, attrs: ReadonlySet): void { + public addToSchema(schema: { [name: string]: unknown }, _t: Type, attrs: ReadonlySet): void { addDescriptionToSchema(schema, attrs); } - stringify(descriptions: ReadonlySet): string | undefined { + public stringify(descriptions: ReadonlySet): string | undefined { let result = iterableFirst(descriptions); if (result === undefined) return undefined; if (result.length > 5 + 3) { result = `${result.slice(0, 5)}...`; } + if (descriptions.size > 1) { result = `${result}, ...`; } + return result; } } @@ -57,24 +67,25 @@ class DescriptionTypeAttributeKind extends TypeAttributeKind export const descriptionTypeAttributeKind: TypeAttributeKind> = new DescriptionTypeAttributeKind(); class PropertyDescriptionsTypeAttributeKind extends TypeAttributeKind>> { - constructor() { + public constructor() { super("propertyDescriptions"); } - combine(attrs: Map>[]): Map> { + public combine(attrs: Array>>): Map> { // FIXME: Implement this with mutable sets const result = new Map>(); for (const attr of attrs) { mapMergeWithInto(result, (sa, sb) => setUnion(sa, sb), attr); } + return result; } - makeInferred(_: Map>): undefined { + public makeInferred(_: Map>): undefined { return undefined; } - stringify(propertyDescriptions: Map>): string | undefined { + public stringify(propertyDescriptions: Map>): string | undefined { if (propertyDescriptions.size === 0) return undefined; return `prop descs: ${propertyDescriptions.size}`; } @@ -112,13 +123,14 @@ export function descriptionAttributeProducer( } if (types.has("object") && typeof schema.properties === "object") { - const propertyDescriptions = mapFilterMap(mapFromObject(schema.properties), propSchema => { - if (typeof propSchema === "object") { + const propertyDescriptions = mapFilterMap(mapFromObject(schema.properties), propSchema => { + if (propSchema && typeof propSchema === "object" && "description" in propSchema) { const desc = propSchema.description; if (typeof desc === "string") { return new Set([desc]); } } + return undefined; }); if (propertyDescriptions.size > 0) { diff --git a/packages/quicktype-core/src/attributes/EnumValues.ts b/packages/quicktype-core/src/attributes/EnumValues.ts index f81b73a37..05885ada9 100644 --- a/packages/quicktype-core/src/attributes/EnumValues.ts +++ b/packages/quicktype-core/src/attributes/EnumValues.ts @@ -1,16 +1,18 @@ import { mapMap } from "collection-utils"; -import { lookupKey, AccessorNames, makeAccessorNames } from "./AccessorNames"; -import { EnumType } from "../Type"; +import { type JSONSchemaAttributes, type JSONSchemaType, type Ref } from "../input/JSONSchemaInput"; +import { type JSONSchema } from "../input/JSONSchemaStore"; +import { type EnumType } from "../Type"; + +import { type AccessorNames, lookupKey, makeAccessorNames } from "./AccessorNames"; import { TypeAttributeKind } from "./TypeAttributes"; -import { JSONSchema } from "../input/JSONSchemaStore"; -import { Ref, JSONSchemaType, JSONSchemaAttributes } from "../input/JSONSchemaInput"; class EnumValuesTypeAttributeKind extends TypeAttributeKind { - constructor() { + public constructor() { super("enumValues"); } - makeInferred(_: AccessorNames) { + + public makeInferred(_: AccessorNames): undefined { return undefined; } } diff --git a/packages/quicktype-core/src/attributes/StringTypes.ts b/packages/quicktype-core/src/attributes/StringTypes.ts index c14d7d58d..ae8539a24 100644 --- a/packages/quicktype-core/src/attributes/StringTypes.ts +++ b/packages/quicktype-core/src/attributes/StringTypes.ts @@ -1,53 +1,56 @@ import { - mapMap, - iterableFirst, - setIntersect, - hashCodeOf, + addHashCode, areEqual, - mapMergeWithInto, definedMap, - addHashCode, + hashCodeOf, + iterableFirst, + mapMap, + mapMergeWithInto, + setIntersect, setUnionInto } from "collection-utils"; +import { type DateTimeRecognizer } from "../DateTime"; +import { assert, defined } from "../support/Support"; +import { type TransformedStringTypeKind } from "../Type"; +// eslint-disable-next-line import/no-cycle +import { type StringTypeMapping, stringTypeMappingGet } from "../TypeBuilder"; + import { TypeAttributeKind } from "./TypeAttributes"; -import { defined, assert } from "../support/Support"; -import { StringTypeMapping, stringTypeMappingGet } from "../TypeBuilder"; -import { TransformedStringTypeKind } from "../Type"; -import { DateTimeRecognizer } from "../DateTime"; export class StringTypes { - static readonly unrestricted: StringTypes = new StringTypes(undefined, new Set()); + public static readonly unrestricted: StringTypes = new StringTypes(undefined, new Set()); - static fromCase(s: string, count: number): StringTypes { + public static fromCase(s: string, count: number): StringTypes { const caseMap: { [name: string]: number } = {}; caseMap[s] = count; return new StringTypes(new Map([[s, count] as [string, number]]), new Set()); } - static fromCases(cases: string[]): StringTypes { + public static fromCases(cases: string[]): StringTypes { const caseMap: { [name: string]: number } = {}; for (const s of cases) { caseMap[s] = 1; } + return new StringTypes(new Map(cases.map(s => [s, 1] as [string, number])), new Set()); } // undefined means no restrictions - constructor( - readonly cases: ReadonlyMap | undefined, - readonly transformations: ReadonlySet + public constructor( + public readonly cases: ReadonlyMap | undefined, + public readonly transformations: ReadonlySet ) { if (cases === undefined) { assert(transformations.size === 0, "We can't have an unrestricted string that also allows transformations"); } } - get isRestricted(): boolean { + public get isRestricted(): boolean { return this.cases !== undefined; } - union(othersArray: StringTypes[], startIndex: number): StringTypes { + public union(othersArray: StringTypes[], startIndex: number): StringTypes { if (this.cases === undefined) return this; const cases = new Map(this.cases); @@ -65,7 +68,7 @@ export class StringTypes { return new StringTypes(cases, transformations); } - intersect(othersArray: StringTypes[], startIndex: number): StringTypes { + public intersect(othersArray: StringTypes[], startIndex: number): StringTypes { let cases = this.cases; let transformations = this.transformations; @@ -89,10 +92,11 @@ export class StringTypes { transformations = setIntersect(transformations, other.transformations); } + return new StringTypes(cases, transformations); } - applyStringTypeMapping(mapping: StringTypeMapping): StringTypes { + public applyStringTypeMapping(mapping: StringTypeMapping): StringTypes { if (!this.isRestricted) return this; const kinds = new Set(); @@ -101,21 +105,22 @@ export class StringTypes { if (mapped === "string") return StringTypes.unrestricted; kinds.add(mapped); } + return new StringTypes(this.cases, new Set(kinds)); } - equals(other: any): boolean { + public equals(other: T): boolean { if (!(other instanceof StringTypes)) return false; return areEqual(this.cases, other.cases) && areEqual(this.transformations, other.transformations); } - hashCode(): number { + public hashCode(): number { let h = hashCodeOf(this.cases); h = addHashCode(h, hashCodeOf(this.transformations)); return h; } - toString(): string { + public toString(): string { const parts: string[] = []; const enumCases = this.cases; @@ -135,33 +140,33 @@ export class StringTypes { } class StringTypesTypeAttributeKind extends TypeAttributeKind { - constructor() { + public constructor() { super("stringTypes"); } - get inIdentity(): boolean { + public get inIdentity(): boolean { return true; } - requiresUniqueIdentity(st: StringTypes): boolean { + public requiresUniqueIdentity(st: StringTypes): boolean { return st.cases !== undefined && st.cases.size > 0; } - combine(arr: StringTypes[]): StringTypes { + public combine(arr: StringTypes[]): StringTypes { assert(arr.length > 0); return arr[0].union(arr, 1); } - intersect(arr: StringTypes[]): StringTypes { + public intersect(arr: StringTypes[]): StringTypes { assert(arr.length > 0); return arr[0].intersect(arr, 1); } - makeInferred(_: StringTypes): undefined { + public makeInferred(_: StringTypes): undefined { return undefined; } - stringify(st: StringTypes): string { + public stringify(st: StringTypes): string { return st.toString(); } } @@ -175,9 +180,10 @@ const MIN_INTEGER_STRING = 1 << 31; const MAX_INTEGER_STRING = -(MIN_INTEGER_STRING + 1); function isIntegerString(s: string): boolean { - if (s.match(INTEGER_STRING) === null) { + if (INTEGER_STRING.exec(s) === null) { return false; } + const i = parseInt(s, 10); return i >= MIN_INTEGER_STRING && i <= MAX_INTEGER_STRING; } @@ -185,7 +191,7 @@ function isIntegerString(s: string): boolean { const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/; function isUUID(s: string): boolean { - return s.match(UUID) !== null; + return UUID.exec(s) !== null; } // FIXME: This is obviously not a complete URI regex. The exclusion of @@ -194,7 +200,7 @@ function isUUID(s: string): boolean { const URI = /^(https?|ftp):\/\/[^{}]+$/; function isURI(s: string): boolean { - return s.match(URI) !== null; + return URI.exec(s) !== null; } /** @@ -208,7 +214,7 @@ export function inferTransformedStringTypeKindForString( s: string, recognizer: DateTimeRecognizer ): TransformedStringTypeKind | undefined { - if (s.length === 0 || "0123456789-abcdefth".indexOf(s[0]) < 0) return undefined; + if (s.length === 0 || !"0123456789-abcdefth".includes(s[0])) return undefined; if (recognizer.isDate(s)) { return "date"; @@ -225,5 +231,6 @@ export function inferTransformedStringTypeKindForString( } else if (isURI(s)) { return "uri"; } + return undefined; } diff --git a/packages/quicktype-core/src/attributes/TypeAttributes.ts b/packages/quicktype-core/src/attributes/TypeAttributes.ts index 1c73e8ffc..e8a3a61cd 100644 --- a/packages/quicktype-core/src/attributes/TypeAttributes.ts +++ b/packages/quicktype-core/src/attributes/TypeAttributes.ts @@ -1,62 +1,62 @@ -import { mapFilterMap, mapFilter, mapTranspose, hashString } from "collection-utils"; +import { hashString, mapFilter, mapFilterMap, mapTranspose } from "collection-utils"; -import { panic, assert } from "../support/Support"; -import { Type, TypeKind } from "../Type"; -import { BaseGraphRewriteBuilder } from "../GraphRewriting"; +import { type BaseGraphRewriteBuilder } from "../GraphRewriting"; +import { assert, panic } from "../support/Support"; +import { type Type, type TypeKind } from "../Type"; export class TypeAttributeKind { - constructor(readonly name: string) {} + public constructor(public readonly name: string) {} - appliesToTypeKind(kind: TypeKind): boolean { + public appliesToTypeKind(kind: TypeKind): boolean { return kind !== "any"; } - combine(_attrs: T[]): T | undefined { + public combine(_attrs: T[]): T | undefined { return panic(`Cannot combine type attribute ${this.name}`); } - intersect(attrs: T[]): T | undefined { + public intersect(attrs: T[]): T | undefined { return this.combine(attrs); } - makeInferred(_: T): T | undefined { + public makeInferred(_: T): T | undefined { return panic(`Cannot make type attribute ${this.name} inferred`); } - increaseDistance(attrs: T): T | undefined { + public increaseDistance(attrs: T): T | undefined { return attrs; } - addToSchema(_schema: { [name: string]: unknown }, _t: Type, _attrs: T): void { + public addToSchema(_schema: { [name: string]: unknown }, _t: Type, _attrs: T): void { return; } - children(_: T): ReadonlySet { + public children(_: T): ReadonlySet { return new Set(); } - stringify(_: T): string | undefined { + public stringify(_: T): string | undefined { return undefined; } - get inIdentity(): boolean { + public get inIdentity(): boolean { return false; } - requiresUniqueIdentity(_: T): boolean { + public requiresUniqueIdentity(_: T): boolean { return false; } - reconstitute(_builder: TBuilder, a: T): T { + public reconstitute(_builder: TBuilder, a: T): T { return a; } - makeAttributes(value: T): TypeAttributes { - const kvps: [this, T][] = [[this, value]]; + public makeAttributes(value: T): TypeAttributes { + const kvps: Array<[this, T]> = [[this, value]]; return new Map(kvps); } - tryGetInAttributes(a: TypeAttributes): T | undefined { + public tryGetInAttributes(a: TypeAttributes): T | undefined { return a.get(this); } @@ -65,7 +65,7 @@ export class TypeAttributeKind { return new Map(a).set(this, value); } - modifyInAttributes(a: TypeAttributes, modify: (value: T | undefined) => T | undefined): TypeAttributes { + public modifyInAttributes(a: TypeAttributes, modify: (value: T | undefined) => T | undefined): TypeAttributes { const modified = modify(this.tryGetInAttributes(a)); if (modified === undefined) { // FIXME: This is potentially super slow @@ -73,30 +73,34 @@ export class TypeAttributeKind { result.delete(this); return result; } + return this.setInAttributes(a, modified); } - setDefaultInAttributes(a: TypeAttributes, makeDefault: () => T): TypeAttributes { + public setDefaultInAttributes(a: TypeAttributes, makeDefault: () => T): TypeAttributes { if (this.tryGetInAttributes(a) !== undefined) return a; return this.modifyInAttributes(a, makeDefault); } - removeInAttributes(a: TypeAttributes): TypeAttributes { + public removeInAttributes(a: TypeAttributes): TypeAttributes { return mapFilter(a, (_, k) => k !== this); } - equals(other: any): boolean { + public equals(other: TypeAttributeKind): boolean { if (!(other instanceof TypeAttributeKind)) { return false; } + return this.name === other.name; } - hashCode(): number { + public hashCode(): number { return hashString(this.name); } } +// FIXME: strongly type this +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type TypeAttributes = ReadonlyMap, any>; export const emptyTypeAttributes: TypeAttributes = new Map(); @@ -118,11 +122,14 @@ export function combineTypeAttributes( if (second === undefined) { return panic("Must have on array or two attributes"); } + attributeArray = [firstOrArray, second]; } const attributesByKind = mapTranspose(attributeArray); + // FIXME: strongly type this + // eslint-disable-next-line @typescript-eslint/no-explicit-any function combine(attrs: any[], kind: TypeAttributeKind): any { assert(attrs.length > 0, "Cannot combine zero type attributes"); if (attrs.length === 1) return attrs[0]; diff --git a/packages/quicktype-core/src/attributes/TypeNames.ts b/packages/quicktype-core/src/attributes/TypeNames.ts index c7225f3b7..f5d96a7ac 100644 --- a/packages/quicktype-core/src/attributes/TypeNames.ts +++ b/packages/quicktype-core/src/attributes/TypeNames.ts @@ -1,10 +1,11 @@ +import { definedMap, iterableFirst, iterableSkip, setMap, setUnionInto } from "collection-utils"; import * as pluralize from "pluralize"; -import { setMap, iterableFirst, iterableSkip, setUnionInto, definedMap } from "collection-utils"; -import { panic, defined, assert } from "../support/Support"; -import { TypeAttributeKind, TypeAttributes } from "./TypeAttributes"; -import { splitIntoWords } from "../support/Strings"; import { Chance } from "../support/Chance"; +import { splitIntoWords } from "../support/Strings"; +import { assert, defined, panic } from "../support/Support"; + +import { TypeAttributeKind, type TypeAttributes } from "./TypeAttributes"; let chance: Chance; let usedRandomNames: Set; @@ -36,6 +37,7 @@ function combineNames(names: ReadonlySet): string { if (originalFirst === undefined) { return panic("Named type has no names"); } + if (names.size === 1) { return originalFirst; } @@ -69,19 +71,21 @@ function combineNames(names: ReadonlySet): string { } } } + const prefix = prefixLength > 2 ? first.slice(0, prefixLength) : ""; const suffix = suffixLength > 2 ? first.slice(first.length - suffixLength) : ""; const combined = prefix + suffix; if (combined.length > 2) { return combined; } + return first; } export const tooManyNamesThreshold = 1000; export abstract class TypeNames { - static makeWithDistance( + public static makeWithDistance( names: ReadonlySet, alternativeNames: ReadonlySet | undefined, distance: number @@ -97,7 +101,7 @@ export abstract class TypeNames { return new RegularTypeNames(names, alternativeNames, distance); } - static make( + public static make( names: ReadonlySet, alternativeNames: ReadonlySet | undefined, areInferred: boolean @@ -105,33 +109,33 @@ export abstract class TypeNames { return TypeNames.makeWithDistance(names, alternativeNames, areInferred ? 1 : 0); } - constructor(readonly distance: number) {} + public constructor(public readonly distance: number) {} - get areInferred(): boolean { + public get areInferred(): boolean { return this.distance > 0; } - abstract get names(): ReadonlySet; - abstract get combinedName(): string; - abstract get proposedNames(): ReadonlySet; + public abstract get names(): ReadonlySet; + public abstract get combinedName(): string; + public abstract get proposedNames(): ReadonlySet; - abstract add(namesArray: TypeNames[], startIndex?: number): TypeNames; - abstract clearInferred(): TypeNames; - abstract makeInferred(): TypeNames; - abstract singularize(): TypeNames; - abstract toString(): string; + public abstract add(namesArray: TypeNames[], startIndex?: number): TypeNames; + public abstract clearInferred(): TypeNames; + public abstract makeInferred(): TypeNames; + public abstract singularize(): TypeNames; + public abstract toString(): string; } export class RegularTypeNames extends TypeNames { - constructor( - readonly names: ReadonlySet, + public constructor( + public readonly names: ReadonlySet, private readonly _alternativeNames: ReadonlySet | undefined, distance: number ) { super(distance); } - add(namesArray: TypeNames[], startIndex = 0): TypeNames { + public add(namesArray: TypeNames[], startIndex = 0): TypeNames { let newNames = new Set(this.names); let newDistance = this.distance; let newAlternativeNames = definedMap(this._alternativeNames, s => new Set(s)); @@ -143,6 +147,7 @@ export class RegularTypeNames extends TypeNames { if (newAlternativeNames === undefined) { newAlternativeNames = new Set(); } + setUnionInto(newAlternativeNames, other._alternativeNames); } @@ -165,32 +170,34 @@ export class RegularTypeNames extends TypeNames { setUnionInto(newNames, other.names); } } + return TypeNames.makeWithDistance(newNames, newAlternativeNames, newDistance); } - clearInferred(): TypeNames { + public clearInferred(): TypeNames { const newNames = this.areInferred ? new Set() : this.names; return TypeNames.makeWithDistance(newNames, new Set(), this.distance); } - get combinedName(): string { + public get combinedName(): string { return combineNames(this.names); } - get proposedNames(): ReadonlySet { + public get proposedNames(): ReadonlySet { const set = new Set([this.combinedName]); if (this._alternativeNames === undefined) { return set; } + setUnionInto(set, this._alternativeNames); return set; } - makeInferred(): TypeNames { + public makeInferred(): TypeNames { return TypeNames.makeWithDistance(this.names, this._alternativeNames, this.distance + 1); } - singularize(): TypeNames { + public singularize(): TypeNames { return TypeNames.makeWithDistance( setMap(this.names, pluralize.singular), definedMap(this._alternativeNames, an => setMap(an, pluralize.singular)), @@ -198,37 +205,39 @@ export class RegularTypeNames extends TypeNames { ); } - toString(): string { + public toString(): string { const inferred = this.areInferred ? `distance ${this.distance}` : "given"; const names = `${inferred} ${Array.from(this.names).join(",")}`; if (this._alternativeNames === undefined) { return names; } + return `${names} (${Array.from(this._alternativeNames).join(",")})`; } } export class TooManyTypeNames extends TypeNames { - readonly names: ReadonlySet; + public readonly names: ReadonlySet; - constructor(distance: number, name?: string) { + public constructor(distance: number, name?: string) { super(distance); if (name === undefined) { name = makeRandomName(); } + this.names = new Set([name]); } - get combinedName(): string { + public get combinedName(): string { return defined(iterableFirst(this.names)); } - get proposedNames(): ReadonlySet { + public get proposedNames(): ReadonlySet { return this.names; } - add(namesArray: TypeNames[], startIndex = 0): TypeNames { + public add(namesArray: TypeNames[], startIndex = 0): TypeNames { if (!this.areInferred) return this; for (let i = startIndex; i < namesArray.length; i++) { @@ -241,46 +250,47 @@ export class TooManyTypeNames extends TypeNames { return this; } - clearInferred(): TypeNames { + public clearInferred(): TypeNames { if (!this.areInferred) { return this; } + return TypeNames.makeWithDistance(new Set(), new Set(), this.distance); } - makeInferred(): TypeNames { + public makeInferred(): TypeNames { return new TooManyTypeNames(this.distance + 1, iterableFirst(this.names)); } - singularize(): TypeNames { + public singularize(): TypeNames { return this; } - toString(): string { + public toString(): string { return `too many ${this.combinedName}`; } } class TypeNamesTypeAttributeKind extends TypeAttributeKind { - constructor() { + public constructor() { super("names"); } - combine(namesArray: TypeNames[]): TypeNames { + public combine(namesArray: TypeNames[]): TypeNames { assert(namesArray.length > 0, "Can't combine zero type names"); return namesArray[0].add(namesArray, 1); } - makeInferred(tn: TypeNames): TypeNames { + public makeInferred(tn: TypeNames): TypeNames { return tn.makeInferred(); } - increaseDistance(tn: TypeNames): TypeNames { + public increaseDistance(tn: TypeNames): TypeNames { return tn.makeInferred(); } - stringify(tn: TypeNames): string { + public stringify(tn: TypeNames): string { return tn.toString(); } } @@ -308,5 +318,6 @@ export function makeNamesTypeAttributes(nameOrNames: NameOrNames, areNamesInferr } else { typeNames = nameOrNames as TypeNames; } + return namesTypeAttributeKind.makeAttributes(typeNames); } diff --git a/packages/quicktype-core/src/attributes/URIAttributes.ts b/packages/quicktype-core/src/attributes/URIAttributes.ts index 1f779708b..f2b5cb560 100644 --- a/packages/quicktype-core/src/attributes/URIAttributes.ts +++ b/packages/quicktype-core/src/attributes/URIAttributes.ts @@ -1,11 +1,12 @@ +import { setUnionManyInto } from "collection-utils"; import URI from "urijs"; -import { TypeAttributeKind, TypeAttributes, emptyTypeAttributes } from "./TypeAttributes"; -import { setUnionManyInto } from "collection-utils"; -import { JSONSchemaType, JSONSchemaAttributes, Ref } from "../input/JSONSchemaInput"; -import { JSONSchema } from "../input/JSONSchemaStore"; +import { type JSONSchemaAttributes, type JSONSchemaType, type Ref } from "../input/JSONSchemaInput"; +import { type JSONSchema } from "../input/JSONSchemaStore"; import { checkArray, checkString } from "../support/Support"; -import { Type } from "../Type"; +import { type Type } from "../Type"; + +import { TypeAttributeKind, type TypeAttributes, emptyTypeAttributes } from "./TypeAttributes"; const protocolsSchemaProperty = "qt-uri-protocols"; const extensionsSchemaProperty = "qt-uri-extensions"; @@ -14,31 +15,32 @@ const extensionsSchemaProperty = "qt-uri-extensions"; type URIAttributes = [ReadonlySet, ReadonlySet]; class URITypeAttributeKind extends TypeAttributeKind { - constructor() { + public constructor() { super("uriAttributes"); } - get inIdentity(): boolean { + public get inIdentity(): boolean { return true; } - combine(attrs: URIAttributes[]): URIAttributes { + public combine(attrs: URIAttributes[]): URIAttributes { const protocolSets = attrs.map(a => a[0]); const extensionSets = attrs.map(a => a[1]); return [setUnionManyInto(new Set(), protocolSets), setUnionManyInto(new Set(), extensionSets)]; } - makeInferred(_: URIAttributes): undefined { + public makeInferred(_: URIAttributes): undefined { return undefined; } - addToSchema(schema: { [name: string]: unknown }, t: Type, attrs: URIAttributes): void { + public addToSchema(schema: { [name: string]: unknown }, t: Type, attrs: URIAttributes): void { if (t.kind !== "string" && t.kind !== "uri") return; const [protocols, extensions] = attrs; if (protocols.size > 0) { schema[protocolsSchemaProperty] = Array.from(protocols).sort(); } + if (extensions.size > 0) { schema[extensionsSchemaProperty] = Array.from(extensions).sort(); } @@ -50,7 +52,7 @@ export const uriTypeAttributeKind: TypeAttributeKind = new URITyp const extensionRegex = /^.+(\.[^./\\]+)$/; function pathExtension(path: string): string | undefined { - const matches = path.match(extensionRegex); + const matches = extensionRegex.exec(path); if (matches === null) return undefined; return matches[1]; } diff --git a/packages/quicktype-core/src/index.ts b/packages/quicktype-core/src/index.ts index 67711c93d..fa1ea78be 100644 --- a/packages/quicktype-core/src/index.ts +++ b/packages/quicktype-core/src/index.ts @@ -1,6 +1,6 @@ export { - Options, - RendererOptions, + type Options, + type RendererOptions, getTargetLanguage, quicktypeMultiFile, quicktypeMultiFileSync, @@ -10,23 +10,23 @@ export { inferenceFlagNames, defaultInferenceFlags, inferenceFlagsObject, - InferenceFlags, - InferenceFlagName, - RunContext + type InferenceFlags, + type InferenceFlagName, + type RunContext } from "./Run"; -export { CompressedJSON, Value } from "./input/CompressedJSON"; -export { Input, InputData, JSONInput, JSONSourceData, jsonInputForTargetLanguage } from "./input/Inputs"; -export { JSONSchemaInput, JSONSchemaSourceData } from "./input/JSONSchemaInput"; -export { Ref, JSONSchemaType, JSONSchemaAttributes } from "./input/JSONSchemaInput"; -export { RenderContext } from "./Renderer"; -export { Option, OptionDefinition, getOptionValues, OptionValues } from "./RendererOptions"; -export { TargetLanguage, MultiFileRenderResult } from "./TargetLanguage"; +export { CompressedJSON, type Value } from "./input/CompressedJSON"; +export { type Input, InputData, JSONInput, type JSONSourceData, jsonInputForTargetLanguage } from "./input/Inputs"; +export { JSONSchemaInput, type JSONSchemaSourceData } from "./input/JSONSchemaInput"; +export { Ref, type JSONSchemaType, type JSONSchemaAttributes } from "./input/JSONSchemaInput"; +export type { RenderContext } from "./Renderer"; +export { Option, type OptionDefinition, getOptionValues, type OptionValues } from "./RendererOptions"; +export { TargetLanguage, type MultiFileRenderResult } from "./TargetLanguage"; export { all as defaultTargetLanguages, languageNamed } from "./language/All"; export { - MultiWord, - Sourcelike, - SerializedRenderResult, - Annotation, + type MultiWord, + type Sourcelike, + type SerializedRenderResult, + type Annotation, modifySource, singleWord, parenIfNeeded @@ -63,19 +63,21 @@ export { EnumType, MapType, UnionType, - TypeKind, + type TypeKind, ObjectType, - TransformedStringTypeKind, - PrimitiveStringTypeKind + type TransformedStringTypeKind, + type PrimitiveStringTypeKind } from "./Type"; export { getStream } from "./input/io/get-stream"; +// eslint-disable-next-line import/no-cycle export { readableFromFileOrURL, readFromFileOrURL } from "./input/io/NodeIO"; +// eslint-disable-next-line import/no-cycle export { FetchingJSONSchemaStore } from "./input/FetchingJSONSchemaStore"; -export { JSONSchemaStore, JSONSchema } from "./input/JSONSchemaStore"; +export { JSONSchemaStore, type JSONSchema } from "./input/JSONSchemaStore"; export { sourcesFromPostmanCollection } from "./input/PostmanCollection"; -export { TypeBuilder, StringTypeMapping } from "./TypeBuilder"; -export { TypeRef, derefTypeRef } from "./TypeGraph"; -export { TypeAttributeKind, TypeAttributes, emptyTypeAttributes } from "./attributes/TypeAttributes"; +export { TypeBuilder, type StringTypeMapping } from "./TypeBuilder"; +export { type TypeRef, derefTypeRef } from "./TypeGraph"; +export { TypeAttributeKind, type TypeAttributes, emptyTypeAttributes } from "./attributes/TypeAttributes"; export { TypeNames, makeNamesTypeAttributes, namesTypeAttributeKind } from "./attributes/TypeNames"; export { StringTypes } from "./attributes/StringTypes"; export { removeNullFromUnion, matchType, nullableFromUnion } from "./TypeUtils"; diff --git a/packages/quicktype-core/src/input/CompressedJSON.ts b/packages/quicktype-core/src/input/CompressedJSON.ts index 2bdb2cc85..15e6122d0 100644 --- a/packages/quicktype-core/src/input/CompressedJSON.ts +++ b/packages/quicktype-core/src/input/CompressedJSON.ts @@ -1,22 +1,26 @@ import { addHashCode, hashCodeInit, hashString } from "collection-utils"; -import { defined, panic, assert } from "../support/Support"; -import { TransformedStringTypeKind, isPrimitiveStringTypeKind, transformedStringTypeTargetTypeKindsMap } from "../Type"; -import { DateTimeRecognizer } from "../DateTime"; import { inferTransformedStringTypeKindForString } from "../attributes/StringTypes"; +import { type DateTimeRecognizer } from "../DateTime"; +import { assert, defined, panic } from "../support/Support"; +import { + type TransformedStringTypeKind, + isPrimitiveStringTypeKind, + transformedStringTypeTargetTypeKindsMap +} from "../Type"; export enum Tag { - Null, - False, - True, - Integer, - Double, - InternedString, - UninternedString, - Object, - Array, - StringFormat, - TransformedString + Null = 1, + False = 2, + True = 3, + Integer = 4, + Double = 5, + InternedString = 6, + UninternedString = 7, + Object = 8, + Array = 9, + StringFormat = 10, + TransformedString = 11 } export type Value = number; @@ -37,51 +41,59 @@ export function valueTag(v: Value): Tag { return v & TAG_MASK; } -type Context = { - currentObject: Value[] | undefined; +interface Context { currentArray: Value[] | undefined; currentKey: string | undefined; currentNumberIsDouble: boolean; -}; + currentObject: Value[] | undefined; +} export abstract class CompressedJSON { private _rootValue: Value | undefined; private _ctx: Context | undefined; + private _contextStack: Context[] = []; private _strings: string[] = []; + private _stringIndexes: { [str: string]: number } = {}; + private _objects: Value[][] = []; + private _arrays: Value[][] = []; - constructor(readonly dateTimeRecognizer: DateTimeRecognizer, readonly handleRefs: boolean) {} + public constructor( + public readonly dateTimeRecognizer: DateTimeRecognizer, + public readonly handleRefs: boolean + ) {} - abstract parse(input: T): Promise; + public abstract parse(input: T): Promise; - parseSync(_input: T): Value { + public parseSync(_input: T): Value { return panic("parseSync not implemented in CompressedJSON"); } - getStringForValue(v: Value): string { + public getStringForValue(v: Value): string { const tag = valueTag(v); assert(tag === Tag.InternedString || tag === Tag.TransformedString); return this._strings[getIndex(v, tag)]; } - getObjectForValue = (v: Value): Value[] => { + public getObjectForValue = (v: Value): Value[] => { return this._objects[getIndex(v, Tag.Object)]; }; - getArrayForValue = (v: Value): Value[] => { + public getArrayForValue = (v: Value): Value[] => { return this._arrays[getIndex(v, Tag.Array)]; }; - getStringFormatTypeKind(v: Value): TransformedStringTypeKind { + public getStringFormatTypeKind(v: Value): TransformedStringTypeKind { const kind = this._strings[getIndex(v, Tag.StringFormat)]; if (!isPrimitiveStringTypeKind(kind) || kind === "string") { return panic("Not a transformed string type kind"); } + return kind; } @@ -93,6 +105,7 @@ export abstract class CompressedJSON { if (Object.prototype.hasOwnProperty.call(this._stringIndexes, s)) { return this._stringIndexes[s]; } + const index = this._strings.length; this._strings.push(s); this._stringIndexes[s] = index; @@ -133,6 +146,7 @@ export abstract class CompressedJSON { if (this._ctx.currentKey === undefined) { return panic("Must have key and can't have string when committing"); } + this._ctx.currentObject.push(this.makeString(this._ctx.currentKey), value); this._ctx.currentKey = undefined; } else if (this._ctx.currentArray !== undefined) { @@ -173,6 +187,7 @@ export abstract class CompressedJSON { value = makeValue(Tag.UninternedString, 0); } } + this.commitValue(value); } @@ -181,6 +196,7 @@ export abstract class CompressedJSON { if (value === undefined) { return panic("Finished without root document"); } + assert(this._ctx === undefined && this._contextStack.length === 0, "Finished with contexts present"); this._rootValue = undefined; return value; @@ -190,6 +206,7 @@ export abstract class CompressedJSON { if (this._ctx !== undefined) { this._contextStack.push(this._ctx); } + this._ctx = { currentObject: undefined, currentArray: undefined, @@ -213,6 +230,7 @@ export abstract class CompressedJSON { if (obj === undefined) { return panic("Object ended but not started"); } + this.popContext(); this.commitValue(this.internObject(obj)); } @@ -227,6 +245,7 @@ export abstract class CompressedJSON { if (arr === undefined) { return panic("Array ended but not started"); } + this.popContext(); this.commitValue(this.internArray(arr)); } @@ -236,11 +255,11 @@ export abstract class CompressedJSON { this._ctx = this._contextStack.pop(); } - equals(other: any): boolean { + public equals(other: CompressedJSON): boolean { return this === other; } - hashCode(): number { + public hashCode(): number { let hashAccumulator = hashCodeInit; for (const s of this._strings) { hashAccumulator = addHashCode(hashAccumulator, hashString(s)); @@ -256,6 +275,7 @@ export abstract class CompressedJSON { hashAccumulator = addHashCode(hashAccumulator, v); } } + for (const o of this._arrays) { for (const v of o) { hashAccumulator = addHashCode(hashAccumulator, v); @@ -267,11 +287,11 @@ export abstract class CompressedJSON { } export class CompressedJSONFromString extends CompressedJSON { - async parse(input: string): Promise { + public async parse(input: string): Promise { return this.parseSync(input); } - parseSync(input: string): Value { + public parseSync(input: string): Value { const json = JSON.parse(input); this.process(json); return this.finish(); @@ -293,13 +313,15 @@ export class CompressedJSONFromString extends CompressedJSON { for (const v of json) { this.process(v); } + this.finishArray(); } else if (typeof json === "object") { this.pushObjectContext(); for (const key of Object.getOwnPropertyNames(json)) { this.setPropertyKey(key); - this.process((json as any)[key]); + this.process(json[key as keyof typeof json]); } + this.finishObject(); } else { return panic("Invalid JSON object"); diff --git a/packages/quicktype-core/src/input/FetchingJSONSchemaStore.ts b/packages/quicktype-core/src/input/FetchingJSONSchemaStore.ts index 08c6e0526..4e7c132f5 100644 --- a/packages/quicktype-core/src/input/FetchingJSONSchemaStore.ts +++ b/packages/quicktype-core/src/input/FetchingJSONSchemaStore.ts @@ -1,13 +1,15 @@ -import { JSONSchema, JSONSchemaStore } from "./JSONSchemaStore"; +// eslint-disable-next-line import/no-cycle import { parseJSON } from ".."; + import { readFromFileOrURL } from "./io/NodeIO"; +import { type JSONSchema, JSONSchemaStore } from "./JSONSchemaStore"; export class FetchingJSONSchemaStore extends JSONSchemaStore { - constructor(private readonly _httpHeaders?: string[]) { + public constructor(private readonly _httpHeaders?: string[]) { super(); } - async fetch(address: string): Promise { + public async fetch(address: string): Promise { // console.log(`Fetching ${address}`); return parseJSON(await readFromFileOrURL(address, this._httpHeaders), "JSON Schema", address); } diff --git a/packages/quicktype-core/src/input/Inference.ts b/packages/quicktype-core/src/input/Inference.ts index 9fdcea588..85c544c7b 100644 --- a/packages/quicktype-core/src/input/Inference.ts +++ b/packages/quicktype-core/src/input/Inference.ts @@ -1,30 +1,34 @@ -import { Value, Tag, valueTag, CompressedJSON } from "./CompressedJSON"; -import { assertNever, defined, panic, assert } from "../support/Support"; -import { TypeBuilder } from "../TypeBuilder"; -import { UnionBuilder, UnionAccumulator } from "../UnionBuilder"; +import { StringTypes, inferTransformedStringTypeKindForString } from "../attributes/StringTypes"; +import { type TypeAttributes, emptyTypeAttributes } from "../attributes/TypeAttributes"; +import { messageError } from "../Messages"; +import { assert, assertNever, defined, panic } from "../support/Support"; import { - ClassProperty, - transformedStringTypeTargetTypeKindsMap, - UnionType, + ArrayType, + type ClassProperty, ClassType, MapType, - ArrayType + UnionType, + transformedStringTypeTargetTypeKindsMap } from "../Type"; -import { TypeAttributes, emptyTypeAttributes } from "../attributes/TypeAttributes"; -import { StringTypes, inferTransformedStringTypeKindForString } from "../attributes/StringTypes"; -import { TypeRef, derefTypeRef } from "../TypeGraph"; -import { messageError } from "../Messages"; +import { type TypeBuilder } from "../TypeBuilder"; +import { type TypeRef, derefTypeRef } from "../TypeGraph"; import { nullableFromUnion } from "../TypeUtils"; +import { UnionAccumulator, UnionBuilder } from "../UnionBuilder"; + +import { type CompressedJSON, Tag, type Value, valueTag } from "./CompressedJSON"; // This should be the recursive type // Value[] | NestedValueArray[] // but TypeScript doesn't support that. +// FIXME: reactor this +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type NestedValueArray = any; function forEachArrayInNestedValueArray(va: NestedValueArray, f: (va: Value[]) => void): void { if (va.length === 0) { return; } + if (Array.isArray(va[0])) { for (const x of va) { forEachArrayInNestedValueArray(x, f); @@ -43,7 +47,7 @@ function forEachValueInNestedValueArray(va: NestedValueArray, f: (v: Value) => v } class InferenceUnionBuilder extends UnionBuilder { - constructor( + public constructor( typeBuilder: TypeBuilder, private readonly _typeInference: TypeInference, private readonly _fixed: boolean @@ -78,16 +82,16 @@ function canBeEnumCase(_s: string): boolean { export type Accumulator = UnionAccumulator; export class TypeInference { - private _refIntersections: [TypeRef, string[]][] | undefined; + private _refIntersections: Array<[TypeRef, string[]]> | undefined; - constructor( + public constructor( private readonly _cjson: CompressedJSON, private readonly _typeBuilder: TypeBuilder, private readonly _inferMaps: boolean, private readonly _inferEnums: boolean ) {} - addValuesToAccumulator(valueArray: NestedValueArray, accumulator: Accumulator): void { + private addValuesToAccumulator(valueArray: NestedValueArray, accumulator: Accumulator): void { forEachValueInNestedValueArray(valueArray, value => { const t = valueTag(value); switch (t) { @@ -115,6 +119,7 @@ export class TypeInference { } else { accumulator.addStringType("string", emptyTypeAttributes); } + break; case Tag.UninternedString: accumulator.addStringType("string", emptyTypeAttributes); @@ -134,26 +139,30 @@ export class TypeInference { ); break; } + case Tag.TransformedString: { const s = this._cjson.getStringForValue(value); const kind = inferTransformedStringTypeKindForString(s, this._cjson.dateTimeRecognizer); if (kind === undefined) { return panic("TransformedString does not have a kind"); } + const producer = defined(transformedStringTypeTargetTypeKindsMap.get(kind)).attributesProducer; if (producer === undefined) { return panic("TransformedString does not have attribute producer"); } + accumulator.addStringType("string", producer(s), new StringTypes(new Map(), new Set([kind]))); break; } + default: return assertNever(t); } }); } - inferType( + public inferType( typeAttributes: TypeAttributes, valueArray: NestedValueArray, fixed: boolean, @@ -167,6 +176,7 @@ export class TypeInference { if (!ref.startsWith("#/")) { return messageError("InferenceJSONReferenceNotRooted", { reference: ref }); } + const parts = ref.split("/").slice(1); const graph = this._typeBuilder.typeGraph; let tref = topLevel; @@ -178,33 +188,39 @@ export class TypeInference { // FIXME: handle unions return messageError("InferenceJSONReferenceToUnion", { reference: ref }); } + t = nullable; } + if (t instanceof ClassType) { const cp = t.getProperties().get(part); if (cp === undefined) { return messageError("InferenceJSONReferenceWrongProperty", { reference: ref }); } + tref = cp.typeRef; } else if (t instanceof MapType) { tref = t.values.typeRef; } else if (t instanceof ArrayType) { - if (part.match("^[0-9]+$") === null) { + if (/^[0-9]+$/.exec(part) === null) { return messageError("InferenceJSONReferenceInvalidArrayIndex", { reference: ref }); } + tref = t.items.typeRef; } else { return messageError("InferenceJSONReferenceWrongProperty", { reference: ref }); } } + return tref; } - inferTopLevelType(typeAttributes: TypeAttributes, valueArray: NestedValueArray, fixed: boolean): TypeRef { + public inferTopLevelType(typeAttributes: TypeAttributes, valueArray: NestedValueArray, fixed: boolean): TypeRef { assert(this._refIntersections === undefined, "Didn't reset ref intersections - nested invocations?"); if (this._cjson.handleRefs) { this._refIntersections = []; } + const topLevel = this.inferType(typeAttributes, valueArray, fixed); if (this._cjson.handleRefs) { for (const [tref, refs] of defined(this._refIntersections)) { @@ -214,16 +230,17 @@ export class TypeInference { this._refIntersections = undefined; } + return topLevel; } - accumulatorForArray(valueArray: NestedValueArray): Accumulator { + private accumulatorForArray(valueArray: NestedValueArray): Accumulator { const accumulator = new UnionAccumulator(true); this.addValuesToAccumulator(valueArray, accumulator); return accumulator; } - makeTypeFromAccumulator( + private makeTypeFromAccumulator( accumulator: Accumulator, typeAttributes: TypeAttributes, fixed: boolean, @@ -233,7 +250,7 @@ export class TypeInference { return unionBuilder.buildUnion(accumulator, false, typeAttributes, forwardingRef); } - inferClassType( + public inferClassType( typeAttributes: TypeAttributes, objects: NestedValueArray, fixed: boolean, @@ -250,12 +267,13 @@ export class TypeInference { propertyNames.push(key); propertyValues[key] = []; } + propertyValues[key].push(value); } }); if (this._cjson.handleRefs && propertyNames.length === 1 && propertyNames[0] === "$ref") { - const values = propertyValues["$ref"]; + const values = propertyValues.$ref; if (values.every(v => valueTag(v) === Tag.InternedString)) { const allRefs = values.map(v => this._cjson.getStringForValue(v)); // FIXME: Add is-ref attribute @@ -270,6 +288,7 @@ export class TypeInference { for (const key of propertyNames) { this.addValuesToAccumulator(propertyValues[key], accumulator); } + const values = this.makeTypeFromAccumulator(accumulator, emptyTypeAttributes, fixed); return this._typeBuilder.getMapType(typeAttributes, values, forwardingRef); } diff --git a/packages/quicktype-core/src/input/Inputs.ts b/packages/quicktype-core/src/input/Inputs.ts index 9ff8905fa..96d78756a 100644 --- a/packages/quicktype-core/src/input/Inputs.ts +++ b/packages/quicktype-core/src/input/Inputs.ts @@ -1,48 +1,53 @@ -import { iterableFirst, iterableFind, iterableSome, setFilterMap, withDefault, arrayMapSync } from "collection-utils"; +import { arrayMapSync, iterableFind, iterableFirst, iterableSome, setFilterMap, withDefault } from "collection-utils"; -import { Value, CompressedJSON, CompressedJSONFromString } from "./CompressedJSON"; -import { panic, errorMessage, defined } from "../support/Support"; -import { messageError } from "../Messages"; -import { TypeBuilder } from "../TypeBuilder"; -import { makeNamesTypeAttributes } from "../attributes/TypeNames"; import { descriptionTypeAttributeKind } from "../attributes/Description"; -import { TypeInference } from "./Inference"; -import { TargetLanguage } from "../TargetLanguage"; -import { RunContext } from "../Run"; +import { makeNamesTypeAttributes } from "../attributes/TypeNames"; +// eslint-disable-next-line import/no-cycle import { languageNamed } from "../language/All"; +import { messageError } from "../Messages"; +import { type RunContext } from "../Run"; +import { defined, errorMessage, panic } from "../support/Support"; +import { type TargetLanguage } from "../TargetLanguage"; +import { type TypeBuilder } from "../TypeBuilder"; -export interface Input { - readonly kind: string; - readonly needIR: boolean; - readonly needSchemaProcessing: boolean; - - addSource(source: T): Promise; - addSourceSync(source: T): void; - - singleStringSchemaSource(): string | undefined; +import { type CompressedJSON, CompressedJSONFromString, type Value } from "./CompressedJSON"; +import { TypeInference } from "./Inference"; - addTypes( +export interface Input { + addSource: (source: T) => Promise; + addSourceSync: (source: T) => void; + addTypes: ( ctx: RunContext, typeBuilder: TypeBuilder, inferMaps: boolean, inferEnums: boolean, fixedTopLevels: boolean - ): Promise; - addTypesSync( + ) => Promise; + + addTypesSync: ( ctx: RunContext, typeBuilder: TypeBuilder, inferMaps: boolean, inferEnums: boolean, fixedTopLevels: boolean - ): void; + ) => void; + readonly kind: string; + + readonly needIR: boolean; + + readonly needSchemaProcessing: boolean; + singleStringSchemaSource: () => string | undefined; } -type JSONTopLevel = { samples: Value[]; description: string | undefined }; +interface JSONTopLevel { + description: string | undefined; + samples: Value[]; +} export interface JSONSourceData { + description?: string; name: string; samples: T[]; - description?: string; } function messageParseError(name: string, description: string | undefined, e: unknown): never { @@ -54,13 +59,15 @@ function messageParseError(name: string, description: string | undefined, e: unk } export class JSONInput implements Input> { - readonly kind: string = "json"; - readonly needIR: boolean = true; - readonly needSchemaProcessing: boolean = false; + public readonly kind: string = "json"; + + public readonly needIR: boolean = true; + + public readonly needSchemaProcessing: boolean = false; private readonly _topLevels: Map = new Map(); - constructor(private readonly _compressedJSON: CompressedJSON) {} + public constructor(private readonly _compressedJSON: CompressedJSON) {} private addSample(topLevelName: string, sample: Value): void { let topLevel = this._topLevels.get(topLevelName); @@ -68,6 +75,7 @@ export class JSONInput implements Input> { topLevel = { samples: [], description: undefined }; this._topLevels.set(topLevelName, topLevel); } + topLevel.samples.push(sample); } @@ -76,6 +84,7 @@ export class JSONInput implements Input> { if (topLevel === undefined) { return panic("Trying to set description for a top-level that doesn't exist"); } + topLevel.description = description; } @@ -88,7 +97,7 @@ export class JSONInput implements Input> { } } - async addSource(source: JSONSourceData): Promise { + public async addSource(source: JSONSourceData): Promise { const { name, samples, description } = source; try { const values = await arrayMapSync(samples, async s => await this._compressedJSON.parse(s)); @@ -98,7 +107,7 @@ export class JSONInput implements Input> { } } - addSourceSync(source: JSONSourceData): void { + public addSourceSync(source: JSONSourceData): void { const { name, samples, description } = source; try { const values = samples.map(s => this._compressedJSON.parseSync(s)); @@ -108,21 +117,21 @@ export class JSONInput implements Input> { } } - singleStringSchemaSource(): undefined { + public singleStringSchemaSource(): undefined { return undefined; } - async addTypes( + public async addTypes( ctx: RunContext, typeBuilder: TypeBuilder, inferMaps: boolean, inferEnums: boolean, fixedTopLevels: boolean ): Promise { - return this.addTypesSync(ctx, typeBuilder, inferMaps, inferEnums, fixedTopLevels); + this.addTypesSync(ctx, typeBuilder, inferMaps, inferEnums, fixedTopLevels); } - addTypesSync( + public addTypesSync( _ctx: RunContext, typeBuilder: TypeBuilder, inferMaps: boolean, @@ -150,15 +159,17 @@ export function jsonInputForTargetLanguage( if (typeof targetLanguage === "string") { targetLanguage = defined(languageNamed(targetLanguage, languages)); } + const compressedJSON = new CompressedJSONFromString(targetLanguage.dateTimeRecognizer, handleJSONRefs); return new JSONInput(compressedJSON); } export class InputData { // FIXME: Make into a Map, indexed by kind. + // eslint-disable-next-line @typescript-eslint/no-explicit-any private _inputs: Set> = new Set(); - addInput(input: Input): void { + public addInput(input: Input): void { this._inputs = this._inputs.add(input); } @@ -168,20 +179,21 @@ export class InputData { input = makeInput(); this.addInput(input); } + return input; } - async addSource(kind: string, source: T, makeInput: () => Input): Promise { + public async addSource(kind: string, source: T, makeInput: () => Input): Promise { const input = this.getOrAddInput(kind, makeInput); await input.addSource(source); } - addSourceSync(kind: string, source: T, makeInput: () => Input): void { + public addSourceSync(kind: string, source: T, makeInput: () => Input): void { const input = this.getOrAddInput(kind, makeInput); input.addSourceSync(source); } - async addTypes( + public async addTypes( ctx: RunContext, typeBuilder: TypeBuilder, inferMaps: boolean, @@ -193,7 +205,7 @@ export class InputData { } } - addTypesSync( + public addTypesSync( ctx: RunContext, typeBuilder: TypeBuilder, inferMaps: boolean, @@ -205,19 +217,20 @@ export class InputData { } } - get needIR(): boolean { + public get needIR(): boolean { return iterableSome(this._inputs, i => i.needIR); } - get needSchemaProcessing(): boolean { + public get needSchemaProcessing(): boolean { return iterableSome(this._inputs, i => i.needSchemaProcessing); } - singleStringSchemaSource(): string | undefined { + public singleStringSchemaSource(): string | undefined { const schemaStrings = setFilterMap(this._inputs, i => i.singleStringSchemaSource()); if (schemaStrings.size > 1) { return panic("We have more than one input with a string schema source"); } + return iterableFirst(schemaStrings); } } diff --git a/packages/quicktype-core/src/input/JSONSchemaInput.ts b/packages/quicktype-core/src/input/JSONSchemaInput.ts index 8fc74e6dd..e000f7f40 100644 --- a/packages/quicktype-core/src/input/JSONSchemaInput.ts +++ b/packages/quicktype-core/src/input/JSONSchemaInput.ts @@ -1,72 +1,74 @@ -import URI from "urijs"; import { - setFilter, EqualityMap, - mapMap, - mapFromObject, - setSubtract, - mapFromIterable, - iterableFind, - mapSortBy, - mapMapSync, - mapMergeInto, - arrayMapSync, - arrayLast, + addHashCode, arrayGetFromEnd, - hashCodeOf, - hasOwnProperty, + arrayLast, + arrayMapSync, definedMap, - addHashCode, + // eslint-disable-next-line @typescript-eslint/no-redeclare + hasOwnProperty, + hashCodeOf, + hashString, + iterableFind, iterableFirst, - hashString + mapFromIterable, + mapFromObject, + mapMap, + mapMapSync, + mapMergeInto, + mapSortBy, + setFilter, + setSubtract } from "collection-utils"; +import URI from "urijs"; +import { accessorNamesAttributeProducer } from "../attributes/AccessorNames"; import { - PrimitiveTypeKind, - TransformedStringTypeKind, - transformedStringTypeTargetTypeKindsMap, - isNumberTypeKind -} from "../Type"; -import { panic, assertNever, StringMap, assert, defined, parseJSON } from "../support/Support"; -import { TypeBuilder } from "../TypeBuilder"; -import { TypeNames } from "../attributes/TypeNames"; -import { makeNamesTypeAttributes, modifyTypeNames, singularizeTypeNames } from "../attributes/TypeNames"; + minMaxAttributeProducer, + minMaxLengthAttributeProducer, + patternAttributeProducer +} from "../attributes/Constraints"; +// eslint-disable-next-line import/no-cycle +import { descriptionAttributeProducer } from "../attributes/Description"; +import { enumValuesAttributeProducer } from "../attributes/EnumValues"; +import { StringTypes } from "../attributes/StringTypes"; import { - TypeAttributes, - makeTypeAttributesInferred, + type TypeAttributes, + combineTypeAttributes, emptyTypeAttributes, - combineTypeAttributes + makeTypeAttributesInferred } from "../attributes/TypeAttributes"; -import { JSONSchema, JSONSchemaStore } from "./JSONSchemaStore"; +import { TypeNames, makeNamesTypeAttributes, modifyTypeNames, singularizeTypeNames } from "../attributes/TypeNames"; +import { uriSchemaAttributesProducer } from "../attributes/URIAttributes"; import { messageAssert, messageError } from "../Messages"; -import { StringTypes } from "../attributes/StringTypes"; - -import { TypeRef } from "../TypeGraph"; import { type RunContext } from "../Run"; +import { type StringMap, assert, assertNever, defined, panic, parseJSON } from "../support/Support"; +import { + type PrimitiveTypeKind, + type TransformedStringTypeKind, + isNumberTypeKind, + transformedStringTypeTargetTypeKindsMap +} from "../Type"; +import { type TypeBuilder } from "../TypeBuilder"; +import { type TypeRef } from "../TypeGraph"; + import { type Input } from "./Inputs"; +import { type JSONSchema, JSONSchemaStore } from "./JSONSchemaStore"; // There's a cyclic import here. Ignoring now because it requires a large refactor. // skipcq: JS-E1008 -import { descriptionAttributeProducer } from "../attributes/Description"; - -import { accessorNamesAttributeProducer } from "../attributes/AccessorNames"; -import { enumValuesAttributeProducer } from "../attributes/EnumValues"; -import { minMaxAttributeProducer } from "../attributes/Constraints"; -import { minMaxLengthAttributeProducer } from "../attributes/Constraints"; -import { patternAttributeProducer } from "../attributes/Constraints"; -import { uriSchemaAttributesProducer } from "../attributes/URIAttributes"; export enum PathElementKind { - Root, - KeyOrIndex, - Type, - Object + Root = 1, + KeyOrIndex = 2, + Type = 3, + Object = 4 } export type PathElement = | { kind: PathElementKind.Root } - | { kind: PathElementKind.KeyOrIndex; key: string } - | { kind: PathElementKind.Type; index: number } + | { key: string; kind: PathElementKind.KeyOrIndex } + | { index: number; kind: PathElementKind.Type } | { kind: PathElementKind.Object }; function keyOrIndex(pe: PathElement): string | undefined { @@ -76,38 +78,43 @@ function keyOrIndex(pe: PathElement): string | undefined { function pathElementEquals(a: PathElement, b: PathElement): boolean { if (a.kind !== b.kind) return false; - switch (a.kind) { - case PathElementKind.Type: - return a.index === (b as any).index; - case PathElementKind.KeyOrIndex: - return a.key === (b as any).key; - default: - return true; + + if (a.kind === PathElementKind.Type && b.kind === PathElementKind.Type) { + return a.index === b.index; + } + + if (a.kind === PathElementKind.KeyOrIndex && b.kind === PathElementKind.KeyOrIndex) { + return a.key === b.key; } + + return true; } function withRef(refOrLoc: Ref | (() => Ref) | Location): { ref: Ref }; function withRef(refOrLoc: Ref | (() => Ref) | Location, props?: T): T & { ref: Ref }; -function withRef(refOrLoc: Ref | (() => Ref) | Location, props?: T): any { +function withRef(refOrLoc: Ref | (() => Ref) | Location, props?: T): unknown { const ref = typeof refOrLoc === "function" ? refOrLoc() : refOrLoc instanceof Ref ? refOrLoc : refOrLoc.canonicalRef; - return Object.assign({ ref }, props === undefined ? {} : props); + return Object.assign({ ref }, props ?? {}); } -function checkJSONSchemaObject(x: any, refOrLoc: Ref | (() => Ref)): StringMap { +function checkJSONSchemaObject(x: unknown, refOrLoc: Ref | (() => Ref)): StringMap { if (Array.isArray(x)) { return messageError("SchemaArrayIsInvalidSchema", withRef(refOrLoc)); } + if (x === null) { return messageError("SchemaNullIsInvalidSchema", withRef(refOrLoc)); } + if (typeof x !== "object") { return messageError("SchemaInvalidJSONSchemaType", withRef(refOrLoc, { type: typeof x })); } + return x; } -function checkJSONSchema(x: any, refOrLoc: Ref | (() => Ref)): JSONSchema { +function checkJSONSchema(x: unknown, refOrLoc: Ref | (() => Ref)): JSONSchema { if (typeof x === "boolean") return x; return checkJSONSchemaObject(x, refOrLoc); } @@ -123,16 +130,17 @@ function normalizeURI(uri: string | URI): URI { if (typeof uri === "string") { uri = new URI(uri); } + return new URI(URI.decode(uri.clone().normalize().toString())); } export class Ref { - static root(address: string | undefined): Ref { + public static root(address: string | undefined): Ref { const uri = definedMap(address, a => new URI(a)); return new Ref(uri, []); } - private static parsePath(path: string): ReadonlyArray { + private static parsePath(path: string): readonly PathElement[] { const elements: PathElement[] = []; if (path.startsWith("/")) { @@ -142,14 +150,13 @@ export class Ref { if (path !== "") { const parts = path.split("/"); - for (let i = 0; i < parts.length; i++) { - elements.push({ kind: PathElementKind.KeyOrIndex, key: parts[i] }); - } + parts.forEach(part => elements.push({ kind: PathElementKind.KeyOrIndex, key: part })); } + return elements; } - static parseURI(uri: URI, destroyURI = false): Ref { + public static parseURI(uri: URI, destroyURI = false): Ref { if (!destroyURI) { uri = uri.clone(); } @@ -159,19 +166,20 @@ export class Ref { if ((uri.host() !== "" || uri.filename() !== "") && path === "") { path = "/"; } + const elements = Ref.parsePath(path); return new Ref(uri, elements); } - static parse(ref: string): Ref { + public static parse(ref: string): Ref { return Ref.parseURI(new URI(ref), true); } public addressURI: URI | undefined; - constructor( + public constructor( addressURI: URI | undefined, - readonly path: ReadonlyArray + public readonly path: readonly PathElement[] ) { if (addressURI !== undefined) { assert(addressURI.fragment() === "", `Ref URI with fragment is not allowed: ${addressURI.toString()}`); @@ -181,15 +189,15 @@ export class Ref { } } - get hasAddress(): boolean { + public get hasAddress(): boolean { return this.addressURI !== undefined; } - get address(): string { + public get address(): string { return defined(this.addressURI).toString(); } - get isRoot(): boolean { + public get isRoot(): boolean { return this.path.length === 1 && this.path[0].kind === PathElementKind.Root; } @@ -199,31 +207,34 @@ export class Ref { return new Ref(this.addressURI, newPath); } - push(...keys: string[]): Ref { + public push(...keys: string[]): Ref { + // eslint-disable-next-line @typescript-eslint/no-this-alias let ref: Ref = this; for (const key of keys) { ref = ref.pushElement({ kind: PathElementKind.KeyOrIndex, key }); } + return ref; } - pushObject(): Ref { + public pushObject(): Ref { return this.pushElement({ kind: PathElementKind.Object }); } - pushType(index: number): Ref { + public pushType(index: number): Ref { return this.pushElement({ kind: PathElementKind.Type, index }); } - resolveAgainst(base: Ref | undefined): Ref { + public resolveAgainst(base: Ref | undefined): Ref { let addressURI = this.addressURI; - if (base !== undefined && base.addressURI !== undefined) { + if (base?.addressURI !== undefined) { addressURI = addressURI === undefined ? base.addressURI : addressURI.absoluteTo(base.addressURI); } + return new Ref(addressURI, this.path); } - get name(): string { + public get name(): string { const path = Array.from(this.path); for (;;) { @@ -234,9 +245,11 @@ export class Ref { if (name.length > suffix.length + 1) { name = name.slice(0, name.length - suffix.length - 1); } + if (name === "") { return "Something"; } + return name; } @@ -245,6 +258,7 @@ export class Ref { if (numberRegexp.test(e.key)) { return e.key; } + break; case PathElementKind.Type: case PathElementKind.Object: @@ -255,14 +269,14 @@ export class Ref { } } - get definitionName(): string | undefined { + public get definitionName(): string | undefined { const pe = arrayGetFromEnd(this.path, 2); if (pe === undefined) return undefined; if (keyOrIndex(pe) === "definitions") return keyOrIndex(defined(arrayLast(this.path))); return undefined; } - toString(): string { + public toString(): string { function elementToString(e: PathElement): string { switch (e.kind) { case PathElementKind.Root: @@ -277,16 +291,18 @@ export class Ref { return assertNever(e); } } + const address = this.addressURI === undefined ? "" : this.addressURI.toString(); return address + "#" + this.path.map(elementToString).join("/"); } - private lookup(local: any, path: ReadonlyArray, root: JSONSchema): JSONSchema { - const refMaker = () => new Ref(this.addressURI, path); + private lookup(local: unknown, path: readonly PathElement[], root: JSONSchema): JSONSchema { + const refMaker = (): Ref => new Ref(this.addressURI, path); const first = path[0]; if (first === undefined) { return checkJSONSchema(local, refMaker); } + const rest = path.slice(1); switch (first.kind) { case PathElementKind.Root: @@ -297,17 +313,21 @@ export class Ref { if (!/^\d+$/.test(key)) { return messageError("SchemaCannotIndexArrayWithNonNumber", withRef(refMaker, { actual: key })); } + const index = parseInt(first.key, 10); if (index >= local.length) { return messageError("SchemaIndexNotInArray", withRef(refMaker, { index })); } + return this.lookup(local[index], rest, root); } else { if (!hasOwnProperty(local, key)) { return messageError("SchemaKeyNotInObject", withRef(refMaker, { key })); } + return this.lookup(checkJSONSchemaObject(local, refMaker)[first.key], rest, root); } + case PathElementKind.Type: return panic('Cannot look up path that indexes "type"'); case PathElementKind.Object: @@ -317,26 +337,28 @@ export class Ref { } } - lookupRef(root: JSONSchema): JSONSchema { + public lookupRef(root: JSONSchema): JSONSchema { return this.lookup(root, this.path, root); } - equals(other: any): boolean { + public equals(other: R): boolean { if (!(other instanceof Ref)) return false; if (this.addressURI !== undefined && other.addressURI !== undefined) { if (!this.addressURI.equals(other.addressURI)) return false; } else { if ((this.addressURI === undefined) !== (other.addressURI === undefined)) return false; } + const l = this.path.length; if (l !== other.path.length) return false; for (let i = 0; i < l; i++) { if (!pathElementEquals(this.path[i], other.path[i])) return false; } + return true; } - hashCode(): number { + public hashCode(): number { let acc = hashCodeOf(definedMap(this.addressURI, u => u.toString())); for (const pe of this.path) { acc = addHashCode(acc, pe.kind); @@ -351,84 +373,94 @@ export class Ref { break; } } + return acc; } } class Location { public readonly canonicalRef: Ref; + public readonly virtualRef: Ref; - constructor( + public constructor( canonicalRef: Ref, virtualRef?: Ref, - readonly haveID: boolean = false + public readonly haveID: boolean = false ) { this.canonicalRef = canonicalRef; - this.virtualRef = virtualRef !== undefined ? virtualRef : canonicalRef; + this.virtualRef = virtualRef ?? canonicalRef; } - updateWithID(id: any) { + public updateWithID(id: string | unknown): Location { if (typeof id !== "string") return this; const parsed = Ref.parse(id); const virtual = this.haveID ? parsed.resolveAgainst(this.virtualRef) : parsed; if (!this.haveID) { messageAssert(virtual.hasAddress, "SchemaIDMustHaveAddress", withRef(this, { id })); } + return new Location(this.canonicalRef, virtual, true); } - push(...keys: string[]): Location { + public push(...keys: string[]): Location { return new Location(this.canonicalRef.push(...keys), this.virtualRef.push(...keys), this.haveID); } - pushObject(): Location { + public pushObject(): Location { return new Location(this.canonicalRef.pushObject(), this.virtualRef.pushObject(), this.haveID); } - pushType(index: number): Location { + public pushType(index: number): Location { return new Location(this.canonicalRef.pushType(index), this.virtualRef.pushType(index), this.haveID); } - toString(): string { + public toString(): string { return `${this.virtualRef.toString()} (${this.canonicalRef.toString()})`; } } class Canonizer { private readonly _map = new EqualityMap(); + private readonly _schemaAddressesAdded = new Set(); - constructor(private readonly _ctx: RunContext) {} + public constructor(private readonly _ctx: RunContext) {} - private addIDs(schema: any, loc: Location) { + private addIDs(schema: unknown, loc: Location): void { if (schema === null) return; if (Array.isArray(schema)) { for (let i = 0; i < schema.length; i++) { this.addIDs(schema[i], loc.push(i.toString())); } + return; } + if (typeof schema !== "object") { return; } + const locWithoutID = loc; - const maybeID = schema["$id"]; + const maybeID = "$id" in schema ? schema.$id : undefined; if (typeof maybeID === "string") { loc = loc.updateWithID(maybeID); } + if (loc.haveID) { if (this._ctx.debugPrintSchemaResolving) { console.log(`adding mapping ${loc.toString()}`); } + this._map.set(loc.virtualRef, locWithoutID); } + for (const property of Object.getOwnPropertyNames(schema)) { - this.addIDs(schema[property], loc.push(property)); + this.addIDs(schema[property as keyof typeof schema], loc.push(property)); } } - addSchema(schema: any, address: string): boolean { + public addSchema(schema: unknown, address: string): boolean { if (this._schemaAddressesAdded.has(address)) return false; this.addIDs(schema, new Location(Ref.root(address), Ref.root(undefined))); @@ -437,19 +469,20 @@ class Canonizer { } // Returns: Canonical ref - canonize(base: Location, ref: Ref): Location { + public canonize(base: Location, ref: Ref): Location { const virtual = ref.resolveAgainst(base.virtualRef); const loc = this._map.get(virtual); if (loc !== undefined) { return loc; } + const canonicalRef = virtual.addressURI === undefined ? new Ref(base.canonicalRef.addressURI, virtual.path) : virtual; return new Location(canonicalRef, new Ref(undefined, virtual.path)); } } -function checkTypeList(typeOrTypes: any, loc: Location): ReadonlySet { +function checkTypeList(typeOrTypes: string | string[], loc: Location): ReadonlySet { let set: Set; if (typeof typeOrTypes === "string") { set = new Set([typeOrTypes]); @@ -459,30 +492,36 @@ function checkTypeList(typeOrTypes: any, loc: Location): ReadonlySet { if (typeof t !== "string") { return messageError("SchemaTypeElementMustBeString", withRef(loc, { element: t })); } + arr.push(t); } + set = new Set(arr); } else { return messageError("SchemaTypeMustBeStringOrStringArray", withRef(loc, { actual: typeOrTypes })); } + messageAssert(set.size > 0, "SchemaNoTypeSpecified", withRef(loc)); const validTypes = ["null", "boolean", "object", "array", "number", "string", "integer"]; - const maybeInvalid = iterableFind(set, s => validTypes.indexOf(s) < 0); + const maybeInvalid = iterableFind(set, s => !validTypes.includes(s)); if (maybeInvalid !== undefined) { return messageError("SchemaInvalidType", withRef(loc, { type: maybeInvalid })); } + return set; } -function checkRequiredArray(arr: any, loc: Location): string[] { +function checkRequiredArray(arr: string[], loc: Location): string[] { if (!Array.isArray(arr)) { return messageError("SchemaRequiredMustBeStringOrStringArray", withRef(loc, { actual: arr })); } + for (const e of arr) { if (typeof e !== "string") { return messageError("SchemaRequiredElementMustBeString", withRef(loc, { element: e })); } } + return arr; } @@ -499,14 +538,14 @@ export type JSONSchemaType = keyof typeof schemaTypeDict; const schemaTypes = Object.getOwnPropertyNames(schemaTypeDict) as JSONSchemaType[]; -export type JSONSchemaAttributes = { - forType?: TypeAttributes; - forUnion?: TypeAttributes; - forObject?: TypeAttributes; +export interface JSONSchemaAttributes { + forCases?: TypeAttributes[]; forNumber?: TypeAttributes; + forObject?: TypeAttributes; forString?: TypeAttributes; - forCases?: TypeAttributes[]; -}; + forType?: TypeAttributes; + forUnion?: TypeAttributes; +} export type JSONSchemaAttributeProducer = ( schema: JSONSchema, canonicalRef: Ref, @@ -532,7 +571,7 @@ function schemaFetchError(base: Location | undefined, address: string): never { } class Resolver { - constructor( + public constructor( private readonly _ctx: RunContext, private readonly _store: JSONSchemaStore, private readonly _canonizer: Canonizer @@ -574,12 +613,13 @@ class Resolver { lookupLoc.haveID ); } + return [lookupLoc.canonicalRef.lookupRef(schema), lookupLoc]; } } } - async resolveVirtualRef(base: Location, virtualRef: Ref): Promise<[JSONSchema, Location]> { + public async resolveVirtualRef(base: Location, virtualRef: Ref): Promise<[JSONSchema, Location]> { if (this._ctx.debugPrintSchemaResolving) { console.log(`resolving ${virtualRef.toString()} relative to ${base.toString()}`); } @@ -592,6 +632,7 @@ class Resolver { if (this._ctx.debugPrintSchemaResolving) { console.log(`resolved to ${result[1].toString()}`); } + return [schema, result[1]]; } @@ -606,13 +647,14 @@ class Resolver { if (this._ctx.debugPrintSchemaResolving) { console.log(`resolved to ${result[1].toString()}`); } + return [schema, result[1]]; } return schemaFetchError(base, virtualRef.address); } - async resolveTopLevelRef(ref: Ref): Promise<[JSONSchema, Location]> { + public async resolveTopLevelRef(ref: Ref): Promise<[JSONSchema, Location]> { return await this.resolveVirtualRef(new Location(new Ref(ref.addressURI, [])), new Ref(undefined, ref.path)); } } @@ -630,6 +672,7 @@ async function addTypesInSchema( if (maybeRef !== undefined) { assert(maybeRef === t, "Trying to set path again to different type"); } + typeForCanonicalRef.set(loc.canonicalRef, t); } @@ -638,8 +681,8 @@ async function addTypesInSchema( attributes: TypeAttributes, properties: StringMap, requiredArray: string[], - additionalProperties: any, - sortKey: (k: string) => number | string = (k: string) => k.toLowerCase() + additionalProperties: unknown, + sortKey: (k: string) => number | string = (k: string): string => k.toLowerCase() ): Promise { const required = new Set(requiredArray); const propertiesMap = mapSortBy(mapFromObject(properties), (_, k) => sortKey(k)); @@ -666,6 +709,7 @@ async function addTypesInSchema( singularizeTypeNames(attributes) ); } + const additionalRequired = setSubtract(required, props.keys()); if (additionalRequired.size > 0) { const t = additionalPropertiesType; @@ -678,6 +722,7 @@ async function addTypesInSchema( ); mapMergeInto(props, additionalProps); } + return typeBuilder.getUniqueObjectType(attributes, props, additionalPropertiesType); } @@ -690,25 +735,28 @@ async function addTypesInSchema( if (typeSet !== undefined && !typeSet.has(name)) { return false; } + if (enumArray !== undefined) { - let predicate: (x: any) => boolean; + let predicate: (x: unknown) => boolean; switch (name) { case "null": - predicate = (x: any) => x === null; + predicate = (x): x is null => x === null; break; case "integer": - predicate = (x: any) => typeof x === "number" && x === Math.floor(x); + predicate = (x): x is number => typeof x === "number" && x === Math.floor(x); break; default: - predicate = (x: any) => typeof x === name; + predicate = (x): x is typeof name => typeof x === name; break; } return enumArray.find(predicate) !== undefined; } + if (isConst) { return name === (schema.type ?? typeof schema.const); } + return true; } @@ -729,10 +777,12 @@ async function addTypesInSchema( if (newAttributes === undefined) continue; attributes.push(newAttributes); } + if (cases === undefined) { producedAttributesForNoCases = attributes; } } + for (const a of attributes) { f(a); } @@ -764,11 +814,13 @@ async function addTypesInSchema( }) ); } + return modifyTypeNames(attributes, maybeTypeNames => { const typeNames = defined(maybeTypeNames); if (!typeNames.areInferred) { return typeNames; } + let title = schema.title; if (typeof title !== "string") { title = loc.canonicalRef.definitionName; @@ -813,6 +865,7 @@ async function addTypesInSchema( } else { itemType = typeBuilder.getPrimitiveType("any"); } + typeBuilder.addAttributes(itemType, singularAttributes); return typeBuilder.getArrayType(emptyTypeAttributes, itemType); } @@ -834,7 +887,7 @@ async function addTypesInSchema( // In Schema Draft 3, `required` is `true` on a property that's required. for (const p of Object.getOwnPropertyNames(properties)) { - if (properties[p].required === true && required.indexOf(p) < 0) { + if (properties[p].required === true && !required.includes(p)) { required.push(p); } } @@ -856,7 +909,7 @@ async function addTypesInSchema( combineProducedAttributes(({ forObject }) => forObject) ); const order = schema.quicktypePropertyOrder ? schema.quicktypePropertyOrder : []; - const orderKey = (propertyName: string) => { + const orderKey = (propertyName: string): string => { // use the index of the order array const index = order.indexOf(propertyName); // if no index then use the property name @@ -866,12 +919,12 @@ async function addTypesInSchema( return await makeObject(loc, objectAttributes, properties, required, additionalProperties, orderKey); } - async function makeTypesFromCases(cases: any, kind: string): Promise { + async function makeTypesFromCases(cases: unknown[], kind: string): Promise { const kindLoc = loc.push(kind); if (!Array.isArray(cases)) { return messageError("SchemaSetOperationCasesIsNotArray", withRef(kindLoc, { operation: kind, cases })); } - // FIXME: This cast shouldn't be necessary, but TypeScript forces our hand. + return await arrayMapSync(cases, async (t, index) => { const caseLoc = kindLoc.push(index.toString()); return await toType( @@ -885,7 +938,7 @@ async function addTypesInSchema( const intersectionType = typeBuilder.getUniqueIntersectionType(typeAttributes, undefined); setTypeForLocation(loc, intersectionType); - async function convertOneOrAnyOf(cases: any, kind: string): Promise { + async function convertOneOrAnyOf(cases: unknown[], kind: string): Promise { const typeRefs = await makeTypesFromCases(cases, kind); let unionAttributes = makeTypeAttributesInferred(typeAttributes); if (kind === "oneOf") { @@ -893,9 +946,11 @@ async function addTypesInSchema( if (forType !== undefined) { typeBuilder.addAttributes(intersectionType, forType); } + if (forUnion !== undefined) { unionAttributes = combineTypeAttributes("union", unionAttributes, forUnion); } + if (forCases !== undefined) { assert( forCases.length === typeRefs.length, @@ -907,6 +962,7 @@ async function addTypesInSchema( } }); } + const unionType = typeBuilder.getUniqueUnionType(unionAttributes, undefined); typeBuilder.setSetOperationMembers(unionType, new Set(typeRefs)); return unionType; @@ -917,7 +973,7 @@ async function addTypesInSchema( const needStringEnum = includedTypes.has("string") && enumArray !== undefined && - enumArray.find((x: any) => typeof x === "string") !== undefined; + enumArray.find(x => typeof x === "string") !== undefined; const needUnion = typeSet !== undefined || schema.properties !== undefined || @@ -939,7 +995,7 @@ async function addTypesInSchema( ["number", "double"], ["integer", "integer"], ["boolean", "bool"] - ] as [JSONSchemaType, PrimitiveTypeKind][]) { + ] as Array<[JSONSchemaType, PrimitiveTypeKind]>) { if (!includedTypes.has(name)) continue; const attributes = isNumberTypeKind(kind) ? numberAttributes : undefined; @@ -953,9 +1009,7 @@ async function addTypesInSchema( ); if (needStringEnum || isConst) { - const cases = isConst - ? [schema.const] - : ((enumArray as any[]).filter(x => typeof x === "string") as string[]); + const cases = isConst ? [schema.const] : enumArray?.filter(x => typeof x === "string") ?? []; unionTypes.push(typeBuilder.getStringType(stringAttributes, StringTypes.fromCases(cases))); } else if (includedTypes.has("string")) { unionTypes.push(makeStringType(stringAttributes)); @@ -964,6 +1018,7 @@ async function addTypesInSchema( if (includeArray) { unionTypes.push(await makeArrayType()); } + if (includeObject) { unionTypes.push(await makeObjectType()); } @@ -975,6 +1030,7 @@ async function addTypesInSchema( if (typeof schema.$ref !== "string") { return messageError("SchemaRefMustBeString", withRef(loc, { actual: typeof schema.$ref })); } + const virtualRef = Ref.parse(schema.$ref); const [target, newLoc] = await resolver.resolveVirtualRef(loc, virtualRef); const attributes = modifyTypeNames(typeAttributes, tn => { @@ -987,9 +1043,11 @@ async function addTypesInSchema( if (schema.allOf !== undefined) { types.push(...(await makeTypesFromCases(schema.allOf, "allOf"))); } + if (schema.oneOf !== undefined) { types.push(await convertOneOrAnyOf(schema.oneOf, "oneOf")); } + if (schema.anyOf !== undefined) { types.push(await convertOneOrAnyOf(schema.anyOf, "anyOf")); } @@ -1011,7 +1069,7 @@ async function addTypesInSchema( messageAssert(schema === true, "SchemaFalseNotSupported", withRef(loc)); result = typeBuilder.getPrimitiveType("any"); } else { - loc = loc.updateWithID(schema["$id"]); + loc = loc.updateWithID(schema.$id); result = await convertToType(schema, loc, typeAttributes); } @@ -1037,6 +1095,7 @@ function removeExtension(fn: string): string { } } } + return fn; } @@ -1048,14 +1107,17 @@ function nameFromURI(uri: URI): string | undefined { if (components[len - 1] !== "") { return removeExtension(components[len - 1]); } + if (len > 1 && components[len - 2] !== "") { return removeExtension(components[len - 2]); } } + const filename = uri.filename(); if (filename !== "") { return removeExtension(filename); } + return messageError("DriverCannotInferNameForSchema", { uri: uri.toString() }); } @@ -1069,6 +1131,7 @@ async function refsInSchemaForURI( if (propertiesAreTypes) { uri = uri.clone().fragment(fragment.slice(0, -1)); } + const ref = Ref.parseURI(uri); if (ref.isRoot) { propertiesAreTypes = false; @@ -1080,6 +1143,7 @@ async function refsInSchemaForURI( if (typeof schema !== "object") { return messageError("SchemaCannotGetTypesFromBoolean", { ref: ref.toString() }); } + return mapMap(mapFromObject(schema), (_, name) => ref.push(name)); } else { let name: string; @@ -1087,56 +1151,61 @@ async function refsInSchemaForURI( name = schema.title; } else { const maybeName = nameFromURI(uri); - name = maybeName !== undefined ? maybeName : defaultName; + name = maybeName ?? defaultName; } + return [name, ref]; } } class InputJSONSchemaStore extends JSONSchemaStore { - constructor( + public constructor( private readonly _inputs: Map, private readonly _delegate?: JSONSchemaStore ) { super(); } - async fetch(address: string): Promise { + public async fetch(address: string): Promise { const maybeInput = this._inputs.get(address); if (maybeInput !== undefined) { return checkJSONSchema(parseJSON(maybeInput, "JSON Schema", address), () => Ref.root(address)); } + if (this._delegate === undefined) { return panic(`Schema URI ${address} requested, but no store given`); } + return await this._delegate.fetch(address); } } export interface JSONSchemaSourceData { + isConverted?: boolean; name: string; - uris?: string[]; schema?: string; - isConverted?: boolean; + uris?: string[]; } export class JSONSchemaInput implements Input { - readonly kind: string = "schema"; - readonly needSchemaProcessing: boolean = true; + public readonly kind: string = "schema"; + + public readonly needSchemaProcessing: boolean = true; private readonly _attributeProducers: JSONSchemaAttributeProducer[]; private readonly _schemaInputs: Map = new Map(); - private _schemaSources: [URI, JSONSchemaSourceData][] = []; + + private _schemaSources: Array<[URI, JSONSchemaSourceData]> = []; private readonly _topLevels: Map = new Map(); private _needIR = false; - constructor( + public constructor( private _schemaStore: JSONSchemaStore | undefined, additionalAttributeProducers: JSONSchemaAttributeProducer[] = [], - private readonly _additionalSchemaAddresses: ReadonlyArray = [] + private readonly _additionalSchemaAddresses: readonly string[] = [] ) { this._attributeProducers = [ descriptionAttributeProducer, @@ -1149,15 +1218,15 @@ export class JSONSchemaInput implements Input { ].concat(additionalAttributeProducers); } - get needIR(): boolean { + public get needIR(): boolean { return this._needIR; } - addTopLevel(name: string, ref: Ref): void { + public addTopLevel(name: string, ref: Ref): void { this._topLevels.set(name, ref); } - async addTypes(ctx: RunContext, typeBuilder: TypeBuilder): Promise { + public async addTypes(ctx: RunContext, typeBuilder: TypeBuilder): Promise { if (this._schemaSources.length === 0) return; let maybeSchemaStore = this._schemaStore; @@ -1168,6 +1237,7 @@ export class JSONSchemaInput implements Input { } else { maybeSchemaStore = this._schemaStore = new InputJSONSchemaStore(this._schemaInputs, maybeSchemaStore); } + const schemaStore = maybeSchemaStore; const canonizer = new Canonizer(ctx); @@ -1176,6 +1246,7 @@ export class JSONSchemaInput implements Input { if (schema === undefined) { return messageError("SchemaFetchErrorAdditional", { address }); } + canonizer.addSchema(schema, address); } @@ -1192,6 +1263,7 @@ export class JSONSchemaInput implements Input { } else { name = refs[0]; } + this.addTopLevel(name, refs[1]); } else { for (const [refName, ref] of refs) { @@ -1203,15 +1275,15 @@ export class JSONSchemaInput implements Input { await addTypesInSchema(resolver, typeBuilder, this._topLevels, this._attributeProducers); } - addTypesSync(): void { + public addTypesSync(): void { return panic("addTypesSync not supported in JSONSchemaInput"); } - async addSource(schemaSource: JSONSchemaSourceData): Promise { - return this.addSourceSync(schemaSource); + public async addSource(schemaSource: JSONSchemaSourceData): Promise { + this.addSourceSync(schemaSource); } - addSourceSync(schemaSource: JSONSchemaSourceData): void { + public addSourceSync(schemaSource: JSONSchemaSourceData): void { const { name, uris, schema, isConverted } = schemaSource; if (isConverted !== true) { @@ -1227,6 +1299,7 @@ export class JSONSchemaInput implements Input { if (normalizedURI.clone().hash("").toString() === "") { normalizedURI.path(name); } + return normalizedURI; }); } @@ -1243,8 +1316,10 @@ export class JSONSchemaInput implements Input { if (suffix > 0) { uri.path(`${path}-${suffix}`); } + suffix++; } while (this._schemaInputs.has(uri.toString())); + this._schemaInputs.set(uri.toString(), schema); normalizedURIs[i] = uri.hash(normalizedURI.hash()); } @@ -1256,14 +1331,16 @@ export class JSONSchemaInput implements Input { } } - singleStringSchemaSource(): string | undefined { + public singleStringSchemaSource(): string | undefined { if (!this._schemaSources.every(([_, { schema }]) => typeof schema === "string")) { return undefined; } + const set = new Set(this._schemaSources.map(([_, { schema }]) => schema as string)); if (set.size === 1) { return defined(iterableFirst(set)); } + return undefined; } } diff --git a/packages/quicktype-core/src/input/JSONSchemaStore.ts b/packages/quicktype-core/src/input/JSONSchemaStore.ts index dc7ef9aea..02d93e8e0 100644 --- a/packages/quicktype-core/src/input/JSONSchemaStore.ts +++ b/packages/quicktype-core/src/input/JSONSchemaStore.ts @@ -1,4 +1,4 @@ -import { StringMap, assert } from "../support/Support"; +import { type StringMap, assert } from "../support/Support"; export type JSONSchema = StringMap | boolean; @@ -11,28 +11,36 @@ export abstract class JSONSchemaStore { } // FIXME: Remove the undefined option - abstract fetch(_address: string): Promise; + public abstract fetch(_address: string): Promise; - async get(address: string, debugPrint: boolean): Promise { + public async get(address: string, debugPrint: boolean): Promise { let schema = this._schemas.get(address); if (schema !== undefined) { return schema; } + if (debugPrint) { console.log(`trying to fetch ${address}`); } + try { schema = await this.fetch(address); - } catch {} + } catch (e) { + // FIXME: handle or log this error + } + if (schema === undefined) { if (debugPrint) { console.log(`couldn't fetch ${address}`); } + return undefined; } + if (debugPrint) { console.log(`successully fetched ${address}`); } + this.add(address, schema); return schema; } diff --git a/packages/quicktype-core/src/input/PostmanCollection.ts b/packages/quicktype-core/src/input/PostmanCollection.ts index d5de09947..fd191a8c6 100644 --- a/packages/quicktype-core/src/input/PostmanCollection.ts +++ b/packages/quicktype-core/src/input/PostmanCollection.ts @@ -1,5 +1,6 @@ import { parseJSON } from "../support/Support"; -import { JSONSourceData } from "./Inputs"; + +import { type JSONSourceData } from "./Inputs"; function isValidJSON(s: string): boolean { try { @@ -13,20 +14,23 @@ function isValidJSON(s: string): boolean { export function sourcesFromPostmanCollection( collectionJSON: string, collectionJSONAddress?: string -): { sources: JSONSourceData[]; description: string | undefined } { - const sources: JSONSourceData[] = []; +): { description: string | undefined; sources: Array> } { + const sources: Array> = []; const descriptions: string[] = []; + // eslint-disable-next-line @typescript-eslint/no-explicit-any function processCollection(c: any): void { if (typeof c !== "object") return; if (Array.isArray(c.item)) { for (const item of c.item) { processCollection(item); } + if (typeof c.info === "object" && typeof c.info.description === "string") { descriptions.push(c.info.description); } } + if (typeof c.name === "string" && Array.isArray(c.response)) { const samples: string[] = []; for (const r of c.response) { @@ -34,6 +38,7 @@ export function sourcesFromPostmanCollection( samples.push(r.body); } } + if (samples.length > 0) { const source: JSONSourceData = { name: c.name, samples }; const sourceDescription = [c.name]; diff --git a/packages/quicktype-core/src/input/io/NodeIO.ts b/packages/quicktype-core/src/input/io/NodeIO.ts index 78384b69a..f8cf94b44 100644 --- a/packages/quicktype-core/src/input/io/NodeIO.ts +++ b/packages/quicktype-core/src/input/io/NodeIO.ts @@ -1,14 +1,19 @@ import * as fs from "fs"; + import { defined, exceptionToString } from "@glideapps/ts-necessities"; -import { Readable } from "readable-stream"; import { isNode } from "browser-or-node"; import _fetch from "cross-fetch"; -import { getStream } from "./get-stream"; +import isURL from "is-url"; +import { type Readable } from "readable-stream"; + +// eslint-disable-next-line import/no-cycle import { messageError, panic } from "../../index"; -const isURL = require("is-url"); +import { getStream } from "./get-stream"; // Only use cross-fetch in CI +// FIXME: type global +// eslint-disable-next-line @typescript-eslint/no-explicit-any const fetch = process.env.CI ? _fetch : (global as any).fetch ?? _fetch; interface HttpHeaders { @@ -50,6 +55,7 @@ export async function readableFromFileOrURL(fileOrURL: string, httpHeaders?: str // Cast node readable to isomorphic readable from readable-stream return process.stdin as unknown as Readable; } + const filePath = fs.lstatSync(fileOrURL).isSymbolicLink() ? fs.readlinkSync(fileOrURL) : fileOrURL; if (fs.existsSync(filePath)) { // Cast node readable to isomorphic readable from readable-stream @@ -59,6 +65,7 @@ export async function readableFromFileOrURL(fileOrURL: string, httpHeaders?: str } catch (e) { return messageError("MiscReadError", { fileOrURL, message: exceptionToString(e) }); } + return messageError("DriverInputFileDoesNotExist", { filename: fileOrURL }); } diff --git a/packages/quicktype-core/src/input/io/get-stream/buffer-stream.ts b/packages/quicktype-core/src/input/io/get-stream/buffer-stream.ts index 19cd6ec30..846f6a0a5 100644 --- a/packages/quicktype-core/src/input/io/get-stream/buffer-stream.ts +++ b/packages/quicktype-core/src/input/io/get-stream/buffer-stream.ts @@ -1,6 +1,8 @@ -import { Options } from "."; +/* eslint-disable @typescript-eslint/no-explicit-any */ import { PassThrough } from "readable-stream"; +import { type Options } from "."; + export default function bufferStream(opts: Options) { opts = Object.assign({}, opts); @@ -10,8 +12,10 @@ export default function bufferStream(opts: Options) { let objectMode = false; if (array) { + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing objectMode = !(encoding || buffer); } else { + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing encoding = encoding || "utf8"; } diff --git a/packages/quicktype-core/src/input/io/get-stream/index.ts b/packages/quicktype-core/src/input/io/get-stream/index.ts index 9036e7c89..3f1dcbc4b 100644 --- a/packages/quicktype-core/src/input/io/get-stream/index.ts +++ b/packages/quicktype-core/src/input/io/get-stream/index.ts @@ -1,20 +1,22 @@ -import { Readable } from "readable-stream"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { type Readable } from "readable-stream"; + import bufferStream from "./buffer-stream"; export interface Options { - maxBuffer?: number; array?: boolean; encoding?: string; + maxBuffer?: number; } -export function getStream(inputStream: Readable, opts: Options = {}) { +export async function getStream(inputStream: Readable, opts: Options = {}) { if (!inputStream) { - return Promise.reject(new Error("Expected a stream")); + return await Promise.reject(new Error("Expected a stream")); } opts = Object.assign({ maxBuffer: Infinity }, opts); - const maxBuffer = opts.maxBuffer || Infinity; + const maxBuffer = opts.maxBuffer ?? Infinity; let stream: any; let clean; @@ -48,15 +50,15 @@ export function getStream(inputStream: Readable, opts: Options = {}) { }; }); - p.then(clean, clean); - - return p.then(() => stream.getBufferedValue()); + return await p.then(clean, clean).then(() => stream.getBufferedValue()); } +// FIXME: should these be async ? export function buffer(stream: Readable, opts: Options = {}) { - getStream(stream, Object.assign({}, opts, { encoding: "buffer" })); + void getStream(stream, Object.assign({}, opts, { encoding: "buffer" })); } +// FIXME: should these be async ? export function array(stream: Readable, opts: Options = {}) { - getStream(stream, Object.assign({}, opts, { array: true })); + void getStream(stream, Object.assign({}, opts, { array: true })); } diff --git a/packages/quicktype-core/src/language/All.ts b/packages/quicktype-core/src/language/All.ts index ec3985ef4..297af4d1c 100644 --- a/packages/quicktype-core/src/language/All.ts +++ b/packages/quicktype-core/src/language/All.ts @@ -1,33 +1,34 @@ import { iterableFind } from "collection-utils"; -import { TargetLanguage } from "../TargetLanguage"; +import { type TargetLanguage } from "../TargetLanguage"; -import { CSharpTargetLanguage } from "./CSharp"; -import { GoTargetLanguage } from "./Golang"; import { CJSONTargetLanguage } from "./CJSON"; import { CPlusPlusTargetLanguage } from "./CPlusPlus"; -import { ObjectiveCTargetLanguage } from "./Objective-C"; +import { CrystalTargetLanguage } from "./Crystal"; +import { CSharpTargetLanguage } from "./CSharp"; +import { DartTargetLanguage } from "./Dart"; +import { ElixirTargetLanguage } from "./Elixir"; +import { ElmTargetLanguage } from "./Elm"; +import { GoTargetLanguage } from "./Golang"; +import { HaskellTargetLanguage } from "./Haskell"; import { JavaTargetLanguage } from "./Java"; import { JavaScriptTargetLanguage } from "./JavaScript"; +// eslint-disable-next-line import/no-cycle import { JavaScriptPropTypesTargetLanguage } from "./JavaScriptPropTypes"; -import { TypeScriptTargetLanguage, FlowTargetLanguage } from "./TypeScriptFlow"; -import { SwiftTargetLanguage } from "./Swift"; +import { JSONSchemaTargetLanguage } from "./JSONSchema"; import { KotlinTargetLanguage } from "./Kotlin"; +import { ObjectiveCTargetLanguage } from "./Objective-C"; +import { PhpTargetLanguage } from "./Php"; +import { PikeTargetLanguage } from "./Pike"; +import { PythonTargetLanguage } from "./Python"; +import { RubyTargetLanguage } from "./ruby"; +import { RustTargetLanguage } from "./Rust"; import { Scala3TargetLanguage } from "./Scala3"; import { SmithyTargetLanguage } from "./Smithy4s"; -import { ElmTargetLanguage } from "./Elm"; -import { JSONSchemaTargetLanguage } from "./JSONSchema"; -import { RustTargetLanguage } from "./Rust"; -import { CrystalTargetLanguage } from "./Crystal"; -import { RubyTargetLanguage } from "./ruby"; -import { DartTargetLanguage } from "./Dart"; -import { PythonTargetLanguage } from "./Python"; -import { PikeTargetLanguage } from "./Pike"; -import { HaskellTargetLanguage } from "./Haskell"; -import { TypeScriptZodTargetLanguage } from "./TypeScriptZod"; -import { PhpTargetLanguage } from "./Php"; +import { SwiftTargetLanguage } from "./Swift"; import { TypeScriptEffectSchemaTargetLanguage } from "./TypeScriptEffectSchema"; -import { ElixirTargetLanguage } from "./Elixir"; +import { FlowTargetLanguage, TypeScriptTargetLanguage } from "./TypeScriptFlow"; +import { TypeScriptZodTargetLanguage } from "./TypeScriptZod"; export const all: TargetLanguage[] = [ new CSharpTargetLanguage(), @@ -63,10 +64,8 @@ export function languageNamed(name: string, targetLanguages?: TargetLanguage[]): if (targetLanguages === undefined) { targetLanguages = all; } - const maybeTargetLanguage = iterableFind( - targetLanguages, - l => l.names.indexOf(name) >= 0 || l.displayName === name - ); + + const maybeTargetLanguage = iterableFind(targetLanguages, l => l.names.includes(name) || l.displayName === name); if (maybeTargetLanguage !== undefined) return maybeTargetLanguage; return iterableFind(targetLanguages, l => l.extension === name); } diff --git a/packages/quicktype-core/src/language/CJSON.ts b/packages/quicktype-core/src/language/CJSON.ts index 8dd1990b2..28499a4b4 100644 --- a/packages/quicktype-core/src/language/CJSON.ts +++ b/packages/quicktype-core/src/language/CJSON.ts @@ -1,3 +1,6 @@ +// FIXME: NEEDS REFACTOR +/* eslint-disable @typescript-eslint/no-shadow */ +/* eslint-disable @typescript-eslint/naming-convention */ /** * CJSON.ts * This file is used to generate cJSON code with quicktype @@ -13,7 +16,7 @@ * To print json string from json data use the following: char * string = cJSON_Print(); * To delete json data use the following: cJSON_Delete(); * - * TODO list for futur enhancements: + * TODO list for future enhancements: * - Management of Class, Union and TopLevel should be mutualized to reduce code size and to permit Union and TopLevel having recursive Array/Map * - Types check should be added to verify unwanted inputs (for example a Number passed while a String is expected, etc) * - Constraints should be implemented (verification of Enum values, min/max values for Numbers and min/max length for Strings, regex) @@ -22,26 +25,26 @@ */ /* Imports */ -import { TargetLanguage } from "../TargetLanguage"; -import { Type, TypeKind, ClassType, ArrayType, MapType, EnumType, UnionType } from "../Type"; -import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { NameStyle, Name, Namer, funPrefixNamer } from "../Naming"; -import { Sourcelike } from "../Source"; +import { getAccessorName } from "../attributes/AccessorNames"; +import { enumCaseValues } from "../attributes/EnumValues"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, type NameStyle, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { EnumOption, type Option, type OptionValues, StringOption, getOptionValues } from "../RendererOptions"; +import { type Sourcelike } from "../Source"; import { + type NamingStyle, allUpperWordStyle, - legalizeCharacters, isAscii, isLetterOrUnderscoreOrDigit, - NamingStyle, + legalizeCharacters, makeNameStyle } from "../support/Strings"; -import { defined, assertNever, panic, numberEnumValues } from "../support/Support"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { EnumOption, StringOption, Option, getOptionValues, OptionValues } from "../RendererOptions"; -import { assert } from "../support/Support"; -import { RenderContext } from "../Renderer"; -import { getAccessorName } from "../attributes/AccessorNames"; -import { enumCaseValues } from "../attributes/EnumValues"; +import { assert, assertNever, defined, numberEnumValues, panic } from "../support/Support"; +import { TargetLanguage } from "../TargetLanguage"; +import { ArrayType, ClassType, EnumType, MapType, type Type, type TypeKind, UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; /* Naming styles */ const pascalValue: [string, NamingStyle] = ["pascal-case", "pascal"]; @@ -135,7 +138,7 @@ export class CJSONTargetLanguage extends TargetLanguage { * @params names: names * @param extension: extension of files */ - constructor(displayName = "C (cJSON)", names: string[] = ["cjson", "cJSON"], extension = "h") { + public constructor(displayName = "C (cJSON)", names: string[] = ["cjson", "cJSON"], extension = "h") { super(displayName, names, extension); } @@ -143,7 +146,7 @@ export class CJSONTargetLanguage extends TargetLanguage { * Return cJSON generator options * @return cJSON generator options array */ - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ cJSONOptions.typeSourceStyle, cJSONOptions.typeIntegerSize, @@ -160,7 +163,7 @@ export class CJSONTargetLanguage extends TargetLanguage { * Indicate if language support union with both number types * @return true */ - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } @@ -168,7 +171,7 @@ export class CJSONTargetLanguage extends TargetLanguage { * Indicate if language support optional class properties * @return true */ - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } @@ -178,7 +181,7 @@ export class CJSONTargetLanguage extends TargetLanguage { * @param untypedOptionValues * @return cJSON renderer */ - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): CJSONRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): CJSONRenderer { return new CJSONRenderer(this, renderContext, getOptionValues(cJSONOptions, untypedOptionValues)); } } @@ -311,63 +314,70 @@ const keywords = [ /* Used to build forbidden global names */ export enum GlobalNames { - ClassMemberConstraints, - ClassMemberConstraintException, - ValueTooLowException, - ValueTooHighException, - ValueTooShortException, - ValueTooLongException, - InvalidPatternException, - CheckConstraint + ClassMemberConstraints = 1, + ClassMemberConstraintException = 2, + ValueTooLowException = 3, + ValueTooHighException = 4, + ValueTooShortException = 5, + ValueTooLongException = 6, + InvalidPatternException = 7, + CheckConstraint = 8 } /* To be able to support circles in multiple files - e.g. class#A using class#B using class#A (obviously not directly) we can forward declare them */ export enum IncludeKind { - ForwardDeclare, - Include + ForwardDeclare = "ForwardDeclare", + Include = "Include" } /* Used to map includes */ -export type IncludeRecord = { +export interface IncludeRecord { kind: IncludeKind | undefined /* How to include that */; typeKind: TypeKind | undefined /* What exactly to include */; -}; +} /* Used to map includes */ -export type TypeRecord = { +export interface TypeRecord { + forceInclude: boolean; + level: number; name: Name; type: Type; - level: number; variant: boolean; - forceInclude: boolean; -}; +} /* Map each and every unique type to a include kind, e.g. how to include the given type */ export type IncludeMap = Map; /* cJSON type */ -export type TypeCJSON = { +export interface TypeCJSON { + addToObject: Sourcelike /* cJSON add to object function */; cType: Sourcelike /* C type */; - optionalQualifier: string /* C optional qualifier, empty string if not defined */; cjsonType: string /* cJSON type */; - isType: Sourcelike /* cJSON check type function */; - getValue: Sourcelike /* cJSON get value function */; - addToObject: Sourcelike /* cJSON add to object function */; createObject: Sourcelike /* cJSON create object function */; deleteType: Sourcelike /* cJSON delete function */; - items: TypeCJSON | undefined /* Sub-items, used for arrays and map */; + getValue: Sourcelike /* cJSON get value function */; isNullable: boolean /* True if the field is nullable */; -}; + isType: Sourcelike /* cJSON check type function */; + items: TypeCJSON | undefined /* Sub-items, used for arrays and map */; + optionalQualifier: string /* C optional qualifier, empty string if not defined */; +} /* cJSON renderer */ export class CJSONRenderer extends ConvenienceRenderer { private currentFilename: string | undefined; /* Current filename */ - private memberNameStyle: NameStyle; /* Member name style */ - private namedTypeNameStyle: NameStyle; /* Named type name style */ - private forbiddenGlobalNames: string[]; /* Forbidden global names */ + + private readonly memberNameStyle: NameStyle; /* Member name style */ + + private readonly namedTypeNameStyle: NameStyle; /* Named type name style */ + + private readonly forbiddenGlobalNames: string[]; /* Forbidden global names */ + protected readonly typeIntegerSize: string; /* Integer code generation type */ + protected readonly hashtableSize: string; /* Hashtable default size */ + protected readonly typeNamingStyle: NamingStyle; /* Type naming style */ + protected readonly enumeratorNamingStyle: NamingStyle; /* Enum naming style */ /** @@ -376,7 +386,7 @@ export class CJSONRenderer extends ConvenienceRenderer { * @param renderContext: render context * @param _options: renderer options */ - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -479,6 +489,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } else if ("double" === fieldName) { fieldName = "number"; } + return fieldName; } @@ -487,7 +498,7 @@ export class CJSONRenderer extends ConvenienceRenderer { * @param fieldType: the variable type * @param fieldName: name of the variable */ - protected emitTypdefAlias(fieldType: Type, fieldName: Name) { + protected emitTypedefAlias(fieldType: Type, fieldName: Name): void { if (this._options.addTypedefAlias) { this.emitLine("typedef ", this.quicktypeTypeToCJSON(fieldType, false).cType, " ", fieldName, ";"); this.ensureBlankLine(); @@ -675,7 +686,7 @@ export class CJSONRenderer extends ConvenienceRenderer { true ); this.ensureBlankLine(); - this.emitTypdefAlias(enumType, enumName); + this.emitTypedefAlias(enumType, enumName); } /** @@ -776,6 +787,7 @@ export class CJSONRenderer extends ConvenienceRenderer { * @param unionType: union type */ protected emitUnionTypedef(unionType: UnionType): void { + // eslint-disable-next-line @typescript-eslint/no-unused-vars const [_hasNull, nonNulls] = removeNullFromUnion(unionType); const unionName = this.nameForNamedType(unionType); @@ -807,7 +819,7 @@ export class CJSONRenderer extends ConvenienceRenderer { true ); this.ensureBlankLine(); - this.emitTypdefAlias(unionType, unionName); + this.emitTypedefAlias(unionType, unionName); } /** @@ -843,6 +855,7 @@ export class CJSONRenderer extends ConvenienceRenderer { }); onFirst = false; } + for (const type of nonNulls) { const cJSON = this.quicktypeTypeToCJSON(type, false); this.emitBlock([onFirst === true ? "if (" : "else if (", cJSON.isType, "(j))"], () => { @@ -863,57 +876,58 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { const add = (cJSON: TypeCJSON, level: number, child_level: number) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { this.emitLine( "list_add_tail(x", child_level.toString(), ", (", - cJSON.items!.cType, + cJSON.items?.cType, " *)0xDEADBEEF, sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); - } else if (cJSON.items!.cjsonType === "cJSON_String") { + } else if (cJSON.items?.cjsonType === "cJSON_String") { this.emitLine( "list_add_tail(x", child_level.toString(), ", strdup(", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e", child_level.toString(), ")), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else if ( - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( "list_add_tail(x", child_level.toString(), ", ", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e", child_level.toString(), "), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " * tmp", level > 0 ? level.toString() : "", " = cJSON_malloc(sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, "));" ); this.emitBlock( @@ -923,7 +937,8 @@ export class CJSONRenderer extends ConvenienceRenderer { "* tmp", level > 0 ? level.toString() : "", " = ", - cJSON.items!.getValue, + // @ts-expect-error awaiting refactor + cJSON.items?.getValue, "(e", child_level.toString(), ");" @@ -934,14 +949,16 @@ export class CJSONRenderer extends ConvenienceRenderer { ", tmp", level > 0 ? level.toString() : "", ", sizeof(", - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *));" ); } ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock( ["if (!cJSON_IsNull(e", child_level.toString(), "))"], () => { @@ -991,13 +1008,13 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { const add = (cJSON: TypeCJSON, level: number, child_level: number) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { this.emitLine( "hashtable_add(x", @@ -1005,28 +1022,28 @@ export class CJSONRenderer extends ConvenienceRenderer { ", e", child_level.toString(), "->string, (", - cJSON.items!.cType, + cJSON.items?.cType, " *)0xDEADBEEF, sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); - } else if (cJSON.items!.cjsonType === "cJSON_String") { + } else if (cJSON.items?.cjsonType === "cJSON_String") { this.emitLine( "hashtable_add(x", child_level.toString(), ", e", child_level.toString(), "->string, strdup(", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e", child_level.toString(), ")), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else if ( - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( "hashtable_add(x", @@ -1034,20 +1051,21 @@ export class CJSONRenderer extends ConvenienceRenderer { ", e", child_level.toString(), "->string, ", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e", child_level.toString(), "), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " * tmp", level > 0 ? level.toString() : "", " = cJSON_malloc(sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, "));" ); this.emitBlock( @@ -1057,7 +1075,8 @@ export class CJSONRenderer extends ConvenienceRenderer { "* tmp", level > 0 ? level.toString() : "", " = ", - cJSON.items!.getValue, + // @ts-expect-error awaiting refactor + cJSON.items?.getValue, "(e", child_level.toString(), ");" @@ -1070,14 +1089,16 @@ export class CJSONRenderer extends ConvenienceRenderer { "->string, tmp", level > 0 ? level.toString() : "", ", sizeof(", - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *));" ); } ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock( ["if (!cJSON_IsNull(e", child_level.toString(), "))"], () => { @@ -1152,6 +1173,7 @@ export class CJSONRenderer extends ConvenienceRenderer { }); onFirst = false; } + for (const type of nonNulls) { const cJSON = this.quicktypeTypeToCJSON(type, false); this.emitBlock( @@ -1169,7 +1191,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ); this.emitBlock(["if (NULL != j", child_level.toString(), ")"], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " * x", child_level.toString(), " = list_get_head(x", @@ -1180,30 +1203,30 @@ export class CJSONRenderer extends ConvenienceRenderer { ); this.emitBlock(["while (NULL != x", child_level.toString(), ")"], () => { const add = (cJSON: TypeCJSON, child_level: number) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Invalid") { + } else if (cJSON.items?.cjsonType === "cJSON_Invalid") { /* Nothing to do */ - } else if (cJSON.items!.cjsonType === "cJSON_NULL") { + } else if (cJSON.items?.cjsonType === "cJSON_NULL") { this.emitLine( "cJSON_AddItemToArray(j", child_level.toString(), ", ", - cJSON.items!.createObject, + cJSON.items?.createObject, "());" ); } else if ( - cJSON.items!.cjsonType === "cJSON_String" || - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_String" || + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( "cJSON_AddItemToArray(j", child_level.toString(), ", ", - cJSON.items!.createObject, + cJSON.items?.createObject, "(x", child_level.toString(), "));" @@ -1213,14 +1236,16 @@ export class CJSONRenderer extends ConvenienceRenderer { "cJSON_AddItemToArray(j", child_level.toString(), ", ", - cJSON.items!.createObject, + // @ts-expect-error awaiting refactor + cJSON.items?.createObject, "(*x", child_level.toString(), "));" ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock( ["if ((void *)0xDEADBEEF != x", child_level.toString(), ")"], () => { @@ -1237,6 +1262,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { add(cJSON, child_level); } + this.emitLine( "x", child_level.toString(), @@ -1287,7 +1313,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *x", child_level.toString(), " = hashtable_lookup(x", @@ -1301,13 +1328,13 @@ export class CJSONRenderer extends ConvenienceRenderer { "]);" ); const add = (cJSON: TypeCJSON, child_level: number) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Invalid") { + } else if (cJSON.items?.cjsonType === "cJSON_Invalid") { /* Nothing to do */ - } else if (cJSON.items!.cjsonType === "cJSON_NULL") { + } else if (cJSON.items?.cjsonType === "cJSON_NULL") { this.emitLine( cJSON.addToObject, "(j", @@ -1317,13 +1344,13 @@ export class CJSONRenderer extends ConvenienceRenderer { "[index", child_level.toString(), "], ", - cJSON.items!.createObject, + cJSON.items?.createObject, "());" ); } else if ( - cJSON.items!.cjsonType === "cJSON_String" || - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_String" || + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( cJSON.addToObject, @@ -1334,7 +1361,7 @@ export class CJSONRenderer extends ConvenienceRenderer { "[index", child_level.toString(), "], ", - cJSON.items!.createObject, + cJSON.items?.createObject, "(x", child_level.toString(), "));" @@ -1349,14 +1376,16 @@ export class CJSONRenderer extends ConvenienceRenderer { "[index", child_level.toString(), "], ", - cJSON.items!.createObject, + // @ts-expect-error awaiting refactor + cJSON.items?.createObject, "(*x", child_level.toString(), "));" ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock( [ "if ((void *)0xDEADBEEF != x", @@ -1431,7 +1460,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " * x", child_level.toString(), " = list_get_head(x", @@ -1441,22 +1471,23 @@ export class CJSONRenderer extends ConvenienceRenderer { ");" ); this.emitBlock(["while (NULL != x", child_level.toString(), ")"], () => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { /* Nothing to do */ } else { - if (cJSON.items!.isNullable) { + if (cJSON.items?.isNullable) { this.emitBlock( ["if ((void *)0xDEADBEEF != x", child_level.toString(), ")"], () => { this.emitLine( - cJSON.items!.deleteType, + // @ts-expect-error awaiting refactor + cJSON.items?.deleteType, "(x", child_level.toString(), ");" @@ -1465,13 +1496,15 @@ export class CJSONRenderer extends ConvenienceRenderer { ); } else { this.emitLine( - cJSON.items!.deleteType, + // @ts-expect-error awaiting refactor + cJSON.items?.deleteType, "(x", child_level.toString(), ");" ); } } + this.emitLine( "x", child_level.toString(), @@ -1531,7 +1564,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *x", child_level.toString(), " = hashtable_lookup(x", @@ -1545,17 +1579,17 @@ export class CJSONRenderer extends ConvenienceRenderer { "]);" ); this.emitBlock(["if (NULL != x", child_level.toString(), ")"], () => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { /* Nothing to do */ } else { - if (cJSON.items!.isNullable) { + if (cJSON.items?.isNullable) { this.emitBlock( [ "if ((void *)0xDEADBEEF != x", @@ -1564,7 +1598,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { this.emitLine( - cJSON.items!.deleteType, + // @ts-expect-error awaiting refactor + cJSON.items?.deleteType, "(x", child_level.toString(), ");" @@ -1573,7 +1608,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ); } else { this.emitLine( - cJSON.items!.deleteType, + // @ts-expect-error awaiting refactor + cJSON.items?.deleteType, "(x", child_level.toString(), ");" @@ -1614,6 +1650,7 @@ export class CJSONRenderer extends ConvenienceRenderer { }); onFirst = false; } + this.emitLine("cJSON_free(x);"); }); }); @@ -1676,7 +1713,7 @@ export class CJSONRenderer extends ConvenienceRenderer { true ); this.ensureBlankLine(); - this.emitTypdefAlias(classType, className); + this.emitTypedefAlias(classType, className); } /** @@ -1745,7 +1782,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ", x", child_level2.toString(), ", sizeof(", - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *));" ); } else if (cJSON.cjsonType === "cJSON_Map") { @@ -1884,7 +1922,7 @@ export class CJSONRenderer extends ConvenienceRenderer { level: number, child_level: number ) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { if (type instanceof ArrayType) { const child_level2 = child_level + 1; recur(type.items, child_level); @@ -1894,61 +1932,62 @@ export class CJSONRenderer extends ConvenienceRenderer { ", x", child_level2.toString(), ", sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else { panic("Invalid type"); } - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { this.emitLine( "list_add_tail(x", child_level.toString(), ", (", - cJSON.items!.cType, + cJSON.items?.cType, " *)0xDEADBEEF, sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); - } else if (cJSON.items!.cjsonType === "cJSON_String") { + } else if (cJSON.items?.cjsonType === "cJSON_String") { this.emitLine( "list_add_tail(x", child_level.toString(), ", strdup(", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e", child_level.toString(), ")), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else if ( - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( "list_add_tail(x", child_level.toString(), ", ", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e", child_level.toString(), "), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " * tmp", level > 0 ? level.toString() : "", " = cJSON_malloc(sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, "));" ); this.emitBlock( @@ -1962,7 +2001,8 @@ export class CJSONRenderer extends ConvenienceRenderer { "* tmp", level > 0 ? level.toString() : "", " = ", - cJSON.items!.getValue, + // @ts-expect-error awaiting refactor + cJSON.items?.getValue, "(e", child_level.toString(), ");" @@ -1973,14 +2013,16 @@ export class CJSONRenderer extends ConvenienceRenderer { ", tmp", level > 0 ? level.toString() : "", ", sizeof(", - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *));" ); } ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock( [ "if (!cJSON_IsNull(e", @@ -2049,7 +2091,7 @@ export class CJSONRenderer extends ConvenienceRenderer { level: number, child_level: number ) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { if (type instanceof MapType) { const child_level2 = child_level + 1; recur(type.values, child_level); @@ -2061,17 +2103,17 @@ export class CJSONRenderer extends ConvenienceRenderer { "->string, x", child_level2.toString(), ", sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else { panic("Invalid type"); } - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { this.emitLine( "hashtable_add(x", @@ -2079,28 +2121,28 @@ export class CJSONRenderer extends ConvenienceRenderer { ", e", child_level.toString(), "->string, (", - cJSON.items!.cType, + cJSON.items?.cType, " *)0xDEADBEEF, sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); - } else if (cJSON.items!.cjsonType === "cJSON_String") { + } else if (cJSON.items?.cjsonType === "cJSON_String") { this.emitLine( "hashtable_add(x", child_level.toString(), ", e", child_level.toString(), "->string, strdup(", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e", child_level.toString(), ")), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else if ( - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( "hashtable_add(x", @@ -2108,20 +2150,21 @@ export class CJSONRenderer extends ConvenienceRenderer { ", e", child_level.toString(), "->string, ", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e", child_level.toString(), "), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " * tmp", level > 0 ? level.toString() : "", " = cJSON_malloc(sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, "));" ); this.emitBlock( @@ -2135,7 +2178,8 @@ export class CJSONRenderer extends ConvenienceRenderer { "* tmp", level > 0 ? level.toString() : "", " = ", - cJSON.items!.getValue, + // @ts-expect-error awaiting refactor + cJSON.items?.getValue, "(e", child_level.toString(), ");" @@ -2148,14 +2192,16 @@ export class CJSONRenderer extends ConvenienceRenderer { "->string, tmp", level > 0 ? level.toString() : "", ", sizeof(", - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *));" ); } ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock( [ "if (!cJSON_IsNull(e", @@ -2348,6 +2394,7 @@ export class CJSONRenderer extends ConvenienceRenderer { }); } }; + recur(classType, 0); }); }); @@ -2425,6 +2472,7 @@ export class CJSONRenderer extends ConvenienceRenderer { "));" ); } + this.emitLine( "x", child_level.toString(), @@ -2453,7 +2501,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ); this.emitBlock(["if (NULL != j", child_level.toString(), ")"], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " * x", child_level.toString(), " = list_get_head(x", @@ -2470,7 +2519,7 @@ export class CJSONRenderer extends ConvenienceRenderer { cJSON: TypeCJSON, child_level: number ) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { if (type instanceof ArrayType) { const child_level2 = child_level + 1; recur(type.items, child_level); @@ -2484,28 +2533,28 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { panic("Invalid type"); } - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Invalid") { + } else if (cJSON.items?.cjsonType === "cJSON_Invalid") { /* Nothing to do */ - } else if (cJSON.items!.cjsonType === "cJSON_NULL") { + } else if (cJSON.items?.cjsonType === "cJSON_NULL") { this.emitLine( "cJSON_AddItemToArray(j", child_level.toString(), ", ", - cJSON.items!.createObject, + cJSON.items?.createObject, "());" ); } else if ( - cJSON.items!.cjsonType === "cJSON_String" || - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_String" || + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( "cJSON_AddItemToArray(j", child_level.toString(), ", ", - cJSON.items!.createObject, + cJSON.items?.createObject, "(x", child_level.toString(), "));" @@ -2515,14 +2564,16 @@ export class CJSONRenderer extends ConvenienceRenderer { "cJSON_AddItemToArray(j", child_level.toString(), ", ", - cJSON.items!.createObject, + // @ts-expect-error awaiting refactor + cJSON.items?.createObject, "(*x", child_level.toString(), "));" ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock( [ "if ((void *)0xDEADBEEF != x", @@ -2543,6 +2594,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { add(property.type, cJSON, child_level); } + this.emitLine( "x", child_level.toString(), @@ -2599,7 +2651,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *x", child_level.toString(), " = hashtable_lookup(x", @@ -2617,7 +2670,7 @@ export class CJSONRenderer extends ConvenienceRenderer { cJSON: TypeCJSON, child_level: number ) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { if (type instanceof MapType) { const child_level2 = child_level + 1; recur(type.values, child_level); @@ -2637,15 +2690,15 @@ export class CJSONRenderer extends ConvenienceRenderer { panic("Invalid type"); } } else if ( - cJSON.items!.cjsonType === "cJSON_Map" + cJSON.items?.cjsonType === "cJSON_Map" ) { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" + cJSON.items?.cjsonType === "cJSON_Invalid" ) { /* Nothing to do */ } else if ( - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_NULL" ) { this.emitLine( cJSON.addToObject, @@ -2656,13 +2709,13 @@ export class CJSONRenderer extends ConvenienceRenderer { "[index", child_level.toString(), "], ", - cJSON.items!.createObject, + cJSON.items?.createObject, "());" ); } else if ( - cJSON.items!.cjsonType === "cJSON_String" || - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_String" || + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( cJSON.addToObject, @@ -2673,7 +2726,7 @@ export class CJSONRenderer extends ConvenienceRenderer { "[index", child_level.toString(), "], ", - cJSON.items!.createObject, + cJSON.items?.createObject, "(x", child_level.toString(), "));" @@ -2688,14 +2741,16 @@ export class CJSONRenderer extends ConvenienceRenderer { "[index", child_level.toString(), "], ", - cJSON.items!.createObject, + // @ts-expect-error awaiting refactor + cJSON.items?.createObject, "(*x", child_level.toString(), "));" ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock( [ "if ((void *)0xDEADBEEF != x", @@ -2911,6 +2966,7 @@ export class CJSONRenderer extends ConvenienceRenderer { ); } } + if (cJSON.isNullable) { this.emitBlock(["else"], () => { this.emitLine( @@ -2925,6 +2981,7 @@ export class CJSONRenderer extends ConvenienceRenderer { }); } }; + recur(classType, 0); }); }); @@ -2973,6 +3030,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { this.emitLine(cJSON.deleteType, "(x", child_level.toString(), ");"); } + this.emitLine("x", child_level.toString(), " = list_get_next(x", level.toString(), ");"); }); } else if (type instanceof ClassType) { @@ -2984,7 +3042,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ["if (NULL != x", level > 0 ? level.toString() : "", "->", name, ")"], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " * x", child_level.toString(), " = list_get_head(x", @@ -2994,11 +3053,11 @@ export class CJSONRenderer extends ConvenienceRenderer { ");" ); this.emitBlock(["while (NULL != x", child_level.toString(), ")"], () => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { if (property.type instanceof ArrayType) { recur(property.type.items, child_level); this.emitLine( - cJSON.items!.deleteType, + cJSON.items?.deleteType, "(x", child_level.toString(), ");" @@ -3006,20 +3065,21 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { panic("Invalid type"); } - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { /* Nothing to do */ } else { - if (cJSON.items!.isNullable) { + if (cJSON.items?.isNullable) { this.emitBlock( ["if ((void *)0xDEADBEEF != x", child_level.toString(), ")"], () => { this.emitLine( - cJSON.items!.deleteType, + // @ts-expect-error awaiting refactor + cJSON.items?.deleteType, "(x", child_level.toString(), ");" @@ -3028,13 +3088,15 @@ export class CJSONRenderer extends ConvenienceRenderer { ); } else { this.emitLine( - cJSON.items!.deleteType, + // @ts-expect-error awaiting refactor + cJSON.items?.deleteType, "(x", child_level.toString(), ");" ); } } + this.emitLine( "x", child_level.toString(), @@ -3087,7 +3149,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *x", child_level.toString(), " = hashtable_lookup(x", @@ -3103,11 +3166,11 @@ export class CJSONRenderer extends ConvenienceRenderer { this.emitBlock( ["if (NULL != x", child_level.toString(), ")"], () => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { if (property.type instanceof MapType) { recur(property.type.values, child_level); this.emitLine( - cJSON.items!.deleteType, + cJSON.items?.deleteType, "(x", child_level.toString(), ");" @@ -3115,15 +3178,15 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { panic("Invalid type"); } - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { /* Nothing to do */ } else { - if (cJSON.items!.isNullable) { + if (cJSON.items?.isNullable) { this.emitBlock( [ "if ((void *)0xDEADBEEF != x", @@ -3132,7 +3195,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ], () => { this.emitLine( - cJSON.items!.deleteType, + // @ts-expect-error awaiting refactor + cJSON.items?.deleteType, "(x", child_level.toString(), ");" @@ -3141,7 +3205,8 @@ export class CJSONRenderer extends ConvenienceRenderer { ); } else { this.emitLine( - cJSON.items!.deleteType, + // @ts-expect-error awaiting refactor + cJSON.items?.deleteType, "(x", child_level.toString(), ");" @@ -3204,6 +3269,7 @@ export class CJSONRenderer extends ConvenienceRenderer { }); } }; + recur(classType, 0); this.emitLine("cJSON_free(x);"); }); @@ -3262,7 +3328,7 @@ export class CJSONRenderer extends ConvenienceRenderer { true ); this.ensureBlankLine(); - this.emitTypdefAlias(type, className); + this.emitTypedefAlias(type, className); } /** @@ -3317,40 +3383,42 @@ export class CJSONRenderer extends ConvenienceRenderer { this.emitLine("cJSON * e = NULL;"); this.emitBlock(["cJSON_ArrayForEach(e, j)"], () => { const add = (cJSON: TypeCJSON) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { this.emitLine( "list_add_tail(x->value, (", - cJSON.items!.cType, + cJSON.items?.cType, " *)0xDEADBEAF, sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); - } else if (cJSON.items!.cjsonType === "cJSON_String") { + } else if (cJSON.items?.cjsonType === "cJSON_String") { this.emitLine( "list_add_tail(x->value, strdup(", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e)), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else { this.emitLine( "list_add_tail(x->value, ", - cJSON.items!.getValue, + // @ts-expect-error awaiting refactor + cJSON.items?.getValue, "(e), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock(["if (!cJSON_IsNull(e))"], () => { add(cJSON); }); @@ -3370,40 +3438,42 @@ export class CJSONRenderer extends ConvenienceRenderer { this.emitLine("cJSON * e = NULL;"); this.emitBlock(["cJSON_ArrayForEach(e, j)"], () => { const add = (cJSON: TypeCJSON) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ } else if ( - cJSON.items!.cjsonType === "cJSON_Invalid" || - cJSON.items!.cjsonType === "cJSON_NULL" + cJSON.items?.cjsonType === "cJSON_Invalid" || + cJSON.items?.cjsonType === "cJSON_NULL" ) { this.emitLine( "hashtable_add(x->value, e->string, (", - cJSON.items!.cType, + cJSON.items?.cType, " *)0xDEADBEEF, sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); - } else if (cJSON.items!.cjsonType === "cJSON_String") { + } else if (cJSON.items?.cjsonType === "cJSON_String") { this.emitLine( "hashtable_add(x->value, e->string, strdup(", - cJSON.items!.getValue, + cJSON.items?.getValue, "(e)), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } else { this.emitLine( "hashtable_add(x->value, e->string, ", - cJSON.items!.getValue, + // @ts-expect-error awaiting refactor + cJSON.items?.getValue, "(e), sizeof(", - cJSON.items!.cType, + cJSON.items?.cType, " *));" ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock(["if (!cJSON_IsNull(e))"], () => { add(cJSON); }); @@ -3444,40 +3514,43 @@ export class CJSONRenderer extends ConvenienceRenderer { this.emitBlock(["if (NULL != x->value)"], () => { this.emitLine("j = ", cJSON.createObject, "();"); this.emitBlock(["if (NULL != j)"], () => { - this.emitLine(cJSON.items!.cType, " * x1 = list_get_head(x->value);"); + // @ts-expect-error awaiting refactor + this.emitLine(cJSON.items?.cType, " * x1 = list_get_head(x->value);"); this.emitBlock(["while (NULL != x1)"], () => { const add = (cJSON: TypeCJSON) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Invalid") { + } else if (cJSON.items?.cjsonType === "cJSON_Invalid") { /* Nothing to do */ - } else if (cJSON.items!.cjsonType === "cJSON_NULL") { + } else if (cJSON.items?.cjsonType === "cJSON_NULL") { this.emitLine( "cJSON_AddItemToArray(j, ", - cJSON.items!.createObject, + cJSON.items?.createObject, "());" ); } else if ( - cJSON.items!.cjsonType === "cJSON_String" || - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_String" || + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( "cJSON_AddItemToArray(j, ", - cJSON.items!.createObject, + cJSON.items?.createObject, "(x1));" ); } else { this.emitLine( "cJSON_AddItemToArray(j, ", - cJSON.items!.createObject, + // @ts-expect-error awaiting refactor + cJSON.items?.createObject, "(*x1));" ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock(["if ((void *)0xDEADBEEF != x1)"], () => { add(cJSON); }); @@ -3487,6 +3560,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { add(cJSON); } + this.emitLine("x1 = list_get_next(x->value);"); }); }); @@ -3500,44 +3574,47 @@ export class CJSONRenderer extends ConvenienceRenderer { this.emitBlock(["if (NULL != keys)"], () => { this.emitBlock(["for (size_t index = 0; index < count; index++)"], () => { this.emitLine( - cJSON.items!.cType, + // @ts-expect-error awaiting refactor + cJSON.items?.cType, " *x2 = hashtable_lookup(x->value, keys[index]);" ); const add = (cJSON: TypeCJSON) => { - if (cJSON.items!.cjsonType === "cJSON_Array") { + if (cJSON.items?.cjsonType === "cJSON_Array") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Map") { + } else if (cJSON.items?.cjsonType === "cJSON_Map") { /* Not supported */ - } else if (cJSON.items!.cjsonType === "cJSON_Invalid") { + } else if (cJSON.items?.cjsonType === "cJSON_Invalid") { /* Nothing to do */ - } else if (cJSON.items!.cjsonType === "cJSON_NULL") { + } else if (cJSON.items?.cjsonType === "cJSON_NULL") { this.emitLine( cJSON.addToObject, "(j, keys[index], ", - cJSON.items!.createObject, + cJSON.items?.createObject, "());" ); } else if ( - cJSON.items!.cjsonType === "cJSON_String" || - cJSON.items!.cjsonType === "cJSON_Object" || - cJSON.items!.cjsonType === "cJSON_Union" + cJSON.items?.cjsonType === "cJSON_String" || + cJSON.items?.cjsonType === "cJSON_Object" || + cJSON.items?.cjsonType === "cJSON_Union" ) { this.emitLine( cJSON.addToObject, "(j, keys[index], ", - cJSON.items!.createObject, + cJSON.items?.createObject, "(x2));" ); } else { this.emitLine( cJSON.addToObject, "(j, keys[index], ", - cJSON.items!.createObject, + // @ts-expect-error awaiting refactor + cJSON.items?.createObject, "(*x2));" ); } }; - if (cJSON.items!.isNullable) { + + if (cJSON.items?.isNullable) { this.emitBlock(["if ((void *)0xDEADBEEF != x2)"], () => { add(cJSON); }); @@ -3588,15 +3665,19 @@ export class CJSONRenderer extends ConvenienceRenderer { const cJSON = this.quicktypeTypeToCJSON(type, false); if (cJSON.cjsonType === "cJSON_Array" && cJSON.items !== undefined) { this.emitBlock(["if (NULL != x->value)"], () => { - this.emitLine(cJSON.items!.cType, " * x1 = list_get_head(x->value);"); + // @ts-expect-error awaiting refactor + this.emitLine(cJSON.items?.cType, " * x1 = list_get_head(x->value);"); this.emitBlock(["while (NULL != x1)"], () => { - if (cJSON.items!.isNullable) { + if (cJSON.items?.isNullable) { this.emitBlock(["if ((void *)0xDEADBEEF != x1)"], () => { - this.emitLine(cJSON.items!.deleteType, "(x1);"); + // @ts-expect-error awaiting refactor + this.emitLine(cJSON.items?.deleteType, "(x1);"); }); } else { - this.emitLine(cJSON.items!.deleteType, "(x1);"); + // @ts-expect-error awaiting refactor + this.emitLine(cJSON.items?.deleteType, "(x1);"); } + this.emitLine("x1 = list_get_next(x->value);"); }); this.emitLine(cJSON.deleteType, "(x->value);"); @@ -3607,14 +3688,17 @@ export class CJSONRenderer extends ConvenienceRenderer { this.emitLine("size_t count = hashtable_get_keys(x->value, &keys);"); this.emitBlock(["if (NULL != keys)"], () => { this.emitBlock(["for (size_t index = 0; index < count; index++)"], () => { - this.emitLine(cJSON.items!.cType, " *x2 = hashtable_lookup(x->value, keys[index]);"); + // @ts-expect-error awaiting refactor + this.emitLine(cJSON.items?.cType, " *x2 = hashtable_lookup(x->value, keys[index]);"); this.emitBlock(["if (NULL != x2)"], () => { - if (cJSON.items!.isNullable) { - this.emitBlock(["if ((", cJSON.items!.cType, " *)0xDEADBEEF != x2)"], () => { - this.emitLine(cJSON.items!.deleteType, "(x2);"); + if (cJSON.items?.isNullable) { + this.emitBlock(["if ((", cJSON.items?.cType, " *)0xDEADBEEF != x2)"], () => { + // @ts-expect-error awaiting refactor + this.emitLine(cJSON.items?.deleteType, "(x2);"); }); } else { - this.emitLine(cJSON.items!.deleteType, "(x2);"); + // @ts-expect-error awaiting refactor + this.emitLine(cJSON.items?.deleteType, "(x2);"); } }); }); @@ -3633,6 +3717,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { /* Nothing to do */ } + this.emitLine("cJSON_free(x);"); }); }); @@ -3973,6 +4058,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } else { f(); } + this.preventBlankLine(); if (withSemicolon) { if (withName !== "") { @@ -4014,6 +4100,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } }); } + this.ensureBlankLine(); } @@ -4054,6 +4141,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } } } + if (includes.has(typeName)) { const incKind = includes.get(typeName); /* If we already include the type as typed include, do not write it over with forward declare */ @@ -4130,6 +4218,7 @@ export class CJSONRenderer extends ConvenienceRenderer { } } }; + recur(false, false, 0, type); return result; } diff --git a/packages/quicktype-core/src/language/CPlusPlus.ts b/packages/quicktype-core/src/language/CPlusPlus.ts index 5adff56d2..910f714f9 100644 --- a/packages/quicktype-core/src/language/CPlusPlus.ts +++ b/packages/quicktype-core/src/language/CPlusPlus.ts @@ -1,36 +1,57 @@ import { - setUnion, arrayIntercalate, - toReadonlyArray, - iterableFirst, iterableFind, + iterableFirst, iterableSome, + setUnion, + toReadonlyArray, withDefault } from "collection-utils"; -import { TargetLanguage } from "../TargetLanguage"; -import { Type, TypeKind, ClassType, ClassProperty, ArrayType, MapType, EnumType, UnionType } from "../Type"; -import { nullableFromUnion, matchType, removeNullFromUnion, isNamedType, directlyReachableTypes } from "../TypeUtils"; -import { NameStyle, Name, Namer, funPrefixNamer, DependencyName } from "../Naming"; -import { Sourcelike, maybeAnnotated } from "../Source"; import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; +import { getAccessorName } from "../attributes/AccessorNames"; import { - legalizeCharacters, + type MinMaxConstraint, + minMaxLengthForType, + minMaxValueForType, + patternForType +} from "../attributes/Constraints"; +import { enumCaseValues } from "../attributes/EnumValues"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Declaration } from "../DeclarationIR"; +import { DependencyName, type Name, type NameStyle, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { + BooleanOption, + EnumOption, + type Option, + type OptionValues, + StringOption, + getOptionValues +} from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated } from "../Source"; +import { + type NamingStyle, isAscii, isLetterOrUnderscoreOrDigit, - stringEscape, - NamingStyle, - makeNameStyle + legalizeCharacters, + makeNameStyle, + stringEscape } from "../support/Strings"; -import { defined, assertNever, panic, numberEnumValues } from "../support/Support"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { StringOption, EnumOption, BooleanOption, Option, getOptionValues, OptionValues } from "../RendererOptions"; -import { assert } from "../support/Support"; -import { Declaration } from "../DeclarationIR"; -import { RenderContext } from "../Renderer"; -import { getAccessorName } from "../attributes/AccessorNames"; -import { enumCaseValues } from "../attributes/EnumValues"; -import { minMaxValueForType, minMaxLengthForType, patternForType, MinMaxConstraint } from "../attributes/Constraints"; +import { assert, assertNever, defined, numberEnumValues, panic } from "../support/Support"; +import { TargetLanguage } from "../TargetLanguage"; +import { + ArrayType, + type ClassProperty, + ClassType, + EnumType, + MapType, + type Type, + type TypeKind, + UnionType +} from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { directlyReachableTypes, isNamedType, matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; const pascalValue: [string, NamingStyle] = ["pascal-case", "pascal"]; const underscoreValue: [string, NamingStyle] = ["underscore-case", "underscore"]; @@ -119,11 +140,11 @@ export const cPlusPlusOptions = { }; export class CPlusPlusTargetLanguage extends TargetLanguage { - constructor(displayName = "C++", names: string[] = ["c++", "cpp", "cplusplus"], extension = "cpp") { + public constructor(displayName = "C++", names: string[] = ["c++", "cpp", "cplusplus"], extension = "cpp") { super(displayName, names, extension); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ cPlusPlusOptions.justTypes, cPlusPlusOptions.namespace, @@ -141,18 +162,15 @@ export class CPlusPlusTargetLanguage extends TargetLanguage { ]; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): CPlusPlusRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): CPlusPlusRenderer { return new CPlusPlusRenderer(this, renderContext, getOptionValues(cPlusPlusOptions, untypedOptionValues)); } } @@ -287,65 +305,67 @@ const optionalFactoryAsSharedType = "std::make_shared"; * but in vector or in variant) we can forward declare them; */ export enum IncludeKind { - ForwardDeclare, - Include + ForwardDeclare = "ForwardDeclare", + Include = "Include" } +// FIXME: make these string enums eventually export enum GlobalNames { - ClassMemberConstraints, - ClassMemberConstraintException, - ValueTooLowException, - ValueTooHighException, - ValueTooShortException, - ValueTooLongException, - InvalidPatternException, - CheckConstraint + ClassMemberConstraints = 1, + ClassMemberConstraintException = 2, + ValueTooLowException = 3, + ValueTooHighException = 4, + ValueTooShortException = 5, + ValueTooLongException = 6, + InvalidPatternException = 7, + CheckConstraint = 8 } +// FIXME: make these string enums eventually export enum MemberNames { - MinIntValue, - GetMinIntValue, - SetMinIntValue, - MaxIntValue, - GetMaxIntValue, - SetMaxIntValue, - MinDoubleValue, - GetMinDoubleValue, - SetMinDoubleValue, - MaxDoubleValue, - GetMaxDoubleValue, - SetMaxDoubleValue, - MinLength, - GetMinLength, - SetMinLength, - MaxLength, - GetMaxLength, - SetMaxLength, - Pattern, - GetPattern, - SetPattern + MinIntValue = 1, + GetMinIntValue = 2, + SetMinIntValue = 3, + MaxIntValue = 4, + GetMaxIntValue = 5, + SetMaxIntValue = 6, + MinDoubleValue = 7, + GetMinDoubleValue = 8, + SetMinDoubleValue = 9, + MaxDoubleValue = 10, + GetMaxDoubleValue = 11, + SetMaxDoubleValue = 12, + MinLength = 13, + GetMinLength = 14, + SetMinLength = 15, + MaxLength = 16, + GetMaxLength = 17, + SetMaxLength = 18, + Pattern = 19, + GetPattern = 20, + SetPattern = 21 } -type ConstraintMember = { - name: MemberNames; +interface ConstraintMember { + cppConstType?: string; + cppType: string; getter: MemberNames; + name: MemberNames; setter: MemberNames; - cppType: string; - cppConstType?: string; -}; +} -export type IncludeRecord = { +export interface IncludeRecord { kind: IncludeKind | undefined /** How to include that */; typeKind: TypeKind | undefined /** What exactly to include */; -}; +} -export type TypeRecord = { +export interface TypeRecord { + forceInclude: boolean; + level: number; name: Name; type: Type; - level: number; variant: boolean; - forceInclude: boolean; -}; +} /** * We map each and every unique type to a include kind, e.g. how @@ -353,57 +373,65 @@ export type TypeRecord = { */ export type IncludeMap = Map; -export type TypeContext = { +export interface TypeContext { + inJsonNamespace: boolean; needsForwardIndirection: boolean; needsOptionalIndirection: boolean; - inJsonNamespace: boolean; -}; +} interface StringType { - getType(): string; - getConstType(): string; - getSMatch(): string; - getRegex(): string; - createStringLiteral(inner: Sourcelike): Sourcelike; - wrapToString(inner: Sourcelike): Sourcelike; - wrapEncodingChange( + createStringLiteral: (inner: Sourcelike) => Sourcelike; + emitHelperFunctions: () => void; + getConstType: () => string; + getRegex: () => string; + getSMatch: () => string; + getType: () => string; + wrapEncodingChange: ( qualifier: Sourcelike[], fromType: Sourcelike, toType: Sourcelike, inner: Sourcelike - ): Sourcelike; - emitHelperFunctions(): void; + ) => Sourcelike; + wrapToString: (inner: Sourcelike) => Sourcelike; } function addQualifier(qualifier: Sourcelike, qualified: Sourcelike[]): Sourcelike[] { if (qualified.length === 0) { return []; } + return [qualifier, qualified]; } class WrappingCode { - constructor( + public constructor( private readonly start: Sourcelike[], private readonly end: Sourcelike[] ) {} - wrap(qualifier: Sourcelike, inner: Sourcelike): Sourcelike { + public wrap(qualifier: Sourcelike, inner: Sourcelike): Sourcelike { return [addQualifier(qualifier, this.start), inner, this.end]; } } class BaseString { public _stringType: string; + public _constStringType: string; + public _smatch: string; + public _regex: string; + public _stringLiteralPrefix: string; + public _toString: WrappingCode; + public _encodingClass: Sourcelike; + public _encodingFunction: Sourcelike; - constructor( + public constructor( stringType: string, constStringType: string, smatch: string, @@ -455,28 +483,45 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { private readonly _enumType: string; private readonly _generatedFiles: Set; + private _currentFilename: string | undefined; + private _allTypeNames: Set; + private readonly _gettersAndSettersForPropertyName = new Map(); - private readonly _namespaceNames: ReadonlyArray; + + private readonly _namespaceNames: readonly string[]; + private readonly _memberNameStyle: NameStyle; + private readonly _namedTypeNameStyle: NameStyle; + private readonly _generatedGlobalNames: Map; + private readonly _generatedMemberNames: Map; + private readonly _forbiddenGlobalNames: string[]; + private readonly _memberNamingFunction: Namer; + private readonly _stringType: StringType; + /// The type to use as an optional (std::optional or std::shared) private readonly _optionalType: string; + private readonly _optionalFactory: string; + private readonly _nulloptType: string; + private readonly _variantType: string; + private readonly _variantIndexMethodName: string; protected readonly typeNamingStyle: NamingStyle; + protected readonly enumeratorNamingStyle: NamingStyle; - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -524,14 +569,14 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } // union typeguard - isUnion(t: Type | UnionType): t is UnionType { + private isUnion(t: Type | UnionType): t is UnionType { return t.kind === "union"; } // Returns true if the type can be stored in // a stack based optional type. This requires // that the type does not require forward declaration. - isOptionalAsValuePossible(t: Type): boolean { + private isOptionalAsValuePossible(t: Type): boolean { if (this.isForwardDeclaredType(t)) return false; if (this.isUnion(t)) { @@ -589,45 +634,46 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { return !this.isCycleBreakerType(tt); } } + return !this.isCycleBreakerType(t); } - isImplicitCycleBreaker(t: Type): boolean { + public isImplicitCycleBreaker(t: Type): boolean { const kind = t.kind; return kind === "array" || kind === "map"; } // Is likely to return std::optional or boost::optional - optionalTypeStack(): string { + private optionalTypeStack(): string { return this._optionalType; } // Is likely to return std::make_optional or boost::optional - optionalFactoryStack(): string { + private optionalFactoryStack(): string { return this._optionalFactory; } // Is likely to return std::shared_ptr - optionalTypeHeap(): string { + private optionalTypeHeap(): string { return optionalAsSharedType; } // Is likely to return std::make_shared - optionalFactoryHeap(): string { + private optionalFactoryHeap(): string { return optionalFactoryAsSharedType; } // Returns the optional type most suitable for the given type. // Classes that don't require forward declarations can be stored // in std::optional ( or boost::optional ) - optionalType(t: Type): string { + private optionalType(t: Type): string { if (this.isOptionalAsValuePossible(t)) return this.optionalTypeStack(); else return this.optionalTypeHeap(); } // Returns a label that can be used to distinguish between // heap and stack based optional handling methods - optionalTypeLabel(t: Type): string { + private optionalTypeLabel(t: Type): string { if (this.isOptionalAsValuePossible(t)) return "stack"; else return "heap"; } @@ -702,6 +748,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { for (const v of numberEnumValues(GlobalNames)) { this.addGlobalName(v); } + for (const v of numberEnumValues(MemberNames)) { this.addMemberName(v); } @@ -789,6 +836,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { if (this._options.boost) { this.emitCommentLines([" Boost http://www.boost.org"]); } + this.emitCommentLines([ " json.hpp https://github.com/nlohmann/json", "", @@ -803,6 +851,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } else { this.emitLine("// ", basename, " data = nlohmann::json::parse(jsonString);"); } + if (this._options.wstring) { this.emitLine("//"); this.emitLine("// You can get std::wstring data back out using"); @@ -812,6 +861,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { }); } } + this.ensureBlankLine(); this.emitLine("#pragma once"); @@ -824,6 +874,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { this.emitInclude(true, "optional"); } } + if (this.haveNamedUnions) { if (this._options.boost) { this.emitInclude(true, "boost/variant.hpp"); @@ -831,6 +882,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { this.emitInclude(true, "variant"); } } + if (!this._options.justTypes) { if (!this._options.includeLocation) { this.emitInclude(true, "nlohmann/json.hpp"); @@ -842,6 +894,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { this.emitInclude(false, "helper.hpp"); } } + this.ensureBlankLine(); } @@ -871,6 +924,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } else { f(); } + this.preventBlankLine(); if (withSemicolon) { this.emitLine("};"); @@ -903,11 +957,13 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { if (nonNulls.size === 1) { return this.cppType(defined(iterableFirst(nonNulls)), ctx, withIssues, forceNarrowString, false); } + const typeList: Sourcelike = []; for (const t of nonNulls) { if (typeList.length !== 0) { typeList.push(", "); } + typeList.push( this.cppType( t, @@ -922,6 +978,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { ) ); } + return [this._variantType, "<", typeList, ">"]; } @@ -942,6 +999,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { if (!indirection) { return variant; } + return [this.optionalType(u), "<", variant, ">"]; } @@ -975,6 +1033,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } } } + const typeSource = matchType( t, _anyType => { @@ -1027,6 +1086,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { if (forceNarrowString) { keyType = "std::string"; } + return [ "std::map<", keyType, @@ -1076,7 +1136,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { */ protected generatedTypes(isClassMember: boolean, theType: Type): TypeRecord[] { const result: TypeRecord[] = []; - const recur = (forceInclude: boolean, isVariant: boolean, l: number, t: Type) => { + const recur = (forceInclude: boolean, isVariant: boolean, l: number, t: Type): void => { if (t instanceof ArrayType) { recur(true, isVariant, l + 1, t.items); } else if (t instanceof ClassType) { @@ -1132,6 +1192,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } } }; + recur(false, false, 0, theType); return result; } @@ -1268,6 +1329,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { ); } } + this.ensureBlankLine(); } }); @@ -1522,6 +1584,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { ); return; } + if (p.isOptional || propType instanceof UnionType) { const [nullOrOptional, typeSet] = (function (): [boolean, ReadonlySet] { if (propType instanceof UnionType) { @@ -1583,6 +1646,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { return; } } + cppType = this.cppType( propType, { @@ -1664,6 +1728,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } else { getter = [name]; } + const assignment: Sourcelike[] = [ "j[", this._stringType.wrapEncodingChange( @@ -1750,7 +1815,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { const ourQualifier = this.ourQualifier(true) as string; - const functionForKind: [string, string][] = [ + const functionForKind: Array<[string, string]> = [ ["bool", "is_boolean"], ["integer", "is_number_integer"], ["double", "is_number"], @@ -1824,6 +1889,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { }); onFirst = false; } + this.emitLine('else throw std::runtime_error("Could not deserialise!");'); } ); @@ -1873,6 +1939,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { }); i++; } + this.emitLine('default: throw std::runtime_error("Input JSON does not conform to schema!");'); }); } @@ -1886,7 +1953,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { this.emitLine("void to_json(json & j, ", this.withConst([ourQualifier, enumName]), " & x);"); } - private isLargeEnum(e: EnumType) { + private isLargeEnum(e: EnumType): boolean { // This is just an estimation. Someone might want to do some // benchmarks to find the optimum value here return e.cases.size > 15; @@ -2058,7 +2125,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { this.emitLine("#define NLOHMANN_OPT_HELPER"); this.emitNamespaces(["nlohmann"], () => { - const emitAdlStruct = (optType: string, factory: string) => { + const emitAdlStruct = (optType: string, factory: string): void => { this.emitLine("template "); this.emitBlock(["struct adl_serializer<", optType, ">"], true, () => { this.emitBlock( @@ -2082,6 +2149,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { ); }); }; + emitAdlStruct(this.optionalTypeHeap(), this.optionalFactoryHeap()); emitAdlStruct(this.optionalTypeStack(), this.optionalFactoryStack()); }); @@ -2211,6 +2279,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { for (const member of constraintMembers) { this.emitMember([this._optionalType, "<", member.cppType, ">"], this.lookupMemberName(member.name)); } + this.ensureBlankLine(); this.emitLine("public:"); this.emitLine(classConstraint, "("); @@ -2499,6 +2568,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } ); }; + emitGetOptional(this.optionalTypeHeap(), "heap"); emitGetOptional(this.optionalTypeStack(), "stack"); @@ -2517,6 +2587,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } else { this.emitInclude(true, "optional"); } + this.emitInclude(true, "stdexcept"); this.emitInclude(true, "regex"); } @@ -2561,6 +2632,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { this.ensureBlankLine(); this.emitHelperFunctions(); } + this.forEachDeclaration("interposing", decl => this.emitDeclaration(decl)); if (this._options.justTypes) return; this.forEachTopLevel( @@ -2572,11 +2644,11 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { protected gatherUserNamespaceForwardDecls(): Sourcelike[] { return this.gatherSource(() => { - this.forEachObject("leading-and-interposing", (_: any, className: Name) => + this.forEachObject("leading-and-interposing", (_: unknown, className: Name) => this.emitClassHeaders(className) ); - this.forEachEnum("leading-and-interposing", (_: any, enumName: Name) => this.emitEnumHeaders(enumName)); + this.forEachEnum("leading-and-interposing", (_: unknown, enumName: Name) => this.emitEnumHeaders(enumName)); }); } @@ -2674,6 +2746,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { this.emitOptionalHelpers(); this.ensureBlankLine(); } + this.emitNamespaces(this._namespaceNames, () => this.emitTypes()); } @@ -2922,7 +2995,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } } - protected isConversionRequired(t: Type) { + protected isConversionRequired(t: Type): boolean { const originalType = this.cppType( t, { @@ -2951,7 +3024,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { } public NarrowString = new (class extends BaseString implements StringType { - constructor() { + public constructor() { super( "std::string", "const std::string & ", @@ -2979,7 +3052,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { })(); public WideString = new (class extends BaseString implements StringType { - constructor(public superThis: CPlusPlusRenderer) { + public constructor(public superThis: CPlusPlusRenderer) { super( "std::wstring", "const std::wstring & ", diff --git a/packages/quicktype-core/src/language/CSharp.ts b/packages/quicktype-core/src/language/CSharp.ts index 8aa03ec13..331345d66 100644 --- a/packages/quicktype-core/src/language/CSharp.ts +++ b/packages/quicktype-core/src/language/CSharp.ts @@ -1,70 +1,81 @@ import { arrayIntercalate } from "collection-utils"; +import unicode from "unicode-properties"; +import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; +import { minMaxLengthForType, minMaxValueForType } from "../attributes/Constraints"; +import { ConvenienceRenderer, type ForbiddenWordsInfo, inferredNameOrder } from "../ConvenienceRenderer"; +import { DependencyName, type Name, type Namer, SimpleName, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; import { - Type, - EnumType, - UnionType, - ClassType, - ClassProperty, - ArrayType, - TransformedStringTypeKind, - PrimitiveStringTypeKind, - PrimitiveType -} from "../Type"; -import { matchType, nullableFromUnion, removeNullFromUnion, directlyReachableSingleNamedType } from "../TypeUtils"; -import { Sourcelike, maybeAnnotated, modifySource } from "../Source"; + BooleanOption, + EnumOption, + type Option, + type OptionValues, + StringOption, + getOptionValues +} from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated, modifySource } from "../Source"; import { - utf16LegalizeCharacters, - utf16StringEscape, - splitIntoWords, + type WordInName, + camelCase, combineWords, firstUpperWordStyle, - camelCase, - WordInName + splitIntoWords, + utf16LegalizeCharacters, + utf16StringEscape } from "../support/Strings"; -import { defined, assert, panic, assertNever } from "../support/Support"; -import { Name, DependencyName, Namer, funPrefixNamer, SimpleName } from "../Naming"; -import { ConvenienceRenderer, ForbiddenWordsInfo, inferredNameOrder } from "../ConvenienceRenderer"; +import { assert, assertNever, defined, panic } from "../support/Support"; import { TargetLanguage } from "../TargetLanguage"; -import { StringOption, EnumOption, Option, BooleanOption, OptionValues, getOptionValues } from "../RendererOptions"; -import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { StringTypeMapping } from "../TypeBuilder"; import { - followTargetType, - transformationForType, - Transformer, - DecodingTransformer, - DecodingChoiceTransformer, - UnionInstantiationTransformer, + ArrayDecodingTransformer, + ArrayEncodingTransformer, ChoiceTransformer, - UnionMemberMatchTransformer, + DecodingChoiceTransformer, + DecodingTransformer, EncodingTransformer, + MinMaxLengthCheckTransformer, + MinMaxValueTransformer, + ParseStringTransformer, StringMatchTransformer, StringProducerTransformer, - ParseStringTransformer, StringifyTransformer, - Transformation, - ArrayDecodingTransformer, - ArrayEncodingTransformer, - MinMaxLengthCheckTransformer, - MinMaxValueTransformer + type Transformation, + type Transformer, + UnionInstantiationTransformer, + UnionMemberMatchTransformer, + followTargetType, + transformationForType } from "../Transformers"; -import { RenderContext } from "../Renderer"; -import { minMaxLengthForType, minMaxValueForType } from "../attributes/Constraints"; -import * as unicode from "unicode-properties"; +import { + ArrayType, + type ClassProperty, + ClassType, + EnumType, + type PrimitiveStringTypeKind, + type PrimitiveType, + type TransformedStringTypeKind, + type Type, + UnionType +} from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { directlyReachableSingleNamedType, matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; export enum Framework { - Newtonsoft, - SystemTextJson + Newtonsoft = "Newtonsoft", + SystemTextJson = "SystemTextJson" } export type Version = 5 | 6; -export type OutputFeatures = { helpers: boolean; attributes: boolean }; +export interface OutputFeatures { + attributes: boolean; + helpers: boolean; +} export enum AccessModifier { - None, - Public, - Internal + None = "None", + Public = "Public", + Internal = "Internal" } export type CSharpTypeForAny = "object" | "dynamic"; @@ -80,17 +91,20 @@ function needTransformerForType(t: Type): "automatic" | "manual" | "nullable" | if (needTransformerForType(maybeNullable) === "manual") return "nullable"; return "none"; } + if (t instanceof ArrayType) { const itemsNeed = needTransformerForType(t.items); if (itemsNeed === "manual" || itemsNeed === "nullable") return "automatic"; return "none"; } + if (t instanceof EnumType) return "automatic"; if (t.kind === "double") return minMaxValueForType(t) !== undefined ? "manual" : "none"; if (t.kind === "integer-string" || t.kind === "bool-string") return "manual"; if (t.kind === "string") { return minMaxLengthForType(t) !== undefined ? "manual" : "none"; } + return "none"; } @@ -195,11 +209,11 @@ export const cSharpOptions = { }; export class CSharpTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("C#", ["cs", "csharp"], "cs"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ cSharpOptions.framework, cSharpOptions.namespace, @@ -216,7 +230,7 @@ export class CSharpTargetLanguage extends TargetLanguage { ]; } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); mapping.set("date", "date-time"); mapping.set("time", "date-time"); @@ -228,23 +242,20 @@ export class CSharpTargetLanguage extends TargetLanguage { return mapping; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - needsTransformerForType(t: Type): boolean { + public needsTransformerForType(t: Type): boolean { const need = needTransformerForType(t); return need !== "none" && need !== "nullable"; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): ConvenienceRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): ConvenienceRenderer { const options = getOptionValues(cSharpOptions, untypedOptionValues); switch (options.framework) { @@ -278,14 +289,16 @@ function isStartCharacter(utf16Unit: number): boolean { if (unicode.isAlphabetic(utf16Unit)) { return true; } + return utf16Unit === 0x5f; // underscore } function isPartCharacter(utf16Unit: number): boolean { const category: string = unicode.getCategory(utf16Unit); - if (["Nd", "Pc", "Mn", "Mc"].indexOf(category) >= 0) { + if (["Nd", "Pc", "Mn", "Mc"].includes(category)) { return true; } + return isStartCharacter(utf16Unit); } @@ -411,11 +424,12 @@ function isValueType(t: Type): boolean { if (t instanceof UnionType) { return nullableFromUnion(t) === null; } - return ["integer", "double", "bool", "enum", "date-time", "uuid"].indexOf(t.kind) >= 0; + + return ["integer", "double", "bool", "enum", "date-time", "uuid"].includes(t.kind); } export class CSharpRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _csOptions: OptionValues @@ -523,9 +537,11 @@ export class CSharpRenderer extends ConvenienceRenderer { return csType; } } + protected baseclassForType(_t: Type): Sourcelike | undefined { return undefined; } + protected emitType( description: string[] | undefined, accessModifier: AccessModifier, @@ -544,12 +560,14 @@ export class CSharpRenderer extends ConvenienceRenderer { default: break; } + this.emitDescription(description); if (baseclass === undefined) { this.emitLine(declaration, " ", name); } else { this.emitLine(declaration, " ", name, " : ", baseclass); } + this.emitBlock(emitter); } @@ -614,6 +632,7 @@ export class CSharpRenderer extends ConvenienceRenderer { ) { this.ensureBlankLine(); } + this.emitDescription(description); this.emitLine(property); } else if (this._csOptions.dense && attributes.length > 0) { @@ -624,6 +643,7 @@ export class CSharpRenderer extends ConvenienceRenderer { for (const attribute of attributes) { this.emitLine(attribute); } + this.emitLine(property); } @@ -781,10 +801,12 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { private readonly _enumExtensionsNames = new Map(); private readonly _needHelpers: boolean; + private readonly _needAttributes: boolean; + private readonly _needNamespaces: boolean; - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -812,9 +834,11 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { if (this._options.dense) { forbidden.push("J", "R", "N"); } + if (this._options.baseclass !== undefined) { forbidden.push(this._options.baseclass); } + return super.forbiddenNamesForGlobalNamespace().concat(forbidden); } @@ -830,8 +854,10 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { if (xfer instanceof DecodingTransformer && xfer.consumer !== undefined) { xfer = xfer.consumer; } + return new SimpleName([`${xfer.kind}_converter`], namingFunction, inferredNameOrder + 30); } + return new DependencyName(namingFunction, typeName.order + 30, lookup => `${lookup(typeName)}_converter`); } @@ -863,13 +889,16 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { this.emitUsing([denseRequiredEnumName, " = Newtonsoft.Json.Required"]); this.emitUsing([denseNullValueHandlingEnumName, " = Newtonsoft.Json.NullValueHandling"]); } + if (this._options.baseclass === "EntityData") { this.emitUsing("Microsoft.Azure.Mobile.Server"); } } + protected baseclassForType(_t: Type): Sourcelike | undefined { return this._options.baseclass; } + protected emitDefaultLeadingComments(): void { if (!this._needHelpers) return; @@ -890,6 +919,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { } else { rhs = [topLevelName, ".FromJson(jsonString)"]; } + this.emitLine("// var ", modifySource(camelCase, topLevelName), " = ", rhs, ";"); }); } @@ -940,6 +970,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { } else { required = [", Required = ", requiredClass, ".Always", nullValueHandling]; } + attributes.push(["[", jsonProperty, '("', escapedName, '"', required, ")]"]); const converter = this.converterForType(property.type); @@ -972,6 +1003,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { partial = ""; typeKind = "class"; } + const csType = this.topLevelResultType(t); this.emitType(undefined, AccessModifier.Public, [partial, typeKind], name, this.baseclassForType(t), () => { // FIXME: Make FromJson a Named @@ -1063,9 +1095,10 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { this.emitLine(this.converterObject(converter), ","); } } + this.emitLine("new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }"); }); - this.emitLine(`},`); + this.emitLine("},"); }, true); }); } @@ -1082,6 +1115,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { for (const tokenCase of tokenCases) { this.emitTokenCase(tokenCase); } + this.indent(() => { const allHandled = this.emitDecodeTransformer(xfer, targetType, emitFinish, variableName); if (!allHandled) { @@ -1129,12 +1163,14 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { let output = targetType.kind === "double" ? targetType : source; this.emitLine("var ", variableName, " = ", this.deserializeTypeCode(this.csType(output)), ";"); } + return this.emitConsume(variableName, xfer.consumer, targetType, emitFinish); } else if (xfer instanceof ArrayDecodingTransformer) { // FIXME: Consume StartArray if (!(targetType instanceof ArrayType)) { return panic("Array decoding must produce an array type"); } + // FIXME: handle EOF this.emitLine("reader.Read();"); this.emitLine("var ", variableName, " = new List<", this.csType(targetType.items), ">();"); @@ -1153,6 +1189,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { if (!this._options.useList) { result = [result, ".ToArray()"]; } + emitFinish(result); return true; } else if (xfer instanceof DecodingChoiceTransformer) { @@ -1167,6 +1204,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { } }); } + this.emitDecoderTransformerCase( ["Integer"], "integerValue", @@ -1216,6 +1254,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { } else if (t instanceof EnumType) { return [this.nameForNamedType(t), ".", this.nameForEnumCase(t, stringCase)]; } + return panic(`Type ${t.kind} does not have string cases`); } @@ -1229,6 +1268,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { if (continuation === undefined) { return targetType; } + return followTargetType(continuation.sourceType); } @@ -1285,9 +1325,11 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { member = [variable, ".", memberName]; test = [member, " != null"]; } + if (memberType.kind !== "null" && isValueType(memberType)) { member = [member, ".Value"]; } + this.emitLine("if (", test, ")"); this.emitBlock(() => this.emitTransformer(member, xfer.transformer, targetType, emitFinish)); } else if (xfer instanceof StringMatchTransformer) { @@ -1302,6 +1344,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { } else { this.emitLine(this.serializeValueCode(variable), ";"); } + emitFinish([]); return true; } else if (xfer instanceof ArrayEncodingTransformer) { @@ -1386,9 +1429,11 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { if (min !== undefined) { conditions.push([variable, ".Length >= ", min.toString()]); } + if (max !== undefined) { conditions.push([variable, ".Length <= ", max.toString()]); } + this.emitLine("if (", arrayIntercalate([" && "], conditions), ")"); this.emitBlock(() => this.emitConsume(variable, xfer.consumer, targetType, emitFinish)); return false; @@ -1400,9 +1445,11 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { if (min !== undefined) { conditions.push([variable, " >= ", min.toString()]); } + if (max !== undefined) { conditions.push([variable, " <= ", max.toString()]); } + this.emitLine("if (", arrayIntercalate([" && "], conditions), ")"); this.emitBlock(() => this.emitConsume(variable, xfer.consumer, targetType, emitFinish)); return false; @@ -1410,6 +1457,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { if (!(targetType instanceof UnionType)) { return panic("Union instantiation transformer must produce a union type"); } + const maybeNullable = nullableFromUnion(targetType); if (maybeNullable !== null) { emitFinish(variable); @@ -1422,12 +1470,15 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { const memberName = this.nameForUnionMember(targetType, xfer.sourceType); initializer = [" ", memberName, " = ", variable, " "]; } + emitFinish(["new ", unionName, " {", initializer, "}"]); } + return true; } else { return panic("Unknown transformer"); } + return false; } @@ -1443,6 +1494,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { if (haveNullable) { canConvertExpr = [canConvertExpr, " || t == typeof(", csType, "?)"]; } + this.emitCanConvert(canConvertExpr); this.ensureBlankLine(); this.emitReadJson(() => { @@ -1471,6 +1523,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { this.emitLine("return;"); }); } + this.emitLine("var value = (", csType, ")untypedValue;"); const allHandled = this.emitTransformer("value", reverse.transformer, reverse.targetType, () => this.emitLine("return;") @@ -1490,6 +1543,7 @@ export class NewtonsoftCSharpRenderer extends CSharpRenderer { this.ensureBlankLine(); this.emitSerializeClass(); } + if (this._needHelpers || (this._needAttributes && (this.haveNamedUnions || this.haveEnums))) { this.ensureBlankLine(); this.emitConverterClass(); @@ -1508,10 +1562,12 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { private readonly _enumExtensionsNames = new Map(); private readonly _needHelpers: boolean; + private readonly _needAttributes: boolean; + private readonly _needNamespaces: boolean; - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -1540,9 +1596,11 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { if (this._options.dense) { forbidden.push("J", "R", "N"); } + if (this._options.baseclass !== undefined) { forbidden.push(this._options.baseclass); } + return super.forbiddenNamesForGlobalNamespace().concat(forbidden); } @@ -1558,8 +1616,10 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { if (xfer instanceof DecodingTransformer && xfer.consumer !== undefined) { xfer = xfer.consumer; } + return new SimpleName([`${xfer.kind}_converter`], namingFunction, inferredNameOrder + 30); } + return new DependencyName(namingFunction, typeName.order + 30, lookup => `${lookup(typeName)}_converter`); } @@ -1591,6 +1651,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { // this.emitUsing([denseRequiredEnumName, " = Newtonsoft.Json.Required"]); this.emitUsing([denseNullValueHandlingEnumName, " = System.Text.Json.Serialization.JsonIgnoreCondition"]); } + if (this._options.baseclass === "EntityData") { this.emitUsing("Microsoft.Azure.Mobile.Server"); } @@ -1628,6 +1689,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { } else { rhs = [topLevelName, ".FromJson(jsonString)"]; } + this.emitLine("// var ", modifySource(camelCase, topLevelName), " = ", rhs, ";"); }); @@ -1721,6 +1783,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { partial = ""; typeKind = "class"; } + const csType = this.topLevelResultType(t); this.emitType(undefined, AccessModifier.Public, [partial, typeKind], name, this.baseclassForType(t), () => { // FIXME: Make FromJson a Named @@ -1833,12 +1896,13 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { this.emitLine(this.converterObject(converter), ","); } } + this.emitLine("new DateOnlyConverter(),"); this.emitLine("new TimeOnlyConverter(),"); this.emitLine("IsoDateTimeOffsetConverter.Singleton"); // this.emitLine("new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }"); }); - this.emitLine(`},`); + this.emitLine("},"); }, true); }); } @@ -1855,6 +1919,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { for (const tokenCase of tokenCases) { this.emitTokenCase(tokenCase); } + this.indent(() => { const allHandled = this.emitDecodeTransformer(xfer, targetType, emitFinish, variableName); if (!allHandled) { @@ -1902,12 +1967,14 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { let output = targetType.kind === "double" ? targetType : source; this.emitLine("var ", variableName, " = ", this.deserializeTypeCode(this.csType(output)), ";"); } + return this.emitConsume(variableName, xfer.consumer, targetType, emitFinish); } else if (xfer instanceof ArrayDecodingTransformer) { // FIXME: Consume StartArray if (!(targetType instanceof ArrayType)) { return panic("Array decoding must produce an array type"); } + // FIXME: handle EOF this.emitLine("reader.Read();"); this.emitLine("var ", variableName, " = new List<", this.csType(targetType.items), ">();"); @@ -1926,6 +1993,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { if (!this._options.useList) { result = [result, ".ToArray()"]; } + emitFinish(result); return true; } else if (xfer instanceof DecodingChoiceTransformer) { @@ -1940,6 +2008,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { } }); } + this.emitDecoderTransformerCase( ["Number"], "integerValue", @@ -1997,6 +2066,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { } else if (t instanceof EnumType) { return [this.nameForNamedType(t), ".", this.nameForEnumCase(t, stringCase)]; } + return panic(`Type ${t.kind} does not have string cases`); } @@ -2010,6 +2080,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { if (continuation === undefined) { return targetType; } + return followTargetType(continuation.sourceType); } @@ -2066,9 +2137,11 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { member = [variable, ".", memberName]; test = [member, " != null"]; } + if (memberType.kind !== "null" && isValueType(memberType)) { member = [member, ".Value"]; } + this.emitLine("if (", test, ")"); this.emitBlock(() => this.emitTransformer(member, xfer.transformer, targetType, emitFinish)); } else if (xfer instanceof StringMatchTransformer) { @@ -2083,6 +2156,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { } else { this.emitLine(this.serializeValueCode(variable), ";"); } + emitFinish([]); return true; } else if (xfer instanceof ArrayEncodingTransformer) { @@ -2173,9 +2247,11 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { if (min !== undefined) { conditions.push([variable, ".Length >= ", min.toString()]); } + if (max !== undefined) { conditions.push([variable, ".Length <= ", max.toString()]); } + this.emitLine("if (", arrayIntercalate([" && "], conditions), ")"); this.emitBlock(() => this.emitConsume(variable, xfer.consumer, targetType, emitFinish)); return false; @@ -2187,9 +2263,11 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { if (min !== undefined) { conditions.push([variable, " >= ", min.toString()]); } + if (max !== undefined) { conditions.push([variable, " <= ", max.toString()]); } + this.emitLine("if (", arrayIntercalate([" && "], conditions), ")"); this.emitBlock(() => this.emitConsume(variable, xfer.consumer, targetType, emitFinish)); return false; @@ -2197,6 +2275,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { if (!(targetType instanceof UnionType)) { return panic("Union instantiation transformer must produce a union type"); } + const maybeNullable = nullableFromUnion(targetType); if (maybeNullable !== null) { emitFinish(variable); @@ -2209,12 +2288,15 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { const memberName = this.nameForUnionMember(targetType, xfer.sourceType); initializer = [" ", memberName, " = ", variable, " "]; } + emitFinish(["new ", unionName, " {", initializer, "}"]); } + return true; } else { return panic("Unknown transformer"); } + return false; } @@ -2292,6 +2374,7 @@ export class SystemTextJsonCSharpRenderer extends CSharpRenderer { this.ensureBlankLine(); this.emitSerializeClass(); } + if (this._needHelpers || (this._needAttributes && (this.haveNamedUnions || this.haveEnums))) { this.ensureBlankLine(); this.emitConverterClass(); diff --git a/packages/quicktype-core/src/language/Crystal.ts b/packages/quicktype-core/src/language/Crystal.ts index 3b469fe15..9816191bc 100644 --- a/packages/quicktype-core/src/language/Crystal.ts +++ b/packages/quicktype-core/src/language/Crystal.ts @@ -1,33 +1,34 @@ -import { TargetLanguage } from "../TargetLanguage"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { type Option } from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated } from "../Source"; import { - legalizeCharacters, - splitIntoWords, - isLetterOrUnderscoreOrDigit, - combineWords, allLowerWordStyle, + combineWords, + escapeNonPrintableMapper, firstUpperWordStyle, intToHex, - utf32ConcatMap, - escapeNonPrintableMapper, - isPrintable, isAscii, - isLetterOrUnderscore + isLetterOrUnderscore, + isLetterOrUnderscoreOrDigit, + isPrintable, + legalizeCharacters, + splitIntoWords, + utf32ConcatMap } from "../support/Strings"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { UnionType, Type, ClassType, EnumType } from "../Type"; +import { TargetLanguage } from "../TargetLanguage"; +import { type ClassType, type EnumType, type Type, type UnionType } from "../Type"; +import { type FixMeOptionsAnyType } from "../types"; import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { Sourcelike, maybeAnnotated } from "../Source"; -import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { Option } from "../RendererOptions"; -import { RenderContext } from "../Renderer"; export class CrystalTargetLanguage extends TargetLanguage { protected makeRenderer(renderContext: RenderContext): CrystalRenderer { return new CrystalRenderer(this, renderContext); } - constructor() { + public constructor() { super("Crystal", ["crystal", "cr", "crystallang"], "cr"); } @@ -35,7 +36,7 @@ export class CrystalTargetLanguage extends TargetLanguage { return " "; } - protected getOptions(): Option[] { + protected getOptions(): Array> { return []; } } @@ -183,6 +184,7 @@ function isAsciiLetterOrUnderscoreOrDigit(codePoint: number): boolean { if (!isAscii(codePoint)) { return false; } + return isLetterOrUnderscoreOrDigit(codePoint); } @@ -190,6 +192,7 @@ function isAsciiLetterOrUnderscore(codePoint: number): boolean { if (!isAscii(codePoint)) { return false; } + return isLetterOrUnderscore(codePoint); } @@ -228,7 +231,7 @@ function standardUnicodeCrystalEscape(codePoint: number): string { const crystalStringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, standardUnicodeCrystalEscape)); export class CrystalRenderer extends ConvenienceRenderer { - constructor(targetLanguage: TargetLanguage, renderContext: RenderContext) { + public constructor(targetLanguage: TargetLanguage, renderContext: RenderContext) { super(targetLanguage, renderContext); } @@ -319,7 +322,7 @@ export class CrystalRenderer extends ConvenienceRenderer { protected emitStructDefinition(c: ClassType, className: Name): void { this.emitDescription(this.descriptionForType(c)); - const structBody = () => + const structBody = (): void => this.forEachClassProperty(c, "none", (name, jsonName, prop) => { this.ensureBlankLine(); this.emitDescription(this.descriptionForClassProperty(c, jsonName)); diff --git a/packages/quicktype-core/src/language/Dart.ts b/packages/quicktype-core/src/language/Dart.ts index 6dc40ead6..d8d471ec9 100644 --- a/packages/quicktype-core/src/language/Dart.ts +++ b/packages/quicktype-core/src/language/Dart.ts @@ -1,14 +1,9 @@ -import { - ClassProperty, - ClassType, - EnumType, - PrimitiveStringTypeKind, - TransformedStringTypeKind, - Type, - UnionType -} from "../Type"; -import { directlyReachableSingleNamedType, matchType, nullableFromUnion } from "../TypeUtils"; -import { maybeAnnotated, modifySource, Sourcelike } from "../Source"; +import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { DependencyName, type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, type Option, type OptionValues, StringOption, getOptionValues } from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated, modifySource } from "../Source"; import { allLowerWordStyle, allUpperWordStyle, @@ -26,16 +21,20 @@ import { utf16ConcatMap, utf16LegalizeCharacters } from "../support/Strings"; - -import { StringTypeMapping } from "../TypeBuilder"; - -import { DependencyName, funPrefixNamer, Name, Namer } from "../Naming"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { TargetLanguage } from "../TargetLanguage"; -import { BooleanOption, getOptionValues, Option, OptionValues, StringOption } from "../RendererOptions"; -import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; import { defined } from "../support/Support"; -import { RenderContext } from "../Renderer"; +import { TargetLanguage } from "../TargetLanguage"; +import { + type ClassProperty, + type ClassType, + EnumType, + type PrimitiveStringTypeKind, + type TransformedStringTypeKind, + type Type, + type UnionType +} from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { directlyReachableSingleNamedType, matchType, nullableFromUnion } from "../TypeUtils"; export const dartOptions = { nullSafety: new BooleanOption("null-safety", "Null Safety", true), @@ -62,11 +61,11 @@ export const dartOptions = { }; export class DartTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Dart", ["dart"], "dart"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ dartOptions.nullSafety, dartOptions.justTypes, @@ -82,18 +81,18 @@ export class DartTargetLanguage extends TargetLanguage { ]; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); mapping.set("date", "date"); mapping.set("date-time", "date-time"); return mapping; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): DartRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): DartRenderer { const options = getOptionValues(dartOptions, untypedOptionValues); return new DartRenderer(this, renderContext, options); } @@ -215,20 +214,25 @@ function dartNameStyle(startWithUpper: boolean, upperUnderscore: boolean, origin ); } -type TopLevelDependents = { - encoder: Name; +interface TopLevelDependents { decoder: Name; -}; + encoder: Name; +} export class DartRenderer extends ConvenienceRenderer { private readonly _gettersAndSettersForPropertyName = new Map(); + private _needEnumValues = false; + private classCounter = 0; + private classPropertyCounter = 0; + private readonly _topLevelDependents = new Map(); + private readonly _enumValues = new Map(); - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -345,12 +349,15 @@ export class DartRenderer extends ConvenienceRenderer { if (this._options.requiredProperties) { this.emitLine("import 'package:meta/meta.dart';"); } + if (this._options.useFreezed) { this.emitLine("import 'package:freezed_annotation/freezed_annotation.dart';"); } + if (this._options.useHive) { this.emitLine("import 'package:hive/hive.dart';"); } + if (this._options.useJsonAnnotation && !this._options.useFreezed) { // The freezed annotatation import already provides the import for json_annotation this.emitLine("import 'package:json_annotation/json_annotation.dart';"); @@ -368,6 +375,7 @@ export class DartRenderer extends ConvenienceRenderer { if (this._options.useFreezed) { this.emitLine("part '", name, ".freezed.dart';"); } + if (!this._options.justTypes) { this.emitLine("part '", name, ".g.dart';"); } @@ -405,6 +413,7 @@ export class DartRenderer extends ConvenienceRenderer { if (maybeNullable === null) { return "dynamic"; } + return withNullable(this.dartType(maybeNullable, withIssues)); }, transformedStringType => { @@ -423,6 +432,7 @@ export class DartRenderer extends ConvenienceRenderer { if (this._options.nullSafety && isNullable && !this._options.requiredProperties) { return [list, " == null ? [] : ", "List<", itemType, ">.from(", list, "!.map((x) => ", mapper, "))"]; } + return ["List<", itemType, ">.from(", list, ".map((x) => ", mapper, "))"]; } @@ -430,10 +440,11 @@ export class DartRenderer extends ConvenienceRenderer { if (this._options.nullSafety && isNullable && !this._options.requiredProperties) { return ["Map.from(", map, "!).map((k, v) => MapEntry(k, ", valueMapper, "))"]; } + return ["Map.from(", map, ").map((k, v) => MapEntry(k, ", valueMapper, "))"]; } - protected mapClass(isNullable: boolean, classType: ClassType, dynamic: Sourcelike) { + protected mapClass(isNullable: boolean, classType: ClassType, dynamic: Sourcelike): Sourcelike { if (this._options.nullSafety && isNullable && !this._options.requiredProperties) { return [ dynamic, @@ -446,12 +457,15 @@ export class DartRenderer extends ConvenienceRenderer { ")" ]; } + return [this.nameForNamedType(classType), ".", this.fromJson, "(", dynamic, ")"]; } - //If the first time is the unionType type, after nullableFromUnion conversion, - //the isNullable property will become false, which is obviously wrong, - //so add isNullable property + // FIXME: refactor this + // If the first time is the unionType type, after nullableFromUnion conversion, + // the isNullable property will become false, which is obviously wrong, + // so add isNullable property + // eslint-disable-next-line @typescript-eslint/default-param-last protected fromDynamicExpression(isNullable: boolean = false, t: Type, ...dynamic: Sourcelike[]): Sourcelike { return matchType( t, @@ -489,6 +503,7 @@ export class DartRenderer extends ConvenienceRenderer { if (maybeNullable === null) { return dynamic; } + return this.fromDynamicExpression(unionType.isNullable, maybeNullable, dynamic); }, transformedStringType => { @@ -502,6 +517,7 @@ export class DartRenderer extends ConvenienceRenderer { ) { return [dynamic, " == null ? null : ", "DateTime.parse(", dynamic, ")"]; } + return ["DateTime.parse(", dynamic, ")"]; default: return dynamic; @@ -510,9 +526,11 @@ export class DartRenderer extends ConvenienceRenderer { ); } - //If the first time is the unionType type, after nullableFromUnion conversion, - //the isNullable property will become false, which is obviously wrong, - //so add isNullable property + // FIXME: refactor this + // If the first time is the unionType type, after nullableFromUnion conversion, + // the isNullable property will become false, which is obviously wrong, + // so add isNullable property + // eslint-disable-next-line @typescript-eslint/default-param-last protected toDynamicExpression(isNullable: boolean = false, t: Type, ...dynamic: Sourcelike[]): Sourcelike { return matchType( t, @@ -537,6 +555,7 @@ export class DartRenderer extends ConvenienceRenderer { ) { return [dynamic, "?.", this.toJson, "()"]; } + return [dynamic, ".", this.toJson, "()"]; }, mapType => @@ -554,6 +573,7 @@ export class DartRenderer extends ConvenienceRenderer { if (maybeNullable === null) { return dynamic; } + return this.toDynamicExpression(unionType.isNullable, maybeNullable, dynamic); }, transformedStringType => { @@ -566,6 +586,7 @@ export class DartRenderer extends ConvenienceRenderer { ) { return [dynamic, "?.toIso8601String()"]; } + return [dynamic, ".toIso8601String()"]; case "date": if ( @@ -584,6 +605,7 @@ export class DartRenderer extends ConvenienceRenderer { "!.day.toString().padLeft(2, '0')}\"" ]; } + return [ '"${', dynamic, @@ -729,9 +751,11 @@ export class DartRenderer extends ConvenienceRenderer { this.emitLine(`@HiveType(typeId: ${this.classCounter})`); this.classPropertyCounter = 0; } + if (this._options.useJsonAnnotation) { - this.emitLine(`@JsonSerializable()`); + this.emitLine("@JsonSerializable()"); } + this.emitBlock(["class ", className], () => { if (c.getProperties().size === 0) { this._emitEmptyConstructor(className); @@ -800,6 +824,7 @@ export class DartRenderer extends ConvenienceRenderer { this.classPropertyCounter++; this.emitLine(`@JsonKey(name: "${jsonName}")`); } + this.emitLine(required ? "required " : "", this.dartType(prop.type, true), " ", name, ","); }); }); @@ -830,6 +855,7 @@ export class DartRenderer extends ConvenienceRenderer { if (this._options.useJsonAnnotation) { this.emitLine('@JsonValue("', stringEscape(jsonName), '")'); } + this.emitLine(name, comma); }); }); diff --git a/packages/quicktype-core/src/language/Elixir.ts b/packages/quicktype-core/src/language/Elixir.ts index 9efb257a5..3762dae7e 100644 --- a/packages/quicktype-core/src/language/Elixir.ts +++ b/packages/quicktype-core/src/language/Elixir.ts @@ -1,27 +1,27 @@ import * as unicode from "unicode-properties"; -import { Sourcelike } from "../Source"; -import { Namer, Name } from "../Naming"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { TargetLanguage } from "../TargetLanguage"; -import { Option, BooleanOption, OptionValues, getOptionValues, StringOption } from "../RendererOptions"; -import { Type, EnumType, ClassType, UnionType, ArrayType, MapType, PrimitiveType } from "../Type"; -import { matchType, nullableFromUnion } from "../TypeUtils"; - +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, Namer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, type Option, type OptionValues, StringOption, getOptionValues } from "../RendererOptions"; +import { type Sourcelike } from "../Source"; import { - legalizeCharacters, - splitIntoWords, - combineWords, - firstUpperWordStyle, - allUpperWordStyle, allLowerWordStyle, - utf32ConcatMap, - isPrintable, + allUpperWordStyle, + combineWords, escapeNonPrintableMapper, + firstUpperWordStyle, intToHex, - isLetterOrUnderscore + isLetterOrUnderscore, + isPrintable, + legalizeCharacters, + splitIntoWords, + utf32ConcatMap } from "../support/Strings"; -import { RenderContext } from "../Renderer"; +import { TargetLanguage } from "../TargetLanguage"; +import { ArrayType, ClassType, EnumType, MapType, PrimitiveType, type Type, UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType, nullableFromUnion } from "../TypeUtils"; const forbiddenModuleNames = [ "Access", @@ -128,17 +128,17 @@ function unicodeEscape(codePoint: number): string { return `\\u{${intToHex(codePoint, 0)}}`; } -function capitalizeFirstLetter(str: string) { +function capitalizeFirstLetter(str: string): string { return str.charAt(0).toUpperCase() + str.slice(1); } const stringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, unicodeEscape)); -function escapeDoubleQuotes(str: string) { +function escapeDoubleQuotes(str: string): string { return str.replace(/"/g, '\\"'); } -function escapeNewLines(str: string) { +function escapeNewLines(str: string): string { return str.replace(/\n/g, "\\n"); } @@ -148,15 +148,15 @@ export const elixirOptions = { }; export class ElixirTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Elixir", ["elixir"], "ex"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [elixirOptions.justTypes, elixirOptions.namespace]; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } @@ -164,7 +164,7 @@ export class ElixirTargetLanguage extends TargetLanguage { return " "; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): ElixirRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): ElixirRenderer { return new ElixirRenderer(this, renderContext, getOptionValues(elixirOptions, untypedOptionValues)); } } @@ -173,7 +173,7 @@ const isStartCharacter = isLetterOrUnderscore; function isPartCharacter(utf16Unit: number): boolean { const category: string = unicode.getCategory(utf16Unit); - return ["Nd", "Pc", "Mn", "Mc"].indexOf(category) >= 0 || isStartCharacter(utf16Unit); + return ["Nd", "Pc", "Mn", "Mc"].includes(category) || isStartCharacter(utf16Unit); } const legalizeName = legalizeCharacters(isPartCharacter); @@ -182,6 +182,7 @@ function simpleNameStyle(original: string, uppercase: boolean): string { if (/^[0-9]+$/.test(original)) { original = `${original}N`; } + const words = splitIntoWords(original); return combineWords( words, @@ -210,7 +211,7 @@ function memberNameStyle(original: string): string { } export class ElixirRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -285,7 +286,7 @@ export class ElixirRenderer extends ConvenienceRenderer { mapType => ["%{String.t() => ", this.elixirType(mapType.values), "}", optional], enumType => [this.nameForNamedTypeWithNamespace(enumType), ".t()", optional], unionType => { - const children = [...unionType.getChildren()].map(t => this.elixirType(t)); + const children = [...unionType.getChildren()].map(ut => this.elixirType(ut)); return [ children.flatMap((element, index) => (index === children.length - 1 ? element : [element, " | "])), optional @@ -422,7 +423,13 @@ export class ElixirRenderer extends ConvenienceRenderer { }); } - private emitPatternMatches(types: Type[], name: Sourcelike, parentName: Sourcelike, suffix = "", optional = false) { + private emitPatternMatches( + types: Type[], + name: Sourcelike, + parentName: Sourcelike, + suffix = "", + optional = false + ): void { this.ensureBlankLine(); let typesToMatch = this.sortAndFilterPatternMatchTypes(types); @@ -482,6 +489,7 @@ export class ElixirRenderer extends ConvenienceRenderer { if (encode) { mode = "encode"; } + return matchType( t, _anyType => [], @@ -574,6 +582,7 @@ export class ElixirRenderer extends ConvenienceRenderer { "(value)} end)" ]; } + return [primitive]; } }, @@ -604,8 +613,10 @@ export class ElixirRenderer extends ConvenienceRenderer { if (nullableTypes.length < 2) { return this.fromDynamic(nullable, jsonName, name, true); } + return ['m["', jsonName, '"] && decode_', name, '(m["', jsonName, '"])']; } + return ["decode_", name, '(m["', jsonName, '"])']; } ); @@ -626,6 +637,7 @@ export class ElixirRenderer extends ConvenienceRenderer { if (arrayElement instanceof ArrayType) { return expression; } + if (arrayElement.isPrimitive()) { return expression; } else if (arrayElement instanceof MapType) { @@ -689,6 +701,7 @@ export class ElixirRenderer extends ConvenienceRenderer { "(value)} end)" ]; } + return [expression]; } }, @@ -721,12 +734,13 @@ export class ElixirRenderer extends ConvenienceRenderer { return ["struct.", e, " && encode_", e, "(struct.", e, ")"]; } + return ["encode_", e, "(struct.", e, ")"]; } ); } - private emitBlock(source: Sourcelike, emit: () => void) { + private emitBlock(source: Sourcelike, emit: () => void): void { this.emitLine(source); this.indent(emit); this.emitLine("end"); @@ -740,7 +754,7 @@ export class ElixirRenderer extends ConvenienceRenderer { }); } - private emitModule(c: ClassType, moduleName: Name) { + private emitModule(c: ClassType, moduleName: Name): void { this.emitBlock(["defmodule ", this.nameWithNamespace(moduleName), " do"], () => { const structDescription = this.descriptionForType(c) ?? []; const attributeDescriptions: Sourcelike[][] = []; @@ -754,6 +768,7 @@ export class ElixirRenderer extends ConvenienceRenderer { this.emitDescription([...structDescription, ...attributeDescriptions]); this.ensureBlankLine(); } + const requiredAttributes: Sourcelike[] = []; this.forEachClassProperty(c, "none", (name, _jsonName, p) => { if (!p.isOptional) { @@ -767,6 +782,7 @@ export class ElixirRenderer extends ConvenienceRenderer { if (requiredAttributes.length) { this.emitLine(["@enforce_keys [", requiredAttributes, "]"]); } + const attributeNames: Sourcelike[] = []; this.forEachClassProperty(c, "none", (name, _jsonName, _p) => { if (attributeNames.length === 0) { @@ -794,6 +810,7 @@ export class ElixirRenderer extends ConvenienceRenderer { if (this._options.justTypes) { return; } + this.forEachClassProperty(c, "none", (name, _jsonName, p) => { if (p.type.kind === "union") { const unionTypes = [...p.type.getChildren()]; @@ -925,7 +942,7 @@ export class ElixirRenderer extends ConvenienceRenderer { return true; } - private emitEnum(e: EnumType, enumName: Name) { + private emitEnum(e: EnumType, enumName: Name): void { this.emitBlock(["defmodule ", this.nameWithNamespace(enumName), " do"], () => { this.emitDescription(this.descriptionForType(e)); this.emitLine("@valid_enum_members ["); @@ -984,11 +1001,11 @@ end`); }); } - private emitUnion(_u: UnionType, _unionName: Name) { + private emitUnion(_u: UnionType, _unionName: Name): void { return; } - protected emitSourceStructure() { + protected emitSourceStructure(): void { if (this.leadingComments !== undefined) { this.emitComments(this.leadingComments); } else if (!this._options.justTypes) { diff --git a/packages/quicktype-core/src/language/Elm.ts b/packages/quicktype-core/src/language/Elm.ts index bab36c541..ced7837b4 100644 --- a/packages/quicktype-core/src/language/Elm.ts +++ b/packages/quicktype-core/src/language/Elm.ts @@ -1,28 +1,36 @@ -import { mapContains, arrayIntercalate } from "collection-utils"; +import { arrayIntercalate, mapContains } from "collection-utils"; -import { TargetLanguage } from "../TargetLanguage"; -import { EnumOption, StringOption, BooleanOption, Option, getOptionValues, OptionValues } from "../RendererOptions"; -import { Type, ClassType, UnionType, EnumType, ClassProperty } from "../Type"; -import { matchType, nullableFromUnion } from "../TypeUtils"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { Namer, Name, DependencyName, funPrefixNamer } from "../Naming"; +import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { DependencyName, type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; import { - legalizeCharacters, - isLetterOrUnderscoreOrDigit, - isLetterOrUnderscore, + BooleanOption, + EnumOption, + type Option, + type OptionValues, + StringOption, + getOptionValues +} from "../RendererOptions"; +import { type MultiWord, type Sourcelike, annotated, multiWord, parenIfNeeded, singleWord } from "../Source"; +import { + allLowerWordStyle, + allUpperWordStyle, + combineWords, decapitalize, - stringEscape, + firstUpperWordStyle, isAscii, + isLetterOrUnderscore, + isLetterOrUnderscoreOrDigit, + legalizeCharacters, splitIntoWords, - combineWords, - firstUpperWordStyle, - allLowerWordStyle, - allUpperWordStyle + stringEscape } from "../support/Strings"; import { defined } from "../support/Support"; -import { Sourcelike, annotated, MultiWord, singleWord, multiWord, parenIfNeeded } from "../Source"; -import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { RenderContext } from "../Renderer"; +import { TargetLanguage } from "../TargetLanguage"; +import { type ClassProperty, type ClassType, type EnumType, type Type, UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType, nullableFromUnion } from "../TypeUtils"; export const elmOptions = { justTypes: new BooleanOption("just-types", "Plain types only", false), @@ -35,23 +43,23 @@ export const elmOptions = { }; export class ElmTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Elm", ["elm"], "elm"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [elmOptions.justTypes, elmOptions.moduleName, elmOptions.useList]; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): ElmRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): ElmRenderer { return new ElmRenderer(this, renderContext, getOptionValues(elmOptions, untypedOptionValues)); } } @@ -116,40 +124,44 @@ function elmNameStyle(original: string, upper: boolean): string { const upperNamingFunction = funPrefixNamer("upper", n => elmNameStyle(n, true)); const lowerNamingFunction = funPrefixNamer("lower", n => elmNameStyle(n, false)); -type RequiredOrOptional = { - reqOrOpt: string; +interface RequiredOrOptional { fallback: string; -}; + reqOrOpt: string; +} function requiredOrOptional(p: ClassProperty): RequiredOrOptional { function optional(fallback: string): RequiredOrOptional { return { reqOrOpt: "Jpipe.optional", fallback }; } + const t = p.type; if (p.isOptional || (t instanceof UnionType && nullableFromUnion(t) !== null)) { return optional(" Nothing"); } + if (t.kind === "null") { return optional(" ()"); } + return { reqOrOpt: "Jpipe.required", fallback: "" }; } -type TopLevelDependent = { - encoder: Name; +interface TopLevelDependent { decoder?: Name; -}; - -type NamedTypeDependent = { encoder: Name; +} + +interface NamedTypeDependent { decoder: Name; -}; + encoder: Name; +} export class ElmRenderer extends ConvenienceRenderer { private readonly _topLevelDependents = new Map(); + private readonly _namedTypeDependents = new Map(); - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -171,10 +183,12 @@ export class ElmRenderer extends ConvenienceRenderer { if (this.namedTypeToNameForTopLevel(t) === undefined) { decoder = new DependencyName(lowerNamingFunction, topLevelName.order, lookup => lookup(topLevelName)); } + this._topLevelDependents.set(topLevelName, { encoder, decoder }); if (decoder !== undefined) { return [encoder, decoder]; } + return [encoder]; } @@ -259,6 +273,7 @@ export class ElmRenderer extends ConvenienceRenderer { if (noOptional) return nullableType; return multiWord(" ", "Maybe", parenIfNeeded(nullableType)); } + return singleWord(this.nameForNamedType(unionType)); } ); @@ -302,6 +317,7 @@ export class ElmRenderer extends ConvenienceRenderer { if (noOptional) return nullableDecoder; return multiWord(" ", "Jdec.nullable", parenIfNeeded(nullableDecoder)); } + return singleWord(this.decoderNameForNamedType(unionType)); } ); @@ -345,6 +361,7 @@ export class ElmRenderer extends ConvenienceRenderer { if (noOptional) return nullableEncoder; return multiWord(" ", "makeNullableEncoder", parenIfNeeded(nullableEncoder)); } + return singleWord(this.encoderNameForNamedType(unionType)); } ); @@ -373,6 +390,7 @@ export class ElmRenderer extends ConvenienceRenderer { } else { description.push(""); } + description.push(`${this.sourcelikeToString(name)}:`); description.push(...propertyDescription); }); @@ -388,6 +406,7 @@ export class ElmRenderer extends ConvenienceRenderer { if (onFirst) { this.emitLine("{"); } + this.emitLine("}"); }); } @@ -417,6 +436,7 @@ export class ElmRenderer extends ConvenienceRenderer { } else { this.emitLine(equalsOrPipe, " ", constructor, " ", parenIfNeeded(this.elmType(t))); } + onFirst = false; }); }); @@ -429,6 +449,7 @@ export class ElmRenderer extends ConvenienceRenderer { this.emitLine(defined(decoder), " = ", this.decoderNameForType(t).source); this.ensureBlankLine(); } + this.emitLine(encoder, " : ", topLevelName, " -> String"); this.emitLine(encoder, " r = Jenc.encode 0 (", this.encoderNameForType(t).source, " r)"); } @@ -465,6 +486,7 @@ export class ElmRenderer extends ConvenienceRenderer { if (onFirst) { this.emitLine("["); } + this.emitLine("]"); }); }); @@ -512,6 +534,7 @@ export class ElmRenderer extends ConvenienceRenderer { } else if (t.isPrimitive()) { return " " + t.kind; } + return t.kind; } @@ -530,6 +553,7 @@ export class ElmRenderer extends ConvenienceRenderer { const decoder = parenIfNeeded(this.decoderNameForType(t)); this.emitLine(bracketOrComma, " Jdec.map ", constructor, " ", decoder); } + onFirst = false; }); this.emitLine("]"); @@ -560,6 +584,7 @@ export class ElmRenderer extends ConvenienceRenderer { if (decoder === undefined) { decoder = defined(this._namedTypeDependents.get(name)).decoder; } + topLevelDecoders.push(decoder); exports.push(name, encoder, decoder); }); @@ -600,6 +625,7 @@ export class ElmRenderer extends ConvenienceRenderer { if (decoder === undefined) { decoder = defined(this._namedTypeDependents.get(name)).decoder; } + this.emitLine("-- decodeString ", decoder, " myJsonString"); }); } @@ -611,6 +637,7 @@ export class ElmRenderer extends ConvenienceRenderer { for (let i = 0; i < exports.length; i++) { this.emitLine(i === 0 ? "(" : ",", " ", exports[i]); } + this.emitLine(")"); }); this.ensureBlankLine(); diff --git a/packages/quicktype-core/src/language/Golang.ts b/packages/quicktype-core/src/language/Golang.ts index 847bb075d..9a2081af6 100644 --- a/packages/quicktype-core/src/language/Golang.ts +++ b/packages/quicktype-core/src/language/Golang.ts @@ -1,25 +1,26 @@ -import { TypeKind, Type, ClassType, EnumType, UnionType, ClassProperty } from "../Type"; -import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { Name, DependencyName, Namer, funPrefixNamer } from "../Naming"; +import { type PrimitiveStringTypeKind, type StringTypeMapping, type TransformedStringTypeKind } from ".."; +import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; +import { ConvenienceRenderer } from "../ConvenienceRenderer"; +import { DependencyName, type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, type Option, type OptionValues, StringOption, getOptionValues } from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated, modifySource } from "../Source"; import { - legalizeCharacters, + allUpperWordStyle, + camelCase, + combineWords, + firstUpperWordStyle, isLetterOrUnderscore, isLetterOrUnderscoreOrDigit, - stringEscape, + legalizeCharacters, splitIntoWords, - combineWords, - firstUpperWordStyle, - allUpperWordStyle, - camelCase + stringEscape } from "../support/Strings"; import { assert, defined } from "../support/Support"; -import { StringOption, BooleanOption, Option, OptionValues, getOptionValues } from "../RendererOptions"; -import { Sourcelike, maybeAnnotated, modifySource } from "../Source"; -import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; import { TargetLanguage } from "../TargetLanguage"; -import { ConvenienceRenderer } from "../ConvenienceRenderer"; -import { RenderContext } from "../Renderer"; -import { StringTypeMapping, TransformedStringTypeKind, PrimitiveStringTypeKind } from ".."; +import { type ClassProperty, type ClassType, type EnumType, type Type, type TypeKind, UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; export const goOptions = { justTypes: new BooleanOption("just-types", "Plain types only", false), @@ -35,11 +36,11 @@ export const goOptions = { }; export class GoTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Go", ["go", "golang"], "go"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ goOptions.justTypes, goOptions.justTypesAndPackage, @@ -50,21 +51,21 @@ export class GoTargetLanguage extends TargetLanguage { ]; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); mapping.set("date-time", "date-time"); return mapping; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): GoRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): GoRenderer { return new GoRenderer(this, renderContext, getOptionValues(goOptions, untypedOptionValues)); } @@ -96,21 +97,22 @@ const compoundTypeKinds: TypeKind[] = ["array", "class", "map", "enum"]; function isValueType(t: Type): boolean { const kind = t.kind; - return primitiveValueTypeKinds.indexOf(kind) >= 0 || kind === "class" || kind === "enum" || kind === "date-time"; + return primitiveValueTypeKinds.includes(kind) || kind === "class" || kind === "enum" || kind === "date-time"; } function canOmitEmpty(cp: ClassProperty, omitEmptyOption: boolean): boolean { if (!cp.isOptional) return false; if (omitEmptyOption) return true; const t = cp.type; - return ["union", "null", "any"].indexOf(t.kind) < 0; + return !["union", "null", "any"].includes(t.kind); } export class GoRenderer extends ConvenienceRenderer { private readonly _topLevelUnmarshalNames = new Map(); + private _currentFilename: string | undefined; - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -197,9 +199,11 @@ export class GoRenderer extends ConvenienceRenderer { if (t instanceof UnionType && nullableFromUnion(t) === null) { return ["*", this.goType(t, true)]; } + if (cp.isOptional) { return this.nullableGoType(t, true); } + return this.goType(t, true); } @@ -222,6 +226,7 @@ export class GoRenderer extends ConvenienceRenderer { } else { valueSource = this.goType(v, withIssues); } + return ["map[string]", valueSource]; }, enumType => this.nameForNamedType(enumType), @@ -356,6 +361,7 @@ export class GoRenderer extends ConvenienceRenderer { this.emitLine("x.", fieldName, " = nil"); }); }; + const makeArgs = ( primitiveArg: (fieldName: Sourcelike) => Sourcelike, compoundArg: (isClass: boolean, fieldName: Sourcelike) => Sourcelike @@ -367,12 +373,14 @@ export class GoRenderer extends ConvenienceRenderer { ", " ); } + for (const kind of compoundTypeKinds) { args.push( ifMember(kind, "false, nil", (t, fieldName, _) => compoundArg(t.kind === "class", fieldName)), ", " ); } + args.push(isNullableArg); return args; }; @@ -392,6 +400,7 @@ export class GoRenderer extends ConvenienceRenderer { for (const kind of compoundTypeKinds) { maybeAssignNil(kind); } + ifMember("class", undefined, (_1, _2, goType) => { this.emitLine("var c ", goType); }); diff --git a/packages/quicktype-core/src/language/Haskell.ts b/packages/quicktype-core/src/language/Haskell.ts index 2bac412e9..16cd16a35 100644 --- a/packages/quicktype-core/src/language/Haskell.ts +++ b/packages/quicktype-core/src/language/Haskell.ts @@ -1,24 +1,33 @@ import { mapContains } from "collection-utils"; -import { TargetLanguage } from "../TargetLanguage"; -import { EnumOption, StringOption, BooleanOption, Option, getOptionValues, OptionValues } from "../RendererOptions"; -import { Type, ClassType, UnionType, EnumType, ClassProperty } from "../Type"; -import { matchType, nullableFromUnion } from "../TypeUtils"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { Namer, Name, funPrefixNamer } from "../Naming"; + +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; import { - legalizeCharacters, - isLetterOrUnderscoreOrDigit, - isLetterOrUnderscore, - stringEscape, - isAscii, - splitIntoWords, + BooleanOption, + EnumOption, + type Option, + type OptionValues, + StringOption, + getOptionValues +} from "../RendererOptions"; +import { type MultiWord, type Sourcelike, multiWord, parenIfNeeded, singleWord } from "../Source"; +import { + allLowerWordStyle, + allUpperWordStyle, combineWords, firstUpperWordStyle, - allLowerWordStyle, - allUpperWordStyle + isAscii, + isLetterOrUnderscore, + isLetterOrUnderscoreOrDigit, + legalizeCharacters, + splitIntoWords, + stringEscape } from "../support/Strings"; -import { Sourcelike, MultiWord, singleWord, multiWord, parenIfNeeded } from "../Source"; -import { RenderContext } from "../Renderer"; +import { TargetLanguage } from "../TargetLanguage"; +import { type ClassProperty, type ClassType, type EnumType, type Type, type UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType, nullableFromUnion } from "../TypeUtils"; export const haskellOptions = { justTypes: new BooleanOption("just-types", "Plain types only", false), @@ -30,26 +39,23 @@ export const haskellOptions = { }; export class HaskellTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Haskell", ["haskell"], "haskell"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [haskellOptions.justTypes, haskellOptions.moduleName, haskellOptions.useList]; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): HaskellRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): HaskellRenderer { return new HaskellRenderer(this, renderContext, getOptionValues(haskellOptions, untypedOptionValues)); } } @@ -129,7 +135,7 @@ const upperNamingFunction = funPrefixNamer("upper", n => haskellNameStyle(n, tru const lowerNamingFunction = funPrefixNamer("lower", n => haskellNameStyle(n, false)); export class HaskellRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -208,6 +214,7 @@ export class HaskellRenderer extends ConvenienceRenderer { if (this._options.useList) { return multiWord("", "[", parenIfNeeded(this.haskellType(arrayType.items)), "]"); } + return multiWord(" ", "Vector", parenIfNeeded(this.haskellType(arrayType.items))); }, classType => singleWord(this.nameForNamedType(classType)), @@ -220,6 +227,7 @@ export class HaskellRenderer extends ConvenienceRenderer { if (noOptional) return nullableType; return multiWord(" ", "Maybe", parenIfNeeded(nullableType)); } + return singleWord(this.nameForNamedType(unionType)); } ); @@ -265,6 +273,7 @@ export class HaskellRenderer extends ConvenienceRenderer { } else { description.push(""); } + description.push(`${this.sourcelikeToString(name)}:`); description.push(...propertyDescription); }); @@ -280,6 +289,7 @@ export class HaskellRenderer extends ConvenienceRenderer { if (onFirst) { this.emitLine("{"); } + this.emitLine("} deriving (Show)"); }); } @@ -310,6 +320,7 @@ export class HaskellRenderer extends ConvenienceRenderer { } else { this.emitLine(equalsOrPipe, " ", constructor, " ", parenIfNeeded(this.haskellType(t))); } + onFirst = false; }); this.emitLine("deriving (Show)"); @@ -353,6 +364,7 @@ export class HaskellRenderer extends ConvenienceRenderer { if (onFirst) { this.emitLine("["); } + this.emitLine("]"); }); } @@ -482,6 +494,7 @@ export class HaskellRenderer extends ConvenienceRenderer { for (let i = 0; i < exports.length; i++) { this.emitLine(i === 0 ? "(" : ",", " ", exports[i]); } + this.emitLine(", decodeTopLevel"); this.emitLine(") where"); }); diff --git a/packages/quicktype-core/src/language/JSONSchema.ts b/packages/quicktype-core/src/language/JSONSchema.ts index 2b8a447ba..978906075 100644 --- a/packages/quicktype-core/src/language/JSONSchema.ts +++ b/packages/quicktype-core/src/language/JSONSchema.ts @@ -1,48 +1,52 @@ -import { mapFirst, iterableFirst } from "collection-utils"; +import { iterableFirst, mapFirst } from "collection-utils"; -import { TargetLanguage } from "../TargetLanguage"; -import { Type, UnionType, EnumType, ObjectType, transformedStringTypeTargetTypeKindsMap } from "../Type"; -import { matchTypeExhaustive } from "../TypeUtils"; +import { addDescriptionToSchema } from "../attributes/Description"; import { ConvenienceRenderer } from "../ConvenienceRenderer"; -import { Namer, funPrefixNamer, Name } from "../Naming"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { type Option } from "../RendererOptions"; import { - legalizeCharacters, - splitIntoWords, + allUpperWordStyle, combineWords, firstUpperWordStyle, - allUpperWordStyle + legalizeCharacters, + splitIntoWords } from "../support/Strings"; import { defined, panic } from "../support/Support"; -import { StringTypeMapping, getNoStringTypeMapping } from "../TypeBuilder"; -import { addDescriptionToSchema } from "../attributes/Description"; -import { Option } from "../RendererOptions"; -import { RenderContext } from "../Renderer"; +import { TargetLanguage } from "../TargetLanguage"; +import { + type EnumType, + type ObjectType, + type Type, + type UnionType, + transformedStringTypeTargetTypeKindsMap +} from "../Type"; +import { type StringTypeMapping, getNoStringTypeMapping } from "../TypeBuilder"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchTypeExhaustive } from "../TypeUtils"; export class JSONSchemaTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("JSON Schema", ["schema", "json-schema"], "schema"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return []; } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { return getNoStringTypeMapping(); } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - get supportsFullObjectType(): boolean { + public get supportsFullObjectType(): boolean { return true; } - protected makeRenderer( - renderContext: RenderContext, - _untypedOptionValues: { [name: string]: any } - ): JSONSchemaRenderer { + protected makeRenderer(renderContext: RenderContext, _untypedOptionValues: FixMeOptionsType): JSONSchemaRenderer { return new JSONSchemaRenderer(this, renderContext); } } @@ -65,7 +69,10 @@ function jsonNameStyle(original: string): string { ); } -type Schema = { [name: string]: any }; +interface Schema { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [name: string]: any; +} export class JSONSchemaRenderer extends ConvenienceRenderer { protected makeNamedTypeNamer(): Namer { @@ -93,9 +100,11 @@ export class JSONSchemaRenderer extends ConvenienceRenderer { if (first === undefined) { return panic("Must have at least one type for oneOf"); } + if (types.size === 1) { return this.schemaForType(first); } + return { anyOf: Array.from(types).map((t: Type) => this.schemaForType(t)) }; } @@ -111,7 +120,7 @@ export class JSONSchemaRenderer extends ConvenienceRenderer { } private schemaForType(t: Type): Schema { - const schema = matchTypeExhaustive<{ [name: string]: any }>( + const schema = matchTypeExhaustive( t, _noneType => { return panic("none type should have been replaced"); @@ -139,12 +148,14 @@ export class JSONSchemaRenderer extends ConvenienceRenderer { if (target === undefined) { return panic(`Unknown transformed string type ${transformedStringType.kind}`); } + return { type: "string", format: target.jsonSchema }; } ); if (schema.$ref === undefined) { this.addAttributesToSchema(t, schema); } + return schema; } @@ -162,14 +173,17 @@ export class JSONSchemaRenderer extends ConvenienceRenderer { if (prop.description === undefined) { addDescriptionToSchema(prop, this.descriptionForClassProperty(o, name)); } + props[name] = prop; if (!p.isOptional) { req.push(name); } } + properties = props; required = req.sort(); } + const additional = o.getAdditionalProperties(); const additionalProperties = additional !== undefined ? this.schemaForType(additional) : false; const schema = { @@ -188,6 +202,7 @@ export class JSONSchemaRenderer extends ConvenienceRenderer { if (title !== undefined) { oneOf.title = title; } + this.addAttributesToSchema(u, oneOf); return oneOf; } diff --git a/packages/quicktype-core/src/language/Java.ts b/packages/quicktype-core/src/language/Java.ts index 05ad4b535..d800e9fbf 100644 --- a/packages/quicktype-core/src/language/Java.ts +++ b/packages/quicktype-core/src/language/Java.ts @@ -1,10 +1,18 @@ +import { type PrimitiveStringTypeKind, type StringTypeMapping, type TransformedStringTypeKind } from ".."; import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { DependencyName, funPrefixNamer, Name, Namer } from "../Naming"; -import { RenderContext } from "../Renderer"; -import { BooleanOption, EnumOption, getOptionValues, Option, OptionValues, StringOption } from "../RendererOptions"; -import { maybeAnnotated, Sourcelike } from "../Source"; -import { acronymOption, acronymStyle, AcronymStyleOptions } from "../support/Acronyms"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { DependencyName, type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { + BooleanOption, + EnumOption, + type Option, + type OptionValues, + StringOption, + getOptionValues +} from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated } from "../Source"; +import { AcronymStyleOptions, acronymOption, acronymStyle } from "../support/Acronyms"; import { allLowerWordStyle, allUpperWordStyle, @@ -22,9 +30,18 @@ import { } from "../support/Strings"; import { assert, assertNever, defined, panic } from "../support/Support"; import { TargetLanguage } from "../TargetLanguage"; -import { ArrayType, ClassProperty, ClassType, EnumType, MapType, Type, TypeKind, UnionType } from "../Type"; +import { + ArrayType, + type ClassProperty, + ClassType, + EnumType, + MapType, + type Type, + type TypeKind, + UnionType +} from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; import { directlyReachableSingleNamedType, matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { StringTypeMapping, TransformedStringTypeKind, PrimitiveStringTypeKind } from ".."; export const javaOptions = { useList: new EnumOption( @@ -54,11 +71,11 @@ export const javaOptions = { }; export class JavaTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Java", ["java"], "java"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ javaOptions.useList, javaOptions.justTypes, @@ -70,19 +87,20 @@ export class JavaTargetLanguage extends TargetLanguage { ]; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): JavaRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): JavaRenderer { const options = getOptionValues(javaOptions, untypedOptionValues); if (options.justTypes) { return new JavaRenderer(this, renderContext, options); } + return new JacksonRenderer(this, renderContext, options); } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); mapping.set("date", "date"); mapping.set("time", "time"); @@ -195,42 +213,52 @@ export function javaNameStyle( } abstract class JavaDateTimeProvider { - constructor( + public constructor( protected readonly _renderer: JavaRenderer, protected readonly _className: string ) {} - abstract keywords: string[]; - abstract dateTimeImports: string[]; - abstract dateImports: string[]; - abstract timeImports: string[]; - abstract converterImports: string[]; + public abstract keywords: string[]; + + public abstract dateTimeImports: string[]; + + public abstract dateImports: string[]; + + public abstract timeImports: string[]; + + public abstract converterImports: string[]; + + public abstract dateTimeType: string; - abstract dateTimeType: string; - abstract dateType: string; - abstract timeType: string; + public abstract dateType: string; - abstract dateTimeJacksonAnnotations: string[]; - abstract dateJacksonAnnotations: string[]; - abstract timeJacksonAnnotations: string[]; + public abstract timeType: string; - abstract emitDateTimeConverters(): void; + public abstract dateTimeJacksonAnnotations: string[]; + + public abstract dateJacksonAnnotations: string[]; + + public abstract timeJacksonAnnotations: string[]; + + public abstract emitDateTimeConverters(): void; public shouldEmitDateTimeConverter = true; + public shouldEmitTimeConverter = true; + public shouldEmitDateConverter = true; - abstract convertStringToDateTime(variable: Sourcelike): Sourcelike; - abstract convertStringToTime(variable: Sourcelike): Sourcelike; - abstract convertStringToDate(variable: Sourcelike): Sourcelike; + public abstract convertStringToDateTime(variable: Sourcelike): Sourcelike; + public abstract convertStringToTime(variable: Sourcelike): Sourcelike; + public abstract convertStringToDate(variable: Sourcelike): Sourcelike; - abstract convertDateTimeToString(variable: Sourcelike): Sourcelike; - abstract convertTimeToString(variable: Sourcelike): Sourcelike; - abstract convertDateToString(variable: Sourcelike): Sourcelike; + public abstract convertDateTimeToString(variable: Sourcelike): Sourcelike; + public abstract convertTimeToString(variable: Sourcelike): Sourcelike; + public abstract convertDateToString(variable: Sourcelike): Sourcelike; } class Java8DateTimeProvider extends JavaDateTimeProvider { - keywords = [ + public keywords = [ "LocalDate", "OffsetDateTime", "OffsetTime", @@ -241,10 +269,13 @@ class Java8DateTimeProvider extends JavaDateTimeProvider { "ChronoField" ]; - dateTimeImports: string[] = ["java.time.OffsetDateTime"]; - dateImports: string[] = ["java.time.LocalDate"]; - timeImports: string[] = ["java.time.OffsetTime"]; - converterImports: string[] = [ + public dateTimeImports: string[] = ["java.time.OffsetDateTime"]; + + public dateImports: string[] = ["java.time.LocalDate"]; + + public timeImports: string[] = ["java.time.OffsetTime"]; + + public converterImports: string[] = [ "java.time.LocalDate", "java.time.OffsetDateTime", "java.time.OffsetTime", @@ -255,15 +286,19 @@ class Java8DateTimeProvider extends JavaDateTimeProvider { "java.time.temporal.ChronoField" ]; - dateTimeType = "OffsetDateTime"; - dateType = "LocalDate"; - timeType = "OffsetTime"; + public dateTimeType = "OffsetDateTime"; - dateTimeJacksonAnnotations: string[] = []; - dateJacksonAnnotations: string[] = []; - timeJacksonAnnotations: string[] = []; + public dateType = "LocalDate"; - emitDateTimeConverters(): void { + public timeType = "OffsetTime"; + + public dateTimeJacksonAnnotations: string[] = []; + + public dateJacksonAnnotations: string[] = []; + + public timeJacksonAnnotations: string[] = []; + + public emitDateTimeConverters(): void { this._renderer.ensureBlankLine(); this._renderer.emitLine( "private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()" @@ -310,48 +345,61 @@ class Java8DateTimeProvider extends JavaDateTimeProvider { }); } - convertStringToDateTime(variable: Sourcelike): Sourcelike { + public convertStringToDateTime(variable: Sourcelike): Sourcelike { return [this._className, ".parseDateTimeString(", variable, ")"]; } - convertStringToTime(variable: Sourcelike): Sourcelike { + public convertStringToTime(variable: Sourcelike): Sourcelike { return [this._className, ".parseTimeString(", variable, ")"]; } - convertStringToDate(variable: Sourcelike): Sourcelike { + public convertStringToDate(variable: Sourcelike): Sourcelike { return ["LocalDate.parse(", variable, ")"]; } - convertDateTimeToString(variable: Sourcelike): Sourcelike { + public convertDateTimeToString(variable: Sourcelike): Sourcelike { return [variable, ".format(java.time.format.DateTimeFormatter.ISO_OFFSET_DATE_TIME)"]; } - convertTimeToString(variable: Sourcelike): Sourcelike { + public convertTimeToString(variable: Sourcelike): Sourcelike { return [variable, ".format(java.time.format.DateTimeFormatter.ISO_OFFSET_TIME)"]; } - convertDateToString(variable: Sourcelike): Sourcelike { + public convertDateToString(variable: Sourcelike): Sourcelike { return [variable, ".format(java.time.format.DateTimeFormatter.ISO_DATE)"]; } } class JavaLegacyDateTimeProvider extends JavaDateTimeProvider { - keywords = ["SimpleDateFormat", "Date"]; + public keywords = ["SimpleDateFormat", "Date"]; + + public dateTimeImports: string[] = ["java.util.Date"]; + + public dateImports: string[] = ["java.util.Date"]; + + public timeImports: string[] = ["java.util.Date"]; + + public converterImports: string[] = ["java.util.Date", "java.text.SimpleDateFormat"]; - dateTimeImports: string[] = ["java.util.Date"]; - dateImports: string[] = ["java.util.Date"]; - timeImports: string[] = ["java.util.Date"]; - converterImports: string[] = ["java.util.Date", "java.text.SimpleDateFormat"]; + public dateTimeType = "Date"; - dateTimeType = "Date"; - dateType = "Date"; - timeType = "Date"; + public dateType = "Date"; - dateTimeJacksonAnnotations: string[] = ['@JsonFormat(pattern = "yyyy-MM-dd\'T\'HH:mm:ssX", timezone = "UTC")']; - dateJacksonAnnotations: string[] = ['@JsonFormat(pattern = "yyyy-MM-dd")']; - timeJacksonAnnotations: string[] = ['@JsonFormat(pattern = "HH:mm:ssX", timezone = "UTC")']; + public timeType = "Date"; - emitDateTimeConverters(): void { + public dateTimeJacksonAnnotations: string[] = [ + '@JsonFormat(pattern = "yyyy-MM-dd\'T\'HH:mm:ssX", timezone = "UTC")' + ]; + + public dateJacksonAnnotations: string[] = ['@JsonFormat(pattern = "yyyy-MM-dd")']; + + public timeJacksonAnnotations: string[] = ['@JsonFormat(pattern = "HH:mm:ssX", timezone = "UTC")']; + + public shouldEmitTimeConverter = false; + + public shouldEmitDateConverter = false; + + public emitDateTimeConverters(): void { this._renderer.ensureBlankLine(); this._renderer.emitLine("private static final String[] DATE_TIME_FORMATS = {"); this._renderer.indent(() => @@ -398,43 +446,45 @@ class JavaLegacyDateTimeProvider extends JavaDateTimeProvider { }); } - shouldEmitTimeConverter = false; - shouldEmitDateConverter = false; - - convertStringToDateTime(variable: Sourcelike): Sourcelike { + public convertStringToDateTime(variable: Sourcelike): Sourcelike { return [this._className, ".parseAllDateTimeString(", variable, ")"]; } - convertStringToTime(variable: Sourcelike): Sourcelike { + public convertStringToTime(variable: Sourcelike): Sourcelike { return [this._className, ".parseAllDateTimeString(", variable, ")"]; } - convertStringToDate(variable: Sourcelike): Sourcelike { + public convertStringToDate(variable: Sourcelike): Sourcelike { return [this._className, ".parseAllDateTimeString(", variable, ")"]; } - convertDateTimeToString(variable: Sourcelike): Sourcelike { + public convertDateTimeToString(variable: Sourcelike): Sourcelike { return [this._className, ".serializeDateTime(", variable, ")"]; } - convertTimeToString(variable: Sourcelike): Sourcelike { + public convertTimeToString(variable: Sourcelike): Sourcelike { return [this._className, ".serializeTime(", variable, ")"]; } - convertDateToString(variable: Sourcelike): Sourcelike { + public convertDateToString(variable: Sourcelike): Sourcelike { return [this._className, ".serializeDate(", variable, ")"]; } } export class JavaRenderer extends ConvenienceRenderer { private _currentFilename: string | undefined; + private readonly _gettersAndSettersForPropertyName = new Map(); + private _haveEmittedLeadingComments = false; + protected readonly _dateTimeProvider: JavaDateTimeProvider; + protected readonly _converterClassname: string = "Converter"; + protected readonly _converterKeywords: string[] = []; - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, protected readonly _options: OptionValues @@ -544,6 +594,7 @@ export class JavaRenderer extends ConvenienceRenderer { if (this.topLevels.size === 1) { return methodName; } + return [topLevelName, capitalize(methodName)]; } @@ -551,6 +602,7 @@ export class JavaRenderer extends ConvenienceRenderer { if (this.topLevels.size === 1) { return [prefix, suffix]; } + return [prefix, topLevelName, suffix]; } @@ -612,7 +664,7 @@ export class JavaRenderer extends ConvenienceRenderer { this.emitLine("}"); } - public emitTryCatch(main: () => void, handler: () => void, exception = "Exception") { + public emitTryCatch(main: () => void, handler: () => void, exception = "Exception"): void { this.emitLine("try {"); this.indent(main); this.emitLine("} catch (", exception, " ex) {"); @@ -620,7 +672,7 @@ export class JavaRenderer extends ConvenienceRenderer { this.emitLine("}"); } - public emitIgnoredTryCatchBlock(f: () => void) { + public emitIgnoredTryCatchBlock(f: () => void): void { this.emitTryCatch(f, () => this.emitLine("// Ignored")); } @@ -652,15 +704,19 @@ export class JavaRenderer extends ConvenienceRenderer { if (transformedStringType.kind === "time") { return this._dateTimeProvider.timeType; } + if (transformedStringType.kind === "date") { return this._dateTimeProvider.dateType; } + if (transformedStringType.kind === "date-time") { return this._dateTimeProvider.dateTimeType; } + if (transformedStringType.kind === "uuid") { return "UUID"; } + return "String"; } ); @@ -694,15 +750,19 @@ export class JavaRenderer extends ConvenienceRenderer { if (transformedStringType.kind === "time") { return this._dateTimeProvider.timeImports; } + if (transformedStringType.kind === "date") { return this._dateTimeProvider.dateImports; } + if (transformedStringType.kind === "date-time") { return this._dateTimeProvider.dateTimeImports; } + if (transformedStringType.kind === "uuid") { return ["java.util.UUID"]; } + return []; } ); @@ -747,12 +807,15 @@ export class JavaRenderer extends ConvenienceRenderer { if (t instanceof ClassType) { return []; } + if (t instanceof UnionType) { return ["java.io.IOException"]; } + if (t instanceof EnumType) { return ["java.io.IOException"]; } + return assertNever(t); } @@ -789,10 +852,12 @@ export class JavaRenderer extends ConvenienceRenderer { if (getter.length !== 0) { this.emitLine("@lombok.Getter(onMethod_ = {" + getter.join(", ") + "})"); } + if (setter.length !== 0) { this.emitLine("@lombok.Setter(onMethod_ = {" + setter.join(", ") + "})"); } } + this.emitLine("private ", this.javaType(false, p.type, true), " ", name, ";"); }); if (!this._options.lombok) { @@ -814,7 +879,7 @@ export class JavaRenderer extends ConvenienceRenderer { this.finishFile(); } - protected unionField(u: UnionType, t: Type, withIssues = false): { fieldType: Sourcelike; fieldName: Sourcelike } { + protected unionField(u: UnionType, t: Type, withIssues = false): { fieldName: Sourcelike; fieldType: Sourcelike } { const fieldType = this.javaType(true, t, withIssues); // FIXME: "Value" should be part of the name. const fieldName = [this.nameForUnionMember(u, t), "Value"]; @@ -842,16 +907,17 @@ export class JavaRenderer extends ConvenienceRenderer { const { fieldType, fieldName } = this.unionField(u, t, true); this.emitLine("public ", fieldType, " ", fieldName, ";"); } + this.emitUnionSerializer(u, unionName); }); this.finishFile(); } - protected emitEnumSerializationAttributes(_e: EnumType) { + protected emitEnumSerializationAttributes(_e: EnumType): void { // Empty } - protected emitEnumDeserializationAttributes(_e: EnumType) { + protected emitEnumDeserializationAttributes(_e: EnumType): void { // Empty } @@ -903,7 +969,7 @@ export class JavaRenderer extends ConvenienceRenderer { } export class JacksonRenderer extends JavaRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, options: OptionValues @@ -965,6 +1031,7 @@ export class JacksonRenderer extends JavaRenderer { imports.push("com.fasterxml.jackson.annotation.*"); return imports; } + if (t instanceof UnionType) { const imports = super.importsForType(t); imports.push( @@ -976,13 +1043,16 @@ export class JacksonRenderer extends JavaRenderer { if (this._options.useList) { imports.push("com.fasterxml.jackson.core.type.*"); } + return imports; } + if (t instanceof EnumType) { const imports = super.importsForType(t); imports.push("com.fasterxml.jackson.annotation.*"); return imports; } + return assertNever(t); } @@ -1080,6 +1150,7 @@ export class JacksonRenderer extends JavaRenderer { for (const tokenType of tokenTypes) { tokenCase(tokenType); } + this.indent(() => { emitDeserializeType(t); this.emitLine("break;"); @@ -1087,7 +1158,7 @@ export class JacksonRenderer extends JavaRenderer { }); }; - const emitStringDeserializer = () => { + const emitStringDeserializer = (): void => { const enumType = u.findMember("enum"); const stringType = u.findMember("string"); @@ -1124,6 +1195,7 @@ export class JacksonRenderer extends JavaRenderer { if (stringType !== undefined) { emitDeserializeType(stringType, fromVariable); } + this.emitLine("break;"); }); }); @@ -1142,6 +1214,7 @@ export class JacksonRenderer extends JavaRenderer { this.emitLine("break;"); }); } + if (doubleType !== undefined) { tokenCase("VALUE_NUMBER_FLOAT"); this.indent(() => { @@ -1176,6 +1249,7 @@ export class JacksonRenderer extends JavaRenderer { } else { this.emitLine("jsonGenerator.writeObject(obj.", fieldName, ");"); } + this.emitLine("return;"); }); }; @@ -1222,6 +1296,7 @@ export class JacksonRenderer extends JavaRenderer { for (const t of nonNulls) { emitSerializeType(t); } + if (maybeNull !== null) { this.emitLine("jsonGenerator.writeNull();"); } else { @@ -1232,11 +1307,11 @@ export class JacksonRenderer extends JavaRenderer { }); } - protected emitEnumSerializationAttributes(_e: EnumType) { + protected emitEnumSerializationAttributes(_e: EnumType): void { this.emitLine("@JsonValue"); } - protected emitEnumDeserializationAttributes(_e: EnumType) { + protected emitEnumDeserializationAttributes(_e: EnumType): void { this.emitLine("@JsonCreator"); } diff --git a/packages/quicktype-core/src/language/JavaScript.ts b/packages/quicktype-core/src/language/JavaScript.ts index e8e3db9a2..440502cff 100644 --- a/packages/quicktype-core/src/language/JavaScript.ts +++ b/packages/quicktype-core/src/language/JavaScript.ts @@ -1,36 +1,36 @@ import { arrayIntercalate } from "collection-utils"; +import { ConvenienceRenderer } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, EnumOption, type Option, type OptionValues, getOptionValues } from "../RendererOptions"; +import { type Sourcelike, modifySource } from "../Source"; +import { AcronymStyleOptions, acronymOption, acronymStyle } from "../support/Acronyms"; +import { ConvertersOptions, convertersOption } from "../support/Converters"; import { - TransformedStringTypeKind, - PrimitiveStringTypeKind, - Type, - ClassProperty, - ClassType, - ObjectType -} from "../Type"; -import { matchType, directlyReachableSingleNamedType } from "../TypeUtils"; -import { acronymOption, acronymStyle, AcronymStyleOptions } from "../support/Acronyms"; -import { convertersOption, ConvertersOptions } from "../support/Converters"; - -import { - utf16LegalizeCharacters, - utf16StringEscape, - splitIntoWords, + allLowerWordStyle, + camelCase, capitalize, combineWords, firstUpperWordStyle, - camelCase, - allLowerWordStyle + splitIntoWords, + utf16LegalizeCharacters, + utf16StringEscape } from "../support/Strings"; import { panic } from "../support/Support"; - -import { Sourcelike, modifySource } from "../Source"; -import { Namer, Name, funPrefixNamer } from "../Naming"; -import { ConvenienceRenderer } from "../ConvenienceRenderer"; import { TargetLanguage } from "../TargetLanguage"; -import { StringTypeMapping } from "../TypeBuilder"; -import { BooleanOption, Option, OptionValues, getOptionValues, EnumOption } from "../RendererOptions"; -import { RenderContext } from "../Renderer"; +import { + type ClassProperty, + type ClassType, + type ObjectType, + type PrimitiveStringTypeKind, + type TransformedStringTypeKind, + type Type +} from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { directlyReachableSingleNamedType, matchType } from "../TypeUtils"; + import { isES3IdentifierPart, isES3IdentifierStart } from "./JavaScriptUnicodeMaps"; export const javaScriptOptions = { @@ -55,22 +55,22 @@ export const javaScriptOptions = { ) }; -export type JavaScriptTypeAnnotations = { +export interface JavaScriptTypeAnnotations { any: string; anyArray: string; anyMap: string; - string: string; - stringArray: string; boolean: string; never: string; -}; + string: string; + stringArray: string; +} export class JavaScriptTargetLanguage extends TargetLanguage { - constructor(displayName = "JavaScript", names: string[] = ["javascript", "js", "jsx"], extension = "js") { + public constructor(displayName = "JavaScript", names: string[] = ["javascript", "js", "jsx"], extension = "js") { super(displayName, names, extension); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ javaScriptOptions.runtimeTypecheck, javaScriptOptions.runtimeTypecheckIgnoreUnknownProperties, @@ -80,7 +80,7 @@ export class JavaScriptTargetLanguage extends TargetLanguage { ]; } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); const dateTimeType = "date-time"; mapping.set("date", dateTimeType); @@ -88,18 +88,15 @@ export class JavaScriptTargetLanguage extends TargetLanguage { return mapping; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - get supportsFullObjectType(): boolean { + public get supportsFullObjectType(): boolean { return true; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): JavaScriptRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): JavaScriptRenderer { return new JavaScriptRenderer(this, renderContext, getOptionValues(javaScriptOptions, untypedOptionValues)); } } @@ -109,7 +106,7 @@ export const legalizeName = utf16LegalizeCharacters(isES3IdentifierPart); const identityNamingFunction = funPrefixNamer("properties", s => s); export class JavaScriptRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _jsOptions: OptionValues @@ -125,7 +122,7 @@ export class JavaScriptRenderer extends ConvenienceRenderer { legalizeName, upper ? firstUpperWordStyle : allLowerWordStyle, firstUpperWordStyle, - upper ? s => capitalize(acronyms(s)) : allLowerWordStyle, + upper ? (s): string => capitalize(acronyms(s)) : allLowerWordStyle, acronyms, "", isES3IdentifierStart @@ -167,18 +164,19 @@ export class JavaScriptRenderer extends ConvenienceRenderer { this.emitCommentLines(lines, { lineStart: " * ", beforeComment: "/**", afterComment: " */" }); } - typeMapTypeFor(t: Type): Sourcelike { - if (["class", "object", "enum"].indexOf(t.kind) >= 0) { + private typeMapTypeFor(t: Type): Sourcelike { + if (["class", "object", "enum"].includes(t.kind)) { return ['r("', this.nameForNamedType(t), '")']; } + return matchType( t, _anyType => '"any"', - _nullType => `null`, - _boolType => `true`, - _integerType => `0`, - _doubleType => `3.14`, - _stringType => `""`, + _nullType => "null", + _boolType => "true", + _integerType => "0", + _doubleType => "3.14", + _stringType => '""', arrayType => ["a(", this.typeMapTypeFor(arrayType.items), ")"], _classType => panic("We handled this above"), mapType => ["m(", this.typeMapTypeFor(mapType.values), ")"], @@ -191,26 +189,28 @@ export class JavaScriptRenderer extends ConvenienceRenderer { if (transformedStringType.kind === "date-time") { return "Date"; } - return `""`; + + return '""'; } ); } - typeMapTypeForProperty(p: ClassProperty): Sourcelike { + private typeMapTypeForProperty(p: ClassProperty): Sourcelike { const typeMap = this.typeMapTypeFor(p.type); if (!p.isOptional) { return typeMap; } + return ["u(undefined, ", typeMap, ")"]; } - emitBlock(source: Sourcelike, end: Sourcelike, emit: () => void) { + protected emitBlock(source: Sourcelike, end: Sourcelike, emit: () => void): void { this.emitLine(source, "{"); this.indent(emit); this.emitLine("}", end); } - emitTypeMap() { + private emitTypeMap(): void { const { any: anyAnnotation } = this.typeAnnotations; this.emitBlock(`const typeMap${anyAnnotation} = `, ";", () => { @@ -284,7 +284,7 @@ export class JavaScriptRenderer extends ConvenienceRenderer { } protected emitConvertModuleBody(): void { - const converter = (t: Type, name: Name) => { + const converter = (t: Type, name: Name): void => { const typeMap = this.typeMapTypeFor(t); this.emitBlock([this.deserializerFunctionLine(t, name), " "], "", () => { const parsedJson = this._jsOptions.rawType === "json" ? "JSON.parse(json)" : "json"; @@ -429,8 +429,8 @@ function transform(val${anyAnnotation}, typ${anyAnnotation}, getProps${anyAnnota if (!Object.prototype.hasOwnProperty.call(props, key)) { result[key] = ${ this._jsOptions.runtimeTypecheckIgnoreUnknownProperties - ? `val[key]` - : `transform(val[key], additional, getProps, key, ref)` + ? "val[key]" + : "transform(val[key], additional, getProps, key, ref)" }; } }); @@ -506,6 +506,7 @@ function r(name${stringAnnotation}) { `// and asserts the results${this._jsOptions.rawType === "json" ? " of JSON.parse" : ""} at runtime` ); } + const moduleLine = this.moduleLine; if (moduleLine === undefined) { this.emitConvertModuleBody(); @@ -552,7 +553,7 @@ function r(name${stringAnnotation}) { }); } - protected emitSourceStructure() { + protected emitSourceStructure(): void { if (this.leadingComments !== undefined) { this.emitComments(this.leadingComments); } else { diff --git a/packages/quicktype-core/src/language/JavaScriptPropTypes.ts b/packages/quicktype-core/src/language/JavaScriptPropTypes.ts index 7d6d90612..6754e83e2 100644 --- a/packages/quicktype-core/src/language/JavaScriptPropTypes.ts +++ b/packages/quicktype-core/src/language/JavaScriptPropTypes.ts @@ -1,29 +1,28 @@ -import { TargetLanguage } from "../TargetLanguage"; -import { getOptionValues, Option, OptionValues, EnumOption } from "../RendererOptions"; -import { RenderContext } from "../Renderer"; +import { panic } from "@glideapps/ts-necessities"; +import { arrayIntercalate } from "collection-utils"; + import { ConvenienceRenderer } from "../ConvenienceRenderer"; -import { funPrefixNamer, Name, Namer } from "../Naming"; -import { acronymOption, acronymStyle, AcronymStyleOptions } from "../support/Acronyms"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { EnumOption, type Option, type OptionValues, getOptionValues } from "../RendererOptions"; +import { type Sourcelike } from "../Source"; +import { AcronymStyleOptions, acronymOption, acronymStyle } from "../support/Acronyms"; +import { convertersOption } from "../support/Converters"; import { + allLowerWordStyle, capitalize, - ClassProperty, - ClassType, combineWords, firstUpperWordStyle, - matchType, - ObjectType, - panic, - Sourcelike, splitIntoWords, - Type -} from ".."; -import { allLowerWordStyle, utf16StringEscape } from "../support/Strings"; -import { isES3IdentifierStart } from "./JavaScriptUnicodeMaps"; + utf16StringEscape +} from "../support/Strings"; +import { TargetLanguage } from "../TargetLanguage"; +import { type ArrayType, type ClassProperty, type ClassType, type ObjectType, PrimitiveType, type Type } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { directlyReachableSingleNamedType, matchType } from "../TypeUtils"; + import { legalizeName } from "./JavaScript"; -import { convertersOption } from "../support/Converters"; -import { directlyReachableSingleNamedType } from "../TypeUtils"; -import { arrayIntercalate } from "collection-utils"; -import { PrimitiveType } from "../Type"; +import { isES3IdentifierStart } from "./JavaScriptUnicodeMaps"; export const javaScriptPropTypesOptions = { acronymStyle: acronymOption(AcronymStyleOptions.Pascal), @@ -40,17 +39,21 @@ export const javaScriptPropTypesOptions = { }; export class JavaScriptPropTypesTargetLanguage extends TargetLanguage { - protected getOptions(): Option[] { + protected getOptions(): Array> { return [javaScriptPropTypesOptions.acronymStyle, javaScriptPropTypesOptions.converters]; } - constructor(displayName = "JavaScript PropTypes", names: string[] = ["javascript-prop-types"], extension = "js") { + public constructor( + displayName = "JavaScript PropTypes", + names: string[] = ["javascript-prop-types"], + extension = "js" + ) { super(displayName, names, extension); } protected makeRenderer( renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } + untypedOptionValues: FixMeOptionsType ): JavaScriptPropTypesRenderer { return new JavaScriptPropTypesRenderer( this, @@ -63,7 +66,7 @@ export class JavaScriptPropTypesTargetLanguage extends TargetLanguage { const identityNamingFunction = funPrefixNamer("properties", s => s); export class JavaScriptPropTypesRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _jsOptions: OptionValues @@ -79,7 +82,7 @@ export class JavaScriptPropTypesRenderer extends ConvenienceRenderer { legalizeName, upper ? firstUpperWordStyle : allLowerWordStyle, firstUpperWordStyle, - upper ? s => capitalize(acronyms(s)) : allLowerWordStyle, + upper ? (s): string => capitalize(acronyms(s)) : allLowerWordStyle, acronyms, "", isES3IdentifierStart @@ -117,8 +120,8 @@ export class JavaScriptPropTypesRenderer extends ConvenienceRenderer { return super.makeNameForProperty(c, className, p, jsonName, undefined); } - typeMapTypeFor(t: Type, required = true): Sourcelike { - if (["class", "object", "enum"].indexOf(t.kind) >= 0) { + private typeMapTypeFor(t: Type, required = true): Sourcelike { + if (["class", "object", "enum"].includes(t.kind)) { return ["_", this.nameForNamedType(t)]; } @@ -152,7 +155,7 @@ export class JavaScriptPropTypesRenderer extends ConvenienceRenderer { return match; } - typeMapTypeForProperty(p: ClassProperty): Sourcelike { + private typeMapTypeForProperty(p: ClassProperty): Sourcelike { return this.typeMapTypeFor(p.type); } @@ -184,7 +187,7 @@ export class JavaScriptPropTypesRenderer extends ConvenienceRenderer { ); } - protected emitBlock(source: Sourcelike, end: Sourcelike, emit: () => void) { + protected emitBlock(source: Sourcelike, end: Sourcelike, emit: () => void): void { this.emitLine(source, "{"); this.indent(emit); this.emitLine("}", end); @@ -241,18 +244,18 @@ export class JavaScriptPropTypesRenderer extends ConvenienceRenderer { const names = source.filter(value => value as Name); // must be behind all these names - for (let i = 0; i < names.length; i++) { - const depName = names[i]; + names.forEach(name => { + const depName = name; // find this name's ordinal, if it has already been added - for (let j = 0; j < order.length; j++) { - const depIndex = order[j]; + order.forEach(orderItem => { + const depIndex = orderItem; if (mapKey[depIndex] === depName) { // this is the index of the dependency, so make sure we come after it ordinal = Math.max(ordinal, depIndex + 1); } - } - } + }); + }); // insert index order.splice(ordinal, 0, index); @@ -269,7 +272,7 @@ export class JavaScriptPropTypesRenderer extends ConvenienceRenderer { } else { if (type.kind === "array") { this.ensureBlankLine(); - this.emitExport(name, ["PropTypes.arrayOf(", this.typeMapTypeFor((type as any).items), ")"]); + this.emitExport(name, ["PropTypes.arrayOf(", this.typeMapTypeFor((type as ArrayType).items), ")"]); } else { this.ensureBlankLine(); this.emitExport(name, ["_", name]); @@ -278,7 +281,7 @@ export class JavaScriptPropTypesRenderer extends ConvenienceRenderer { }); } - private emitObject(name: Name, t: ObjectType) { + private emitObject(name: Name, t: ObjectType): void { this.ensureBlankLine(); this.emitLine("_", name, " = PropTypes.shape({"); this.indent(() => { diff --git a/packages/quicktype-core/src/language/JavaScriptUnicodeMaps.ts b/packages/quicktype-core/src/language/JavaScriptUnicodeMaps.ts index c3f105010..0e75bbfaa 100644 --- a/packages/quicktype-core/src/language/JavaScriptUnicodeMaps.ts +++ b/packages/quicktype-core/src/language/JavaScriptUnicodeMaps.ts @@ -1,6 +1,7 @@ +/* eslint-disable */ // Taken from https://github.com/Microsoft/TypeScript -function lookupInUnicodeMap(code: number, map: ReadonlyArray): boolean { +function lookupInUnicodeMap(code: number, map: readonly number[]): boolean { // Bail out quickly if it couldn't possibly be in the map. if (code < map[0]) { return false; diff --git a/packages/quicktype-core/src/language/Kotlin.ts b/packages/quicktype-core/src/language/Kotlin.ts index 0aa750b25..d2f759506 100644 --- a/packages/quicktype-core/src/language/Kotlin.ts +++ b/packages/quicktype-core/src/language/Kotlin.ts @@ -1,10 +1,12 @@ -import { iterableSome, arrayIntercalate } from "collection-utils"; +import { arrayIntercalate, iterableSome } from "collection-utils"; import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { EnumOption, Option, StringOption, OptionValues, getOptionValues } from "../RendererOptions"; -import { Sourcelike, maybeAnnotated, modifySource } from "../Source"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { EnumOption, type Option, type OptionValues, StringOption, getOptionValues } from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated, modifySource } from "../Source"; +import { AcronymStyleOptions, acronymOption, acronymStyle } from "../support/Acronyms"; import { allLowerWordStyle, allUpperWordStyle, @@ -25,24 +27,23 @@ import { assertNever, mustNotHappen } from "../support/Support"; import { TargetLanguage } from "../TargetLanguage"; import { ArrayType, - ClassProperty, + type ClassProperty, ClassType, - EnumType, + type EnumType, MapType, - ObjectType, - PrimitiveType, - Type, + type ObjectType, + type PrimitiveType, + type Type, UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { RenderContext } from "../Renderer"; -import { acronymOption, acronymStyle, AcronymStyleOptions } from "../support/Acronyms"; export enum Framework { - None, - Jackson, - Klaxon, - KotlinX + None = "None", + Jackson = "Jackson", + Klaxon = "Klaxon", + KotlinX = "KotlinX" } export const kotlinOptions = { @@ -62,26 +63,23 @@ export const kotlinOptions = { }; export class KotlinTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Kotlin", ["kotlin"], "kt"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [kotlinOptions.framework, kotlinOptions.acronymStyle, kotlinOptions.packageName]; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): ConvenienceRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): ConvenienceRenderer { const options = getOptionValues(kotlinOptions, untypedOptionValues); switch (options.framework) { @@ -183,6 +181,7 @@ function unicodeEscape(codePoint: number): string { return "\\u" + intToHex(codePoint, 4); } +// eslint-disable-next-line @typescript-eslint/naming-convention const _stringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, unicodeEscape)); function stringEscape(s: string): string { @@ -191,7 +190,7 @@ function stringEscape(s: string): string { } export class KotlinRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, protected readonly _kotlinOptions: OptionValues @@ -329,7 +328,7 @@ export class KotlinRenderer extends ConvenienceRenderer { return; } - const kotlinType = (p: ClassProperty) => { + const kotlinType = (p: ClassProperty): Sourcelike => { if (p.isOptional) { return [this.kotlinType(p.type, true, true), "?"]; } else { @@ -377,15 +376,15 @@ export class KotlinRenderer extends ConvenienceRenderer { this.emitClassDefinitionMethods(c, className); } - protected emitClassDefinitionMethods(_c: ClassType, _className: Name) { + protected emitClassDefinitionMethods(_c: ClassType, _className: Name): void { this.emitLine(")"); } - protected emitClassAnnotations(_c: Type, _className: Name) { + protected emitClassAnnotations(_c: Type, _className: Name): void { // to be overridden } - protected renameAttribute(_name: Name, _jsonName: string, _required: boolean, _meta: Array<() => void>) { + protected renameAttribute(_name: Name, _jsonName: string, _required: boolean, _meta: Array<() => void>): void { // to be overridden } @@ -426,6 +425,7 @@ export class KotlinRenderer extends ConvenienceRenderer { [" : ", unionName, "()"] ]); } + this.emitTable(table); } @@ -438,7 +438,7 @@ export class KotlinRenderer extends ConvenienceRenderer { _nonNulls: ReadonlySet, _maybeNull: PrimitiveType | null, _unionName: Name - ) { + ): void { // to be overridden } @@ -466,7 +466,7 @@ export class KotlinRenderer extends ConvenienceRenderer { } export class KotlinKlaxonRenderer extends KotlinRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, _kotlinOptions: OptionValues @@ -541,6 +541,7 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { if (hasEmptyObjects) { converters.push([[".convert(JsonObject::class,"], [" { it.obj!! },"], [" { it.toJsonString() })"]]); } + this.forEachEnum("none", (_, name) => { converters.push([ [".convert(", name, "::class,"], @@ -622,9 +623,11 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { if (namesDiffer) { properties.push(['name = "', escapedName, '"']); } + if (ignore) { properties.push("ignored = true"); } + return properties.length === 0 ? undefined : ["@Json(", arrayIntercalate(", ", properties), ")"]; } @@ -634,7 +637,7 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { this.emitLine("typealias ", className, " = JsonObject"); } - protected emitClassDefinitionMethods(c: ClassType, className: Name) { + protected emitClassDefinitionMethods(c: ClassType, className: Name): void { const isTopLevel = iterableSome(this.topLevels, ([_, top]) => top === c); if (isTopLevel) { this.emitBlock(")", () => { @@ -649,7 +652,7 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { } } - protected renameAttribute(name: Name, jsonName: string, _required: boolean, meta: Array<() => void>) { + protected renameAttribute(name: Name, jsonName: string, _required: boolean, meta: Array<() => void>): void { const rename = this.klaxonRenameAttribute(name, jsonName); if (rename !== undefined) { meta.push(() => this.emitLine(rename)); @@ -686,7 +689,7 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { this.indent(() => { this.emitLine("this.converter(object: Converter {"); this.indent(() => { - this.emitLine(`@Suppress("UNCHECKED_CAST")`); + this.emitLine('@Suppress("UNCHECKED_CAST")'); this.emitTable([ ["override fun toJson(value: Any)", " = toJson(value as T)"], ["override fun fromJson(jv: JsonValue)", " = fromJson(jv) as Any"], @@ -705,7 +708,7 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { nonNulls: ReadonlySet, maybeNull: PrimitiveType | null, unionName: Name - ) { + ): void { this.ensureBlankLine(); this.emitLine("public fun toJson(): String = klaxon.toJsonString(when (this) {"); this.indent(() => { @@ -717,6 +720,7 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { const name = this.nameForUnionMember(u, maybeNull); toJsonTable.push([["is ", name], [' -> "null"']]); } + this.emitTable(toJsonTable); }); this.emitLine("})"); @@ -735,6 +739,7 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { const name = this.nameForUnionMember(u, maybeNull); table.push([[this.unionMemberJsonValueGuard(maybeNull, "jv.inside")], [" -> ", name, "()"]]); } + table.push([["else"], [" -> throw IllegalArgumentException()"]]); this.emitTable(table); }); @@ -744,7 +749,7 @@ export class KotlinKlaxonRenderer extends KotlinRenderer { } export class KotlinJacksonRenderer extends KotlinRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, _kotlinOptions: OptionValues @@ -889,6 +894,7 @@ import com.fasterxml.jackson.module.kotlin.*`); if (namesDiffer || isPrefixBool) { propertyOpts.push('"' + escapedName + '"'); } + if (required) { propertyOpts.push("required=true"); } @@ -902,6 +908,7 @@ import com.fasterxml.jackson.module.kotlin.*`); properties.push("@get:JsonIgnore"); properties.push("@field:JsonIgnore"); } + return properties.length === 0 ? undefined : properties; } @@ -911,7 +918,7 @@ import com.fasterxml.jackson.module.kotlin.*`); this.emitLine("typealias ", className, " = JsonNode"); } - protected emitClassDefinitionMethods(c: ClassType, className: Name) { + protected emitClassDefinitionMethods(c: ClassType, className: Name): void { const isTopLevel = iterableSome(this.topLevels, ([_, top]) => top === c); if (isTopLevel) { this.emitBlock(")", () => { @@ -926,7 +933,7 @@ import com.fasterxml.jackson.module.kotlin.*`); } } - protected renameAttribute(name: Name, jsonName: string, required: boolean, meta: Array<() => void>) { + protected renameAttribute(name: Name, jsonName: string, required: boolean, meta: Array<() => void>): void { const rename = this.jacksonRenameAttribute(name, jsonName, required); if (rename !== undefined) { meta.push(() => this.emitLine(rename)); @@ -974,7 +981,7 @@ private fun ObjectMapper.convert(k: kotlin.reflect.KClass<*>, fromJson: (Jso nonNulls: ReadonlySet, maybeNull: PrimitiveType | null, unionName: Name - ) { + ): void { this.ensureBlankLine(); this.emitLine("fun toJson(): String = mapper.writeValueAsString(when (this) {"); this.indent(() => { @@ -986,6 +993,7 @@ private fun ObjectMapper.convert(k: kotlin.reflect.KClass<*>, fromJson: (Jso const name = this.nameForUnionMember(u, maybeNull); toJsonTable.push([["is ", name], [' -> "null"']]); } + this.emitTable(toJsonTable); }); this.emitLine("})"); @@ -1001,6 +1009,7 @@ private fun ObjectMapper.convert(k: kotlin.reflect.KClass<*>, fromJson: (Jso const name = this.nameForUnionMember(u, maybeNull); table.push([[this.unionMemberJsonValueGuard(maybeNull, "jn")], [" -> ", name, "()"]]); } + table.push([["else"], [" -> throw IllegalArgumentException()"]]); this.emitTable(table); }); @@ -1014,7 +1023,7 @@ private fun ObjectMapper.convert(k: kotlin.reflect.KClass<*>, fromJson: (Jso * TODO: Union, Any, Top Level Array, Top Level Map */ export class KotlinXRenderer extends KotlinRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, _kotlinOptions: OptionValues @@ -1032,6 +1041,7 @@ export class KotlinXRenderer extends KotlinRenderer { if (name === "JsonObject" || name === "JsonElement") { return "JsonArray"; } + return super.arrayType(arrayType, withIssues, noOptional); } @@ -1041,6 +1051,7 @@ export class KotlinXRenderer extends KotlinRenderer { if (name === "JsonObject" || name === "JsonElement") { return "JsonObject"; } + return super.mapType(mapType, withIssues, noOptional); } @@ -1082,11 +1093,11 @@ export class KotlinXRenderer extends KotlinRenderer { this.emitLine("import kotlinx.serialization.encoding.*"); } - protected emitClassAnnotations(_c: Type, _className: Name) { + protected emitClassAnnotations(_c: Type, _className: Name): void { this.emitLine("@Serializable"); } - protected renameAttribute(name: Name, jsonName: string, _required: boolean, meta: Array<() => void>) { + protected renameAttribute(name: Name, jsonName: string, _required: boolean, meta: Array<() => void>): void { const rename = this._rename(name, jsonName); if (rename !== undefined) { meta.push(() => this.emitLine(rename)); @@ -1099,6 +1110,7 @@ export class KotlinXRenderer extends KotlinRenderer { if (namesDiffer) { return ['@SerialName("', escapedName, '")']; } + return undefined; } diff --git a/packages/quicktype-core/src/language/Objective-C.ts b/packages/quicktype-core/src/language/Objective-C.ts index d861ba41a..3b46b914b 100644 --- a/packages/quicktype-core/src/language/Objective-C.ts +++ b/packages/quicktype-core/src/language/Objective-C.ts @@ -1,32 +1,42 @@ -import { iterableSome, iterableFirst, mapContains, mapFirst, mapSome } from "collection-utils"; +import { iterableFirst, iterableSome, mapContains, mapFirst, mapSome } from "collection-utils"; +import unicode from "unicode-properties"; -import { TargetLanguage } from "../TargetLanguage"; -import { Type, ClassType, EnumType, ArrayType, MapType, UnionType, ClassProperty } from "../Type"; -import { matchType, nullableFromUnion, isAnyOrNull } from "../TypeUtils"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { Sourcelike, modifySource } from "../Source"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; import { - splitIntoWords, - combineWords, - firstUpperWordStyle, - allUpperWordStyle, + BooleanOption, + EnumOption, + type Option, + type OptionValues, + StringOption, + getOptionValues +} from "../RendererOptions"; +import { type Sourcelike, modifySource } from "../Source"; +import { + addPrefixIfNecessary, allLowerWordStyle, + allUpperWordStyle, camelCase, - utf16LegalizeCharacters, - stringEscape, - addPrefixIfNecessary, + combineWords, + fastIsUpperCase, + firstUpperWordStyle, repeatString, - fastIsUpperCase + splitIntoWords, + stringEscape, + utf16LegalizeCharacters } from "../support/Strings"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { StringOption, BooleanOption, EnumOption, Option, getOptionValues, OptionValues } from "../RendererOptions"; import { assert, defined } from "../support/Support"; -import { RenderContext } from "../Renderer"; - -import * as unicode from "unicode-properties"; +import { TargetLanguage } from "../TargetLanguage"; +import { ArrayType, type ClassProperty, ClassType, EnumType, MapType, Type, UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { isAnyOrNull, matchType, nullableFromUnion } from "../TypeUtils"; export type MemoryAttribute = "assign" | "strong" | "copy"; -export type OutputFeatures = { interface: boolean; implementation: boolean }; +export interface OutputFeatures { + implementation: boolean; + interface: boolean; +} const DEBUG = false; const DEFAULT_CLASS_PREFIX = "QT"; @@ -44,11 +54,11 @@ export const objcOptions = { }; export class ObjectiveCTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Objective-C", ["objc", "objective-c", "objectivec"], "m"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ objcOptions.justTypes, objcOptions.classPrefix, @@ -58,10 +68,7 @@ export class ObjectiveCTargetLanguage extends TargetLanguage { ]; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): ObjectiveCRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): ObjectiveCRenderer { return new ObjectiveCRenderer(this, renderContext, getOptionValues(objcOptions, untypedOptionValues)); } } @@ -93,14 +100,14 @@ function propertyNameStyle(original: string, isBool = false): string { if (isBool) { if (words.length === 0) { words = [{ word: "flag", isAcronym: false }]; - } else if (!words[0].isAcronym && booleanPrefixes.indexOf(words[0].word) < 0) { + } else if (!words[0].isAcronym && !booleanPrefixes.includes(words[0].word)) { words = [{ word: "is", isAcronym: false }, ...words]; } } // Properties cannot even begin with any of the forbidden names // For example, properies named new* are treated differently by ARC - if (words.length > 0 && forbiddenPropertyNames.indexOf(words[0].word) >= 0) { + if (words.length > 0 && forbiddenPropertyNames.includes(words[0].word)) { words = [{ word: "the", isAcronym: false }, ...words]; } @@ -205,7 +212,7 @@ function isStartCharacter(utf16Unit: number): boolean { function isPartCharacter(utf16Unit: number): boolean { const category: string = unicode.getCategory(utf16Unit); - return ["Nd", "Pc", "Mn", "Mc"].indexOf(category) >= 0 || isStartCharacter(utf16Unit); + return ["Nd", "Pc", "Mn", "Mc"].includes(category) || isStartCharacter(utf16Unit); } const legalizeName = utf16LegalizeCharacters(isPartCharacter); @@ -217,14 +224,15 @@ function splitExtension(filename: string): [string, string] { const i = filename.lastIndexOf("."); const extension = i !== -1 ? filename.split(".").pop() : "m"; filename = i !== -1 ? filename.slice(0, i) : filename; - return [filename, extension === undefined ? "m" : extension]; + return [filename, extension ?? "m"]; } export class ObjectiveCRenderer extends ConvenienceRenderer { private _currentFilename: string | undefined; + private readonly _classPrefix: string; - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -246,6 +254,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { while (firstNonUpper < l && fastIsUpperCase(name.charCodeAt(firstNonUpper))) { firstNonUpper += 1; } + if (firstNonUpper < 2) return DEFAULT_CLASS_PREFIX; return name.slice(0, firstNonUpper - 1); } @@ -299,14 +308,14 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { this.emitLine("}"); } - protected emitMethod(declaration: Sourcelike, f: () => void) { + protected emitMethod(declaration: Sourcelike, f: () => void): void { this.emitLine(declaration); this.emitLine("{"); this.indent(f); this.emitLine("}"); } - protected emitExtraComments(...comments: Sourcelike[]) { + protected emitExtraComments(...comments: Sourcelike[]): void { if (!this._options.extraComments) return; for (const comment of comments) { this.emitLine("// ", comment); @@ -361,6 +370,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { if (isAnyOrNull(itemType)) { return ["NSArray", " *"]; } + return [["NSArray<", itemTypeName, ">"], " *"]; }, classType => [this.nameForNamedType(classType), " *"], @@ -420,7 +430,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { _anyType => ["NSNullify(", typed, ")"], _nullType => ["NSNullify(", typed, ")"], // Sadly, KVC - _boolType => [typed, ` ? @YES : @NO`], + _boolType => [typed, " ? @YES : @NO"], _integerType => typed, _doubleType => typed, _stringType => typed, @@ -429,6 +439,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { // TODO check each value type return typed; } + return ["map(", typed, ", λ(id x, ", this.toDynamicExpression(arrayType.items, "x"), "))"]; }, _classType => ["[", typed, " JSONDictionary]"], @@ -437,6 +448,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { // TODO check each value type return typed; } + return ["map(", typed, ", λ(id x, ", this.toDynamicExpression(mapType.values, "x"), "))"]; }, _enumType => ["[", typed, " value]"], @@ -484,7 +496,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { return this.implicitlyConvertsFromJSON(t) && "bool" !== t.kind; } - protected emitPropertyAssignment(propertyName: Name, jsonName: string, propertyType: Type) { + protected emitPropertyAssignment(propertyName: Name, jsonName: string, propertyType: Type): void { const name = ["_", propertyName]; matchType( propertyType, @@ -575,13 +587,13 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { this.emitLine(this.topLevelToJSONPrototype(name, true), ";"); } - private emitTryCatchAsError(inTry: () => void, inCatch: () => void) { + private emitTryCatchAsError(inTry: () => void, inCatch: () => void): void { this.emitLine("@try {"); this.indent(inTry); this.emitLine("} @catch (NSException *exception) {"); this.indent(() => { this.emitLine( - `*error = [NSError errorWithDomain:@"JSONSerialization" code:-1 userInfo:@{ @"exception": exception }];` + '*error = [NSError errorWithDomain:@"JSONSerialization" code:-1 userInfo:@{ @"exception": exception }];' ); inCatch(); }); @@ -644,6 +656,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { if (property.type.isNullable) { attributes.push("nullable"); } + attributes.push(this.memoryAttribute(property.type, property.type.isNullable)); return [ ["@property ", ["(", attributes.join(", "), ")"], " "], @@ -663,10 +676,11 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { ); this.emitLine("- (NSData *_Nullable)toData:(NSError *_Nullable *)error;"); } + this.emitLine("@end"); } - protected hasIrregularProperties(t: ClassType) { + protected hasIrregularProperties(t: ClassType): boolean { let irregular = false; this.forEachClassProperty(t, "none", (name, jsonName) => { irregular = irregular || stringEscape(jsonName) !== this.sourcelikeToString(name); @@ -674,7 +688,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { return irregular; } - protected hasUnsafeProperties(t: ClassType) { + protected hasUnsafeProperties(t: ClassType): boolean { let unsafe = false; this.forEachClassProperty(t, "none", (_, __, property) => { unsafe = unsafe || !this.implicitlyConvertsToJSON(property.type); @@ -696,7 +710,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { this.emitLine("return properties = properties ? properties : @{"); this.indent(() => { this.forEachClassProperty(t, "none", (name, jsonName) => - this.emitLine(`@"${stringEscape(jsonName)}": @"`, name, `",`) + this.emitLine(`@"${stringEscape(jsonName)}": @"`, name, '",') ); }); this.emitLine("};"); @@ -770,10 +784,10 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { if (hasIrregularProperties) { this.emitExtraComments("Rewrite property names that differ in JSON"); this.emitBlock(["for (id jsonName in ", className, ".properties)"], () => { - this.emitLine(`id propertyName = `, className, `.properties[jsonName];`); - this.emitBlock(`if (![jsonName isEqualToString:propertyName])`, () => { - this.emitLine(`dict[jsonName] = dict[propertyName];`); - this.emitLine(`[dict removeObjectForKey:propertyName];`); + this.emitLine("id propertyName = ", className, ".properties[jsonName];"); + this.emitBlock("if (![jsonName isEqualToString:propertyName])", () => { + this.emitLine("dict[jsonName] = dict[propertyName];"); + this.emitLine("[dict removeObjectForKey:propertyName];"); }); }); } @@ -800,12 +814,12 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { if (isTopLevel) { this.ensureBlankLine(); - this.emitMethod(`- (NSData *_Nullable)toData:(NSError *_Nullable *)error`, () => { + this.emitMethod("- (NSData *_Nullable)toData:(NSError *_Nullable *)error", () => { this.emitLine("return ", className, "ToData(self, error);"); }); this.ensureBlankLine(); this.emitMethod( - `- (NSString *_Nullable)toJSON:(NSStringEncoding)encoding error:(NSError *_Nullable *)error`, + "- (NSString *_Nullable)toJSON:(NSStringEncoding)encoding error:(NSError *_Nullable *)error", () => { this.emitLine("return ", className, "ToJSON(self, encoding, error);"); } @@ -816,7 +830,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { this.emitLine("@end"); } - protected emitMark(label: string) { + protected emitMark(label: string): void { this.ensureBlankLine(); this.emitLine(`#pragma mark - ${label}`); this.ensureBlankLine(); @@ -832,7 +846,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { return camelCaseName; } - private emitPseudoEnumInterface(enumType: EnumType, enumName: Name) { + private emitPseudoEnumInterface(enumType: EnumType, enumName: Name): void { this.emitDescription(this.descriptionForType(enumType)); this.emitLine("@interface ", enumName, " : NSObject"); @@ -844,7 +858,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { this.emitLine("@end"); } - private emitPseudoEnumImplementation(enumType: EnumType, enumName: Name) { + private emitPseudoEnumImplementation(enumType: EnumType, enumName: Name): void { this.emitLine("@implementation ", enumName); const instances = [enumName, ".", staticEnumValuesIdentifier]; @@ -906,6 +920,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { const firstTopLevel = defined(mapFirst(this.topLevels)); proposedFilename = this.sourcelikeToString(this.nameForNamedType(firstTopLevel)) + ".m"; } + const [filename, extension] = splitExtension(proposedFilename); if (this._options.features.interface) { @@ -933,7 +948,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { } this.ensureBlankLine(); - this.emitLine(`#import `); + this.emitLine("#import "); this.ensureBlankLine(); // Emit @class declarations for top-level array+maps and classes @@ -996,7 +1011,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { if (!this._options.justTypes) { this.ensureBlankLine(); this.emitExtraComments("Shorthand for simple blocks"); - this.emitLine(`#define λ(decl, expr) (^(decl) { return (expr); })`); + this.emitLine("#define λ(decl, expr) (^(decl) { return (expr); })"); this.ensureBlankLine(); this.emitExtraComments("nil → NSNull conversion for JSON dictionaries"); this.emitBlock("static id NSNullify(id _Nullable x)", () => @@ -1028,6 +1043,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { ); this.ensureBlankLine(); } + this.forEachEnum("leading-and-interposing", (t, n) => this.emitPseudoEnumImplementation(t, n)); } @@ -1054,6 +1070,7 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { this.finishFile(); } } + private get needsMap(): boolean { // TODO this isn't complete (needs union support, for example) function needsMap(t: Type): boolean { @@ -1063,10 +1080,11 @@ export class ObjectiveCRenderer extends ConvenienceRenderer { (t instanceof ClassType && mapSome(t.getProperties(), p => needsMap(p.type))) ); } + return iterableSome(this.typeGraph.allTypesUnordered(), needsMap); } - protected emitMapFunction() { + protected emitMapFunction(): void { if (this.needsMap) { this.emitMultiline(`static id map(id collection, id (^f)(id value)) { id result = nil; diff --git a/packages/quicktype-core/src/language/Php.ts b/packages/quicktype-core/src/language/Php.ts index 670b09cc1..e448bb1ee 100644 --- a/packages/quicktype-core/src/language/Php.ts +++ b/packages/quicktype-core/src/language/Php.ts @@ -1,10 +1,13 @@ +import * as _ from "lodash"; + +import { type PrimitiveStringTypeKind, type StringTypeMapping, type TransformedStringTypeKind } from ".."; import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { DependencyName, funPrefixNamer, Name, Namer } from "../Naming"; -import { RenderContext } from "../Renderer"; -import { BooleanOption, getOptionValues, Option, OptionValues } from "../RendererOptions"; -import { maybeAnnotated, Sourcelike } from "../Source"; -import { acronymOption, acronymStyle, AcronymStyleOptions } from "../support/Acronyms"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { DependencyName, type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, type Option, type OptionValues, getOptionValues } from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated } from "../Source"; +import { AcronymStyleOptions, acronymOption, acronymStyle } from "../support/Acronyms"; import { allLowerWordStyle, allUpperWordStyle, @@ -21,10 +24,9 @@ import { } from "../support/Strings"; import { defined } from "../support/Support"; import { TargetLanguage } from "../TargetLanguage"; -import { ClassProperty, ClassType, EnumType, Type, UnionType } from "../Type"; +import { type ClassProperty, type ClassType, type EnumType, type Type, type UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; import { directlyReachableSingleNamedType, matchType, nullableFromUnion } from "../TypeUtils"; -import { StringTypeMapping, TransformedStringTypeKind, PrimitiveStringTypeKind } from ".."; -import * as _ from "lodash"; export const phpOptions = { withGet: new BooleanOption("with-get", "Create Getter", true), @@ -35,24 +37,24 @@ export const phpOptions = { }; export class PhpTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("PHP", ["php"], "php"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return _.values(phpOptions); } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): PhpRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): PhpRenderer { const options = getOptionValues(phpOptions, untypedOptionValues); return new PhpRenderer(this, renderContext, options); } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); mapping.set("date", "date"); // TODO is not implemented yet mapping.set("time", "time"); // TODO is not implemented yet @@ -95,21 +97,24 @@ export function phpNameStyle( } export interface FunctionNames { + readonly from: Name; readonly getter: Name; + readonly sample: Name; readonly setter: Name; - readonly validate: Name; - readonly from: Name; readonly to: Name; - readonly sample: Name; + readonly validate: Name; } export class PhpRenderer extends ConvenienceRenderer { private readonly _gettersAndSettersForPropertyName = new Map(); + private _haveEmittedLeadingComments = false; + protected readonly _converterClassname: string = "Converter"; + protected readonly _converterKeywords: string[] = []; - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, protected readonly _options: OptionValues @@ -256,9 +261,10 @@ export class PhpRenderer extends ConvenienceRenderer { } protected phpType(_reference: boolean, t: Type, isOptional = false, prefix = "?", suffix = ""): Sourcelike { - function optionalize(s: Sourcelike) { + function optionalize(s: Sourcelike): Sourcelike { return [isOptional ? prefix : "", s, isOptional ? suffix : ""]; } + return matchType( t, _anyType => maybeAnnotated(isOptional, anyTypeIssueAnnotation, "Object"), @@ -280,15 +286,19 @@ export class PhpRenderer extends ConvenienceRenderer { if (transformedStringType.kind === "time") { throw Error('transformedStringType.kind === "time"'); } + if (transformedStringType.kind === "date") { throw Error('transformedStringType.kind === "date"'); } + if (transformedStringType.kind === "date-time") { return "DateTime"; } + if (transformedStringType.kind === "uuid") { throw Error('transformedStringType.kind === "uuid"'); } + return "string"; } ); @@ -312,12 +322,14 @@ export class PhpRenderer extends ConvenienceRenderer { if (nullable !== null) { return [this.phpDocConvertType(className, nullable), "|null"]; } + throw Error("union are not supported"); }, transformedStringType => { if (transformedStringType.kind === "date-time") { return "DateTime"; } + throw Error('transformedStringType.kind === "unknown"'); } ); @@ -341,19 +353,21 @@ export class PhpRenderer extends ConvenienceRenderer { if (nullable !== null) { return ["?", this.phpConvertType(className, nullable)]; } + throw Error("union are not supported"); }, transformedStringType => { if (transformedStringType.kind === "date-time") { return "string"; } + throw Error('transformedStringType.kind === "unknown"'); } ); } - protected phpToObjConvert(className: Name, t: Type, lhs: Sourcelike[], args: Sourcelike[]) { - return matchType( + protected phpToObjConvert(className: Name, t: Type, lhs: Sourcelike[], args: Sourcelike[]): void { + matchType( t, _anyType => this.emitLine(...lhs, ...args, "; /*any*/"), _nullType => this.emitLine(...lhs, ...args, "; /*null*/"), @@ -391,6 +405,7 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitLine("}"); return; } + throw Error("union are not supported"); }, transformedStringType => { @@ -398,12 +413,13 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitLine(...lhs, ...args, "->format(DateTimeInterface::ISO8601);"); return; } + throw Error('transformedStringType.kind === "unknown"'); } ); } - private transformDateTime(className: Name, attrName: Sourcelike, scopeAttrName: Sourcelike[]) { + private transformDateTime(className: Name, attrName: Sourcelike, scopeAttrName: Sourcelike[]): void { this.emitBlock(["if (!is_a(", scopeAttrName, ", 'DateTime'))"], () => this.emitLine("throw new Exception('Attribute Error:", className, "::", attrName, "');") ); @@ -412,8 +428,8 @@ export class PhpRenderer extends ConvenienceRenderer { // } } - protected phpFromObjConvert(className: Name, t: Type, lhs: Sourcelike[], args: Sourcelike[]) { - return matchType( + protected phpFromObjConvert(className: Name, t: Type, lhs: Sourcelike[], args: Sourcelike[]): void { + matchType( t, _anyType => this.emitLine(...lhs, ...args, "; /*any*/"), _nullType => this.emitLine(...lhs, ...args, "; /*null*/"), @@ -452,6 +468,7 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitLine("}"); return; } + throw Error("union are not supported"); }, transformedStringType => { @@ -461,6 +478,7 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitLine("return $tmp;"); return; } + throw Error('transformedStringType.kind === "unknown"'); } ); @@ -473,8 +491,8 @@ export class PhpRenderer extends ConvenienceRenderer { args: Sourcelike[], idx: number, suffix: Sourcelike - ) { - return matchType( + ): void { + matchType( t, _anyType => this.emitLine( @@ -546,6 +564,7 @@ export class PhpRenderer extends ConvenienceRenderer { this.phpSampleConvert(className, nullable, lhs, args, idx, suffix); return; } + throw Error("union are not supported:" + unionType); }, transformedStringType => { @@ -561,18 +580,20 @@ export class PhpRenderer extends ConvenienceRenderer { // this.emitLine("return sample();"); return; } + throw Error('transformedStringType.kind === "unknown"'); } ); } - private phpValidate(className: Name, t: Type, attrName: Sourcelike, scopeAttrName: string) { - const is = (isfn: string, myT: Name = className) => { + private phpValidate(className: Name, t: Type, attrName: Sourcelike, scopeAttrName: string): void { + const is = (isfn: string, myT: Name = className): void => { this.emitBlock(["if (!", isfn, "(", scopeAttrName, "))"], () => this.emitLine('throw new Exception("Attribute Error:', myT, "::", attrName, '");') ); }; - return matchType( + + matchType( t, _anyType => is("defined"), _nullType => is("is_null"), @@ -609,6 +630,7 @@ export class PhpRenderer extends ConvenienceRenderer { }); return; } + throw Error("not implemented"); }, transformedStringType => { @@ -616,17 +638,25 @@ export class PhpRenderer extends ConvenienceRenderer { this.transformDateTime(className, attrName, [scopeAttrName]); return; } + throw Error(`transformedStringType.kind === ${transformedStringType.kind}`); } ); } - protected emitFromMethod(names: FunctionNames, p: ClassProperty, className: Name, _name: Name, desc?: string[]) { + protected emitFromMethod( + names: FunctionNames, + p: ClassProperty, + className: Name, + _name: Name, + desc?: string[] + ): void { this.emitLine("/**"); if (desc !== undefined) { this.emitLine(" * ", desc); this.emitLine(" *"); } + // this.emitLine(" * @param ", this.phpType(false, p.type, false, "", "|null")); this.emitLine(" * @param ", this.phpConvertType(className, p.type), " $value"); this.emitLine(" * @throws Exception"); @@ -642,17 +672,19 @@ export class PhpRenderer extends ConvenienceRenderer { this.phpType(false, p.type) ], () => { - this.phpFromObjConvert(className, p.type, ["return "], [`$value`]); + this.phpFromObjConvert(className, p.type, ["return "], ["$value"]); // this.emitLine("return $ret;"); } ); } - protected emitToMethod(names: FunctionNames, p: ClassProperty, className: Name, name: Name, desc?: string[]) { + + protected emitToMethod(names: FunctionNames, p: ClassProperty, className: Name, name: Name, desc?: string[]): void { this.emitLine("/**"); if (desc !== undefined) { this.emitLine(" * ", desc); this.emitLine(" *"); } + this.emitLine(" * @throws Exception"); this.emitLine(" * @return ", this.phpConvertType(className, p.type)); this.emitLine(" */"); @@ -663,12 +695,20 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitLine("throw new Exception('never get to this ", className, "::", name, "');"); }); } - protected emitValidateMethod(names: FunctionNames, p: ClassProperty, className: Name, name: Name, desc?: string[]) { + + protected emitValidateMethod( + names: FunctionNames, + p: ClassProperty, + className: Name, + name: Name, + desc?: string[] + ): void { this.emitLine("/**"); if (desc !== undefined) { this.emitLine(" * ", desc); this.emitLine(" *"); } + this.emitLine(" * @param ", this.phpType(false, p.type, false, "", "|null")); this.emitLine(" * @return bool"); this.emitLine(" * @throws Exception"); @@ -676,21 +716,30 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitBlock( ["public static function ", names.validate, "(", this.phpType(false, p.type), " $value): bool"], () => { - this.phpValidate(className, p.type, name, `$value`); + this.phpValidate(className, p.type, name, "$value"); this.emitLine("return true;"); } ); } - protected emitGetMethod(names: FunctionNames, p: ClassProperty, className: Name, name: Name, desc?: string[]) { + + protected emitGetMethod( + names: FunctionNames, + p: ClassProperty, + className: Name, + name: Name, + desc?: string[] + ): void { if (this._options.withGet) { this.emitLine("/**"); if (desc !== undefined) { this.emitLine(" * ", desc); this.emitLine(" *"); } + if (!this._options.fastGet) { - this.emitLine(` * @throws Exception`); + this.emitLine(" * @throws Exception"); } + const rendered = this.phpType(false, p.type); this.emitLine(" * @return ", rendered); this.emitLine(" */"); @@ -714,15 +763,23 @@ export class PhpRenderer extends ConvenienceRenderer { }); } } - protected emitSetMethod(names: FunctionNames, p: ClassProperty, className: Name, name: Name, desc?: string[]) { + + protected emitSetMethod( + names: FunctionNames, + p: ClassProperty, + className: Name, + name: Name, + desc?: string[] + ): void { if (this._options.withSet) { this.emitLine("/**"); if (desc !== undefined) { this.emitLine(" * ", desc); this.emitLine(" *"); } + this.emitLine(" * @param ", this.phpType(false, p.type, false, "", "|null")); - this.emitLine(` * @throws Exception`); + this.emitLine(" * @throws Exception"); this.emitLine(" */"); this.emitBlock(["public function ", names.setter, "(", this.phpType(false, p.type), " $value)"], () => { this.emitBlock(["if (", className, "::", names.validate, "($value)) "], () => { @@ -731,6 +788,7 @@ export class PhpRenderer extends ConvenienceRenderer { }); } } + protected emitSampleMethod( names: FunctionNames, p: ClassProperty, @@ -738,13 +796,14 @@ export class PhpRenderer extends ConvenienceRenderer { name: Name, desc: string[] | undefined, idx: number - ) { + ): void { if (this._options.withGet) { this.emitLine("/**"); if (desc !== undefined) { this.emitLine(" * ", desc); this.emitLine(" *"); } + const rendered = this.phpType(false, p.type); this.emitLine(" * @return ", rendered); this.emitLine(" */"); @@ -807,7 +866,7 @@ export class PhpRenderer extends ConvenienceRenderer { this.ensureBlankLine(); this.emitBlock( - ["/**\n", ` * @throws Exception\n`, ` * @return bool\n`, " */\n", "public function validate(): bool"], + ["/**\n", " * @throws Exception\n", " * @return bool\n", " */\n", "public function validate(): bool"], () => { let lines: Sourcelike[][] = []; let p = "return "; @@ -826,8 +885,8 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitBlock( [ "/**\n", - ` * @return stdClass\n`, - ` * @throws Exception\n`, + " * @return stdClass\n", + " * @throws Exception\n", " */\n", "public function to(): stdClass " ], @@ -845,11 +904,11 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitBlock( [ "/**\n", - ` * @param stdClass $obj\n`, - ` * @return `, + " * @param stdClass $obj\n", + " * @return ", className, - `\n`, - ` * @throws Exception\n`, + "\n", + " * @throws Exception\n", " */\n", "public static function from(stdClass $obj): ", className @@ -861,6 +920,7 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitLine(className, "::", names.validate, "($this->", name, ", true);"); }); } + this.emitLine("return new ", className, "("); let comma = " "; this.forEachClassProperty(c, "none", (name, jsonName) => { @@ -901,11 +961,11 @@ export class PhpRenderer extends ConvenienceRenderer { throw Error("emitUnionDefinition not implemented"); } - protected emitEnumSerializationAttributes(_e: EnumType) { + protected emitEnumSerializationAttributes(_e: EnumType): void { // Empty } - protected emitEnumDeserializationAttributes(_e: EnumType) { + protected emitEnumDeserializationAttributes(_e: EnumType): void { // Empty } @@ -937,13 +997,13 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitBlock( [ "/**\n", - ` * @param `, + " * @param ", enumName, - `\n`, - ` * @return `, + "\n", + " * @return ", enumSerdeType, - `\n`, - ` * @throws Exception\n`, + "\n", + " * @throws Exception\n", " */\n", "public static function to(", enumName, @@ -976,11 +1036,11 @@ export class PhpRenderer extends ConvenienceRenderer { this.emitBlock( [ "/**\n", - ` * @param mixed\n`, - ` * @return `, + " * @param mixed\n", + " * @return ", enumName, "\n", - ` * @throws Exception\n`, + " * @throws Exception\n", " */\n", "public static function from($obj): ", enumName @@ -999,7 +1059,7 @@ export class PhpRenderer extends ConvenienceRenderer { ); this.ensureBlankLine(); this.emitBlock( - ["/**\n", ` * @return `, enumName, "\n", " */\n", "public static function sample(): ", enumName], + ["/**\n", " * @return ", enumName, "\n", " */\n", "public static function sample(): ", enumName], () => { const lines: Sourcelike[] = []; this.forEachEnumCase(e, "none", name => { @@ -1024,6 +1084,7 @@ export class PhpRenderer extends ConvenienceRenderer { if (this._options.withClosing) { this.emitLine("?>"); } + super.finishFile(defined(givenFilename)); } } diff --git a/packages/quicktype-core/src/language/Pike.ts b/packages/quicktype-core/src/language/Pike.ts index d2d9541b7..ea7f9d3a5 100644 --- a/packages/quicktype-core/src/language/Pike.ts +++ b/packages/quicktype-core/src/language/Pike.ts @@ -1,12 +1,13 @@ -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { Option } from "../RendererOptions"; -import { RenderContext } from "../Renderer"; -import { MultiWord, Sourcelike, multiWord, parenIfNeeded, singleWord } from "../Source"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { type Option } from "../RendererOptions"; +import { type MultiWord, type Sourcelike, multiWord, parenIfNeeded, singleWord } from "../Source"; +import { isLetterOrUnderscoreOrDigit, legalizeCharacters, makeNameStyle, stringEscape } from "../support/Strings"; import { TargetLanguage } from "../TargetLanguage"; -import { Type, ClassType, EnumType, UnionType, ArrayType, MapType, PrimitiveType } from "../Type"; +import { ArrayType, type ClassType, type EnumType, MapType, PrimitiveType, type Type, type UnionType } from "../Type"; +import { type FixMeOptionsAnyType } from "../types"; import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { legalizeCharacters, isLetterOrUnderscoreOrDigit, stringEscape, makeNameStyle } from "../support/Strings"; export const pikeOptions = {}; @@ -71,10 +72,11 @@ const namingFunction = funPrefixNamer("genericNamer", makeNameStyle("underscore" const namedTypeNamingFunction = funPrefixNamer("typeNamer", makeNameStyle("pascal", legalizeName)); export class PikeTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Pike", ["pike", "pikelang"], "pmod"); } - protected getOptions(): Option[] { + + protected getOptions(): Array> { return []; } @@ -113,6 +115,7 @@ export class PikeRenderer extends ConvenienceRenderer { protected makeEnumCaseNamer(): Namer { return enumNamingFunction; } + protected makeNamedTypeNamer(): Namer { return namedTypeNamingFunction; } @@ -142,9 +145,10 @@ export class PikeRenderer extends ConvenienceRenderer { } protected sourceFor(t: Type): MultiWord { - if (["class", "object", "enum"].indexOf(t.kind) >= 0) { + if (["class", "object", "enum"].includes(t.kind)) { return singleWord(this.nameForNamedType(t)); } + return matchType( t, _anyType => singleWord("mixed"), @@ -252,7 +256,7 @@ export class PikeRenderer extends ConvenienceRenderer { this.emitTable(table); } - private emitInformationComment() { + private emitInformationComment(): void { this.emitCommentLines( [ "This source has been automatically generated by quicktype.", @@ -273,11 +277,11 @@ export class PikeRenderer extends ConvenienceRenderer { ); } - private emitTopLevelTypedef(t: Type, name: Name) { + private emitTopLevelTypedef(t: Type, name: Name): void { this.emitLine("typedef ", this.sourceFor(t).source, " ", name, ";"); } - private emitTopLevelConverter(t: Type, name: Name) { + private emitTopLevelConverter(t: Type, name: Name): void { this.emitBlock([name, " ", name, "_from_JSON(mixed json)"], () => { if (t instanceof PrimitiveType) { this.emitLine(["return json;"]); @@ -298,7 +302,7 @@ export class PikeRenderer extends ConvenienceRenderer { }); } - private emitEncodingFunction(c: ClassType) { + private emitEncodingFunction(c: ClassType): void { this.emitBlock(["string encode_json()"], () => { this.emitMappingBlock(["mapping(string:mixed) json = "], () => { this.forEachClassProperty(c, "none", (name, jsonName) => { @@ -310,7 +314,7 @@ export class PikeRenderer extends ConvenienceRenderer { }); } - private emitDecodingFunction(className: Name, c: ClassType) { + private emitDecodingFunction(className: Name, c: ClassType): void { this.emitBlock([className, " ", className, "_from_JSON(mixed json)"], () => { this.emitLine([className, " retval = ", className, "();"]); this.ensureBlankLine(); diff --git a/packages/quicktype-core/src/language/Python.ts b/packages/quicktype-core/src/language/Python.ts index 3c2f3ae0e..dc3f5b9e9 100644 --- a/packages/quicktype-core/src/language/Python.ts +++ b/packages/quicktype-core/src/language/Python.ts @@ -1,54 +1,56 @@ -import { TargetLanguage } from "../TargetLanguage"; -import { StringTypeMapping } from "../TypeBuilder"; import { - TransformedStringTypeKind, - PrimitiveStringTypeKind, - Type, - EnumType, - ClassType, - UnionType, - ClassProperty -} from "../Type"; -import { RenderContext } from "../Renderer"; -import { Option, getOptionValues, OptionValues, EnumOption, BooleanOption } from "../RendererOptions"; -import { ConvenienceRenderer, ForbiddenWordsInfo, topLevelNameOrder } from "../ConvenienceRenderer"; -import { Namer, funPrefixNamer, Name, DependencyName } from "../Naming"; + arrayIntercalate, + iterableFirst, + iterableSome, + mapSortBy, + mapUpdateInto, + setUnionInto +} from "collection-utils"; +import unicode from "unicode-properties"; + +import { ConvenienceRenderer, type ForbiddenWordsInfo, topLevelNameOrder } from "../ConvenienceRenderer"; +import { DependencyName, type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, EnumOption, type Option, type OptionValues, getOptionValues } from "../RendererOptions"; +import { type MultiWord, type Sourcelike, modifySource, multiWord, parenIfNeeded, singleWord } from "../Source"; import { - splitIntoWords, + type WordStyle, + allLowerWordStyle, + allUpperWordStyle, combineWords, firstUpperWordStyle, - utf16LegalizeCharacters, - allUpperWordStyle, - allLowerWordStyle, + originalWord, + splitIntoWords, stringEscape, - originalWord + utf16LegalizeCharacters } from "../support/Strings"; -import { assertNever, panic, defined } from "../support/Support"; -import { Sourcelike, MultiWord, multiWord, singleWord, parenIfNeeded, modifySource } from "../Source"; -import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; +import { assertNever, defined, panic } from "../support/Support"; +import { TargetLanguage } from "../TargetLanguage"; import { - followTargetType, - transformationForType, - Transformer, - DecodingChoiceTransformer, ChoiceTransformer, + DecodingChoiceTransformer, DecodingTransformer, - UnionInstantiationTransformer, + EncodingTransformer, ParseStringTransformer, - UnionMemberMatchTransformer, StringifyTransformer, - EncodingTransformer + type Transformer, + UnionInstantiationTransformer, + UnionMemberMatchTransformer, + followTargetType, + transformationForType } from "../Transformers"; import { - arrayIntercalate, - setUnionInto, - mapUpdateInto, - iterableSome, - mapSortBy, - iterableFirst -} from "collection-utils"; - -import * as unicode from "unicode-properties"; + type ClassProperty, + ClassType, + EnumType, + type PrimitiveStringTypeKind, + type TransformedStringTypeKind, + type Type, + UnionType +} from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; const forbiddenTypeNames = [ "Any", @@ -109,10 +111,10 @@ const forbiddenPropertyNames = [ "yield" ]; -export type PythonFeatures = { - typeHints: boolean; +export interface PythonFeatures { dataClasses: boolean; -}; + typeHints: boolean; +} export const pythonOptions = { features: new EnumOption( @@ -130,11 +132,11 @@ export const pythonOptions = { }; export class PythonTargetLanguage extends TargetLanguage { - protected getOptions(): Option[] { + protected getOptions(): Array> { return [pythonOptions.features, pythonOptions.justTypes, pythonOptions.nicePropertyNames]; } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); const dateTimeType = "date-time"; mapping.set("date", dateTimeType); @@ -146,22 +148,23 @@ export class PythonTargetLanguage extends TargetLanguage { return mapping; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return false; } - needsTransformerForType(t: Type): boolean { + public needsTransformerForType(t: Type): boolean { if (t instanceof UnionType) { return iterableSome(t.members, m => this.needsTransformerForType(m)); } + return t.kind === "integer-string" || t.kind === "bool-string"; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): PythonRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): PythonRenderer { const options = getOptionValues(pythonOptions, untypedOptionValues); if (options.justTypes) { return new PythonRenderer(this, renderContext, options); @@ -174,14 +177,14 @@ export class PythonTargetLanguage extends TargetLanguage { function isNormalizedStartCharacter3(utf16Unit: number): boolean { // FIXME: add Other_ID_Start - https://docs.python.org/3/reference/lexical_analysis.html#identifiers const category: string = unicode.getCategory(utf16Unit); - return ["Lu", "Ll", "Lt", "Lm", "Lo", "Nl"].indexOf(category) >= 0; + return ["Lu", "Ll", "Lt", "Lm", "Lo", "Nl"].includes(category); } function isNormalizedPartCharacter3(utf16Unit: number): boolean { // FIXME: add Other_ID_Continue - https://docs.python.org/3/reference/lexical_analysis.html#identifiers if (isNormalizedStartCharacter3(utf16Unit)) return true; const category: string = unicode.getCategory(utf16Unit); - return ["Mn", "Mc", "Nd", "Pc"].indexOf(category) >= 0; + return ["Mn", "Mc", "Nd", "Pc"].includes(category); } function isStartCharacter3(utf16Unit: number): boolean { @@ -191,6 +194,7 @@ function isStartCharacter3(utf16Unit: number): boolean { for (let i = 1; i < l; i++) { if (!isNormalizedPartCharacter3(s.charCodeAt(i))) return false; } + return true; } @@ -200,6 +204,7 @@ function isPartCharacter3(utf16Unit: number): boolean { for (let i = 0; i < l; i++) { if (!isNormalizedPartCharacter3(s.charCodeAt(i))) return false; } + return true; } @@ -219,10 +224,11 @@ function classNameStyle(original: string): string { ); } -function getWordStyle(uppercase: boolean, forceSnakeNameStyle: boolean) { +function getWordStyle(uppercase: boolean, forceSnakeNameStyle: boolean): WordStyle { if (!forceSnakeNameStyle) { return originalWord; } + return uppercase ? allUpperWordStyle : allLowerWordStyle; } @@ -235,9 +241,10 @@ function snakeNameStyle(original: string, uppercase: boolean, forceSnakeNameStyl export class PythonRenderer extends ConvenienceRenderer { private readonly imports: Map> = new Map(); + private readonly declaredTypes: Set = new Set(); - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, protected readonly pyOptions: OptionValues @@ -319,6 +326,7 @@ export class PythonRenderer extends ConvenienceRenderer { // potential others down the road. mapUpdateInto(this.imports, module, s => (s ? setUnionInto(s, [name]) : new Set([name]))); } + return name; } @@ -380,9 +388,11 @@ export class PythonRenderer extends ConvenienceRenderer { if (transformedStringType.kind === "date-time") { return this.withImport("datetime", "datetime"); } + if (transformedStringType.kind === "uuid") { return this.withImport("uuid", "UUID"); } + return panic(`Transformed type ${transformedStringType.kind} not supported`); } ); @@ -392,9 +402,11 @@ export class PythonRenderer extends ConvenienceRenderer { if (t instanceof ClassType) { return ["class ", this.nameForNamedType(t), ":"]; } + if (t instanceof EnumType) { return ["class ", this.nameForNamedType(t), "(", this.withImport("enum", "Enum"), "):"]; } + return panic(`Can't declare type ${t.kind}`); } @@ -431,6 +443,7 @@ export class PythonRenderer extends ConvenienceRenderer { if (this.pyOptions.features.typeHints) { return sl; } + return []; } @@ -459,6 +472,7 @@ export class PythonRenderer extends ConvenienceRenderer { if (this.pyOptions.features.dataClasses) { this.emitLine("@", this.withImport("dataclasses", "dataclass")); } + this.declareType(t, () => { if (this.pyOptions.features.typeHints) { if (t.getProperties().size === 0) { @@ -469,8 +483,10 @@ export class PythonRenderer extends ConvenienceRenderer { this.emitDescription(this.descriptionForClassProperty(t, jsonName)); }); } + this.ensureBlankLine(); } + this.emitClassMembers(t); }); } @@ -515,6 +531,7 @@ export class PythonRenderer extends ConvenienceRenderer { if (this.leadingComments !== undefined) { this.emitComments(this.leadingComments); } + this.ensureBlankLine(); this.emitImports(); this.ensureBlankLine(2); @@ -542,10 +559,10 @@ export type ConverterFunction = | "from-stringified-bool" | "is-type"; -type TopLevelConverterNames = { +interface TopLevelConverterNames { fromDict: Name; toDict: Name; -}; +} // A value or a lambda. All four combinations are valid: // @@ -553,10 +570,10 @@ type TopLevelConverterNames = { // * `lambda` only: a lambda given by `lambda` // * `value` only: a value given by `value` // * neither: the identity function, i.e. `lambda x: x` -export type ValueOrLambda = { - value: Sourcelike | undefined; +export interface ValueOrLambda { lambda?: MultiWord; -}; + value: Sourcelike | undefined; +} // Return the result of composing `input` and `f`. `input` can be a // value or a lambda, but `f` must be a lambda or a TypeScript function @@ -565,6 +582,8 @@ export type ValueOrLambda = { // * If `input` is a value, the result is `f(input)`. // * If `input` is a lambda, the result is `lambda x: f(input(x))` function compose(input: ValueOrLambda, f: (arg: Sourcelike) => Sourcelike): ValueOrLambda; +// FIXME: refactor this +// eslint-disable-next-line @typescript-eslint/unified-signatures function compose(input: ValueOrLambda, f: ValueOrLambda): ValueOrLambda; function compose(input: ValueOrLambda, f: ValueOrLambda | ((arg: Sourcelike) => Sourcelike)): ValueOrLambda { if (typeof f === "function") { @@ -572,10 +591,12 @@ function compose(input: ValueOrLambda, f: ValueOrLambda | ((arg: Sourcelike) => // `input` is a value, so just apply `f` to its source form. return { value: f(makeValue(input)) }; } + if (input.lambda !== undefined) { // `input` is a lambda, so build `lambda x: f(input(x))`. return { lambda: multiWord(" ", "lambda x:", f([parenIfNeeded(input.lambda), "(x)"])), value: undefined }; } + // `input` is the identify function, so the composition is `lambda x: f(x)`. return { lambda: multiWord(" ", "lambda x:", f("x")), value: undefined }; } @@ -583,6 +604,7 @@ function compose(input: ValueOrLambda, f: ValueOrLambda | ((arg: Sourcelike) => if (f.value !== undefined) { return panic("Cannot compose into a value"); } + if (f.lambda === undefined) { // `f` is the identity function, so the result is just `input`. return input; @@ -594,6 +616,7 @@ function compose(input: ValueOrLambda, f: ValueOrLambda | ((arg: Sourcelike) => // `input` is the identity function, so the result is just `f`. return f; } + // `input` is a lambda, so the result is `lambda x: f(input(x))`. return { lambda: multiWord("", "lambda x: ", parenIfNeeded(f.lambda), "(", parenIfNeeded(input.lambda), "(x))"), @@ -614,10 +637,12 @@ function makeLambda(vol: ValueOrLambda): MultiWord { if (vol.value === undefined) { return vol.lambda; } + return multiWord("", "lambda x: ", parenIfNeeded(vol.lambda), "(", vol.value, ")"); } else if (vol.value !== undefined) { return multiWord(" ", "lambda x:", vol.value); } + return multiWord(" ", "lambda x:", "x"); } @@ -627,26 +652,34 @@ function makeValue(vol: ValueOrLambda): Sourcelike { if (vol.value === undefined) { return panic("Cannot make value from lambda without value"); } + if (vol.lambda !== undefined) { return [parenIfNeeded(vol.lambda), "(", vol.value, ")"]; } + return vol.value; } export class JSONPythonRenderer extends PythonRenderer { private readonly _deserializerFunctions = new Set(); + private readonly _converterNamer = funPrefixNamer("converter", s => snakeNameStyle(s, false, this.pyOptions.nicePropertyNames) ); + private readonly _topLevelConverterNames = new Map(); + private _haveTypeVar = false; + private _haveEnumTypeVar = false; + private _haveDateutil = false; protected emitTypeVar(tvar: string, constraints: Sourcelike): void { if (!this.pyOptions.features.typeHints) { return; } + this.emitLine(tvar, " = ", this.withTyping("TypeVar"), "(", this.string(tvar), constraints, ")"); } @@ -674,6 +707,7 @@ export class JSONPythonRenderer extends PythonRenderer { if (!this.pyOptions.features.typeHints) { return v; } + return [this.withTyping("cast"), "(", type, ", ", v, ")"]; } @@ -861,34 +895,76 @@ export class JSONPythonRenderer extends PythonRenderer { protected emitConverter(cf: ConverterFunction): void { switch (cf) { - case "none": - return this.emitNoneConverter(); - case "bool": - return this.emitBoolConverter(); - case "int": - return this.emitIntConverter(); - case "from-float": - return this.emitFromFloatConverter(); - case "to-float": - return this.emitToFloatConverter(); - case "str": - return this.emitStrConverter(); - case "to-enum": - return this.emitToEnumConverter(); - case "list": - return this.emitListConverter(); - case "to-class": - return this.emitToClassConverter(); - case "dict": - return this.emitDictConverter(); - case "union": - return this.emitUnionConverter(); - case "from-datetime": - return this.emitFromDatetimeConverter(); - case "from-stringified-bool": - return this.emitFromStringifiedBoolConverter(); - case "is-type": - return this.emitIsTypeConverter(); + case "none": { + this.emitNoneConverter(); + return; + } + + case "bool": { + this.emitBoolConverter(); + return; + } + + case "int": { + this.emitIntConverter(); + return; + } + + case "from-float": { + this.emitFromFloatConverter(); + return; + } + + case "to-float": { + this.emitToFloatConverter(); + return; + } + + case "str": { + this.emitStrConverter(); + return; + } + + case "to-enum": { + this.emitToEnumConverter(); + return; + } + + case "list": { + this.emitListConverter(); + return; + } + + case "to-class": { + this.emitToClassConverter(); + return; + } + + case "dict": { + this.emitDictConverter(); + return; + } + + case "union": { + this.emitUnionConverter(); + return; + } + + case "from-datetime": { + this.emitFromDatetimeConverter(); + return; + } + + case "from-stringified-bool": { + this.emitFromStringifiedBoolConverter(); + return; + } + + case "is-type": { + this.emitIsTypeConverter(); + return; + } + default: return assertNever(cf); } @@ -925,23 +1001,27 @@ export class JSONPythonRenderer extends PythonRenderer { if (transformedStringType.kind === "date-time") { return this.withImport("datetime", "datetime"); } + if (transformedStringType.kind === "uuid") { return this.withImport("uuid", "UUID"); } + return undefined; } ); if (s === undefined) { return panic(`No type object for ${t.kind}`); } + return s; } protected transformer(inputTransformer: ValueOrLambda, xfer: Transformer, targetType: Type): ValueOrLambda { - const consume = (consumer: Transformer | undefined, vol: ValueOrLambda) => { + const consume = (consumer: Transformer | undefined, vol: ValueOrLambda): ValueOrLambda => { if (consumer === undefined) { return vol; } + return this.transformer(vol, consumer, targetType); }; @@ -994,6 +1074,7 @@ export class JSONPythonRenderer extends PythonRenderer { default: return panic(`Parsing of ${immediateTargetType.kind} in a transformer is not supported`); } + return consume(consumer, vol); } else if (xfer instanceof StringifyTransformer) { const consumer = xfer.consumer; @@ -1017,6 +1098,7 @@ export class JSONPythonRenderer extends PythonRenderer { default: return panic(`Parsing of ${xfer.sourceType.kind} in a transformer is not supported`); } + return consume(consumer, vol); } else { return panic(`Transformer ${xfer.kind} is not supported`); @@ -1031,6 +1113,7 @@ export class JSONPythonRenderer extends PythonRenderer { if (xf !== undefined) { return this.transformer(value, xf.transformer, xf.targetType); } + return matchType( t, _anyType => value, @@ -1082,9 +1165,11 @@ export class JSONPythonRenderer extends PythonRenderer { if (transformedStringType.kind === "date-time") { return this.convFn("from-datetime", value); } + if (transformedStringType.kind === "uuid") { return compose(value, v => [this.withImport("uuid", "UUID"), "(", v, ")"]); } + return panic(`Transformed type ${transformedStringType.kind} not supported`); } ); @@ -1096,6 +1181,7 @@ export class JSONPythonRenderer extends PythonRenderer { const reverse = xf.reverse; return this.transformer(value, reverse.transformer, reverse.targetType); } + return matchType( t, _anyType => value, @@ -1142,9 +1228,11 @@ export class JSONPythonRenderer extends PythonRenderer { if (transformedStringType.kind === "date-time") { return compose(value, v => [v, ".isoformat()"]); } + if (transformedStringType.kind === "uuid") { return compose(value, v => ["str(", v, ")"]); } + return panic(`Transformed type ${transformedStringType.kind} not supported`); } ); @@ -1210,6 +1298,7 @@ export class JSONPythonRenderer extends PythonRenderer { if (this._haveTypeVar) { this.emitTypeVar(this.typeVar(), []); } + if (this._haveEnumTypeVar) { this.emitTypeVar(this.enumTypeVar(), [", bound=", this.withImport("enum", "Enum")]); } @@ -1243,6 +1332,7 @@ export class JSONPythonRenderer extends PythonRenderer { "" ]); } + this.emitCommentLines([ "To use this code, make sure you", "", diff --git a/packages/quicktype-core/src/language/Rust.ts b/packages/quicktype-core/src/language/Rust.ts index 56b464161..8dcf5b93a 100644 --- a/packages/quicktype-core/src/language/Rust.ts +++ b/packages/quicktype-core/src/language/Rust.ts @@ -1,39 +1,41 @@ +/* eslint-disable @typescript-eslint/naming-convention */ import { mapFirst } from "collection-utils"; -import { TargetLanguage } from "../TargetLanguage"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, EnumOption, type Option, type OptionValues, getOptionValues } from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated } from "../Source"; import { - legalizeCharacters, - splitIntoWords, - isLetterOrUnderscoreOrDigit, - combineWords, allLowerWordStyle, + combineWords, + escapeNonPrintableMapper, firstUpperWordStyle, intToHex, - utf32ConcatMap, - escapeNonPrintableMapper, - isPrintable, isAscii, - isLetterOrUnderscore + isLetterOrUnderscore, + isLetterOrUnderscoreOrDigit, + isPrintable, + legalizeCharacters, + splitIntoWords, + utf32ConcatMap } from "../support/Strings"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { UnionType, Type, ClassType, EnumType } from "../Type"; -import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { Sourcelike, maybeAnnotated } from "../Source"; -import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { BooleanOption, EnumOption, Option, getOptionValues, OptionValues } from "../RendererOptions"; import { defined } from "../support/Support"; -import { RenderContext } from "../Renderer"; +import { TargetLanguage } from "../TargetLanguage"; +import { type ClassType, type EnumType, type Type, UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; export enum Density { - Normal, - Dense + Normal = "Normal", + Dense = "Dense" } export enum Visibility { - Private, - Crate, - Public + Private = "Private", + Crate = "Crate", + Public = "Public" } export const rustOptions = { @@ -56,11 +58,11 @@ export const rustOptions = { type NameToParts = (name: string) => string[]; type PartsToName = (parts: string[]) => string; -type NamingStyle = { +interface NamingStyle { + fromParts: PartsToName; regex: RegExp; toParts: NameToParts; - fromParts: PartsToName; -}; +} const namingStyles: Record = { snake_case: { @@ -112,15 +114,15 @@ const namingStyles: Record = { }; export class RustTargetLanguage extends TargetLanguage { - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): RustRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): RustRenderer { return new RustRenderer(this, renderContext, getOptionValues(rustOptions, untypedOptionValues)); } - constructor() { + public constructor() { super("Rust", ["rust", "rs", "rustlang"], "rs"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ rustOptions.density, rustOptions.visibility, @@ -262,7 +264,7 @@ const standardUnicodeRustEscape = (codePoint: number): string => { const rustStringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, standardUnicodeRustEscape)); export class RustRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -346,7 +348,7 @@ export class RustRenderer extends ConvenienceRenderer { ); } - private breakCycle(t: Type, withIssues: boolean): any { + private breakCycle(t: Type, withIssues: boolean): Sourcelike { const rustType = this.rustType(t, withIssues); const isCycleBreaker = this.isCycleBreakerType(t); @@ -358,7 +360,7 @@ export class RustRenderer extends ConvenienceRenderer { jsonName: string, defaultNamingStyle: string, preferedNamingStyle: string - ) { + ): void { const escapedName = rustStringEscape(jsonName); const name = namingStyles[defaultNamingStyle].fromParts(this.sourcelikeToString(propName).split(" ")); const styledName = nameToNamingStyle(name, preferedNamingStyle); @@ -368,7 +370,7 @@ export class RustRenderer extends ConvenienceRenderer { } } - private emitSkipSerializeNone(t: Type) { + private emitSkipSerializeNone(t: Type): void { if (t instanceof UnionType) { const nullable = nullableFromUnion(t); if (nullable !== null) this.emitLine('#[serde(skip_serializing_if = "Option::is_none")]'); @@ -381,6 +383,7 @@ export class RustRenderer extends ConvenienceRenderer { } else if (this._options.visibility === Visibility.Public) { return "pub "; } + return ""; } @@ -408,11 +411,14 @@ export class RustRenderer extends ConvenienceRenderer { } const blankLines = this._options.density === Density.Dense ? "none" : "interposing"; - const structBody = () => + const structBody = (): void => this.forEachClassProperty(c, blankLines, (name, jsonName, prop) => { this.emitDescription(this.descriptionForClassProperty(c, jsonName)); this.emitRenameAttribute(name, jsonName, defaultStyle, preferedNamingStyle); - this._options.skipSerializingNone && this.emitSkipSerializeNone(prop.type); + if (this._options.skipSerializingNone) { + this.emitSkipSerializeNone(prop.type); + } + this.emitLine(this.visibility, name, ": ", this.breakCycle(prop.type, true), ","); }); @@ -516,6 +522,7 @@ export class RustRenderer extends ConvenienceRenderer { if (this._options.leadingComments) { this.emitLeadingComments(); } + this.ensureBlankLine(); if (this._options.edition2018) { this.emitLine("use serde::{Serialize, Deserialize};"); @@ -552,6 +559,7 @@ function getPreferedNamingStyle(namingStyleOccurences: string[], defaultStyle: s if (preferedStyles.includes(defaultStyle)) { return defaultStyle; } + return preferedStyles[0]; } @@ -565,9 +573,11 @@ function nameToNamingStyle(name: string, style: string): string { if (namingStyles[style].regex.test(name)) { return name; } + const fromStyle = listMatchingNamingStyles(name)[0]; if (fromStyle === undefined) { return name; } + return namingStyles[style].fromParts(namingStyles[fromStyle].toParts(name)); } diff --git a/packages/quicktype-core/src/language/Scala3.ts b/packages/quicktype-core/src/language/Scala3.ts index 2f5c34e81..75da0773f 100644 --- a/packages/quicktype-core/src/language/Scala3.ts +++ b/packages/quicktype-core/src/language/Scala3.ts @@ -1,8 +1,9 @@ import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { EnumOption, Option, StringOption, OptionValues, getOptionValues } from "../RendererOptions"; -import { Sourcelike, maybeAnnotated } from "../Source"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { EnumOption, type Option, type OptionValues, StringOption, getOptionValues } from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated } from "../Source"; import { allLowerWordStyle, allUpperWordStyle, @@ -16,14 +17,23 @@ import { } from "../support/Strings"; import { assertNever } from "../support/Support"; import { TargetLanguage } from "../TargetLanguage"; -import { ArrayType, ClassProperty, ClassType, EnumType, MapType, ObjectType, Type, UnionType } from "../Type"; +import { + ArrayType, + type ClassProperty, + type ClassType, + type EnumType, + MapType, + type ObjectType, + type Type, + type UnionType +} from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { RenderContext } from "../Renderer"; export enum Framework { - None, - Upickle, - Circe + None = "None", + Upickle = "Upickle", + Circe = "Circe" } export const scala3Options = { @@ -177,7 +187,7 @@ function scalaNameStyle(isUpper: boolean, original: string): string { return "\\u" + intToHex(codePoint, 4); } */ -//const _stringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, unicodeEscape)); +// const _stringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, unicodeEscape)); /* function stringEscape(s: string): string { // "$this" is a template string in Kotlin so we have to escape $ @@ -188,7 +198,7 @@ const upperNamingFunction = funPrefixNamer("upper", s => scalaNameStyle(true, s) const lowerNamingFunction = funPrefixNamer("lower", s => scalaNameStyle(false, s)); export class Scala3Renderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, protected readonly _scalaOptions: OptionValues @@ -275,7 +285,7 @@ export class Scala3Renderer extends ConvenienceRenderer { return maybeAnnotated(withIssues, anyTypeIssueAnnotation, this.anySourceType(!noOptional)); }, _nullType => { - //return "None.type" + // return "None.type" return maybeAnnotated(withIssues, nullTypeIssueAnnotation, this.anySourceType(!noOptional)); }, _boolType => "Boolean", @@ -295,10 +305,12 @@ export class Scala3Renderer extends ConvenienceRenderer { return ["Option[", this.scalaType(nullable, withIssues), "]"]; } } + return this.nameForNamedType(unionType); } ); } + protected emitUsageHeader(): void { // To be overridden } @@ -336,7 +348,7 @@ export class Scala3Renderer extends ConvenienceRenderer { return; } - const scalaType = (p: ClassProperty) => { + const scalaType = (p: ClassProperty): Sourcelike => { if (p.isOptional) { return ["Option[", this.scalaType(p.type, true, true), "]"]; } else { @@ -367,6 +379,7 @@ export class Scala3Renderer extends ConvenienceRenderer { for (const emit of meta) { emit(); } + const nameNeedsBackticks = jsonName.endsWith("_") || shouldAddBacktick(jsonName); const nameWithBackticks = nameNeedsBackticks ? "`" + jsonName + "`" : jsonName; this.emitLine( @@ -389,7 +402,7 @@ export class Scala3Renderer extends ConvenienceRenderer { this.emitClassDefinitionMethods(); } - protected emitClassDefinitionMethods() { + protected emitClassDefinitionMethods(): void { this.emitLine(")"); } @@ -403,6 +416,7 @@ export class Scala3Renderer extends ConvenienceRenderer { if (count > 0) { this.emitItem("\t case "); } + this.forEachEnumCase(e, "none", (name, jsonName) => { if (!(jsonName == "")) { const backticks = @@ -412,10 +426,12 @@ export class Scala3Renderer extends ConvenienceRenderer { if (backticks) { this.emitItem("`"); } + this.emitItemOnce([name]); if (backticks) { this.emitItem("`"); } + if (--count > 0) this.emitItem([","]); } else { --count; @@ -436,7 +452,7 @@ export class Scala3Renderer extends ConvenienceRenderer { this.emitDescription(this.descriptionForType(u)); const [maybeNull, nonNulls] = removeNullFromUnion(u, sortBy); - const theTypes: Array = []; + const theTypes: Sourcelike[] = []; this.forEachUnionMember(u, nonNulls, "none", null, (_, t) => { theTypes.push(this.scalaType(t)); }); @@ -473,7 +489,7 @@ export class Scala3Renderer extends ConvenienceRenderer { } export class UpickleRenderer extends Scala3Renderer { - protected emitClassDefinitionMethods() { + protected emitClassDefinitionMethods(): void { this.emitLine(") derives ReadWriter "); } @@ -486,9 +502,9 @@ export class UpickleRenderer extends Scala3Renderer { } export class CirceRenderer extends Scala3Renderer { - seenUnionTypes: Array = []; + private seenUnionTypes: string[] = []; - protected circeEncoderForType(t: Type, _ = false, noOptional = false, paramName: string = ""): Sourcelike { + protected circeEncoderForType(t: Type, __ = false, noOptional = false, paramName: string = ""): Sourcelike { return matchType( t, _anyType => ["Encoder.encodeJson(", paramName, ")"], @@ -510,6 +526,7 @@ export class CirceRenderer extends Scala3Renderer { return ["Encoder.AsObject[Option[", this.nameForNamedType(nullable), "]]"]; } } + return ["Encoder.AsObject[", this.nameForNamedType(unionType), "]"]; } ); @@ -525,7 +542,7 @@ export class CirceRenderer extends Scala3Renderer { return [wrapOption("Json", optional)]; } - protected emitClassDefinitionMethods() { + protected emitClassDefinitionMethods(): void { this.emitLine(") derives Encoder.AsObject, Decoder"); } @@ -545,9 +562,9 @@ export class CirceRenderer extends Scala3Renderer { this.emitItem(['"', jsonName, '"']); // if (backticks) {this.emitItem("`")} if (--count > 0) this.emitItem([" | "]); - //} else { - //--count - //} + // } else { + // --count + // } }); this.ensureBlankLine(); } @@ -612,7 +629,7 @@ export class CirceRenderer extends Scala3Renderer { this.emitDescription(this.descriptionForType(u)); const [maybeNull, nonNulls] = removeNullFromUnion(u, sortBy); - const theTypes: Array = []; + const theTypes: Sourcelike[] = []; this.forEachUnionMember(u, nonNulls, "none", null, (_, t) => { theTypes.push(this.scalaType(t)); }); @@ -671,26 +688,23 @@ export class CirceRenderer extends Scala3Renderer { } export class Scala3TargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Scala3", ["scala3"], "scala"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [scala3Options.framework, scala3Options.packageName]; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): ConvenienceRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): ConvenienceRenderer { const options = getOptionValues(scala3Options, untypedOptionValues); switch (options.framework) { diff --git a/packages/quicktype-core/src/language/Smithy4s.ts b/packages/quicktype-core/src/language/Smithy4s.ts index 3a875be64..163b33073 100644 --- a/packages/quicktype-core/src/language/Smithy4s.ts +++ b/packages/quicktype-core/src/language/Smithy4s.ts @@ -1,8 +1,9 @@ import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { EnumOption, Option, StringOption, OptionValues, getOptionValues } from "../RendererOptions"; -import { Sourcelike, maybeAnnotated } from "../Source"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { EnumOption, type Option, type OptionValues, StringOption, getOptionValues } from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated } from "../Source"; import { allLowerWordStyle, allUpperWordStyle, @@ -16,12 +17,21 @@ import { } from "../support/Strings"; import { assertNever } from "../support/Support"; import { TargetLanguage } from "../TargetLanguage"; -import { ArrayType, ClassProperty, ClassType, EnumType, MapType, ObjectType, Type, UnionType } from "../Type"; +import { + ArrayType, + type ClassProperty, + type ClassType, + type EnumType, + MapType, + type ObjectType, + type Type, + type UnionType +} from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; import { matchCompoundType, matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { RenderContext } from "../Renderer"; export enum Framework { - None + None = "None" } export const SmithyOptions = { @@ -148,7 +158,7 @@ const upperNamingFunction = funPrefixNamer("upper", s => scalaNameStyle(true, s) const lowerNamingFunction = funPrefixNamer("lower", s => scalaNameStyle(false, s)); export class Smithy4sRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, protected readonly _scalaOptions: OptionValues @@ -221,7 +231,7 @@ export class Smithy4sRenderer extends ConvenienceRenderer { // (asarazan): I've broken out the following two functions // because some renderers, such as kotlinx, can cope with `any`, while some get mad. protected arrayType(arrayType: ArrayType, _ = false): Sourcelike { - //this.emitTopLevelArray(arrayType, new Name(arrayType.getCombinedName().toString() + "List")) + // this.emitTopLevelArray(arrayType, new Name(arrayType.getCombinedName().toString() + "List")) return arrayType.getCombinedName().toString() + "List"; } @@ -231,7 +241,7 @@ export class Smithy4sRenderer extends ConvenienceRenderer { protected mapType(mapType: MapType, _ = false): Sourcelike { return mapType.getCombinedName().toString() + "Map"; - //return [this.scalaType(mapType.values, withIssues), "Map"]; + // return [this.scalaType(mapType.values, withIssues), "Map"]; } protected scalaType(t: Type, withIssues = false, noOptional = false): Sourcelike { @@ -241,7 +251,7 @@ export class Smithy4sRenderer extends ConvenienceRenderer { return maybeAnnotated(withIssues, anyTypeIssueAnnotation, this.anySourceType(!noOptional)); }, _nullType => { - //return "None.type" + // return "None.type" return maybeAnnotated(withIssues, nullTypeIssueAnnotation, this.anySourceType(!noOptional)); }, _boolType => "Boolean", @@ -257,6 +267,7 @@ export class Smithy4sRenderer extends ConvenienceRenderer { if (nullable !== null) { return [this.scalaType(nullable, withIssues)]; } + return this.nameForNamedType(unionType); } ); @@ -303,7 +314,7 @@ export class Smithy4sRenderer extends ConvenienceRenderer { return; } - const scalaType = (p: ClassProperty) => { + const scalaType = (p: ClassProperty): Sourcelike => { if (p.isOptional) { return [this.scalaType(p.type, true, true)]; } else { @@ -311,7 +322,7 @@ export class Smithy4sRenderer extends ConvenienceRenderer { } }; - const emitLater: Array = []; + const emitLater: ClassProperty[] = []; this.emitDescription(this.descriptionForType(c)); this.emitLine("structure ", className, " {"); @@ -342,6 +353,7 @@ export class Smithy4sRenderer extends ConvenienceRenderer { for (const emit of meta) { emit(); } + const nameNeedsBackticks = jsonName.endsWith("_") || shouldAddBacktick(jsonName); const nameWithBackticks = nameNeedsBackticks ? "`" + jsonName + "`" : jsonName; this.emitLine( @@ -363,12 +375,13 @@ export class Smithy4sRenderer extends ConvenienceRenderer { this.emitClassDefinitionMethods(emitLater); } - protected emitClassDefinitionMethods(arrayTypes: ClassProperty[]) { + protected emitClassDefinitionMethods(arrayTypes: ClassProperty[]): void { this.emitLine("}"); arrayTypes.forEach(p => { function ignore(_: T): void { return; } + matchCompoundType( p.type, at => { @@ -416,9 +429,9 @@ export class Smithy4sRenderer extends ConvenienceRenderer { // if (backticks) {this.emitItem("`")} if (--count > 0) this.emitItem([","]); - //} else { - //--count - //} + // } else { + // --count + // } }); this.ensureBlankLine(); @@ -432,17 +445,18 @@ export class Smithy4sRenderer extends ConvenienceRenderer { return "_" + kind; } - const emitLater: Array = []; + const emitLater: Type[] = []; this.emitDescription(this.descriptionForType(u)); const [maybeNull, nonNulls] = removeNullFromUnion(u, sortBy); - const theTypes: Array = []; + const theTypes: Sourcelike[] = []; this.forEachUnionMember(u, nonNulls, "none", null, (_, t) => { const laterType = t.kind === "array" || t.kind === "map"; if (laterType) { emitLater.push(t); } + theTypes.push(this.scalaType(t)); }); if (maybeNull !== null) { @@ -462,6 +476,7 @@ export class Smithy4sRenderer extends ConvenienceRenderer { function ignore(_: T): void { return; } + matchCompoundType( p, at => { @@ -511,26 +526,23 @@ export class Smithy4sRenderer extends ConvenienceRenderer { } export class SmithyTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Smithy", ["Smithy"], "smithy"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [SmithyOptions.framework, SmithyOptions.packageName]; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): ConvenienceRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): ConvenienceRenderer { const options = getOptionValues(SmithyOptions, untypedOptionValues); switch (options.framework) { diff --git a/packages/quicktype-core/src/language/Swift.ts b/packages/quicktype-core/src/language/Swift.ts index cb02665de..cb801de2b 100644 --- a/packages/quicktype-core/src/language/Swift.ts +++ b/packages/quicktype-core/src/language/Swift.ts @@ -1,47 +1,54 @@ import { arrayIntercalate } from "collection-utils"; -import { assert, defined } from "../support/Support"; -import { TargetLanguage } from "../TargetLanguage"; -import { - Type, - ClassType, - EnumType, - UnionType, - ArrayType, - MapType, - TypeKind, - ClassProperty, - TransformedStringTypeKind, - PrimitiveStringTypeKind -} from "../Type"; -import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { BooleanOption, EnumOption, Option, StringOption, OptionValues, getOptionValues } from "../RendererOptions"; -import { Sourcelike, maybeAnnotated, modifySource } from "../Source"; import { anyTypeIssueAnnotation, nullTypeIssueAnnotation } from "../Annotation"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../ConvenienceRenderer"; +import { type DateTimeRecognizer, DefaultDateTimeRecognizer } from "../DateTime"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type ForEachPosition, type RenderContext } from "../Renderer"; import { - legalizeCharacters, + BooleanOption, + EnumOption, + type Option, + type OptionValues, + StringOption, + getOptionValues +} from "../RendererOptions"; +import { type Sourcelike, maybeAnnotated, modifySource } from "../Source"; +import { AcronymStyleOptions, acronymOption, acronymStyle } from "../support/Acronyms"; +import { + addPrefixIfNecessary, + allLowerWordStyle, + allUpperWordStyle, + camelCase, + combineWords, + escapeNonPrintableMapper, + firstUpperWordStyle, + intToHex, + isDigit, isLetterOrUnderscore, isNumeric, - isDigit, - utf32ConcatMap, - escapeNonPrintableMapper, isPrintable, - intToHex, + legalizeCharacters, splitIntoWords, - combineWords, - firstUpperWordStyle, - allLowerWordStyle, - allUpperWordStyle, - camelCase, - addPrefixIfNecessary + utf32ConcatMap } from "../support/Strings"; -import { RenderContext, ForEachPosition } from "../Renderer"; -import { StringTypeMapping } from "../TypeBuilder"; -import { panic } from "../support/Support"; -import { DefaultDateTimeRecognizer, DateTimeRecognizer } from "../DateTime"; -import { acronymOption, acronymStyle, AcronymStyleOptions } from "../support/Acronyms"; +import { assert, defined, panic } from "../support/Support"; +import { TargetLanguage } from "../TargetLanguage"; +import { + ArrayType, + type ClassProperty, + type ClassType, + EnumType, + MapType, + type PrimitiveStringTypeKind, + type TransformedStringTypeKind, + type Type, + type TypeKind, + type UnionType +} from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType, nullableFromUnion, removeNullFromUnion } from "../TypeUtils"; const MAX_SAMELINE_PROPERTIES = 4; @@ -125,24 +132,24 @@ export const swiftOptions = { const swiftDateTimeRegex = /^\d+-\d+-\d+T\d+:\d+:\d+([zZ]|[+-]\d+(:\d+)?)$/; class SwiftDateTimeRecognizer extends DefaultDateTimeRecognizer { - isDateTime(str: string): boolean { - return str.match(swiftDateTimeRegex) !== null; + public isDateTime(str: string): boolean { + return swiftDateTimeRegex.exec(str) !== null; } } export interface SwiftProperty { - name: Name; jsonName: string; + name: Name; parameter: ClassProperty; position: ForEachPosition; } export class SwiftTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Swift", ["swift", "swift4"], "swift"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ swiftOptions.justTypes, swiftOptions.useClasses, @@ -165,25 +172,25 @@ export class SwiftTargetLanguage extends TargetLanguage { ]; } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); mapping.set("date-time", "date-time"); return mapping; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - get supportsUnionsWithBothNumberTypes(): boolean { + public get supportsUnionsWithBothNumberTypes(): boolean { return true; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): SwiftRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): SwiftRenderer { return new SwiftRenderer(this, renderContext, getOptionValues(swiftOptions, untypedOptionValues)); } - get dateTimeRecognizer(): DateTimeRecognizer { + public get dateTimeRecognizer(): DateTimeRecognizer { return new SwiftDateTimeRecognizer(); } } @@ -328,10 +335,12 @@ const stringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, unicod export class SwiftRenderer extends ConvenienceRenderer { private _currentFilename: string | undefined; + private _needAny = false; + private _needNull = false; - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -343,6 +352,7 @@ export class SwiftRenderer extends ConvenienceRenderer { if (this._options.alamofire) { return ["DataRequest", ...keywords]; } + return keywords; } @@ -400,7 +410,7 @@ export class SwiftRenderer extends ConvenienceRenderer { else return notJustTypes; } - private get lowerNamingFunction() { + private get lowerNamingFunction(): Namer { return funPrefixNamer("lower", s => swiftNameStyle("", false, s, acronymStyle(this._options.acronymStyle))); } @@ -459,9 +469,11 @@ export class SwiftRenderer extends ConvenienceRenderer { if (kind === "enum") { return "enumeration"; } + if (kind === "union") { return "one_of"; } + return null; } @@ -538,14 +550,17 @@ export class SwiftRenderer extends ConvenienceRenderer { this.emitLine("// synthesized for types that have collections (such as arrays or dictionaries)."); } } + this.ensureBlankLine(); this.emitLineOnce("import Foundation"); if (!this._options.justTypes && this._options.alamofire) { this.emitLineOnce("import Alamofire"); } + if (this._options.optionalEnums) { this.emitLineOnce("import OptionallyDecodable // https://github.com/idrougge/OptionallyDecodable"); } + this.ensureBlankLine(); } @@ -590,11 +605,12 @@ export class SwiftRenderer extends ConvenienceRenderer { if (baseClass) { protocols.unshift(baseClass); } + return protocols.length > 0 ? ": " + protocols.join(", ") : ""; } - private getEnumPropertyGroups(c: ClassType) { - type PropertyGroup = { name: Name; label?: string }[]; + private getEnumPropertyGroups(c: ClassType): typeof groups { + type PropertyGroup = Array<{ label?: string; name: Name }>; let groups: PropertyGroup[] = []; let group: PropertyGroup = []; @@ -610,6 +626,7 @@ export class SwiftRenderer extends ConvenienceRenderer { groups.push(group); group = []; } + groups.push([{ name, label }]); } }); @@ -690,7 +707,7 @@ export class SwiftRenderer extends ConvenienceRenderer { let lastProperty: ClassProperty | undefined = undefined; let lastNames: Name[] = []; - const emitLastProperty = () => { + const emitLastProperty = (): void => { if (lastProperty === undefined) return; const useMutableProperties = this._options.mutableProperties; @@ -698,7 +715,7 @@ export class SwiftRenderer extends ConvenienceRenderer { let sources: Sourcelike[] = [ [ this._options.optionalEnums && lastProperty.type.kind === "enum" - ? `@OptionallyDecodable ` + ? "@OptionallyDecodable " : "", this.accessLevel, useMutableProperties || (this._options.optionalEnums && lastProperty.type.kind === "enum") @@ -721,15 +738,17 @@ export class SwiftRenderer extends ConvenienceRenderer { this.forEachClassProperty(c, "none", (name, jsonName, p) => { const description = this.descriptionForClassProperty(c, jsonName); if ( - !p.equals(lastProperty) || + (lastProperty && !p.equals(lastProperty)) || lastNames.length >= MAX_SAMELINE_PROPERTIES || description !== undefined ) { emitLastProperty(); } + if (lastProperty === undefined) { lastProperty = p; } + lastNames.push(name); if (description !== undefined) { this.emitDescription(description); @@ -759,6 +778,7 @@ export class SwiftRenderer extends ConvenienceRenderer { enumDeclaration += ", "; enumDeclaration += this._options.codingKeysProtocol; } + this.emitBlock(enumDeclaration, () => { for (const group of groups) { const { name, label } = group[0]; @@ -792,6 +812,7 @@ export class SwiftRenderer extends ConvenienceRenderer { if (propertiesLines.length > 0) propertiesLines.push(", "); propertiesLines.push(property.name, ": ", this.swiftPropertyType(property.parameter)); } + if (this.propertyCount(c) === 0 && this._options.objcSupport) { this.emitBlockWithAccess(["override init()"], () => { return ""; @@ -856,6 +877,7 @@ export class SwiftRenderer extends ConvenienceRenderer { throw DecodingError.typeMismatch(Date.self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Could not decode date")) })`); } + this.emitLine("return decoder"); }); this.ensureBlankLine(); @@ -873,6 +895,7 @@ formatter.timeZone = TimeZone(secondsFromGMT: 0) formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssXXXXX" encoder.dateEncodingStrategy = .formatted(formatter)`); } + this.emitLine("return encoder"); }); } @@ -889,6 +912,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); } else { this.emitLine("let _ = try newJSONDecoder().decode(", this.swiftType(c), ".self, from: data)"); } + let args: Sourcelike[] = []; this.forEachClassProperty(c, "none", name => { if (args.length > 0) args.push(", "); @@ -901,18 +925,19 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); this.emitLine("self = try newJSONDecoder().decode(", this.swiftType(c), ".self, from: data)"); }); } + this.ensureBlankLine(); this.emitBlock( [convenience, "init(_ json: String, using encoding: String.Encoding = .utf8) throws"], () => { this.emitBlock("guard let data = json.data(using: encoding) else", () => { - this.emitLine(`throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)`); + this.emitLine('throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)'); }); this.emitLine("try self.init(data: data)"); } ); this.ensureBlankLine(); - this.emitBlock([convenience, `init(fromURL url: URL) throws`], () => { + this.emitBlock([convenience, "init(fromURL url: URL) throws"], () => { this.emitLine("try self.init(data: try Data(contentsOf: url))"); }); @@ -921,11 +946,11 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); // Convenience serializers this.ensureBlankLine(); - this.emitBlock(`func jsonData() throws -> Data`, () => { + this.emitBlock("func jsonData() throws -> Data", () => { this.emitLine("return try newJSONEncoder().encode(self)"); }); this.ensureBlankLine(); - this.emitBlock(`func jsonString(encoding: String.Encoding = .utf8) throws -> String?`, () => { + this.emitBlock("func jsonString(encoding: String.Encoding = .utf8) throws -> String?", () => { this.emitLine("return String(data: try self.jsonData(), encoding: encoding)"); }); }); @@ -1000,12 +1025,14 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); if (t.kind === "bool" || t.kind === "integer") continue; renderUnionCase(t); } + if (maybeNull !== null) { this.emitBlock("if container.decodeNil()", () => { this.emitLine("self = .", this.nameForUnionMember(u, maybeNull)); this.emitLine("return"); }); } + this.emitDecodingError(unionName); }); this.ensureBlankLine(); @@ -1020,6 +1047,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); this.emitLine("case .", this.nameForUnionMember(u, maybeNull), ":"); this.indent(() => this.emitLine("try container.encodeNil()")); } + this.emitLine("}"); }); } @@ -1045,12 +1073,12 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); this.ensureBlankLine(); this.emitBlock("init(_ json: String, using encoding: String.Encoding = .utf8) throws", () => { this.emitBlock("guard let data = json.data(using: encoding) else", () => { - this.emitLine(`throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)`); + this.emitLine('throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)'); }); this.emitLine("try self.init(data: data)"); }); this.ensureBlankLine(); - this.emitBlock(`init(fromURL url: URL) throws`, () => { + this.emitBlock("init(fromURL url: URL) throws", () => { this.emitLine("try self.init(data: try Data(contentsOf: url))"); }); this.ensureBlankLine(); @@ -1074,7 +1102,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); ); } - private emitSupportFunctions4 = (): void => { + private readonly emitSupportFunctions4 = (): void => { this.startFile("JSONSchemaSupport"); this.emitLineOnce("import Foundation"); @@ -1117,6 +1145,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); } else { this.emitLine(this.accessLevel, "class JSONNull: Codable, Hashable {"); } + this.ensureBlankLine(); this.emitMultiline(` public static func == (lhs: JSONNull, rhs: JSONNull) -> Bool { return true @@ -1142,6 +1171,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); } else { this.emitItem(" "); } + this.emitMultiline(`public init() {} public required init(from decoder: Decoder) throws { @@ -1157,6 +1187,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); } }`); } + if (this._needAny) { this.ensureBlankLine(); this.emitMultiline(`class JSONCodingKey: CodingKey { @@ -1185,6 +1216,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); } else { this.emitLine(this.accessLevel, "class JSONAny: Codable {"); } + this.ensureBlankLine(); this.emitMultiline(` ${this.accessLevel}let value: Any @@ -1383,7 +1415,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); this.endFile(); }; - private emitConvenienceMutator(c: ClassType, className: Name) { + private emitConvenienceMutator(c: ClassType, className: Name): void { this.emitLine("func with("); this.indent(() => { this.forEachClassProperty(c, "none", (name, _, p, position) => { @@ -1414,7 +1446,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); }); } - protected emitMark(line: Sourcelike, horizontalLine = false) { + protected emitMark(line: Sourcelike, horizontalLine = false): void { this.emitLine("// MARK:", horizontalLine ? " - " : " ", line); } @@ -1435,7 +1467,7 @@ encoder.dateEncodingStrategy = .formatted(formatter)`); } } - private emitAlamofireExtension() { + private emitAlamofireExtension(): void { this.ensureBlankLine(); this.emitBlockWithAccess("extension DataRequest", () => { this @@ -1467,7 +1499,7 @@ fileprivate func responseDecodable(queue: DispatchQueue? = nil, co ">) -> Void) -> Self" ], () => { - this.emitLine(`return responseDecodable(queue: queue, completionHandler: completionHandler)`); + this.emitLine("return responseDecodable(queue: queue, completionHandler: completionHandler)"); } ); }); diff --git a/packages/quicktype-core/src/language/TypeScriptEffectSchema.ts b/packages/quicktype-core/src/language/TypeScriptEffectSchema.ts index 1d0790084..c3844d847 100644 --- a/packages/quicktype-core/src/language/TypeScriptEffectSchema.ts +++ b/packages/quicktype-core/src/language/TypeScriptEffectSchema.ts @@ -1,10 +1,11 @@ import { arrayIntercalate } from "collection-utils"; -import { ArrayType, ClassProperty, EnumType, MapType, ObjectType, Type } from "../Type"; -import { matchType } from "../TypeUtils"; -import { funPrefixNamer, Name, Namer } from "../Naming"; -import { RenderContext } from "../Renderer"; -import { BooleanOption, getOptionValues, Option, OptionValues } from "../RendererOptions"; -import { acronymStyle, AcronymStyleOptions } from "../support/Acronyms"; + +import { ConvenienceRenderer } from "../ConvenienceRenderer"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, type Option, type OptionValues, getOptionValues } from "../RendererOptions"; +import { type Sourcelike } from "../Source"; +import { AcronymStyleOptions, acronymStyle } from "../support/Acronyms"; import { allLowerWordStyle, capitalize, @@ -15,22 +16,24 @@ import { stringEscape, utf16StringEscape } from "../support/Strings"; +import { panic } from "../support/Support"; import { TargetLanguage } from "../TargetLanguage"; +import { ArrayType, type ClassProperty, EnumType, MapType, type ObjectType, type Type } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType } from "../TypeUtils"; + import { legalizeName } from "./JavaScript"; -import { Sourcelike } from "../Source"; -import { panic } from "../support/Support"; -import { ConvenienceRenderer } from "../ConvenienceRenderer"; export const typeScriptEffectSchemaOptions = { justSchema: new BooleanOption("just-schema", "Schema only", false) }; export class TypeScriptEffectSchemaTargetLanguage extends TargetLanguage { - protected getOptions(): Option[] { + protected getOptions(): Array> { return []; } - constructor( + public constructor( displayName: string = "TypeScript Effect Schema", names: string[] = ["typescript-effect-schema"], extension: string = "ts" @@ -40,7 +43,7 @@ export class TypeScriptEffectSchemaTargetLanguage extends TargetLanguage { protected makeRenderer( renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } + untypedOptionValues: FixMeOptionsType ): TypeScriptEffectSchemaRenderer { return new TypeScriptEffectSchemaRenderer( this, @@ -51,7 +54,9 @@ export class TypeScriptEffectSchemaTargetLanguage extends TargetLanguage { } export class TypeScriptEffectSchemaRenderer extends ConvenienceRenderer { - constructor( + private emittedObjects = new Set(); + + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -71,7 +76,7 @@ export class TypeScriptEffectSchemaRenderer extends ConvenienceRenderer { legalizeName, upper ? firstUpperWordStyle : allLowerWordStyle, firstUpperWordStyle, - upper ? s => capitalize(acronyms(s)) : allLowerWordStyle, + upper ? (s): string => capitalize(acronyms(s)) : allLowerWordStyle, acronyms, "", isLetterOrUnderscore @@ -103,19 +108,18 @@ export class TypeScriptEffectSchemaRenderer extends ConvenienceRenderer { this.emitLine(this.importStatement("* as S", '"@effect/schema/Schema"')); } - typeMapTypeForProperty(p: ClassProperty): Sourcelike { + private typeMapTypeForProperty(p: ClassProperty): Sourcelike { const typeMap = this.typeMapTypeFor(p.type); return p.isOptional ? ["S.optional(", typeMap, ")"] : typeMap; } - emittedObjects = new Set(); - - typeMapTypeFor(t: Type, required: boolean = true): Sourcelike { + private typeMapTypeFor(t: Type, required: boolean = true): Sourcelike { if (t.kind === "class" || t.kind === "object" || t.kind === "enum") { const name = this.nameForNamedType(t); if (this.emittedObjects.has(name)) { return [name]; } + return ["S.suspend(() => ", name, ")"]; } @@ -149,7 +153,7 @@ export class TypeScriptEffectSchemaRenderer extends ConvenienceRenderer { return match; } - private emitObject(name: Name, t: ObjectType) { + private emitObject(name: Name, t: ObjectType): void { this.emittedObjects.add(name); this.ensureBlankLine(); this.emitLine("\nexport class ", name, " extends S.Class<", name, '>("', name, '")({'); @@ -177,10 +181,10 @@ export class TypeScriptEffectSchemaRenderer extends ConvenienceRenderer { } } - protected walkObjectNames(type: ObjectType) { - const names: Array = []; + protected walkObjectNames(objectType: ObjectType): Name[] { + const names: Name[] = []; - const recurse = (type: Type) => { + const recurse = (type: Type): void => { if (type.kind === "object" || type.kind === "class") { names.push(this.nameForNamedType(type)); this.forEachClassProperty(type as ObjectType, "none", (_, __, prop) => { @@ -197,7 +201,7 @@ export class TypeScriptEffectSchemaRenderer extends ConvenienceRenderer { } }; - this.forEachClassProperty(type, "none", (_, __, prop) => { + this.forEachClassProperty(objectType, "none", (_, __, prop) => { recurse(prop.type); }); @@ -228,18 +232,18 @@ export class TypeScriptEffectSchemaRenderer extends ConvenienceRenderer { const names = this.walkObjectNames(source); // must be behind all these names - for (let i = 0; i < names.length; i++) { - const depName = names[i]; + names.forEach(name => { + const depName = name; // find this name's ordinal, if it has already been added - for (let j = 0; j < order.length; j++) { - const depIndex = order[j]; + order.forEach(orderItem => { + const depIndex = orderItem; if (mapKey[depIndex] === depName) { // this is the index of the dependency, so make sure we come after it ordinal = Math.max(ordinal, depIndex + 1); } - } - } + }); + }); // insert index order.splice(ordinal, 0, index); diff --git a/packages/quicktype-core/src/language/TypeScriptFlow.ts b/packages/quicktype-core/src/language/TypeScriptFlow.ts index fec297445..202b95b4e 100644 --- a/packages/quicktype-core/src/language/TypeScriptFlow.ts +++ b/packages/quicktype-core/src/language/TypeScriptFlow.ts @@ -1,20 +1,21 @@ -import { Type, ArrayType, UnionType, ClassType, EnumType } from "../Type"; -import { matchType, nullableFromUnion, isNamedType } from "../TypeUtils"; -import { utf16StringEscape, camelCase } from "../support/Strings"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, type Option, type OptionValues, getOptionValues } from "../RendererOptions"; +import { type MultiWord, type Sourcelike, modifySource, multiWord, parenIfNeeded, singleWord } from "../Source"; +import { camelCase, utf16StringEscape } from "../support/Strings"; +import { defined, panic } from "../support/Support"; +import { type TargetLanguage } from "../TargetLanguage"; +import { ArrayType, type ClassType, EnumType, type Type, UnionType } from "../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { isNamedType, matchType, nullableFromUnion } from "../TypeUtils"; -import { Sourcelike, modifySource, MultiWord, singleWord, parenIfNeeded, multiWord } from "../Source"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { BooleanOption, Option, OptionValues, getOptionValues } from "../RendererOptions"; import { - javaScriptOptions, - JavaScriptTargetLanguage, JavaScriptRenderer, - JavaScriptTypeAnnotations, + JavaScriptTargetLanguage, + type JavaScriptTypeAnnotations, + javaScriptOptions, legalizeName } from "./JavaScript"; -import { defined, panic } from "../support/Support"; -import { TargetLanguage } from "../TargetLanguage"; -import { RenderContext } from "../Renderer"; import { isES3IdentifierStart } from "./JavaScriptUnicodeMaps"; export const tsFlowOptions = Object.assign({}, javaScriptOptions, { @@ -41,7 +42,7 @@ const tsFlowTypeAnnotations = { }; export abstract class TypeScriptFlowBaseTargetLanguage extends JavaScriptTargetLanguage { - protected getOptions(): Option[] { + protected getOptions(): Array> { return [ tsFlowOptions.justTypes, tsFlowOptions.nicePropertyNames, @@ -58,25 +59,22 @@ export abstract class TypeScriptFlowBaseTargetLanguage extends JavaScriptTargetL ]; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } protected abstract makeRenderer( renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } + untypedOptionValues: FixMeOptionsType ): JavaScriptRenderer; } export class TypeScriptTargetLanguage extends TypeScriptFlowBaseTargetLanguage { - constructor() { + public constructor() { super("TypeScript", ["typescript", "ts", "tsx"], "ts"); } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): TypeScriptRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): TypeScriptRenderer { return new TypeScriptRenderer(this, renderContext, getOptionValues(tsFlowOptions, untypedOptionValues)); } } @@ -99,7 +97,7 @@ function quotePropertyName(original: string): string { } export abstract class TypeScriptFlowBaseRenderer extends JavaScriptRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, protected readonly _tsFlowOptions: OptionValues @@ -120,9 +118,11 @@ export abstract class TypeScriptFlowBaseRenderer extends JavaScriptRenderer { const item = t.cases.values().next().value; return singleWord(`"${utf16StringEscape(item)}"`); } - if (["class", "object", "enum"].indexOf(t.kind) >= 0) { + + if (["class", "object", "enum"].includes(t.kind)) { return singleWord(this.nameForNamedType(t)); } + return matchType( t, _anyType => singleWord("any"), @@ -157,6 +157,7 @@ export abstract class TypeScriptFlowBaseRenderer extends JavaScriptRenderer { if (transformedStringType.kind === "date-time") { return singleWord("Date"); } + return singleWord("string"); } ); @@ -189,12 +190,12 @@ export abstract class TypeScriptFlowBaseRenderer extends JavaScriptRenderer { } } - private emitClass(c: ClassType, className: Name) { + private emitClass(c: ClassType, className: Name): void { this.emitDescription(this.descriptionForType(c)); this.emitClassBlock(c, className); } - emitUnion(u: UnionType, unionName: Name) { + protected emitUnion(u: UnionType, unionName: Name): void { if (!this._tsFlowOptions.declareUnions) { return; } @@ -211,6 +212,7 @@ export abstract class TypeScriptFlowBaseRenderer extends JavaScriptRenderer { if (!t.isPrimitive()) { return; } + this.ensureBlankLine(); this.emitDescription(this.descriptionForType(t)); this.emitLine("type ", name, " = ", this.sourceFor(t).source, ";"); @@ -324,6 +326,7 @@ export class TypeScriptRenderer extends TypeScriptFlowBaseRenderer { items += `"${utf16StringEscape(item)}"`; return; } + items += ` | "${utf16StringEscape(item)}"`; }); this.emitLine("export type ", enumName, " = ", items, ";"); @@ -354,11 +357,11 @@ export class TypeScriptRenderer extends TypeScriptFlowBaseRenderer { } export class FlowTargetLanguage extends TypeScriptFlowBaseTargetLanguage { - constructor() { + public constructor() { super("Flow", ["flow"], "js"); } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): FlowRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): FlowRenderer { return new FlowRenderer(this, renderContext, getOptionValues(tsFlowOptions, untypedOptionValues)); } } @@ -395,7 +398,7 @@ export class FlowRenderer extends TypeScriptFlowBaseRenderer { }); } - protected emitSourceStructure() { + protected emitSourceStructure(): void { this.emitLine("// @flow"); this.ensureBlankLine(); super.emitSourceStructure(); diff --git a/packages/quicktype-core/src/language/TypeScriptZod.ts b/packages/quicktype-core/src/language/TypeScriptZod.ts index b2197624a..ada7494a9 100644 --- a/packages/quicktype-core/src/language/TypeScriptZod.ts +++ b/packages/quicktype-core/src/language/TypeScriptZod.ts @@ -1,23 +1,10 @@ -import { StringTypeMapping } from "TypeBuilder"; import { arrayIntercalate } from "collection-utils"; + import { ConvenienceRenderer } from "../ConvenienceRenderer"; -import { Name, Namer, funPrefixNamer } from "../Naming"; -import { RenderContext } from "../Renderer"; -import { BooleanOption, Option, OptionValues, getOptionValues } from "../RendererOptions"; -import { Sourcelike } from "../Source"; -import { TargetLanguage } from "../TargetLanguage"; -import { - ArrayType, - ClassProperty, - ClassType, - EnumType, - ObjectType, - PrimitiveStringTypeKind, - SetOperationType, - TransformedStringTypeKind, - Type -} from "../Type"; -import { matchType } from "../TypeUtils"; +import { type Name, type Namer, funPrefixNamer } from "../Naming"; +import { type RenderContext } from "../Renderer"; +import { BooleanOption, type Option, type OptionValues, getOptionValues } from "../RendererOptions"; +import { type Sourcelike } from "../Source"; import { AcronymStyleOptions, acronymStyle } from "../support/Acronyms"; import { allLowerWordStyle, @@ -30,6 +17,22 @@ import { utf16StringEscape } from "../support/Strings"; import { panic } from "../support/Support"; +import { TargetLanguage } from "../TargetLanguage"; +import { + ArrayType, + type ClassProperty, + ClassType, + type EnumType, + ObjectType, + type PrimitiveStringTypeKind, + SetOperationType, + type TransformedStringTypeKind, + type Type +} from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../types"; +import { matchType } from "../TypeUtils"; + import { legalizeName } from "./JavaScript"; export const typeScriptZodOptions = { @@ -37,11 +40,11 @@ export const typeScriptZodOptions = { }; export class TypeScriptZodTargetLanguage extends TargetLanguage { - protected getOptions(): Option[] { + protected getOptions(): Array> { return []; } - constructor( + public constructor( displayName: string = "TypeScript Zod", names: string[] = ["typescript-zod"], extension: string = "ts" @@ -49,21 +52,18 @@ export class TypeScriptZodTargetLanguage extends TargetLanguage { super(displayName, names, extension); } - get stringTypeMapping(): StringTypeMapping { + public get stringTypeMapping(): StringTypeMapping { const mapping: Map = new Map(); const dateTimeType = "date-time"; mapping.set("date-time", dateTimeType); return mapping; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } - protected makeRenderer( - renderContext: RenderContext, - untypedOptionValues: { [name: string]: any } - ): TypeScriptZodRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): TypeScriptZodRenderer { return new TypeScriptZodRenderer( this, renderContext, @@ -73,7 +73,7 @@ export class TypeScriptZodTargetLanguage extends TargetLanguage { } export class TypeScriptZodRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, protected readonly _options: OptionValues @@ -93,7 +93,7 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { legalizeName, upper ? firstUpperWordStyle : allLowerWordStyle, firstUpperWordStyle, - upper ? s => capitalize(acronyms(s)) : allLowerWordStyle, + upper ? (s): string => capitalize(acronyms(s)) : allLowerWordStyle, acronyms, "", isLetterOrUnderscore @@ -131,7 +131,7 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { } protected typeMapTypeFor(t: Type, required: boolean = true): Sourcelike { - if (["class", "object", "enum"].indexOf(t.kind) >= 0) { + if (["class", "object", "enum"].includes(t.kind)) { return [this.nameForNamedType(t), "Schema"]; } @@ -157,6 +157,7 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { if (_transformedStringType.kind === "date-time") { return "z.coerce.date()"; } + return "z.string()"; } ); @@ -168,7 +169,7 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { return match; } - protected emitObject(name: Name, t: ObjectType) { + protected emitObject(name: Name, t: ObjectType): void { this.ensureBlankLine(); this.emitLine("\nexport const ", name, "Schema = ", "z.object({"); this.indent(() => { @@ -204,42 +205,43 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { * Primitive types don't need defining and enums are output before other types, hence, * these are ignored. */ - static extractUnderlyingTyperefs(type: Type): number[] { + private static extractUnderlyingTyperefs(type: Type): number[] { let typeRefs: number[] = []; - //Ignore enums and primitives + // Ignore enums and primitives if (!type.isPrimitive() && type.kind != "enum") { - //need to extract constituent types for unions and intersections (which both extend SetOperationType) - //and can ignore the union/intersection itself + // need to extract constituent types for unions and intersections (which both extend SetOperationType) + // and can ignore the union/intersection itself if (type instanceof SetOperationType) { (type as SetOperationType).members.forEach(member => { - //recurse as the underlying type could itself be a union, instersection or array etc. + // recurse as the underlying type could itself be a union, instersection or array etc. typeRefs.push(...TypeScriptZodRenderer.extractUnderlyingTyperefs(member)); }); } - //need to extract additional properties for object, class and map types (which all extend ObjectType) + // need to extract additional properties for object, class and map types (which all extend ObjectType) if (type instanceof ObjectType) { const addType = (type as ObjectType).getAdditionalProperties(); if (addType) { - //recurse as the underlying type could itself be a union, instersection or array etc. + // recurse as the underlying type could itself be a union, instersection or array etc. typeRefs.push(...TypeScriptZodRenderer.extractUnderlyingTyperefs(addType)); } } - //need to extract items types for ArrayType + // need to extract items types for ArrayType if (type instanceof ArrayType) { const itemsType = (type as ArrayType).items; if (itemsType) { - //recurse as the underlying type could itself be a union, instersection or array etc. + // recurse as the underlying type could itself be a union, instersection or array etc. typeRefs.push(...TypeScriptZodRenderer.extractUnderlyingTyperefs(itemsType)); } } - //Finally return the reference to a class as that will need to be defined (where objects, maps, unions, intersections and arrays do not) + // Finally return the reference to a class as that will need to be defined (where objects, maps, unions, intersections and arrays do not) if (type instanceof ClassType) { typeRefs.push(type.typeRef); } } + return typeRefs; } @@ -275,15 +277,15 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { mapChildTypeRefs.push(childTypeRefs); }); - //Items to process on this pass + // Items to process on this pass let indices: number[] = []; mapType.forEach((_, index) => { indices.push(index); }); - //items to process on the next pass + // items to process on the next pass let deferredIndices: number[] = []; - //defensive: make sure we don't loop forever, even complex sets shouldn't require many passes + // defensive: make sure we don't loop forever, even complex sets shouldn't require many passes const MAX_PASSES = 999; let passNum = 0; do { @@ -293,11 +295,14 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { let foundAllChildren = true; childTypeRefs.forEach(childRef => { - //defensive: first check if there is a definition for the referenced type (there should be) - if (mapTypeRef.indexOf(childRef) > -1) { + // defensive: first check if there is a definition for the referenced type (there should be) + if (mapTypeRef.includes(childRef)) { let found = false; // find this childs's ordinal, if it has already been added - //faster to go through what we've defined so far than all definitions + // faster to go through what we've defined so far than all definitions + + // FIXME: refactor this + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let j = 0; j < order.length; j++) { const childIndex = order[j]; if (mapTypeRef[childIndex] === childRef) { @@ -305,6 +310,7 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { break; } } + foundAllChildren = foundAllChildren && found; } else { console.error( @@ -317,7 +323,7 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { // insert index into order as we are safe to define this type order.push(index); } else { - //defer to a subsequent pass as we need to define other types + // defer to a subsequent pass as we need to define other types deferredIndices.push(index); } }); @@ -326,9 +332,11 @@ export class TypeScriptZodRenderer extends ConvenienceRenderer { passNum++; if (passNum > MAX_PASSES) { - //giving up + // giving up order.push(...deferredIndices); - console.warn("Exceeded maximum number of passes when determining output order, output may contain forward references"); + console.warn( + "Exceeded maximum number of passes when determining output order, output may contain forward references" + ); } } while (indices.length > 0 && passNum <= MAX_PASSES); diff --git a/packages/quicktype-core/src/language/ruby/index.ts b/packages/quicktype-core/src/language/ruby/index.ts index 685581a68..42466baba 100644 --- a/packages/quicktype-core/src/language/ruby/index.ts +++ b/packages/quicktype-core/src/language/ruby/index.ts @@ -1,33 +1,47 @@ import * as unicode from "unicode-properties"; -import { Sourcelike, modifySource } from "../../Source"; -import { Namer, Name } from "../../Naming"; -import { ConvenienceRenderer, ForbiddenWordsInfo } from "../../ConvenienceRenderer"; -import { TargetLanguage } from "../../TargetLanguage"; -import { Option, BooleanOption, EnumOption, OptionValues, getOptionValues, StringOption } from "../../RendererOptions"; - -import * as keywords from "./keywords"; - -const forbiddenForObjectProperties = Array.from(new Set([...keywords.keywords, ...keywords.reservedProperties])); - -import { Type, EnumType, ClassType, UnionType, ArrayType, MapType, ClassProperty } from "../../Type"; -import { matchType, nullableFromUnion, removeNullFromUnion } from "../../TypeUtils"; - +import { ConvenienceRenderer, type ForbiddenWordsInfo } from "../../ConvenienceRenderer"; +import { type Name, Namer } from "../../Naming"; +import { type RenderContext } from "../../Renderer"; +import { + BooleanOption, + EnumOption, + type Option, + type OptionValues, + StringOption, + getOptionValues +} from "../../RendererOptions"; +import { type Sourcelike, modifySource } from "../../Source"; import { - legalizeCharacters, - splitIntoWords, - combineWords, - firstUpperWordStyle, - allUpperWordStyle, allLowerWordStyle, - utf32ConcatMap, - isPrintable, + allUpperWordStyle, + combineWords, escapeNonPrintableMapper, + firstUpperWordStyle, intToHex, + isLetterOrUnderscore, + isPrintable, + legalizeCharacters, snakeCase, - isLetterOrUnderscore + splitIntoWords, + utf32ConcatMap } from "../../support/Strings"; -import { RenderContext } from "../../Renderer"; +import { TargetLanguage } from "../../TargetLanguage"; +import { + ArrayType, + type ClassProperty, + ClassType, + type EnumType, + MapType, + type Type, + type UnionType +} from "../../Type"; +import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../../types"; +import { matchType, nullableFromUnion, removeNullFromUnion } from "../../TypeUtils"; + +import * as keywords from "./keywords"; + +const forbiddenForObjectProperties = Array.from(new Set([...keywords.keywords, ...keywords.reservedProperties])); function unicodeEscape(codePoint: number): string { return "\\u{" + intToHex(codePoint, 0) + "}"; @@ -36,9 +50,9 @@ function unicodeEscape(codePoint: number): string { const stringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, unicodeEscape)); export enum Strictness { - Strict = "Strict::", Coercible = "Coercible::", - None = "Types::" + None = "Types::", + Strict = "Strict::" } export const rubyOptions = { @@ -52,15 +66,15 @@ export const rubyOptions = { }; export class RubyTargetLanguage extends TargetLanguage { - constructor() { + public constructor() { super("Ruby", ["ruby"], "rb"); } - protected getOptions(): Option[] { + protected getOptions(): Array> { return [rubyOptions.justTypes, rubyOptions.strictness, rubyOptions.namespace]; } - get supportsOptionalClassProperties(): boolean { + public get supportsOptionalClassProperties(): boolean { return true; } @@ -68,7 +82,7 @@ export class RubyTargetLanguage extends TargetLanguage { return " "; } - protected makeRenderer(renderContext: RenderContext, untypedOptionValues: { [name: string]: any }): RubyRenderer { + protected makeRenderer(renderContext: RenderContext, untypedOptionValues: FixMeOptionsType): RubyRenderer { return new RubyRenderer(this, renderContext, getOptionValues(rubyOptions, untypedOptionValues)); } } @@ -77,7 +91,7 @@ const isStartCharacter = isLetterOrUnderscore; function isPartCharacter(utf16Unit: number): boolean { const category: string = unicode.getCategory(utf16Unit); - return ["Nd", "Pc", "Mn", "Mc"].indexOf(category) >= 0 || isStartCharacter(utf16Unit); + return ["Nd", "Pc", "Mn", "Mc"].includes(category) || isStartCharacter(utf16Unit); } const legalizeName = legalizeCharacters(isPartCharacter); @@ -86,6 +100,7 @@ function simpleNameStyle(original: string, uppercase: boolean): string { if (/^[0-9]+$/.test(original)) { original = original + "N"; } + const words = splitIntoWords(original); return combineWords( words, @@ -114,7 +129,7 @@ function memberNameStyle(original: string): string { } export class RubyRenderer extends ConvenienceRenderer { - constructor( + public constructor( targetLanguage: TargetLanguage, renderContext: RenderContext, private readonly _options: OptionValues @@ -177,6 +192,7 @@ export class RubyRenderer extends ConvenienceRenderer { if (nullable !== null) { return [this.dryType(nullable), ".optional"]; } + return ["Types.Instance(", this.nameForNamedType(unionType), ")", optional]; } ); @@ -201,7 +217,7 @@ export class RubyRenderer extends ConvenienceRenderer { classType => { let info: { name: Name; prop: ClassProperty } | undefined; this.forEachClassProperty(classType, "none", (name, _json, prop) => { - if (["class", "map", "array"].indexOf(prop.type.kind) >= 0) { + if (["class", "map", "array"].includes(prop.type.kind)) { info = { name, prop }; } else if (info === undefined) { info = { name, prop }; @@ -210,9 +226,10 @@ export class RubyRenderer extends ConvenienceRenderer { if (info !== undefined) { return this.exampleUse(info.prop.type, [exp, safeNav, ".", info.name], depth, info.prop.isOptional); } + return exp; }, - mapType => this.exampleUse(mapType.values, [exp, safeNav, `["…"]`], depth), + mapType => this.exampleUse(mapType.values, [exp, safeNav, '["…"]'], depth), enumType => { let name: Name | undefined; // FIXME: This is a terrible way to get the first enum case name. @@ -224,23 +241,26 @@ export class RubyRenderer extends ConvenienceRenderer { if (name !== undefined) { return [exp, " == ", this.nameForNamedType(enumType), "::", name]; } + return exp; }, unionType => { const nullable = nullableFromUnion(unionType); if (nullable !== null) { - if (["class", "map", "array"].indexOf(nullable.kind) >= 0) { + if (["class", "map", "array"].includes(nullable.kind)) { return this.exampleUse(nullable, exp, depth, true); } + return [exp, ".nil?"]; } + return exp; } ); } private jsonSample(t: Type): Sourcelike { - function inner() { + function inner(): string { if (t instanceof ArrayType) { return "[…]"; } else if (t instanceof MapType) { @@ -251,6 +271,7 @@ export class RubyRenderer extends ConvenienceRenderer { return "…"; } } + return `"${inner()}"`; } @@ -289,6 +310,7 @@ export class RubyRenderer extends ConvenienceRenderer { if (nullable !== null) { return this.fromDynamic(nullable, e, true); } + const expression = [this.nameForNamedType(unionType), ".from_dynamic!(", e, ")"]; return optional ? [e, " ? ", expression, " : nil"] : expression; } @@ -299,6 +321,7 @@ export class RubyRenderer extends ConvenienceRenderer { if (this.marshalsImplicitlyToDynamic(t)) { return e; } + return matchType( t, _anyType => e, @@ -316,9 +339,11 @@ export class RubyRenderer extends ConvenienceRenderer { if (nullable !== null) { return this.toDynamic(nullable, e, true); } + if (this.marshalsImplicitlyToDynamic(unionType)) { return e; } + return [e, optional ? "&" : "", ".to_dynamic"]; } ); @@ -342,6 +367,7 @@ export class RubyRenderer extends ConvenienceRenderer { if (nullable !== null) { return this.marshalsImplicitlyToDynamic(nullable); } + return false; } ); @@ -369,19 +395,20 @@ export class RubyRenderer extends ConvenienceRenderer { if (nullable !== null) { return this.propertyTypeMarshalsImplicitlyFromDynamic(nullable); } + return false; } ); } - private emitBlock(source: Sourcelike, emit: () => void) { + private emitBlock(source: Sourcelike, emit: () => void): void { this.emitLine(source); this.indent(emit); this.emitLine("end"); } - private emitModule(emit: () => void) { - const emitModuleInner = (moduleName: string) => { + private emitModule(emit: () => void): void { + const emitModuleInner = (moduleName: string): void => { const [firstModule, ...subModules] = moduleName.split("::"); if (subModules.length > 0) { this.emitBlock(["module ", firstModule], () => { @@ -391,6 +418,7 @@ export class RubyRenderer extends ConvenienceRenderer { this.emitBlock(["module ", moduleName], emit); } }; + if (this._options.namespace !== undefined && this._options.namespace !== "") { emitModuleInner(this._options.namespace); } else { @@ -398,7 +426,7 @@ export class RubyRenderer extends ConvenienceRenderer { } } - private emitClass(c: ClassType, className: Name) { + private emitClass(c: ClassType, className: Name): void { this.emitDescription(this.descriptionForType(c)); this.emitBlock(["class ", className, " < Dry::Struct"], () => { let table: Sourcelike[][] = []; @@ -415,6 +443,7 @@ export class RubyRenderer extends ConvenienceRenderer { this.emitTable(table); table = []; } + this.ensureBlankLine(); this.emitDescriptionBlock(description); this.emitLine(attribute); @@ -489,7 +518,7 @@ export class RubyRenderer extends ConvenienceRenderer { }); } - private emitEnum(e: EnumType, enumName: Name) { + private emitEnum(e: EnumType, enumName: Name): void { this.emitDescription(this.descriptionForType(e)); this.emitBlock(["module ", enumName], () => { const table: Sourcelike[][] = []; @@ -500,7 +529,7 @@ export class RubyRenderer extends ConvenienceRenderer { }); } - private emitUnion(u: UnionType, unionName: Name) { + private emitUnion(u: UnionType, unionName: Name): void { this.emitDescription(this.descriptionForType(u)); this.emitBlock(["class ", unionName, " < Dry::Struct"], () => { const table: Sourcelike[][] = []; @@ -537,7 +566,7 @@ export class RubyRenderer extends ConvenienceRenderer { this.emitLine("end"); } }); - this.emitLine(`raise "Invalid union"`); + this.emitLine('raise "Invalid union"'); }); this.ensureBlankLine(); @@ -561,6 +590,7 @@ export class RubyRenderer extends ConvenienceRenderer { this.emitLine("nil"); }); } + this.emitLine("end"); }); @@ -571,7 +601,7 @@ export class RubyRenderer extends ConvenienceRenderer { }); } - private emitTypesModule() { + private emitTypesModule(): void { this.emitBlock(["module Types"], () => { this.emitLine("include Dry.Types(default: :nominal)"); @@ -593,6 +623,7 @@ export class RubyRenderer extends ConvenienceRenderer { if (this._options.strictness === Strictness.Strict) { if (has.nil) declarations.push([["Nil"], [` = ${this._options.strictness}Nil`]]); } + if (has.bool) declarations.push([["Bool"], [` = ${this._options.strictness}Bool`]]); if (has.hash) declarations.push([["Hash"], [` = ${this._options.strictness}Hash`]]); if (has.string) declarations.push([["String"], [` = ${this._options.strictness}String`]]); @@ -618,7 +649,7 @@ export class RubyRenderer extends ConvenienceRenderer { }); } - protected emitSourceStructure() { + protected emitSourceStructure(): void { if (this.leadingComments !== undefined) { this.emitComments(this.leadingComments); } else if (!this._options.justTypes) { @@ -635,6 +666,7 @@ export class RubyRenderer extends ConvenienceRenderer { }); this.emitLine("# If from_json! succeeds, the value returned matches the schema."); } + this.ensureBlankLine(); this.emitLine("require 'json'"); @@ -672,7 +704,7 @@ export class RubyRenderer extends ConvenienceRenderer { // it for arrays. const needsToJsonDefined = "array" === topLevel.kind; - const classDeclaration = () => { + const classDeclaration = (): void => { this.emitBlock(["class ", name], () => { this.emitBlock(["def self.from_json!(json)"], () => { if (needsToJsonDefined) { diff --git a/packages/quicktype-core/src/language/ruby/keywords.ts b/packages/quicktype-core/src/language/ruby/keywords.ts index e01c14b5f..0229d9044 100644 --- a/packages/quicktype-core/src/language/ruby/keywords.ts +++ b/packages/quicktype-core/src/language/ruby/keywords.ts @@ -39,7 +39,7 @@ export const keywords = [ "until", "when", "while", - "yield" + "yield", ]; const globalClasses = [ @@ -133,7 +133,7 @@ const globalClasses = [ "Undefined", "UnicodeNormalize", "Warning", - "ZeroDivisionError" + "ZeroDivisionError", ]; const kernel = [ @@ -286,7 +286,7 @@ const kernel = [ "untrace_var", "untrust", "untrusted?", - "warn" + "warn", ]; export const globals = kernel.concat(globalClasses); @@ -355,5 +355,5 @@ export const reservedProperties = [ "undef", "untrust", "while", - "with" + "with", ]; diff --git a/packages/quicktype-core/src/rewrites/CombineClasses.ts b/packages/quicktype-core/src/rewrites/CombineClasses.ts index 1f350644e..3fc7a29fc 100644 --- a/packages/quicktype-core/src/rewrites/CombineClasses.ts +++ b/packages/quicktype-core/src/rewrites/CombineClasses.ts @@ -1,18 +1,17 @@ -import { ClassType, Type, ClassProperty, setOperationCasesEqual } from "../Type"; -import { nonNullTypeCases, combineTypeAttributesOfTypes } from "../TypeUtils"; - -import { GraphRewriteBuilder } from "../GraphRewriting"; +import { type GraphRewriteBuilder } from "../GraphRewriting"; +import { type RunContext } from "../Run"; import { assert, panic } from "../support/Support"; -import { TypeGraph, TypeRef } from "../TypeGraph"; +import { type ClassProperty, ClassType, type Type, setOperationCasesEqual } from "../Type"; +import { type TypeGraph, type TypeRef } from "../TypeGraph"; +import { combineTypeAttributesOfTypes, nonNullTypeCases } from "../TypeUtils"; import { unifyTypes, unionBuilderForUnification } from "../UnifyClasses"; -import { RunContext } from "../Run"; const REQUIRED_OVERLAP = 3 / 4; -type Clique = { +interface Clique { members: ClassType[]; prototypes: ClassType[]; -}; +} // FIXME: Allow some type combinations to unify, like different enums, // enums with strings, integers with doubles, maps with objects of @@ -63,6 +62,7 @@ function canBeCombined(c1: ClassType, c2: ClassType, onlyWithSameProperties: boo if (faults > maxFaults) break; } } + if (faults > maxFaults) return false; for (const name of commonProperties) { let ts = smaller.get(name); @@ -70,12 +70,14 @@ function canBeCombined(c1: ClassType, c2: ClassType, onlyWithSameProperties: boo if (ts === undefined || tl === undefined) { return panic(`Both classes should have property ${name}`); } + const tsCases = nonNullTypeCases(ts.type); const tlCases = nonNullTypeCases(tl.type); if (tsCases.size > 0 && tlCases.size > 0 && !typeSetsCanBeCombined(tsCases, tlCases)) { return false; } } + return true; } @@ -86,6 +88,7 @@ function tryAddToClique(c: ClassType, clique: Clique, onlyWithSameProperties: bo return true; } } + for (const prototype of clique.prototypes) { if (canBeCombined(prototype, c, onlyWithSameProperties)) { clique.prototypes.push(c); @@ -93,6 +96,7 @@ function tryAddToClique(c: ClassType, clique: Clique, onlyWithSameProperties: bo return true; } } + return false; } @@ -114,6 +118,7 @@ function findSimilarityCliques( break; } } + if (cliqueIndex === undefined) { // New clique cliqueIndex = cliques.length; diff --git a/packages/quicktype-core/src/rewrites/ExpandStrings.ts b/packages/quicktype-core/src/rewrites/ExpandStrings.ts index 9cb886d9e..abddcfab5 100644 --- a/packages/quicktype-core/src/rewrites/ExpandStrings.ts +++ b/packages/quicktype-core/src/rewrites/ExpandStrings.ts @@ -1,22 +1,22 @@ import { + areEqual, iterableFirst, - mapFilter, - iterableSome, iterableReduce, - setUnion, + iterableSome, + mapFilter, setIntersect, setIsSuperset, - areEqual + setUnion } from "collection-utils"; -import { PrimitiveType } from "../Type"; -import { stringTypesForType } from "../TypeUtils"; -import { TypeGraph, TypeRef } from "../TypeGraph"; -import { GraphRewriteBuilder } from "../GraphRewriting"; -import { assert, defined } from "../support/Support"; -import { emptyTypeAttributes } from "../attributes/TypeAttributes"; import { StringTypes } from "../attributes/StringTypes"; -import { RunContext } from "../Run"; +import { emptyTypeAttributes } from "../attributes/TypeAttributes"; +import { type GraphRewriteBuilder } from "../GraphRewriting"; +import { type RunContext } from "../Run"; +import { assert, defined } from "../support/Support"; +import { type PrimitiveType } from "../Type"; +import { type TypeGraph, type TypeRef } from "../TypeGraph"; +import { stringTypesForType } from "../TypeUtils"; const MIN_LENGTH_FOR_ENUM = 10; @@ -25,10 +25,10 @@ const REQUIRED_OVERLAP = 3 / 4; export type EnumInference = "none" | "all" | "infer"; -type EnumInfo = { +interface EnumInfo { cases: ReadonlySet; numValues: number; -}; +} function isOwnEnum({ numValues, cases }: EnumInfo): boolean { return numValues >= MIN_LENGTH_FOR_ENUM && cases.size < Math.sqrt(numValues); @@ -68,7 +68,7 @@ export function expandStrings(ctx: RunContext, graph: TypeGraph, inference: Enum const keys = Array.from(cases.keys()); if (isAlwaysEmptyString(keys)) return undefined; - const someCaseIsNotNumber = iterableSome(keys, key => /^(\-|\+)?[0-9]+(\.[0-9]+)?$/.test(key) === false); + const someCaseIsNotNumber = iterableSome(keys, key => /^[-+]?[0-9]+(\.[0-9]+)?$/.test(key) === false); if (!someCaseIsNotNumber) return undefined; } @@ -76,7 +76,7 @@ export function expandStrings(ctx: RunContext, graph: TypeGraph, inference: Enum } const enumInfos = new Map(); - const enumSets: ReadonlySet[] = []; + const enumSets: Array> = []; if (inference !== "none") { for (const t of allStrings) { @@ -85,6 +85,8 @@ export function expandStrings(ctx: RunContext, graph: TypeGraph, inference: Enum enumInfos.set(t, enumInfo); } + // FIXME: refactor this + // eslint-disable-next-line no-inner-declarations function findOverlap(newCases: ReadonlySet, newAreSubordinate: boolean): number { return enumSets.findIndex(s => enumCasesOverlap(newCases, s, newAreSubordinate)); } @@ -117,6 +119,7 @@ export function expandStrings(ctx: RunContext, graph: TypeGraph, inference: Enum // Remove the ones we're done with. enumInfos.delete(t); } + if (inference === "all") { assert(enumInfos.size === 0); } @@ -166,6 +169,7 @@ export function expandStrings(ctx: RunContext, graph: TypeGraph, inference: Enum return builder.getStringType(attributes, StringTypes.unrestricted, forwardingRef); } } + const transformations = mappedStringTypes.transformations; // FIXME: This is probably wrong, or at least overly conservative. This is for the case // where some attributes are identity ones, i.e. where we can't merge the primitive types, @@ -177,6 +181,7 @@ export function expandStrings(ctx: RunContext, graph: TypeGraph, inference: Enum const kind = defined(iterableFirst(transformations)); return builder.getPrimitiveType(kind, attributes, forwardingRef); } + types.push(...Array.from(transformations).map(k => builder.getPrimitiveType(k))); assert(types.length > 0, "We got an empty string type"); return builder.getUnionType(attributes, new Set(types), forwardingRef); diff --git a/packages/quicktype-core/src/rewrites/FlattenStrings.ts b/packages/quicktype-core/src/rewrites/FlattenStrings.ts index b700073f5..6982a94da 100644 --- a/packages/quicktype-core/src/rewrites/FlattenStrings.ts +++ b/packages/quicktype-core/src/rewrites/FlattenStrings.ts @@ -1,12 +1,12 @@ import { iterableFirst } from "collection-utils"; -import { PrimitiveType, UnionType, Type } from "../Type"; -import { stringTypesForType, combineTypeAttributesOfTypes } from "../TypeUtils"; -import { TypeGraph, TypeRef } from "../TypeGraph"; -import { StringTypeMapping } from "../TypeBuilder"; -import { GraphRewriteBuilder } from "../GraphRewriting"; -import { assert, defined } from "../support/Support"; import { combineTypeAttributes } from "../attributes/TypeAttributes"; +import { type GraphRewriteBuilder } from "../GraphRewriting"; +import { assert, defined } from "../support/Support"; +import { type PrimitiveType, type Type, type UnionType } from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type TypeGraph, type TypeRef } from "../TypeGraph"; +import { combineTypeAttributesOfTypes, stringTypesForType } from "../TypeUtils"; // A union needs replacing if it contains more than one string type, one of them being // a basic string type. @@ -37,6 +37,7 @@ function replaceUnion( if (stringMembers.has(t)) continue; types.push(builder.reconstituteType(t)); } + if (types.length === 0) { return builder.getStringType( combineTypeAttributes("union", stringAttributes, u.getAttributes()), @@ -44,6 +45,7 @@ function replaceUnion( forwardingRef ); } + types.push(builder.getStringType(stringAttributes, undefined)); return builder.getUnionType(u.getAttributes(), new Set(types), forwardingRef); } diff --git a/packages/quicktype-core/src/rewrites/FlattenUnions.ts b/packages/quicktype-core/src/rewrites/FlattenUnions.ts index a88dca2e8..cca90fca4 100644 --- a/packages/quicktype-core/src/rewrites/FlattenUnions.ts +++ b/packages/quicktype-core/src/rewrites/FlattenUnions.ts @@ -1,14 +1,14 @@ -import { setFilter, iterableSome } from "collection-utils"; +import { iterableSome, setFilter } from "collection-utils"; -import { TypeGraph, TypeRef, derefTypeRef } from "../TypeGraph"; -import { Type, UnionType, IntersectionType } from "../Type"; -import { makeGroupsToFlatten } from "../TypeUtils"; -import { assert } from "../support/Support"; -import { StringTypeMapping } from "../TypeBuilder"; -import { GraphRewriteBuilder } from "../GraphRewriting"; -import { unifyTypes, UnifyUnionBuilder } from "../UnifyClasses"; -import { messageAssert } from "../Messages"; import { emptyTypeAttributes } from "../attributes/TypeAttributes"; +import { type GraphRewriteBuilder } from "../GraphRewriting"; +import { messageAssert } from "../Messages"; +import { assert } from "../support/Support"; +import { IntersectionType, type Type, UnionType } from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type TypeGraph, type TypeRef, derefTypeRef } from "../TypeGraph"; +import { makeGroupsToFlatten } from "../TypeUtils"; +import { UnifyUnionBuilder, unifyTypes } from "../UnifyClasses"; export function flattenUnions( graph: TypeGraph, @@ -26,6 +26,7 @@ export function flattenUnions( if (trefs.length === 1) { return trefs[0]; } + needsRepeat = true; return builder.getUnionType(emptyTypeAttributes, new Set(trefs)); }); diff --git a/packages/quicktype-core/src/rewrites/InferMaps.ts b/packages/quicktype-core/src/rewrites/InferMaps.ts index 9190b043b..e63803745 100644 --- a/packages/quicktype-core/src/rewrites/InferMaps.ts +++ b/packages/quicktype-core/src/rewrites/InferMaps.ts @@ -1,13 +1,13 @@ -import { iterableFirst, iterableEvery, setMap } from "collection-utils"; +import { iterableEvery, iterableFirst, setMap } from "collection-utils"; -import { Type, ClassType, setOperationCasesEqual, ClassProperty, isPrimitiveStringTypeKind } from "../Type"; -import { removeNullFromType } from "../TypeUtils"; +import { type GraphRewriteBuilder } from "../GraphRewriting"; +import { type MarkovChain, evaluate, load } from "../MarkovChain"; import { defined, panic } from "../support/Support"; -import { TypeGraph, TypeRef } from "../TypeGraph"; -import { StringTypeMapping } from "../TypeBuilder"; -import { GraphRewriteBuilder } from "../GraphRewriting"; +import { type ClassProperty, ClassType, type Type, isPrimitiveStringTypeKind, setOperationCasesEqual } from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type TypeGraph, type TypeRef } from "../TypeGraph"; +import { removeNullFromType } from "../TypeUtils"; import { unifyTypes, unionBuilderForUnification } from "../UnifyClasses"; -import { MarkovChain, load, evaluate } from "../MarkovChain"; const mapSizeThreshold = 20; const stringMapSizeThreshold = 50; @@ -18,6 +18,7 @@ function nameProbability(name: string): number { if (markovChain === undefined) { markovChain = load(); } + return evaluate(markovChain, name); } @@ -94,11 +95,14 @@ function shouldBeMap(properties: ReadonlyMap): ReadonlySe firstNonNullCases = nn; } } + allCases.add(p.type); } + if (!canBeMap) { return undefined; } + return allCases; } diff --git a/packages/quicktype-core/src/rewrites/ReplaceObjectType.ts b/packages/quicktype-core/src/rewrites/ReplaceObjectType.ts index a9245fe38..2e8504d62 100644 --- a/packages/quicktype-core/src/rewrites/ReplaceObjectType.ts +++ b/packages/quicktype-core/src/rewrites/ReplaceObjectType.ts @@ -1,11 +1,11 @@ -import { setFilter, iterableFirst, mapMap, setMap } from "collection-utils"; +import { iterableFirst, mapMap, setFilter, setMap } from "collection-utils"; -import { TypeGraph, TypeRef } from "../TypeGraph"; -import { StringTypeMapping } from "../TypeBuilder"; -import { GraphRewriteBuilder } from "../GraphRewriting"; -import { ObjectType, ClassProperty } from "../Type"; -import { defined } from "../support/Support"; import { emptyTypeAttributes } from "../attributes/TypeAttributes"; +import { type GraphRewriteBuilder } from "../GraphRewriting"; +import { defined } from "../support/Support"; +import { type ClassProperty, type ObjectType } from "../Type"; +import { type StringTypeMapping } from "../TypeBuilder"; +import { type TypeGraph, type TypeRef } from "../TypeGraph"; export function replaceObjectType( graph: TypeGraph, diff --git a/packages/quicktype-core/src/rewrites/ResolveIntersections.ts b/packages/quicktype-core/src/rewrites/ResolveIntersections.ts index c68159828..a992ead9f 100644 --- a/packages/quicktype-core/src/rewrites/ResolveIntersections.ts +++ b/packages/quicktype-core/src/rewrites/ResolveIntersections.ts @@ -1,41 +1,42 @@ +/* eslint-disable @typescript-eslint/brace-style */ import { - iterableFirst, iterableEvery, - setFilter, + iterableFind, + iterableFirst, + mapMap, mapMapEntries, mapMergeWithInto, - mapMap, mapUpdateInto, - setMap, - iterableFind, + setFilter, setIntersect, + setMap, setUnionInto } from "collection-utils"; -import { TypeGraph, TypeRef } from "../TypeGraph"; -import { StringTypeMapping, TypeBuilder } from "../TypeBuilder"; -import { GraphRewriteBuilder, TypeLookerUp } from "../GraphRewriting"; -import { UnionTypeProvider, UnionBuilder, TypeAttributeMap } from "../UnionBuilder"; -import { - IntersectionType, - Type, - UnionType, - PrimitiveTypeKind, - ArrayType, - isPrimitiveTypeKind, - isNumberTypeKind, - GenericClassProperty, - TypeKind, - ObjectType -} from "../Type"; -import { setOperationMembersRecursively, matchTypeExhaustive, makeGroupsToFlatten } from "../TypeUtils"; -import { assert, defined, panic, mustNotHappen } from "../support/Support"; import { + type TypeAttributes, combineTypeAttributes, - TypeAttributes, emptyTypeAttributes, makeTypeAttributesInferred } from "../attributes/TypeAttributes"; +import { type GraphRewriteBuilder, type TypeLookerUp } from "../GraphRewriting"; +import { assert, defined, mustNotHappen, panic } from "../support/Support"; +import { + ArrayType, + GenericClassProperty, + IntersectionType, + ObjectType, + type PrimitiveTypeKind, + type Type, + type TypeKind, + UnionType, + isNumberTypeKind, + isPrimitiveTypeKind +} from "../Type"; +import { type StringTypeMapping, type TypeBuilder } from "../TypeBuilder"; +import { type TypeGraph, type TypeRef } from "../TypeGraph"; +import { makeGroupsToFlatten, matchTypeExhaustive, setOperationMembersRecursively } from "../TypeUtils"; +import { type TypeAttributeMap, UnionBuilder, type UnionTypeProvider } from "../UnionBuilder"; function canResolve(t: IntersectionType): boolean { const members = setOperationMembersRecursively(t, undefined)[0]; @@ -53,12 +54,14 @@ class IntersectionAccumulator implements UnionTypeProvider, [PropertyMap, ReadonlySet | undefined] | undefined> { private _primitiveTypes: Set | undefined; + private readonly _primitiveAttributes: TypeAttributeMap = new Map(); // * undefined: We haven't seen any types yet. // * Set: All types we've seen can be arrays. // * false: At least one of the types seen can't be an array. private _arrayItemTypes: Set | undefined | false; + private _arrayAttributes: TypeAttributes = emptyTypeAttributes; // We start out with all object types allowed, which means @@ -70,7 +73,9 @@ class IntersectionAccumulator // undefined, no object types are allowed, in which case // _additionalPropertyTypes must also be undefined; private _objectProperties: PropertyMap | undefined = new Map(); + private _objectAttributes: TypeAttributes = emptyTypeAttributes; + private _additionalPropertyTypes: Set | undefined = new Set(); private _lostTypeAttributes = false; @@ -180,9 +185,9 @@ class IntersectionAccumulator this.updateObjectProperties(members); } - addType(t: Type): TypeAttributes { + public addType(t: Type): TypeAttributes { let attributes = t.getAttributes(); - matchTypeExhaustive( + matchTypeExhaustive( t, _noneType => { return panic("There shouldn't be a none type"); @@ -212,14 +217,15 @@ class IntersectionAccumulator return makeTypeAttributesInferred(attributes); } - get arrayData(): ReadonlySet { + public get arrayData(): ReadonlySet { if (this._arrayItemTypes === undefined || this._arrayItemTypes === false) { return panic("This should not be called if the type can't be an array"); } + return this._arrayItemTypes; } - get objectData(): [PropertyMap, ReadonlySet | undefined] | undefined { + public get objectData(): [PropertyMap, ReadonlySet | undefined] | undefined { if (this._objectProperties === undefined) { assert(this._additionalPropertyTypes === undefined); return undefined; @@ -228,11 +234,11 @@ class IntersectionAccumulator return [this._objectProperties, this._additionalPropertyTypes]; } - get enumCases(): ReadonlySet { + public get enumCases(): ReadonlySet { return panic("We don't support enums in intersections"); } - getMemberKinds(): TypeAttributeMap { + public getMemberKinds(): TypeAttributeMap { const kinds: TypeAttributeMap = mapMap(defined(this._primitiveTypes).entries(), k => defined(this._primitiveAttributes.get(k)) ); @@ -260,7 +266,7 @@ class IntersectionAccumulator return kinds; } - get lostTypeAttributes(): boolean { + public get lostTypeAttributes(): boolean { return this._lostTypeAttributes; } } @@ -285,7 +291,7 @@ class IntersectionUnionBuilder extends UnionBuilder< return this.typeBuilder.getUniqueIntersectionType(attributes, reconstitutedMembers); } - get createdNewIntersections(): boolean { + public get createdNewIntersections(): boolean { return this._createdNewIntersections; } @@ -338,6 +344,7 @@ export function resolveIntersections( const t = builder.getPrimitiveType("any", intersectionAttributes, forwardingRef); return t; } + if (members.size === 1) { return builder.reconstituteType(defined(iterableFirst(members)), intersectionAttributes, forwardingRef); } @@ -356,8 +363,10 @@ export function resolveIntersections( if (unionBuilder.createdNewIntersections) { needsRepeat = true; } + return tref; } + // FIXME: We need to handle intersections that resolve to the same set of types. // See for example the intersections-nested.schema example. const allIntersections = setFilter( diff --git a/packages/quicktype-core/src/support/Acronyms.ts b/packages/quicktype-core/src/support/Acronyms.ts index 21460b0cf..d24c85e97 100644 --- a/packages/quicktype-core/src/support/Acronyms.ts +++ b/packages/quicktype-core/src/support/Acronyms.ts @@ -1,5 +1,7 @@ import { EnumOption } from "../RendererOptions"; -import { allUpperWordStyle, firstUpperWordStyle, originalWord, allLowerWordStyle } from "./Strings"; + +// eslint-disable-next-line import/no-cycle +import { allLowerWordStyle, allUpperWordStyle, firstUpperWordStyle, originalWord } from "./Strings"; export const acronyms: string[] = [ "aaa", @@ -1100,13 +1102,13 @@ export const acronyms: string[] = [ ]; export enum AcronymStyleOptions { - Pascal = "pascal", Camel = "camel", + Lower = "lowerCase", Original = "original", - Lower = "lowerCase" + Pascal = "pascal" } -export const acronymOption = function (defaultOption: AcronymStyleOptions) { +export const acronymOption = function (defaultOption: AcronymStyleOptions): EnumOption { return new EnumOption( "acronym-style", "Acronym naming style", diff --git a/packages/quicktype-core/src/support/Chance.ts b/packages/quicktype-core/src/support/Chance.ts index 5a368d7e8..74f8162ac 100644 --- a/packages/quicktype-core/src/support/Chance.ts +++ b/packages/quicktype-core/src/support/Chance.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ // Mersenne Twister from https://gist.github.com/banksean/300494 /* A C-program for MT19937, with initialization improved 2002/1/26. @@ -34,20 +35,26 @@ email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) */ class MersenneTwister { - private N: number; - private M: number; - private MATRIX_A: number; - private UPPER_MASK: number; - private LOWER_MASK: number; + private readonly N: number; + + private readonly M: number; + + private readonly MATRIX_A: number; + + private readonly UPPER_MASK: number; + + private readonly LOWER_MASK: number; private mt: number[]; + private mti: number; - constructor(seed: number) { + public constructor(seed: number) { if (seed === undefined) { // kept random number same size as time used previously to ensure no unexpected results downstream seed = Math.floor(Math.random() * Math.pow(10, 13)); } + /* Period parameters */ this.N = 624; this.M = 397; @@ -80,7 +87,7 @@ class MersenneTwister { /* generates a random number on [0,0xffffffff]-interval */ private genrand_int32() { let y; - let mag01 = new Array(0x0, this.MATRIX_A); + let mag01 = [0x0, this.MATRIX_A]; /* mag01[x] = x * MATRIX_A for x=0,1 */ if (this.mti >= this.N) { @@ -91,14 +98,17 @@ class MersenneTwister { /* if init_genrand() has not been called, */ this.init_genrand(5489); /* a default initial seed is used */ } + for (kk = 0; kk < this.N - this.M; kk++) { y = (this.mt[kk] & this.UPPER_MASK) | (this.mt[kk + 1] & this.LOWER_MASK); this.mt[kk] = this.mt[kk + this.M] ^ (y >>> 1) ^ mag01[y & 0x1]; } + for (; kk < this.N - 1; kk++) { y = (this.mt[kk] & this.UPPER_MASK) | (this.mt[kk + 1] & this.LOWER_MASK); this.mt[kk] = this.mt[kk + (this.M - this.N)] ^ (y >>> 1) ^ mag01[y & 0x1]; } + y = (this.mt[this.N - 1] & this.UPPER_MASK) | (this.mt[0] & this.LOWER_MASK); this.mt[this.N - 1] = this.mt[this.M - 1] ^ (y >>> 1) ^ mag01[y & 0x1]; @@ -125,9 +135,9 @@ class MersenneTwister { // https://github.com/chancejs/chancejs export class Chance { - private mt: MersenneTwister; + private readonly mt: MersenneTwister; - constructor(readonly seed: number) { + public constructor(readonly seed: number) { // If no generator function was provided, use our MT this.mt = new MersenneTwister(this.seed); } @@ -147,7 +157,7 @@ export class Chance { * @returns {Number} a single random integer number * @throws {RangeError} min cannot be greater than max */ - integer(options: { min: number; max: number }): number { + integer(options: { max: number; min: number }): number { return Math.floor(this.random() * (options.max - options.min + 1) + options.min); } @@ -170,6 +180,7 @@ export class Chance { if (arr.length === 0) { throw new RangeError("Chance: Cannot pick() from an empty array"); } + return arr[this.natural({ max: arr.length - 1 })]; } diff --git a/packages/quicktype-core/src/support/Comments.ts b/packages/quicktype-core/src/support/Comments.ts index 3599cf133..38dd96415 100644 --- a/packages/quicktype-core/src/support/Comments.ts +++ b/packages/quicktype-core/src/support/Comments.ts @@ -1,15 +1,19 @@ -import { Sourcelike } from "../Source"; +import { type Sourcelike } from "../Source"; -export type CommentOptions = { - lineStart?: string; - lineEnd?: string; - beforeComment?: string; +export interface CommentOptions { afterComment?: string; + beforeComment?: string; firstLineStart?: string; -}; + lineEnd?: string; + lineStart?: string; +} -type DescriptionBlockCommentConfig = { descriptionBlock: Sourcelike[] }; -type InlineCommentConfig = { lines: Sourcelike[] }; +interface DescriptionBlockCommentConfig { + descriptionBlock: Sourcelike[]; +} +interface InlineCommentConfig { + lines: Sourcelike[]; +} type CustomCommentConfig = CommentOptions & { customLines: Sourcelike[]; }; diff --git a/packages/quicktype-core/src/support/Converters.ts b/packages/quicktype-core/src/support/Converters.ts index 4231237d3..caec348bf 100644 --- a/packages/quicktype-core/src/support/Converters.ts +++ b/packages/quicktype-core/src/support/Converters.ts @@ -1,11 +1,11 @@ import { EnumOption } from "../RendererOptions"; export enum ConvertersOptions { - TopLevel = "top-level", - AllObjects = "all-objects" + AllObjects = "all-objects", + TopLevel = "top-level" } -export function convertersOption() { +export function convertersOption(): EnumOption { return new EnumOption( "converters", "Which converters to generate (top-level by default)", diff --git a/packages/quicktype-core/src/support/Strings.ts b/packages/quicktype-core/src/support/Strings.ts index 4b196a2fb..bd76ee4f9 100644 --- a/packages/quicktype-core/src/support/Strings.ts +++ b/packages/quicktype-core/src/support/Strings.ts @@ -1,7 +1,11 @@ -import { assert, defined, panic, assertNever } from "./Support"; -import { acronyms } from "./Acronyms"; +import unicode from "unicode-properties"; + import { messageAssert } from "../Messages"; +// eslint-disable-next-line import/no-cycle +import { acronyms } from "./Acronyms"; +import { assert, assertNever, defined, panic } from "./Support"; + export type NamingStyle = | "pascal" | "camel" @@ -10,11 +14,9 @@ export type NamingStyle = | "pascal-upper-acronyms" | "camel-upper-acronyms"; -import * as unicode from "unicode-properties"; - function computeAsciiMap(mapper: (codePoint: number) => string): { - charStringMap: string[]; charNoEscapeMap: number[]; + charStringMap: string[]; } { const charStringMap: string[] = []; const charNoEscapeMap: number[] = []; @@ -25,6 +27,7 @@ function computeAsciiMap(mapper: (codePoint: number) => string): { if (result === String.fromCharCode(i)) { noEscape = 1; } + charStringMap.push(result); charNoEscapeMap.push(noEscape); } @@ -39,6 +42,7 @@ function precomputedCodePointPredicate(p: CodePointPredicate): CodePointPredicat for (let cp = 0; cp < 128; cp++) { asciiResults.push(p(cp)); } + return function (cp: number) { return cp < 128 ? asciiResults[cp] : p(cp); }; @@ -48,6 +52,7 @@ function precomputedCodePointPredicate(p: CodePointPredicate): CodePointPredicat export function utf16ConcatMap(mapper: (utf16Unit: number) => string): (s: string) => string { const { charStringMap, charNoEscapeMap } = computeAsciiMap(mapper); + // eslint-disable-next-line @typescript-eslint/naming-convention return function stringConcatMap_inner(s: string): string { let cs: string[] | null = null; let start = 0; @@ -67,6 +72,7 @@ export function utf16ConcatMap(mapper: (utf16Unit: number) => string): (s: strin start = i + 1; } + i++; } @@ -89,6 +95,7 @@ function isLowSurrogate(cc: number): boolean { export function utf32ConcatMap(mapper: (codePoint: number) => string): (s: string) => string { const { charStringMap, charNoEscapeMap } = computeAsciiMap(mapper); + // eslint-disable-next-line @typescript-eslint/naming-convention return function stringConcatMap_inner(s: string): string { let cs: string[] | null = null; let start = 0; @@ -118,6 +125,7 @@ export function utf32ConcatMap(mapper: (codePoint: number) => string): (s: strin start = i + 1; } + i++; } @@ -149,11 +157,13 @@ export function repeatString(s: string, n: number): string { if (n % 2 !== 0) { result += s; } + n = Math.floor(n / 2); if (n > 0) { s += s; } } while (n > 0); + return result; } @@ -189,9 +199,11 @@ export function escapeNonPrintableMapper( if (printablePredicate(u)) { return String.fromCharCode(u); } + return escaper(u); } } + return mapper; } @@ -201,33 +213,31 @@ export const stringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, export function isPrintable(codePoint: number): boolean { if (codePoint > 0xffff) return false; const category = unicode.getCategory(codePoint); - return ( - [ - "Mc", - "No", - "Sk", - "Me", - "Nd", - "Po", - "Lt", - "Pc", - "Sm", - "Zs", - "Lu", - "Pd", - "So", - "Pe", - "Pf", - "Ps", - "Sc", - "Ll", - "Lm", - "Pi", - "Nl", - "Mn", - "Lo" - ].indexOf(category) >= 0 - ); + return [ + "Mc", + "No", + "Sk", + "Me", + "Nd", + "Po", + "Lt", + "Pc", + "Sm", + "Zs", + "Lu", + "Pd", + "So", + "Pe", + "Pf", + "Ps", + "Sc", + "Ll", + "Lm", + "Pi", + "Nl", + "Mn", + "Lo" + ].includes(category); } export function isAscii(codePoint: number): boolean { @@ -237,17 +247,17 @@ export function isAscii(codePoint: number): boolean { export function isLetter(codePoint: number): boolean { const category = unicode.getCategory(codePoint); // FIXME: Include Letter, modifier (Lm)? - return ["Lu", "Ll", "Lt", "Lo"].indexOf(category) >= 0; + return ["Lu", "Ll", "Lt", "Lo"].includes(category); } export function isDigit(codePoint: number): boolean { const category = unicode.getCategory(codePoint); - return ["Nd"].indexOf(category) >= 0; + return ["Nd"].includes(category); } export function isNumeric(codePoint: number): boolean { const category = unicode.getCategory(codePoint); - return ["No", "Nd", "Nl"].indexOf(category) >= 0; + return ["No", "Nd", "Nl"].includes(category); } export function isLetterOrDigit(codePoint: number): boolean { @@ -273,6 +283,7 @@ export function trimEnd(str: string): string { if (!unicode.isWhiteSpace(str.charCodeAt(i))) break; firstWS = i; } + if (firstWS === l) return str; return str.slice(0, firstWS); } @@ -319,10 +330,10 @@ export function startWithLetter( const knownAcronyms = new Set(acronyms); -export type WordInName = { - word: string; +export interface WordInName { isAcronym: boolean; -}; + word: string; +} const fastIsWordCharacter = precomputedCodePointPredicate(isWordCharacter); const fastIsNonWordCharacter = precomputedCodePointPredicate(cp => !isWordCharacter(cp)); @@ -333,7 +344,7 @@ const fastIsDigit = precomputedCodePointPredicate(isDigit); export function splitIntoWords(s: string): WordInName[] { // [start, end, allUpper] - const intervals: [number, number, boolean][] = []; + const intervals: Array<[number, number, boolean]> = []; let intervalStart: number | undefined = undefined; const len = s.length; let i = 0; @@ -342,6 +353,7 @@ export function splitIntoWords(s: string): WordInName[] { function atEnd(): boolean { return i >= len; } + function currentCodePoint(): number { return defined(s.codePointAt(i)); } @@ -358,15 +370,19 @@ export function splitIntoWords(s: string): WordInName[] { function skipNonWord(): void { skipWhile(fastIsNonWordCharacter); } + function skipLowerCase(): void { skipWhile(fastIsLowerCase); } + function skipUpperCase(): void { skipWhile(fastIsUpperCase); } + function skipNonLetter(): void { skipWhile(fastNonLetter); } + function skipDigits(): void { skipWhile(fastIsDigit); } @@ -380,6 +396,7 @@ export function splitIntoWords(s: string): WordInName[] { if (intervalStart === undefined) { return panic("Tried to commit interval without starting one"); } + assert(i > intervalStart, "Interval must be non-empty"); // FIXME: This is a hack to avoid splitting up surrogates. We shouldn't // look at surrogates individually in the first place. When we @@ -389,6 +406,7 @@ export function splitIntoWords(s: string): WordInName[] { if (!atEnd() && isLowSurrogate(currentCodePoint())) { i += 1; } + const allUpper = lastLowerCaseIndex === undefined || lastLowerCaseIndex < intervalStart; intervals.push([intervalStart, i, allUpper]); intervalStart = undefined; @@ -398,6 +416,7 @@ export function splitIntoWords(s: string): WordInName[] { if (intervalStart === undefined) { return panic("Tried to get interval length without starting one"); } + return i - intervalStart; } @@ -425,6 +444,7 @@ export function splitIntoWords(s: string): WordInName[] { if (fastIsWordCharacter(currentCodePoint())) { i -= 1; } + commitInterval(); } } else { @@ -439,6 +459,7 @@ export function splitIntoWords(s: string): WordInName[] { const isAcronym = (lastLowerCaseIndex !== undefined && allUpper) || knownAcronyms.has(word.toLowerCase()); words.push({ word, isAcronym }); } + return words; } @@ -551,6 +572,7 @@ export function makeNameStyle( } else { separator = "_"; } + switch (namingStyle) { case "pascal": case "pascal-upper-acronyms": diff --git a/packages/quicktype-core/src/support/Support.ts b/packages/quicktype-core/src/support/Support.ts index 810219df8..3715a7108 100644 --- a/packages/quicktype-core/src/support/Support.ts +++ b/packages/quicktype-core/src/support/Support.ts @@ -1,44 +1,59 @@ import { Base64 } from "js-base64"; import * as pako from "pako"; -import { messageError } from "../Messages"; import * as YAML from "yaml"; -export type StringMap = { [name: string]: any }; +import { type JSONSchema } from "../input/JSONSchemaStore"; +import { messageError } from "../Messages"; -export function isStringMap(x: any): x is StringMap; -export function isStringMap(x: any, checkValue: (v: any) => v is T): x is { [name: string]: T }; -export function isStringMap(x: any, checkValue?: (v: any) => v is T): boolean { +export interface StringMap { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [name: string]: any; +} + +export function isStringMap(x: unknown): x is StringMap; +export function isStringMap(x: unknown, checkValue: (v: unknown) => v is T): x is { [name: string]: T }; +export function isStringMap(x: unknown, checkValue?: (v: unknown) => v is T): boolean { if (typeof x !== "object" || Array.isArray(x) || x === null) { return false; } + if (checkValue !== undefined) { for (const k of Object.getOwnPropertyNames(x)) { - const v = x[k]; + const v = x[k as keyof typeof x]; if (!checkValue(v)) { return false; } } } + return true; } -export function checkString(x: any): x is string { +export function checkString(x: unknown): x is string { return typeof x === "string"; } -export function checkStringMap(x: any): StringMap; -export function checkStringMap(x: any, checkValue: (v: any) => v is T): { [name: string]: T }; -export function checkStringMap(x: any, checkValue?: (v: any) => v is T): StringMap { - if (isStringMap(x, checkValue as any)) return x; +export function checkStringMap(x: unknown): StringMap; +export function checkStringMap(x: unknown, checkValue: (v: unknown) => v is T): { [name: string]: T }; +export function checkStringMap(x: unknown, checkValue?: (v: unknown) => v is T): StringMap { + if (checkValue && isStringMap(x, checkValue)) { + return x; + } + + if (isStringMap(x)) { + return x; + } + return panic(`Value must be an object, but is ${x}`); } -export function checkArray(x: any): any[]; -export function checkArray(x: any, checkItem: (v: any) => v is T): T[]; -export function checkArray(x: any, checkItem?: (v: any) => v is T): T[] { +export function checkArray(x: unknown): unknown[]; +export function checkArray(x: unknown, checkItem: (v: unknown) => v is T): T[]; +export function checkArray(x: unknown, checkItem?: (v: unknown) => v is T): T[] { if (!Array.isArray(x)) { return panic(`Value must be an array, but is ${x}`); } + if (checkItem !== undefined) { for (const v of x) { if (!checkItem(v)) { @@ -46,6 +61,7 @@ export function checkArray(x: any, checkItem?: (v: any) => v is T): T[] { } } } + return x; } @@ -60,7 +76,7 @@ export function nonNull(x: T | null): T { } export function assertNever(x: never): never { - return messageError("InternalError", { message: `Unexpected object ${x as any}` }); + return messageError("InternalError", { message: `Unexpected object ${x}` }); } export function assert(condition: boolean, message = "Assertion failed"): void { @@ -82,6 +98,7 @@ export function repeated(n: number, value: T): T[] { for (let i = 0; i < n; i++) { arr.push(value); } + return arr; } @@ -90,14 +107,16 @@ export function repeatedCall(n: number, producer: () => T): T[] { for (let i = 0; i < n; i++) { arr.push(producer()); } + return arr; } -export function errorMessage(e: any): string { +export function errorMessage(e: unknown): string { if (e instanceof Error) { return e.message; } - return e.toString(); + + return (e as { toString: () => string }).toString(); } export function inflateBase64(encoded: string): string { @@ -105,12 +124,13 @@ export function inflateBase64(encoded: string): string { return pako.inflate(bytes, { to: "string" }); } -export function parseJSON(text: string, description: string, address = ""): any { +export function parseJSON(text: string, description: string, address = ""): JSONSchema | undefined { try { // https://gist.github.com/pbakondy/f5045eff725193dad9c7 if (text.charCodeAt(0) === 0xfeff) { text = text.slice(1); } + return YAML.parse(text); } catch (e) { let message: string; @@ -129,7 +149,8 @@ export function indentationString(level: number): string { return " ".repeat(level); } -export function numberEnumValues(e: { [key: string]: any }): number[] { +// FIXME: fix this enum iteration +export function numberEnumValues(e: Record): number[] { const result: number[] = []; for (const k of Object.keys(e)) { const v = e[k]; @@ -137,5 +158,6 @@ export function numberEnumValues(e: { [key: string]: any }): number[] { result.push(v); } } + return result; } diff --git a/packages/quicktype-core/src/types.ts b/packages/quicktype-core/src/types.ts new file mode 100644 index 000000000..2b26cc2be --- /dev/null +++ b/packages/quicktype-core/src/types.ts @@ -0,0 +1,6 @@ +// FIXME: remove these when options are strongly types + +/* eslint-disable @typescript-eslint/no-explicit-any */ +export type FixMeOptionsType = Record; + +export type FixMeOptionsAnyType = any; diff --git a/packages/quicktype-graphql-input/src/index.ts b/packages/quicktype-graphql-input/src/index.ts index 515c5c258..1b18754ac 100644 --- a/packages/quicktype-graphql-input/src/index.ts +++ b/packages/quicktype-graphql-input/src/index.ts @@ -1,66 +1,65 @@ +import { iterableFirst, mapFromObject, setMap } from "collection-utils"; +import * as graphql from "graphql/language"; import { - DocumentNode, - SelectionSetNode, - SelectionNode, - OperationDefinitionNode, - FragmentDefinitionNode, - DirectiveNode, - FieldNode + type DirectiveNode, + type DocumentNode, + type FieldNode, + type FragmentDefinitionNode, + type OperationDefinitionNode, + type SelectionNode, + type SelectionSetNode } from "graphql/language/ast"; -import * as graphql from "graphql/language"; -import { setMap, iterableFirst, mapFromObject } from "collection-utils"; - import { + type ClassProperty, + type Input, + type RunContext, + StringTypes, + type TypeAttributes, + type TypeBuilder, + TypeNames, + type TypeRef, UnionType, - ClassProperty, - removeNullFromUnion, assertNever, - panic, - TypeBuilder, - TypeRef, - TypeNames, + derefTypeRef, + emptyTypeAttributes, makeNamesTypeAttributes, - namesTypeAttributeKind, messageAssert, - TypeAttributes, - emptyTypeAttributes, - StringTypes, - Input, - derefTypeRef, - RunContext + namesTypeAttributeKind, + panic, + removeNullFromUnion } from "quicktype-core"; -import { TypeKind, GraphQLSchema } from "./GraphQLSchema"; +import { type GraphQLSchema, TypeKind } from "./GraphQLSchema"; interface GQLType { - kind: TypeKind; - name?: string; description?: string; - ofType?: GQLType; + enumValues?: EnumValue[]; fields?: Field[]; + inputFields?: InputValue[]; interfaces?: GQLType[]; + kind: TypeKind; + name?: string; + ofType?: GQLType; possibleTypes?: GQLType[]; - inputFields?: InputValue[]; - enumValues?: EnumValue[]; } interface EnumValue { - name: string; description?: string; + name: string; } interface Field { - name: string; + args: InputValue[]; description?: string; + name: string; type: GQLType; - args: InputValue[]; } interface InputValue { - name: string; + defaultValue?: string; description?: string; + name: string; type: GQLType; - defaultValue?: string; } function getField(t: GQLType, name: string): Field { @@ -70,6 +69,7 @@ function getField(t: GQLType, name: string): Field { return f; } } + return panic(`Required field ${name} not defined on type ${t.name}.`); } @@ -93,6 +93,7 @@ function makeNullable( if (!(t instanceof UnionType)) { return builder.getUnionType(typeNames, new Set([tref, builder.getPrimitiveType("null")])); } + const [maybeNull, nonNulls] = removeNullFromUnion(t); if (maybeNull) return tref; return builder.getUnionType(typeNames, setMap(nonNulls, nn => nn.typeRef).add(builder.getPrimitiveType("null"))); @@ -109,6 +110,7 @@ function removeNull(builder: TypeBuilder, tref: TypeRef): TypeRef { if (!(t instanceof UnionType)) { return tref; } + const nonNulls = removeNullFromUnion(t)[1]; const first = iterableFirst(nonNulls); if (first) { @@ -118,6 +120,7 @@ function removeNull(builder: TypeBuilder, tref: TypeRef): TypeRef { setMap(nonNulls, nn => nn.typeRef) ); } + return panic("Trying to remove null results in empty union."); } @@ -141,13 +144,14 @@ function hasOptionalDirectives(directives?: DirectiveNode[]): boolean { const name = d.name.value; if (name === "include" || name === "skip") return true; } + return false; } interface Selection { - selection: SelectionNode; inType: GQLType; optional: boolean; + selection: SelectionNode; } function expandSelectionSet(selectionSet: SelectionSetNode, inType: GQLType, optional: boolean): Selection[] { @@ -157,18 +161,19 @@ function expandSelectionSet(selectionSet: SelectionSetNode, inType: GQLType, opt } interface GQLSchema { - readonly types: { [name: string]: GQLType }; - readonly queryType: GQLType; readonly mutationType?: GQLType; + readonly queryType: GQLType; + readonly types: { [name: string]: GQLType }; } class GQLQuery { private readonly _schema: GQLSchema; + private readonly _fragments: { [name: string]: FragmentDefinitionNode }; - readonly queries: ReadonlyArray; + public readonly queries: readonly OperationDefinitionNode[]; - constructor(schema: GQLSchema, queryString: string) { + public constructor(schema: GQLSchema, queryString: string) { this._schema = schema; this._fragments = {}; @@ -183,11 +188,12 @@ class GQLQuery { this._fragments[def.name.value] = def; } } + messageAssert(queries.length >= 1, "GraphQLNoQueriesDefined", {}); this.queries = queries; } - private makeIRTypeFromFieldNode = ( + private readonly makeIRTypeFromFieldNode = ( builder: TypeBuilder, fieldNode: FieldNode, fieldType: GQLType, @@ -206,6 +212,7 @@ class GQLQuery { if (!fieldNode.selectionSet) { return panic("No selection set on object or interface"); } + return makeNullable( builder, this.makeIRTypeFromSelectionSet( @@ -223,6 +230,7 @@ class GQLQuery { if (!fieldType.enumValues) { return panic("Enum type doesn't have values"); } + const values = fieldType.enumValues.map(ev => ev.name); let name: string; let fieldName: string | null; @@ -233,6 +241,7 @@ class GQLQuery { name = fieldNode.name.value; fieldName = null; } + optional = true; result = builder.getEnumType(makeNames(name, fieldName, containingTypeName), new Set(values)); break; @@ -243,6 +252,7 @@ class GQLQuery { if (!fieldType.ofType) { return panic("No type for list"); } + optional = true; result = builder.getArrayType( emptyTypeAttributes, @@ -253,6 +263,7 @@ class GQLQuery { if (!fieldType.ofType) { return panic("No type for non-null"); } + result = removeNull( builder, this.makeIRTypeFromFieldNode(builder, fieldNode, fieldType.ofType, containingTypeName) @@ -261,19 +272,21 @@ class GQLQuery { default: return assertNever(fieldType.kind); } + if (optional) { result = makeNullable(builder, result, fieldNode.name.value, null, containingTypeName); } + return result; }; - private getFragment = (name: string): FragmentDefinitionNode => { + private readonly getFragment = (name: string): FragmentDefinitionNode => { const fragment = this._fragments[name]; if (!fragment) return panic(`Fragment ${name} is not defined.`); return fragment; }; - private makeIRTypeFromSelectionSet = ( + private readonly makeIRTypeFromSelectionSet = ( builder: TypeBuilder, selectionSet: SelectionSetNode, gqlType: GQLType, @@ -288,10 +301,12 @@ class GQLQuery { ) { return panic("Type for selection set is not object, interface, or union."); } + if (!gqlType.name) { return panic("Object, interface, or union type doesn't have a name."); } - const nameOrOverride = overrideName || gqlType.name; + + const nameOrOverride = overrideName ?? gqlType.name; const properties = new Map(); let selections = expandSelectionSet(selectionSet, gqlType, false); for (;;) { @@ -314,6 +329,7 @@ class GQLQuery { selections = selections.concat(expanded); break; } + case "InlineFragment": { // FIXME: support type conditions with discriminated unions const fragmentType = selection.typeCondition @@ -325,14 +341,16 @@ class GQLQuery { selections = selections.concat(expanded); break; } + default: assertNever(selection); } } + return builder.getClassType(makeNames(nameOrOverride, containingFieldName, containingTypeName), properties); }; - makeType(builder: TypeBuilder, query: OperationDefinitionNode, queryName: string): TypeRef { + public makeType(builder: TypeBuilder, query: OperationDefinitionNode, queryName: string): TypeRef { if (query.operation === "query") { return this.makeIRTypeFromSelectionSet( builder, @@ -364,13 +382,14 @@ class GQLQuery { } class GQLSchemaFromJSON implements GQLSchema { - readonly types: { [name: string]: GQLType } = {}; - // @ts-ignore: The constructor can return early, but only by throwing. - readonly queryType: GQLType; - // @ts-ignore: The constructor can return early, but only by throwing. - readonly mutationType?: GQLType; + public readonly types: { [name: string]: GQLType } = {}; + + // @ts-expect-error: The constructor can return early, but only by throwing. + public readonly queryType: GQLType; + + public readonly mutationType?: GQLType; - constructor(json: any) { + public constructor(json: { data: GraphQLSchema }) { const schema: GraphQLSchema = json.data; if (schema.__schema.queryType.name === null) { @@ -381,6 +400,7 @@ class GQLSchemaFromJSON implements GQLSchema { if (!t.name) return panic("No top-level type name given"); this.types[t.name] = { kind: t.kind, name: t.name, description: t.description }; } + for (const t of schema.__schema.types) { if (!t.name) return panic("This cannot happen"); const type = this.types[t.name]; @@ -392,6 +412,7 @@ class GQLSchemaFromJSON implements GQLSchema { if (queryType === undefined) { return panic("Query type not found."); } + // console.log(`query type ${queryType.name} is ${queryType.kind}`); this.queryType = queryType; @@ -411,7 +432,7 @@ class GQLSchemaFromJSON implements GQLSchema { this.mutationType = mutationType; } - private addTypeFields = (target: GQLType, source: GQLType): void => { + private readonly addTypeFields = (target: GQLType, source: GQLType): void => { if (source.fields) { target.fields = source.fields.map(f => { return { @@ -423,18 +444,22 @@ class GQLSchemaFromJSON implements GQLSchema { }); // console.log(`${target.name} has ${target.fields.length} fields`); } + if (source.interfaces) { target.interfaces = source.interfaces.map(this.makeType); // console.log(`${target.name} has ${target.interfaces.length} interfaces`); } + if (source.possibleTypes) { target.possibleTypes = source.possibleTypes.map(this.makeType); // console.log(`${target.name} has ${target.possibleTypes.length} possibleTypes`); } + if (source.inputFields) { target.inputFields = source.inputFields.map(this.makeInputValue); // console.log(`${target.name} has ${target.inputFields.length} inputFields`); } + if (source.enumValues) { target.enumValues = source.enumValues.map(ev => { return { name: ev.name, description: ev.description }; @@ -443,7 +468,7 @@ class GQLSchemaFromJSON implements GQLSchema { } }; - private makeInputValue = (iv: InputValue): InputValue => { + private readonly makeInputValue = (iv: InputValue): InputValue => { return { name: iv.name, description: iv.description, @@ -452,12 +477,13 @@ class GQLSchemaFromJSON implements GQLSchema { }; }; - private makeType = (t: GQLType): GQLType => { + private readonly makeType = (t: GQLType): GQLType => { if (t.name) { const namedType = this.types[t.name]; if (!namedType) return panic(`Type ${t.name} not found`); return namedType; } + if (!t.ofType) return panic(`Type of kind ${t.kind} has neither name nor ofType`); const type: GQLType = { kind: t.kind, @@ -472,7 +498,7 @@ class GQLSchemaFromJSON implements GQLSchema { function makeGraphQLQueryTypes( topLevelName: string, builder: TypeBuilder, - json: any, + json: { data: GraphQLSchema }, queryString: string ): Map { const schema = new GQLSchemaFromJSON(json); @@ -483,6 +509,7 @@ function makeGraphQLQueryTypes( if (types.has(queryName)) { return panic(`Duplicate query name ${queryName}`); } + const dataType = query.makeType(builder, odn, queryName); const dataOrNullType = builder.getUnionType( emptyTypeAttributes, @@ -512,40 +539,52 @@ function makeGraphQLQueryTypes( ); types.set(queryName, t); } + return types; } -export type GraphQLSourceData = { name: string; schema: any; query: string }; +export interface GraphQLSourceData { + name: string; + query: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + schema: any; +} -type GraphQLTopLevel = { schema: any; query: string }; +interface GraphQLTopLevel { + query: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + schema: any; +} export class GraphQLInput implements Input { - readonly kind: string = "graphql"; - readonly needIR: boolean = true; - readonly needSchemaProcessing: boolean = false; + public readonly kind: string = "graphql"; + + public readonly needIR: boolean = true; + + public readonly needSchemaProcessing: boolean = false; private readonly _topLevels: Map = new Map(); - async addSource(source: GraphQLSourceData): Promise { + public async addSource(source: GraphQLSourceData): Promise { this.addSourceSync(source); } - addSourceSync(source: GraphQLSourceData): void { + public addSourceSync(source: GraphQLSourceData): void { this._topLevels.set(source.name, { schema: source.schema, query: source.query }); } - singleStringSchemaSource(): undefined { + public singleStringSchemaSource(): undefined { return undefined; } - async addTypes(ctx: RunContext, typeBuilder: TypeBuilder): Promise { - return this.addTypesSync(ctx, typeBuilder); + public async addTypes(ctx: RunContext, typeBuilder: TypeBuilder): Promise { + this.addTypesSync(ctx, typeBuilder); } - addTypesSync(_ctx: RunContext, typeBuilder: TypeBuilder): void { + public addTypesSync(_ctx: RunContext, typeBuilder: TypeBuilder): void { for (const [name, { schema, query }] of this._topLevels) { const newTopLevels = makeGraphQLQueryTypes(name, typeBuilder, schema, query); for (const [actualName, t] of newTopLevels) { diff --git a/packages/quicktype-typescript-input/src/index.ts b/packages/quicktype-typescript-input/src/index.ts index 6115ef585..3289e914b 100644 --- a/packages/quicktype-typescript-input/src/index.ts +++ b/packages/quicktype-typescript-input/src/index.ts @@ -1,7 +1,6 @@ +import { type PartialArgs, generateSchema } from "@mark.probst/typescript-json-schema"; +import { type JSONSchemaSourceData, defined, messageError } from "quicktype-core"; import * as ts from "typescript"; -import { PartialArgs, generateSchema } from "@mark.probst/typescript-json-schema"; - -import { defined, JSONSchemaSourceData, messageError } from "quicktype-core"; const settings: PartialArgs = { required: true, @@ -35,13 +34,13 @@ export function schemaForTypeScriptSources(sourceFileNames: string[]): JSONSchem const schema = generateSchema(program, "*", settings); const uris: string[] = []; - let topLevelName: string = ""; + let topLevelName = ""; // if there is a type that is `export default`, swap the corresponding ref if (schema?.definitions?.default) { const defaultDefinition = schema?.definitions?.default; const matchingDefaultName = Object.entries(schema?.definitions ?? {}).find( - ([_name, definition]) => (definition as Record)["$ref"] === "#/definitions/default" + ([_name, definition]) => (definition as Record).$ref === "#/definitions/default" )?.[0]; if (matchingDefaultName) { @@ -66,7 +65,7 @@ export function schemaForTypeScriptSources(sourceFileNames: string[]): JSONSchem } const description = definition.description as string; - const matches = description.match(/#TopLevel/); + const matches = /#TopLevel/.exec(description); if (matches === null) { continue; } @@ -85,6 +84,7 @@ export function schemaForTypeScriptSources(sourceFileNames: string[]): JSONSchem } } } + if (uris.length === 0) { uris.push("#/definitions/"); } diff --git a/packages/quicktype-vscode/src/extension.ts b/packages/quicktype-vscode/src/extension.ts index 3c62a47d2..3e8083721 100644 --- a/packages/quicktype-vscode/src/extension.ts +++ b/packages/quicktype-vscode/src/extension.ts @@ -2,22 +2,22 @@ import * as path from "path"; -import * as vscode from "vscode"; -import { Range } from "vscode"; import { - quicktype, - languageNamed, - SerializedRenderResult, - defaultTargetLanguages, - JSONSchemaInput, InputData, - TargetLanguage, + JSONSchemaInput, + type Options, + type RendererOptions, + type SerializedRenderResult, + type TargetLanguage, + defaultTargetLanguages, + inferenceFlagNames, jsonInputForTargetLanguage, - RendererOptions, - Options, - inferenceFlagNames + languageNamed, + quicktype } from "quicktype-core"; import { schemaForTypeScriptSources } from "quicktype-typescript-input"; +// eslint-disable-next-line import/no-unresolved +import * as vscode from "vscode"; const configurationSection = "quicktype"; @@ -33,12 +33,13 @@ enum Command { ChangeTargetLanguage = "quicktype.changeTargetLanguage" } -function jsonIsValid(json: string) { +function jsonIsValid(json: string): boolean { try { JSON.parse(json); } catch (e) { return false; } + return true; } @@ -49,14 +50,15 @@ async function promptTopLevelName(): Promise<{ cancelled: boolean; name: string return { cancelled: topLevelName === undefined, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing name: topLevelName || "TopLevel" }; } -type TargetLanguagePick = { +interface TargetLanguagePick { cancelled: boolean; lang: TargetLanguage; -}; +} async function pickTargetLanguage(): Promise { const languageChoices = defaultTargetLanguages.map(l => l.displayName).sort(); @@ -65,7 +67,9 @@ async function pickTargetLanguage(): Promise { if (chosenName === undefined) { chosenName = "typescript"; } - return { cancelled, lang: languageNamed(chosenName)! }; + + // @ts-expect-error languageNamed is not strongly typed yet + return { cancelled, lang: languageNamed(chosenName) }; } async function getTargetLanguage(editor: vscode.TextEditor): Promise { @@ -77,6 +81,7 @@ async function getTargetLanguage(editor: vscode.TextEditor): Promise { let indentation: string; if (editor.options.insertSpaces) { const tabSize = editor.options.tabSize as number; @@ -167,13 +172,11 @@ async function pasteAsTypes(editor: vscode.TextEditor, kind: InputKind, justType try { content = await vscode.env.clipboard.readText(); } catch (e) { - vscode.window.showErrorMessage("Could not get clipboard contents"); - return; + return await vscode.window.showErrorMessage("Could not get clipboard contents"); } if (kind !== "typescript" && !jsonIsValid(content)) { - vscode.window.showErrorMessage("Clipboard does not contain valid JSON."); - return; + return await vscode.window.showErrorMessage("Clipboard does not contain valid JSON."); } let topLevelName: string; @@ -184,46 +187,55 @@ async function pasteAsTypes(editor: vscode.TextEditor, kind: InputKind, justType if (tln.cancelled) { return; } + topLevelName = tln.name; } let result: SerializedRenderResult; try { result = await runQuicktype(content, kind, language.lang, topLevelName, justTypes, indentation); - } catch (e: any) { + } catch (e) { // TODO Invalid JSON produces an uncatchable exception from quicktype // Fix this so we can catch and show an error message. - vscode.window.showErrorMessage(e); - return; + if (typeof e === "string") { + return await vscode.window.showErrorMessage(e); + } } + // @ts-expect-error FIXME: resolve this after above ^ const text = result.lines.join("\n"); const selection = editor.selection; - editor.edit(builder => { + return await editor.edit(builder => { if (selection.isEmpty) { builder.insert(selection.start, text); } else { - builder.replace(new Range(selection.start, selection.end), text); + builder.replace(new vscode.Range(selection.start, selection.end), text); } }); } class CodeProvider implements vscode.TextDocumentContentProvider { - readonly scheme: string = "quicktype"; - readonly uri: vscode.Uri; + public readonly scheme: string = "quicktype"; + + public readonly uri: vscode.Uri; private _documentText: string = "{}"; + private _targetCode = ""; private readonly _onDidChange = new vscode.EventEmitter(); + private readonly _changeSubscription: vscode.Disposable; + private readonly _onDidChangeVisibleTextEditors: vscode.Disposable; + private readonly _onDidChangeConfiguration: vscode.Disposable; private _isOpen = false; + private _timer: NodeJS.Timeout | undefined = undefined; - constructor( + public constructor( private _inputKind: InputKind, private readonly _targetLanguage: TargetLanguage, private _document: vscode.TextDocument @@ -241,50 +253,51 @@ class CodeProvider implements vscode.TextDocumentContentProvider { ); } - dispose(): void { + public dispose(): void { this._onDidChange.dispose(); this._changeSubscription.dispose(); this._onDidChangeVisibleTextEditors.dispose(); this._onDidChangeConfiguration.dispose(); } - get inputKind(): InputKind { + public get inputKind(): InputKind { return this._inputKind; } - setInputKind(inputKind: InputKind): void { + public setInputKind(inputKind: InputKind): void { this._inputKind = inputKind; } - get document(): vscode.TextDocument { + public get document(): vscode.TextDocument { return this._document; } - get documentName(): string { + public get documentName(): string { const basename = path.basename(this.document.fileName); const extIndex = basename.lastIndexOf("."); return extIndex === -1 ? basename : basename.substring(0, extIndex); } - setDocument(document: vscode.TextDocument): void { + public setDocument(document: vscode.TextDocument): void { this._document = document; } - get onDidChange(): vscode.Event { + public get onDidChange(): vscode.Event { return this._onDidChange.event; } - private visibleTextEditorsDidChange(editors: vscode.TextEditor[]) { + private visibleTextEditorsDidChange(editors: vscode.TextEditor[]): void { const isOpen = editors.some(e => e.document.uri.scheme === this.scheme); if (!this._isOpen && isOpen) { - this.update(); + void this.update(); } + this._isOpen = isOpen; } private configurationDidChange(ev: vscode.ConfigurationChangeEvent): void { if (ev.affectsConfiguration(configurationSection)) { - this.update(); + void this.update(); } } @@ -296,13 +309,14 @@ class CodeProvider implements vscode.TextDocumentContentProvider { if (this._timer) { clearTimeout(this._timer); } + this._timer = setTimeout(() => { this._timer = undefined; - this.update(); + void this.update(); }, 300); } - async update(): Promise { + public async update(): Promise { this._documentText = this._document.getText(); try { @@ -319,10 +333,15 @@ class CodeProvider implements vscode.TextDocumentContentProvider { if (!this._isOpen) return; this._onDidChange.fire(this.uri); - } catch (e) {} + } catch (e) { + // FIXME + } } - provideTextDocumentContent(_uri: vscode.Uri, _token: vscode.CancellationToken): vscode.ProviderResult { + public provideTextDocumentContent( + _uri: vscode.Uri, + _token: vscode.CancellationToken + ): vscode.ProviderResult { this._isOpen = true; return this._targetCode; @@ -338,15 +357,19 @@ function deduceTargetLanguage(): TargetLanguage { if (count === undefined) { count = 0; } + count += 1; counts.set(name, count); } + const sorted = Array.from(counts).sort(([_na, ca], [_nb, cb]) => cb - ca); for (const [name] of sorted) { const lang = languageNamed(name); if (lang !== undefined) return lang; } - return languageNamed("typescript")!; + + // @ts-expect-error languageNamed is not yet strongly typed + return languageNamed("typescript"); } const lastTargetLanguageUsedKey = "lastTargetLanguageUsed"; @@ -362,7 +385,7 @@ async function openQuicktype( inputKind: InputKind, targetLanguage: TargetLanguage, document: vscode.TextDocument -): Promise { +): Promise { let codeProvider = codeProviders.get(targetLanguage.name); if (codeProvider === undefined) { codeProvider = new CodeProvider(inputKind, targetLanguage, document); @@ -379,15 +402,16 @@ async function openQuicktype( let originalEditor: vscode.TextEditor | undefined; if (lastCodeProvider !== undefined) { - const doc = lastCodeProvider.document; - originalEditor = vscode.window.visibleTextEditors.find(e => e.document === doc); + const lastDoc = lastCodeProvider.document; + originalEditor = vscode.window.visibleTextEditors.find(e => e.document === lastDoc); } + if (originalEditor === undefined) { originalEditor = vscode.window.activeTextEditor; } let column: number; - if (originalEditor !== undefined && originalEditor.viewColumn !== undefined) { + if (originalEditor?.viewColumn !== undefined) { column = originalEditor.viewColumn + 1; } else { column = 0; @@ -395,14 +419,13 @@ async function openQuicktype( lastCodeProvider = codeProvider; - codeProvider.update(); + await codeProvider.update(); const doc = await vscode.workspace.openTextDocument(codeProvider.uri); - vscode.window.showTextDocument(doc, column, true); + return await vscode.window.showTextDocument(doc, column, true); } async function openForEditor(editor: vscode.TextEditor, inputKind: InputKind): Promise { - const targetLanguage = - explicitlySetTargetLanguage !== undefined ? explicitlySetTargetLanguage : deduceTargetLanguage(); + const targetLanguage = explicitlySetTargetLanguage ?? deduceTargetLanguage(); await openQuicktype(inputKind, targetLanguage, editor.document); } @@ -422,29 +445,37 @@ export async function activate(context: vscode.ExtensionContext): Promise extensionContext = context; context.subscriptions.push( - vscode.commands.registerTextEditorCommand(Command.PasteJSONAsTypes, editor => - pasteAsTypes(editor, "json", true) + vscode.commands.registerTextEditorCommand( + Command.PasteJSONAsTypes, + async editor => await pasteAsTypes(editor, "json", true) ), - vscode.commands.registerTextEditorCommand(Command.PasteJSONAsTypesAndSerialization, editor => - pasteAsTypes(editor, "json", false) + vscode.commands.registerTextEditorCommand( + Command.PasteJSONAsTypesAndSerialization, + async editor => await pasteAsTypes(editor, "json", false) ), - vscode.commands.registerTextEditorCommand(Command.PasteSchemaAsTypes, editor => - pasteAsTypes(editor, "schema", true) + vscode.commands.registerTextEditorCommand( + Command.PasteSchemaAsTypes, + async editor => await pasteAsTypes(editor, "schema", true) ), - vscode.commands.registerTextEditorCommand(Command.PasteSchemaAsTypesAndSerialization, editor => - pasteAsTypes(editor, "schema", false) + vscode.commands.registerTextEditorCommand( + Command.PasteSchemaAsTypesAndSerialization, + async editor => await pasteAsTypes(editor, "schema", false) ), - vscode.commands.registerTextEditorCommand(Command.PasteTypeScriptAsTypesAndSerialization, editor => - pasteAsTypes(editor, "typescript", false) + vscode.commands.registerTextEditorCommand( + Command.PasteTypeScriptAsTypesAndSerialization, + async editor => await pasteAsTypes(editor, "typescript", false) ), - vscode.commands.registerTextEditorCommand(Command.OpenQuicktypeForJSON, editor => - openForEditor(editor, "json") + vscode.commands.registerTextEditorCommand( + Command.OpenQuicktypeForJSON, + async editor => await openForEditor(editor, "json") ), - vscode.commands.registerTextEditorCommand(Command.OpenQuicktypeForJSONSchema, editor => - openForEditor(editor, "schema") + vscode.commands.registerTextEditorCommand( + Command.OpenQuicktypeForJSONSchema, + async editor => await openForEditor(editor, "schema") ), - vscode.commands.registerTextEditorCommand(Command.OpenQuicktypeForTypeScript, editor => - openForEditor(editor, "typescript") + vscode.commands.registerTextEditorCommand( + Command.OpenQuicktypeForTypeScript, + async editor => await openForEditor(editor, "typescript") ), vscode.commands.registerCommand(Command.ChangeTargetLanguage, changeTargetLanguage) ); diff --git a/src/CompressedJSONFromStream.ts b/src/CompressedJSONFromStream.ts index 84c6ffe6f..16a9c78b0 100644 --- a/src/CompressedJSONFromStream.ts +++ b/src/CompressedJSONFromStream.ts @@ -1,7 +1,8 @@ -import { Readable } from "readable-stream"; -import { CompressedJSON, Value } from "quicktype-core"; +import { type Readable } from "readable-stream"; import { Parser } from "stream-json"; +import { CompressedJSON, type Value } from "quicktype-core"; + const methodMap: { [name: string]: string } = { startObject: "pushObjectContext", endObject: "finishObject", @@ -18,25 +19,26 @@ const methodMap: { [name: string]: string } = { }; export class CompressedJSONFromStream extends CompressedJSON { - async parse(readStream: Readable): Promise { + public async parse(readStream: Readable): Promise { const combo = new Parser({ packKeys: true, packStrings: true }); combo.on("data", (item: { name: string; value: string | undefined }) => { if (typeof methodMap[item.name] === "string") { - (this as any)[methodMap[item.name]](item.value); + // @ts-expect-error FIXME: strongly type this + this[methodMap[item.name]](item.value); } }); const promise = new Promise((resolve, reject) => { combo.on("end", () => { resolve(this.finish()); }); - combo.on("error", (err: any) => { + combo.on("error", (err: unknown) => { reject(err); }); }); readStream.setEncoding("utf8"); readStream.pipe(combo); readStream.resume(); - return promise; + return await promise; } protected handleStartNumber = (): void => { @@ -46,7 +48,7 @@ export class CompressedJSONFromStream extends CompressedJSON { protected handleNumberChunk = (s: string): void => { const ctx = this.context; - if (!ctx.currentNumberIsDouble && /[\.e]/i.test(s)) { + if (!ctx.currentNumberIsDouble && /[.e]/i.test(s)) { ctx.currentNumberIsDouble = true; } }; diff --git a/src/GraphQLIntrospection.ts b/src/GraphQLIntrospection.ts index 71106b1df..840cf3c5a 100644 --- a/src/GraphQLIntrospection.ts +++ b/src/GraphQLIntrospection.ts @@ -1,8 +1,8 @@ -import { panic } from "quicktype-core"; -import { introspectionQuery } from "graphql"; import { exceptionToString } from "@glideapps/ts-necessities"; - import fetch from "cross-fetch"; +import { introspectionQuery } from "graphql"; + +import { panic } from "quicktype-core"; // https://github.com/apollographql/apollo-codegen/blob/master/src/downloadSchema.ts const defaultHeaders: { [name: string]: string } = { @@ -18,11 +18,13 @@ export async function introspectServer(url: string, method: string, headerString for (const name of Object.getOwnPropertyNames(defaultHeaders)) { headers[name] = defaultHeaders[name]; } + for (const str of headerStrings) { - const matches = str.match(headerRegExp); + const matches = headerRegExp.exec(str); if (matches === null) { return panic(`Not a valid HTTP header: "${str}"`); } + headers[matches[1]] = matches[2]; } diff --git a/src/TypeSource.ts b/src/TypeSource.ts index cc693c4c9..1c58e2e73 100644 --- a/src/TypeSource.ts +++ b/src/TypeSource.ts @@ -1,7 +1,7 @@ -import { Readable } from "readable-stream"; +import { type Readable } from "readable-stream"; -import { JSONSourceData, JSONSchemaSourceData } from "quicktype-core"; -import { GraphQLSourceData } from "quicktype-graphql-input"; +import { type JSONSchemaSourceData, type JSONSourceData } from "quicktype-core"; +import { type GraphQLSourceData } from "quicktype-graphql-input"; export interface JSONTypeSource extends JSONSourceData { kind: "json"; diff --git a/src/URLGrammar.ts b/src/URLGrammar.ts index 5280846f0..3eaaaa1ca 100644 --- a/src/URLGrammar.ts +++ b/src/URLGrammar.ts @@ -1,9 +1,10 @@ -import { panic, checkStringMap, checkArray } from "quicktype-core"; +import { checkArray, checkStringMap, panic } from "quicktype-core"; -function expand(json: any): string[] { +function expand(json: unknown): string[] { if (typeof json === "string") { return [json]; } + if (Array.isArray(json)) { let result: string[] = [""]; for (const j of json) { @@ -14,11 +15,14 @@ function expand(json: any): string[] { appended.push(a + b); } } + result = appended; } + return result; } - if (Object.prototype.hasOwnProperty.call(json, "oneOf")) { + + if (typeof json === "object" && json && "oneOf" in json) { const options = checkArray(json.oneOf); const result: string[] = []; for (const j of options) { @@ -26,12 +30,14 @@ function expand(json: any): string[] { result.push(x); } } + return result; } + return panic(`Value is not a valid URL grammar: ${json}`); } -export function urlsFromURLGrammar(json: any): { [name: string]: string[] } { +export function urlsFromURLGrammar(json: unknown): { [name: string]: string[] } { const topLevelMap = checkStringMap(json); const results: { [name: string]: string[] } = {}; diff --git a/src/index.ts b/src/index.ts index 109161c79..fe252a087 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,89 +1,92 @@ #!/usr/bin/env node import * as fs from "fs"; import * as path from "path"; -import * as _ from "lodash"; -import { Readable } from "readable-stream"; -import { hasOwnProperty, definedMap, withDefault, mapFromObject, mapMap } from "collection-utils"; + import { exceptionToString } from "@glideapps/ts-necessities"; +import chalk from "chalk"; +// eslint-disable-next-line @typescript-eslint/no-redeclare +import { definedMap, hasOwnProperty, mapFromObject, mapMap, withDefault } from "collection-utils"; +import commandLineArgs from "command-line-args"; +import getUsage from "command-line-usage"; +import * as _ from "lodash"; +import { type Readable } from "readable-stream"; +import stringToStream from "string-to-stream"; +import _wordwrap from "wordwrap"; import { - Options, - RendererOptions, - getTargetLanguage, - quicktypeMultiFile, - SerializedRenderResult, - TargetLanguage, - languageNamed, + FetchingJSONSchemaStore, InputData, - JSONSchemaInput, - OptionDefinition, - defaultTargetLanguages, IssueAnnotationData, - panic, + JSONInput, + JSONSchemaInput, + type JSONSourceData, + type OptionDefinition, + type Options, + type RendererOptions, + type SerializedRenderResult, + type TargetLanguage, assert, - defined, assertNever, - parseJSON, - trainMarkovChain, - messageError, - messageAssert, - sourcesFromPostmanCollection, - inferenceFlags, - inferenceFlagNames, - splitIntoWords, capitalize, - JSONSourceData, - JSONInput, + defaultTargetLanguages, + defined, getStream, - readableFromFileOrURL, + getTargetLanguage, + inferenceFlagNames, + inferenceFlags, + languageNamed, + messageAssert, + messageError, + panic, + parseJSON, + quicktypeMultiFile, readFromFileOrURL, - FetchingJSONSchemaStore + readableFromFileOrURL, + sourcesFromPostmanCollection, + splitIntoWords, + trainMarkovChain } from "quicktype-core"; -import { schemaForTypeScriptSources } from "quicktype-typescript-input"; import { GraphQLInput } from "quicktype-graphql-input"; +import { schemaForTypeScriptSources } from "quicktype-typescript-input"; -import { urlsFromURLGrammar } from "./URLGrammar"; -import { introspectServer } from "./GraphQLIntrospection"; -import { JSONTypeSource, TypeSource, GraphQLTypeSource, SchemaTypeSource } from "./TypeSource"; -import { CompressedJSONFromStream } from "./CompressedJSONFromStream"; - -const stringToStream = require("string-to-stream"); +import packageJSON from "../package.json"; -import commandLineArgs from "command-line-args"; -import getUsage from "command-line-usage"; -import chalk from "chalk"; -const wordWrap: (s: string) => string = require("wordwrap")(90); +import { CompressedJSONFromStream } from "./CompressedJSONFromStream"; +import { introspectServer } from "./GraphQLIntrospection"; +import { type GraphQLTypeSource, type JSONTypeSource, type SchemaTypeSource, type TypeSource } from "./TypeSource"; +import { urlsFromURLGrammar } from "./URLGrammar"; -const packageJSON = require("../package.json"); +const wordWrap: (s: string) => string = _wordwrap(90); export interface CLIOptions { - lang: string; - topLevel: string; - src: string[]; - srcUrls?: string; - srcLang: string; + // We use this to access the inference flags + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [option: string]: any; additionalSchema: string[]; - graphqlSchema?: string; + allPropertiesOptional: boolean; + alphabetizeProperties: boolean; + buildMarkovChain?: string; + debug?: string; graphqlIntrospect?: string; + graphqlSchema?: string; + help: boolean; httpHeader?: string[]; httpMethod?: string; - out?: string; - buildMarkovChain?: string; + lang: string; - alphabetizeProperties: boolean; - allPropertiesOptional: boolean; noRender: boolean; + out?: string; + quiet: boolean; rendererOptions: RendererOptions; - help: boolean; - quiet: boolean; - version: boolean; - debug?: string; + src: string[]; + srcLang: string; + srcUrls?: string; telemetry?: string; + topLevel: string; - // We use this to access the inference flags - [option: string]: any; + version: boolean; } const defaultDefaultTargetLanguageName = "go"; @@ -93,7 +96,7 @@ async function sourceFromFileOrUrlArray( filesOrUrls: string[], httpHeaders?: string[] ): Promise { - const samples = await Promise.all(filesOrUrls.map(file => readableFromFileOrURL(file, httpHeaders))); + const samples = await Promise.all(filesOrUrls.map(async file => await readableFromFileOrURL(file, httpHeaders))); return { kind: "json", name, samples }; } @@ -156,6 +159,7 @@ async function samplesFromDirectory(dataDir: string, httpHeaders?: string[]): Pr if (graphQLSchema === undefined) { return messageError("DriverNoGraphQLSchemaInDir", { dir: dataDir }); } + const schema = parseJSON(await getStream(graphQLSchema), "GraphQL schema", graphQLSchemaFileName); for (const source of graphQLSources) { source.schema = schema; @@ -196,7 +200,8 @@ async function samplesFromDirectory(dataDir: string, httpHeaders?: string[]): Pr return messageError("DriverCannotMixJSONWithOtherSamples", { dir: dir }); } - const oneUnlessEmpty = (xs: any[]) => Math.sign(xs.length); + // FIXME: rewrite this to be clearer + const oneUnlessEmpty = (xs: TypeSource[]): 0 | 1 => Math.sign(xs.length) as 0 | 1; if (oneUnlessEmpty(schemaSources) + oneUnlessEmpty(graphQLSources) > 1) { return messageError("DriverCannotMixNonJSONInputs", { dir: dir }); } @@ -208,6 +213,7 @@ async function samplesFromDirectory(dataDir: string, httpHeaders?: string[]): Pr samples: jsonSamples }); } + sources = sources.concat(schemaSources); sources = sources.concat(graphQLSources); } @@ -222,6 +228,7 @@ function inferLang(options: Partial, defaultLanguage: string): strin if (extension === "") { return messageError("DriverNoLanguageOrExtension", {}); } + return extension.slice(1); } @@ -263,30 +270,31 @@ function inferCLIOptions(opts: Partial, targetLanguage: TargetLangua if (targetLanguage !== undefined) { language = targetLanguage; } else { - const languageName = opts.lang !== undefined ? opts.lang : inferLang(opts, defaultDefaultTargetLanguageName); + const languageName = opts.lang ?? inferLang(opts, defaultDefaultTargetLanguageName); const maybeLanguage = languageNamed(languageName); if (maybeLanguage === undefined) { return messageError("DriverUnknownOutputLanguage", { lang: languageName }); } + language = maybeLanguage; } const options: CLIOptions = { - src: opts.src || [], + src: opts.src ?? [], srcUrls: opts.srcUrls, srcLang: srcLang, lang: language.displayName, - topLevel: opts.topLevel || inferTopLevel(opts), + topLevel: opts.topLevel ?? inferTopLevel(opts), noRender: !!opts.noRender, alphabetizeProperties: !!opts.alphabetizeProperties, allPropertiesOptional: !!opts.allPropertiesOptional, - rendererOptions: opts.rendererOptions || {}, - help: opts.help || false, - quiet: opts.quiet || false, - version: opts.version || false, + rendererOptions: opts.rendererOptions ?? {}, + help: opts.help ?? false, + quiet: opts.quiet ?? false, + version: opts.version ?? false, out: opts.out, buildMarkovChain: opts.buildMarkovChain, - additionalSchema: opts.additionalSchema || [], + additionalSchema: opts.additionalSchema ?? [], graphqlSchema: opts.graphqlSchema, graphqlIntrospect: opts.graphqlIntrospect, httpMethod: opts.httpMethod, @@ -298,6 +306,7 @@ function inferCLIOptions(opts: Partial, targetLanguage: TargetLangua const cliName = negatedInferenceFlagName(flagName); options[cliName] = !!opts[cliName]; } + return options; } @@ -311,6 +320,7 @@ function negatedInferenceFlagName(name: string): string { if (name.startsWith(prefix)) { name = name.slice(prefix.length); } + return "no" + capitalize(name); } @@ -326,7 +336,7 @@ function makeOptionDefinitions(targetLanguages: TargetLanguage[]): OptionDefinit name: "out", alias: "o", type: String, - typeLabel: `FILE`, + typeLabel: "FILE", description: "The output file. Determines --lang and --top-level." }, { @@ -473,8 +483,8 @@ function makeOptionDefinitions(targetLanguages: TargetLanguage[]): OptionDefinit interface ColumnDefinition { name: string; - width?: number; padding?: { left: string; right: string }; + width?: number; } interface TableOptions { @@ -482,11 +492,11 @@ interface TableOptions { } interface UsageSection { - header?: string; content?: string | string[]; + header?: string; + hide?: string[]; optionList?: OptionDefinition[]; tableOptions?: TableOptions; - hide?: string[]; } const tableOptionsForOptions: TableOptions = { @@ -574,6 +584,7 @@ export function parseCLIOptions(argv: string[], targetLanguage?: TargetLanguage) if (targetLanguage === undefined) { targetLanguage = getTargetLanguage(incompleteOptions.lang); } + const rendererOptionDefinitions = targetLanguage.cliOptionDefinitions.actual; // Use the global options as well as the renderer options from now on: const allOptionDefinitions = _.concat(optionDefinitions, rendererOptionDefinitions); @@ -585,6 +596,8 @@ export function parseCLIOptions(argv: string[], targetLanguage?: TargetLanguage) // according to each option definition's `renderer` field. If `partial` is false this // will throw if it encounters an unknown option. function parseOptions(definitions: OptionDefinition[], argv: string[], partial: boolean): Partial { + // FIXME: update this when options strongly typed + // eslint-disable-next-line @typescript-eslint/no-explicit-any let opts: { [key: string]: any }; try { opts = commandLineArgs(definitions, { argv, partial }); @@ -592,6 +605,7 @@ function parseOptions(definitions: OptionDefinition[], argv: string[], partial: assert(!partial, "Partial option parsing should not have failed"); return messageError("DriverCLIOptionParsingFailed", { message: exceptionToString(e) }); } + for (const k of Object.keys(opts)) { if (opts[k] === null) { return messageError("DriverCLIOptionParsingFailed", { @@ -600,7 +614,8 @@ function parseOptions(definitions: OptionDefinition[], argv: string[], partial: } } - const options: { rendererOptions: RendererOptions; [key: string]: any } = { rendererOptions: {} }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const options: { [key: string]: any; rendererOptions: RendererOptions } = { rendererOptions: {} }; for (const o of definitions) { if (!hasOwnProperty(opts, o.name)) continue; const v = opts[o.name] as string; @@ -610,10 +625,11 @@ function parseOptions(definitions: OptionDefinition[], argv: string[], partial: options[k] = v; } } + return options; } -function usage(targetLanguages: TargetLanguage[]) { +function usage(targetLanguages: TargetLanguage[]): void { const rendererSections: UsageSection[] = []; for (const language of targetLanguages) { @@ -633,7 +649,7 @@ function usage(targetLanguages: TargetLanguage[]) { } // Returns an array of [name, sourceURIs] pairs. -async function getSourceURIs(options: CLIOptions): Promise<[string, string[]][]> { +async function getSourceURIs(options: CLIOptions): Promise> { if (options.srcUrls !== undefined) { const json = parseJSON( await readFromFileOrURL(options.srcUrls, options.httpHeader), @@ -696,6 +712,7 @@ export function jsonInputForTargetLanguage( if (typeof targetLanguage === "string") { targetLanguage = defined(languageNamed(targetLanguage, languages)); } + const compressedJSON = new CompressedJSONFromStream(targetLanguage.dateTimeRecognizer, handleJSONRefs); return new JSONInput(compressedJSON); } @@ -703,7 +720,7 @@ export function jsonInputForTargetLanguage( async function makeInputData( sources: TypeSource[], targetLanguage: TargetLanguage, - additionalSchemaAddresses: ReadonlyArray, + additionalSchemaAddresses: readonly string[], handleJSONRefs: boolean, httpHeaders?: string[] ): Promise { @@ -735,7 +752,11 @@ async function makeInputData( } function stringSourceDataToStreamSourceData(src: JSONSourceData): JSONSourceData { - return { name: src.name, description: src.description, samples: src.samples.map(stringToStream) }; + return { + name: src.name, + description: src.description, + samples: src.samples.map(sample => stringToStream(sample) as Readable) + }; } export async function makeQuicktypeOptions( @@ -743,14 +764,16 @@ export async function makeQuicktypeOptions( targetLanguages?: TargetLanguage[] ): Promise | undefined> { if (options.help) { - usage(targetLanguages === undefined ? defaultTargetLanguages : targetLanguages); + usage(targetLanguages ?? defaultTargetLanguages); return undefined; } + if (options.version) { console.log(`quicktype version ${packageJSON.version}`); console.log("Visit quicktype.io for more info."); return undefined; } + if (options.buildMarkovChain !== undefined) { const contents = fs.readFileSync(options.buildMarkovChain).toString(); const lines = contents.split("\n"); @@ -777,20 +800,24 @@ export async function makeQuicktypeOptions( wroteSchemaToFile = true; } } + const numSources = options.src.length; if (numSources !== 1) { if (wroteSchemaToFile) { // We're done. return undefined; } + if (numSources === 0) { if (schemaString !== undefined) { console.log(schemaString); return undefined; } + return messageError("DriverNoGraphQLQueryGiven", {}); } } + const gqlSources: GraphQLTypeSource[] = []; for (const queryFile of options.src) { let schemaFileName: string | undefined = undefined; @@ -798,11 +825,13 @@ export async function makeQuicktypeOptions( schemaFileName = defined(options.graphqlSchema); schemaString = fs.readFileSync(schemaFileName, "utf8"); } + const schema = parseJSON(schemaString, "GraphQL schema", schemaFileName); const query = await getStream(await readableFromFileOrURL(queryFile, options.httpHeader)); const name = numSources === 1 ? options.topLevel : typeNameFromFilename(queryFile); gqlSources.push({ kind: "graphql", name, schema, query }); } + sources = gqlSources; break; case "json": @@ -824,20 +853,23 @@ export async function makeQuicktypeOptions( Object.assign({ kind: "json" }, stringSourceDataToStreamSourceData(src)) as JSONTypeSource ); } + if (postmanSources.length > 1) { fixedTopLevels = true; } + if (description !== undefined) { leadingComments = wordWrap(description).split("\n"); } } + break; default: return messageError("DriverUnknownSourceLanguage", { lang: options.srcLang }); } const components = definedMap(options.debug, d => d.split(",")); - const debugAll = components !== undefined && components.indexOf("all") >= 0; + const debugAll = components !== undefined && components.includes("all"); let debugPrintGraph = debugAll; let checkProvenance = debugAll; let debugPrintReconstitution = debugAll; @@ -925,14 +957,18 @@ export function writeOutput( if (!onFirst) { process.stdout.write("\n"); } + if (resultsByFilename.size > 1) { process.stdout.write(`// ${filename}\n\n`); } + process.stdout.write(output); } + if (cliOptions.quiet) { continue; } + for (const sa of annotations) { const annotation = sa.annotation; if (!(annotation instanceof IssueAnnotationData)) continue; @@ -946,7 +982,7 @@ export function writeOutput( } } -export async function main(args: string[] | Partial) { +export async function main(args: string[] | Partial): Promise { let cliOptions: CLIOptions; if (Array.isArray(args)) { cliOptions = parseCLIOptions(args); @@ -964,6 +1000,7 @@ export async function main(args: string[] | Partial) { console.error(chalk.red("telemetry must be 'enable' or 'disable'")); return; } + if (Array.isArray(args) && args.length === 2) { // This was merely a CLI run to set telemetry and we should not proceed return; @@ -985,6 +1022,7 @@ if (require.main === module) { } else { console.error(e); } + process.exit(1); }); } diff --git a/test/tsconfig.json b/test/tsconfig.json index 26618760c..a042b47f7 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -4,7 +4,8 @@ "strict": true, "alwaysStrict": true, "noUnusedLocals": true, - "noUnusedParameters": true + "noUnusedParameters": true, + "resolveJsonModule": true }, "include": ["*.ts", "../dist/*.js", "../dist/*.d.ts"] } diff --git a/tsconfig.json b/tsconfig.json index 60bab643b..4f1446d5e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,8 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "outDir": "dist", - "baseUrl": "src" + "baseUrl": "src", + "resolveJsonModule": true }, "include": ["src"] }