From 8d14b9d0fadae9b70e5f28d417dd798dfc960954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20K=C3=B6nig?= <33655937+jkoenig134@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:51:31 +0200 Subject: [PATCH] Update ci and so on (#1) * ci: update * switch to @nmshd package * stuff * re-add jest types --- .ci/runChecks.sh | 6 + .github/dependabot.yml | 27 + .github/workflows/master.yml | 32 - .github/workflows/npm-publish.yml | 23 - .github/workflows/publish.yml | 33 + .github/workflows/test.yml | 31 + .gitignore | 4 +- .prettierrc | 27 + .vscode/settings.json | 31 + README.MD | 204 +- dist/cli.d.ts | 3 - dist/cli.d.ts.map | 1 - dist/cli.js | 133 -- dist/cli.js.map | 1 - dist/config.d.ts | 83 - dist/config.d.ts.map | 1 - dist/config.js | 9 - dist/config.js.map | 1 - dist/decorators.d.ts | 87 - dist/decorators.d.ts.map | 1 - dist/decorators.js | 131 -- dist/decorators.js.map | 1 - dist/index.d.ts | 4 - dist/index.d.ts.map | 1 - dist/index.js | 20 - dist/index.js.map | 1 - dist/metadata/controllerGenerator.d.ts | 14 - dist/metadata/controllerGenerator.d.ts.map | 1 - dist/metadata/controllerGenerator.js | 79 - dist/metadata/controllerGenerator.js.map | 1 - dist/metadata/endpointGenerator.d.ts | 19 - dist/metadata/endpointGenerator.d.ts.map | 1 - dist/metadata/endpointGenerator.js | 130 -- dist/metadata/endpointGenerator.js.map | 1 - dist/metadata/keywordKinds.d.ts | 3 - dist/metadata/keywordKinds.d.ts.map | 1 - dist/metadata/keywordKinds.js | 20 - dist/metadata/keywordKinds.js.map | 1 - dist/metadata/metadataGenerator.d.ts | 116 - dist/metadata/metadataGenerator.d.ts.map | 1 - dist/metadata/metadataGenerator.js | 113 - dist/metadata/metadataGenerator.js.map | 1 - dist/metadata/methodGenerator.d.ts | 22 - dist/metadata/methodGenerator.d.ts.map | 1 - dist/metadata/methodGenerator.js | 187 -- dist/metadata/methodGenerator.js.map | 1 - dist/metadata/parameterGenerator.d.ts | 27 - dist/metadata/parameterGenerator.d.ts.map | 1 - dist/metadata/parameterGenerator.js | 256 --- dist/metadata/parameterGenerator.js.map | 1 - dist/metadata/resolveType.d.ts | 16 - dist/metadata/resolveType.d.ts.map | 1 - dist/metadata/resolveType.js | 640 ------ dist/metadata/resolveType.js.map | 1 - dist/swagger/generator.d.ts | 27 - dist/swagger/generator.d.ts.map | 1 - dist/swagger/generator.js | 384 ---- dist/swagger/generator.js.map | 1 - dist/swagger/swagger.d.ts | 9 - dist/swagger/swagger.d.ts.map | 1 - dist/swagger/swagger.js | 11 - dist/swagger/swagger.js.map | 1 - dist/utils/decoratorUtils.d.ts | 14 - dist/utils/decoratorUtils.d.ts.map | 1 - dist/utils/decoratorUtils.js | 75 - dist/utils/decoratorUtils.js.map | 1 - dist/utils/jsDocUtils.d.ts | 6 - dist/utils/jsDocUtils.d.ts.map | 1 - dist/utils/jsDocUtils.js | 49 - dist/utils/jsDocUtils.js.map | 1 - dist/utils/pathUtils.d.ts | 2 - dist/utils/pathUtils.d.ts.map | 1 - dist/utils/pathUtils.js | 12 - dist/utils/pathUtils.js.map | 1 - package-lock.json | 2417 +++++++------------- package.json | 43 +- test/data/apidebug.ts | 26 +- test/data/apis.ts | 851 ++++--- tsconfig.json | 47 +- 79 files changed, 1543 insertions(+), 4992 deletions(-) create mode 100755 .ci/runChecks.sh create mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/master.yml delete mode 100644 .github/workflows/npm-publish.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/test.yml create mode 100644 .prettierrc create mode 100644 .vscode/settings.json delete mode 100644 dist/cli.d.ts delete mode 100644 dist/cli.d.ts.map delete mode 100755 dist/cli.js delete mode 100644 dist/cli.js.map delete mode 100644 dist/config.d.ts delete mode 100644 dist/config.d.ts.map delete mode 100644 dist/config.js delete mode 100644 dist/config.js.map delete mode 100644 dist/decorators.d.ts delete mode 100644 dist/decorators.d.ts.map delete mode 100644 dist/decorators.js delete mode 100644 dist/decorators.js.map delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.d.ts.map delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 dist/metadata/controllerGenerator.d.ts delete mode 100644 dist/metadata/controllerGenerator.d.ts.map delete mode 100644 dist/metadata/controllerGenerator.js delete mode 100644 dist/metadata/controllerGenerator.js.map delete mode 100644 dist/metadata/endpointGenerator.d.ts delete mode 100644 dist/metadata/endpointGenerator.d.ts.map delete mode 100644 dist/metadata/endpointGenerator.js delete mode 100644 dist/metadata/endpointGenerator.js.map delete mode 100644 dist/metadata/keywordKinds.d.ts delete mode 100644 dist/metadata/keywordKinds.d.ts.map delete mode 100644 dist/metadata/keywordKinds.js delete mode 100644 dist/metadata/keywordKinds.js.map delete mode 100644 dist/metadata/metadataGenerator.d.ts delete mode 100644 dist/metadata/metadataGenerator.d.ts.map delete mode 100644 dist/metadata/metadataGenerator.js delete mode 100644 dist/metadata/metadataGenerator.js.map delete mode 100644 dist/metadata/methodGenerator.d.ts delete mode 100644 dist/metadata/methodGenerator.d.ts.map delete mode 100644 dist/metadata/methodGenerator.js delete mode 100644 dist/metadata/methodGenerator.js.map delete mode 100644 dist/metadata/parameterGenerator.d.ts delete mode 100644 dist/metadata/parameterGenerator.d.ts.map delete mode 100644 dist/metadata/parameterGenerator.js delete mode 100644 dist/metadata/parameterGenerator.js.map delete mode 100644 dist/metadata/resolveType.d.ts delete mode 100644 dist/metadata/resolveType.d.ts.map delete mode 100644 dist/metadata/resolveType.js delete mode 100644 dist/metadata/resolveType.js.map delete mode 100644 dist/swagger/generator.d.ts delete mode 100644 dist/swagger/generator.d.ts.map delete mode 100644 dist/swagger/generator.js delete mode 100644 dist/swagger/generator.js.map delete mode 100644 dist/swagger/swagger.d.ts delete mode 100644 dist/swagger/swagger.d.ts.map delete mode 100644 dist/swagger/swagger.js delete mode 100644 dist/swagger/swagger.js.map delete mode 100644 dist/utils/decoratorUtils.d.ts delete mode 100644 dist/utils/decoratorUtils.d.ts.map delete mode 100644 dist/utils/decoratorUtils.js delete mode 100644 dist/utils/decoratorUtils.js.map delete mode 100644 dist/utils/jsDocUtils.d.ts delete mode 100644 dist/utils/jsDocUtils.d.ts.map delete mode 100644 dist/utils/jsDocUtils.js delete mode 100644 dist/utils/jsDocUtils.js.map delete mode 100644 dist/utils/pathUtils.d.ts delete mode 100644 dist/utils/pathUtils.d.ts.map delete mode 100644 dist/utils/pathUtils.js delete mode 100644 dist/utils/pathUtils.js.map diff --git a/.ci/runChecks.sh b/.ci/runChecks.sh new file mode 100755 index 0000000..927a585 --- /dev/null +++ b/.ci/runChecks.sh @@ -0,0 +1,6 @@ +set -e + +npm ci +npm run build +npx license-check +npx better-npm-audit audit diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f0f3c80 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 +updates: + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'weekly' + groups: + update-github-actions-dependencies: + patterns: + - '*' + reviewers: + - 'jkoenig134' + labels: + - 'dependencies' + + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'weekly' + groups: + update-npm-dependencies: + patterns: + - '*' + reviewers: + - 'jkoenig134' + labels: + - 'dependencies' diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml deleted file mode 100644 index 855a5e7..0000000 --- a/.github/workflows/master.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Master Workflow - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [10.x, 12.x, 14.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run test:coverage - - name: Upload Code coverage report - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.codecov }} - file: ./reports/coverage/*.json - diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 3685f72..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,23 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages - -name: Publish Workflow - -on: - release: - types: [created] - -jobs: - publish-npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm test - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm}} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ff8aed7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish + +on: + push: + branches: [master] + +jobs: + run-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: current + - run: bash .ci/runChecks.sh + + publish-npm: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: current + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm run build + - run: npx enhanced-publish --if-possible --use-preid-as-tag + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + needs: ['run-checks'] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5d82a70 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Test + +on: + pull_request: + push: + branches: [master] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + cancel-in-progress: true + +jobs: + run-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: current + - run: bash .ci/runChecks.sh + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: current + - run: npm ci + - run: npm run build + - run: npm run test diff --git a/.gitignore b/.gitignore index d41daf1..3d07357 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ .DS_Store doc node_modules -.vscode .nyc_output coverage *.log npm-debug.log* .idea -reports \ No newline at end of file +reports +dist diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..ce480f7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,27 @@ +{ + "semi": true, + "tabWidth": 4, + "singleQuote": true, + "printWidth": 120, + "trailingComma": "none", + "overrides": [ + { + "files": "*.json", + "options": { + "tabWidth": 2 + } + }, + { + "files": "*.yml", + "options": { + "tabWidth": 2 + } + }, + { + "files": ".prettierrc", + "options": { + "tabWidth": 2 + } + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4badec9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,31 @@ +{ + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[yaml]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "files.autoSave": "off", + "html.format.wrapAttributes": "preserve-aligned", + "xmlTools.splitAttributesOnFormat": true, + "xmlTools.enforcePrettySelfClosingTagOnFormat": true, + "editor.codeActionsOnSave": { + "source.organizeImports": "always" + }, + "files.eol": "\n", + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/README.MD b/README.MD index 585ded9..660e7ba 100644 --- a/README.MD +++ b/README.MD @@ -4,22 +4,23 @@ [![Known Vulnerabilities](https://snyk.io/test/github/thiagobustamante/typescript-rest-swagger/badge.svg?targetFile=package.json)](https://snyk.io/test/github/thiagobustamante/typescript-rest-swagger?targetFile=package.json) # Swagger for Typescript-rest + This is a tool to generate swagger files from a [typescript-rest](https://github.com/thiagobustamante/typescript-rest) project. -**Table of Contents** - -- [Swagger for Typescript-rest](#swagger-for-typescript-rest) - - [Installation](#installation) - - [Usage](#usage) - - [Swagger Decorators](#swagger-decorators) - - [@Response](#response) - - [@Example](#example) - - [@Tags](#tags) - - [@Consumes](#consumes) - - [@Produces](#produces) - - [@Hidden](#hidden) - - [@IsInt, @IsLong, @IsFloat, @IsDouble](#isint-islong-isfloat-isdouble) - - [SwaggerConfig.json](#swaggerconfigjson) +**Table of Contents** + +- [Swagger for Typescript-rest](#swagger-for-typescript-rest) + - [Installation](#installation) + - [Usage](#usage) + - [Swagger Decorators](#swagger-decorators) + - [@Response](#response) + - [@Example](#example) + - [@Tags](#tags) + - [@Consumes](#consumes) + - [@Produces](#produces) + - [@Hidden](#hidden) + - [@IsInt, @IsLong, @IsFloat, @IsDouble](#isint-islong-isfloat-isdouble) + - [SwaggerConfig.json](#swaggerconfigjson) ## Installation @@ -70,22 +71,22 @@ However, there are some additional informations that can be provided, only with Some examples: ```typescript -import {Path, Accept, GET} from 'typescript-rest'; -import {Tags} from 'typescript-rest-swagger'; +import { Path, Accept, GET } from 'typescript-rest'; +import { Tags } from 'typescript-rest-swagger'; @Path('mypath') export class MyService { @GET @Tags('adminMethod', 'otheTag') @Accept('text/html') - test( ): string { + test(): string { return 'OK'; } @GET @Path('secondpath') - test2( @QueryParam('testParam')test?: string ): Person { - return {name: 'OK'}; + test2(@QueryParam('testParam') test?: string): Person { + return { name: 'OK' }; } } ``` @@ -102,8 +103,8 @@ export class MyService { */ @GET @Path('secondpath') - test2( @QueryParam('testParam')test?: string ): Person { - return {name: 'OK'}; + test2(@QueryParam('testParam') test?: string): Person { + return { name: 'OK' }; } } ``` @@ -116,17 +117,19 @@ A decorator to document the responses that a given service method can return. It ```typescript interface MyError { - message: string + message: string; } @Path('people') class PeopleService { - @Response(200, 'Retrieve a list of people.') - @Response(401, 'The user is unauthorized.', {message: 'The user is not authorized to access this operation.'}) - @GET - getPeople(@Param('name') name: string) { - // ... - } + @Response(200, 'Retrieve a list of people.') + @Response(401, 'The user is unauthorized.', { + message: 'The user is not authorized to access this operation.' + }) + @GET + getPeople(@Param('name') name: string) { + // ... + } } ``` @@ -140,13 +143,15 @@ Used to provide an example of method return to be added into the method response ```typescript @Path('people') class PeopleService { - @Example>([{ - name: 'Joe' - }]) - @GET - getPeople(@Param('name') name: string): Person[] { - // ... - } + @Example>([ + { + name: 'Joe' + } + ]) + @GET + getPeople(@Param('name') name: string): Person[] { + // ... + } } ``` @@ -157,16 +162,15 @@ Add tags for a given method on generated swagger documentation. ```typescript @Path('people') class PeopleService { - @Tags('adiministrative', 'department1') - @GET - getPeople(@Param('name') name: string) { - // ... - } + @Tags('adiministrative', 'department1') + @GET + getPeople(@Param('name') name: string) { + // ... + } } ``` - -#### @Consumes +#### @Consumes Document the consumes property in generated swagger docs @@ -174,14 +178,14 @@ Document the consumes property in generated swagger docs @Path('people') @Consumes('text/html') class PeopleService { - @PUT - createPeople(@Param('name') name: string, people: People) { - // ... - } + @PUT + createPeople(@Param('name') name: string, people: People) { + // ... + } } ``` -#### @Produces +#### @Produces Document the produces property in generated swagger docs @@ -189,17 +193,17 @@ Document the produces property in generated swagger docs @Path('people') @Produces('text/html') class PeopleService { - @GET - getPeople(@Param('name') name: string) { - // ... - } + @GET + getPeople(@Param('name') name: string) { + // ... + } } ``` -A Default produces is already created in swagger documentation from the method return analisys. +A Default produces is already created in swagger documentation from the method return analisys. You can use this decorator to override this default produces. -#### @Hidden +#### @Hidden Allow to hide some APIs from swagger docs (ex: test or dev APIs, etc ...). This decorator can be applied for the whole class or only a single method @@ -208,10 +212,10 @@ This decorator can be applied for the whole class or only a single method @Path('people') @Hidden() class PeopleService { - @GET - getPeople(@Param('name') name: string) { - // ... - } + @GET + getPeople(@Param('name') name: string) { + // ... + } } ``` @@ -247,32 +251,31 @@ interface Person { } ``` - -### SwaggerConfig.json - -The swagger config file supports the following properties: - -Property | Type | Description --------- | ---- | ----------- -basePath | string | Base API path; e.g. the 'v1' in https://myapi.com/v1 -consumes | [string] | Default consumes property for the entire API -description | string | API description; defaults to npm package description -entryFile | string or string[] | The entry point to your API (it is possible to use glob patters) -outputFormat | 'Swagger_2' or 'OpenApi_3' | Inform if the generated spec will be in swagger 2.0 format or i open api 3.0 -host | string | The hostname to be informed in the generated swagger file -license | string | API license number; defaults to npm package license -name | string | API name; defaults to npm package name -outputDirectory | string | Where to write the generated swagger file -produces | [string] | Default produces property for the entire API -version | string | API version number; defaults to npm package version -yaml | boolean | Generates the output also as an yaml file -spec | any | Extend generated swagger spec with this object. Note that generated properties will always take precedence over what get specified here -securityDefinitions | *SecurityDefinition | Security Definitions Object. A declaration of the security schemes available to be used in the specification. This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme. -collectionFormat | string | Default collectionFormat property for the entire API. Possible values are `csv`, `ssv`, `tsv`, `pipes`, `multi`. If not specified, Swagger defaults to `csv`. - +### SwaggerConfig.json + +The swagger config file supports the following properties: + +| Property | Type | Description | +| ------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| basePath | string | Base API path; e.g. the 'v1' in https://myapi.com/v1 | +| consumes | [string] | Default consumes property for the entire API | +| description | string | API description; defaults to npm package description | +| entryFile | string or string[] | The entry point to your API (it is possible to use glob patters) | +| outputFormat | 'Swagger_2' or 'OpenApi_3' | Inform if the generated spec will be in swagger 2.0 format or i open api 3.0 | +| host | string | The hostname to be informed in the generated swagger file | +| license | string | API license number; defaults to npm package license | +| name | string | API name; defaults to npm package name | +| outputDirectory | string | Where to write the generated swagger file | +| produces | [string] | Default produces property for the entire API | +| version | string | API version number; defaults to npm package version | +| yaml | boolean | Generates the output also as an yaml file | +| spec | any | Extend generated swagger spec with this object. Note that generated properties will always take precedence over what get specified here | +| securityDefinitions | \*SecurityDefinition | Security Definitions Object. A declaration of the security schemes available to be used in the specification. This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme. | +| collectionFormat | string | Default collectionFormat property for the entire API. Possible values are `csv`, `ssv`, `tsv`, `pipes`, `multi`. If not specified, Swagger defaults to `csv`. | Where the SecurityDefinition contract is defined as: -```typescript + +```typescript { [name: string]: { type: string; @@ -287,6 +290,7 @@ Where the SecurityDefinition contract is defined as: ``` See an example: + ```json { "swagger": { @@ -306,9 +310,7 @@ See an example: "in": "query" } }, - "ignore": [ - "**/node_modules/**" - ] + "ignore": ["**/node_modules/**"] } } ``` @@ -318,21 +320,21 @@ See an example: ```yaml swagger: - outputDirectory: ./dist - entryFile: - - ./controllers/*.ts - outputFormat: openapi_3 - host: localhost:3000 - version: 1.0 - name: Typescript-rest Test API - description: A description - license: MIT - basePath: /v1 - securityDefinitions: - api_key: - type: apiKey - name: access_token - in: query - ignore: - - /node_modules/** + outputDirectory: ./dist + entryFile: + - ./controllers/*.ts + outputFormat: openapi_3 + host: localhost:3000 + version: 1.0 + name: Typescript-rest Test API + description: A description + license: MIT + basePath: /v1 + securityDefinitions: + api_key: + type: apiKey + name: access_token + in: query + ignore: + - /node_modules/** ``` diff --git a/dist/cli.d.ts b/dist/cli.d.ts deleted file mode 100644 index faaadd5..0000000 --- a/dist/cli.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=cli.d.ts.map \ No newline at end of file diff --git a/dist/cli.d.ts.map b/dist/cli.d.ts.map deleted file mode 100644 index f022439..0000000 --- a/dist/cli.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/cli.js b/dist/cli.js deleted file mode 100755 index 92f9397..0000000 --- a/dist/cli.js +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const argparse_1 = require("argparse"); -const debug = require("debug"); -const fs = require("fs-extra-promise"); -const _ = require("lodash"); -const path = require("path"); -const path_1 = require("path"); -const ts = require("typescript"); -const YAML = require("yamljs"); -const config_1 = require("./config"); -const metadataGenerator_1 = require("./metadata/metadataGenerator"); -const generator_1 = require("./swagger/generator"); -const debugLog = debug("typescript-rest-swagger"); -const workingDir = process.cwd(); -const versionDefault = getPackageJsonValue("version"); -const nameDefault = getPackageJsonValue("name"); -const descriptionDefault = getPackageJsonValue("description"); -const licenseDefault = getPackageJsonValue("license"); -const parser = new argparse_1.ArgumentParser({ - add_help: true, - description: "Typescript-REST Swagger tool", -}); -parser.add_argument("-c", "--config", { - help: "The swagger config file (swagger.json or swagger.yml or swaggerCongig.js).", -}); -parser.add_argument("-t", "--tsconfig", { - action: "storeTrue", - default: false, - help: "Load tsconfig.json file", -}); -parser.add_argument("-p", "--tsconfig_path", { - help: "The tsconfig file (tsconfig.json) path. Default to {cwd}/tsconfig.json.", -}); -const parameters = parser.parse_args(); -const config = getConfig(parameters.config); -const compilerOptions = getCompilerOptions(parameters.tsconfig, parameters.tsconfig_path); -debugLog("Starting Swagger generation tool"); -debugLog("Compiler Options: %j", compilerOptions); -const swaggerConfig = validateSwaggerConfig(config.swagger); -debugLog("Swagger Config: %j", swaggerConfig); -debugLog("Processing Services Metadata"); -const metadata = new metadataGenerator_1.MetadataGenerator(swaggerConfig.entryFile, parameters.tsconfig_path, swaggerConfig.ignore).generate(); -debugLog("Generated Metadata: %j", metadata); -new generator_1.SpecGenerator(metadata, swaggerConfig) - .generate() - .then(() => { - console.info("Generation completed."); -}) - .catch((err) => { - console.error(`Error generating swagger. ${err}`); -}); -function getPackageJsonValue(key) { - try { - const projectPackageJson = require(`${workingDir}/package.json`); - return projectPackageJson[key] || ""; - } - catch (err) { - return ""; - } -} -function getConfig(configPath = "swagger.json") { - const configFile = `${workingDir}/${configPath}`; - if (_.endsWith(configFile, ".yml") || _.endsWith(configFile, ".yaml")) { - return YAML.load(configFile); - } - else if (_.endsWith(configFile, ".js")) { - return require(path.join(configFile)); - } - else { - return fs.readJSONSync(configFile); - } -} -function validateSwaggerConfig(conf) { - if (!conf.outputDirectory) { - throw new Error("Missing outputDirectory: onfiguration most contain output directory"); - } - if (!conf.entryFile) { - throw new Error("Missing entryFile: Configuration must contain an entry point file."); - } - conf.version = conf.version || versionDefault; - conf.name = conf.name || nameDefault; - conf.description = conf.description || descriptionDefault; - conf.license = conf.license || licenseDefault; - conf.yaml = conf.yaml === false ? false : true; - conf.outputFormat = conf.outputFormat - ? config_1.Specification[conf.outputFormat] - : config_1.Specification.Swagger_2; - return conf; -} -function getCompilerOptions(loadTsconfig, tsconfigPath) { - if (!loadTsconfig && tsconfigPath) { - loadTsconfig = true; - } - if (!loadTsconfig) { - return {}; - } - const cwd = process.cwd(); - const defaultTsconfigPath = (0, path_1.join)(cwd, "tsconfig.json"); - tsconfigPath = tsconfigPath - ? getAbsolutePath(tsconfigPath, cwd) - : defaultTsconfigPath; - try { - const tsConfig = require(tsconfigPath); - if (!tsConfig) { - throw new Error("Invalid tsconfig"); - } - return tsConfig.compilerOptions - ? ts.convertCompilerOptionsFromJson(tsConfig.compilerOptions, cwd).options - : {}; - } - catch (err) { - if (err.code === "MODULE_NOT_FOUND") { - throw Error(`No tsconfig file found at '${tsconfigPath}'`); - } - else if (err.name === "SyntaxError") { - throw Error(`Invalid JSON syntax in tsconfig at '${tsconfigPath}': ${err.message}`); - } - else { - throw Error(`Unhandled error encountered loading tsconfig '${tsconfigPath}': ${err.message}`); - } - } -} -function getAbsolutePath(p, basePath) { - if ((0, path_1.isAbsolute)(p)) { - return p; - } - else { - return (0, path_1.join)(basePath, p); - } -} -//# sourceMappingURL=cli.js.map \ No newline at end of file diff --git a/dist/cli.js.map b/dist/cli.js.map deleted file mode 100644 index abbf469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AgB;IAClD,IAAI,IAAA,iBAAU,EAAC,CAAC,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,CAAC;QACN,OAAO,IAAA,WAAI,EAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/dist/config.d.ts b/dist/config.d.ts deleted file mode 100644 index 07d1f54..0000000 --- a/dist/config.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { OpenAPIV3 } from "openapi-types"; -export interface Config { - /** - * Swagger generation configuration object - */ - swagger: SwaggerConfig; -} -export declare enum Specification { - Swagger_2 = "Swagger_2", - OpenApi_3 = "OpenApi_3" -} -export interface SwaggerConfig { - /** - * Support the output to be an yaml file - */ - yaml: boolean; - /** - * Generated SwaggerConfig.json will output here - */ - outputDirectory: string | Array; - /** - * The entry point to your API - */ - entryFile: string | Array; - /** - * Inform if the generated spec will be in swagger 2.0 format or i open api 3.0 - */ - outputFormat?: Specification; - /** - * API host, expressTemplate.g. localhost:3000 or https://myapi.com - */ - servers?: OpenAPIV3.ServerObject[]; - /** - * API version number; defaults to npm package version - */ - version?: string; - /** - * API name; defaults to npm package name - */ - name?: string; - /** - * 'API description; defaults to npm package description - */ - description?: string; - /** - * API license; defaults to npm package license - */ - license?: string; - /** - * Base API path; e.g. the 'v1' in https://myapi.com/v1 - */ - basePath?: string; - /** - * Extend generated swagger spec with this object - * Note that generated properties will always take precedence over what get specified here - */ - spec?: any; - /** - * Security Definitions Object - * A declaration of the security schemes available to be used in the - * specification. This does not enforce the security schemes on the operations - * and only serves to provide the relevant details for each scheme. - */ - securityDefinitions?: OpenAPIV3.SecurityRequirementObject[]; - /** - * Default consumes property for the entire API - */ - consumes?: Array; - /** - * Default produces property for the entire API - */ - produces?: Array; - /** - * Default collectionFormat property for query parameters of array type. - * Possible values are `csv`, `ssv`, `tsv`, `pipes`, `multi`. If not specified, Swagger defaults to `csv`. - */ - collectionFormat?: string; - /** - * Directory to ignore during TypeScript metadata scan - */ - ignore?: Array; -} -//# sourceMappingURL=config.d.ts.map \ No newline at end of file diff --git a/dist/config.d.ts.map b/dist/config.d.ts.map deleted file mode 100644 index d3b9283..0000000 --- a/dist/config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,eAAe,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAExC;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAElC;;OAEG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,YAAY,EAAE,CAAC;IAEnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;IAEX;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,SAAS,CAAC,yBAAyB,EAAE,CAAC;IAE5D;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB"} \ No newline at end of file diff --git a/dist/config.js b/dist/config.js deleted file mode 100644 index 06f8fd1..0000000 --- a/dist/config.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Specification = void 0; -var Specification; -(function (Specification) { - Specification["Swagger_2"] = "Swagger_2"; - Specification["OpenApi_3"] = "OpenApi_3"; -})(Specification || (exports.Specification = Specification = {})); -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/dist/config.js.map b/dist/config.js.map deleted file mode 100644 index fcd6a65..0000000 --- a/dist/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAWb,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;AACzB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"} \ No newline at end of file diff --git a/dist/decorators.d.ts b/dist/decorators.d.ts deleted file mode 100644 index e5bdeac..0000000 --- a/dist/decorators.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * A decorator to document the responses that a given service method can return. It is used to generate - * documentation for the REST service. - * ```typescript - * interface MyError { - * message: string - * } - * @ Path('people') - * class PeopleService { - * @ Response(200, 'Retrieve a list of people.') - * @ Response(401, 'The user is unauthorized.', {message: 'The user is not authorized to access this operation.'}) - * @ GET - * getPeople(@ Param('name') name: string) { - * // ... - * } - * } - * ``` - * A Default response is created in swagger documentation from the method return analisys. So any response declared - * through this decorator is an additional response created. - * @param status The response status code - * @param description A description for this response - * @param example An optional example of response to be added to method documentation. - */ -export declare function Response(name: string | number, description?: string, example?: T): any; -/** - * Used to provide an example of method return to be added into the method response section of the - * generated documentation for this method. - * ```typescript - * @ Path('people') - * class PeopleService { - * @ Example>([{ - * name: 'Joe' - * }]) - * @ GET - * getPeople(@ Param('name') name: string): Person[] { - * // ... - * } - * } - * ``` - * @param example The example returned object - */ -export declare function Example(example: T): any; -/** - * Add tags for a given method on generated swagger documentation. - * ```typescript - * @ Path('people') - * class PeopleService { - * @ Tags('adiministrative', 'department1') - * @ GET - * getPeople(@ Param('name') name: string) { - * // ... - * } - * } - * ``` - * @param values a list of tags - */ -export declare function Tags(...values: Array): any; -/** - * Document the method or class comsumes property in generated swagger docs - */ -export declare function Consumes(...values: Array): any; -/** - * Document the method or class produces property in generated swagger docs - */ -export declare function Produces(...values: Array): any; -/** - * Document the method or class produces property in generated swagger docs - */ -export declare function Hidden(): any; -/** - * Document the type of a property or parameter as `integer ($int32)` in generated swagger docs - */ -export declare function IsInt(target: any, propertyKey: string, parameterIndex?: number): void; -/** - * Document the type of a property or parameter as `integer ($int64)` in generated swagger docs - */ -export declare function IsLong(target: any, propertyKey: string, parameterIndex?: number): void; -/** - * Document the type of a property or parameter as `number ($float)` in generated swagger docs - */ -export declare function IsFloat(target: any, propertyKey: string, parameterIndex?: number): void; -/** - * Document the type of a property or parameter as `number ($double)` in generated swagger docs. - * This is the default for `number` types without a specifying decorator. - */ -export declare function IsDouble(target: any, propertyKey: string, parameterIndex?: number): void; -//# sourceMappingURL=decorators.d.ts.map \ No newline at end of file diff --git a/dist/decorators.d.ts.map b/dist/decorators.d.ts.map deleted file mode 100644 index 591098e..0000000 --- a/dist/decorators.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,CAAC,GACV,GAAG,CAIL;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,GAAG,CAI1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,GAAG,CAIlD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,GAAG,CAItD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,GAAG,CAItD;AAED;;GAEG;AACH,wBAAgB,MAAM,IAAI,GAAG,CAI5B;AAED;;GAEG;AACH,wBAAgB,KAAK,CACnB,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,QAGxB;AAED;;GAEG;AACH,wBAAgB,MAAM,CACpB,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,QAGxB;AAED;;GAEG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,QAGxB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,QAGxB"} \ No newline at end of file diff --git a/dist/decorators.js b/dist/decorators.js deleted file mode 100644 index 65386fa..0000000 --- a/dist/decorators.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Response = Response; -exports.Example = Example; -exports.Tags = Tags; -exports.Consumes = Consumes; -exports.Produces = Produces; -exports.Hidden = Hidden; -exports.IsInt = IsInt; -exports.IsLong = IsLong; -exports.IsFloat = IsFloat; -exports.IsDouble = IsDouble; -/** - * A decorator to document the responses that a given service method can return. It is used to generate - * documentation for the REST service. - * ```typescript - * interface MyError { - * message: string - * } - * @ Path('people') - * class PeopleService { - * @ Response(200, 'Retrieve a list of people.') - * @ Response(401, 'The user is unauthorized.', {message: 'The user is not authorized to access this operation.'}) - * @ GET - * getPeople(@ Param('name') name: string) { - * // ... - * } - * } - * ``` - * A Default response is created in swagger documentation from the method return analisys. So any response declared - * through this decorator is an additional response created. - * @param status The response status code - * @param description A description for this response - * @param example An optional example of response to be added to method documentation. - */ -function Response(name, description, example) { - return () => { - return; - }; -} -/** - * Used to provide an example of method return to be added into the method response section of the - * generated documentation for this method. - * ```typescript - * @ Path('people') - * class PeopleService { - * @ Example>([{ - * name: 'Joe' - * }]) - * @ GET - * getPeople(@ Param('name') name: string): Person[] { - * // ... - * } - * } - * ``` - * @param example The example returned object - */ -function Example(example) { - return () => { - return; - }; -} -/** - * Add tags for a given method on generated swagger documentation. - * ```typescript - * @ Path('people') - * class PeopleService { - * @ Tags('adiministrative', 'department1') - * @ GET - * getPeople(@ Param('name') name: string) { - * // ... - * } - * } - * ``` - * @param values a list of tags - */ -function Tags(...values) { - return () => { - return; - }; -} -/** - * Document the method or class comsumes property in generated swagger docs - */ -function Consumes(...values) { - return () => { - return; - }; -} -/** - * Document the method or class produces property in generated swagger docs - */ -function Produces(...values) { - return () => { - return; - }; -} -/** - * Document the method or class produces property in generated swagger docs - */ -function Hidden() { - return () => { - return; - }; -} -/** - * Document the type of a property or parameter as `integer ($int32)` in generated swagger docs - */ -function IsInt(target, propertyKey, parameterIndex) { - return; -} -/** - * Document the type of a property or parameter as `integer ($int64)` in generated swagger docs - */ -function IsLong(target, propertyKey, parameterIndex) { - return; -} -/** - * Document the type of a property or parameter as `number ($float)` in generated swagger docs - */ -function IsFloat(target, propertyKey, parameterIndex) { - return; -} -/** - * Document the type of a property or parameter as `number ($double)` in generated swagger docs. - * This is the default for `number` types without a specifying decorator. - */ -function IsDouble(target, propertyKey, parameterIndex) { - return; -} -//# sourceMappingURL=decorators.js.map \ No newline at end of file diff --git a/dist/decorators.js.map b/dist/decorators.js.map deleted file mode 100644 index 56845dc..0000000 --- a/dist/decorators.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAyBb,4BAQC;AAmBD,0BAIC;AAgBD,oBAIC;AAKD,4BAIC;AAKD,4BAIC;AAKD,wBAIC;AAKD,sBAMC;AAKD,wBAMC;AAKD,0BAMC;AAMD,4BAMC;AAlJD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAgB,QAAQ,CACtB,IAAqB,EACrB,WAAoB,EACpB,OAAW;IAEX,OAAO,GAAG,EAAE;QACV,OAAO;IACT,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,OAAO,CAAI,OAAU;IACnC,OAAO,GAAG,EAAE;QACV,OAAO;IACT,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,IAAI,CAAC,GAAG,MAAqB;IAC3C,OAAO,GAAG,EAAE;QACV,OAAO;IACT,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,GAAG,MAAqB;IAC/C,OAAO,GAAG,EAAE;QACV,OAAO;IACT,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,GAAG,MAAqB;IAC/C,OAAO,GAAG,EAAE;QACV,OAAO;IACT,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,GAAG,EAAE;QACV,OAAO;IACT,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,KAAK,CACnB,MAAW,EACX,WAAmB,EACnB,cAAuB;IAEvB,OAAO;AACT,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM,CACpB,MAAW,EACX,WAAmB,EACnB,cAAuB;IAEvB,OAAO;AACT,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO,CACrB,MAAW,EACX,WAAmB,EACnB,cAAuB;IAEvB,OAAO;AACT,CAAC;AAED;;;GAGG;AACH,SAAgB,QAAQ,CACtB,MAAW,EACX,WAAmB,EACnB,cAAuB;IAEvB,OAAO;AACT,CAAC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 437b465..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./metadata/metadataGenerator"; -export * from "./swagger/generator"; -export * from "./swagger/swagger"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map deleted file mode 100644 index 4a5189c..0000000 --- a/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,mBAAmB,CAAC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 33979e5..0000000 --- a/dist/index.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./metadata/metadataGenerator"), exports); -__exportStar(require("./swagger/generator"), exports); -__exportStar(require("./swagger/swagger"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 429989f..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,sDAAoC;AAEpC,oDAAkC"} \ No newline at end of file diff --git a/dist/metadata/controllerGenerator.d.ts b/dist/metadata/controllerGenerator.d.ts deleted file mode 100644 index 278a4a8..0000000 --- a/dist/metadata/controllerGenerator.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as ts from "typescript"; -import { EndpointGenerator } from "./endpointGenerator"; -import { Controller } from "./metadataGenerator"; -export declare class ControllerGenerator extends EndpointGenerator { - private readonly pathValue; - private genMethods; - constructor(node: ts.ClassDeclaration); - isValid(): boolean; - generate(): Controller; - protected getCurrentLocation(): string; - private buildMethods; - private buildMethodsForClass; -} -//# sourceMappingURL=controllerGenerator.d.ts.map \ No newline at end of file diff --git a/dist/metadata/controllerGenerator.d.ts.map b/dist/metadata/controllerGenerator.d.ts.map deleted file mode 100644 index 91e7e63..0000000 --- a/dist/metadata/controllerGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"controllerGenerator.d.ts","sourceRoot":"","sources":["../../src/metadata/controllerGenerator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,qBAAa,mBAAoB,SAAQ,iBAAiB,CAAC,EAAE,CAAC,gBAAgB,CAAC;IAC7E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,UAAU,CAAkC;gBAExC,IAAI,EAAE,EAAE,CAAC,gBAAgB;IAO9B,OAAO;IAIP,QAAQ,IAAI,UAAU;IAsC7B,SAAS,CAAC,kBAAkB,IAAI,MAAM;IAItC,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,oBAAoB;CAyB7B"} \ No newline at end of file diff --git a/dist/metadata/controllerGenerator.js b/dist/metadata/controllerGenerator.js deleted file mode 100644 index 8659922..0000000 --- a/dist/metadata/controllerGenerator.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ControllerGenerator = void 0; -const _ = require("lodash"); -const ts = require("typescript"); -const decoratorUtils_1 = require("../utils/decoratorUtils"); -const pathUtils_1 = require("../utils/pathUtils"); -const endpointGenerator_1 = require("./endpointGenerator"); -const methodGenerator_1 = require("./methodGenerator"); -const resolveType_1 = require("./resolveType"); -class ControllerGenerator extends endpointGenerator_1.EndpointGenerator { - pathValue; - genMethods = new Set(); - constructor(node) { - super(node, "controllers"); - this.pathValue = (0, pathUtils_1.normalizePath)((0, decoratorUtils_1.getDecoratorTextValue)(node, (decorator) => decorator.text === "Path")); - } - isValid() { - return !!this.pathValue || this.pathValue === ""; - } - generate() { - if (!this.node.parent) { - throw new Error("Controller node doesn't have a valid parent source file."); - } - if (!this.node.name) { - throw new Error("Controller node doesn't have a valid name."); - } - const sourceFile = this.node.parent.getSourceFile(); - this.debugger("Generating Metadata for controller %s", this.getCurrentLocation()); - this.debugger("Controller path: %s", this.pathValue); - const controllerMetadata = { - consumes: this.getDecoratorValues("Consumes"), - location: sourceFile.fileName, - methods: this.buildMethods(), - name: this.getCurrentLocation(), - path: this.pathValue || "", - produces: this.getDecoratorValues("Produces") - ? this.getDecoratorValues("Produces") - : this.getDecoratorValues("Accept"), - responses: this.getResponses(), - security: this.getSecurity(), - tags: this.getDecoratorValues("Tags"), - }; - this.debugger("Generated Metadata for controller %s: %j", this.getCurrentLocation(), controllerMetadata); - return controllerMetadata; - } - getCurrentLocation() { - return this.node.name?.text ?? ""; - } - buildMethods() { - let result = []; - let targetClass = { - type: this.node, - typeArguments: null, - }; - while (targetClass) { - result = _.union(result, this.buildMethodsForClass(targetClass.type, targetClass.typeArguments)); - targetClass = (0, resolveType_1.getSuperClass)(targetClass.type, targetClass.typeArguments); - } - return result; - } - buildMethodsForClass(node, genericTypeMap) { - return node.members - .filter((m) => m.kind === ts.SyntaxKind.MethodDeclaration) - .filter((m) => !(0, decoratorUtils_1.isDecorator)(m, (decorator) => "Hidden" === decorator.text)) - .map((m) => new methodGenerator_1.MethodGenerator(m, this.pathValue || "", genericTypeMap)) - .filter((generator) => { - if (generator.isValid() && - !this.genMethods.has(generator.getMethodName())) { - this.genMethods.add(generator.getMethodName()); - return true; - } - return false; - }) - .map((generator) => generator.generate()); - } -} -exports.ControllerGenerator = ControllerGenerator; -//# sourceMappingURL=controllerGenerator.js.map \ No newline at end of file diff --git a/dist/metadata/controllerGenerator.js.map b/dist/metadata/controllerGenerator.js.map deleted file mode 100644 index 50dbd39..0000000 --- a/dist/metadata/controllerGenerator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"controllerGenerator.js","sourceRoot":"","sources":["../../src/metadata/controllerGenerator.ts"],"names":[],"mappings":";;;AAAA,4BAA4B;AAC5B,iCAAiC;AACjC,4DAA6E;AAC7E,kDAAmD;AACnD,2DAAwD;AAExD,uDAAoD;AACpD,+CAA8C;AAE9C,MAAa,mBAAoB,SAAQ,qCAAsC;IAC5D,SAAS,CAAqB;IACvC,UAAU,GAAgB,IAAI,GAAG,EAAU,CAAC;IAEpD,YAAY,IAAyB;QACnC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAA,yBAAa,EAC5B,IAAA,sCAAqB,EAAC,IAAI,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,MAAM,CAAC,CACtE,CAAC;IACJ,CAAC;IA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U,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAC/C,CAAC;gBACD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC;gBAC/C,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;aACD,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF;AAnGD,kDAmGC"} \ No newline at end of file diff --git a/dist/metadata/endpointGenerator.d.ts b/dist/metadata/endpointGenerator.d.ts deleted file mode 100644 index bccf57d..0000000 --- a/dist/metadata/endpointGenerator.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as debug from "debug"; -import * as ts from "typescript"; -import { ResponseType } from "./metadataGenerator"; -export declare abstract class EndpointGenerator { - protected node: T; - protected debugger: debug.Debugger; - constructor(node: T, name: string); - protected getDecoratorValues(decoratorName: string, acceptMultiple?: boolean): any[]; - protected getSecurity(): { - name: any; - scopes: string[]; - }[] | undefined; - protected handleRolesArray(argument: ts.ArrayLiteralExpression): Array; - protected getExamplesValue(argument: any): any; - protected getInitializerValue(initializer: any): any; - protected getResponses(genericTypeMap?: Map): Array; - protected abstract getCurrentLocation(): string; -} -//# sourceMappingURL=endpointGenerator.d.ts.map \ No newline at end of file diff --git a/dist/metadata/endpointGenerator.d.ts.map b/dist/metadata/endpointGenerator.d.ts.map deleted file mode 100644 index 3e1e4ea..0000000 --- a/dist/metadata/endpointGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"endpointGenerator.d.ts","sourceRoot":"","sources":["../../src/metadata/endpointGenerator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,8BAAsB,iBAAiB,CAAC,CAAC,SAAS,EAAE,CAAC,IAAI;IACvD,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IAClB,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;gBAEvB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM;IAKjC,SAAS,CAAC,kBAAkB,CAC1B,aAAa,EAAE,MAAM,EACrB,cAAc,GAAE,OAAe;IAyBjC,SAAS,CAAC,WAAW;;;;IAcrB,SAAS,CAAC,gBAAgB,CACxB,QAAQ,EAAE,EAAE,CAAC,sBAAsB,GAClC,KAAK,CAAC,MAAM,CAAC;IAchB,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG;IAkBxC,SAAS,CAAC,mBAAmB,CAAC,WAAW,EAAE,GAAG;IA4B9C,SAAS,CAAC,YAAY,CACpB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,GACxC,KAAK,CAAC,YAAY,CAAC;IA2CtB,SAAS,CAAC,QAAQ,CAAC,kBAAkB,IAAI,MAAM;CAChD"} \ No newline at end of file diff --git a/dist/metadata/endpointGenerator.js b/dist/metadata/endpointGenerator.js deleted file mode 100644 index 9ad441e..0000000 --- a/dist/metadata/endpointGenerator.js +++ /dev/null @@ -1,130 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EndpointGenerator = void 0; -const debug = require("debug"); -const _ = require("lodash"); -const ts = require("typescript"); -const decoratorUtils_1 = require("../utils/decoratorUtils"); -const resolveType_1 = require("./resolveType"); -class EndpointGenerator { - node; - debugger; - constructor(node, name) { - this.node = node; - this.debugger = debug(`typescript-rest-swagger:metadata:${name}`); - } - getDecoratorValues(decoratorName, acceptMultiple = false) { - const decorators = (0, decoratorUtils_1.getDecorators)(this.node, (decorator) => decorator.text === decoratorName); - if (!decorators || !decorators.length) { - return []; - } - if (!acceptMultiple && decorators.length > 1) { - throw new Error(`Only one ${decoratorName} decorator allowed in ${this.getCurrentLocation()}.`); - } - let result; - if (acceptMultiple) { - result = decorators.map((d) => d.arguments); - } - else { - const d = decorators[0]; - result = d.arguments; - } - this.debugger("Arguments of decorator %s: %j", decoratorName, result); - return result; - } - getSecurity() { - const securities = this.getDecoratorValues("Security", true); - if (!securities || !securities.length) { - return undefined; - } - return securities.map((security) => ({ - name: security[1] ? security[1] : "default", - scopes: security[0] - ? _.castArray(this.handleRolesArray(security[0])) - : [], - })); - } - handleRolesArray(argument) { - if (ts.isArrayLiteralExpression(argument)) { - return argument.elements - .map((value) => value.getText()) - .map((val) => val && val.startsWith("'") && val.endsWith("'") - ? val.slice(1, -1) - : val); - } - else { - return argument; - } - } - getExamplesValue(argument) { - let example = {}; - this.debugger(argument); - if (argument.properties) { - argument.properties.forEach((p) => { - example[p.name.text] = this.getInitializerValue(p.initializer); - }); - } - else { - example = this.getInitializerValue(argument); - } - this.debugger("Example extracted for %s: %j", this.getCurrentLocation(), example); - return example; - } - getInitializerValue(initializer) { - switch (initializer.kind) { - case ts.SyntaxKind.ArrayLiteralExpression: - return initializer.elements.map((e) => this.getInitializerValue(e)); - case ts.SyntaxKind.StringLiteral: - return initializer.text; - case ts.SyntaxKind.TrueKeyword: - return true; - case ts.SyntaxKind.FalseKeyword: - return false; - case ts.SyntaxKind.NumberKeyword: - case ts.SyntaxKind.FirstLiteralToken: - return parseInt(initializer.text, 10); - case ts.SyntaxKind.ObjectLiteralExpression: - const nestedObject = {}; - initializer.properties.forEach((p) => { - nestedObject[p.name.text] = this.getInitializerValue(p.initializer); - }); - return nestedObject; - default: - return undefined; - } - } - getResponses(genericTypeMap) { - const decorators = (0, decoratorUtils_1.getDecorators)(this.node, (decorator) => decorator.text === "Response"); - if (!decorators || !decorators.length) { - return []; - } - this.debugger("Generating Responses for %s", this.getCurrentLocation()); - return decorators.map((decorator) => { - let description = ""; - let status = "200"; - let examples; - if (decorator.arguments.length > 0 && decorator.arguments[0]) { - status = decorator.arguments[0]; - } - if (decorator.arguments.length > 1 && decorator.arguments[1]) { - description = decorator.arguments[1]; - } - if (decorator.arguments.length > 2 && decorator.arguments[2]) { - const argument = decorator.arguments[2]; - examples = this.getExamplesValue(argument); - } - const responses = { - description: description, - examples: examples, - schema: decorator.typeArguments && decorator.typeArguments.length > 0 - ? (0, resolveType_1.resolveType)(decorator.typeArguments[0], genericTypeMap) - : undefined, - status: status, - }; - this.debugger("Generated Responses for %s: %j", this.getCurrentLocation(), responses); - return responses; - }); - } -} -exports.EndpointGenerator = EndpointGenerator; -//# sourceMappingURL=endpointGenerator.js.map \ No newline at end of file diff --git a/dist/metadata/endpointGenerator.js.map b/dist/metadata/endpointGenerator.js.map deleted file mode 100644 index 9a61832..0000000 --- a/dist/metadata/endpointGenerator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"endpointGenerator.js","sourceRoot":"","sources":["../../src/metadata/endpointGenerator.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,+BAA+B;AAC/B,4BAA4B;AAC5B,iCAAiC;AACjC,4DAAwD;AAExD,+CAA4C;AAE5C,MAAsB,iBAAiB;IAC3B,IAAI,CAAI;IACR,QAAQ,CAAiB;IAEnC,YAAY,IAAO,EAAE,IAAY;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC;IACpE,CAAC;IAES,kBAAkB,CAC1B,aAAqB,EACrB,iBAA0B,KAAK;QAE/B,MAAM,UAAU,GAAG,IAAA,8BAAa,EAC9B,IAAI,CAAC,IAAI,EACT,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,aAAa,CAChD,CAAC;QACF,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACtC,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,cAAc,I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ist/metadata/keywordKinds.d.ts deleted file mode 100644 index 5945909..0000000 --- a/dist/metadata/keywordKinds.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { SyntaxKind } from "typescript"; -export declare const keywords: SyntaxKind[]; -//# sourceMappingURL=keywordKinds.d.ts.map \ No newline at end of file diff --git a/dist/metadata/keywordKinds.d.ts.map b/dist/metadata/keywordKinds.d.ts.map deleted file mode 100644 index 96d5bae..0000000 --- a/dist/metadata/keywordKinds.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keywordKinds.d.ts","sourceRoot":"","sources":["../../src/metadata/keywordKinds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,QAAQ,cAcpB,CAAC"} \ No newline at end of file diff --git a/dist/metadata/keywordKinds.js b/dist/metadata/keywordKinds.js deleted file mode 100644 index 00f9e54..0000000 --- a/dist/metadata/keywordKinds.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.keywords = void 0; -const typescript_1 = require("typescript"); -exports.keywords = [ - typescript_1.SyntaxKind.AnyKeyword, - typescript_1.SyntaxKind.UnknownKeyword, - typescript_1.SyntaxKind.NumberKeyword, - typescript_1.SyntaxKind.BigIntKeyword, - typescript_1.SyntaxKind.ObjectKeyword, - typescript_1.SyntaxKind.BooleanKeyword, - typescript_1.SyntaxKind.StringKeyword, - typescript_1.SyntaxKind.SymbolKeyword, - typescript_1.SyntaxKind.ThisKeyword, - typescript_1.SyntaxKind.VoidKeyword, - typescript_1.SyntaxKind.UndefinedKeyword, - typescript_1.SyntaxKind.NullKeyword, - typescript_1.SyntaxKind.NeverKeyword, -]; -//# sourceMappingURL=keywordKinds.js.map \ No newline at end of file diff --git a/dist/metadata/keywordKinds.js.map b/dist/metadata/keywordKinds.js.map deleted file mode 100644 index 8866e2a..0000000 --- a/dist/metadata/keywordKinds.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keywordKinds.js","sourceRoot":"","sources":["../../src/metadata/keywordKinds.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,uBAAU,CAAC,UAAU;IACrB,uBAAU,CAAC,cAAc;IACzB,uBAAU,CAAC,aAAa;IACxB,uBAAU,CAAC,aAAa;IACxB,uBAAU,CAAC,aAAa;IACxB,uBAAU,CAAC,cAAc;IACzB,uBAAU,CAAC,aAAa;IACxB,uBAAU,CAAC,aAAa;IACxB,uBAAU,CAAC,WAAW;IACtB,uBAAU,CAAC,WAAW;IACtB,uBAAU,CAAC,gBAAgB;IAC3B,uBAAU,CAAC,WAAW;IACtB,uBAAU,CAAC,YAAY;CACxB,CAAC"} \ No newline at end of file diff --git a/dist/metadata/metadataGenerator.d.ts b/dist/metadata/metadataGenerator.d.ts deleted file mode 100644 index 3521cc8..0000000 --- a/dist/metadata/metadataGenerator.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Project } from "ts-morph"; -import * as ts from "typescript"; -export declare class MetadataGenerator { - private readonly ignorePaths?; - static current: MetadataGenerator; - readonly nodes: ts.Node[]; - readonly typeChecker: ts.TypeChecker; - readonly program: ts.Program; - private referenceTypes; - private circularDependencyResolvers; - private debugger; - morph: Project; - private targetFiles; - constructor(entryFile: string | Array, tsConfigFilePath: string, ignorePaths?: Array | undefined); - generate(): Metadata; - TypeChecker(): ts.TypeChecker; - addReferenceType(referenceType: ReferenceType): void; - getReferenceType(typeName: string): ReferenceType | undefined; - getReferenceTypes(): { - [typeName: string]: ReferenceType; - }; - removeReferenceType(typeName: string): void; - onFinish(callback: (referenceTypes: { - [typeName: string]: ReferenceType; - }) => void): void; - private getSourceFiles; - private buildControllers; -} -export interface Metadata { - controllers: Array; - referenceTypes: { - [typeName: string]: ReferenceType; - }; -} -export interface Controller { - location: string; - methods: Array; - name: string; - path: string; - consumes: Array; - produces: Array; - responses: Array; - tags: Array; - security?: Array; -} -export interface Method { - deprecated?: boolean; - description: string; - method: string; - name: string; - parameters: Array; - path: string; - type: Type; - tags: Array; - responses: Array; - security?: Array; - summary?: string; - consumes: Array; - produces: Array; -} -export interface Parameter { - parameterName: string; - description: string; - in: string; - name: string; - required: boolean; - type: Type; - collectionFormat?: boolean; - allowEmptyValue?: boolean; - default?: any; - maxItems?: number; - minItems?: number; -} -export interface Security { - name: string; - scopes?: Array; -} -export interface Type { - typeName: string; - simpleTypeName?: string; - typeArgument?: Type; -} -export interface EnumerateType extends Type { - enumMembers: Array; -} -export interface UnionType extends Type { - types: Array; -} -export interface ReferenceType extends Type { - description: string; - properties: Array; - originalFileName: any; -} -export interface ObjectType extends Type { - properties: Array; -} -export interface ArrayType extends Type { - elementType: Type; -} -export interface ResponseType { - description: string; - status: string; - schema?: Type; - examples?: any; -} -export interface Property { - description: string; - name: string; - type: Type; - required: boolean; -} -export interface ResponseData { - status: string; - type: Type; -} -//# sourceMappingURL=metadataGenerator.d.ts.map \ No newline at end of file diff --git a/dist/metadata/metadataGenerator.d.ts.map b/dist/metadata/metadataGenerator.d.ts.map deleted file mode 100644 index 9545835..0000000 --- a/dist/metadata/metadataGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metadataGenerator.d.ts","sourceRoot":"","sources":["../../src/metadata/metadataGenerator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAKjC,qBAAa,iBAAiB;IAkB1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;IAjB/B,OAAc,OAAO,EAAE,iBAAiB,CAAC;IACzC,SAAgB,KAAK,YAAwB;IAC7C,SAAgB,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC;IAC5C,SAAgB,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;IACpC,OAAO,CAAC,cAAc,CAEf;IACP,OAAO,CAAC,2BAA2B,CAE/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5B;AAED,MAAM,WAAW,SAAU,SAAQ,IAAI;IACrC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC5B,gBAAgB,EAAE,GAAG,CAAC;CAEvB;AAED,MAAM,WAAW,UAAW,SAAQ,IAAI;IACtC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,SAAU,SAAQ,IAAI;IACrC,WAAW,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;CACZ"} \ No newline at end of file diff --git a/dist/metadata/metadataGenerator.js b/dist/metadata/metadataGenerator.js deleted file mode 100644 index a9ca483..0000000 --- a/dist/metadata/metadataGenerator.js +++ /dev/null @@ -1,113 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MetadataGenerator = void 0; -const debug = require("debug"); -const glob_1 = require("glob"); -const minimatch_1 = require("minimatch"); -const path_1 = require("path"); -const ts_morph_1 = require("ts-morph"); -const ts = require("typescript"); -const decoratorUtils_1 = require("../utils/decoratorUtils"); -const controllerGenerator_1 = require("./controllerGenerator"); -const _ = require("lodash"); -class MetadataGenerator { - ignorePaths; - static current; - nodes = new Array(); - typeChecker; - program; - referenceTypes = {}; - circularDependencyResolvers = new Array(); - debugger = debug("typescript-rest-swagger:metadata"); - morph; - targetFiles; - constructor(entryFile, tsConfigFilePath, ignorePaths) { - this.ignorePaths = ignorePaths; - this.targetFiles = this.getSourceFiles(entryFile); - this.debugger("Starting Metadata Generator"); - this.debugger("Entry File: %j ", entryFile); - this.debugger("Ts Config Path: %j ", tsConfigFilePath); - this.morph = new ts_morph_1.Project({ - tsConfigFilePath: tsConfigFilePath, - }); - this.morph.addSourceFilesAtPaths(entryFile); - MetadataGenerator.current = this; - this.program = this.morph.getProgram().compilerObject; - this.typeChecker = this.program.getTypeChecker(); - } - generate() { - this.program.getSourceFiles().forEach((sf) => { - if (this.ignorePaths && this.ignorePaths.length) { - for (const path of this.ignorePaths) { - if ((0, minimatch_1.match)([sf.fileName], path).length > 0) { - return; - } - } - } - if (sf.fileName.includes("node_modules")) - return; - let matchTargetFile = this.targetFiles.some((targetFile) => { - return (0, path_1.relative)(process.cwd(), sf.fileName).includes(targetFile); - }); - if (!matchTargetFile) - return; - let addNodes = (node) => { - this.nodes.push(node); - if (node.kind === ts.SyntaxKind.ModuleDeclaration || - node.kind === ts.SyntaxKind.ModuleBlock) { - ts.forEachChild(node, addNodes); - } - }; - ts.forEachChild(sf, addNodes); - }); - this.debugger("Building Metadata for controllers Generator"); - const controllers = this.buildControllers(); - this.debugger("Handling circular references"); - this.circularDependencyResolvers.forEach((c) => c(this.referenceTypes)); - return { - controllers: controllers, - referenceTypes: this.referenceTypes, - }; - } - TypeChecker() { - return this.typeChecker; - } - addReferenceType(referenceType) { - this.referenceTypes[referenceType.typeName] = referenceType; - } - getReferenceType(typeName) { - return this.referenceTypes[typeName]; - } - getReferenceTypes() { - return this.referenceTypes; - } - removeReferenceType(typeName) { - delete this.referenceTypes[typeName]; - } - onFinish(callback) { - this.circularDependencyResolvers.push(callback); - } - getSourceFiles(sourceFiles) { - this.debugger("Getting source files from expressions"); - this.debugger("Source file patterns: %j ", sourceFiles); - const sourceFilesExpressions = _.castArray(sourceFiles); - const result = new Set(); - const options = { cwd: process.cwd() }; - sourceFilesExpressions.forEach((pattern) => { - this.debugger("Searching pattern: %s with options: %j", pattern, options); - const matches = glob_1.glob.sync(pattern, options); - matches.forEach((file) => result.add(file)); - }); - return Array.from(result); - } - buildControllers() { - return this.nodes - .filter((node) => node.kind === ts.SyntaxKind.ClassDeclaration) - .filter((node) => !(0, decoratorUtils_1.isDecorator)(node, (decorator) => "Hidden" === decorator.text)) - .map((classDeclaration) => new controllerGenerator_1.ControllerGenerator(classDeclaration)) - .filter((generator) => generator.isValid()) - .map((generator) => generator.generate()); - } -} -exports.MetadataGenerator = MetadataGenerator; -//# sourceMappingURL=metadataGenerator.js.map \ No newline at end of file diff --git a/dist/metadata/metadataGenerator.js.map b/dist/metadata/metadataGenerator.js.map deleted file mode 100644 index 7ed2fa4..0000000 --- a/dist/metadata/metadataGenerator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metadataGenerator.js","sourceRoot":"","sources":["../../src/metadata/metadataGenerator.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+BAA4B;AAC5B,yCAAkC;AAClC,+BAAgC;AAChC,uCAAmC;AACnC,iCAAiC;AACjC,4DAAsD;AACtD,+DAA4D;AAC5D,4BAA6B;AAE7B,MAAa,iBAAiB;IAkBT;IAjBZ,MAAM,CAAC,OAAO,CAAoB;IACzB,KAAK,GAAG,IAAI,KAAK,EAAW,CAAC;IAC7B,WAAW,CAAiB;IAC5B,OAAO,CAAa;IAC5B,cAAc,GAElB,EAAE,CAAC;IACC,2BAA2B,GAAG,IAAI,KAAK,EAE5C,CAAC;IACI,QAAQ,GAAG,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,KAAK,CAAU;IACd,WAAW,CAAW;IAE9B,YACE,SAAiC,EACjC,gBAAwB,EACP,WAA2B;QAA3B,gBAAW,GAAX,WAAW,CAAgB;QAE5C,IAAI,CAAC,WAAW,GAA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,EAAE,EAAE,CAAC,QAAQ,KAAK,SAAS,CAAC,IAAI,CAAC,CACzE;aACA,GAAG,CACF,CAAC,gBAAqC,EAAE,EAAE,CACxC,IAAI,yCAAmB,CAAC,gBAAgB,CAAC,CAC5C;aACA,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;aAC1C,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF;AA9HD,8CA8HC"} \ No newline at end of file diff --git a/dist/metadata/methodGenerator.d.ts b/dist/metadata/methodGenerator.d.ts deleted file mode 100644 index d4b9ba9..0000000 --- a/dist/metadata/methodGenerator.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as ts from "typescript"; -import { EndpointGenerator } from "./endpointGenerator"; -import { Method } from "./metadataGenerator"; -export declare class MethodGenerator extends EndpointGenerator { - private readonly controllerPath; - private readonly genericTypeMap?; - private method; - private path; - constructor(node: ts.MethodDeclaration, controllerPath: string, genericTypeMap?: Map | undefined); - isValid(): boolean; - getMethodName(): string; - generate(): Method; - protected getCurrentLocation(): string; - private buildParameters; - private processMethodDecorators; - private getMethodSuccessResponse; - private getMethodSuccessResponseData; - private getMethodSuccessExamples; - private mergeResponses; - private supportsPathMethod; -} -//# sourceMappingURL=methodGenerator.d.ts.map \ No newline at end of file diff --git a/dist/metadata/methodGenerator.d.ts.map b/dist/metadata/methodGenerator.d.ts.map deleted file mode 100644 index 6a4ea7c..0000000 --- a/dist/metadata/methodGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"methodGenerator.d.ts","sourceRoot":"","sources":["../../src/metadata/methodGenerator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAQjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,MAAM,EAKP,MAAM,qBAAqB,CAAC;AAI7B,qBAAa,eAAgB,SAAQ,iBAAiB,CAAC,EAAE,CAAC,iBAAiB,CAAC;IAMxE,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;IANlC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAS;gBAGnB,IAAI,EAAE,EAAE,CAAC,iBAAiB,EACT,cAAc,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAA;IAMrD,OAAO;IAIP,aAAa;IAKb,QAAQ,IAAI,MAAM;IA+CzB,SAAS,CAAC,kBAAkB;IAO5B,OAAO,CAAC,eAAe;IAqDvB,OAAO,CAAC,uBAAuB;IAkD/B,OAAO,CAAC,wBAAwB;IAUhC,OAAO,CAAC,4BAA4B;IAoBpC,OAAO,CAAC,wBAAwB;IAoBhC,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,kBAAkB;CAK3B"} \ No newline at end of file diff --git a/dist/metadata/methodGenerator.js b/dist/metadata/methodGenerator.js deleted file mode 100644 index 4007572..0000000 --- a/dist/metadata/methodGenerator.js +++ /dev/null @@ -1,187 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MethodGenerator = void 0; -const pathUtil = require("path"); -const decoratorUtils_1 = require("../utils/decoratorUtils"); -const jsDocUtils_1 = require("../utils/jsDocUtils"); -const pathUtils_1 = require("../utils/pathUtils"); -const endpointGenerator_1 = require("./endpointGenerator"); -const parameterGenerator_1 = require("./parameterGenerator"); -const resolveType_1 = require("./resolveType"); -class MethodGenerator extends endpointGenerator_1.EndpointGenerator { - controllerPath; - genericTypeMap; - method; - path; - constructor(node, controllerPath, genericTypeMap) { - super(node, "methods"); - this.controllerPath = controllerPath; - this.genericTypeMap = genericTypeMap; - this.processMethodDecorators(); - } - isValid() { - return !!this.method; - } - getMethodName() { - const identifier = this.node.name; - return identifier.text; - } - generate() { - if (!this.isValid()) { - throw new Error("This isn't a valid controller method."); - } - this.debugger("Generating Metadata for method %s", this.getCurrentLocation()); - // TODO implement implicit return type - // const typeChecker = MetadataGenerator.current.typeChecker; - // const signature = - // typeChecker.getSignatureFromDeclaration(this.node); - // const returnType = typeChecker.getReturnTypeOfSignature(signature); - // const kind = ts.SyntaxKind[this.node.kind]; - const identifier = this.node.name; - const type = (0, resolveType_1.resolveType)(this.node.type, this.genericTypeMap); - const responses = this.mergeResponses(this.getResponses(this.genericTypeMap), this.getMethodSuccessResponse(type)); - const methodMetadata = { - consumes: this.getDecoratorValues("Consumes"), - deprecated: (0, jsDocUtils_1.isExistJSDocTag)(this.node, "deprecated"), - description: (0, jsDocUtils_1.getJSDocDescription)(this.node), - method: this.method, - name: identifier.text, - parameters: this.buildParameters(), - path: this.path, - produces: this.getDecoratorValues("Produces") - ? this.getDecoratorValues("Produces") - : this.getDecoratorValues("Accept"), - responses: responses, - security: this.getSecurity(), - summary: (0, jsDocUtils_1.getJSDocTag)(this.node, "summary"), - tags: this.getDecoratorValues("Tags"), - type: type, - }; - this.debugger("Generated Metadata for method %s: %j", this.getCurrentLocation(), methodMetadata); - return methodMetadata; - } - getCurrentLocation() { - const methodId = this.node.name; - const controllerId = this.node.parent - .name; - return `${controllerId.text}.${methodId.text}`; - } - buildParameters() { - this.debugger("Processing method %s parameters.", this.getCurrentLocation()); - const parameters = this.node.parameters - .map((p) => { - try { - const path = pathUtil.posix.join("/", this.controllerPath ? this.controllerPath : "", this.path); - return new parameterGenerator_1.ParameterGenerator(p, this.method, path, this.genericTypeMap).generate(); - } - catch (e) { - const methodId = this.node.name; - const controllerId = this.node.parent - .name; - const parameterId = p.name; - throw new Error(`Error generate parameter method: '${controllerId.text}.${methodId.text}' argument: ${parameterId.text} ${e} \n ${e.stack}`); - } - }) - .filter((p) => p && p.in !== "context" && p.in !== "cookie"); - const bodyParameters = parameters.filter((p) => p && p.in === "body"); - const formParameters = parameters.filter((p) => p && p.in === "formData"); - if (bodyParameters.length > 1) { - throw new Error(`Only one body parameter allowed in '${this.getCurrentLocation()}' method.`); - } - if (bodyParameters.length > 0 && formParameters.length > 0) { - throw new Error(`Choose either during @FormParam and @FileParam or body parameter in '${this.getCurrentLocation()}' method.`); - } - this.debugger("Parameters list for method %s: %j.", this.getCurrentLocation(), parameters); - return parameters; - } - processMethodDecorators() { - const httpMethodDecorators = (0, decoratorUtils_1.getDecorators)(this.node, (decorator) => this.supportsPathMethod(decorator.text)); - if (!httpMethodDecorators || !httpMethodDecorators.length) { - return; - } - if (httpMethodDecorators.length > 1) { - throw new Error(`Only one HTTP Method decorator in '${this.getCurrentLocation}' method is acceptable, Found: ${httpMethodDecorators - .map((d) => d.text) - .join(", ")}`); - } - const methodDecorator = httpMethodDecorators[0]; - this.method = methodDecorator.text.toLowerCase(); - this.debugger("Processing method %s decorators.", this.getCurrentLocation()); - const pathDecorators = (0, decoratorUtils_1.getDecorators)(this.node, (decorator) => decorator.text === "Path"); - if (pathDecorators && pathDecorators.length > 1) { - throw new Error(`Only one Path decorator in '${this.getCurrentLocation}' method is acceptable, Found: ${httpMethodDecorators - .map((d) => d.text) - .join(", ")}`); - } - if (pathDecorators) { - const pathDecorator = pathDecorators[0]; - this.path = pathDecorator - ? `/${(0, pathUtils_1.normalizePath)(pathDecorator.arguments[0])}` - : ""; - } - else { - this.path = ""; - } - this.debugger("Mapping endpoint %s %s", this.method, this.path); - } - getMethodSuccessResponse(type) { - const responseData = this.getMethodSuccessResponseData(type); - return { - description: type.typeName === "void" ? "No content" : "Ok", - examples: this.getMethodSuccessExamples(), - schema: responseData.type, - status: responseData.status, - }; - } - getMethodSuccessResponseData(type) { - switch (type.simpleTypeName) { - case "void": - return { status: "204", type: type }; - case "NewResource": - return { status: "201", type: type.typeArgument || type }; - case "RequestAccepted": - return { status: "202", type: type.typeArgument || type }; - case "MovedPermanently": - return { status: "301", type: type.typeArgument || type }; - case "MovedTemporarily": - return { status: "302", type: type.typeArgument || type }; - case "DownloadResource": - case "DownloadBinaryData": - return { status: "200", type: { typeName: "buffer" } }; - default: - return { status: "200", type: type }; - } - } - getMethodSuccessExamples() { - const exampleDecorators = (0, decoratorUtils_1.getDecorators)(this.node, (decorator) => decorator.text === "Example"); - if (!exampleDecorators || !exampleDecorators.length) { - return undefined; - } - if (exampleDecorators.length > 1) { - throw new Error(`Only one Example decorator allowed in '${this.getCurrentLocation}' method.`); - } - const d = exampleDecorators[0]; - const argument = d.arguments[0]; - return this.getExamplesValue(argument); - } - mergeResponses(responses, defaultResponse) { - if (!responses || !responses.length) { - return [defaultResponse]; - } - const index = responses.findIndex((resp) => resp.status === defaultResponse.status); - if (index >= 0) { - if (defaultResponse.examples && !responses[index].examples) { - responses[index].examples = defaultResponse.examples; - } - } - else { - responses.push(defaultResponse); - } - return responses; - } - supportsPathMethod(method) { - return ["GET", "POST", "PATCH", "DELETE", "PUT", "OPTIONS", "HEAD"].some((m) => m === method); - } -} -exports.MethodGenerator = MethodGenerator; -//# sourceMappingURL=methodGenerator.js.map \ No newline at end of file diff --git a/dist/metadata/methodGenerator.js.map b/dist/metadata/methodGenerator.js.map deleted file mode 100644 index c43cbb2..0000000 --- a/dist/metadata/methodGenerator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"methodGenerator.js","sourceRoot":"","sources":["../../src/metadata/methodGenerator.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,4DAAwD;AACxD,oDAI6B;AAC7B,kDAAmD;AACnD,2DAAwD;AAQxD,6DAA0D;AAC1D,+CAA4C;AAE5C,MAAa,eAAgB,SAAQ,qCAAuC;IAMvD;IACA;IANX,MAAM,CAAS;IACf,IAAI,CAAS;IAErB,YACE,IAA0B,EACT,cAAsB,EACtB,cAAyC;QAE1D,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAHN,mBAAc,GAAd,cAAc,CAAQ;QACtB,mBAAc,GAAd,cAAc,CAA2B;QAG1D,IA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3B,CAAC;QAED,MAAM,KAAK,GAAG,SAAS,CAAC,SAAS,CAC/B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,eAAe,CAAC,MAAM,CACjD,CAAC;QAEF,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YACf,IAAI,eAAe,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;gBAC3D,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;YACvD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAClC,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,kBAAkB,CAAC,MAAc;QACvC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,IAAI,CACtE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CACpB,CAAC;IACJ,CAAC;CACF;AAhQD,0CAgQC"} \ No newline at end of file diff --git a/dist/metadata/parameterGenerator.d.ts b/dist/metadata/parameterGenerator.d.ts deleted file mode 100644 index 73ddbcb..0000000 --- a/dist/metadata/parameterGenerator.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as ts from "typescript"; -import { Parameter } from "./metadataGenerator"; -export declare class ParameterGenerator { - private readonly parameter; - private readonly method; - private readonly path; - private readonly genericTypeMap?; - constructor(parameter: ts.ParameterDeclaration, method: string, path: string, genericTypeMap?: Map | undefined); - generate(): Parameter | undefined; - private getCurrentLocation; - private getRequestParameter; - private getContextParameter; - private getCookieParameter; - private getBodyParameter; - private getHeaderParameter; - private getQueryParameter; - isRequired(parameter: ts.ParameterDeclaration): boolean; - private getPathParameter; - private getParameterDescription; - private supportsBodyParameters; - private supportParameterDecorator; - private supportPathDataType; - private supportQueryDataType; - private getValidatedType; - private getDefaultValue; -} -//# sourceMappingURL=parameterGenerator.d.ts.map \ No newline at end of file diff --git a/dist/metadata/parameterGenerator.d.ts.map b/dist/metadata/parameterGenerator.d.ts.map deleted file mode 100644 index 860ac07..0000000 --- a/dist/metadata/parameterGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parameterGenerator.d.ts","sourceRoot":"","sources":["../../src/metadata/parameterGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,OAAO,EAAqB,SAAS,EAAQ,MAAM,qBAAqB,CAAC;AAOzE,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;gBAHf,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAClC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAA;IAGrD,QAAQ,IAAI,SAAS,GAAG,SAAS;IAkCxC,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,mBAAmB;IAuB3B,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,kBAAkB;IAsB1B,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,kBAAkB;IAwB1B,OAAO,CAAC,iBAAiB;IAsCzB,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC,oBAAoB,GAAG,OAAO;IAWvD,OAAO,CAAC,gBAAgB;IAiCxB,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,yBAAyB;IAmBjC,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,eAAe;CAMxB"} \ No newline at end of file diff --git a/dist/metadata/parameterGenerator.js b/dist/metadata/parameterGenerator.js deleted file mode 100644 index de2a081..0000000 --- a/dist/metadata/parameterGenerator.js +++ /dev/null @@ -1,256 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParameterGenerator = void 0; -const ts = require("typescript"); -const decoratorUtils_1 = require("../utils/decoratorUtils"); -const metadataGenerator_1 = require("./metadataGenerator"); -const resolveType_1 = require("./resolveType"); -class ParameterGenerator { - parameter; - method; - path; - genericTypeMap; - constructor(parameter, method, path, genericTypeMap) { - this.parameter = parameter; - this.method = method; - this.path = path; - this.genericTypeMap = genericTypeMap; - } - generate() { - const decoratorName = (0, decoratorUtils_1.getDecoratorName)(this.parameter, (identifier) => this.supportParameterDecorator(identifier.text)); - switch (decoratorName) { - case "Param": - return this.getRequestParameter(this.parameter); - case "CookieParam": - return this.getCookieParameter(this.parameter); - case "FormParam": - return undefined; // this.getFormParameter(this.parameter); - case "HeaderParam": - return this.getHeaderParameter(this.parameter); - case "QueryParam": - return this.getQueryParameter(this.parameter); - case "PathParam": - return this.getPathParameter(this.parameter); - case "FileParam": - return undefined; // this.getFileParameter(this.parameter); - case "FilesParam": - return undefined; // this.getFilesParameter(this.parameter); - case "Context": - case "ContextRequest": - case "ContextResponse": - case "ContextNext": - case "ContextLanguage": - case "ContextAccept": - return this.getContextParameter(this.parameter); - default: - return this.getBodyParameter(this.parameter); - } - } - getCurrentLocation() { - const methodId = this.parameter.parent - .name; - const controllerId = this.parameter.parent - .parent.name; - return `${controllerId.text}.${methodId.text}`; - } - getRequestParameter(parameter) { - const parameterName = parameter.name.text; - const type = this.getValidatedType(parameter); - if (!this.supportsBodyParameters(this.method)) { - throw new Error(`Param can't support '${this.getCurrentLocation()}' method.`); - } - return { - description: this.getParameterDescription(parameter), - in: "param", - name: (0, decoratorUtils_1.getDecoratorTextValue)(this.parameter, (ident) => ident.text === "Param") || parameterName, - parameterName: parameterName, - required: this.isRequired(parameter), - type: type, - }; - } - getContextParameter(parameter) { - const parameterName = parameter.name.text; - return { - description: this.getParameterDescription(parameter), - in: "context", - name: parameterName, - parameterName: parameterName, - required: this.isRequired(parameter), - type: { typeName: "" }, - }; - } - getCookieParameter(parameter) { - const parameterName = parameter.name.text; - // const type = this.getValidatedType(parameter); - // if (!this.supportPathDataType(type)) { - // throw new Error(`Cookie can't support '${this.getCurrentLocation()}' method.`); - // } - return { - description: this.getParameterDescription(parameter), - in: "cookie", - name: (0, decoratorUtils_1.getDecoratorTextValue)(this.parameter, (ident) => ident.text === "CookieParam") || parameterName, - parameterName: parameterName, - required: this.isRequired(parameter), - type: { typeName: "" }, - }; - } - getBodyParameter(parameter) { - const parameterName = parameter.name.text; - const type = this.getValidatedType(parameter); - if (!this.supportsBodyParameters(this.method)) { - throw new Error(`Body can't support ${this.method} method`); - } - return { - description: this.getParameterDescription(parameter), - in: "body", - name: parameterName, - parameterName: parameterName, - required: this.isRequired(parameter), - type: type, - }; - } - getHeaderParameter(parameter) { - const parameterName = parameter.name.text; - const type = this.getValidatedType(parameter); - if (!this.supportPathDataType(type)) { - throw new InvalidParameterException(`Parameter '${parameterName}' can't be passed as a header parameter in '${this.getCurrentLocation()}'.`); - } - return { - description: this.getParameterDescription(parameter), - in: "header", - name: (0, decoratorUtils_1.getDecoratorTextValue)(this.parameter, (ident) => ident.text === "HeaderParam") || parameterName, - parameterName: parameterName, - required: this.isRequired(parameter), - type: type, - }; - } - getQueryParameter(parameter) { - const parameterName = parameter.name.text; - const parameterOptions = (0, decoratorUtils_1.getDecoratorOptions)(this.parameter, (ident) => ident.text === "QueryParam") || {}; - let type = this.getValidatedType(parameter); - if (!this.supportQueryDataType(type)) { - const arrayType = (0, resolveType_1.getCommonPrimitiveAndArrayUnionType)(parameter.type); - if (arrayType && this.supportQueryDataType(arrayType)) { - type = arrayType; - } - else { - throw new InvalidParameterException(`Parameter '${parameterName}' can't be passed as a query parameter in '${this.getCurrentLocation()}'.`); - } - } - return { - // allowEmptyValue: parameterOptions.allowEmptyValue, - collectionFormat: parameterOptions.collectionFormat, - default: this.getDefaultValue(parameter.initializer), - description: this.getParameterDescription(parameter), - in: "query", - // maxItems: parameterOptions.maxItems, - // minItems: parameterOptions.minItems, - name: (0, decoratorUtils_1.getDecoratorTextValue)(this.parameter, (ident) => ident.text === "QueryParam") || parameterName, - parameterName: parameterName, - required: this.isRequired(parameter), - type: type, - }; - } - isRequired(parameter) { - let isUndefinedUnion = parameter.type?.kind === ts.SyntaxKind.UnionType && - parameter.type.types.some((t) => t.kind === ts.SyntaxKind.UndefinedKeyword); - return (!parameter.questionToken && !parameter.initializer && !isUndefinedUnion); - } - getPathParameter(parameter) { - const parameterName = parameter.name.text; - const type = this.getValidatedType(parameter); - const pathName = (0, decoratorUtils_1.getDecoratorTextValue)(this.parameter, (ident) => ident.text === "PathParam") || parameterName; - if (!this.supportPathDataType(type)) { - throw new InvalidParameterException(`Parameter '${parameterName}:${type}' can't be passed as a path parameter in '${this.getCurrentLocation()}'.`); - } - if (!this.path.includes(`{${pathName}}`) && - !this.path.includes(`:${pathName}`)) { - throw new Error(`Parameter '${parameterName}' can't match in path: '${this.path}'`); - } - return { - description: this.getParameterDescription(parameter), - in: "path", - name: pathName, - parameterName: parameterName, - required: true, - type: type, - }; - } - getParameterDescription(node) { - const symbol = metadataGenerator_1.MetadataGenerator.current.typeChecker.getSymbolAtLocation(node.name); - if (symbol) { - const comments = symbol.getDocumentationComment(metadataGenerator_1.MetadataGenerator.current.typeChecker); - if (comments.length) { - return ts.displayPartsToString(comments); - } - } - return ""; - } - supportsBodyParameters(method) { - return ["delete", "post", "put", "patch"].some((m) => m === method); - } - supportParameterDecorator(decoratorName) { - return [ - "HeaderParam", - "QueryParam", - "Param", - "FileParam", - "PathParam", - "FilesParam", - "FormParam", - "CookieParam", - "Context", - "ContextRequest", - "ContextResponse", - "ContextNext", - "ContextLanguage", - "ContextAccept", - ].some((d) => d === decoratorName); - } - supportPathDataType(parameterType) { - return [ - "string", - "integer", - "long", - "float", - "double", - "date", - "datetime", - "buffer", - "boolean", - "enum", - ].find((t) => t === parameterType.typeName); - } - supportQueryDataType(parameterType) { - // Copied from supportPathDataType and added 'array'. Not sure if all options apply to queries, but kept to avoid breaking change. - return [ - "string", - "integer", - "long", - "float", - "double", - "date", - "datetime", - "buffer", - "boolean", - "enum", - "array", - ].find((t) => t === parameterType.typeName); - } - getValidatedType(parameter) { - if (!parameter.type) { - throw new Error(`Parameter ${parameter.name} doesn't have a valid type assigned in '${this.getCurrentLocation()}'.`); - } - return (0, resolveType_1.resolveType)(parameter.type, this.genericTypeMap); - } - getDefaultValue(initializer) { - if (!initializer) { - return; - } - return (0, resolveType_1.getLiteralValue)(initializer); - } -} -exports.ParameterGenerator = ParameterGenerator; -class InvalidParameterException extends Error { -} -//# sourceMappingURL=parameterGenerator.js.map \ No newline at end of file diff --git a/dist/metadata/parameterGenerator.js.map b/dist/metadata/parameterGenerator.js.map deleted file mode 100644 index 7f747df..0000000 --- a/dist/metadata/parameterGenerator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parameterGenerator.js","sourceRoot":"","sources":["../../src/metadata/parameterGenerator.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,4DAIiC;AACjC,2DAAyE;AACzE,+CAIuB;AAEvB,MAAa,kBAAkB;IAEV;IACA;IACA;IACA;IAJnB,YACmB,SAAkC,EAClC,MAAc,EACd,IAAY,EACZ,cAAyC;QAHzC,cAAS,GAAT,SAAS,CAAyB;QAClC,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QACZ,mBAAc,GAAd,cAAc,CAA2B;IACzD,CAAC;IAEG,QAAQ;QACb,MAAM,aAAa,GAAG,IAAA,iCAAgB,EAAC,IAAI,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,EAAE,CACpE,IAAI,CAAC,yBAAyB,CAAC,UA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K;CAAG"} \ No newline at end of file diff --git a/dist/metadata/resolveType.d.ts b/dist/metadata/resolveType.d.ts deleted file mode 100644 index 64f2f19..0000000 --- a/dist/metadata/resolveType.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as ts from "typescript"; -import { Type } from "./metadataGenerator"; -type UsableDeclaration = ts.InterfaceDeclaration | ts.ClassDeclaration | ts.TypeAliasDeclaration; -export declare function resolveType(typeNode?: ts.TypeNode, genericTypeMap?: Map): Type; -export declare function getSuperClass(node: ts.ClassDeclaration, typeArguments?: Map): { - type: UsableDeclaration; - typeArguments: Map; -} | undefined; -/** - * Used to identify union types of a primitive and array of the same primitive, e.g. `string | string[]` - */ -export declare function getCommonPrimitiveAndArrayUnionType(typeNode?: ts.TypeNode): Type | null; -export declare function getLiteralValue(expression: ts.Expression): any; -export declare function resolveImports(node: T): T; -export {}; -//# sourceMappingURL=resolveType.d.ts.map \ No newline at end of file diff --git a/dist/metadata/resolveType.d.ts.map b/dist/metadata/resolveType.d.ts.map deleted file mode 100644 index 71a6167..0000000 --- a/dist/metadata/resolveType.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolveType.d.ts","sourceRoot":"","sources":["../../src/metadata/resolveType.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,EAOL,IAAI,EAEL,MAAM,qBAAqB,CAAC;AAW7B,KAAK,iBAAiB,GAClB,EAAE,CAAC,oBAAoB,GACvB,EAAE,CAAC,gBAAgB,GACnB,EAAE,CAAC,oBAAoB,CAAC;AAC5B,wBAAgB,WAAW,CACzB,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,EACtB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,GACxC,IAAI,CA6PN;AAkbD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,EAAE,CAAC,gBAAgB,EACzB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC;;;cA6BzC;AAiCD;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,GACrB,IAAI,GAAG,IAAI,CAuBb;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,GAAG,CAmB9D;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAY5C"} \ No newline at end of file diff --git a/dist/metadata/resolveType.js b/dist/metadata/resolveType.js deleted file mode 100644 index 0e0562c..0000000 --- a/dist/metadata/resolveType.js +++ /dev/null @@ -1,640 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveType = resolveType; -exports.getSuperClass = getSuperClass; -exports.getCommonPrimitiveAndArrayUnionType = getCommonPrimitiveAndArrayUnionType; -exports.getLiteralValue = getLiteralValue; -exports.resolveImports = resolveImports; -const _ = require("lodash"); -const path_1 = require("path"); -const ts = require("typescript"); -const decoratorUtils_1 = require("../utils/decoratorUtils"); -const jsDocUtils_1 = require("../utils/jsDocUtils"); -const metadataGenerator_1 = require("./metadataGenerator"); -let timer = 0; -const syntaxKindMap = {}; -syntaxKindMap[ts.SyntaxKind.NumberKeyword] = "number"; -syntaxKindMap[ts.SyntaxKind.StringKeyword] = "string"; -syntaxKindMap[ts.SyntaxKind.BooleanKeyword] = "boolean"; -syntaxKindMap[ts.SyntaxKind.VoidKeyword] = "void"; -syntaxKindMap[ts.SyntaxKind.UndefinedKeyword] = "undefined"; -function resolveType(typeNode, genericTypeMap) { - if (!typeNode) { - return { typeName: "void" }; - } - if (typeNode.kind === ts.SyntaxKind.FunctionType) { - return { typeName: "void" }; - } - const primitiveType = getPrimitiveType(typeNode); - if (primitiveType) { - return primitiveType; - } - if (typeNode.kind === ts.SyntaxKind.ArrayType) { - const arrayType = typeNode; - return { - elementType: resolveType(arrayType.elementType, genericTypeMap), - typeName: "array", - }; - } - if (typeNode.kind === ts.SyntaxKind.AnyKeyword || - typeNode.kind === ts.SyntaxKind.ObjectKeyword || - typeNode.kind === ts.SyntaxKind.UnknownKeyword) { - return { typeName: "object" }; - } - if (typeNode.kind === ts.SyntaxKind.TypeLiteral) { - return getInlineObjectType(typeNode); - } - if (typeNode.kind === ts.SyntaxKind.LiteralType) { - return resolveLiteralType(typeNode.literal); - } - if (typeNode.kind === ts.SyntaxKind.UnionType) { - return getUnionType(typeNode); - } - if (typeNode.kind === ts.SyntaxKind.ParenthesizedType) { - return getUnionType(typeNode.type); - } - if (typeNode.kind !== ts.SyntaxKind.TypeReference && - typeNode.kind !== ts.SyntaxKind.ExpressionWithTypeArguments && - typeNode.kind !== ts.SyntaxKind.ExpressionStatement) { - throw new Error(`Unknown type: ${ts.SyntaxKind[typeNode.kind]} with name ${typeNode.getText()}`); - } - const typeReference = typeNode; - const typeNameNode = "expression" in typeReference - ? typeReference.expression - : typeReference.typeName; - const typeName = resolveSimpleTypeName(typeNameNode); - const namedType = resolveSpecialTypesByName(typeName, typeNode, genericTypeMap); - if (namedType) { - return namedType; - } - const enumType = getEnumerateType(typeNameNode); - if (enumType) { - return enumType; - } - let referenceType; - const sourceFile = getSourceFile(typeNode); - const tmpFileName = _.uniqueId("__tmp_") + ".ts"; - const fullTypeName = typeNode.getText(); - const fullRefTypeName = replaceNameText(fullTypeName); - const refType = metadataGenerator_1.MetadataGenerator.current.getReferenceType(fullRefTypeName); - const symbol = metadataGenerator_1.MetadataGenerator.current.typeChecker.getSymbolAtLocation(typeNameNode); - let originalDeclarationFileName = sourceFile.fileName; - if (symbol) { - originalDeclarationFileName = - getOriginalSourceFile(symbol) ?? sourceFile.fileName; - } - // if (refType && refType?.originalFileName !== originalDeclarationFileName) { - // throw new Error(`reference type ${fullRefTypeName} with same name but different properties. Please use different names for different types.`) - // } else if (refType) { - // return refType; - // } - const newTmpSourceFile = ` - - ${sourceFile.getFullText()} - - type __Simplify = { [KeyType in keyof T]: T[KeyType] } & {}; - - type __Result = __Simplify<${fullTypeName}>; - - type __Original = ${fullTypeName}; - - `; - const tmpSourceFile = metadataGenerator_1.MetadataGenerator.current.morph.createSourceFile((0, path_1.dirname)(sourceFile.fileName) + "/" + tmpFileName, newTmpSourceFile); - const statement = tmpSourceFile.getStatements().at(-2); - const originalStatement = tmpSourceFile.getStatements().at(-1); - const type = statement.getType(); - if (type.isUnion()) { - let unionType = { - types: (originalStatement.getType().compilerType.aliasSymbol - ?.declarations?.[0]).type.types - .map((t) => { - return resolveType(t); - }) - .filter((p) => p !== undefined), - typeName: typeName, - }; - return unionType; - } - if (!type.isObject()) { - const declaration = symbol?.declarations?.[0]; - if (!declaration) { - throw new Error("Could not resolve declaration of Object"); - } - if ("type" in declaration) { - return resolveType(declaration.type); - } - let originalType = originalStatement.getType(); - switch (true) { - case originalType.isString(): - return { typeName: "string" }; - case originalType.isNumber(): - return { typeName: "double" }; - case originalType.isBoolean(): - return { typeName: "boolean" }; - case originalType.isNull(): - case originalType.isUndefined(): - return { typeName: "void" }; - } - } - const specialTypeNameAfterReference = type.compilerType.symbol?.escapedName.toString(); - const checker = metadataGenerator_1.MetadataGenerator.current.typeChecker; - const typeNodeType = checker.getTypeAtLocation(typeNode); - if ("node" in typeNodeType) { - const specialTypeAfterReference = resolveSpecialTypesByName(specialTypeNameAfterReference, typeNodeType.node, genericTypeMap); - if (specialTypeAfterReference) { - return specialTypeAfterReference; - } - } - const typeArguments = typeReference.typeArguments; - const originalType = metadataGenerator_1.MetadataGenerator.current.typeChecker.getTypeAtLocation(typeReference); - const typeArgumentsMap = {}; - if (typeArguments?.length ?? 0 > 0) { - const typeParameter = (originalType.symbol.declarations?.[0]).typeParameters; - const typeParameterNames = typeParameter?.map((typeParam) => typeParam.name.getText()); - typeParameterNames?.forEach((param, index) => { - typeArgumentsMap[param] = - typeArguments?.[index] ?? typeParameter?.[index].default; - }); - } - const typeProperties = type.getProperties(); - const properties = typeProperties - .map((property) => { - const declaration = property.getDeclarations()[0] - .compilerNode; - if (declaration.kind) { - const name = property.getName(); - let type; - if (ts.isTypeReferenceNode(declaration.type)) { - type = resolveType(typeArgumentsMap[declaration.type.typeName.getText()] ?? - declaration.type); - } - else { - type = resolveType(declaration.type); - } - const questionMark = !!declaration.questionToken; - const undefinedUnion = declaration.type.kind === ts.SyntaxKind.UnionType && - declaration.type.types.some((t) => t.kind === ts.SyntaxKind.UndefinedKeyword); - const required = !questionMark && !undefinedUnion; - // MetadataGenerator.current.morph.removeSourceFile(tmpSourceFile); - return { - description: "", - name: name, - required: required, - type, - }; - } - return undefined; - }) - .filter((p) => p && p.type.typeName !== "void"); - referenceType = { - description: "", - properties, - typeName: replaceNameText(fullTypeName), - simpleTypeName: typeName, - originalFileName: originalDeclarationFileName, - }; - metadataGenerator_1.MetadataGenerator.current.morph.removeSourceFile(tmpSourceFile); - metadataGenerator_1.MetadataGenerator.current.addReferenceType(referenceType); - return referenceType; -} -function resolveSpecialTypesByName(typeName, typeNode, genericTypeMap) { - const typeReference = typeNode; - if (typeName === "Date") { - return getDateType(typeNode); - } - if (typeName === "Buffer") { - return { typeName: "buffer" }; - } - if (typeName === "DownloadBinaryData") { - return { typeName: "buffer" }; - } - if (typeName === "DownloadResource") { - return { typeName: "buffer" }; - } - if (typeName === "Promise") { - return resolveType(typeReference.typeArguments?.[0], genericTypeMap); - } - if (typeName === "Array") { - return { - elementType: resolveType(typeReference.typeArguments?.[0], genericTypeMap), - typeName: "array", - }; - } - if (typeName === "Record") { - return { typeName: "object" }; - } - return undefined; -} -function getPrimitiveType(typeNode) { - const primitiveType = syntaxKindMap[typeNode.kind]; - if (!primitiveType) { - return undefined; - } - if (primitiveType === "number") { - const parentNode = typeNode.parent; - if (!parentNode) { - return { typeName: "double" }; - } - const validDecorators = ["IsInt", "IsLong", "IsFloat", "IsDouble"]; - // Can't use decorators on interface/type properties, so support getting the type from jsdoc too. - const jsdocTagName = (0, jsDocUtils_1.getFirstMatchingJSDocTagName)(parentNode, (tag) => { - return validDecorators.some((t) => t === tag.tagName.text); - }); - const decoratorName = (0, decoratorUtils_1.getDecoratorName)(parentNode, (identifier) => { - return validDecorators.some((m) => m === identifier.text); - }); - switch (decoratorName || jsdocTagName) { - case "IsInt": - return { typeName: "integer" }; - case "IsLong": - return { typeName: "long" }; - case "IsFloat": - return { typeName: "float" }; - case "IsDouble": - return { typeName: "double" }; - default: - return { typeName: "double" }; - } - } - return { typeName: primitiveType }; -} -function getDateType(typeNode) { - const parentNode = typeNode.parent; - if (!parentNode) { - return { typeName: "datetime" }; - } - const decoratorName = (0, decoratorUtils_1.getDecoratorName)(parentNode, (identifier) => { - return ["IsDate", "IsDateTime"].some((m) => m === identifier.text); - }); - switch (decoratorName) { - case "IsDate": - return { typeName: "date" }; - case "IsDateTime": - return { typeName: "datetime" }; - default: - return { typeName: "datetime" }; - } -} -function getEnumerateType(typeNameNode) { - let enumDeclaration = metadataGenerator_1.MetadataGenerator.current.typeChecker.getSymbolAtLocation(typeNameNode) - ?.declarations?.[0]; - enumDeclaration = resolveImports(enumDeclaration); - if (enumDeclaration?.kind !== ts.SyntaxKind.EnumDeclaration) { - return undefined; - } - function getEnumValue(member) { - const initializer = member.initializer; - if (initializer) { - if (initializer.expression) { - return parseEnumValueByKind(initializer.expression.text, initializer.kind); - } - return parseEnumValueByKind(initializer.text, initializer.kind); - } - return; - } - return { - enumMembers: enumDeclaration.members.map((member, index) => { - return getEnumValue(member) || index; - }), - typeName: "enum", - }; -} -function parseEnumValueByKind(value, kind) { - return kind === ts.SyntaxKind.NumericLiteral ? parseFloat(value) : value; -} -function getUnionType(typeNode) { - const union = typeNode; - let baseType; - let isObject = false; - const types = union.types.filter((t) => t.kind !== ts.SyntaxKind.UndefinedKeyword); - if (types.length === 1) { - return resolveType(types[0]); - } - union.types.map((type) => { - if (!baseType) { - baseType = type; - } - const prim = getPrimitiveType(type); - if (baseType.kind !== type.kind || !prim) { - isObject = true; - } - }); - if (isObject) { - const mapedTypes = union.types.map((type) => { - return resolveType(type); - }); - return { typeName: "", types: mapedTypes }; - } - return { - enumMembers: union.types.map((type, index) => { - return type.getText() ? removeQuotes(type.getText()) : index; - }), - typeName: "enum", - }; -} -function removeQuotes(str) { - return str.replace(/^["']|["']$/g, ""); -} -function getInlineObjectType(typeNode) { - const type = { - properties: getModelTypeProperties(typeNode), - typeName: "", - }; - return type; -} -function resolveLiteralType(literalTypeNode) { - return { - enumMembers: [literalTypeNode.text], - typeName: "enum", - }; -} -function resolveSimpleTypeName(type) { - if (type.kind === ts.SyntaxKind.Identifier) { - return type.text; - } - const qualifiedType = type; - return qualifiedType.right.text; -} -function getTypeName(typeName) { - return replaceNameText(typeName.parent.getText()); -} -function replaceNameText(text = "") { - return text - .replace(/\/g, "-") - .replace(/\,/g, ".") - .replace(/\|/g, "_or_") - .replace(/\[\]/g, "Array") - .replace(/[^A-Z|a-z|0-9|_|\-|.]/g, ""); -} -function getModelTypeProperties(node, genericTypes) { - if (node.kind === ts.SyntaxKind.TypeLiteral || - node.kind === ts.SyntaxKind.InterfaceDeclaration) { - const interfaceDeclaration = node; - return interfaceDeclaration.members - .filter((member) => { - if (member.type && - member.type.kind === ts.SyntaxKind.FunctionType) { - return false; - } - return member.kind === ts.SyntaxKind.PropertySignature; - }) - .map((member) => { - const propertyDeclaration = member; - const identifier = propertyDeclaration.name; - if (!propertyDeclaration.type) { - throw new Error("No valid type found for property declaration."); - } - // Declare a variable that can be overridden if needed - let aType = propertyDeclaration.type; - // aType.kind will always be a TypeReference when the property of Interface is of type T - if (aType.kind === ts.SyntaxKind.TypeReference && - genericTypes && - genericTypes.length && - node.typeParameters) { - // The type definitions are conviently located on the object which allow us to map -> to the genericTypes - const typeParams = _.map(node.typeParameters, (typeParam) => { - return typeParam.name.text; - }); - // I am not sure in what cases - const typeIdentifier = aType.typeName; - let typeIdentifierName; - // typeIdentifier can either be a Identifier or a QualifiedName - if (typeIdentifier.text) { - typeIdentifierName = typeIdentifier.text; - } - else { - typeIdentifierName = typeIdentifier.right - .text; - } - // I could not produce a situation where this did not find it so its possible this check is irrelevant - const indexOfType = _.indexOf(typeParams, typeIdentifierName); - if (indexOfType >= 0) { - aType = genericTypes[indexOfType]; - } - } - return { - description: getNodeDescription(propertyDeclaration), - name: identifier.text, - required: !propertyDeclaration.questionToken, - type: resolveType(aType), - }; - }); - } - let classDeclaration = node; - let properties = classDeclaration.members.filter((member) => { - if (member.kind !== ts.SyntaxKind.PropertyDeclaration) { - return false; - } - const propertySignature = member; - return propertySignature && hasPublicMemberModifier(propertySignature); - }); - const classConstructor = classDeclaration.members.find((member) => member.kind === ts.SyntaxKind.Constructor); - if (classConstructor && classConstructor.parameters) { - properties = properties.concat(classConstructor.parameters.filter((parameter) => hasPublicConstructorModifier(parameter))); - } - return properties.map((declaration) => { - const identifier = declaration.name; - if (!declaration.type) { - throw new Error("No valid type found for property declaration."); - } - return { - description: getNodeDescription(declaration), - name: identifier.text, - required: !declaration.questionToken, - type: resolveType(resolveTypeParameter(declaration.type, classDeclaration, genericTypes)), - }; - }); -} -function resolveTypeParameter(type, classDeclaration, genericTypes) { - if (genericTypes && - classDeclaration.typeParameters && - classDeclaration.typeParameters.length) { - for (let i = 0; i < classDeclaration.typeParameters.length; i++) { - if (type.typeName && - classDeclaration.typeParameters[i].name.text === type.typeName.text) { - return genericTypes[i]; - } - } - } - return type; -} -// function getModelTypeAdditionalProperties(node: UsableDeclaration) { -// if (node.kind === ts.SyntaxKind.InterfaceDeclaration) { -// const interfaceDeclaration = node as ts.InterfaceDeclaration; -// return interfaceDeclaration.members -// .filter((member) => member.kind === ts.SyntaxKind.IndexSignature) -// .map((member: any) => { -// const indexSignatureDeclaration = -// member as ts.IndexSignatureDeclaration; -// const indexType = resolveType( -// indexSignatureDeclaration.parameters[0].type as ts.TypeNode -// ); -// if ( -// indexType.typeName !== "string" && -// indexType.typeName !== "double" -// ) { -// throw new Error( -// `Only string/number indexers are supported. Found ${indexType.typeName}.` -// ); -// } -// return { -// description: "", -// name: "", -// required: true, -// type: resolveType(indexSignatureDeclaration.type as ts.TypeNode), -// }; -// }); -// } -// return undefined; -// } -function getModifiers(node) { - if (ts.canHaveModifiers(node)) { - return ts.getModifiers(node) ?? []; - } - return []; -} -function hasPublicMemberModifier(node) { - return (getModifiers(node).length > 0 && - getModifiers(node).every((modifier) => { - return (modifier.kind !== ts.SyntaxKind.ProtectedKeyword && - modifier.kind !== ts.SyntaxKind.PrivateKeyword); - })); -} -function hasPublicConstructorModifier(node) { - return (getModifiers(node).length > 0 && - getModifiers(node).some((modifier) => { - return modifier.kind === ts.SyntaxKind.PublicKeyword; - })); -} -function getNodeDescription(node) { - let symbol = metadataGenerator_1.MetadataGenerator.current.typeChecker.getSymbolAtLocation(node.name); - symbol = resolveImports(symbol); - if (symbol) { - /** - * TODO: Workaround for what seems like a bug in the compiler - * Warrants more investigation and possibly a PR against typescript - */ - if (node.kind === ts.SyntaxKind.Parameter) { - // TypeScript won't parse jsdoc if the flag is 4, i.e. 'Property' - symbol.flags = 0; - } - const comments = symbol.getDocumentationComment(metadataGenerator_1.MetadataGenerator.current.typeChecker); - if (comments.length) { - return ts.displayPartsToString(comments); - } - } - return ""; -} -function getSuperClass(node, typeArguments) { - const clauses = node.heritageClauses; - if (clauses) { - const filteredClauses = clauses.filter((clause) => clause.token === ts.SyntaxKind.ExtendsKeyword); - if (filteredClauses.length > 0) { - const clause = filteredClauses[0]; - if (clause.types && clause.types.length > 0) { - let type = metadataGenerator_1.MetadataGenerator.current.typeChecker.getSymbolAtLocation(clause.types[0].expression)?.declarations?.[0]; - type = resolveImports(type); - if (!type) { - throw new Error("Could not resolve type of extend"); - } - return { - type: type, - typeArguments: resolveTypeArguments(type, clause.types[0].typeArguments, typeArguments), - }; - } - } - } - return undefined; -} -function buildGenericTypeMap(node, typeArguments) { - const result = new Map(); - if (node.typeParameters && typeArguments) { - node.typeParameters.forEach((typeParam, index) => { - const paramName = typeParam.name.text; - result.set(paramName, typeArguments[index]); - }); - } - return result; -} -function resolveTypeArguments(node, typeArguments, parentTypeArguments) { - const result = buildGenericTypeMap(node, typeArguments); - if (parentTypeArguments) { - result.forEach((value, key) => { - const typeName = getTypeName(value); - if (parentTypeArguments.has(typeName)) { - result.set(key, parentTypeArguments.get(typeName)); - } - }); - } - return result; -} -/** - * Used to identify union types of a primitive and array of the same primitive, e.g. `string | string[]` - */ -function getCommonPrimitiveAndArrayUnionType(typeNode) { - if (typeNode && typeNode.kind === ts.SyntaxKind.UnionType) { - const union = typeNode; - const types = union.types - .map((t) => resolveType(t)) - .filter((t) => t.typeName !== "undefined"); - const arrType = types.find((t) => t.typeName === "array"); - const primitiveType = types.find((t) => t.typeName !== "array"); - if (types.length === 2 && - arrType && - arrType.elementType && - primitiveType && - arrType.elementType.typeName === primitiveType.typeName) { - return arrType; - } - } - return null; -} -function getLiteralValue(expression) { - if (expression.kind === ts.SyntaxKind.StringLiteral) { - return expression.text; - } - if (expression.kind === ts.SyntaxKind.NumericLiteral) { - return parseFloat(expression.text); - } - if (expression.kind === ts.SyntaxKind.TrueKeyword) { - return true; - } - if (expression.kind === ts.SyntaxKind.FalseKeyword) { - return false; - } - if (expression.kind === ts.SyntaxKind.ArrayLiteralExpression) { - return expression.elements.map((e) => getLiteralValue(e)); - } - return; -} -function resolveImports(node) { - const nodeAsImportSpecifier = node; - const checker = metadataGenerator_1.MetadataGenerator.current.typeChecker; - if (nodeAsImportSpecifier?.kind === ts.SyntaxKind.ImportSpecifier) { - const symbol = checker.getSymbolAtLocation(nodeAsImportSpecifier.name); - if (symbol) { - const aliasedSymbol = checker.getAliasedSymbol(symbol); - const declaration = aliasedSymbol.getDeclarations()?.[0]; - return declaration; - } - } - return node; -} -function getSourceFile(node) { - while (node.kind !== ts.SyntaxKind.SourceFile) { - node = node.parent; - } - return node; -} -function getOriginalSourceFile(symbol) { - if (symbol && - symbol?.declarations?.[0].kind === ts.SyntaxKind.ImportSpecifier) { - return metadataGenerator_1.MetadataGenerator.current.typeChecker - .getAliasedSymbol(symbol) - .getDeclarations()?.[0] - .getSourceFile().fileName; - } - return symbol?.declarations?.[0].getSourceFile().fileName; -} -//# sourceMappingURL=resolveType.js.map \ No newline at end of file diff --git a/dist/metadata/resolveType.js.map b/dist/metadata/resolveType.js.map deleted file mode 100644 index 02c8b1e..0000000 --- a/dist/metadata/resolveType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolveType.js","sourceRoot":"","sources":["../../src/metadata/resolveType.ts"],"names":[],"mappings":";;AA6BA,kCAgQC;AAkbD,sCA+BC;AAoCD,kFAyBC;AAED,0CAmBC;AAED,wCAYC;AA90BD,4BAA4B;AAC5B,+BAA+B;AAC/B,iCAAiC;AACjC,4DAA2D;AAC3D,oDAAmE;AACnE,2DAS6B;AAE7B,IAAI,KAAK,GAAG,CAAC,CAAC;AAEd,MAAM,aAAa,GAA+B,EAAE,CAAC;AACrD,aAAa,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC;AACtD,aAAa,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC;AACtD,aAAa,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;AACxD,aAAa,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC;AAClD,aAAa,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,WAAW,CAAC;AAM5D,SAAgB,WAAW,CACzB,QAAsB,EACtB,cAAyC;IAEzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC9B,CAAC;IAED,IAAI,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC9B,CAAC;IAED,MAAM,aAAa,GAAG,gBAAgB,C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,eAAe,EAAE,CAAC;QAClE,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACvE,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;YACvD,MAAM,WAAW,GAAG,aAAa,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;YACzD,OAAO,WAAgB,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,aAAa,CAAC,IAAa;IAClC,OAAO,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;QAC9C,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,OAAO,IAAqB,CAAC;AAC/B,CAAC;AAED,SAAS,qBAAqB,CAAC,MAAiB;IAC9C,IACE,MAAM;QACN,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,eAAe,EAChE,CAAC;QACD,OAAO,qCAAiB,CAAC,OAAO,CAAC,WAAW;aACzC,gBAAgB,CAAC,MAAM,CAAC;aACxB,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;aACtB,aAAa,EAAE,CAAC,QAAQ,CAAC;IAC9B,CAAC;IACD,OAAO,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC;AAC5D,CAAC"} \ No newline at end of file diff --git a/dist/swagger/generator.d.ts b/dist/swagger/generator.d.ts deleted file mode 100644 index 192ef18..0000000 --- a/dist/swagger/generator.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SwaggerConfig } from "../config"; -import { Metadata } from "../metadata/metadataGenerator"; -import { Swagger } from "./swagger"; -export declare class SpecGenerator { - private readonly metadata; - private readonly config; - private debugger; - constructor(metadata: Metadata, config: SwaggerConfig); - generate(): Promise; - getSwaggerSpec(): Swagger.Spec; - getOpenApiSpec(): Swagger.Spec; - private buildDefinitions; - private buildPaths; - private buildPathMethod; - private buildParameter; - private buildProperties; - private buildOperation; - private getMimeType; - private getOperationId; - private getSwaggerType; - private getSwaggerTypeForPrimitiveType; - private getSwaggerTypeForObjectType; - private getSwaggerTypeForArrayType; - private getSwaggerTypeForEnumType; - private getSwaggerTypeForReferenceType; -} -//# sourceMappingURL=generator.d.ts.map \ No newline at end of file diff --git a/dist/swagger/generator.d.ts.map b/dist/swagger/generator.d.ts.map deleted file mode 100644 index dbda019..0000000 --- a/dist/swagger/generator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/swagger/generator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAGL,QAAQ,EAST,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAU,OAAO,EAAqB,MAAM,WAAW,CAAC;AAE/D,qBAAa,aAAa;IAItB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJzB,OAAO,CAAC,QAAQ,CAAmD;gBAGhD,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,aAAa;IAG3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAwD/B,cAAc;IA2Cd,cAAc;IAiBrB,OAAO,CAAC,gBAAgB;IA+BxB,OAAO,CAAC,UAAU;IAmClB,OAAO,CAAC,eAAe;IA6EvB,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,cAAc;IA+BtB,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,cAAc;IAwDtB,OAAO,CAAC,8BAA8B;IAqBtC,OAAO,CAAC,2BAA2B;IAOnC,OAAO,CAAC,0BAA0B;IAQlC,OAAO,CAAC,yBAAyB;IAuBjC,OAAO,CAAC,8BAA8B;CAKvC"} \ No newline at end of file diff --git a/dist/swagger/generator.js b/dist/swagger/generator.js deleted file mode 100644 index 344e1a9..0000000 --- a/dist/swagger/generator.js +++ /dev/null @@ -1,384 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SpecGenerator = void 0; -const debug = require("debug"); -const fs = require("fs"); -const fs_extra_promise_1 = require("fs-extra-promise"); -const _ = require("lodash"); -const pathUtil = require("path"); -const YAML = require("yamljs"); -const swagger_1 = require("./swagger"); -class SpecGenerator { - metadata; - config; - debugger = debug("typescript-rest-swagger:spec-generator"); - constructor(metadata, config) { - this.metadata = metadata; - this.config = config; - } - async generate() { - this.debugger("Generating swagger files."); - this.debugger("Swagger Config: %j", this.config); - this.debugger("Services Metadata: %j", this.metadata); - let spec = this.getSwaggerSpec(); - // if (this.config.outputFormat === Specification.OpenApi_3) { - // spec = await this.convertToOpenApiSpec(spec); - // } - return new Promise((resolve, reject) => { - const swaggerDirs = _.castArray(this.config.outputDirectory); - this.debugger("Saving specs to folders: %j", swaggerDirs); - swaggerDirs.forEach((swaggerDir) => { - (0, fs_extra_promise_1.mkdirp)(swaggerDir) - .then(() => { - this.debugger("Saving specs json file to folder: %j", swaggerDir); - fs.writeFile(`${swaggerDir}/swagger.json`, JSON.stringify(spec, null, "\t"), (err) => { - if (err) { - return reject(err); - } - if (this.config.yaml) { - this.debugger("Saving specs yaml file to folder: %j", swaggerDir); - fs.writeFile(`${swaggerDir}/swagger.yaml`, YAML.stringify(spec, 1000), (errYaml) => { - if (errYaml) { - return reject(errYaml); - } - this.debugger("Generated files saved to folder: %j", swaggerDir); - resolve(); - }); - } - else { - this.debugger("Generated files saved to folder: %j", swaggerDir); - resolve(); - } - }); - }) - .catch(reject); - }); - }); - } - getSwaggerSpec() { - let spec = { - components: { - schemas: this.buildDefinitions(), - }, - info: { - title: "", - version: "", - }, - paths: this.buildPaths(), - openapi: "3.0.1", - }; - spec.security = this.config.securityDefinitions; - spec.security = this.config.securityDefinitions - ? this.config.securityDefinitions - : []; - if (this.config.description) { - spec.info.description = this.config.description; - } - if (this.config.license) { - spec.info.license = { name: this.config.license }; - } - if (this.config.name) { - spec.info.title = this.config.name; - } - if (this.config.version) { - spec.info.version = this.config.version; - } - if (this.config.servers) { - spec.servers = this.config.servers; - } - if (this.config.spec) { - spec = require("merge").recursive(spec, this.config.spec); - } - this.debugger("Generated specs: %j", spec); - return spec; - } - getOpenApiSpec() { - return this.getSwaggerSpec(); - } - // private async convertToOpenApiSpec(spec: Swagger.Spec) { - // this.debugger('Converting specs to openapi 3.0'); - // const converter = require('swagger2openapi'); - // const options = { - // patch: true, - // warnOnly: true, - // }; - // const openapi = await converter.convertObj(spec, options); - // this.debugger('Converted to openapi 3.0: %j', openapi); - // return openapi.openapi; - // } - buildDefinitions() { - const definitions = {}; - Object.keys(this.metadata.referenceTypes).map((typeName) => { - this.debugger("Generating definition for type: %s", typeName); - const referenceType = this.metadata.referenceTypes[typeName]; - this.debugger("Metadata for referenced Type: %j", referenceType); - definitions[referenceType.typeName] = { - description: referenceType.description, - properties: this.buildProperties(referenceType.properties), - type: "object", - }; - const requiredFields = referenceType.properties - .filter((p) => p.required) - .map((p) => p.name); - if (requiredFields && requiredFields.length) { - definitions[referenceType.typeName].required = requiredFields; - } - // if (referenceType.additionalProperties) { - // definitions[referenceType.typeName].additionalProperties = this.buildAdditionalProperties(referenceType.additionalProperties); - // } - this.debugger("Generated Definition for type %s: %j", typeName, definitions[referenceType.typeName]); - }); - return definitions; - } - buildPaths() { - const paths = {}; - this.debugger("Generating paths declarations"); - this.metadata.controllers.forEach((controller) => { - this.debugger("Generating paths for controller: %s", controller.name); - controller.methods.forEach((method) => { - this.debugger("Generating paths for method: %s", method.name); - const path = pathUtil.posix.join("/", controller.path ? controller.path : "", method.path); - paths[path] = paths[path] || {}; - method.consumes = _.union(controller.consumes, method.consumes); - method.produces = _.union(controller.produces, method.produces); - method.tags = _.union(controller.tags, method.tags); - // method.security = method.security || controller.security; - method.responses = _.union(controller.responses, method.responses); - const pathObject = paths[path]; - pathObject[method.method] = this.buildPathMethod(controller.name, method); - this.debugger("Generated path for method %s: %j", method.name, pathObject[method.method]); - }); - }); - return paths; - } - buildPathMethod(controllerName, method) { - const pathMethod = this.buildOperation(controllerName, method); - pathMethod.description = method.description; - if (method.summary) { - pathMethod.summary = method.summary; - } - if (method.deprecated) { - pathMethod.deprecated = method.deprecated; - } - if (method.tags.length) { - pathMethod.tags = method.tags; - } - // if (method.security) { - // pathMethod.security = method.security.map((s) => ({ - // [s.name]: s.scopes || [], - // })); - // } - const [bodyParam, noBodyParameter] = method.parameters.reduce(([pass, fail], elem) => { - return elem.in === "body" - ? [[...pass, elem], fail] - : [pass, [...fail, elem]]; - }, [[], []]); - pathMethod.parameters = noBodyParameter - .filter((p) => p.in !== "param") - .map((p) => this.buildParameter(p)); - noBodyParameter - .filter((p) => p.in === "param") - .forEach((p) => { - pathMethod.parameters?.push(this.buildParameter({ - description: p.description, - in: "query", - name: p.name, - parameterName: p.parameterName, - required: false, - type: p.type, - })); - // pathMethod.parameters.push( - // this.buildParameter({ - // description: p.description, - // in: "formData", - // name: p.name, - // parameterName: p.parameterName, - // required: false, - // type: p.type, - // }) - // ); - }); - if (bodyParam.length > 1) { - throw new Error("Only one body parameter allowed per controller method."); - } - if (bodyParam.length > 0) { - pathMethod.requestBody = { - content: { - "application/json": { - schema: this.getSwaggerType(bodyParam[0].type), - }, - }, - description: bodyParam[0].description, - }; - } - return pathMethod; - } - buildParameter(parameter) { - const swaggerParameter = { - description: parameter.description, - in: parameter.in, - name: parameter.name, - required: parameter.required, - }; - const parameterType = this.getSwaggerType(parameter.type); - swaggerParameter.schema = parameterType; - return swaggerParameter; - } - buildProperties(properties) { - const swaggerProperties = {}; - properties.forEach((property) => { - const swaggerType = this.getSwaggerType(property.type); - if (!swaggerType) { - return; - } - if (!(0, swagger_1.isReferenceObject)(swaggerType)) { - swaggerType.description = property.description; - } - swaggerProperties[property.name] = swaggerType; - }); - return swaggerProperties; - } - buildOperation(controllerName, method) { - const operation = { - operationId: this.getOperationId(controllerName, method.name), - responses: {}, - }; - method.responses.forEach((res) => { - operation.responses[res.status] = { - description: res.description, - content: {}, - }; - if (res.schema) { - const swaggerType = this.getSwaggerType(res.schema); - const mimeType = this.getMimeType(swaggerType); - const codeObject = operation.responses[res.status]; - if (!(0, swagger_1.isReferenceObject)(codeObject)) { - if (swaggerType && codeObject.content && mimeType) { - codeObject.content[mimeType] = { - schema: swaggerType, - }; - } - // if (res.examples && mimeType) { - // codeObject.content[mimeType].examples = res.examples; - // } - } - } - }); - return operation; - } - getMimeType(swaggerType) { - if (swaggerType === undefined) { - return undefined; - } - if ((0, swagger_1.isReferenceObject)(swaggerType)) { - return "application/json"; - } - if (swaggerType.type === "array" || swaggerType.type === "object") { - return "application/json"; - } - else if (swaggerType.type === "string" && - swaggerType.format === "binary") { - return "application/octet-stream"; - } - else { - return "text/html"; - } - } - getOperationId(controllerName, methodName) { - const controllerNameWithoutSuffix = controllerName.replace(new RegExp("Controller$"), ""); - return `${controllerNameWithoutSuffix}${methodName.charAt(0).toUpperCase() + methodName.substr(1)}`; - } - getSwaggerType(type) { - if (type.typeName === "void") { - return undefined; - } - const swaggerType = this.getSwaggerTypeForPrimitiveType(type); - if (swaggerType) { - return swaggerType; - } - const arrayType = type; - if (arrayType.elementType) { - return this.getSwaggerTypeForArrayType(arrayType); - } - const enumType = type; - if (enumType.enumMembers) { - return this.getSwaggerTypeForEnumType(enumType); - } - const refType = type; - if (refType.properties && refType.description !== undefined) { - return this.getSwaggerTypeForReferenceType(type); - } - const unionType = type; - if (unionType.types && unionType.types.length > 0) { - let map = unionType.types - .map((t) => this.getSwaggerType(t)) - .filter((t) => t !== undefined); - let [enums, nonEnums] = _.partition(map, (m) => { - return m.hasOwnProperty("enum"); - }); - map = [...nonEnums]; - let groupedEnums = _.groupBy(enums, (e) => "type" in e && e.type); - _.each(groupedEnums, (enums, type) => { - let enumValues = _.flatten(enums.map((e) => "enum" in e && e.enum)); - map.push({ type: type, enum: enumValues }); - }); - if (map.length === 1) { - return map[0]; - } - return { oneOf: map }; - } - const objectType = type; - return this.getSwaggerTypeForObjectType(objectType); - } - getSwaggerTypeForPrimitiveType(type) { - const typeMap = { - binary: { type: "string", format: "binary" }, - boolean: { type: "boolean" }, - buffer: { type: "string", format: "binary" }, - // buffer: { type: 'string', format: 'base64' }, - byte: { type: "string", format: "byte" }, - date: { type: "string", format: "date" }, - datetime: { type: "string", format: "date-time" }, - double: { type: "number", format: "double" }, - file: { type: "string", format: "binary" }, - float: { type: "number", format: "float" }, - integer: { type: "integer", format: "int32" }, - long: { type: "integer", format: "int64" }, - object: { type: "object" }, - string: { type: "string" }, - }; - return typeMap[type.typeName]; - } - getSwaggerTypeForObjectType(objectType) { - return { - type: "object", - properties: this.buildProperties(objectType.properties), - }; - } - getSwaggerTypeForArrayType(arrayType) { - if (!arrayType.elementType) { - return undefined; - } - return { type: "array", items: this.getSwaggerType(arrayType.elementType) }; - } - getSwaggerTypeForEnumType(enumType) { - function getDerivedTypeFromValues(values) { - return values.reduce((derivedType, item) => { - const currentType = typeof item; - derivedType = - derivedType && derivedType !== currentType ? "string" : currentType; - return derivedType; - }, null); - } - const enumValues = enumType.enumMembers.map((member) => member); - return { - enum: enumType.enumMembers.map((member) => member), - type: getDerivedTypeFromValues(enumValues), - }; - } - getSwaggerTypeForReferenceType(referenceType) { - return { $ref: `#/components/schemas/${referenceType.typeName}` }; - } -} -exports.SpecGenerator = SpecGenerator; -//# sourceMappingURL=generator.js.map \ No newline at end of file diff --git a/dist/swagger/generator.js.map b/dist/swagger/generator.js.map deleted file mode 100644 index 4a9c34c..0000000 --- a/dist/swagger/generator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/swagger/generator.ts"],"names":[],"mappings":";;;A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C/E,CAAC;IAEO,yBAAyB,CAAC,QAAuB;QACvD,SAAS,wBAAwB,CAC/B,MAAkB;YAElB,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,WAAmB,EAAE,IAAI,EAAE,EAAE;gBACjD,MAAM,WAAW,GAAG,OAAO,IAAI,CAAC;gBAChC,WAAW;oBACT,WAAW,IAAI,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC;gBACtE,OAAO,WAAW,CAAC;YACrB,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;QAED,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CACzC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAgB,CACZ,CAAC;QACnB,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,CAC5B,CAAC,MAAM,EAAE,EAAE,CAAC,MAAgB,CACZ;YAClB,IAAI,EAAE,wBAAwB,CAAC,UAAU,CAAC;SAC3C,CAAC;IACJ,CAAC;IAEO,8BAA8B,CACpC,aAA4B;QAE5B,OAAO,EAAE,IAAI,EAAE,wBAAwB,aAAa,CAAC,QAAQ,EAAE,EAAE,CAAC;IACpE,CAAC;CACF;AAheD,sCAgeC"} \ No newline at end of file diff --git a/dist/swagger/swagger.d.ts b/dist/swagger/swagger.d.ts deleted file mode 100644 index 2a14e16..0000000 --- a/dist/swagger/swagger.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OpenAPIV3 } from "openapi-types"; -export declare namespace Swagger { - interface Spec extends OpenAPIV3.Document { - } -} -export type Schema = OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject; -export declare function isReferenceObject(schema: Schema): schema is OpenAPIV3.ReferenceObject; -export declare function isArrayObject(schema: Schema): schema is OpenAPIV3.ArraySchemaObject; -//# sourceMappingURL=swagger.d.ts.map \ No newline at end of file diff --git a/dist/swagger/swagger.d.ts.map b/dist/swagger/swagger.d.ts.map deleted file mode 100644 index c0fce74..0000000 --- a/dist/swagger/swagger.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swagger.d.ts","sourceRoot":"","sources":["../../src/swagger/swagger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,yBAAiB,OAAO,CAAC;IACvB,UAAiB,IAAK,SAAQ,SAAS,CAAC,QAAQ;KAAG;CACpD;AAED,MAAM,MAAM,MAAM,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC;AAExE,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,GACb,MAAM,IAAI,SAAS,CAAC,eAAe,CAErC;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,GACb,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAEvC"} \ No newline at end of file diff --git a/dist/swagger/swagger.js b/dist/swagger/swagger.js deleted file mode 100644 index 93ae51f..0000000 --- a/dist/swagger/swagger.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isReferenceObject = isReferenceObject; -exports.isArrayObject = isArrayObject; -function isReferenceObject(schema) { - return schema && schema.$ref !== undefined; -} -function isArrayObject(schema) { - return schema && "items" in schema; -} -//# sourceMappingURL=swagger.js.map \ No newline at end of file diff --git a/dist/swagger/swagger.js.map b/dist/swagger/swagger.js.map deleted file mode 100644 index 1852e25..0000000 --- a/dist/swagger/swagger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swagger.js","sourceRoot":"","sources":["../../src/swagger/swagger.ts"],"names":[],"mappings":";;AAQA,8CAIC;AAED,sCAIC;AAVD,SAAgB,iBAAiB,CAC/B,MAAc;IAEd,OAAO,MAAM,IAAK,MAAoC,CAAC,IAAI,KAAK,SAAS,CAAC;AAC5E,CAAC;AAED,SAAgB,aAAa,CAC3B,MAAc;IAEd,OAAO,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/dist/utils/decoratorUtils.d.ts b/dist/utils/decoratorUtils.d.ts deleted file mode 100644 index fa522db..0000000 --- a/dist/utils/decoratorUtils.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as ts from "typescript"; -export declare function getDecorators(node: ts.Node, isMatching: (identifier: DecoratorData) => boolean): Array; -export declare function getDecoratorName(node: ts.Node, isMatching: (identifier: DecoratorData) => boolean): string | undefined; -export declare function getDecoratorTextValue(node: ts.Node, isMatching: (identifier: DecoratorData) => boolean): string | undefined; -export declare function getDecoratorOptions(node: ts.Node, isMatching: (identifier: DecoratorData) => boolean): { - [key: string]: any; -} | undefined; -export declare function isDecorator(node: ts.Node, isMatching: (identifier: DecoratorData) => boolean): boolean; -export interface DecoratorData { - text: string; - arguments: Array; - typeArguments: Array; -} -//# sourceMappingURL=decoratorUtils.d.ts.map \ No newline at end of file diff --git a/dist/utils/decoratorUtils.d.ts.map b/dist/utils/decoratorUtils.d.ts.map deleted file mode 100644 index da99f05..0000000 --- a/dist/utils/decoratorUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decoratorUtils.d.ts","sourceRoot":"","sources":["../../src/utils/decoratorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAgB,aAAa,CAC3B,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,OAAO,GACjD,KAAK,CAAC,aAAa,CAAC,CAkCtB;AAcD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,OAAO,sBAInD;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,OAAO,sBAMnD;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,OAAO;;cAMnD;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,OAAO,WAOnD;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACtB,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CAC3B"} \ No newline at end of file diff --git a/dist/utils/decoratorUtils.js b/dist/utils/decoratorUtils.js deleted file mode 100644 index f999c7c..0000000 --- a/dist/utils/decoratorUtils.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getDecorators = getDecorators; -exports.getDecoratorName = getDecoratorName; -exports.getDecoratorTextValue = getDecoratorTextValue; -exports.getDecoratorOptions = getDecoratorOptions; -exports.isDecorator = isDecorator; -const ts = require("typescript"); -function getDecorators(node, isMatching) { - const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : []; - if (!decorators || !decorators.length) { - return []; - } - return decorators - .map((d) => { - const result = { - arguments: [], - typeArguments: [], - }; - let x = d.expression; - if (ts.isCallExpression(x)) { - if (x.arguments) { - result.arguments = x.arguments.map((argument) => { - if (ts.isStringLiteral(argument)) { - return argument.text; - } - else if (ts.isNumericLiteral(argument)) { - return argument.text; - } - else { - return argument; - } - }); - } - if (x.typeArguments) { - result.typeArguments = x.typeArguments; - } - x = x.expression; - } - result.text = x.text || x.name.text; - return result; - }) - .filter(isMatching); -} -function getDecorator(node, isMatching) { - const decorators = getDecorators(node, isMatching); - if (!decorators || !decorators.length) { - return undefined; - } - return decorators[0]; -} -function getDecoratorName(node, isMatching) { - const decorator = getDecorator(node, isMatching); - return decorator ? decorator.text : undefined; -} -function getDecoratorTextValue(node, isMatching) { - const decorator = getDecorator(node, isMatching); - return decorator && typeof decorator.arguments[0] === "string" - ? decorator.arguments[0] - : undefined; -} -function getDecoratorOptions(node, isMatching) { - const decorator = getDecorator(node, isMatching); - return decorator && typeof decorator.arguments[1] === "object" - ? decorator.arguments[1] - : undefined; -} -function isDecorator(node, isMatching) { - const decorators = getDecorators(node, isMatching); - if (!decorators || !decorators.length) { - return false; - } - return true; -} -//# sourceMappingURL=decoratorUtils.js.map \ No newline at end of file diff --git a/dist/utils/decoratorUtils.js.map b/dist/utils/decoratorUtils.js.map deleted file mode 100644 index a04f903..0000000 --- a/dist/utils/decoratorUtils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decoratorUtils.js","sourceRoot":"","sources":["../../src/utils/decoratorUtils.ts"],"names":[],"mappings":";;AAEA,sCAqCC;AAcD,4CAMC;AAED,sDAQC;AAED,kDAQC;AAED,kCASC;AA1FD,iCAAiC;AAEjC,SAAgB,aAAa,CAC3B,IAAa,EACb,UAAkD;IAElD,MAAM,UAAU,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5E,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;QACtC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,UAAU;SACd,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,MAAM,GAAQ;YAClB,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,EAAE;SAClB,CAAC;QACF,IAAI,CAAC,GAAQ,CAAC,CAAC,UAAU,CAAC;QAC1B,IAAI,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;gBAChB,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC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AAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACjD,OAAO,SAAS,IAAI,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,QAAQ;QAC5D,CAAC,CAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAY;QACpC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAgB,mBAAmB,CACjC,IAAa,EACb,UAAkD;IAElD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACjD,OAAO,SAAS,IAAI,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,QAAQ;QAC5D,CAAC,CAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAA4B;QACpD,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAgB,WAAW,CACzB,IAAa,EACb,UAAkD;IAElD,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/dist/utils/jsDocUtils.d.ts b/dist/utils/jsDocUtils.d.ts deleted file mode 100644 index 5451bd1..0000000 --- a/dist/utils/jsDocUtils.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as ts from "typescript"; -export declare function getJSDocDescription(node: ts.Node): string; -export declare function getJSDocTag(node: ts.Node, tagName: string): string | undefined; -export declare function isExistJSDocTag(node: ts.Node, tagName: string): boolean; -export declare function getFirstMatchingJSDocTagName(node: ts.Node, isMatching: (t: ts.JSDocTag) => boolean): string | undefined; -//# sourceMappingURL=jsDocUtils.d.ts.map \ No newline at end of file diff --git a/dist/utils/jsDocUtils.d.ts.map b/dist/utils/jsDocUtils.d.ts.map deleted file mode 100644 index 06e566a..0000000 --- a/dist/utils/jsDocUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jsDocUtils.d.ts","sourceRoot":"","sources":["../../src/utils/jsDocUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,UAOhD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,sBAMzD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,WAM7D;AAMD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,KAAK,OAAO,sBAQxC"} \ No newline at end of file diff --git a/dist/utils/jsDocUtils.js b/dist/utils/jsDocUtils.js deleted file mode 100644 index 5e0ddc0..0000000 --- a/dist/utils/jsDocUtils.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getJSDocDescription = getJSDocDescription; -exports.getJSDocTag = getJSDocTag; -exports.isExistJSDocTag = isExistJSDocTag; -exports.getFirstMatchingJSDocTagName = getFirstMatchingJSDocTagName; -function getJSDocDescription(node) { - const jsDocs = node.jsDoc; - if (!jsDocs || !jsDocs.length) { - return ""; - } - return jsDocs[0].comment || ""; -} -function getJSDocTag(node, tagName) { - const tags = getJSDocTags(node, tagName); - if (!tags || !tags.length) { - return undefined; - } - return tags[0].comment; -} -function isExistJSDocTag(node, tagName) { - const tags = getJSDocTags(node, tagName); - if (!tags || !tags.length) { - return false; - } - return true; -} -function getJSDocTags(node, tagName) { - return getMatchingJSDocTags(node, (t) => t.tagName.text === tagName); -} -function getFirstMatchingJSDocTagName(node, isMatching) { - const tags = getMatchingJSDocTags(node, isMatching); - if (!tags || !tags.length) { - return undefined; - } - return tags[0].tagName.text; -} -function getMatchingJSDocTags(node, isMatching) { - const jsDocs = node.jsDoc; - if (!jsDocs || !jsDocs.length) { - return undefined; - } - const jsDoc = jsDocs[0]; - if (!jsDoc.tags) { - return undefined; - } - return jsDoc.tags.filter(isMatching); -} -//# sourceMappingURL=jsDocUtils.js.map \ No newline at end of file diff --git a/dist/utils/jsDocUtils.js.map b/dist/utils/jsDocUtils.js.map deleted file mode 100644 index 3a8dbd2..0000000 --- a/dist/utils/jsDocUtils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jsDocUtils.js","sourceRoot":"","sources":["../../src/utils/jsDocUtils.ts"],"names":[],"mappings":";;AAEA,kDAOC;AAED,kCAMC;AAED,0CAMC;AAMD,oEAUC;AAvCD,SAAgB,mBAAmB,CAAC,IAAa;IAC/C,MAAM,MAAM,GAAI,IAAY,CAAC,KAAwB,CAAC;IACtD,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,OAAkB,IAAI,EAAE,CAAC;AAC7C,CAAC;AAED,SAAgB,WAAW,CAAC,IAAa,EAAE,OAAe;IACxD,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,OAAiB,CAAC;AACnC,CAAC;AAED,SAAgB,eAAe,CAAC,IAAa,EAAE,OAAe;IAC5D,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAAC,IAAa,EAAE,OAAe;IAClD,OAAO,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;AACvE,CAAC;AAED,SAAgB,4BAA4B,CAC1C,IAAa,EACb,UAAuC;IAEvC,MAAM,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACpD,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;AAC9B,CAAC;AAED,SAAS,oBAAoB,CAC3B,IAAa,EACb,UAAuC;IAEvC,MAAM,MAAM,GAAI,IAAY,CAAC,KAAwB,CAAC;IACtD,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/dist/utils/pathUtils.d.ts b/dist/utils/pathUtils.d.ts deleted file mode 100644 index 3f09de2..0000000 --- a/dist/utils/pathUtils.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function normalizePath(path?: string): string | undefined; -//# sourceMappingURL=pathUtils.d.ts.map \ No newline at end of file diff --git a/dist/utils/pathUtils.d.ts.map b/dist/utils/pathUtils.d.ts.map deleted file mode 100644 index aafdc98..0000000 --- a/dist/utils/pathUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pathUtils.d.ts","sourceRoot":"","sources":["../../src/utils/pathUtils.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,sBAU1C"} \ No newline at end of file diff --git a/dist/utils/pathUtils.js b/dist/utils/pathUtils.js deleted file mode 100644 index e2fda39..0000000 --- a/dist/utils/pathUtils.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.normalizePath = normalizePath; -function normalizePath(path) { - if (!path) { - return path; - } - let parts = path.split("/"); - parts = parts.map((part) => part.startsWith(":") ? `{${part.slice(1)}}` : part); - return parts.join("/"); -} -//# sourceMappingURL=pathUtils.js.map \ No newline at end of file diff --git a/dist/utils/pathUtils.js.map b/dist/utils/pathUtils.js.map deleted file mode 100644 index 77a5d07..0000000 --- a/dist/utils/pathUtils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pathUtils.js","sourceRoot":"","sources":["../../src/utils/pathUtils.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,sCAUC;AAVD,SAAgB,aAAa,CAAC,IAAa;IACzC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5B,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CACnD,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6d19f57..a88e155 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,16 @@ { - "name": "typescript-rest-swagger", - "version": "1.4.0", + "name": "@nmshd/typescript-rest-swagger", + "version": "1.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "typescript-rest-swagger", - "version": "1.4.0", + "name": "@nmshd/typescript-rest-swagger", + "version": "1.4.1", "license": "MIT", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", + "@nmshd/typescript-rest": "^3.0.5", "argparse": "^2.0.1", "debug": "^4.3.4", "fs-extra-promise": "^1.0.1", @@ -17,35 +18,29 @@ "lodash": "^4.17.21", "merge": "^2.1.1", "minimatch": "^9.0.3", - "mkdirp": "^3.0.1", "openapi-types": "^12.1.3", - "path": "^0.12.7", - "swagger2openapi": "^7.0.8", "ts-morph": "^23.0.0", "typescript": "^5.5.3", - "typescript-rest": "^3.0.4", "yamljs": "^0.3.0" }, "bin": { "swaggerGen": "dist/cli.js" }, "devDependencies": { + "@js-soft/license-check": "^1.0.9", "@types/argparse": "^2.0.14", "@types/debug": "^4.1.12", "@types/fs-extra-promise": "^1.0.13", - "@types/jest": "^29.5.12", + "@types/jest": "^29.5.13", "@types/lodash": "^4.14.202", "@types/minimatch": "^5.1.2", - "@types/mkdirp": "^2.0.0", "@types/yamljs": "^0.2.34", - "coveralls": "^3.1.1", "cross-env": "^7.0.3", "jest": "^29.7.0", "jsonata": "^2.0.3", "rimraf": "^5.0.5", "source-map-support": "^0.5.21", "ts-jest": "^29.1.2", - "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tslint": "^6.1.3", "tslint-config-prettier": "^1.18.0" @@ -685,11 +680,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@exodus/schemasafe": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", - "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==" - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1126,17 +1116,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", @@ -1153,11 +1132,189 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@js-soft/license-check": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@js-soft/license-check/-/license-check-1.0.9.tgz", + "integrity": "sha512-cupYi2KYDnwjPn77hoHpRgbGh8PKESYSFudFqgzzwA/4LqFCV1N2nLV5UHxhmtr3j7S6AmFeOAo19s1TsQUf3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "license-checker": "^25.0.1", + "yargs": "^17.7.2" + }, + "bin": { + "license-check": "bin/licenseCheck.js" + } + }, "node_modules/@jsdevtools/ono": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" }, + "node_modules/@nmshd/typescript-rest": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@nmshd/typescript-rest/-/typescript-rest-3.0.5.tgz", + "integrity": "sha512-XhXwB17qT9fz8PJqUNEM/NZ0hHuFSiWEZeFnnmy0MQYcj5lAEfDOTn6y547pCwrHr6eFboB5JzfUpY7NkOa8gg==", + "license": "MIT", + "dependencies": { + "@types/body-parser": "1.19.5", + "@types/cookie-parser": "^1.4.7", + "@types/express": "^5.0.0", + "@types/multer": "1.4.12", + "body-parser": "^1.20.3", + "cookie-parser": "^1.4.7", + "express": "^4.21.1", + "fs-extra": "^11.2.0", + "lodash": "^4.17.21", + "multer": "^1.4.5-lts.1", + "reflect-metadata": "^0.2.2", + "require-glob": "^4.1.0", + "swagger-ui-express": "^5.0.1", + "yamljs": "^0.3.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/@types/express": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.0.tgz", + "integrity": "sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ==", + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^5.0.0", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/@types/express-serve-static-core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.0.tgz", + "integrity": "sha512-AbXMTZGt40T+KON9/Fdxx0B2WK5hsgxcfXJLr5bFpZ7b4JCex2WyQPTEKdXqfHiY5nKKBScZ7yCoO6Pvgxfvnw==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/@types/multer": { + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.12.tgz", + "integrity": "sha512-pQ2hoqvXiJt2FP9WQVLPRO+AmiIm/ZYkavPlIQnx282u4ZrVdztx0pkh3jjpQt0Kz+YI0YhSG264y08UJKoUQg==", + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/multer": { + "version": "1.4.5-lts.1", + "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz", + "integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.0.0", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.4", + "object-assign": "^4.1.1", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "license": "Apache-2.0" + }, + "node_modules/@nmshd/typescript-rest/node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@nmshd/typescript-rest/node_modules/swagger-ui-express": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-5.0.1.tgz", + "integrity": "sha512-SrNU3RiBGTLLmFU8GIJdOdanJTl4TOmT27tt3bWWHppqYmAZ6IDuEuBvMU6nZq0zLEe6b/1rACXCgLZqO6ZfrA==", + "license": "MIT", + "dependencies": { + "swagger-ui-dist": ">=5.0.0" + }, + "engines": { + "node": ">= v0.10.32" + }, + "peerDependencies": { + "express": ">=4.0.0 || >=5.0.0-beta" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1345,35 +1502,6 @@ "@types/ms": "*" } }, - "node_modules/@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", - "dev": true, - "peer": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "peer": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true, - "peer": true - }, "node_modules/@types/express": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", @@ -1455,22 +1583,16 @@ } }, "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "version": "29.5.13", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.13.tgz", + "integrity": "sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "peer": true - }, "node_modules/@types/lodash": { "version": "4.17.6", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.6.tgz", @@ -1488,30 +1610,12 @@ "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", "dev": true }, - "node_modules/@types/mkdirp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-2.0.0.tgz", - "integrity": "sha512-c/iUqMymAlxLAyIK3u5SzrwkrkyOdv1XDc91T+b5FsY7Jr6ERhUD19jJHOhPW4GD6tmN6mFEorfSdks525pwdQ==", - "deprecated": "This is a stub types definition. mkdirp provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "mkdirp": "*" - } - }, "node_modules/@types/ms": { "version": "0.7.34", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", "dev": true }, - "node_modules/@types/multer": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.5.tgz", - "integrity": "sha512-9b/0a8JyrR0r2nQhL73JR86obWL7cogfX12augvlrvcpciCo/hkvEsgu80Z4S2g2DHGVXHr8pUIi1VhqFJ8Ufw==", - "dependencies": { - "@types/express": "*" - } - }, "node_modules/@types/node": { "version": "20.14.9", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz", @@ -1520,14 +1624,6 @@ "undici-types": "~5.26.4" } }, - "node_modules/@types/passport": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.16.tgz", - "integrity": "sha512-FD0qD5hbPWQzaM0wHUnJ/T0BBCJBxCeemtnCwc/ThhTg3x9jfrAcRUmj5Dopza+MfFS9acTe3wk7rcVnRIp/0A==", - "dependencies": { - "@types/express": "*" - } - }, "node_modules/@types/qs": { "version": "6.9.15", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", @@ -1584,180 +1680,12 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, - "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "peer": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "peer": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "peer": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, - "peer": true + "license": "ISC" }, "node_modules/accepts": { "version": "1.3.8", @@ -1783,16 +1711,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "peer": true, - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/acorn-walk": { "version": "8.3.3", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", @@ -1902,6 +1820,16 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -1915,44 +1843,12 @@ "node": ">=8" } }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz", - "integrity": "sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g==", - "dev": true + "license": "MIT" }, "node_modules/babel-jest": { "version": "29.7.0", @@ -2066,24 +1962,16 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -2093,7 +1981,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -2117,11 +2005,12 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -2212,22 +2101,11 @@ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/busboy": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", - "integrity": "sha512-InWFDomvlkEj+xWLBfU3AvnbVYqeTWmQopiW0tWWEy5yehYm2YkGEc59sUmw/4ty5Zj/b0WHGs1LgecuBSBGrg==", - "dependencies": { - "dicer": "0.2.5", - "readable-stream": "1.1.x" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -2240,6 +2118,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -2296,12 +2175,6 @@ } ] }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2327,16 +2200,6 @@ "node": ">=10" } }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.0" - } - }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -2362,6 +2225,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2375,6 +2239,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -2382,12 +2247,14 @@ "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -2401,6 +2268,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -2412,6 +2280,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -2461,23 +2330,12 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", @@ -2556,19 +2414,21 @@ "dev": true }, "node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/cookie-parser": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", - "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz", + "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==", + "license": "MIT", "dependencies": { - "cookie": "0.4.1", + "cookie": "0.7.2", "cookie-signature": "1.0.6" }, "engines": { @@ -2585,25 +2445,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, - "node_modules/coveralls": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", - "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", - "dev": true, - "dependencies": { - "js-yaml": "^3.13.1", - "lcov-parse": "^1.0.0", - "log-driver": "^1.2.7", - "minimist": "^1.2.5", - "request": "^2.88.2" - }, - "bin": { - "coveralls": "bin/coveralls.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -2662,18 +2503,6 @@ "node": ">= 8" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/debug": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", @@ -2690,6 +2519,17 @@ } } }, + "node_modules/debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/dedent": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", @@ -2717,6 +2557,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -2729,15 +2570,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -2764,16 +2596,15 @@ "node": ">=8" } }, - "node_modules/dicer": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", - "integrity": "sha512-FDvbtnq7dzlPz0wyYlOExifDEZcu8h+rErEXgfxqmLfRfC/kJidEFh4+effJRO3P0xmfqyPbSMG0LveNRfTKVg==", + "node_modules/dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", + "dev": true, + "license": "ISC", "dependencies": { - "readable-stream": "1.1.x", - "streamsearch": "0.1.2" - }, - "engines": { - "node": ">=0.8.0" + "asap": "^2.0.0", + "wrappy": "1" } }, "node_modules/diff": { @@ -2810,16 +2641,6 @@ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -2849,26 +2670,14 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2882,6 +2691,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -2893,26 +2703,16 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", "engines": { "node": ">= 0.4" } }, - "node_modules/es-module-lexer": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", - "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", - "dev": true, - "peer": true - }, - "node_modules/es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" - }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, "engines": { "node": ">=6" } @@ -2920,7 +2720,8 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "2.0.0", @@ -2931,20 +2732,6 @@ "node": ">=8" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -2957,57 +2744,15 @@ "node": ">=4" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "peer": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8.x" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -3063,36 +2808,37 @@ } }, "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -3104,9 +2850,10 @@ } }, "node_modules/express/node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3125,11 +2872,12 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/express/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -3138,21 +2886,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3179,11 +2912,6 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" - }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -3213,12 +2941,13 @@ } }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -3233,6 +2962,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -3240,7 +2970,8 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/find-up": { "version": "4.1.0", @@ -3270,29 +3001,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -3305,6 +3013,7 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3370,6 +3079,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -3378,6 +3088,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -3413,15 +3124,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, "node_modules/glob": { "version": "10.4.2", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", @@ -3455,13 +3157,6 @@ "node": ">= 6" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -3494,6 +3189,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -3506,51 +3202,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/har-validator/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/har-validator/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3564,6 +3215,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -3575,6 +3227,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3586,6 +3239,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3604,6 +3258,13 @@ "node": ">= 0.4" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -3625,26 +3286,6 @@ "node": ">= 0.8" } }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/http2-client": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", - "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==" - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3801,28 +3442,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -4607,12 +4231,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -4631,23 +4249,11 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -4677,21 +4283,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -4701,15 +4292,6 @@ "node": ">=6" } }, - "node_modules/lcov-parse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", - "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", - "dev": true, - "bin": { - "lcov-parse": "bin/cli.js" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -4719,54 +4301,168 @@ "node": ">=6" } }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "node_modules/license-checker": { + "version": "25.0.1", + "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz", + "integrity": "sha512-mET5AIwl7MR2IAKYYoVBBpV0OnkKQ1xGj2IMMeEFIs42QAkEVjRtFZGWmQ28WeU7MP779iAgOaOy93Mn44mn6g==", "dev": true, - "peer": true, - "engines": { - "node": ">=6.11.5" + "license": "BSD-3-Clause", + "dependencies": { + "chalk": "^2.4.1", + "debug": "^3.1.0", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "read-installed": "~4.0.3", + "semver": "^5.5.0", + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-satisfies": "^4.0.0", + "treeify": "^1.1.0" + }, + "bin": { + "license-checker": "bin/license-checker" } }, - "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==", + "node_modules/license-checker/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, - "node_modules/log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "node_modules/license-checker/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, "engines": { - "node": ">=0.8.6" + "node": ">=4" + } + }, + "node_modules/license-checker/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/license-checker/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/license-checker/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/license-checker/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/license-checker/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/license-checker/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/license-checker/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" } }, + "node_modules/license-checker/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "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" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4832,9 +4528,13 @@ "integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==" }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-stream": { "version": "2.0.0", @@ -4859,9 +4559,10 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -4874,6 +4575,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -4958,36 +4660,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/multer": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.4.tgz", - "integrity": "sha512-2wY2+xD4udX612aMqMcB8Ws2Voq6NIUPEtD1be6m411T4uDH/VtL9i//xvcyFlTVfRdaBsk7hV5tgrGQqhuBiw==", - "deprecated": "Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.", - "dependencies": { - "append-field": "^1.0.0", - "busboy": "^0.2.11", - "concat-stream": "^1.5.2", - "mkdirp": "^0.5.4", - "object-assign": "^4.1.1", - "on-finished": "^2.3.0", - "type-is": "^1.6.4", - "xtend": "^4.0.0" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/multer/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -5002,63 +4674,55 @@ "node": ">= 0.6" } }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, - "peer": true - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": 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" - }, - "engines": { - "node": "4.x || >=6.0.0" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node_modules/node-readfiles": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", - "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", - "dependencies": { - "es6-promise": "^3.2.1" - } - }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, + "node_modules/nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "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, + "license": "BSD-2-Clause", + "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/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -5068,6 +4732,13 @@ "node": ">=0.10.0" } }, + "node_modules/npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true, + "license": "ISC" + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -5080,80 +4751,6 @@ "node": ">=8" } }, - "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.2.2", - "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", - "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", - "dependencies": { - "@exodus/schemasafe": "^1.0.0-rc.2", - "should": "^13.2.1", - "yaml": "^1.10.0" - }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/oas-resolver": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", - "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", - "dependencies": { - "node-fetch-h2": "^2.3.0", - "oas-kit-common": "^1.0.8", - "reftools": "^1.1.9", - "yaml": "^1.10.0", - "yargs": "^17.0.1" - }, - "bin": { - "resolve": "resolve.js" - }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/oas-schema-walker": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", - "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/oas-validator": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", - "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", - "dependencies": { - "call-me-maybe": "^1.0.1", - "oas-kit-common": "^1.0.8", - "oas-linter": "^3.2.2", - "oas-resolver": "^2.5.6", - "oas-schema-walker": "^1.1.5", - "reftools": "^1.1.9", - "should": "^13.2.1", - "yaml": "^1.10.0" - }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5166,6 +4763,7 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -5212,6 +4810,38 @@ "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==" }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -5301,39 +4931,11 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/passport": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.1.tgz", - "integrity": "sha512-IxXgZZs8d7uFSt3eqNjM9NQ3g3uQCW5avD8mRNoXV99Yig50vjuaez6dQK2qC0kVWPRTujxY0dWgGfT09adjYg==", - "dependencies": { - "passport-strategy": "1.x.x", - "pause": "0.0.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/passport-strategy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", - "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/path": { - "version": "0.12.7", - "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", - "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", - "dependencies": { - "process": "^0.11.1", - "util": "^0.10.3" - } - }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -5394,9 +4996,10 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", @@ -5406,17 +5009,6 @@ "node": ">=8" } }, - "node_modules/pause": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", - "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -5481,14 +5073,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -5519,12 +5103,6 @@ "node": ">= 0.10" } }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -5549,15 +5127,6 @@ } ] }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5577,20 +5146,11 @@ } ] }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "peer": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5615,66 +5175,114 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "node_modules/read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha512-O03wg/IYuV/VtnK2h/KXEt9VIbMUFbk3ERG0Iu4FhLZw0EP0T9znqrYDGn6ncbEsXUFaUjiVAWXHzxwt3lhRPQ==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "debuglog": "^1.0.1", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.2" + } + }, + "node_modules/read-installed/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-package-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", + "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", + "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", + "dev": true, + "license": "ISC", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0" } }, - "node_modules/reflect-metadata": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", - "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==" + "node_modules/read-package-json/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, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } }, - "node_modules/reftools": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", - "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", + "node_modules/read-package-json/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/read-package-json/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">= 6" + "node": "*" + } + }, + "node_modules/readdir-scoped-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dev": true, + "license": "ISC", + "dependencies": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" } }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -5831,59 +5439,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/schema-utils/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/schema-utils/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peer": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/schema-utils/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "peer": true - }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -5894,9 +5449,10 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -5920,6 +5476,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -5927,32 +5484,34 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "peer": true, - "dependencies": { - "randombytes": "^2.1.0" - } + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" @@ -5962,6 +5521,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -5998,58 +5558,11 @@ "node": ">=8" } }, - "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": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", - "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": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==" - }, - "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/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -6088,6 +5601,16 @@ "node": ">=8" } }, + "node_modules/slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "*" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6097,14 +5620,81 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdx-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", + "integrity": "sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-find-index": "^1.0.2", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/spdx-ranges": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz", + "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==", + "dev": true, + "license": "(MIT AND CC-BY-3.0)" + }, + "node_modules/spdx-satisfies": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-4.0.1.tgz", + "integrity": "sha512-WVzZ/cXAzoNmjCWiEluEA3BjHp5tiUmmhn9MK+X0tBbR9sOqtC6UQwmgCNrAIZvNlMuBUYAaHYfb2oqlF9SwKA==", "dev": true, + "license": "MIT", "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "spdx-compare": "^1.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" } }, "node_modules/sprintf-js": { @@ -6112,31 +5702,6 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, - "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -6157,19 +5722,6 @@ "node": ">= 0.8" } }, - "node_modules/streamsearch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", - "integrity": "sha512-jos8u++JKm0ARcSUTAZXOVC0mSox7Bhn6sBgty73P1f3JGf7yG2clTbBNHUdde/kdvP2FESam+vM6l8jBrNxHA==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -6351,140 +5903,6 @@ "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.17.14.tgz", "integrity": "sha512-CVbSfaLpstV65OnSjbXfVd6Sta3q3F7Cj/yYuvHMp1P90LztOLs6PfUnKEVAeiIVQt9u2SaPwv0LiH/OyMjHRw==" }, - "node_modules/swagger-ui-express": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.6.3.tgz", - "integrity": "sha512-CDje4PndhTD2HkgyKH3pab+LKspDeB/NhPN2OF1j+piYIamQqBYwAXWESOT1Yju2xFg51bRW9sUng2WxDjzArw==", - "dependencies": { - "swagger-ui-dist": ">=4.11.0" - }, - "engines": { - "node": ">= v0.10.32" - }, - "peerDependencies": { - "express": ">=4.0.0 || >=5.0.0-beta" - } - }, - "node_modules/swagger2openapi": { - "version": "7.0.8", - "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", - "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", - "dependencies": { - "call-me-maybe": "^1.0.1", - "node-fetch": "^2.6.1", - "node-fetch-h2": "^2.3.0", - "node-readfiles": "^0.2.0", - "oas-kit-common": "^1.0.8", - "oas-resolver": "^2.5.6", - "oas-schema-walker": "^1.1.5", - "oas-validator": "^5.0.8", - "reftools": "^1.1.9", - "yaml": "^1.10.0", - "yargs": "^17.0.1" - }, - "bin": { - "boast": "boast.js", - "oas-validate": "oas-validate.js", - "swagger2openapi": "swagger2openapi.js" - }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.31.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz", - "integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "peer": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/terser-webpack-plugin/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -6576,24 +5994,16 @@ "node": ">=0.6" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "node_modules/treeify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", + "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, + "license": "MIT", "engines": { - "node": ">=0.8" + "node": ">=0.6" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "node_modules/ts-jest": { "version": "29.1.5", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.5.tgz", @@ -6653,47 +6063,6 @@ "node": ">=10" } }, - "node_modules/ts-loader": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", - "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4", - "source-map": "^0.7.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "typescript": "*", - "webpack": "^5.0.0" - } - }, - "node_modules/ts-loader/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ts-loader/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/ts-morph": { "version": "23.0.0", "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-23.0.0.tgz", @@ -6750,7 +6119,8 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/tslint": { "version": "6.1.3", @@ -6758,6 +6128,7 @@ "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", "dev": true, + "license": "Apache-2.0", "dependencies": { "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", @@ -6788,6 +6159,7 @@ "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", "dev": true, + "license": "MIT", "bin": { "tslint-config-prettier-check": "bin/check.js" }, @@ -6800,6 +6172,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -6812,6 +6185,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6822,6 +6196,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -6836,6 +6211,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "1.1.3" } @@ -6844,13 +6220,15 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tslint/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -6861,6 +6239,7 @@ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6881,6 +6260,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -6890,6 +6270,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6902,6 +6283,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -6914,6 +6296,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver" } @@ -6923,6 +6306,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -6935,6 +6319,7 @@ "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -6942,24 +6327,6 @@ "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" } }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -7010,58 +6377,6 @@ "node": ">=14.17" } }, - "node_modules/typescript-rest": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/typescript-rest/-/typescript-rest-3.0.4.tgz", - "integrity": "sha512-sYM9AZoniflWJBffzke82uD1IW5cR1xYvO7L6fd+gVdhvrqT9SozaDKNLhtRcUiKk7gCWz0hPYTsMfE5tYC+5g==", - "dependencies": { - "@types/body-parser": "1.19.0", - "@types/cookie-parser": "^1.4.2", - "@types/express": "^4.17.12", - "@types/multer": "1.4.5", - "@types/passport": "^1.0.6", - "@types/serve-static": "^1.13.9", - "body-parser": "^1.19.0", - "cookie-parser": "^1.4.5", - "express": "^4.17.1", - "fs-extra": "^10.0.0", - "lodash": "^4.17.21", - "multer": "^1.4.2", - "passport": "^0.4.1", - "path": "^0.12.7", - "reflect-metadata": "^0.1.13", - "require-glob": "^4.0.0", - "swagger-ui-express": "^4.1.6", - "yamljs": "^0.3.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/typescript-rest/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/typescript-rest/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -7121,23 +6436,17 @@ "punycode": "^2.1.0" } }, - "node_modules/util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dependencies": { - "inherits": "2.0.3" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + "node_modules/util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", + "dev": true, + "license": "MIT" }, "node_modules/utils-merge": { "version": "1.0.1", @@ -7147,16 +6456,6 @@ "node": ">= 0.4.0" } }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -7177,6 +6476,17 @@ "node": ">=10.12.0" } }, + "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, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -7185,26 +6495,6 @@ "node": ">= 0.8" } }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -7214,92 +6504,6 @@ "makeerror": "1.0.12" } }, - "node_modules/watchpack": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", - "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", - "dev": true, - "peer": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/webpack": { - "version": "5.92.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.1.tgz", - "integrity": "sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==", - "dev": true, - "peer": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7431,6 +6635,7 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, "engines": { "node": ">=10" } @@ -7441,14 +6646,6 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "engines": { - "node": ">= 6" - } - }, "node_modules/yamljs": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", @@ -7514,6 +6711,7 @@ "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -7531,6 +6729,7 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, "engines": { "node": ">=12" } @@ -7539,6 +6738,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -7546,12 +6746,14 @@ "node_modules/yargs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/yargs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7565,6 +6767,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, diff --git a/package.json b/package.json index 5a052e8..12c60c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "typescript-rest-swagger", - "version": "1.4.0", + "name": "@nmshd/typescript-rest-swagger", + "version": "1.4.1", "description": "Generate Swagger files from a typescript-rest project", "keywords": [ "typescript", @@ -12,22 +12,34 @@ "codegen", "generation" ], + "repository": { + "type": "git", + "url": "https://github.com/thiagobustamante/typescript-rest-swagger.git" + }, + "license": "MIT", + "author": "Thiago da Rosa de Bustamante ", "main": "./dist/index.js", "types": "./dist/index.d.ts", + "bin": { + "swaggerGen": "dist/cli.js" + }, + "directories": { + "lib": "dist", + "doc": "doc" + }, "scripts": { - "start": "tsc -w", "build": "npm run clean && tsc", "clean": "rimraf dist", + "start": "tsc -w", "swagger-gen": "node ./dist/cli.js -c ./test/data/swagger.js", "pretest": "cross-env NODE_ENV=test npm run build", "test": "cross-env NODE_ENV=test jest --config ./test/jest.config.js", "test:coverage": "cross-env NODE_ENV=test jest --config ./test/jest.config.js --coverage --coverageReporters=text-lcov", "tsc": "tsc" }, - "author": "Thiago da Rosa de Bustamante ", - "license": "MIT", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", + "@nmshd/typescript-rest": "^3.0.5", "argparse": "^2.0.1", "debug": "^4.3.4", "fs-extra-promise": "^1.0.1", @@ -35,47 +47,30 @@ "lodash": "^4.17.21", "merge": "^2.1.1", "minimatch": "^9.0.3", - "mkdirp": "^3.0.1", "openapi-types": "^12.1.3", - "path": "^0.12.7", - "swagger2openapi": "^7.0.8", "ts-morph": "^23.0.0", "typescript": "^5.5.3", - "typescript-rest": "^3.0.4", "yamljs": "^0.3.0" }, "devDependencies": { + "@js-soft/license-check": "^1.0.9", "@types/argparse": "^2.0.14", "@types/debug": "^4.1.12", "@types/fs-extra-promise": "^1.0.13", - "@types/jest": "^29.5.12", + "@types/jest": "^29.5.13", "@types/lodash": "^4.14.202", "@types/minimatch": "^5.1.2", - "@types/mkdirp": "^2.0.0", "@types/yamljs": "^0.2.34", - "coveralls": "^3.1.1", "cross-env": "^7.0.3", "jest": "^29.7.0", "jsonata": "^2.0.3", "rimraf": "^5.0.5", "source-map-support": "^0.5.21", "ts-jest": "^29.1.2", - "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tslint": "^6.1.3", "tslint-config-prettier": "^1.18.0" }, - "repository": { - "type": "git", - "url": "https://github.com/thiagobustamante/typescript-rest-swagger.git" - }, - "bin": { - "swaggerGen": "dist/cli.js" - }, - "directories": { - "lib": "dist", - "doc": "doc" - }, "engines": { "node": ">=6.0.0" }, diff --git a/test/data/apidebug.ts b/test/data/apidebug.ts index a3925ae..3934769 100644 --- a/test/data/apidebug.ts +++ b/test/data/apidebug.ts @@ -1,19 +1,19 @@ -import { POST, Path } from "typescript-rest"; -import { TestInterface as Test } from "./TestInterface"; +import { POST, Path } from '@nmshd/typescript-rest'; +import { TestInterface as Test } from './TestInterface'; interface A extends Test { - c: T; + c: T; } -@Path("type") +@Path('type') export class TypeEndpoint { - @Path("obj") - @POST - public testPostObject(body: T) : A { - return { - c: "test", - a: body.a, - b: body.b, - } as A; - } + @Path('obj') + @POST + public testPostObject(body: T): A { + return { + c: 'test', + a: body.a, + b: body.b + } as A; + } } diff --git a/test/data/apis.ts b/test/data/apis.ts index 6f9d5b1..0864b44 100644 --- a/test/data/apis.ts +++ b/test/data/apis.ts @@ -1,555 +1,544 @@ -"use strict"; +'use strict'; import { - Accept, - DELETE, - FormParam, - GET, - POST, - PUT, - Path, - PathParam, - QueryParam, - Return, - Security, -} from "typescript-rest"; - -import * as swagger from "../../src/decorators"; -import { TestInterface } from "./TestInterface"; + Accept, + DELETE, + FormParam, + GET, + POST, + PUT, + Path, + PathParam, + QueryParam, + Return, + Security +} from '@nmshd/typescript-rest'; + +import * as swagger from '../../src/decorators'; +import { TestInterface } from './TestInterface'; export interface MytypeWithUnion { - property: "value1" | "value2"; + property: 'value1' | 'value2'; } -@Path("unionTypes") +@Path('unionTypes') export class TestUnionType { - @POST - public post(body: MytypeWithUnion): string { - return "42"; - } + @POST + public post(body: MytypeWithUnion): string { + return '42'; + } } interface Address { - street: string; + street: string; } interface Person { - name: string; - address?: Address; + name: string; + address?: Address; } interface End { - id: string; + id: string; } -type EndArrayRenamed = Array +type EndArrayRenamed = Array; interface Error { - text: string; + text: string; } interface Deep { - data: C; - error: D; + data: C; + error: D; } interface GenericA { - deep: A; - error: B; + deep: A; + error: B; } enum TestEnum { - Option1 = "option1", - Option2 = "option2", + Option1 = 'option1', + Option2 = 'option2' } enum TestNumericEnum { - Option1, - Option2, + Option1, + Option2 } enum TestMixedEnum { - Option1, - Option2 = "String param", + Option1, + Option2 = 'String param' } -@Accept("text/plain") -@Path("mypath") -@swagger.Tags("My Services") +@Accept('text/plain') +@Path('mypath') +@swagger.Tags('My Services') export class MyService { - @swagger.Response("default", "Error") - @swagger.Response(400, "The request format was incorrect.") - @swagger.Response(500, "There was an unexpected error.") - @GET - @Accept("text/html") - public test(): string { - return "OK"; - } - - /** - * This is the method description - * @param test This is the test param description - */ - @GET - @Path("secondpath") - @swagger.Example({ - name: "Joe", - }) - @swagger.Response(200, "The success test.") - public test2( - @QueryParam("testRequired") test: string, - @QueryParam("testDefault") test2: string = "value", - @QueryParam("testOptional") test3?: string, - @QueryParam("testEnum") test4?: TestEnum, - @QueryParam("testNumericEnum") test5?: TestNumericEnum, - @QueryParam("testMixedEnum") test6?: TestMixedEnum - ): Person { - return { name: "OK" }; - } - - @GET - @Path("generic") - public testGeneric(): GenericA, Error> { - return { - deep: { - data: [ - { - id: "1", - }, - ], - error: { text: "error" }, - }, - error: { text: "error" }, - }; - } - - @GET - @Path("generic2") - public testGeneric2(): GenericA, Error> { - return { - deep: { - data: [ - { - id: "1", - }, - ], - error: { text: "error" }, - }, - error: { text: "error" }, - }; - } - - @GET - @Path("secondpathundefined") - public test2undefined( - @QueryParam("testUndefined") test: string | undefined - ): Person { - return { name: "OK" }; - } - - @POST - @swagger.Example>([ - { - name: "Joe", - }, - ]) - public testPostString(body: string): Array { - return []; - } - - @Path("obj") - @POST - public testPostObject(data: object) { - return data; - } - - @GET - @Path("multi-query") - public testMultiQuery( - @QueryParam("id") ids: Array, - @QueryParam( - "name" /*, { collectionFormat: 'multi', allowEmptyValue: true }*/ - ) - names?: string | Array - ) { - return { ids: ids, names: names }; - } - - @GET - @Path("default-query") - public testDefaultQuery( - @QueryParam("num") num: number = 5, - @QueryParam("str") str: string = "default value", - @QueryParam("bool1") bool1: boolean = true, - @QueryParam("bool2") bool2: boolean = false, - @QueryParam("arr") arr: Array = ["a", "b", "c"] - ) { - return; - } - - @POST - @Path("test-compiler-options") - public async testCompilerOptions( - payload: TestInterface - ): Promise { - return { a: "string", b: 123 }; - } - - @POST - @Path("test-form-param") - public testFormParam(@FormParam("id") id: string): string { - return id; - } + @swagger.Response('default', 'Error') + @swagger.Response(400, 'The request format was incorrect.') + @swagger.Response(500, 'There was an unexpected error.') + @GET + @Accept('text/html') + public test(): string { + return 'OK'; + } + + /** + * This is the method description + * @param test This is the test param description + */ + @GET + @Path('secondpath') + @swagger.Example({ + name: 'Joe' + }) + @swagger.Response(200, 'The success test.') + public test2( + @QueryParam('testRequired') test: string, + @QueryParam('testDefault') test2: string = 'value', + @QueryParam('testOptional') test3?: string, + @QueryParam('testEnum') test4?: TestEnum, + @QueryParam('testNumericEnum') test5?: TestNumericEnum, + @QueryParam('testMixedEnum') test6?: TestMixedEnum + ): Person { + return { name: 'OK' }; + } + + @GET + @Path('generic') + public testGeneric(): GenericA, Error> { + return { + deep: { + data: [ + { + id: '1' + } + ], + error: { text: 'error' } + }, + error: { text: 'error' } + }; + } + + @GET + @Path('generic2') + public testGeneric2(): GenericA, Error> { + return { + deep: { + data: [ + { + id: '1' + } + ], + error: { text: 'error' } + }, + error: { text: 'error' } + }; + } + + @GET + @Path('secondpathundefined') + public test2undefined(@QueryParam('testUndefined') test: string | undefined): Person { + return { name: 'OK' }; + } + + @POST + @swagger.Example>([ + { + name: 'Joe' + } + ]) + public testPostString(body: string): Array { + return []; + } + + @Path('obj') + @POST + public testPostObject(data: object) { + return data; + } + + @GET + @Path('multi-query') + public testMultiQuery( + @QueryParam('id') ids: Array, + @QueryParam('name' /*, { collectionFormat: 'multi', allowEmptyValue: true }*/) + names?: string | Array + ) { + return { ids: ids, names: names }; + } + + @GET + @Path('default-query') + public testDefaultQuery( + @QueryParam('num') num: number = 5, + @QueryParam('str') str: string = 'default value', + @QueryParam('bool1') bool1: boolean = true, + @QueryParam('bool2') bool2: boolean = false, + @QueryParam('arr') arr: Array = ['a', 'b', 'c'] + ) { + return; + } + + @POST + @Path('test-compiler-options') + public async testCompilerOptions(payload: TestInterface): Promise { + return { a: 'string', b: 123 }; + } + + @POST + @Path('test-form-param') + public testFormParam(@FormParam('id') id: string): string { + return id; + } } class BaseService { - @DELETE - @Path(":id") - public testDelete(@PathParam("id") id: string): Promise { - return new Promise((resolve, reject) => { - resolve(); - }); - } + @DELETE + @Path(':id') + public testDelete(@PathParam('id') id: string): Promise { + return new Promise((resolve, reject) => { + resolve(); + }); + } } -@Path("promise") +@Path('promise') export class PromiseService extends BaseService { - /** - * Esta eh a da classe - * @param test Esta eh a description do param teste - */ - @swagger.Response(401, "Unauthorized") - @GET - public test(@QueryParam("testParam") test?: string): Promise { - return new Promise((resolve, reject) => { - resolve({ name: "OK" }); - }); - } - - @swagger.Response(200, "All Good") - @swagger.Response(401, "Unauthorized") - @swagger.Example({ name: "Test Person" }) - @GET - @Path(":id") - public testGetSingle(@PathParam("id") id: string): Promise { - return new Promise((resolve, reject) => { - resolve({ name: "OK" }); - }); - } - - @swagger.Response(201, "Person Created", { name: "Test Person" }) - @swagger.Response(401, "Unauthorized") - @swagger.Example({ name: "Example Person" }) // NOTE: this is here to test that it doesn't overwrite the example in the @Response above - @POST - public testPost(obj: Person): Promise> { - return new Promise>((resolve, reject) => { - resolve(new Return.NewResource("id", { name: "OK" })); - }); - } - - @GET - @Path("myFile") - @swagger.Produces("application/pdf") - public testFile( - @QueryParam("testParam") test?: string - ): Promise { - return new Promise((resolve, reject) => { - resolve(null); - }); - } + /** + * Esta eh a da classe + * @param test Esta eh a description do param teste + */ + @swagger.Response(401, 'Unauthorized') + @GET + public test(@QueryParam('testParam') test?: string): Promise { + return new Promise((resolve, reject) => { + resolve({ name: 'OK' }); + }); + } + + @swagger.Response(200, 'All Good') + @swagger.Response(401, 'Unauthorized') + @swagger.Example({ name: 'Test Person' }) + @GET + @Path(':id') + public testGetSingle(@PathParam('id') id: string): Promise { + return new Promise((resolve, reject) => { + resolve({ name: 'OK' }); + }); + } + + @swagger.Response(201, 'Person Created', { name: 'Test Person' }) + @swagger.Response(401, 'Unauthorized') + @swagger.Example({ name: 'Example Person' }) // NOTE: this is here to test that it doesn't overwrite the example in the @Response above + @POST + public testPost(obj: Person): Promise> { + return new Promise>((resolve, reject) => { + resolve(new Return.NewResource('id', { name: 'OK' })); + }); + } + + @GET + @Path('myFile') + @swagger.Produces('application/pdf') + public testFile(@QueryParam('testParam') test?: string): Promise { + return new Promise((resolve, reject) => { + resolve(null); + }); + } } export class BasicModel { - public id: number; + public id: number; } export class BasicEndpoint { - protected list(@QueryParam("full") full?: boolean): Promise> { - return new Promise((resolve, reject) => { - // todo - }); - } - - @POST - protected save(entity: T): Promise> { - return new Promise((resolve, reject) => { - // todo - }); - } - - @PUT - @Path("/:id") - protected update(@PathParam("id") id: number, entity: T): Promise { - return new Promise((resolve, reject) => { - // todo - }); - } - - @DELETE - @Path("/:id") - protected remove(@PathParam("id") id: string): Promise { - return new Promise((resolve, reject) => { - // todo - }); - } - - @GET - @Path("/:id") - protected get(@PathParam("id") id: string): Promise { - return new Promise((resolve, reject) => { - // todo - }); - } + protected list(@QueryParam('full') full?: boolean): Promise> { + return new Promise((resolve, reject) => { + // todo + }); + } + + @POST + protected save(entity: T): Promise> { + return new Promise((resolve, reject) => { + // todo + }); + } + + @PUT + @Path('/:id') + protected update(@PathParam('id') id: number, entity: T): Promise { + return new Promise((resolve, reject) => { + // todo + }); + } + + @DELETE + @Path('/:id') + protected remove(@PathParam('id') id: string): Promise { + return new Promise((resolve, reject) => { + // todo + }); + } + + @GET + @Path('/:id') + protected get(@PathParam('id') id: string): Promise { + return new Promise((resolve, reject) => { + // todo + }); + } } export interface MyDatatype extends BasicModel { - property1: string; + property1: string; } -@Path("generics1") +@Path('generics1') export class DerivedEndpoint extends BasicEndpoint { - @GET - @Path(":param") - protected test(@PathParam("param") param: string): Promise { - return new Promise((resolve, reject) => { - // content - }); - } + @GET + @Path(':param') + protected test(@PathParam('param') param: string): Promise { + return new Promise((resolve, reject) => { + // content + }); + } } export interface BasicModel2 { - prop: T; + prop: T; } export interface MyDatatype2 extends BasicModel2 { - property1: string; + property1: string; } -@Path("generics2") +@Path('generics2') export class DerivedEndpoint2 { - @GET - @Path(":param") - protected test(@PathParam("param") param: string): Promise { - return new Promise((resolve, reject) => { - // content - }); - } + @GET + @Path(':param') + protected test(@PathParam('param') param: string): Promise { + return new Promise((resolve, reject) => { + // content + }); + } } type SomeDeepType = { - name: string; - value: { key: string }; + name: string; + value: { key: string }; }; type SomeDeepType2 = { - name: string; - value: { key: string }; + name: string; + value: { key: string }; }; // tslint:disable-next-line: interface-over-type-literal export type SimpleHelloType = { - /** - * Description for greeting property - */ - greeting: string; - arrayOfSomething: Array; - arrayOfUnion: Array; - // arrayOfUnion2: (string | number)[]; - union: SomeDeepType2 | SomeDeepType; - arrayOfUnion3: Array; - - /** - * Description for profile - */ - profile: { /** - * Description for profile name + * Description for greeting property */ - name: string; - name2: "value"; - name3: { value: "value1" | "value2" }; - name4: 2; - }; - - comparePassword: ( - candidatePassword: string, - cb: (err: any, isMatch: any) => {} - ) => void; + greeting: string; + arrayOfSomething: Array; + arrayOfUnion: Array; + // arrayOfUnion2: (string | number)[]; + union: SomeDeepType2 | SomeDeepType; + arrayOfUnion3: Array; + + /** + * Description for profile + */ + profile: { + /** + * Description for profile name + */ + name: string; + name2: 'value'; + name3: { value: 'value1' | 'value2' }; + name4: 2; + }; + + comparePassword: (candidatePassword: string, cb: (err: any, isMatch: any) => {}) => void; }; export interface Something { - id: UUID; - someone: string; - kind: string; + id: UUID; + someone: string; + kind: string; } export type UUID = string; -@Path("type") +@Path('type') export class TypeEndpoint { - @GET - @Path(":param") - public test(@PathParam("param") param: string): Promise { - return new Promise((resolve, reject) => { - // content - }); - } - - @GET - @Path(":param/2") - public test2(@PathParam("param") param: string): Promise { - return new Promise((resolve, reject) => { - // content - }); - } + @GET + @Path(':param') + public test(@PathParam('param') param: string): Promise { + return new Promise((resolve, reject) => { + // content + }); + } + + @GET + @Path(':param/2') + public test2(@PathParam('param') param: string): Promise { + return new Promise((resolve, reject) => { + // content + }); + } } export interface ResponseBody { - data: T; + data: T; } export class PrimitiveClassModel { - /** - * An integer - */ - @swagger.IsInt - public int?: number; + /** + * An integer + */ + @swagger.IsInt + public int?: number; - @swagger.IsLong - public long?: number; + @swagger.IsLong + public long?: number; - @swagger.IsFloat - public float?: number; + @swagger.IsFloat + public float?: number; - @swagger.IsDouble - public double?: number; + @swagger.IsDouble + public double?: number; } export interface PrimitiveInterfaceModel { - /** - * An integer - * @IsInt - */ - int?: number; + /** + * An integer + * @IsInt + */ + int?: number; - /** - * @IsLong - */ - long?: number; + /** + * @IsLong + */ + long?: number; - /** - * @IsFloat - */ - float?: number; + /** + * @IsFloat + */ + float?: number; - /** - * @IsDouble - */ - double?: number; + /** + * @IsDouble + */ + double?: number; } -@Path("primitives") +@Path('primitives') export class PrimitiveEndpoint { - @Path("/class") - @GET - public getClass(): PrimitiveClassModel { - return new PrimitiveClassModel(); - } - - @Path("/interface") - @GET - public testInterface(): PrimitiveInterfaceModel { - return {}; - } - - @Path(":id") - @GET - public getById(@PathParam("id") @swagger.IsLong id: number) { - // ... - } - - @Path("/arrayNative") - @GET - // tslint:disable-next-line:array-type - public getArrayNative(): ResponseBody { - return { data: ["hello", "world"] }; - } - - @Path("/array") - @GET - public getArray(): ResponseBody> { - return { data: ["hello", "world"] }; - } -} - -@Path("parameterized/:objectId") + @Path('/class') + @GET + public getClass(): PrimitiveClassModel { + return new PrimitiveClassModel(); + } + + @Path('/interface') + @GET + public testInterface(): PrimitiveInterfaceModel { + return {}; + } + + @Path(':id') + @GET + public getById(@PathParam('id') @swagger.IsLong id: number) { + // ... + } + + @Path('/arrayNative') + @GET + // tslint:disable-next-line:array-type + public getArrayNative(): ResponseBody { + return { data: ['hello', 'world'] }; + } + + @Path('/array') + @GET + public getArray(): ResponseBody> { + return { data: ['hello', 'world'] }; + } +} + +@Path('parameterized/:objectId') export class ParameterizedEndpoint { - @Path("/test") - @GET - public test(@PathParam("objectId") objectId: string): PrimitiveClassModel { - return new PrimitiveClassModel(); - } + @Path('/test') + @GET + public test(@PathParam('objectId') objectId: string): PrimitiveClassModel { + return new PrimitiveClassModel(); + } } export abstract class Entity { - /** - * A numeric identifier - */ - public id?: number; + /** + * A numeric identifier + */ + public id?: number; } export class NamedEntity implements Entity { - public id: number; - public name: string; + public id: number; + public name: string; } -@Path("abstract") +@Path('abstract') export class AbstractEntityEndpoint { - @GET - public get(): NamedEntity { - return new NamedEntity(); - } + @GET + public get(): NamedEntity { + return new NamedEntity(); + } } -@Path("secure") -@Security(["ROLE_1", "ROLE_2"], "access_token") +@Path('secure') +@Security(['ROLE_1', 'ROLE_2'], 'access_token') export class SecureEndpoint { - @GET - public get(): string { - return "Access Granted"; - } + @GET + public get(): string { + return 'Access Granted'; + } - @POST - @Security([], "user_email") - public post(): string { - return "Posted"; - } + @POST + @Security([], 'user_email') + public post(): string { + return 'Posted'; + } } -@Path("supersecure") -@Security("access_token") -@Security("user_email") +@Path('supersecure') +@Security('access_token') +@Security('user_email') @Security() export class SuperSecureEndpoint { - @GET - public get(): string { - return "Access Granted"; - } + @GET + public get(): string { + return 'Access Granted'; + } } -@Path("response") -@swagger.Response(400, "The request format was incorrect.") -@swagger.Response(500, "There was an unexpected error.") +@Path('response') +@swagger.Response(400, 'The request format was incorrect.') +@swagger.Response(500, 'There was an unexpected error.') export class ResponseController { - @GET - public get(): string { - return "42"; - } - - @swagger.Response(401, "Unauthorized.") - @swagger.Response(502, "Internal server error.") - @GET - @Path("/test") - public test(): string { - return "OK"; - } + @GET + public get(): string { + return '42'; + } + + @swagger.Response(401, 'Unauthorized.') + @swagger.Response(502, 'Internal server error.') + @GET + @Path('/test') + public test(): string { + return 'OK'; + } } diff --git a/tsconfig.json b/tsconfig.json index 39cad93..110582c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,22 @@ { - "compilerOptions": { - "declaration": true, - "declarationMap": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "lib": [ - "es6", - "dom" - ], - "module": "commonjs", - "newLine": "LF", - "noFallthroughCasesInSwitch": true, - "noImplicitAny": false, - "noImplicitReturns": true, - "noImplicitThis": false, - "noUnusedParameters": false, - "noUnusedLocals": false, - "outDir": "dist", - "sourceMap": true, - "strictNullChecks": true, - "target": "ESNext" - }, - "include": [ - "src/**/*.ts" - ] -} \ No newline at end of file + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "lib": ["es6", "dom"], + "module": "commonjs", + "newLine": "LF", + "noFallthroughCasesInSwitch": true, + "noImplicitAny": false, + "noImplicitReturns": true, + "noImplicitThis": false, + "noUnusedParameters": false, + "noUnusedLocals": false, + "outDir": "dist", + "sourceMap": true, + "strictNullChecks": true, + "target": "ESNext" + }, + "include": ["src/**/*.ts"] +}