From 1f6e21bea0f34812fef72a39d18527924b86a185 Mon Sep 17 00:00:00 2001 From: "Sergey S. Volkov" Date: Tue, 10 Nov 2020 12:50:24 +0300 Subject: [PATCH] Release 3.0.0 (#91) * fix: handling x-omitempty property for definition properties (#68) * docs: update CHANGELOG * BREAKING_CHANGE: renamed mustache templates, split client mustache template * Fixed unsafe clone() of Response causing json() hang. (#89) Fixed unsafe clone() of Response causing json() hang * bump: up project version to 3.0.0; chore: refresh generated api modules; docs; update CHANGELOG Co-authored-by: Benjamin Dobell --- CHANGELOG.md | 14 + package-lock.json | 1619 ++++++++++++++++- package.json | 2 +- src/config.js | 2 +- src/filePrefix.js | 14 + src/files.js | 3 +- src/index.js | 12 +- src/templates.js | 11 +- src/templates/api.mustache | 20 - src/templates/defaults/api.mustache | 41 + .../defaults/data-contracts.mustache | 9 + .../http-client.mustache} | 43 +- .../{ => defaults}/route-types.mustache | 0 tests/generated/v2.0/adafruit.ts | 2 +- tests/generated/v2.0/another-example.ts | 2 +- tests/generated/v2.0/api-with-examples.ts | 2 +- tests/generated/v2.0/authentiq.ts | 2 +- tests/generated/v2.0/example1.ts | 2 +- tests/generated/v2.0/file-formdata-example.ts | 2 +- tests/generated/v2.0/furkot-example.ts | 2 +- tests/generated/v2.0/giphy.ts | 2 +- tests/generated/v2.0/github-swagger.ts | 2 +- tests/generated/v2.0/path-args.ts | 2 +- tests/generated/v2.0/petstore-expanded.ts | 2 +- tests/generated/v2.0/petstore-minimal.ts | 2 +- tests/generated/v2.0/petstore-simple.ts | 2 +- tests/generated/v2.0/petstore-swagger-io.ts | 2 +- .../v2.0/petstore-with-external-docs.ts | 2 +- tests/generated/v2.0/petstore.ts | 2 +- tests/generated/v2.0/query-path-param.ts | 2 +- tests/generated/v2.0/uber.ts | 2 +- tests/generated/v3.0/additional-properties.ts | 2 +- .../generated/v3.0/additional-properties2.ts | 2 +- tests/generated/v3.0/allof-example.ts | 2 +- tests/generated/v3.0/anyof-example.ts | 2 +- tests/generated/v3.0/api-with-examples.ts | 2 +- tests/generated/v3.0/callback-example.ts | 2 +- tests/generated/v3.0/components-responses.ts | 2 +- tests/generated/v3.0/explode-param-3.0.1.ts | 2 +- tests/generated/v3.0/link-example.ts | 2 +- tests/generated/v3.0/no-definitions-schema.ts | 2 +- tests/generated/v3.0/nullable-refs.ts | 2 +- tests/generated/v3.0/oneof-example.ts | 2 +- tests/generated/v3.0/personal-api-example.ts | 2 +- tests/generated/v3.0/petstore-expanded.ts | 2 +- tests/generated/v3.0/petstore.ts | 2 +- tests/generated/v3.0/responses.ts | 2 +- tests/generated/v3.0/swaggerhub-template.ts | 2 +- tests/generated/v3.0/tsoa-odd-types-3.0.2.ts | 2 +- tests/generated/v3.0/uspto.ts | 2 +- tests/generated/v3.0/wrong-enum-subtypes.ts | 2 +- tests/spec/defaultAsSuccess/schema.ts | 2 +- tests/spec/js/schema.d.ts | 11 + tests/spec/js/schema.js | 3 +- tests/spec/responses/schema.ts | 2 +- tests/spec/routeTypes/schema.ts | 2 +- tests/spec/specProperty/schema.ts | 2 +- tests/spec/templates/schema.ts | 9 +- .../templates/spec_templates/api.mustache | 44 +- .../spec_templates/data-contracts.mustache | 3 + .../{client.mustache => http-client.mustache} | 41 - tests/spec/unionEnums/schema.ts | 2 +- 62 files changed, 1821 insertions(+), 166 deletions(-) create mode 100644 src/filePrefix.js delete mode 100644 src/templates/api.mustache create mode 100644 src/templates/defaults/api.mustache create mode 100644 src/templates/defaults/data-contracts.mustache rename src/templates/{client.mustache => defaults/http-client.mustache} (82%) rename src/templates/{ => defaults}/route-types.mustache (100%) create mode 100644 tests/spec/templates/spec_templates/data-contracts.mustache rename tests/spec/templates/spec_templates/{client.mustache => http-client.mustache} (83%) diff --git a/CHANGELOG.md b/CHANGELOG.md index a325b10e..1db59683 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# next release + + +# 3.0.0 + +BREAKING_CHANGES: +- Renamed mustache templates: + - `api.mustache` -> `data-contracts.mustache` + - `client.mustache` -> `http.client.mustache` + `api.mustache` +- Split the `client.mustache` template into two parts: `http-client.mustache` and `api.mustache` + +Fixes: +- Fixed unsafe clone() of Response causing json() hang. (Thanks @Benjamin-Dobell) + # 2.0.0 Features: diff --git a/package-lock.json b/package-lock.json index 186c37ff..07a383a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,1623 @@ { "name": "swagger-typescript-api", - "version": "2.0.0", - "lockfileVersion": 1, + "version": "3.0.0", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "@types/swagger-schema-official": "2.0.21", + "axios": "^0.19.2", + "commander": "^5.1.0", + "js-yaml": "^3.13.1", + "lodash": "^4.17.15", + "mustache": "^4.0.1", + "prettier": "^2.0.5", + "swagger-schema-official": "2.0.0-bab6bed", + "swagger2openapi": "^6.0.3", + "typescript": "^4.0.2" + }, + "bin": { + "sta": "index.js", + "swagger-typescript-api": "index.js" + }, + "devDependencies": { + "@types/lodash": "^4.14.149", + "@types/mustache": "^4.0.1", + "@types/prettier": "^2.0.1", + "husky": "^4.2.3", + "npm-run-all": "^4.1.5", + "pretty-quick": "^2.0.1" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dependencies": { + "@babel/highlight": "^7.8.3" + } + }, + "node_modules/@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dependencies": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", + "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", + "dependencies": { + "regenerator-runtime": "^0.13.2" + } + }, + "node_modules/@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + }, + "node_modules/@types/lodash": { + "version": "4.14.149", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.149.tgz", + "integrity": "sha512-ijGqzZt/b7BfzcK9vTrS6MFljQRPn5BFWOx8oE0GYxribu6uV+aA9zZuXI1zc/etK9E8nrgdoF2+LgUw7+9tJQ==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "node_modules/@types/mustache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/mustache/-/mustache-4.0.1.tgz", + "integrity": "sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw==", + "dev": true + }, + "node_modules/@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "node_modules/@types/prettier": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.0.1.tgz", + "integrity": "sha512-boy4xPNEtiw6N3abRhBi/e7hNvy3Tt8E9ZRAQrwAGzoCGZS/1wjo9KY7JHhnfnEsG5wSjDbymCozUM9a3ea7OQ==", + "dev": true + }, + "node_modules/@types/swagger-schema-official": { + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@types/swagger-schema-official/-/swagger-schema-official-2.0.21.tgz", + "integrity": "sha512-n9BbLOjR4Hre7B4TSGGMPohOgOg8tcp00uxqsIE00uuWQC0QuX57G1bqC1csLsk2DpTGtHkd0dEb3ipsCZ9dAA==" + }, + "node_modules/ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dependencies": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "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==", + "dependencies": { + "color-convert": "^1.9.0" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "dev": true + }, + "node_modules/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 + }, + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "dev": true + }, + "node_modules/axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "dependencies": { + "follow-redirects": "1.5.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=", + "dev": true + }, + "node_modules/better-ajv-errors": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.6.7.tgz", + "integrity": "sha512-PYgt/sCzR4aGpyNy5+ViSQ77ognMnWq7745zM+/flYO4/Yisdtp9wDQW2IKCyVYPUxQt3E/b5GBSwfhd1LPdlg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/runtime": "^7.0.0", + "chalk": "^2.4.1", + "core-js": "^3.2.1", + "json-to-ast": "^2.0.3", + "jsonpointer": "^4.0.1", + "leven": "^3.1.0" + } + }, + "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==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "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 + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "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==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "node_modules/code-error-fragment": { + "version": "0.0.230", + "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", + "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==" + }, + "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==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" + }, + "node_modules/compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", + "dev": true + }, + "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=", + "dev": true + }, + "node_modules/core-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==" + }, + "node_modules/cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dev": true, + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, + "node_modules/cosmiconfig/node_modules/parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } + }, + "node_modules/cosmiconfig/node_modules/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 + }, + "node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + } + }, + "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==" + }, + "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, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/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, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", + "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", + "dev": true, + "dependencies": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "node_modules/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, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" + }, + "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": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "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==" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "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=" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "node_modules/find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, + "dependencies": { + "semver-regex": "^2.0.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dependencies": { + "debug": "=3.1.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "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==" + }, + "node_modules/graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "node_modules/has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "node_modules/hosted-git-info": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true + }, + "node_modules/http2-client": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.3.tgz", + "integrity": "sha512-nUxLymWQ9pzkzTmir24p2RtsgruLmhje7lH3hLX1IpwvyTg77fW+1brenPPP3USAR+rQ36p5sTA/x7sjCJVkAA==" + }, + "node_modules/husky": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.3.tgz", + "integrity": "sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ==", + "dev": true, + "dependencies": { + "chalk": "^3.0.0", + "ci-info": "^2.0.0", + "compare-versions": "^3.5.1", + "cosmiconfig": "^6.0.0", + "find-versions": "^3.2.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^4.2.0", + "please-upgrade-node": "^3.2.0", + "slash": "^3.0.0", + "which-pm-runs": "^1.0.0" + } + }, + "node_modules/husky/node_modules/ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "node_modules/husky/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "node_modules/husky/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + } + }, + "node_modules/husky/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==", + "dev": true + }, + "node_modules/husky/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 + }, + "node_modules/husky/node_modules/supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + } + }, + "node_modules/ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "node_modules/is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "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==" + }, + "node_modules/is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.1" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "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=" + }, + "node_modules/json-to-ast": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", + "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", + "dependencies": { + "code-error-fragment": "0.0.230", + "grapheme-splitter": "^1.0.4" + } + }, + "node_modules/jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + }, + "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==" + }, + "node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + } + }, + "node_modules/lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + } + }, + "node_modules/mri": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", + "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==", + "dev": true + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/multimatch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "dev": true, + "dependencies": { + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" + } + }, + "node_modules/mustache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.1.tgz", + "integrity": "sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA==", + "bin": { + "mustache": "bin/mustache" + }, + "engines": { + "npm": ">=1.4.0" + } + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "dependencies": { + "http2-client": "^1.2.5" + } + }, + "node_modules/node-readfiles": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", + "integrity": "sha1-271K8SE04uY1wkXvk//Pb2BnOl0=", + "dependencies": { + "es6-promise": "^3.2.1" + } + }, + "node_modules/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, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + } + }, + "node_modules/oas-kit-common": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", + "dependencies": { + "fast-safe-stringify": "^2.0.7" + } + }, + "node_modules/oas-linter": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.1.2.tgz", + "integrity": "sha512-mv3HBG9aQz8PLGvonewIN9Y2Ra8QL6jvotRvf7NCdZ20n5vg4dO4y61UZh6s+KRDfJaU1PO+9Oxrn3EUN4Xygw==", + "dependencies": { + "should": "^13.2.1", + "yaml": "^1.8.3" + } + }, + "node_modules/oas-linter/node_modules/yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" + }, + "node_modules/oas-resolver": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.3.2.tgz", + "integrity": "sha512-toGCUv8wyZZmUAAsw4jn+511xNpUFW2ZLp4sAZ7xpERIeosrbxBxtkVxot9kXvdUHtPjRafi5+bkJ56TwQeYSQ==", + "dependencies": { + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.8", + "reftools": "^1.1.1", + "yaml": "^1.8.3", + "yargs": "^15.3.1" + } + }, + "node_modules/oas-resolver/node_modules/yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" + }, + "node_modules/oas-schema-walker": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.4.tgz", + "integrity": "sha512-foVDDS0RJYMfhQEDh/WdBuCzydTcsCnGo9EeD8SpWq1uW10JXiz+8SfYVDA7LO87kjmlnTRZle/2gr5qxabaEA==" + }, + "node_modules/oas-validator": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-4.0.3.tgz", + "integrity": "sha512-yLS0WI0HRWajBUiPUjyPGoZorsgaPpgeObea6ZUhlRCuZZE2Bq8SYkHfhqj7+BVv+K8y+b/cbCmNLM6GVKPDcw==", + "dependencies": { + "ajv": "^5.5.2", + "better-ajv-errors": "^0.6.7", + "call-me-maybe": "^1.0.1", + "oas-kit-common": "^1.0.8", + "oas-linter": "^3.1.2", + "oas-resolver": "^2.3.2", + "oas-schema-walker": "^1.1.4", + "reftools": "^1.1.1", + "should": "^13.2.1", + "yaml": "^1.8.3" + } + }, + "node_modules/oas-validator/node_modules/yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" + }, + "node_modules/object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "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 + }, + "node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + } + }, + "node_modules/opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", + "dev": true + }, + "node_modules/p-limit": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "dependencies": { + "p-try": "^2.0.0" + } + }, + "node_modules/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==", + "dependencies": { + "p-limit": "^2.2.0" + } + }, + "node_modules/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==" + }, + "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, + "dependencies": { + "callsites": "^3.0.0" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "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==" + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + } + }, + "node_modules/pidtree": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.0.tgz", + "integrity": "sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==", + "dev": true + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + } + }, + "node_modules/pkg-dir/node_modules/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, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "node_modules/pkg-dir/node_modules/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, + "dependencies": { + "p-locate": "^4.1.0" + } + }, + "node_modules/pkg-dir/node_modules/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, + "dependencies": { + "p-limit": "^2.2.0" + } + }, + "node_modules/pkg-dir/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 + }, + "node_modules/please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "dependencies": { + "semver-compare": "^1.0.0" + } + }, + "node_modules/prettier": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", + "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==" + }, + "node_modules/pretty-quick": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-2.0.1.tgz", + "integrity": "sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "execa": "^2.1.0", + "find-up": "^4.1.0", + "ignore": "^5.1.4", + "mri": "^1.1.4", + "multimatch": "^4.0.0" + } + }, + "node_modules/pretty-quick/node_modules/cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "node_modules/pretty-quick/node_modules/execa": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-2.1.0.tgz", + "integrity": "sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^3.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "node_modules/pretty-quick/node_modules/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, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "node_modules/pretty-quick/node_modules/get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + } + }, + "node_modules/pretty-quick/node_modules/is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "node_modules/pretty-quick/node_modules/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, + "dependencies": { + "p-locate": "^4.1.0" + } + }, + "node_modules/pretty-quick/node_modules/npm-run-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", + "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + } + }, + "node_modules/pretty-quick/node_modules/p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "dev": true + }, + "node_modules/pretty-quick/node_modules/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, + "dependencies": { + "p-limit": "^2.2.0" + } + }, + "node_modules/pretty-quick/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 + }, + "node_modules/pretty-quick/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 + }, + "node_modules/pretty-quick/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, + "dependencies": { + "shebang-regex": "^3.0.0" + } + }, + "node_modules/pretty-quick/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 + }, + "node_modules/pretty-quick/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, + "dependencies": { + "isexe": "^2.0.0" + } + }, + "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, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "node_modules/reftools": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.1.tgz", + "integrity": "sha512-7ySkzK7YpUeJP16rzJqEXTZ7IrAq/AL/p+wWejD9wdKQOe+mYYVAOB3w5ZTs2eoHfmAidwr/6PcC+q+LzPF/DQ==" + }, + "node_modules/regenerator-runtime": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "node_modules/resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + } + }, + "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 + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "node_modules/semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "node_modules/semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "dev": true + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "node_modules/shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "node_modules/should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dependencies": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "node_modules/should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dependencies": { + "should-type": "^1.4.0" + } + }, + "node_modules/should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dependencies": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "node_modules/should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=" + }, + "node_modules/should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dependencies": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "node_modules/should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==" + }, + "node_modules/signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "node_modules/string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "node_modules/string.prototype.padend": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "node_modules/string.prototype.trimleft": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "node_modules/string.prototype.trimright": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "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==", + "dependencies": { + "has-flag": "^3.0.0" + } + }, + "node_modules/swagger-schema-official": { + "version": "2.0.0-bab6bed", + "resolved": "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz", + "integrity": "sha1-cAcEaNbSl3ylI3suUZyn0Gouo/0=" + }, + "node_modules/swagger2openapi": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-6.0.3.tgz", + "integrity": "sha512-JF4gzVczBuLzVx4DIf+qtmsZIqVI2T3YcKKpgx00oHSDcix0ckzGPCfZ1gC87cpdfJqDcPSVngur3mRQDCm8hw==", + "dependencies": { + "better-ajv-errors": "^0.6.1", + "call-me-maybe": "^1.0.1", + "node-fetch-h2": "^2.3.0", + "node-readfiles": "^0.2.0", + "oas-kit-common": "^1.0.8", + "oas-resolver": "^2.3.2", + "oas-schema-walker": "^1.1.4", + "oas-validator": "^4.0.3", + "reftools": "^1.1.1", + "yaml": "^1.8.3", + "yargs": "^15.3.1" + } + }, + "node_modules/swagger2openapi/node_modules/yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" + }, + "node_modules/typescript": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", + "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==" + }, + "node_modules/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, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "node_modules/which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "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==", + "dependencies": { + "color-name": "~1.1.4" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + }, + "node_modules/yaml": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.7.2.tgz", + "integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.6.3" + } + }, + "node_modules/yargs": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.1" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + }, "dependencies": { "@babel/code-frame": { "version": "7.8.3", diff --git a/package.json b/package.json index fda6eee3..0f665292 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swagger-typescript-api", - "version": "2.0.0", + "version": "3.0.0", "description": "Create typescript api module from swagger schema", "scripts": { "cli:json": "node index.js -r -d -p ./swagger-test-cli.json -n swagger-test-cli.ts", diff --git a/src/config.js b/src/config.js index c916a7c5..43cd42fd 100644 --- a/src/config.js +++ b/src/config.js @@ -1,6 +1,6 @@ const config = { /** CLI flag */ - templates: "./templates", + templates: "./templates/defaults", /** CLI flag */ generateResponses: false, /** CLI flag */ diff --git a/src/filePrefix.js b/src/filePrefix.js new file mode 100644 index 00000000..38aa45ba --- /dev/null +++ b/src/filePrefix.js @@ -0,0 +1,14 @@ +module.exports = { + filePrefix: `/* tslint:disable */ +/* eslint-disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +`, +}; diff --git a/src/files.js b/src/files.js index f20161a9..e2cfc63a 100644 --- a/src/files.js +++ b/src/files.js @@ -1,13 +1,14 @@ const _ = require("lodash"); const fs = require("fs"); const { resolve } = require("path"); +const { filePrefix } = require("./filePrefix"); const getFileContent = (path) => fs.readFileSync(path, { encoding: "UTF-8" }); const pathIsExist = (path) => path && fs.existsSync(path); const createFile = (pathTo, fileName, content) => - fs.writeFileSync(resolve(__dirname, pathTo, `./${fileName}`), content, _.noop); + fs.writeFileSync(resolve(__dirname, pathTo, `./${fileName}`), `${filePrefix}${content}`, _.noop); module.exports = { createFile, diff --git a/src/index.js b/src/index.js index 9a94b8e3..ef0b740c 100644 --- a/src/index.js +++ b/src/index.js @@ -56,7 +56,12 @@ module.exports = { }); (spec ? convertSwaggerObject(spec) : getSwaggerObject(input, url)) .then(({ usageSchema, originalSchema }) => { - const { apiTemplate, clientTemplate, routeTypesTemplate } = getTemplates(); + const { + dataContractsTemplate, + httpClientTemplate, + apiTemplate, + routeTypesTemplate, + } = getTemplates(); console.log("☄️ start generating your typescript api"); @@ -90,9 +95,10 @@ module.exports = { }; let sourceFileContent = [ - mustache.render(apiTemplate, configuration), + mustache.render(dataContractsTemplate, configuration), generateRouteTypes ? mustache.render(routeTypesTemplate, configuration) : "", - generateClient ? mustache.render(clientTemplate, configuration) : "", + generateClient ? mustache.render(httpClientTemplate, configuration) : "", + generateClient ? mustache.render(apiTemplate, configuration) : "", ].join(""); if (toJS) { diff --git a/src/templates.js b/src/templates.js index 7383d5b9..78c8bcc1 100644 --- a/src/templates.js +++ b/src/templates.js @@ -2,19 +2,20 @@ const { getFileContent } = require("./files"); const { config } = require("./config"); const { resolve } = require("path"); +const getTemplate = (templateName) => + getFileContent(resolve(config.templates, `./${templateName}.mustache`)); + const getTemplates = () => { console.log(`✨ try to read templates from directory "${config.templates}"`); return { - apiTemplate: getTemplate("api"), - clientTemplate: config.generateClient ? getTemplate("client") : null, + dataContractsTemplate: getTemplate("data-contracts"), routeTypesTemplate: config.generateRouteTypes ? getTemplate("route-types") : null, + httpClientTemplate: config.generateClient ? getTemplate("http-client") : null, + apiTemplate: config.generateClient ? getTemplate("api") : null, }; }; -const getTemplate = (templateName) => - getFileContent(resolve(config.templates, `./${templateName}.mustache`)); - module.exports = { getTemplates, }; diff --git a/src/templates/api.mustache b/src/templates/api.mustache deleted file mode 100644 index bde50dcf..00000000 --- a/src/templates/api.mustache +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/* -* --------------------------------------------------------------- -* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## -* ## ## -* ## AUTHOR: acacode ## -* ## SOURCE: https://github.com/acacode/swagger-typescript-api ## -* --------------------------------------------------------------- -*/ - -{{#modelTypes}} - -{{#description}} -/** - * {{.}} - */ -{{/description}} -export {{typeIdentifier}} {{name}} {{content}} -{{/modelTypes}} diff --git a/src/templates/defaults/api.mustache b/src/templates/defaults/api.mustache new file mode 100644 index 00000000..1240fb42 --- /dev/null +++ b/src/templates/defaults/api.mustache @@ -0,0 +1,41 @@ + +{{#apiConfig.hasDescription}} +/** +{{#apiConfig.description}} + * {{.}} +{{/apiConfig.description}} + */ +{{/apiConfig.hasDescription}} +export class Api<{{#apiConfig.generic}}{{name}}{{#defaultValue}} = {{.}}{{/defaultValue}},{{/apiConfig.generic}}> extends HttpClient<{{#apiConfig.generic}}{{name}},{{/apiConfig.generic}}>{ +{{#routes}} + + {{#outOfModule}} + + + /** + {{#comments}} + * {{.}} + {{/comments}} + */ + {{name}} = ({{#routeArgs}}{{name}}{{#optional}}?{{/optional}}: {{type}}, {{/routeArgs}}) => + this.request<{{returnType}}, {{errorReturnType}}>({{requestMethodContent}}) + {{/outOfModule}} + + {{#combined}} + {{moduleName}} = { + {{#routes}} + + + /** + {{#comments}} + * {{.}} + {{/comments}} + */ + {{name}}: ({{#routeArgs}}{{name}}{{#optional}}?{{/optional}}: {{type}}, {{/routeArgs}}) => + this.request<{{returnType}}, {{errorReturnType}}>({{requestMethodContent}}), + {{/routes}} + } + {{/combined}} +{{/routes}} + +} diff --git a/src/templates/defaults/data-contracts.mustache b/src/templates/defaults/data-contracts.mustache new file mode 100644 index 00000000..7d54f700 --- /dev/null +++ b/src/templates/defaults/data-contracts.mustache @@ -0,0 +1,9 @@ +{{#modelTypes}} + +{{#description}} +/** + * {{.}} + */ +{{/description}} +export {{typeIdentifier}} {{name}} {{content}} +{{/modelTypes}} diff --git a/src/templates/client.mustache b/src/templates/defaults/http-client.mustache similarity index 82% rename from src/templates/client.mustache rename to src/templates/defaults/http-client.mustache index a9cc2145..58c2f700 100644 --- a/src/templates/client.mustache +++ b/src/templates/defaults/http-client.mustache @@ -96,7 +96,7 @@ class HttpClient<{{#apiConfig.generic}}{{name}},{{/apiConfig.generic}}> { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; @@ -139,44 +139,3 @@ class HttpClient<{{#apiConfig.generic}}{{name}},{{/apiConfig.generic}}> { }) } } - -{{#apiConfig.hasDescription}} -/** -{{#apiConfig.description}} - * {{.}} -{{/apiConfig.description}} - */ -{{/apiConfig.hasDescription}} -export class Api<{{#apiConfig.generic}}{{name}}{{#defaultValue}} = {{.}}{{/defaultValue}},{{/apiConfig.generic}}> extends HttpClient<{{#apiConfig.generic}}{{name}},{{/apiConfig.generic}}>{ -{{#routes}} - - {{#outOfModule}} - - - /** - {{#comments}} - * {{.}} - {{/comments}} - */ - {{name}} = ({{#routeArgs}}{{name}}{{#optional}}?{{/optional}}: {{type}}, {{/routeArgs}}) => - this.request<{{returnType}}, {{errorReturnType}}>({{requestMethodContent}}) - {{/outOfModule}} - - {{#combined}} - {{moduleName}} = { - {{#routes}} - - - /** - {{#comments}} - * {{.}} - {{/comments}} - */ - {{name}}: ({{#routeArgs}}{{name}}{{#optional}}?{{/optional}}: {{type}}, {{/routeArgs}}) => - this.request<{{returnType}}, {{errorReturnType}}>({{requestMethodContent}}), - {{/routes}} - } - {{/combined}} -{{/routes}} - -} diff --git a/src/templates/route-types.mustache b/src/templates/defaults/route-types.mustache similarity index 100% rename from src/templates/route-types.mustache rename to src/templates/defaults/route-types.mustache diff --git a/tests/generated/v2.0/adafruit.ts b/tests/generated/v2.0/adafruit.ts index 0e7651c1..7103cc40 100644 --- a/tests/generated/v2.0/adafruit.ts +++ b/tests/generated/v2.0/adafruit.ts @@ -237,7 +237,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/another-example.ts b/tests/generated/v2.0/another-example.ts index 720b3f8f..3377228d 100644 --- a/tests/generated/v2.0/another-example.ts +++ b/tests/generated/v2.0/another-example.ts @@ -190,7 +190,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/api-with-examples.ts b/tests/generated/v2.0/api-with-examples.ts index 882d130f..07da1ac7 100644 --- a/tests/generated/v2.0/api-with-examples.ts +++ b/tests/generated/v2.0/api-with-examples.ts @@ -68,7 +68,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/authentiq.ts b/tests/generated/v2.0/authentiq.ts index 5d0773fa..ad26437d 100644 --- a/tests/generated/v2.0/authentiq.ts +++ b/tests/generated/v2.0/authentiq.ts @@ -142,7 +142,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/example1.ts b/tests/generated/v2.0/example1.ts index b68d1e84..9bd6a76b 100644 --- a/tests/generated/v2.0/example1.ts +++ b/tests/generated/v2.0/example1.ts @@ -109,7 +109,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/file-formdata-example.ts b/tests/generated/v2.0/file-formdata-example.ts index cc0b3239..bf6901fd 100644 --- a/tests/generated/v2.0/file-formdata-example.ts +++ b/tests/generated/v2.0/file-formdata-example.ts @@ -74,7 +74,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/furkot-example.ts b/tests/generated/v2.0/furkot-example.ts index 21ea97d4..e0b4cc2e 100644 --- a/tests/generated/v2.0/furkot-example.ts +++ b/tests/generated/v2.0/furkot-example.ts @@ -116,7 +116,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/giphy.ts b/tests/generated/v2.0/giphy.ts index 37396f88..c326f585 100644 --- a/tests/generated/v2.0/giphy.ts +++ b/tests/generated/v2.0/giphy.ts @@ -257,7 +257,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/github-swagger.ts b/tests/generated/v2.0/github-swagger.ts index 2521026e..15f92c3a 100644 --- a/tests/generated/v2.0/github-swagger.ts +++ b/tests/generated/v2.0/github-swagger.ts @@ -1486,7 +1486,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/path-args.ts b/tests/generated/v2.0/path-args.ts index f741bb6b..2e9628f2 100644 --- a/tests/generated/v2.0/path-args.ts +++ b/tests/generated/v2.0/path-args.ts @@ -90,7 +90,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/petstore-expanded.ts b/tests/generated/v2.0/petstore-expanded.ts index 2be39c6f..a21a534b 100644 --- a/tests/generated/v2.0/petstore-expanded.ts +++ b/tests/generated/v2.0/petstore-expanded.ts @@ -116,7 +116,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/petstore-minimal.ts b/tests/generated/v2.0/petstore-minimal.ts index 73dcf259..fc08c9fa 100644 --- a/tests/generated/v2.0/petstore-minimal.ts +++ b/tests/generated/v2.0/petstore-minimal.ts @@ -75,7 +75,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/petstore-simple.ts b/tests/generated/v2.0/petstore-simple.ts index 54cc8cb6..e7679fbf 100644 --- a/tests/generated/v2.0/petstore-simple.ts +++ b/tests/generated/v2.0/petstore-simple.ts @@ -112,7 +112,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/petstore-swagger-io.ts b/tests/generated/v2.0/petstore-swagger-io.ts index c0d634dc..0874ed24 100644 --- a/tests/generated/v2.0/petstore-swagger-io.ts +++ b/tests/generated/v2.0/petstore-swagger-io.ts @@ -147,7 +147,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/petstore-with-external-docs.ts b/tests/generated/v2.0/petstore-with-external-docs.ts index 98e6479a..4b8485f7 100644 --- a/tests/generated/v2.0/petstore-with-external-docs.ts +++ b/tests/generated/v2.0/petstore-with-external-docs.ts @@ -102,7 +102,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/petstore.ts b/tests/generated/v2.0/petstore.ts index 71f5b873..0dafcd3c 100644 --- a/tests/generated/v2.0/petstore.ts +++ b/tests/generated/v2.0/petstore.ts @@ -103,7 +103,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/query-path-param.ts b/tests/generated/v2.0/query-path-param.ts index b52991bd..f13a4a14 100644 --- a/tests/generated/v2.0/query-path-param.ts +++ b/tests/generated/v2.0/query-path-param.ts @@ -90,7 +90,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v2.0/uber.ts b/tests/generated/v2.0/uber.ts index 4fd1edb3..c6ed2f6d 100644 --- a/tests/generated/v2.0/uber.ts +++ b/tests/generated/v2.0/uber.ts @@ -175,7 +175,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/additional-properties.ts b/tests/generated/v3.0/additional-properties.ts index a8161503..91c037f7 100644 --- a/tests/generated/v3.0/additional-properties.ts +++ b/tests/generated/v3.0/additional-properties.ts @@ -75,7 +75,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/additional-properties2.ts b/tests/generated/v3.0/additional-properties2.ts index f2f6bba4..dc82dda6 100644 --- a/tests/generated/v3.0/additional-properties2.ts +++ b/tests/generated/v3.0/additional-properties2.ts @@ -72,7 +72,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/allof-example.ts b/tests/generated/v3.0/allof-example.ts index 5cadeffc..f9ea85ef 100644 --- a/tests/generated/v3.0/allof-example.ts +++ b/tests/generated/v3.0/allof-example.ts @@ -76,7 +76,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/anyof-example.ts b/tests/generated/v3.0/anyof-example.ts index 1578e34c..bd992c37 100644 --- a/tests/generated/v3.0/anyof-example.ts +++ b/tests/generated/v3.0/anyof-example.ts @@ -78,7 +78,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/api-with-examples.ts b/tests/generated/v3.0/api-with-examples.ts index 343c104a..e463f991 100644 --- a/tests/generated/v3.0/api-with-examples.ts +++ b/tests/generated/v3.0/api-with-examples.ts @@ -68,7 +68,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/callback-example.ts b/tests/generated/v3.0/callback-example.ts index c6260196..7c2da2d0 100644 --- a/tests/generated/v3.0/callback-example.ts +++ b/tests/generated/v3.0/callback-example.ts @@ -90,7 +90,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/components-responses.ts b/tests/generated/v3.0/components-responses.ts index 8be16ec8..7de78c58 100644 --- a/tests/generated/v3.0/components-responses.ts +++ b/tests/generated/v3.0/components-responses.ts @@ -68,7 +68,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/explode-param-3.0.1.ts b/tests/generated/v3.0/explode-param-3.0.1.ts index 66523bd4..c7dcba14 100644 --- a/tests/generated/v3.0/explode-param-3.0.1.ts +++ b/tests/generated/v3.0/explode-param-3.0.1.ts @@ -98,7 +98,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/link-example.ts b/tests/generated/v3.0/link-example.ts index 304456c0..73e6d0c2 100644 --- a/tests/generated/v3.0/link-example.ts +++ b/tests/generated/v3.0/link-example.ts @@ -107,7 +107,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/no-definitions-schema.ts b/tests/generated/v3.0/no-definitions-schema.ts index a53b47da..1239d0ea 100644 --- a/tests/generated/v3.0/no-definitions-schema.ts +++ b/tests/generated/v3.0/no-definitions-schema.ts @@ -75,7 +75,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/nullable-refs.ts b/tests/generated/v3.0/nullable-refs.ts index 385b95cb..014846b8 100644 --- a/tests/generated/v3.0/nullable-refs.ts +++ b/tests/generated/v3.0/nullable-refs.ts @@ -82,7 +82,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/oneof-example.ts b/tests/generated/v3.0/oneof-example.ts index c4685fbd..8dcc9dad 100644 --- a/tests/generated/v3.0/oneof-example.ts +++ b/tests/generated/v3.0/oneof-example.ts @@ -78,7 +78,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/personal-api-example.ts b/tests/generated/v3.0/personal-api-example.ts index 19958521..b9eda357 100644 --- a/tests/generated/v3.0/personal-api-example.ts +++ b/tests/generated/v3.0/personal-api-example.ts @@ -206,7 +206,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/petstore-expanded.ts b/tests/generated/v3.0/petstore-expanded.ts index 363be03e..759102ab 100644 --- a/tests/generated/v3.0/petstore-expanded.ts +++ b/tests/generated/v3.0/petstore-expanded.ts @@ -102,7 +102,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/petstore.ts b/tests/generated/v3.0/petstore.ts index f8c6d1c3..21b0cc27 100644 --- a/tests/generated/v3.0/petstore.ts +++ b/tests/generated/v3.0/petstore.ts @@ -105,7 +105,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/responses.ts b/tests/generated/v3.0/responses.ts index 8be16ec8..7de78c58 100644 --- a/tests/generated/v3.0/responses.ts +++ b/tests/generated/v3.0/responses.ts @@ -68,7 +68,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/swaggerhub-template.ts b/tests/generated/v3.0/swaggerhub-template.ts index 0680a8b1..0c6f462a 100644 --- a/tests/generated/v3.0/swaggerhub-template.ts +++ b/tests/generated/v3.0/swaggerhub-template.ts @@ -68,7 +68,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/tsoa-odd-types-3.0.2.ts b/tests/generated/v3.0/tsoa-odd-types-3.0.2.ts index dbfd996c..5d177978 100644 --- a/tests/generated/v3.0/tsoa-odd-types-3.0.2.ts +++ b/tests/generated/v3.0/tsoa-odd-types-3.0.2.ts @@ -180,7 +180,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/uspto.ts b/tests/generated/v3.0/uspto.ts index dbb2bf94..1ee04784 100644 --- a/tests/generated/v3.0/uspto.ts +++ b/tests/generated/v3.0/uspto.ts @@ -85,7 +85,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/generated/v3.0/wrong-enum-subtypes.ts b/tests/generated/v3.0/wrong-enum-subtypes.ts index 7d148727..62d1d953 100644 --- a/tests/generated/v3.0/wrong-enum-subtypes.ts +++ b/tests/generated/v3.0/wrong-enum-subtypes.ts @@ -70,7 +70,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/spec/defaultAsSuccess/schema.ts b/tests/spec/defaultAsSuccess/schema.ts index a0fc3281..27e28a13 100644 --- a/tests/spec/defaultAsSuccess/schema.ts +++ b/tests/spec/defaultAsSuccess/schema.ts @@ -142,7 +142,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/spec/js/schema.d.ts b/tests/spec/js/schema.d.ts index 222cca4d..5829273a 100644 --- a/tests/spec/js/schema.d.ts +++ b/tests/spec/js/schema.d.ts @@ -1,3 +1,14 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + /** * A user or organization */ diff --git a/tests/spec/js/schema.js b/tests/spec/js/schema.js index 6c96bb33..ff1166f8 100644 --- a/tests/spec/js/schema.js +++ b/tests/spec/js/schema.js @@ -8,6 +8,7 @@ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## * --------------------------------------------------------------- */ + var BodyType; (function (BodyType) { BodyType[(BodyType["Json"] = 0)] = "Json"; @@ -32,7 +33,7 @@ class HttpClient { [BodyType.Json]: JSON.stringify, }; this.safeParseResponse = (response) => { - const r = response.clone(); + const r = response; r.data = null; r.error = null; return response diff --git a/tests/spec/responses/schema.ts b/tests/spec/responses/schema.ts index 06ae852d..175536ac 100644 --- a/tests/spec/responses/schema.ts +++ b/tests/spec/responses/schema.ts @@ -153,7 +153,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/spec/routeTypes/schema.ts b/tests/spec/routeTypes/schema.ts index 7931d7c9..ba3e9edd 100644 --- a/tests/spec/routeTypes/schema.ts +++ b/tests/spec/routeTypes/schema.ts @@ -4279,7 +4279,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/spec/specProperty/schema.ts b/tests/spec/specProperty/schema.ts index a7a4bf12..903a7ea4 100644 --- a/tests/spec/specProperty/schema.ts +++ b/tests/spec/specProperty/schema.ts @@ -162,7 +162,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null; diff --git a/tests/spec/templates/schema.ts b/tests/spec/templates/schema.ts index 47ab3232..3a2986f4 100644 --- a/tests/spec/templates/schema.ts +++ b/tests/spec/templates/schema.ts @@ -1,5 +1,13 @@ /* tslint:disable */ /* eslint-disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ export interface Pet { id: number; @@ -112,7 +120,6 @@ class HttpClient { }); }; } - /** * @title Swagger Petstore * @version 1.0.0 diff --git a/tests/spec/templates/spec_templates/api.mustache b/tests/spec/templates/spec_templates/api.mustache index 35af05bf..ca226bfb 100644 --- a/tests/spec/templates/spec_templates/api.mustache +++ b/tests/spec/templates/spec_templates/api.mustache @@ -1,6 +1,40 @@ -/* tslint:disable */ -/* eslint-disable */ +{{#apiConfig.hasDescription}} +/** +{{#apiConfig.description}} + * {{.}} +{{/apiConfig.description}} + */ +{{/apiConfig.hasDescription}} +export class Api<{{#apiConfig.generic}}{{name}}{{#defaultValue}} = {{.}}{{/defaultValue}},{{/apiConfig.generic}}> extends HttpClient<{{#apiConfig.generic}}{{name}},{{/apiConfig.generic}}>{ +{{#routes}} -{{#modelTypes}} -export {{typeIdentifier}} {{name}} {{content}} -{{/modelTypes}} + {{#outOfModule}} + + + /** + {{#comments}} + * {{.}} + {{/comments}} + */ + {{name}} = ({{#routeArgs}}{{name}}{{#optional}}?{{/optional}}: {{type}}, {{/routeArgs}}) => + this.request<{{returnType}}, {{errorReturnType}}>({{requestMethodContent}}) + {{/outOfModule}} + + {{#combined}} + {{moduleName}} = { + {{#routes}} + + + /** + {{#comments}} + * {{.}} + {{/comments}} + */ + {{name}}: ({{#routeArgs}}{{name}}{{#optional}}?{{/optional}}: {{type}}, {{/routeArgs}}) => + this.request<{{returnType}}, {{errorReturnType}}>({{requestMethodContent}}), + {{/routes}} + } + {{/combined}} +{{/routes}} + +} diff --git a/tests/spec/templates/spec_templates/data-contracts.mustache b/tests/spec/templates/spec_templates/data-contracts.mustache new file mode 100644 index 00000000..839b3e10 --- /dev/null +++ b/tests/spec/templates/spec_templates/data-contracts.mustache @@ -0,0 +1,3 @@ +{{#modelTypes}} +export {{typeIdentifier}} {{name}} {{content}} +{{/modelTypes}} diff --git a/tests/spec/templates/spec_templates/client.mustache b/tests/spec/templates/spec_templates/http-client.mustache similarity index 83% rename from tests/spec/templates/spec_templates/client.mustache rename to tests/spec/templates/spec_templates/http-client.mustache index 6ca50398..cd88f31b 100644 --- a/tests/spec/templates/spec_templates/client.mustache +++ b/tests/spec/templates/spec_templates/http-client.mustache @@ -140,44 +140,3 @@ class HttpClient<{{#apiConfig.generic}}{{name}},{{/apiConfig.generic}}> { }) } } - -{{#apiConfig.hasDescription}} -/** -{{#apiConfig.description}} - * {{.}} -{{/apiConfig.description}} - */ -{{/apiConfig.hasDescription}} -export class Api<{{#apiConfig.generic}}{{name}}{{#defaultValue}} = {{.}}{{/defaultValue}},{{/apiConfig.generic}}> extends HttpClient<{{#apiConfig.generic}}{{name}},{{/apiConfig.generic}}>{ -{{#routes}} - - {{#outOfModule}} - - - /** - {{#comments}} - * {{.}} - {{/comments}} - */ - {{name}} = ({{#routeArgs}}{{name}}{{#optional}}?{{/optional}}: {{type}}, {{/routeArgs}}) => - this.request<{{returnType}}, {{errorReturnType}}>({{requestMethodContent}}) - {{/outOfModule}} - - {{#combined}} - {{moduleName}} = { - {{#routes}} - - - /** - {{#comments}} - * {{.}} - {{/comments}} - */ - {{name}}: ({{#routeArgs}}{{name}}{{#optional}}?{{/optional}}: {{type}}, {{/routeArgs}}) => - this.request<{{returnType}}, {{errorReturnType}}>({{requestMethodContent}}), - {{/routes}} - } - {{/combined}} -{{/routes}} - -} diff --git a/tests/spec/unionEnums/schema.ts b/tests/spec/unionEnums/schema.ts index 83adfc3d..cd2261b9 100644 --- a/tests/spec/unionEnums/schema.ts +++ b/tests/spec/unionEnums/schema.ts @@ -72,7 +72,7 @@ class HttpClient { } private safeParseResponse = (response: Response): Promise> => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null; r.error = null;