diff --git a/package-lock.json b/package-lock.json index 2761a965..60c24a65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1773,6 +1773,28 @@ "node": ">= 6" } }, + "node_modules/@ts-morph/common": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.12.3.tgz", + "integrity": "sha512-4tUmeLyXJnJWvTFOKtcNJ1yh0a3SsTLi2MUoyj8iUNznFRN1ZquaNe7Oukqrnki2FzZkm0J9adCNLDZxUzvj+w==", + "dependencies": { + "fast-glob": "^3.2.7", + "minimatch": "^3.0.4", + "mkdirp": "^1.0.4", + "path-browserify": "^1.0.1" + } + }, + "node_modules/@ts-morph/common/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -3134,6 +3156,14 @@ "node": ">=10" } }, + "node_modules/code-block-writer": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-11.0.0.tgz", + "integrity": "sha512-GEqWvEWWsOvER+g9keO4ohFoD3ymwyCnqY3hoTr7GZipYFwEhMHJw+TtV0rfgRhNImM6QWZGO2XYjlJVyYT62w==", + "dependencies": { + "tslib": "2.3.1" + } + }, "node_modules/code-error-fragment": { "version": "0.0.230", "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", @@ -9094,6 +9124,11 @@ "which": "bin/which" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -11201,6 +11236,15 @@ "node": ">=8" } }, + "node_modules/ts-morph": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-13.0.3.tgz", + "integrity": "sha512-pSOfUMx8Ld/WUreoSzvMFQG5i9uEiWIsBYjpU9+TTASOeUa89j5HykomeqVULm1oqWtBdleI3KEFRLrlA3zGIw==", + "dependencies": { + "@ts-morph/common": "~0.12.3", + "code-block-writer": "^11.0.0" + } + }, "node_modules/ts-node": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.5.0.tgz", @@ -11370,10 +11414,9 @@ } }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true, + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -12309,7 +12352,6 @@ "@readme/api-core": "file:../core", "@readme/openapi-parser": "^2.0.0", "find-cache-dir": "^3.3.1", - "formdata-node": "^4.3.2", "isomorphic-fetch": "^3.0.0", "js-yaml": "^4.1.0", "make-dir": "^3.1.0", @@ -12330,7 +12372,7 @@ "nock": "^13.2.4", "nyc": "^15.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.5", + "typescript": "^4.6.2", "unique-temp-dir": "^1.0.0" }, "engines": { @@ -12350,11 +12392,13 @@ "fetch-har": "^6.1.0", "js-yaml": "^4.1.0", "json-schema-to-typescript": "^10.1.5", - "oas": "^17.7.3" + "oas": "^17.7.3", + "ts-morph": "^13.0.3", + "typescript": "^4.6.2" }, "devDependencies": { "@oclif/test": "^2.1.0", - "@readme/eslint-config": "^8.4.1", + "@readme/eslint-config": "^8.4.4", "@readme/oas-examples": "^4.4.0", "@types/chai": "^4.3.0", "@types/js-yaml": "^4.0.5", @@ -12368,8 +12412,7 @@ "prettier": "^2.5.1", "shx": "^0.3.3", "ts-node": "^10.5.0", - "tslib": "^2.3.1", - "typescript": "^4.5.5" + "tslib": "^2.3.1" }, "engines": { "node": "^14 || ^16" @@ -12384,6 +12427,7 @@ "datauri": "^4.1.0", "fetch-har": "^6.1.0", "form-data-encoder": "^1.7.1", + "formdata-node": "^4.3.2", "get-stream": "^6.0.0", "isomorphic-fetch": "^3.0.0", "json-schema-traverse": "^1.0.0", @@ -12402,7 +12446,7 @@ "nock": "^13.2.4", "nyc": "^15.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" }, "engines": { "node": "^14 || ^16" @@ -13691,7 +13735,7 @@ "@oclif/plugin-plugins": "^2.0.1", "@oclif/test": "^2.1.0", "@readme/api-core": "file:../core", - "@readme/eslint-config": "^8.4.1", + "@readme/eslint-config": "^8.4.4", "@readme/oas-examples": "^4.4.0", "@readme/openapi-parser": "^2.0.2", "@types/chai": "^4.3.0", @@ -13709,9 +13753,10 @@ "oclif": "^2.4.4", "prettier": "^2.5.1", "shx": "^0.3.3", + "ts-morph": "^13.0.3", "ts-node": "^10.5.0", "tslib": "^2.3.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" } }, "@readme/api-core": { @@ -13728,6 +13773,7 @@ "eslint": "^8.10.0", "fetch-har": "^6.1.0", "form-data-encoder": "^1.7.1", + "formdata-node": "^4.3.2", "get-stream": "^6.0.0", "isomorphic-fetch": "^3.0.0", "json-schema-traverse": "^1.0.0", @@ -13737,7 +13783,7 @@ "nyc": "^15.1.0", "oas": "^17.7.3", "prettier": "^2.5.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" }, "dependencies": { "json-schema-traverse": { @@ -13911,6 +13957,24 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, + "@ts-morph/common": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.12.3.tgz", + "integrity": "sha512-4tUmeLyXJnJWvTFOKtcNJ1yh0a3SsTLi2MUoyj8iUNznFRN1ZquaNe7Oukqrnki2FzZkm0J9adCNLDZxUzvj+w==", + "requires": { + "fast-glob": "^3.2.7", + "minimatch": "^3.0.4", + "mkdirp": "^1.0.4", + "path-browserify": "^1.0.1" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + } + } + }, "@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -14293,7 +14357,6 @@ "datauri": "^4.1.0", "eslint": "^8.10.0", "find-cache-dir": "^3.3.1", - "formdata-node": "^4.3.2", "isomorphic-fetch": "^3.0.0", "js-yaml": "^4.1.0", "make-dir": "^3.1.0", @@ -14303,7 +14366,7 @@ "nyc": "^15.1.0", "oas": "^17.7.3", "prettier": "^2.5.1", - "typescript": "^4.5.5", + "typescript": "^4.6.2", "unique-temp-dir": "^1.0.0" } }, @@ -14953,6 +15016,14 @@ "mkdirp-infer-owner": "^2.0.0" } }, + "code-block-writer": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-11.0.0.tgz", + "integrity": "sha512-GEqWvEWWsOvER+g9keO4ohFoD3ymwyCnqY3hoTr7GZipYFwEhMHJw+TtV0rfgRhNImM6QWZGO2XYjlJVyYT62w==", + "requires": { + "tslib": "2.3.1" + } + }, "code-error-fragment": { "version": "0.0.230", "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", @@ -19462,6 +19533,11 @@ } } }, + "path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -21065,6 +21141,15 @@ "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true }, + "ts-morph": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-13.0.3.tgz", + "integrity": "sha512-pSOfUMx8Ld/WUreoSzvMFQG5i9uEiWIsBYjpU9+TTASOeUa89j5HykomeqVULm1oqWtBdleI3KEFRLrlA3zGIw==", + "requires": { + "@ts-morph/common": "~0.12.3", + "code-block-writer": "^11.0.0" + } + }, "ts-node": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.5.0.tgz", @@ -21189,10 +21274,9 @@ } }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==" }, "uid2": { "version": "0.0.3", diff --git a/packages/api/package-lock.json b/packages/api/package-lock.json index 8ffac15e..65b8b12b 100644 --- a/packages/api/package-lock.json +++ b/packages/api/package-lock.json @@ -12,7 +12,6 @@ "@readme/api-core": "file:../core", "@readme/openapi-parser": "^2.0.0", "find-cache-dir": "^3.3.1", - "formdata-node": "^4.3.2", "isomorphic-fetch": "^3.0.0", "js-yaml": "^4.1.0", "make-dir": "^3.1.0", @@ -33,7 +32,7 @@ "nock": "^13.2.4", "nyc": "^15.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.5", + "typescript": "^4.6.2", "unique-temp-dir": "^1.0.0" }, "engines": { @@ -49,6 +48,7 @@ "datauri": "^4.1.0", "fetch-har": "^6.1.0", "form-data-encoder": "^1.7.1", + "formdata-node": "^4.3.2", "get-stream": "^6.0.0", "isomorphic-fetch": "^3.0.0", "json-schema-traverse": "^1.0.0", @@ -67,7 +67,7 @@ "nock": "^13.2.4", "nyc": "^15.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" }, "engines": { "node": "^14 || ^16" @@ -3625,18 +3625,6 @@ "node": ">=8.0.0" } }, - "node_modules/formdata-node": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.3.2.tgz", - "integrity": "sha512-k7lYJyzDOSL6h917favP8j1L0/wNyylzU+x+1w4p5haGVHNlP58dbpdJhiCUsDbWsa9HwEtLp89obQgXl2e0qg==", - "dependencies": { - "node-domexception": "1.0.0", - "web-streams-polyfill": "4.0.0-beta.1" - }, - "engines": { - "node": ">= 12.20" - } - }, "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -5318,24 +5306,6 @@ "node": ">= 10.13" } }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -7184,9 +7154,9 @@ } }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -7309,14 +7279,6 @@ "defaults": "^1.0.3" } }, - "node_modules/web-streams-polyfill": { - "version": "4.0.0-beta.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.1.tgz", - "integrity": "sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ==", - "engines": { - "node": ">= 12" - } - }, "node_modules/whatwg-fetch": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", @@ -7979,6 +7941,7 @@ "eslint": "^8.10.0", "fetch-har": "^6.1.0", "form-data-encoder": "^1.7.1", + "formdata-node": "^4.3.2", "get-stream": "^6.0.0", "isomorphic-fetch": "^3.0.0", "json-schema-traverse": "^1.0.0", @@ -7988,7 +7951,7 @@ "nyc": "^15.1.0", "oas": "^17.7.3", "prettier": "^2.5.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" } }, "@readme/better-ajv-errors": { @@ -10159,15 +10122,6 @@ "signal-exit": "^3.0.2" } }, - "formdata-node": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.3.2.tgz", - "integrity": "sha512-k7lYJyzDOSL6h917favP8j1L0/wNyylzU+x+1w4p5haGVHNlP58dbpdJhiCUsDbWsa9HwEtLp89obQgXl2e0qg==", - "requires": { - "node-domexception": "1.0.0", - "web-streams-polyfill": "4.0.0-beta.1" - } - }, "fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -11381,11 +11335,6 @@ "propagate": "^2.0.0" } }, - "node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" - }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -12831,9 +12780,9 @@ } }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", "dev": true }, "uid2": { @@ -12939,11 +12888,6 @@ "defaults": "^1.0.3" } }, - "web-streams-polyfill": { - "version": "4.0.0-beta.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.1.tgz", - "integrity": "sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ==" - }, "whatwg-fetch": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", diff --git a/packages/api/package.json b/packages/api/package.json index 9450f5db..7d8201bf 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -32,7 +32,6 @@ "@readme/api-core": "file:../core", "@readme/openapi-parser": "^2.0.0", "find-cache-dir": "^3.3.1", - "formdata-node": "^4.3.2", "isomorphic-fetch": "^3.0.0", "js-yaml": "^4.1.0", "make-dir": "^3.1.0", @@ -53,7 +52,7 @@ "nock": "^13.2.4", "nyc": "^15.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.5", + "typescript": "^4.6.2", "unique-temp-dir": "^1.0.0" }, "prettier": "@readme/eslint-config/prettier", diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index 0fad6687..89e102f2 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -3,7 +3,6 @@ import type { OASDocument } from './types'; import type { HttpMethods } from 'oas/@types/rmoas.types'; import type { ConfigOptions } from '@readme/api-core'; -import 'isomorphic-fetch'; import Oas from 'oas'; import APICore from '@readme/api-core'; import Cache from './cache'; diff --git a/packages/cli/.gitignore b/packages/cli/.gitignore index 6dd30047..ebbb8ac9 100644 --- a/packages/cli/.gitignore +++ b/packages/cli/.gitignore @@ -3,7 +3,7 @@ *.tsbuildinfo .nyc_output/ dist/ -lib/ +./lib/ node_modules/ tmp/ oclif.manifest.json diff --git a/packages/cli/package-lock.json b/packages/cli/package-lock.json index 47212736..bf2db5cc 100644 --- a/packages/cli/package-lock.json +++ b/packages/cli/package-lock.json @@ -17,11 +17,13 @@ "fetch-har": "^6.1.0", "js-yaml": "^4.1.0", "json-schema-to-typescript": "^10.1.5", - "oas": "^17.7.3" + "oas": "^17.7.3", + "ts-morph": "^13.0.3", + "typescript": "^4.6.2" }, "devDependencies": { "@oclif/test": "^2.1.0", - "@readme/eslint-config": "^8.4.1", + "@readme/eslint-config": "^8.4.4", "@readme/oas-examples": "^4.4.0", "@types/chai": "^4.3.0", "@types/js-yaml": "^4.0.5", @@ -35,8 +37,7 @@ "prettier": "^2.5.1", "shx": "^0.3.3", "ts-node": "^10.5.0", - "tslib": "^2.3.1", - "typescript": "^4.5.5" + "tslib": "^2.3.1" }, "engines": { "node": "^14 || ^16" @@ -51,6 +52,7 @@ "datauri": "^4.1.0", "fetch-har": "^6.1.0", "form-data-encoder": "^1.7.1", + "formdata-node": "^4.3.2", "get-stream": "^6.0.0", "isomorphic-fetch": "^3.0.0", "json-schema-traverse": "^1.0.0", @@ -69,7 +71,7 @@ "nock": "^13.2.4", "nyc": "^15.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" }, "engines": { "node": "^14 || ^16" @@ -903,13 +905,13 @@ } }, "node_modules/@readme/eslint-config": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@readme/eslint-config/-/eslint-config-8.4.2.tgz", - "integrity": "sha512-o9p3aho6wV6/DMsZ1yBz0PAyhLLlIYa60kxNxl03puVSJGRrcx9+Zc3NPzkaZblLMGH3DI6MZFK5hTkWLtYbhw==", + "version": "8.4.4", + "resolved": "https://registry.npmjs.org/@readme/eslint-config/-/eslint-config-8.4.4.tgz", + "integrity": "sha512-WBdGwOzh3N1ez3tRjIJXiKOkjZeaHEzShlbT1UYJyCVd3AO+PXVXQg42zpkrQNy9rJad1mRXjA7/Hm6oa2RAkw==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "^5.4.0", - "@typescript-eslint/parser": "^5.4.0", + "@typescript-eslint/eslint-plugin": "^5.13.0", + "@typescript-eslint/parser": "^5.13.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.1.0", "eslint-import-resolver-typescript": "^2.4.0", @@ -928,7 +930,7 @@ "eslint-plugin-react": "^7.17.0", "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-testing-library": "^5.0.0", - "eslint-plugin-unicorn": "^40.0.0", + "eslint-plugin-unicorn": "^41.0.0", "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0" }, "engines": { @@ -1005,6 +1007,17 @@ "node": ">= 6" } }, + "node_modules/@ts-morph/common": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.12.3.tgz", + "integrity": "sha512-4tUmeLyXJnJWvTFOKtcNJ1yh0a3SsTLi2MUoyj8iUNznFRN1ZquaNe7Oukqrnki2FzZkm0J9adCNLDZxUzvj+w==", + "dependencies": { + "fast-glob": "^3.2.7", + "minimatch": "^3.0.4", + "mkdirp": "^1.0.4", + "path-browserify": "^1.0.1" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -1131,14 +1144,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.1.tgz", - "integrity": "sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz", + "integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/type-utils": "5.12.1", - "@typescript-eslint/utils": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/type-utils": "5.13.0", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1164,14 +1177,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.1.tgz", - "integrity": "sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz", + "integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", "debug": "^4.3.2" }, "engines": { @@ -1191,13 +1204,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", - "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", + "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1" + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1208,12 +1221,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.1.tgz", - "integrity": "sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz", + "integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.12.1", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1234,9 +1247,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", - "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", + "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1247,13 +1260,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", - "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", + "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1274,15 +1287,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.1.tgz", - "integrity": "sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz", + "integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1298,12 +1311,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", - "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", + "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/types": "5.13.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -2269,6 +2282,14 @@ "node": ">=10" } }, + "node_modules/code-block-writer": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-11.0.0.tgz", + "integrity": "sha512-GEqWvEWWsOvER+g9keO4ohFoD3ymwyCnqY3hoTr7GZipYFwEhMHJw+TtV0rfgRhNImM6QWZGO2XYjlJVyYT62w==", + "dependencies": { + "tslib": "2.3.1" + } + }, "node_modules/code-error-fragment": { "version": "0.0.230", "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", @@ -3525,9 +3546,9 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "40.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-40.1.0.tgz", - "integrity": "sha512-y5doK2DF9Sr5AqKEHbHxjFllJ167nKDRU01HDcWyv4Tnmaoe9iNxMrBnaybZvWZUaE3OC5Unu0lNIevYamloig==", + "version": "41.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-41.0.0.tgz", + "integrity": "sha512-xoJCaRc1uy5REg9DkVga1BkZV57jJxoqOcrU28QHZB89Lk5LdSqdVyTIt9JQVfHNKaiyJ7X+3iLlIn+VEHWEzA==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.15.7", @@ -3552,7 +3573,7 @@ "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" }, "peerDependencies": { - "eslint": ">=7.32.0" + "eslint": ">=8.8.0" } }, "node_modules/eslint-plugin-you-dont-need-lodash-underscore": { @@ -7304,6 +7325,11 @@ "which": "bin/which" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "node_modules/path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -9242,6 +9268,15 @@ "integrity": "sha512-whw60l7r+8ZU8Tu/Uc2yxtc4ZTZbR/PF3u1IPNKGQ6p8EICLb3Z2lAgoqw9bqYd8IkgnsaOcLzYHFckjqNsf0g==", "dev": true }, + "node_modules/ts-morph": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-13.0.3.tgz", + "integrity": "sha512-pSOfUMx8Ld/WUreoSzvMFQG5i9uEiWIsBYjpU9+TTASOeUa89j5HykomeqVULm1oqWtBdleI3KEFRLrlA3zGIw==", + "dependencies": { + "@ts-morph/common": "~0.12.3", + "code-block-writer": "^11.0.0" + } + }, "node_modules/ts-node": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.5.0.tgz", @@ -9389,10 +9424,9 @@ } }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true, + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -11038,6 +11072,7 @@ "eslint": "^8.10.0", "fetch-har": "^6.1.0", "form-data-encoder": "^1.7.1", + "formdata-node": "^4.3.2", "get-stream": "^6.0.0", "isomorphic-fetch": "^3.0.0", "json-schema-traverse": "^1.0.0", @@ -11047,7 +11082,7 @@ "nyc": "^15.1.0", "oas": "^17.7.3", "prettier": "^2.5.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" } }, "@readme/better-ajv-errors": { @@ -11065,13 +11100,13 @@ } }, "@readme/eslint-config": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@readme/eslint-config/-/eslint-config-8.4.2.tgz", - "integrity": "sha512-o9p3aho6wV6/DMsZ1yBz0PAyhLLlIYa60kxNxl03puVSJGRrcx9+Zc3NPzkaZblLMGH3DI6MZFK5hTkWLtYbhw==", + "version": "8.4.4", + "resolved": "https://registry.npmjs.org/@readme/eslint-config/-/eslint-config-8.4.4.tgz", + "integrity": "sha512-WBdGwOzh3N1ez3tRjIJXiKOkjZeaHEzShlbT1UYJyCVd3AO+PXVXQg42zpkrQNy9rJad1mRXjA7/Hm6oa2RAkw==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "^5.4.0", - "@typescript-eslint/parser": "^5.4.0", + "@typescript-eslint/eslint-plugin": "^5.13.0", + "@typescript-eslint/parser": "^5.13.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.1.0", "eslint-import-resolver-typescript": "^2.4.0", @@ -11090,7 +11125,7 @@ "eslint-plugin-react": "^7.17.0", "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-testing-library": "^5.0.0", - "eslint-plugin-unicorn": "^40.0.0", + "eslint-plugin-unicorn": "^41.0.0", "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0" } }, @@ -11148,6 +11183,17 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, + "@ts-morph/common": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.12.3.tgz", + "integrity": "sha512-4tUmeLyXJnJWvTFOKtcNJ1yh0a3SsTLi2MUoyj8iUNznFRN1ZquaNe7Oukqrnki2FzZkm0J9adCNLDZxUzvj+w==", + "requires": { + "fast-glob": "^3.2.7", + "minimatch": "^3.0.4", + "mkdirp": "^1.0.4", + "path-browserify": "^1.0.1" + } + }, "@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -11274,14 +11320,14 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.1.tgz", - "integrity": "sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz", + "integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/type-utils": "5.12.1", - "@typescript-eslint/utils": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/type-utils": "5.13.0", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -11291,52 +11337,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.1.tgz", - "integrity": "sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz", + "integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", - "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", + "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1" + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0" } }, "@typescript-eslint/type-utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.1.tgz", - "integrity": "sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz", + "integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.12.1", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", - "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", + "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", - "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", + "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -11345,26 +11391,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.1.tgz", - "integrity": "sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz", + "integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", - "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", + "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/types": "5.13.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -12086,6 +12132,14 @@ "mkdirp-infer-owner": "^2.0.0" } }, + "code-block-writer": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-11.0.0.tgz", + "integrity": "sha512-GEqWvEWWsOvER+g9keO4ohFoD3ymwyCnqY3hoTr7GZipYFwEhMHJw+TtV0rfgRhNImM6QWZGO2XYjlJVyYT62w==", + "requires": { + "tslib": "2.3.1" + } + }, "code-error-fragment": { "version": "0.0.230", "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", @@ -13070,9 +13124,9 @@ } }, "eslint-plugin-unicorn": { - "version": "40.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-40.1.0.tgz", - "integrity": "sha512-y5doK2DF9Sr5AqKEHbHxjFllJ167nKDRU01HDcWyv4Tnmaoe9iNxMrBnaybZvWZUaE3OC5Unu0lNIevYamloig==", + "version": "41.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-41.0.0.tgz", + "integrity": "sha512-xoJCaRc1uy5REg9DkVga1BkZV57jJxoqOcrU28QHZB89Lk5LdSqdVyTIt9JQVfHNKaiyJ7X+3iLlIn+VEHWEzA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.15.7", @@ -15908,6 +15962,11 @@ } } }, + "path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -17365,6 +17424,15 @@ "integrity": "sha512-whw60l7r+8ZU8Tu/Uc2yxtc4ZTZbR/PF3u1IPNKGQ6p8EICLb3Z2lAgoqw9bqYd8IkgnsaOcLzYHFckjqNsf0g==", "dev": true }, + "ts-morph": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-13.0.3.tgz", + "integrity": "sha512-pSOfUMx8Ld/WUreoSzvMFQG5i9uEiWIsBYjpU9+TTASOeUa89j5HykomeqVULm1oqWtBdleI3KEFRLrlA3zGIw==", + "requires": { + "@ts-morph/common": "~0.12.3", + "code-block-writer": "^11.0.0" + } + }, "ts-node": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.5.0.tgz", @@ -17471,10 +17539,9 @@ } }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==" }, "unbox-primitive": { "version": "1.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 5b499c2c..04361695 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -42,11 +42,13 @@ "fetch-har": "^6.1.0", "js-yaml": "^4.1.0", "json-schema-to-typescript": "^10.1.5", - "oas": "^17.7.3" + "oas": "^17.7.3", + "ts-morph": "^13.0.3", + "typescript": "^4.6.2" }, "devDependencies": { "@oclif/test": "^2.1.0", - "@readme/eslint-config": "^8.4.1", + "@readme/eslint-config": "^8.4.4", "@readme/oas-examples": "^4.4.0", "@types/chai": "^4.3.0", "@types/js-yaml": "^4.0.5", @@ -60,8 +62,7 @@ "prettier": "^2.5.1", "shx": "^0.3.3", "ts-node": "^10.5.0", - "tslib": "^2.3.1", - "typescript": "^4.5.5" + "tslib": "^2.3.1" }, "prettier": "@readme/eslint-config/prettier", "oclif": { diff --git a/packages/cli/src/generator/typescript/index.ts b/packages/cli/src/generator/typescript/index.ts new file mode 100644 index 00000000..5579340c --- /dev/null +++ b/packages/cli/src/generator/typescript/index.ts @@ -0,0 +1,325 @@ +import type Oas from 'oas'; +import type { Operation } from 'oas'; +import type { JSONSchema, SchemaObject } from 'oas/@types/rmoas.types'; +// import type { SchemaWrapper } from 'oas/@types/operation/get-parameters-as-json-schema'; + +import { IndentationText, Project, QuoteKind } from 'ts-morph'; +// import * as ts from 'typescript'; +import { compile } from 'json-schema-to-typescript'; + +// ////////////////////////////////////////////////////////////////// +import { inspect } from 'util'; + +declare global { + interface Console { + logx: any; + } +} + +console.logx = (obj: any) => { + console.log(inspect(obj, false, null, true)); +}; +// ////////////////////////////////////////////////////////////////// + +type ResponseJsonSchema = { + type: string | string[]; + schema: SchemaObject; + label: string; + description?: string; +}; + +async function convertJSONSchemaToTypescript(schema: JSONSchema, name: string) { + // Though our JSON Schema type exposes JSONSchema4, which `json-schema-to-typescript`, it won't + // accept our custom type. + return compile(schema as any, name, { + bannerComment: '', + }); + + // Because the `name` that we're passing to `json-schema-to-typescript` gets run through some + // internal logic there and won't always be what we supply it we need to parse the TS that that + // library creates so we can grab the interface name for use in our own autogenerated code. + // const sourceFile = ts.createSourceFile(`${name}.d.ts`, interfaceCode, ts.ScriptTarget.Latest); + + // let primaryTypeName; + // const typeNames: string[] = []; + // await ts.forEachChild(sourceFile, node => { + // if (node.kind === ts.SyntaxKind.EndOfFileToken) { + // return; + // } + + // if (ts.isInterfaceDeclaration(node)) { + // // The Node `name` property, an `IdentifierObject`, is not formally exposed in the TS types + // // and there aren't any accessors for this either. + // typeNames.push(node.name.text); + // } else if (ts.isTypeAliasDeclaration(node)) { + // typeNames.push(node.name.text); + // } + // }); + + // return { + // primaryTypeName, + // typeNames, + // type: interfaceCode, + // }; +} + +async function loadOperationsAndMethods(project: Project, spec: Oas) { + const operations: Record< + /* operationId */ string, + { types: { params: any; responses?: any }; operation: Operation } + > = {}; + + const methods: Record< + /* method */ string, + Record + > = {}; + + await Promise.all( + Object.entries(spec.getPaths()).map(async ([path, ops]) => { + await Promise.all( + Object.entries(ops).map(async ([method, operation]) => { + if (!(method in methods)) { + methods[method] = {}; + } + + const operationId = operation.getOperationId(); + + let params; + const paramSchemas = operation.getParametersAsJsonSchema({ + // mergeIntoBodyAndMetadata: true, + // retainDeprecatedProperties: true, + }); + + if (paramSchemas) { + params = await Promise.resolve(paramSchemas.map(param => ({ [param.type]: param.schema }))) + .then(res => res.reduce((prev, next) => Object.assign(prev, next))) + .then(res => { + return Promise.all( + Object.entries(res).map(async ([paramType, schema]) => { + // @todo add tests for when schema is `{ type: string }` + const ts = await convertJSONSchemaToTypescript( + schema as JSONSchema, + `${operationId}_${paramType}_param` + ); + + const types = await getTypesFromTypescript(project, ts); + + return { + [paramType]: { + schema, + ts, + }, + }; + }) + ); + }) + .then(res => res.reduce((prev, next) => Object.assign(prev, next), {})); + } + + // @todo what does this do for a spec that has no responses? + const responses = await Promise.resolve( + operation + .getResponseStatusCodes() + .map(status => { + const schema = operation.getResponseAsJsonSchema(status); + if (!schema) { + return false; + } + + return { + [status]: schema.shift() as ResponseJsonSchema, + }; + }) + .reduce((prev, next) => Object.assign(prev, next)) + ).then(res => { + return Promise.all( + Object.entries(res as Record).map(async ([status, jsonSchema]) => { + return { + [status]: await convertJSONSchemaToTypescript( + jsonSchema.schema as JSONSchema, + `${operationId}_Response_${status}` + ), + }; + }) + ); + }); + + methods[method][path] = { types: { params, responses }, operation }; + if (operation.hasOperationId()) { + operations[operation.getOperationId()] = { + types: { params, responses }, + operation, + }; + } + }) + ); + }) + ); + + return [operations, methods]; +} + +export async function getTypesFromTypescript(project: Project, ts: string) { + const inf = project.createSourceFile('src/api/type.tmp.ts', ts); + const types = Array.from(inf.getExportedDeclarations().keys()); + + project.removeSourceFile(inf); + + return types; +} + +export default async function generator(spec: Oas) { + // @todo fill this user agent in with something contextual. + const userAgent = 'api/1.0.0'; + + const project = new Project({ + manipulationSettings: { + indentationText: IndentationText.TwoSpaces, + quoteKind: QuoteKind.Single, + }, + compilerOptions: { + // target: ScriptTarget.ES3, + outDir: 'dist', + }, + }); + + const [operations, methods, types] = await loadOperationsAndMethods(project, spec); + + // project.addSourceFilesAtPaths("src/**/*.ts"); + const sdkSource = project.createSourceFile('src/api/index.ts', 'export default class SDK {}'); + // const myEnumFile = project.createSourceFile("src/api/MyEnum.ts", { + // statements: [{ + // kind: StructureKind.Enum, + // name: "MyEnum", + // isExported: true, + // members: [{ name: "member" }], + // }], + // }); + + // get information + // sdk.getName(); // returns: "MyClass" + // sdk.hasExportKeyword(); // returns: true + // sdk.isDefaultExport(); // returns: false + + // manipulate + // const myInterface = sdkSource.addInterface({ + // name: 'IMyInterface', + // isExported: true, + // properties: [ + // { + // name: 'myProp', + // type: 'object', + // } + // ], + // }); + + sdkSource.addImportDeclarations([ + { defaultImport: 'Oas', moduleSpecifier: 'oas' }, + { defaultImport: 'APICore', moduleSpecifier: '@readme/api-core' }, + { + defaultImport: 'definition', + moduleSpecifier: '../fixtures/simple.oas.json', // './openapi.json', + }, + ]); + + const sdk = sdkSource.getClassOrThrow('SDK'); + sdk.addProperty({ name: 'spec', type: 'Oas' }); + sdk.addProperty({ name: 'core', type: 'APICore' }); + sdk.addProperty({ name: 'authKeys', type: '(number | string)[][]', initializer: '[]' }); + + sdk.addConstructor({ + statements: ['this.spec = Oas.init(definition);', `this.core = new APICore(this.spec, '${userAgent}');`], + }); + + Object.entries(operations).forEach(([operationId, data]) => { + + console.logx(data.types) + return; + + const operation: Operation = data.operation; + const fetchArgs = [`'${operation.path}'`, `'${operation.method}'`]; + const parameters = []; + if (data.types.params) { + if (data.types.params.body || data.types.params.formData) { + // @todo change this to just look for `body` when https://github.com/readmeio/oas/pull/617 is merged. + parameters.push({ name: 'body', type: data.types.params.body.ts.typeName }); + fetchArgs.push('body'); + sdkSource.addStatements(data.types.params.body.ts.type); + } + + if ( + data.types.params.path || + data.types.params.query || + data.types.params.cookie || + data.types.params.header || + data.types.params.query + ) { + // @todo change this to just look for `metadata` when https://github.com/readmeio/oas/pull/617 is merged. + parameters.push({ name: 'metadata', type: data.types.params.query.ts.typeName }); + fetchArgs.push('metadata'); + sdkSource.addStatements(data.types.params.query.ts.type); + } + } + + const method = sdk.addMethod({ + name: operationId, + // returnType: "string", + parameters, + statements: `return this.core.fetch(${fetchArgs.join(', ')});`, + }); + + const summary = operation.getSummary(); + const description = operation.getDescription(); + if (summary || description) { + method.addJsDoc( + [ + summary ? `${summary.replace(/\n/g, '\n * ')}` : '', + description ? `${description.replace(/\n/g, '\n * ')}` : '', + ] + .filter(Boolean) + .join('\n\n') + ); + } + + // Add the required types we need for this operation. + console.logx(data.types); + console.log('------------------') + }); + + // .addJsDoc('this is a constructor'); + + // const result = project.emitToMemory(); + console.log(project.getSourceFiles()[0].getFullText()) + // console.log({ methods }) + // console.log(operations) + + + +// private authKeys: (number | string)[][] = []; + +// private userAgent = 'autogenSDK/1.0.0'; + +// constructor() { +// this.spec = Oas.init(defintion); + +// // this.spec.api.servers[0].url = '{scheme}://httpbin.org/anything/testing'; +// } */ + + // const ast = new ApiGenerator(spec.api as OpenAPIV3.Document).generateApi(); + // const src = cg.printFile(ast); + + // console.log(src) + + + + + // Object.entries(operations).forEach(([op, data]) => { + // console.log(op) + // console.log(data) + // }); + + // console.log(operations) + + + // return operations; +} diff --git a/packages/cli/test/fixtures/simple.oas.json b/packages/cli/test/fixtures/simple.oas.json new file mode 100644 index 00000000..6fc36bec --- /dev/null +++ b/packages/cli/test/fixtures/simple.oas.json @@ -0,0 +1,287 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Swagger Petstore" + }, + "servers": [ + { + "url": "http://petstore.swagger.io/v2" + } + ], + "paths": { + "/pet/findByStatus": { + "get": { + "tags": ["pet"], + "summary": "Finds Pets by status", + "description": "Multiple status values can be provided with comma separated strings", + "operationId": "findPetsByStatus", + "parameters": [ + { + "name": "status", + "in": "query", + "description": "Status values that need to be considered for filter", + "required": true, + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": ["available", "pending", "sold"], + "default": "available" + } + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ] + } + } + }, + "components": { + "requestBodies": { + "Pet": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "description": "Pet object that needs to be added to the store", + "required": true + }, + "UserArray": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "description": "List of user object", + "required": true + } + }, + "securitySchemes": { + "petstore_auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "http://petstore.swagger.io/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + }, + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "header" + } + }, + "schemas": { + "Order": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "petId": { + "type": "integer", + "format": "int64" + }, + "quantity": { + "type": "integer", + "format": "int32" + }, + "shipDate": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "description": "Order Status", + "enum": ["placed", "approved", "delivered"] + }, + "complete": { + "type": "boolean", + "default": false + } + }, + "xml": { + "name": "Order" + } + }, + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Category" + } + }, + "User": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "password": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "userStatus": { + "type": "integer", + "format": "int32", + "description": "User Status" + } + }, + "xml": { + "name": "User" + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Tag" + } + }, + "Pet": { + "type": "object", + "required": ["name", "photoUrls"], + "properties": { + "id": { + "type": "integer", + "format": "int64", + "readOnly": true, + "default": 40, + "example": 25 + }, + "category": { + "$ref": "#/components/schemas/Category" + }, + "name": { + "type": "string", + "example": "doggie" + }, + "photoUrls": { + "type": "array", + "xml": { + "name": "photoUrl", + "wrapped": true + }, + "items": { + "type": "string", + "example": "https://example.com/photo.png" + } + }, + "tags": { + "type": "array", + "xml": { + "name": "tag", + "wrapped": true + }, + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "status": { + "type": "string", + "description": "pet status in the store", + "enum": ["available", "pending", "sold"] + } + }, + "xml": { + "name": "Pet" + } + }, + "ApiResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "type": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } +} diff --git a/packages/cli/test/generator/typescript.test.ts b/packages/cli/test/generator/typescript.test.ts new file mode 100644 index 00000000..2e2a9499 --- /dev/null +++ b/packages/cli/test/generator/typescript.test.ts @@ -0,0 +1,38 @@ +import Oas from 'oas'; +import typescriptGenerator from '../../src/generator/typescript'; + +// import uspto from '@readme/oas-examples/3.0/json/uspto.json'; + +// //////////////////////////////////////////////////////// +import { inspect } from 'util'; + +declare global { + interface Console { + logx: any; + } +} + +console.logx = (obj: any) => { + console.log(inspect(obj, false, null, true)); +}; +// //////////////////////////////////////////////////////// + +describe('typescript generator', function () { + let petstore: Oas; + + beforeEach(async function () { + petstore = await import('../fixtures/simple.oas.json').then(Oas.init); + await petstore.dereference({ preserveRefAsJSONSchemaTitle: true }); + }); + + it('should generate typescript code', async function () { + await typescriptGenerator(petstore); + // const gen = await typescriptGenerator(petstore); + // console.log(gen) + + // console.log(ast); + + + // console.log(petstore) + }); +}); diff --git a/packages/cli/test/tsconfig.json b/packages/cli/test/tsconfig.json index 95898fce..a0f0f689 100644 --- a/packages/cli/test/tsconfig.json +++ b/packages/cli/test/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../tsconfig", "compilerOptions": { - "noEmit": true + "noEmit": true, + "resolveJsonModule": true }, "references": [ {"path": ".."} diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 34727dbc..e98929e4 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "declaration": true, + "esModuleInterop": true, // We need this to to be able to load `typescript` in the TS generator. "importHelpers": true, "module": "commonjs", "outDir": "dist", diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index 4dfc093c..3c8b809a 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -13,6 +13,7 @@ "datauri": "^4.1.0", "fetch-har": "^6.1.0", "form-data-encoder": "^1.7.1", + "formdata-node": "^4.3.2", "get-stream": "^6.0.0", "isomorphic-fetch": "^3.0.0", "json-schema-traverse": "^1.0.0", @@ -31,7 +32,7 @@ "nock": "^13.2.4", "nyc": "^15.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" }, "engines": { "node": "^14 || ^16" @@ -3276,7 +3277,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.3.2.tgz", "integrity": "sha512-k7lYJyzDOSL6h917favP8j1L0/wNyylzU+x+1w4p5haGVHNlP58dbpdJhiCUsDbWsa9HwEtLp89obQgXl2e0qg==", - "optional": true, "dependencies": { "node-domexception": "1.0.0", "web-streams-polyfill": "4.0.0-beta.1" @@ -4837,7 +4837,6 @@ "url": "https://paypal.me/jimmywarting" } ], - "optional": true, "engines": { "node": ">=10.5.0" } @@ -6851,9 +6850,9 @@ } }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -6968,7 +6967,6 @@ "version": "4.0.0-beta.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.1.tgz", "integrity": "sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ==", - "optional": true, "engines": { "node": ">= 12" } @@ -9574,7 +9572,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.3.2.tgz", "integrity": "sha512-k7lYJyzDOSL6h917favP8j1L0/wNyylzU+x+1w4p5haGVHNlP58dbpdJhiCUsDbWsa9HwEtLp89obQgXl2e0qg==", - "optional": true, "requires": { "node-domexception": "1.0.0", "web-streams-polyfill": "4.0.0-beta.1" @@ -10680,8 +10677,7 @@ "node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "optional": true + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" }, "node-fetch": { "version": "2.6.7", @@ -12205,9 +12201,9 @@ } }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", "dev": true }, "unbox-primitive": { @@ -12304,8 +12300,7 @@ "web-streams-polyfill": { "version": "4.0.0-beta.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.1.tgz", - "integrity": "sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ==", - "optional": true + "integrity": "sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ==" }, "whatwg-fetch": { "version": "3.6.2", diff --git a/packages/core/package.json b/packages/core/package.json index 85e5ef01..fc4fd8d8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -31,6 +31,7 @@ "datauri": "^4.1.0", "fetch-har": "^6.1.0", "form-data-encoder": "^1.7.1", + "formdata-node": "^4.3.2", "get-stream": "^6.0.0", "isomorphic-fetch": "^3.0.0", "json-schema-traverse": "^1.0.0", @@ -49,7 +50,7 @@ "nock": "^13.2.4", "nyc": "^15.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.5" + "typescript": "^4.6.2" }, "prettier": "@readme/eslint-config/prettier", "nyc": {