From 6d7e470a1425ba0064afe2e9317368879378b772 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sun, 2 Jun 2024 15:21:32 -0700 Subject: [PATCH 1/7] Update npm packages - Update most packages within their major version numbers - Update @types/node to v18 in anticipation of dropping support for deprecated Node.js versions - Add js-yaml to dev dependencies since it is used directly in tests - Replace .safeLoad with .load in test since .safeLoad is deprecated - Type loaded document as OpenAPIV3.Document to fix type error - Update @types/supertest from v2 to v6 to match the lib version --- package-lock.json | 3270 ++++++++++++++++++------------- package.json | 36 +- test/response.validator.spec.ts | 2 +- 3 files changed, 1885 insertions(+), 1423 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c3be8c7..a87ece20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "5.2.0", "license": "MIT", "dependencies": { - "@apidevtools/json-schema-ref-parser": "^11.6.2", + "@apidevtools/json-schema-ref-parser": "^11.6.4", "@types/multer": "^1.4.11", - "ajv": "^8.14.0", + "ajv": "^8.15.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", "content-type": "^1.0.5", @@ -24,37 +24,54 @@ "path-to-regexp": "^6.2.2" }, "devDependencies": { - "@types/cookie-parser": "^1.4.2", - "@types/express": "4.17.13", - "@types/mocha": "^9.1.0", - "@types/morgan": "^1.9.3", - "@types/node": "^17.0.21", - "@types/supertest": "^2.0.11", - "body-parser": "^1.19.2", - "chai": "^4.3.6", - "commitizen": "^4.2.5", + "@types/cookie-parser": "^1.4.7", + "@types/express": "4.17.21", + "@types/js-yaml": "^4.0.9", + "@types/mocha": "^9.1.1", + "@types/morgan": "^1.9.9", + "@types/node": "^18.19.34", + "@types/supertest": "^6.0.2", + "body-parser": "^1.20.2", + "chai": "^4.4.1", + "commitizen": "^4.3.0", "cookie-parser": "^1.4.6", "coveralls": "^3.1.1", "express": "^4.19.2", + "js-yaml": "^4.1.0", "mocha": "^9.2.2", "morgan": "^1.10.0", - "nodemon": "^3.0.1", + "nodemon": "^3.1.3", "nyc": "^15.1.0", - "prettier": "^2.5.1", - "rimraf": "^5.0.5", + "prettier": "^2.8.8", + "rimraf": "^5.0.7", "source-map-support": "0.5.21", - "supertest": "^6.2.2", - "ts-node": "^10.7.0", - "typescript": "^4.6.2" + "supertest": "^6.3.4", + "ts-node": "^10.9.2", + "typescript": "^4.9.5" }, "peerDependencies": { "express": "*" } }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.6.2", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.6.2.tgz", - "integrity": "sha512-ENUdLLT04aDbbHCRwfKf8gR67AhV0CdFrOAtk+FcakBAgaq6ds3HLK9X0BCyiFUz8pK9uP+k6YZyJaGG7Mt7vQ==", + "version": "11.6.4", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.6.4.tgz", + "integrity": "sha512-9K6xOqeevacvweLGik6LnZCb1fBtCOSIWQs8d096XGeqoLKC33UVMGz9+77Gw44KvbH4pKcQPWo4ZpxkXYj05w==", + "license": "MIT", "dependencies": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.15", @@ -67,65 +84,52 @@ "url": "https://github.com/sponsors/philsturgeon" } }, - "node_modules/@apidevtools/json-schema-ref-parser/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/@apidevtools/json-schema-ref-parser/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.6.tgz", + "integrity": "sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.6", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", - "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.6.tgz", + "integrity": "sha512-aC2DGhBq5eEdyXWqrDInSqQjO0k8xtPRf5YylULqx8MCd6jBtzqfta/3ETMRpuKIc5hyswfO80ObyA1MvkCcUQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.15.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.5.tgz", - "integrity": "sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-compilation-targets": "^7.15.4", - "@babel/helper-module-transforms": "^7.15.4", - "@babel/helpers": "^7.15.4", - "@babel/parser": "^7.15.5", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4", - "convert-source-map": "^1.7.0", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.6.tgz", + "integrity": "sha512-qAHSfAdVyFmIvl0VHELib8xar7ONuSHrE2hLnsaWkYNTI68dmi1x8GYDhJjMI/e7XWal9QBlZkwbOnkcw7Z8gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.6", + "@babel/generator": "^7.24.6", + "@babel/helper-compilation-targets": "^7.24.6", + "@babel/helper-module-transforms": "^7.24.6", + "@babel/helpers": "^7.24.6", + "@babel/parser": "^7.24.6", + "@babel/template": "^7.24.6", + "@babel/traverse": "^7.24.6", + "@babel/types": "^7.24.6", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -135,11 +139,19 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, "node_modules/@babel/core/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -156,58 +168,50 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", - "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.6.tgz", + "integrity": "sha512-S7m4eNa6YAPJRHmKsLHIDJhNAGNKoWNiWefz1MBbpnt8g9lvMDl1hir4P9bo/57bQEmuwEhnRU/AMWsD0G/Fbg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.3", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.24.6", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", - "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.6.tgz", + "integrity": "sha512-VZQ57UsDGlX/5fFA7GkVPplZhHsVc+vuErWgdOiysI9Ksnw0Pbbd6pnPiR/mmJyKHgyIW0c7KT32gmhiF+cirg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", - "semver": "^6.3.0" + "@babel/compat-data": "^7.24.6", + "@babel/helper-validator-option": "^7.24.6", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { @@ -215,198 +219,173 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz", + "integrity": "sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.6.tgz", + "integrity": "sha512-xpeLqeeRkbxhnYimfr2PC+iA0Q7ljX/d1eZ9/inYbmfG2jpl8Lu3DyXvpOAnrS5kxkfOWJjioIMQsaMBXFI05w==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" + "@babel/template": "^7.24.6", + "@babel/types": "^7.24.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", - "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.6.tgz", + "integrity": "sha512-SF/EMrC3OD7dSta1bLJIlrsVxwtd0UpjRJqLno6125epQMJ/kyFmpTT4pbvPbdQHzCHg+biQ7Syo8lnDtbR+uA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.24.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", - "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz", + "integrity": "sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.24.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.4.tgz", - "integrity": "sha512-9fHHSGE9zTC++KuXLZcB5FKgvlV83Ox+NLUmQTawovwlJ85+QMhk1CnVk406CQVj97LaWod6KVjl2Sfgw9Aktw==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.15.4", - "@babel/helper-replace-supers": "^7.15.4", - "@babel/helper-simple-access": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/helper-validator-identifier": "^7.14.9", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", - "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.6.tgz", + "integrity": "sha512-Y/YMPm83mV2HJTbX1Qh2sjgjqcacvOlhbzdCCsSlblOKjSYmQqEbO6rUniWQyRo9ncyfjT8hnUjlG06RXDEmcA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/helper-environment-visitor": "^7.24.6", + "@babel/helper-module-imports": "^7.24.6", + "@babel/helper-simple-access": "^7.24.6", + "@babel/helper-split-export-declaration": "^7.24.6", + "@babel/helper-validator-identifier": "^7.24.6" }, "engines": { "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", - "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", - "dev": true, - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.15.4", - "@babel/helper-optimise-call-expression": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", - "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.6.tgz", + "integrity": "sha512-nZzcMMD4ZhmB35MOOzQuiGO5RzL6tJbsT37Zx8M5L/i9KSrukGXWTjLe1knIbb/RmxoJE9GON9soq0c0VEMM5g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.24.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.6.tgz", + "integrity": "sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz", + "integrity": "sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz", + "integrity": "sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.6.tgz", + "integrity": "sha512-Jktc8KkF3zIkePb48QO+IapbXlSapOW9S+ogZZkcO6bABgYAxtZcjZ/O005111YLf+j4M84uEgwYoidDkXbCkQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", - "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.6.tgz", + "integrity": "sha512-V2PI+NqnyFu1i0GyTd/O/cTpxzQCYioSkUIRmgo7gFEHKKCg5w46+r/A6WeUR1+P3TeQ49dspGPNd/E3n9AnnA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/template": "^7.24.6", + "@babel/types": "^7.24.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.6.tgz", + "integrity": "sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.6", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", - "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.6.tgz", + "integrity": "sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==", "dev": true, + "license": "MIT", "bin": { "parser": "bin/babel-parser.js" }, @@ -415,34 +394,36 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.6.tgz", + "integrity": "sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.24.6", + "@babel/parser": "^7.24.6", + "@babel/types": "^7.24.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", - "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", - "debug": "^4.1.0", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.6.tgz", + "integrity": "sha512-OsNjaJwT9Zn8ozxcfoBc+RaHdj3gFmCmYoQLUII1o6ZrUwku0BMg80FoOTPx+Gi6XhcQxAYE4xyjPTo4SxEQqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.6", + "@babel/generator": "^7.24.6", + "@babel/helper-environment-visitor": "^7.24.6", + "@babel/helper-function-name": "^7.24.6", + "@babel/helper-hoist-variables": "^7.24.6", + "@babel/helper-split-export-declaration": "^7.24.6", + "@babel/parser": "^7.24.6", + "@babel/types": "^7.24.6", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -450,10 +431,11 @@ } }, "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -470,16 +452,18 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/types": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", - "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", + "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.6", + "@babel/helper-validator-identifier": "^7.24.6", "to-fast-properties": "^2.0.0" }, "engines": { @@ -487,350 +471,138 @@ } }, "node_modules/@commitlint/config-validator": { - "version": "17.1.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.1.0.tgz", - "integrity": "sha512-Q1rRRSU09ngrTgeTXHq6ePJs2KrI+axPTgkNYDWSJIuS1Op4w3J30vUfSXjwn5YEJHklK3fSqWNHmBhmTR7Vdg==", + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-19.0.3.tgz", + "integrity": "sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { - "@commitlint/types": "^17.0.0", + "@commitlint/types": "^19.0.3", "ajv": "^8.11.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/execute-rule": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.0.0.tgz", - "integrity": "sha512-nVjL/w/zuqjCqSJm8UfpNaw66V9WzuJtQvEnCrK4jDw6qKTmZB+1JQ8m6BQVZbNBcwfYdDNKnhIhqI0Rk7lgpQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-19.0.0.tgz", + "integrity": "sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==", "dev": true, + "license": "MIT", "optional": true, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/load": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-17.2.0.tgz", - "integrity": "sha512-HDD57qSqNrk399R4TIjw31AWBG8dBjNj1MrDKZKmC/wvimtnIFlqzcu1+sxfXIOHj/+M6tcMWDtvknGUd7SU+g==", - "dev": true, - "optional": true, - "dependencies": { - "@commitlint/config-validator": "^17.1.0", - "@commitlint/execute-rule": "^17.0.0", - "@commitlint/resolve-extends": "^17.1.0", - "@commitlint/types": "^17.0.0", - "@types/node": "^14.0.0", - "chalk": "^4.1.0", - "cosmiconfig": "^7.0.0", - "cosmiconfig-typescript-loader": "^4.0.0", - "lodash": "^4.17.19", - "resolve-from": "^5.0.0", - "ts-node": "^10.8.1", - "typescript": "^4.6.4" - }, - "engines": { - "node": ">=v14" - } - }, - "node_modules/@commitlint/load/node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "optional": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@commitlint/load/node_modules/@types/node": { - "version": "14.18.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", - "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", - "dev": true, - "optional": true - }, - "node_modules/@commitlint/load/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-19.2.0.tgz", + "integrity": "sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { - "color-convert": "^2.0.1" + "@commitlint/config-validator": "^19.0.3", + "@commitlint/execute-rule": "^19.0.0", + "@commitlint/resolve-extends": "^19.1.0", + "@commitlint/types": "^19.0.3", + "chalk": "^5.3.0", + "cosmiconfig": "^9.0.0", + "cosmiconfig-typescript-loader": "^5.0.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "lodash.uniq": "^4.5.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=v18" } }, "node_modules/@commitlint/load/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, + "license": "MIT", "optional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@commitlint/load/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@commitlint/load/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "node_modules/@commitlint/load/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/@commitlint/load/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@commitlint/load/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@commitlint/load/node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "optional": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/@commitlint/load/node_modules/typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", - "dev": true, - "optional": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@commitlint/load/node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "optional": true - }, "node_modules/@commitlint/resolve-extends": { - "version": "17.1.0", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.1.0.tgz", - "integrity": "sha512-jqKm00LJ59T0O8O4bH4oMa4XyJVEOK4GzH8Qye9XKji+Q1FxhZznxMV/bDLyYkzbTodBt9sL0WLql8wMtRTbqQ==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-19.1.0.tgz", + "integrity": "sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { - "@commitlint/config-validator": "^17.1.0", - "@commitlint/types": "^17.0.0", - "import-fresh": "^3.0.0", - "lodash": "^4.17.19", - "resolve-from": "^5.0.0", - "resolve-global": "^1.0.0" + "@commitlint/config-validator": "^19.0.3", + "@commitlint/types": "^19.0.3", + "global-directory": "^4.0.1", + "import-meta-resolve": "^4.0.0", + "lodash.mergewith": "^4.6.2", + "resolve-from": "^5.0.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/types": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.0.0.tgz", - "integrity": "sha512-hBAw6U+SkAT5h47zDMeOu3HSiD0SODw4Aq7rRNh1ceUmL7GyLKYhPbUvlRWqZ65XjBLPHZhFyQlRaPNz8qvUyQ==", + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.0.3.tgz", + "integrity": "sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { - "chalk": "^4.1.0" + "@types/conventional-commits-parser": "^5.0.0", + "chalk": "^5.3.0" }, "engines": { - "node": ">=v14" - } - }, - "node_modules/@commitlint/types/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=v18" } }, "node_modules/@commitlint/types/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, + "license": "MIT", "optional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@commitlint/types/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@commitlint/types/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "node_modules/@commitlint/types/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@commitlint/types/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, - "optional": true, + "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { - "node": ">=8" - } - }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true, - "engines": { - "node": ">= 12" + "node": ">=12" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, + "license": "MIT", "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" - }, - "engines": { - "node": ">=12" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@isaacs/cliui": { @@ -838,6 +610,7 @@ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -855,6 +628,7 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -867,6 +641,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -878,13 +653,15 @@ "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -902,6 +679,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -917,6 +695,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -934,6 +713,7 @@ "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, + "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -945,11 +725,22 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -958,11 +749,26 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@istanbuljs/load-nyc-config/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, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -975,6 +781,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -990,6 +797,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -1002,171 +810,225 @@ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "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==" + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "license": "MIT" }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=14" } }, "node_modules/@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", - "dev": true + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", - "dev": true + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", - "dev": true + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/body-parser": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.1.tgz", - "integrity": "sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==", + "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/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/conventional-commits-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", + "integrity": "sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==", + "dev": true, + "license": "MIT", + "optional": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/cookie-parser": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@types/cookie-parser/-/cookie-parser-1.4.2.tgz", - "integrity": "sha512-uwcY8m6SDQqciHsqcKDGbo10GdasYsPCYkH3hVegj9qAah6pX5HivOnOuI3WYmyQMnOATV39zv/Ybs0bC/6iVg==", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/@types/cookie-parser/-/cookie-parser-1.4.7.tgz", + "integrity": "sha512-Fvuyi354Z+uayxzIGCwYTayFKocfV7TuDYZClCdIP9ckhvAu/ixDtCB6qx2TT0FKjPLf1f3P/J1rgf6lPs64mw==", "dev": true, + "license": "MIT", "dependencies": { "@types/express": "*" } }, "node_modules/@types/cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-t73xJJrvdTjXrn4jLS9VSGRbz0nUY3cl2DMGDU48lKl+HR9dbbjW2A9r3g40VA++mQpy6uuHg33gy7du2BKpog==", - "dev": true + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.5.tgz", + "integrity": "sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==", + "dev": true, + "license": "MIT" }, "node_modules/@types/express": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", - "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "license": "MIT", "dependencies": { "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", + "@types/express-serve-static-core": "^4.17.33", "@types/qs": "*", "@types/serve-static": "*" } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.24", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz", - "integrity": "sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", + "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", + "license": "MIT", "dependencies": { "@types/node": "*", "@types/qs": "*", - "@types/range-parser": "*" + "@types/range-parser": "*", + "@types/send": "*" } }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "license": "MIT" + }, + "node_modules/@types/js-yaml": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", + "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, + "node_modules/@types/methods": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/methods/-/methods-1.1.4.tgz", + "integrity": "sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==", + "dev": true, + "license": "MIT" }, "node_modules/@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "license": "MIT" }, "node_modules/@types/mocha": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.0.tgz", - "integrity": "sha512-QCWHkbMv4Y5U9oW10Uxbr45qMMSzl4OzijsozynUAgx3kEHUdXB00udx2dWDQ7f2TU2a2uuiFaRZjCe3unPpeg==", - "dev": true + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/morgan": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@types/morgan/-/morgan-1.9.3.tgz", - "integrity": "sha512-BiLcfVqGBZCyNCnCH3F4o2GmDLrpy0HeBVnNlyZG4fo88ZiE9SoiBe3C+2ezuwbjlEyT+PDZ17//TAlRxAn75Q==", + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/@types/morgan/-/morgan-1.9.9.tgz", + "integrity": "sha512-iRYSDKVaC6FkGSpEVVIvrRGw0DfJMiQzIn3qr2G5B3C//AWkulhXgaBd7tS9/J79GWSYMTHGs7PfI5b3Y8m+RQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -1175,77 +1037,89 @@ "version": "1.4.11", "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.11.tgz", "integrity": "sha512-svK240gr6LVWvv3YGyhLlA+6LRRWA4mnGIU7RcNmgjBYFl6665wcXrRfxGp5tEPVHUNm5FMcmq7too9bxCwX/w==", + "license": "MIT", "dependencies": { "@types/express": "*" } }, "node_modules/@types/node": { - "version": "17.0.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz", - "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==" - }, - "node_modules/@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true, - "optional": true + "version": "18.19.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", + "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "license": "MIT" }, "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" - }, - "node_modules/@types/serve-static": { - "version": "1.13.10", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz", - "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "license": "MIT", "dependencies": { "@types/mime": "^1", "@types/node": "*" } }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, "node_modules/@types/superagent": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.12.tgz", - "integrity": "sha512-1GQvD6sySQPD6p9EopDFI3f5OogdICl1sU/2ij3Esobz/RtL9fWZZDPmsuv7eiy5ya+XNiPAxUcI3HIUTJa+3A==", + "version": "8.1.7", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-8.1.7.tgz", + "integrity": "sha512-NmIsd0Yj4DDhftfWvvAku482PZum4DBW7U51OvS8gvOkDDY0WT1jsVyDV3hK+vplrsYw8oDwi9QxOM7U68iwww==", "dev": true, + "license": "MIT", "dependencies": { - "@types/cookiejar": "*", + "@types/cookiejar": "^2.1.5", + "@types/methods": "^1.1.4", "@types/node": "*" } }, "node_modules/@types/supertest": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-2.0.11.tgz", - "integrity": "sha512-uci4Esokrw9qGb9bvhhSVEjd6rkny/dk5PK/Qz4yxKiyppEI+dOPlNrZBahE3i+PoKFYyDxChVXZ/ysS/nrm1Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-6.0.2.tgz", + "integrity": "sha512-137ypx2lk/wTQbW6An6safu9hXmajAifU/s7szAHLN/FeIm5w7yR0Wkl9fdJMRSHwOn4HLAI0DaB2TOORuhPDg==", "dev": true, + "license": "MIT", "dependencies": { - "@types/superagent": "*" + "@types/methods": "^1.1.4", + "@types/superagent": "^8.1.0" } }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "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 + "dev": true, + "license": "ISC" }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -1254,32 +1128,12 @@ "node": ">= 0.6" } }, - "node_modules/accepts/node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/accepts/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1288,10 +1142,11 @@ } }, "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -1301,6 +1156,7 @@ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, + "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -1310,14 +1166,15 @@ } }, "node_modules/ajv": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.14.0.tgz", - "integrity": "sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.15.0.tgz", + "integrity": "sha512-15BTtQUOsSrmHCy+B4VnAiJAJxJ8IFgu6fcjFQF3jQYZ78nLSQthlFg4ehp+NLIyfvFgOlxNsjKIEhydtFPVHQ==", + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", + "fast-uri": "^2.3.0", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -1328,6 +1185,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "license": "MIT", "peerDependencies": { "ajv": "^8.5.0" }, @@ -1341,6 +1199,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "license": "MIT", "dependencies": { "ajv": "^8.0.0" }, @@ -1358,6 +1217,7 @@ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1367,6 +1227,7 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -1377,23 +1238,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1403,6 +1253,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" }, @@ -1411,10 +1262,11 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1426,13 +1278,15 @@ "node_modules/append-field": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", - "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==" + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "license": "MIT" }, "node_modules/append-transform": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, + "license": "MIT", "dependencies": { "default-require-extensions": "^3.0.0" }, @@ -1443,41 +1297,43 @@ "node_modules/archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", + "dev": true, + "license": "MIT" }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true, + "license": "MIT" }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "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, + "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } @@ -1485,8 +1341,9 @@ "node_modules/assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8" } @@ -1496,6 +1353,7 @@ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -1503,14 +1361,16 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, + "license": "ISC", "engines": { "node": ">= 4.0.0" } @@ -1518,23 +1378,26 @@ "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true + "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/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", @@ -1554,13 +1417,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/basic-auth": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "5.1.2" }, @@ -1568,22 +1433,34 @@ "node": ">= 0.8" } }, + "node_modules/basic-auth/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bl": { @@ -1591,6 +1468,7 @@ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, + "license": "MIT", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -1598,10 +1476,11 @@ } }, "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -1616,6 +1495,7 @@ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -1635,35 +1515,25 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/body-parser/node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "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/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1673,29 +1543,40 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/browserslist": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", - "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001254", - "colorette": "^1.3.0", - "electron-to-chromium": "^1.3.830", - "escalade": "^3.1.1", - "node-releases": "^1.1.75" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" } }, "node_modules/buffer": { @@ -1717,6 +1598,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -1725,7 +1607,8 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" }, "node_modules/busboy": { "version": "1.6.0", @@ -1743,6 +1626,7 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -1752,6 +1636,7 @@ "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1761,6 +1646,7 @@ "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, + "license": "MIT", "dependencies": { "hasha": "^5.0.0", "make-dir": "^3.0.0", @@ -1772,13 +1658,20 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1789,6 +1682,7 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=6" @@ -1799,14 +1693,15 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001466", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001466.tgz", - "integrity": "sha512-ewtFBSfWjEmxUgNBSZItFSmVtvk9zkwkl1OfRZlKA8slltRN+/C/tuGVrF9styXkN36Yu3+SeJ1qkXxDEyNZ5w==", + "version": "1.0.30001627", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001627.tgz", + "integrity": "sha512-4zgNiB8nTyV/tHhwZrFs88ryjls/lHiqFhrxCW4qSTeuRByBVnPYpDInchOIySWknznucaf31Z4KYqjfbrecVw==", "dev": true, "funding": [ { @@ -1816,28 +1711,35 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.0.8" }, "engines": { "node": ">=4" @@ -1848,6 +1750,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", @@ -1861,13 +1764,18 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { "node": "*" } @@ -1883,6 +1791,7 @@ "url": "https://paulmillr.com/funding/" } ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1904,6 +1813,7 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1913,6 +1823,7 @@ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, + "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" }, @@ -1921,10 +1832,11 @@ } }, "node_modules/cli-spinners": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", - "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -1937,6 +1849,7 @@ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", "dev": true, + "license": "ISC", "engines": { "node": ">= 10" } @@ -1946,6 +1859,7 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -1957,6 +1871,7 @@ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8" } @@ -1966,6 +1881,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" } @@ -1973,20 +1889,16 @@ "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", - "dev": true + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1995,10 +1907,11 @@ } }, "node_modules/commitizen": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.2.5.tgz", - "integrity": "sha512-9sXju8Qrz1B4Tw7kC5KhnvwYQN88qs2zbiB8oyMsnXZyJ24PPGiNM3nHr73d32dnE3i8VJEXddBFIbOgYSEXtQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz", + "integrity": "sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==", "dev": true, + "license": "MIT", "dependencies": { "cachedir": "2.3.0", "cz-conventional-changelog": "3.3.0", @@ -2008,10 +1921,10 @@ "find-root": "1.1.0", "fs-extra": "9.1.0", "glob": "7.2.3", - "inquirer": "8.2.4", + "inquirer": "8.2.5", "is-utf8": "^0.2.1", "lodash": "4.17.21", - "minimist": "1.2.6", + "minimist": "1.2.7", "strip-bom": "4.0.0", "strip-json-comments": "3.1.1" }, @@ -2024,43 +1937,29 @@ "node": ">= 12" } }, - "node_modules/commitizen/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "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/sponsors/isaacs" - } - }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" }, "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" }, "node_modules/concat-stream": { "version": "1.6.2", @@ -2069,6 +1968,7 @@ "engines": [ "node >= 0.8" ], + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -2081,6 +1981,7 @@ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" }, @@ -2088,30 +1989,11 @@ "node": ">= 0.6" } }, - "node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/content-type": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2120,22 +2002,22 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz", "integrity": "sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } + "license": "MIT" }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2145,6 +2027,7 @@ "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", "dev": true, + "license": "MIT", "dependencies": { "cookie": "0.4.1", "cookie-signature": "1.0.6" @@ -2153,64 +2036,71 @@ "node": ">= 0.8.0" } }, - "node_modules/cookie-parser/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==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true, + "license": "MIT" }, "node_modules/cookiejar": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" }, "node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" }, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/cosmiconfig-typescript-loader": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.2.0.tgz", - "integrity": "sha512-NkANeMnaHrlaSSlpKGyvn2R4rqUDeE/9E5YHx+b4nwo0R8dZyAqcih8/gxpCZvqWP9Vf6xuLpMSzSgdVEIM78g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz", + "integrity": "sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==", "dev": true, + "license": "MIT", "optional": true, + "dependencies": { + "jiti": "^1.19.1" + }, "engines": { - "node": ">=12", - "npm": ">=6" + "node": ">=v16" }, "peerDependencies": { "@types/node": "*", - "cosmiconfig": ">=7", - "ts-node": ">=10", - "typescript": ">=3" + "cosmiconfig": ">=8.2", + "typescript": ">=4" } }, "node_modules/coveralls": { @@ -2218,6 +2108,7 @@ "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "js-yaml": "^3.13.1", "lcov-parse": "^1.0.0", @@ -2232,17 +2123,43 @@ "node": ">=6" } }, + "node_modules/coveralls/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/coveralls/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2257,6 +2174,7 @@ "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", "integrity": "sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^2.4.1", "commitizen": "^4.0.3", @@ -2275,8 +2193,9 @@ "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -2289,6 +2208,7 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -2296,8 +2216,9 @@ "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2306,30 +2227,36 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, "engines": { - "node": ">=0.12" + "node": ">=6" } }, "node_modules/default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", + "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", "dev": true, + "license": "MIT", "dependencies": { "strip-bom": "^4.0.0" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/defaults": { @@ -2337,6 +2264,7 @@ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "dev": true, + "license": "MIT", "dependencies": { "clone": "^1.0.2" }, @@ -2344,11 +2272,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "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": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -2358,6 +2305,7 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2367,6 +2315,7 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -2377,6 +2326,7 @@ "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2386,6 +2336,7 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2395,6 +2346,7 @@ "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", "dev": true, + "license": "ISC", "dependencies": { "asap": "^2.0.0", "wrappy": "1" @@ -2405,6 +2357,7 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -2413,13 +2366,15 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, + "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -2428,51 +2383,92 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.3.836", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.836.tgz", - "integrity": "sha512-Ney3pHOJBWkG/AqYjrW0hr2AUCsao+2uvq9HUlRP8OlpSdk/zOHOUJP7eu0icDvePC9DlgffuelP4TnOJmMRUg==", - "dev": true + "version": "1.4.788", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.788.tgz", + "integrity": "sha512-ubp5+Ev/VV8KuRoWnfP2QF2Bg+O2ZFdb49DiiNbz2VmgkIqrnyYaqIOqj8A6K/3p1xV0QcU5hBQ1+BmB6ot1OA==", + "dev": true, + "license": "ISC" }, "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==", - "dev": true + "dev": true, + "license": "MIT" }, "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==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2481,13 +2477,15 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -2497,6 +2495,7 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -2510,6 +2509,7 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2519,6 +2519,7 @@ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, + "license": "MIT", "dependencies": { "homedir-polyfill": "^1.0.1" }, @@ -2531,6 +2532,7 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dev": true, + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -2568,55 +2570,36 @@ "node": ">= 0.10.0" } }, - "node_modules/express/node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "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==", "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, + "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">= 0.6" } }, "node_modules/express/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": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "license": "MIT" }, "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 + "dev": true, + "license": "MIT" }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, + "license": "MIT", "dependencies": { "chardet": "^0.7.0", "iconv-lite": "^0.4.24", @@ -2629,34 +2612,45 @@ "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, "engines": [ "node >=0.6.0" - ] + ], + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "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==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.3.0.tgz", + "integrity": "sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw==", + "license": "MIT" }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -2668,10 +2662,11 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2684,6 +2679,7 @@ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, + "license": "MIT", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -2697,23 +2693,12 @@ "node": ">= 0.8" } }, - "node_modules/finalhandler/node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, + "license": "MIT", "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -2731,6 +2716,7 @@ "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz", "integrity": "sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==", "dev": true, + "license": "MIT", "dependencies": { "findup-sync": "^4.0.0", "merge": "^2.1.1" @@ -2740,13 +2726,15 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -2763,6 +2751,7 @@ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", "dev": true, + "license": "MIT", "dependencies": { "detect-file": "^1.0.0", "is-glob": "^4.0.0", @@ -2778,6 +2767,7 @@ "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, + "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } @@ -2787,6 +2777,7 @@ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, + "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^3.0.2" @@ -2798,8 +2789,9 @@ "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "*" } @@ -2809,6 +2801,7 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -2819,10 +2812,11 @@ } }, "node_modules/formidable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.1.tgz", - "integrity": "sha512-0EcS9wCFEzLvfiks7omJ+SiYJAiD+TzK4Pcw1UlUoGnhUxDcMKjt0P7x8wEb0u6OHu8Nb98WG3nxtlF5C7bvUQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", + "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", "dev": true, + "license": "MIT", "dependencies": { "dezalgo": "^1.0.4", "hexoid": "^1.0.0", @@ -2838,6 +2832,7 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2847,6 +2842,7 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2869,13 +2865,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, + "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -2889,14 +2887,31 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2906,6 +2921,7 @@ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -2915,6 +2931,7 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -2924,19 +2941,26 @@ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2947,6 +2971,7 @@ "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.0.0" } @@ -2954,27 +2979,33 @@ "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } }, "node_modules/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "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.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, "engines": { "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { @@ -2982,6 +3013,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -2989,17 +3021,21 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", + "node_modules/global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { - "ini": "^1.3.4" + "ini": "4.1.1" }, "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/global-modules": { @@ -3007,6 +3043,7 @@ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, + "license": "MIT", "dependencies": { "global-prefix": "^1.0.1", "is-windows": "^1.0.1", @@ -3021,6 +3058,7 @@ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", "dev": true, + "license": "MIT", "dependencies": { "expand-tilde": "^2.0.2", "homedir-polyfill": "^1.0.1", @@ -3032,11 +3070,19 @@ "node": ">=0.10.0" } }, + "node_modules/global-prefix/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, "node_modules/global-prefix/node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3049,21 +3095,37 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", - "dev": true + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" }, "node_modules/growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4.x" } @@ -3071,8 +3133,9 @@ "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", "dev": true, + "license": "ISC", "engines": { "node": ">=4" } @@ -3083,6 +3146,7 @@ "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "deprecated": "this library is no longer supported", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.3", "har-schema": "^2.0.0" @@ -3096,6 +3160,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3111,34 +3176,51 @@ "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": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } + "license": "MIT" }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3151,6 +3233,7 @@ "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, + "license": "MIT", "dependencies": { "is-stream": "^2.0.0", "type-fest": "^0.8.0" @@ -3162,11 +3245,35 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, + "license": "MIT", "bin": { "he": "bin/he" } @@ -3176,6 +3283,7 @@ "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", "integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3185,6 +3293,7 @@ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, + "license": "MIT", "dependencies": { "parse-passwd": "^1.0.0" }, @@ -3196,13 +3305,15 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, + "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -3217,8 +3328,9 @@ "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -3234,6 +3346,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -3259,19 +3372,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "parent-module": "^1.0.0", @@ -3289,16 +3405,30 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=4" } }, + "node_modules/import-meta-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", + "dev": true, + "license": "MIT", + "optional": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -3308,6 +3438,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3315,8 +3446,10 @@ "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3325,19 +3458,26 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "dev": true, + "license": "ISC", + "optional": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/inquirer": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", - "integrity": "sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg==", + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-escapes": "^4.2.1", "chalk": "^4.1.1", @@ -3364,6 +3504,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -3379,6 +3520,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3395,6 +3537,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -3406,13 +3549,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/inquirer/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3422,6 +3567,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -3434,6 +3580,7 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -3443,6 +3590,7 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/is-binary-path": { @@ -3450,6 +3598,7 @@ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -3460,8 +3609,9 @@ "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3471,15 +3621,17 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -3492,6 +3644,7 @@ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3501,6 +3654,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -3510,6 +3664,7 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3519,6 +3674,7 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -3529,14 +3685,16 @@ "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true, + "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3548,13 +3706,15 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3562,25 +3722,29 @@ "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true, + "license": "MIT" }, "node_modules/istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -3590,6 +3754,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "append-transform": "^2.0.0" }, @@ -3602,6 +3767,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.7.5", "@istanbuljs/schema": "^0.1.2", @@ -3617,23 +3783,24 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", + "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", "dev": true, + "license": "ISC", "dependencies": { "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", "p-map": "^3.0.0", "rimraf": "^3.0.0", - "uuid": "^3.3.3" + "uuid": "^8.3.2" }, "engines": { "node": ">=8" @@ -3643,7 +3810,9 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -3655,17 +3824,18 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-report/node_modules/has-flag": { @@ -3673,15 +3843,33 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -3690,24 +3878,26 @@ } }, "node_modules/istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -3724,22 +3914,15 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, "node_modules/istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -3749,10 +3932,11 @@ } }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.2.3.tgz", + "integrity": "sha512-htOzIMPbpLid/Gq9/zaz9SfExABxqRe1sSCdxntlO/aMD6u0issZQiY25n2GKQUtJ02j7z5sfptlAOMpWWOmvw==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -3766,20 +3950,31 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "license": "MIT", + "optional": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -3788,14 +3983,16 @@ "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true, + "license": "MIT" }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, @@ -3808,30 +4005,35 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true, + "license": "MIT", "optional": 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 + "dev": true, + "license": "(AFL-2.1 OR BSD-3-Clause)" }, "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==" + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" }, "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": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC" }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, + "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -3844,6 +4046,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, + "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -3856,6 +4059,7 @@ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -3869,8 +4073,9 @@ "node_modules/lcov-parse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", - "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=", + "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", "dev": true, + "license": "BSD-3-Clause", "bin": { "lcov-parse": "bin/cli.js" } @@ -3880,6 +4085,7 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/locate-path": { @@ -3887,6 +4093,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -3901,35 +4108,73 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "license": "MIT" }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true + "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", + "dev": true, + "license": "MIT" }, "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true, + "license": "MIT", + "optional": true }, "node_modules/lodash.map": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", "integrity": "sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", + "dev": true, + "license": "MIT", + "optional": 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==", "dev": true, + "license": "ISC", "engines": { "node": ">=0.8.6" } @@ -3939,6 +4184,7 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -3955,6 +4201,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -3970,6 +4217,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3986,6 +4234,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -3997,13 +4246,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/log-symbols/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4013,6 +4264,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4025,29 +4277,29 @@ "resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz", "integrity": "sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, + "license": "MIT", "dependencies": { - "get-func-name": "^2.0.0" + "get-func-name": "^2.0.1" } }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, + "license": "ISC", "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "yallist": "^3.0.2" } }, "node_modules/make-dir": { @@ -4055,6 +4307,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^6.0.0" }, @@ -4070,6 +4323,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -4078,12 +4332,14 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/media-typer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -4092,53 +4348,46 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz", "integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "dev": true, + "license": "MIT" }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -4147,19 +4396,21 @@ } }, "node_modules/mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { - "mime-db": "1.49.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" @@ -4170,6 +4421,7 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4179,6 +4431,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" }, @@ -4187,15 +4440,20 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -4204,6 +4462,7 @@ "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" }, @@ -4216,6 +4475,7 @@ "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", "dev": true, + "license": "MIT", "dependencies": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", @@ -4254,17 +4514,12 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/mocha/node_modules/debug": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -4281,13 +4536,15 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -4299,7 +4556,9 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4320,6 +4579,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" }, @@ -4332,27 +4592,17 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4364,13 +4614,15 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4386,6 +4638,7 @@ "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", "dev": true, + "license": "MIT", "dependencies": { "basic-auth": "~2.0.1", "debug": "2.6.9", @@ -4397,16 +4650,31 @@ "node": ">= 0.8.0" } }, + "node_modules/morgan/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" }, "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", @@ -4424,13 +4692,15 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/nanoid": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true, + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -4443,6 +4713,7 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4452,6 +4723,7 @@ "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", "dev": true, + "license": "MIT", "dependencies": { "process-on-spawn": "^1.0.0" }, @@ -4460,19 +4732,21 @@ } }, "node_modules/node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", - "dev": true + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true, + "license": "MIT" }, "node_modules/nodemon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", - "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.3.tgz", + "integrity": "sha512-m4Vqs+APdKzDFpuaL9F9EVOF85+h070FnkHVEoU4+rmT6Vw0bmNl7s61VEkY/cJkL7RCv1p4urnUDUMrS5rk2w==", "dev": true, + "license": "MIT", "dependencies": { "chokidar": "^3.5.2", - "debug": "^3.2.7", + "debug": "^4", "ignore-by-default": "^1.0.1", "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", @@ -4494,40 +4768,36 @@ } }, "node_modules/nodemon/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/nodemon/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } + "license": "MIT" }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4537,6 +4807,7 @@ "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", @@ -4578,6 +4849,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -4593,6 +4865,7 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -4604,6 +4877,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -4615,13 +4889,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/nyc/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -4630,31 +4906,12 @@ "node": ">=8" } }, - "node_modules/nyc/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/nyc/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, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -4667,6 +4924,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -4682,6 +4940,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -4693,7 +4952,9 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -4709,6 +4970,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -4722,13 +4984,15 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/nyc/node_modules/yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^6.0.0", "decamelize": "^1.2.0", @@ -4751,6 +5015,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, + "license": "ISC", "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -4764,6 +5029,7 @@ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "*" } @@ -4771,25 +5037,28 @@ "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -4802,6 +5071,7 @@ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -4809,8 +5079,9 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } @@ -4820,6 +5091,7 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -4834,6 +5106,7 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/ono/-/ono-7.1.3.tgz", "integrity": "sha512-9jnfVriq7uJM4o5ganUY54ntUm+5EK21EGaQ5NWnkWg3zz5ywbbonlBguRcnmF1/HDiIe3zxNxXcO1YPBmPcQQ==", + "license": "MIT", "dependencies": { "@jsdevtools/ono": "7.1.3" } @@ -4843,6 +5116,7 @@ "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "dev": true, + "license": "MIT", "dependencies": { "bl": "^4.1.0", "chalk": "^4.1.0", @@ -4866,6 +5140,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -4881,6 +5156,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -4897,6 +5173,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -4908,13 +5185,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ora/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4924,6 +5203,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4936,6 +5216,7 @@ "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" } @@ -4945,6 +5226,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -4960,6 +5242,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -4975,6 +5258,7 @@ "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, + "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -4987,6 +5271,7 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4996,6 +5281,7 @@ "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, + "license": "ISC", "dependencies": { "graceful-fs": "^4.1.15", "hasha": "^5.0.0", @@ -5011,6 +5297,7 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "callsites": "^3.0.0" @@ -5024,6 +5311,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "@babel/code-frame": "^7.0.0", @@ -5043,6 +5331,7 @@ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5052,6 +5341,7 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -5061,6 +5351,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5068,8 +5359,9 @@ "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5079,34 +5371,34 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.2.tgz", - "integrity": "sha512-Yj9mA8fPiVgOUpByoTZO5pNrcl5Yk37FcSHsUINpAsaBIEZIuqcCclDZJCVxqQShDsmYX8QG63svJiTbOATZwg==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, - "dependencies": { - "semver": "^7.3.5" - }, + "license": "ISC", "engines": { "node": "14 || >=16.14" } @@ -5114,23 +5406,15 @@ "node_modules/path-to-regexp": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", - "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "optional": true, - "engines": { - "node": ">=8" - } + "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", + "license": "MIT" }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -5138,14 +5422,23 @@ "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -5158,6 +5451,7 @@ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -5170,6 +5464,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -5183,6 +5478,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -5195,6 +5491,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -5210,6 +5507,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -5218,27 +5516,33 @@ } }, "node_modules/prettier": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", - "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, "engines": { "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" }, "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, + "license": "MIT", "dependencies": { "fromentries": "^1.2.0" }, @@ -5251,6 +5555,7 @@ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dev": true, + "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -5260,21 +5565,25 @@ } }, "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true, + "license": "MIT" }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5284,6 +5593,7 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.4" }, @@ -5299,6 +5609,7 @@ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -5308,6 +5619,7 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5317,6 +5629,7 @@ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -5328,9 +5641,10 @@ } }, "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -5341,11 +5655,18 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -5356,8 +5677,9 @@ "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", "dev": true, + "license": "ISC", "dependencies": { "es6-error": "^4.0.1" }, @@ -5371,6 +5693,7 @@ "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", "dev": true, + "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -5402,15 +5725,28 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.6" } }, + "node_modules/request/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, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5419,6 +5755,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5427,13 +5764,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", "dev": true, + "license": "MIT", "dependencies": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" @@ -5447,19 +5786,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-global": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz", - "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==", - "dev": true, - "optional": true, - "dependencies": { - "global-dirs": "^0.1.1" - }, + "license": "MIT", "engines": { "node": ">=8" } @@ -5469,6 +5796,7 @@ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, + "license": "MIT", "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -5478,10 +5806,11 @@ } }, "node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.7.tgz", + "integrity": "sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^10.3.7" }, @@ -5489,7 +5818,7 @@ "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -5500,6 +5829,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -5509,6 +5839,7 @@ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dev": true, + "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -5521,32 +5852,34 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -5562,6 +5895,7 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -5574,38 +5908,55 @@ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -5618,6 +5969,7 @@ "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dev": true, + "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -5641,25 +5993,15 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/send/node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } + "license": "MIT" }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -5669,6 +6011,7 @@ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dev": true, + "license": "MIT", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -5682,20 +6025,41 @@ "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true, + "license": "ISC" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -5708,35 +6072,43 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -5745,10 +6117,11 @@ } }, "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -5758,25 +6131,18 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^2.0.0", "is-windows": "^1.0.2", @@ -5793,7 +6159,9 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -5807,14 +6175,16 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, + "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -5840,6 +6210,7 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -5856,15 +6227,23 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5880,6 +6259,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5894,6 +6274,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -5907,6 +6288,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -5919,6 +6301,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5928,6 +6311,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -5936,32 +6320,34 @@ } }, "node_modules/superagent": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-7.1.5.tgz", - "integrity": "sha512-HQYyGuDRFGmZ6GNC4hq2f37KnsY9Lr0/R1marNZTgMweVDQLTLJJ6DGQ9Tj/xVVs5HEnop9EMmTbywb5P30aqw==", + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.1.2.tgz", + "integrity": "sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==", + "deprecated": "Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net", "dev": true, + "license": "MIT", "dependencies": { "component-emitter": "^1.3.0", - "cookiejar": "^2.1.3", + "cookiejar": "^2.1.4", "debug": "^4.3.4", "fast-safe-stringify": "^2.1.1", "form-data": "^4.0.0", - "formidable": "^2.0.1", + "formidable": "^2.1.2", "methods": "^1.1.2", - "mime": "^2.5.0", - "qs": "^6.10.3", - "readable-stream": "^3.6.0", - "semver": "^7.3.7" + "mime": "2.6.0", + "qs": "^6.11.0", + "semver": "^7.3.8" }, "engines": { "node": ">=6.4.0 <13 || >=14" } }, "node_modules/superagent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -5979,6 +6365,7 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -5993,6 +6380,7 @@ "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", "dev": true, + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -6004,33 +6392,21 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/superagent/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } + "license": "MIT" }, "node_modules/supertest": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.2.2.tgz", - "integrity": "sha512-wCw9WhAtKJsBvh07RaS+/By91NNE0Wh0DN19/hWPlBOU8tAfOtbZoVSV4xXeoKoxgPx0rx2y+y+8660XtE7jzg==", + "version": "6.3.4", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.4.tgz", + "integrity": "sha512-erY3HFDG0dPnhw4U+udPfrzXa4xhSG+n4rxfRuZWCUvjFWwKl+OxWf/7zk50s84/fAAs7vf5QAb9uRa0cCykxw==", "dev": true, + "license": "MIT", "dependencies": { "methods": "^1.1.2", - "superagent": "^7.1.0" + "superagent": "^8.1.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=6.4.0" } }, "node_modules/supports-color": { @@ -6038,6 +6414,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" }, @@ -6050,6 +6427,7 @@ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -6063,13 +6441,15 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, + "license": "MIT", "dependencies": { "os-tmpdir": "~1.0.2" }, @@ -6080,8 +6460,9 @@ "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -6091,6 +6472,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -6103,18 +6485,17 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.6" } }, "node_modules/touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", "dev": true, - "dependencies": { - "nopt": "~1.0.10" - }, + "license": "ISC", "bin": { "nodetouch": "bin/nodetouch.js" } @@ -6124,6 +6505,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -6133,12 +6515,13 @@ } }, "node_modules/ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, + "license": "MIT", "dependencies": { - "@cspotcode/source-map-support": "0.7.0", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -6149,7 +6532,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { @@ -6180,21 +6563,24 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true, + "license": "0BSD" }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -6205,31 +6591,38 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true, + "license": "Unlicense" }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -6241,7 +6634,8 @@ "node_modules/type-is/node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6249,22 +6643,25 @@ "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, + "license": "MIT", "dependencies": { "is-typedarray": "^1.0.0" } }, "node_modules/typescript": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", - "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6277,13 +6674,21 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT" }, "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10.0.0" } @@ -6293,14 +6698,48 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -6308,38 +6747,42 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "dev": true, + "license": "MIT", "engines": { "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.", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, + "license": "MIT", "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" } }, "node_modules/v8-compile-cache-lib": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", - "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==", - "dev": true + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -6347,11 +6790,12 @@ "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -6361,14 +6805,16 @@ "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": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true, + "license": "MIT" }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, + "license": "MIT", "dependencies": { "defaults": "^1.0.3" } @@ -6378,6 +6824,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -6389,16 +6836,18 @@ } }, "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true, + "license": "ISC" }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6407,13 +6856,15 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -6432,6 +6883,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -6449,6 +6901,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6464,6 +6917,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6475,13 +6929,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6497,6 +6953,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6508,19 +6965,22 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" }, "node_modules/write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", @@ -6532,6 +6992,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", "engines": { "node": ">=0.4" } @@ -6541,31 +7002,24 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true, - "optional": true, - "engines": { - "node": ">= 6" - } + "license": "ISC" }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -6584,6 +7038,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -6593,6 +7048,7 @@ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, + "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -6608,6 +7064,7 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -6620,6 +7077,7 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -6632,6 +7090,7 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -6641,6 +7100,7 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index b2fb8790..efa1e934 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,9 @@ "author": "Carmine DiMascio ", "license": "MIT", "dependencies": { - "@apidevtools/json-schema-ref-parser": "^11.6.2", + "@apidevtools/json-schema-ref-parser": "^11.6.4", "@types/multer": "^1.4.11", - "ajv": "^8.14.0", + "ajv": "^8.15.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", "content-type": "^1.0.5", @@ -48,28 +48,30 @@ "path-to-regexp": "^6.2.2" }, "devDependencies": { - "@types/cookie-parser": "^1.4.2", - "@types/express": "4.17.13", - "@types/mocha": "^9.1.0", - "@types/morgan": "^1.9.3", - "@types/node": "^17.0.21", - "@types/supertest": "^2.0.11", - "body-parser": "^1.19.2", - "chai": "^4.3.6", - "commitizen": "^4.2.5", + "@types/cookie-parser": "^1.4.7", + "@types/express": "4.17.21", + "@types/js-yaml": "^4.0.9", + "@types/mocha": "^9.1.1", + "@types/morgan": "^1.9.9", + "@types/node": "^18.19.34", + "@types/supertest": "^6.0.2", + "body-parser": "^1.20.2", + "chai": "^4.4.1", + "commitizen": "^4.3.0", "cookie-parser": "^1.4.6", "coveralls": "^3.1.1", "express": "^4.19.2", + "js-yaml": "^4.1.0", "mocha": "^9.2.2", "morgan": "^1.10.0", - "nodemon": "^3.0.1", + "nodemon": "^3.1.3", "nyc": "^15.1.0", - "prettier": "^2.5.1", - "rimraf": "^5.0.5", + "prettier": "^2.8.8", + "rimraf": "^5.0.7", "source-map-support": "0.5.21", - "supertest": "^6.2.2", - "ts-node": "^10.7.0", - "typescript": "^4.6.2" + "supertest": "^6.3.4", + "ts-node": "^10.9.2", + "typescript": "^4.9.5" }, "peerDependencies": { "express": "*" diff --git a/test/response.validator.spec.ts b/test/response.validator.spec.ts index 09b06c78..c3b26c17 100644 --- a/test/response.validator.spec.ts +++ b/test/response.validator.spec.ts @@ -8,7 +8,7 @@ import * as packageJson from '../package.json'; import { OpenAPIV3, OpenApiRequest } from '../src/framework/types'; const apiSpecPath = path.join('test', 'resources', 'response.validation.yaml'); -const apiSpec = jsyaml.safeLoad(fs.readFileSync(apiSpecPath, 'utf8')); +const apiSpec = jsyaml.load(fs.readFileSync(apiSpecPath, 'utf8')) as OpenAPIV3.Document; const fakeReq: OpenApiRequest = { method: 'GET', headers: { 'content-type': 'application/json' }, From 494f73203235efde890e46ed926a3c0fdd433725 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sat, 1 Jun 2024 07:26:45 -0700 Subject: [PATCH 2/7] Update mocha to v10 - Ref: https://github.com/mochajs/mocha/releases/tag/v10.0.0 - Breaking changes do not affect this project --- package-lock.json | 122 +++++++++++++++------------------------------- package.json | 4 +- 2 files changed, 42 insertions(+), 84 deletions(-) diff --git a/package-lock.json b/package-lock.json index a87ece20..74bc1ef6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@types/cookie-parser": "^1.4.7", "@types/express": "4.17.21", "@types/js-yaml": "^4.0.9", - "@types/mocha": "^9.1.1", + "@types/mocha": "^10.0.6", "@types/morgan": "^1.9.9", "@types/node": "^18.19.34", "@types/supertest": "^6.0.2", @@ -38,7 +38,7 @@ "coveralls": "^3.1.1", "express": "^4.19.2", "js-yaml": "^4.1.0", - "mocha": "^9.2.2", + "mocha": "^10.4.0", "morgan": "^1.10.0", "nodemon": "^3.1.3", "nyc": "^15.1.0", @@ -1017,9 +1017,9 @@ "license": "MIT" }, "node_modules/@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", "dev": true, "license": "MIT" }, @@ -1107,13 +1107,6 @@ "@types/superagent": "^8.1.0" } }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true, - "license": "ISC" - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -3120,16 +3113,6 @@ "dev": true, "license": "ISC" }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.x" - } - }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -4471,53 +4454,55 @@ } }, "node_modules/mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, "license": "MIT", "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", - "debug": "4.3.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "4.2.1", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.1", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" } }, "node_modules/mocha/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4553,9 +4538,9 @@ } }, "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "license": "ISC", @@ -4563,30 +4548,16 @@ "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/glob/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": "*" - } - }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4598,13 +4569,13 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { "node": ">=10" @@ -4695,19 +4666,6 @@ "dev": true, "license": "ISC" }, - "node_modules/nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -6853,9 +6811,9 @@ } }, "node_modules/workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true, "license": "Apache-2.0" }, diff --git a/package.json b/package.json index efa1e934..66cd75a0 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@types/cookie-parser": "^1.4.7", "@types/express": "4.17.21", "@types/js-yaml": "^4.0.9", - "@types/mocha": "^9.1.1", + "@types/mocha": "^10.0.6", "@types/morgan": "^1.9.9", "@types/node": "^18.19.34", "@types/supertest": "^6.0.2", @@ -62,7 +62,7 @@ "coveralls": "^3.1.1", "express": "^4.19.2", "js-yaml": "^4.1.0", - "mocha": "^9.2.2", + "mocha": "^10.4.0", "morgan": "^1.10.0", "nodemon": "^3.1.3", "nyc": "^15.1.0", From 86acb90c1c692ce52b2f6c5cd0a93d2dc2c0ffb8 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sat, 1 Jun 2024 07:51:10 -0700 Subject: [PATCH 3/7] Update typescript to v5 --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 74bc1ef6..54c7ecac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "source-map-support": "0.5.21", "supertest": "^6.3.4", "ts-node": "^10.9.2", - "typescript": "^4.9.5" + "typescript": "^5.4.5" }, "peerDependencies": { "express": "*" @@ -6615,9 +6615,9 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -6625,7 +6625,7 @@ "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/undefsafe": { diff --git a/package.json b/package.json index 66cd75a0..0187e825 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "source-map-support": "0.5.21", "supertest": "^6.3.4", "ts-node": "^10.9.2", - "typescript": "^4.9.5" + "typescript": "^5.4.5" }, "peerDependencies": { "express": "*" From 65c29d6d88ca6667cabb9664d03cf06ea7c5a0ef Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sat, 1 Jun 2024 08:02:05 -0700 Subject: [PATCH 4/7] Update prettier to v3 and format all - Add npm script "format" to format codebase - Add vscode workspace settings to suggest Prettier extension and to format on save using prettier by default - Apply formatting to all applicable files --- .all-contributorsrc | 247 +--- .github/ISSUE_TEMPLATE/bug_report.md | 3 +- .github/ISSUE_TEMPLATE/feature_request.md | 1 - .github/dependabot.yml | 7 +- .github/workflows/default.yml | 2 +- .gitignore | 4 +- .nycrc | 38 +- .prettierignore | 0 .travis.yml | 28 +- .vscode/extensions.json | 3 + .vscode/settings.json | 4 + CHANGE_HISTORY.md | 297 ++--- CODE_OF_CONDUCT.md | 26 +- CONTRIBUTING.md | 13 +- README.md | 3 +- _config.yml | 2 +- examples/1-standard/services/index.js | 6 +- examples/3-eov-operations/routes/pets.js | 2 +- examples/3-eov-operations/services/index.js | 8 +- examples/4-eov-operations-babel/.babelrc | 18 +- examples/4-eov-operations-babel/src/api.yaml | 4 +- .../4-eov-operations-babel/src/routes/pets.js | 2 +- .../src/services/index.js | 8 +- .../5-custom-operation-resolver/README.md | 10 +- examples/5-custom-operation-resolver/api.yaml | 2 +- .../routes/pets.js | 2 +- .../services/index.js | 8 +- examples/6-multi-file-spec/ems.yaml | 2 +- .../6-multi-file-spec/schemas/queries.yaml | 2 +- .../schemas/queryrequest.yaml | 2 +- .../schemas/queryrequests.yaml | 2 +- .../7-response-date-serialization/api.yaml | 7 +- launch.json | 1 - package-lock.json | 12 +- package.json | 3 +- src/framework/ajv/index.ts | 26 +- src/framework/base.path.ts | 12 +- src/framework/base.serdes.ts | 17 +- src/framework/json.ref.schema.ts | 1 - src/framework/modded.express.mung.ts | 18 +- src/framework/openapi.context.ts | 4 +- src/framework/openapi.spec.loader.ts | 7 +- src/framework/types.ts | 51 +- src/middlewares/openapi.multipart.ts | 6 +- src/middlewares/openapi.response.validator.ts | 4 +- src/middlewares/parsers/body.parse.ts | 21 +- .../parsers/req.parameter.mutator.ts | 4 +- .../parsers/schema.preprocessor.ts | 45 +- src/middlewares/util.ts | 29 +- src/openapi.validator.ts | 28 +- src/resolvers.ts | 5 +- test/356.campaign.spec.ts | 2 +- test/356.campaign.yaml | 6 +- test/440.spec.ts | 23 +- test/577.spec.ts | 17 +- test/699.spec.ts | 126 +- test/821.spec.ts | 31 +- test/ajv.options.spec.ts | 4 +- .../ajv.resolves.more.than.one.schema.spec.ts | 46 +- test/common/app.common.ts | 103 +- test/common/app.ts | 2 +- test/common/test.yaml | 2 +- test/component.params.spec.ts | 4 +- test/content.type.spec.ts | 5 +- test/datetime.validation.spec.ts | 31 +- test/default-export.spec.ts | 4 +- test/default.export.fn.spec.ts | 6 +- test/empty.servers.spec.ts | 8 +- test/escaped.characters.in.ref.path.spec.ts | 57 +- test/headers.2.spec.ts | 4 +- test/headers.spec.ts | 12 +- test/httperror.spec.ts | 4 +- test/ignore.paths.spec.ts | 16 +- test/multipart.disabled.spec.ts | 16 +- test/multipart.spec.ts | 9 +- test/nested.routes.spec.ts | 27 +- test/one.of.spec.ts | 14 +- test/oneof.readonly.yaml | 90 +- test/openapi.spec.ts | 64 +- test/operation.handler.spec.ts | 1 - test/optional-request-body.spec.ts | 4 +- test/path.level.parameters.spec.ts | 14 +- test/paths.sort.spec.ts | 6 +- test/query.params.allow.unknown.spec.ts | 4 +- test/query.params.spec.ts | 16 +- test/query.serialization.ts | 8 +- test/read.only.removeadditional.spec.ts | 153 +-- test/read.only.spec.ts | 10 +- test/request.bodies.ref.spec.ts | 4 +- test/resources/699.yaml | 35 +- test/resources/821.yaml | 2 +- .../additional.props.query.params.yaml | 2 - test/resources/all.of.yaml | 8 +- test/resources/circular.yaml | 6 +- test/resources/coercion.yaml | 20 +- test/resources/controller-with-default.ts | 2 +- test/resources/empty.servers.yaml | 1 - test/resources/eov-operations.modulepath.yaml | 2 +- test/resources/eov-operations.yaml | 4 +- .../resources/escaped.characters.in.path.yaml | 12 +- test/resources/formats.yaml | 5 +- test/resources/headers.yaml | 4 +- test/resources/ignore.paths.yaml | 10 +- test/resources/multipart.yaml | 10 +- test/resources/nested.routes.yaml | 2 +- test/resources/one.of.2.yaml | 8 +- test/resources/one.of.yaml | 39 +- test/resources/openapi.json | 1087 ++++++++--------- test/resources/path.order.yaml | 12 +- test/resources/path.params.yaml | 24 +- test/resources/query.params.yaml | 4 +- test/resources/query.serialization.yaml | 11 +- test/resources/read.only.yaml | 6 +- .../resources/response.object.serializer.yaml | 10 +- .../response.validation.defaults.yaml | 70 +- test/resources/response.validation.yaml | 2 +- test/resources/routes/pets.js | 4 +- test/resources/security.top.level.yaml | 2 +- test/resources/security.yaml | 42 +- test/resources/serdes.yaml | 32 +- .../serialized-deep-object.objects.yaml | 18 +- .../serialized.objects.defaults.yaml | 8 +- test/resources/serialized.objects.yaml | 40 +- test/resources/servers.1.yaml | 2 +- test/resources/servers.2.yaml | 2 +- test/resources/services/index.js | 8 +- test/resources/sub_files/paths/auth.yaml | 34 +- test/resources/unknown.formats.yaml | 7 +- test/resources/unknown.keywords.yaml | 4 +- test/resources/wildcard.path.params.yaml | 4 +- test/resources/write.only.yaml | 8 +- test/resources/xt.newpet.yaml | 2 +- test/resources/xt.openapi.parameters.yaml | 2 +- test/response.object.serializer.spec.ts | 14 +- test/response.validation.coerce.types.spec.ts | 4 +- test/response.validation.on.error.spec.ts | 18 +- test/response.validator.spec.ts | 28 +- test/security.defaults.spec.ts | 2 +- test/security.disabled.spec.ts | 12 +- test/security.top.level.spec.ts | 20 +- test/serdes.spec.ts | 225 ++-- test/servers.spec.ts | 87 +- 142 files changed, 1965 insertions(+), 2072 deletions(-) create mode 100644 .prettierignore create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.all-contributorsrc b/.all-contributorsrc index 9c021ea3..50a1e4b1 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,7 +1,5 @@ { - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": false, "contributors": [ @@ -10,503 +8,364 @@ "name": "Carmine DiMascio", "avatar_url": "https://avatars1.githubusercontent.com/u/4706618?v=4", "profile": "http://www.twitter.com/carminedimascio", - "contributions": [ - "code", - "test", - "infra" - ] + "contributions": ["code", "test", "infra"] }, { "login": "sheldhur", "name": "Sheldhur Mornor", "avatar_url": "https://avatars2.githubusercontent.com/u/4166193?v=4", "profile": "http://litr.cc/", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "trebler", "name": "Andrey Trebler", "avatar_url": "https://avatars2.githubusercontent.com/u/5610569?v=4", "profile": "https://github.com/trebler", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "richdouglasevans", "name": "richdouglasevans", "avatar_url": "https://avatars1.githubusercontent.com/u/1855109?v=4", "profile": "https://github.com/richdouglasevans", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "medolino", "name": "Miran Setinc", "avatar_url": "https://avatars2.githubusercontent.com/u/3725402?v=4", "profile": "https://github.com/medolino", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "frankcalise", "name": "Frank Calise", "avatar_url": "https://avatars0.githubusercontent.com/u/374022?v=4", "profile": "http://frankcalise.com", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "gonenduk", "name": "Gonen Dukas", "avatar_url": "https://avatars1.githubusercontent.com/u/1597854?v=4", "profile": "https://il.linkedin.com/in/gonendukas", - "contributions": [ - "ideas", - "test" - ] + "contributions": ["ideas", "test"] }, { "login": "comino", "name": "Sven Eliasson", "avatar_url": "https://avatars0.githubusercontent.com/u/4029642?v=4", "profile": "https://rysta.io", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "SpencerLawrenceBrown", "name": "Spencer Brown", "avatar_url": "https://avatars3.githubusercontent.com/u/7729907?v=4", "profile": "https://github.com/SpencerLawrenceBrown", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "rafalneves", "name": "José Neves", "avatar_url": "https://avatars2.githubusercontent.com/u/4136503?v=4", "profile": "http://www.mixingpixels.com", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "mk811", "name": "mk811", "avatar_url": "https://avatars1.githubusercontent.com/u/32785388?v=4", "profile": "https://github.com/mk811", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "HugoMario", "name": "HugoMario", "avatar_url": "https://avatars1.githubusercontent.com/u/3266608?v=4", "profile": "https://github.com/HugoMario", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "rowanc1", "name": "Rowan Cockett", "avatar_url": "https://avatars3.githubusercontent.com/u/913249?v=4", "profile": "http://row1.ca", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "jy95", "name": "Jacques Yakoub", "avatar_url": "https://avatars0.githubusercontent.com/u/9306961?v=4", "profile": "https://github.com/jy95", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "ckeboss", "name": "ckeboss", "avatar_url": "https://avatars1.githubusercontent.com/u/723809?v=4", "profile": "https://github.com/ckeboss", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "JacobLey", "name": "JacobLey", "avatar_url": "https://avatars0.githubusercontent.com/u/37151850?v=4", "profile": "https://github.com/JacobLey", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "vdmitriy", "name": "Dmitriy Voeykov", "avatar_url": "https://avatars0.githubusercontent.com/u/2050542?v=4", "profile": "https://github.com/vdmitriy", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "foway0", "name": "GARAMKIM", "avatar_url": "https://avatars3.githubusercontent.com/u/30143508?v=4", "profile": "https://github.com/foway0", - "contributions": [ - "code", - "ideas" - ] + "contributions": ["code", "ideas"] }, { "login": "mathewmeconry", "name": "Mathias Scherer", "avatar_url": "https://avatars0.githubusercontent.com/u/4057473?v=4", "profile": "https://github.com/mathewmeconry", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "mirekgw", "name": "Mirek", "avatar_url": "https://avatars1.githubusercontent.com/u/61246716?v=4", "profile": "https://github.com/mirekgw", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "Emmeral", "name": "Florian Beutel", "avatar_url": "https://avatars1.githubusercontent.com/u/35600952?v=4", "profile": "https://github.com/Emmeral", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "jakubskopal", "name": "jakubskopal", "avatar_url": "https://avatars2.githubusercontent.com/u/8149011?v=4", "profile": "https://github.com/jakubskopal", - "contributions": [ - "code", - "test", - "doc" - ] + "contributions": ["code", "test", "doc"] }, { "login": "jordandobrev", "name": "Jordan Dobrev", "avatar_url": "https://avatars3.githubusercontent.com/u/3101390?v=4", "profile": "http://www.deetoo.co.uk", - "contributions": [ - "test", - "code" - ] + "contributions": ["test", "code"] }, { "login": "efabris", "name": "Enrico Fabris", "avatar_url": "https://avatars2.githubusercontent.com/u/9377503?v=4", "profile": "https://github.com/efabris", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "mdwheele", "name": "Dustin Wheeler", "avatar_url": "https://avatars1.githubusercontent.com/u/2453394?v=4", "profile": "https://mdwheele.github.io", - "contributions": [ - "code", - "doc", - "test" - ] + "contributions": ["code", "doc", "test"] }, { "login": "tmcarmichael", "name": "Thomas Carmichael", "avatar_url": "https://avatars1.githubusercontent.com/u/23545336?v=4", "profile": "https://tmcarmichael.com", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "Jakesterwars", "name": "Jakesterwars", "avatar_url": "https://avatars1.githubusercontent.com/u/27702288?v=4", "profile": "https://github.com/Jakesterwars", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "xtrycatchx", "name": "xtrycatchx", "avatar_url": "https://avatars2.githubusercontent.com/u/1135580?v=4", "profile": "https://github.com/xtrycatchx", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "codinggosu", "name": "Lee Dong Joo", "avatar_url": "https://avatars0.githubusercontent.com/u/16798331?v=4", "profile": "https://github.com/codinggosu", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "dchekanov", "name": "Dmitry Chekanov", "avatar_url": "https://avatars3.githubusercontent.com/u/45722?v=4", "profile": "http://dmitrychekanov.com", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "dystopiandev", "name": "Redhart Azul", "avatar_url": "https://avatars2.githubusercontent.com/u/12427840?v=4", "profile": "http://dystopian.dev", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "joodie", "name": "Joost Diepenmaat", "avatar_url": "https://avatars1.githubusercontent.com/u/24154?v=4", "profile": "http://zeekat.nl", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "DomParfitt", "name": "Dom Parfitt", "avatar_url": "https://avatars2.githubusercontent.com/u/11363907?v=4", "profile": "https://github.com/DomParfitt", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "xg1990", "name": "xg1990", "avatar_url": "https://avatars1.githubusercontent.com/u/1443518?v=4", "profile": "http://xuguang.info", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "ownagedj", "name": "ownagedj", "avatar_url": "https://avatars2.githubusercontent.com/u/5887702?v=4", "profile": "https://github.com/ownagedj", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "dprgarner", "name": "David Garner", "avatar_url": "https://avatars2.githubusercontent.com/u/11389185?v=4", "profile": "https://github.com/dprgarner", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "balazssoltesz", "name": "Balazs Soltesz", "avatar_url": "https://avatars0.githubusercontent.com/u/52117200?v=4", "profile": "https://github.com/balazssoltesz", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "krizzje", "name": "Christiaan Nieuwlaat", "avatar_url": "https://avatars1.githubusercontent.com/u/3034281?v=4", "profile": "http://www.christiaannieuwlaat.nl", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "ex1st", "name": "Ilya", "avatar_url": "https://avatars1.githubusercontent.com/u/7733915?v=4", "profile": "https://github.com/ex1st", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "aviskase", "name": "Yuliya Bagriy", "avatar_url": "https://avatars1.githubusercontent.com/u/3819473?v=4", "profile": "http://aviskase.com", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "siimsoni", "name": "Kristjan Siimson", "avatar_url": "https://avatars2.githubusercontent.com/u/1738636?v=4", "profile": "http://ks.priv.no/", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "LEI", "name": "Guillaume", "avatar_url": "https://avatars2.githubusercontent.com/u/4112243?v=4", "profile": "https://github.com/LEI", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "sjinks", "name": "Volodymyr Kolesnykov", "avatar_url": "https://avatars1.githubusercontent.com/u/7810770?v=4", "profile": "https://www.linkedin.com/in/volodymyr-kolesnykov", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "pilerou", "name": "Pierre Le Roux", "avatar_url": "https://avatars2.githubusercontent.com/u/664865?v=4", "profile": "https://github.com/pilerou", - "contributions": [ - "code", - "test", - "ideas" - ] + "contributions": ["code", "test", "ideas"] }, { "login": "electrotype", "name": "Electro Type", "avatar_url": "https://avatars2.githubusercontent.com/u/1643012?v=4", "profile": "https://www.spincast.org", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "aaronluman", "name": "Aaron Luman", "avatar_url": "https://avatars.githubusercontent.com/u/1248177?v=4", "profile": "https://github.com/aaronluman", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "0xCAFEADD1C7", "name": "Aymeric Robini", "avatar_url": "https://avatars.githubusercontent.com/u/2291747?v=4", "profile": "https://0xcafeadd1c7.github.io/", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "lyndoh", "name": "lyndoh", "avatar_url": "https://avatars.githubusercontent.com/u/20314316?v=4", "profile": "https://github.com/lyndoh", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "Dakota628", "name": "Dakota", "avatar_url": "https://avatars.githubusercontent.com/u/1666312?v=4", "profile": "https://github.com/Dakota628", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "robertjustjones", "name": "Robert Jones", "avatar_url": "https://avatars.githubusercontent.com/u/969390?v=4", "profile": "https://github.com/robertjustjones", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] }, { "login": "alonsohki", "name": "Alberto Alonso", "avatar_url": "https://avatars.githubusercontent.com/u/165835?v=4", "profile": "https://github.com/alonsohki", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "zzgab", "name": "Gabriel Zerbib", "avatar_url": "https://avatars.githubusercontent.com/u/3754439?v=4", "profile": "https://github.com/zzgab", - "contributions": [ - "code", - "test" - ] + "contributions": ["code", "test"] } ], "contributorsPerLine": 7, diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d28006d7..b0b7948f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve title: '' labels: '' assignees: '' - --- **Describe the bug** @@ -13,7 +12,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior. -**Actual behavior** +**Actual behavior** A clear and concise description of what happens. **Expected behavior** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7d..2f28cead 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,7 +4,6 @@ about: Suggest an idea for this project title: '' labels: '' assignees: '' - --- **Is your feature request related to a problem? Please describe.** diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6143fb25..130464ae 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,8 +5,7 @@ version: 2 updates: - - package-ecosystem: "" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: '' # See documentation for possible values + directory: '/' # Location of package manifests schedule: - interval: "daily" - + interval: 'daily' diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index cf1bb630..fb6de2fa 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -12,4 +12,4 @@ jobs: - name: Build the project run: npm run compile - name: Test the project - run: npm test \ No newline at end of file + run: npm test diff --git a/.gitignore b/.gitignore index 84f4a580..6a22ad57 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -.vscode +.vscode/* +!.vscode/extensions.json +!.vscode/settings.json .idea .DS_Store node_modules diff --git a/.nycrc b/.nycrc index 2094af21..747efff0 100644 --- a/.nycrc +++ b/.nycrc @@ -1,28 +1,14 @@ { - "check-coverage": true, - "per-file": true, - "lines": 62, - "statements": 40, - "functions": 15, - "branches": 40, - "include": [ - "src/**/*.ts", - "src/index.ts" - ], - "exclude": [ - "**/*.d.ts", - "test/*", - "src/resolvers.ts" - ], - "ignore-class-method": "methodToIgnore", - "reporter": [ - "lcov", - "text", - "html" - ], - "all": true, - "extension": [ - ".ts", - ".tsx" - ] + "check-coverage": true, + "per-file": true, + "lines": 62, + "statements": 40, + "functions": 15, + "branches": 40, + "include": ["src/**/*.ts", "src/index.ts"], + "exclude": ["**/*.d.ts", "test/*", "src/resolvers.ts"], + "ignore-class-method": "methodToIgnore", + "reporter": ["lcov", "text", "html"], + "all": true, + "extension": [".ts", ".tsx"] } diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..e69de29b diff --git a/.travis.yml b/.travis.yml index 3d8e26f0..f4c7a929 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,25 @@ sudo: required language: node_js node_js: -- '14' -- '12' -- '10' + - '14' + - '12' + - '10' before_install: -- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_deba340dfe89_key -iv $encrypted_deba340dfe89_iv - -in secrets.zip.enc -out secrets.zip -d; fi' -- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then unzip secrets.zip; fi' + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_deba340dfe89_key -iv $encrypted_deba340dfe89_iv + -in secrets.zip.enc -out secrets.zip -d; fi' + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then unzip secrets.zip; fi' install: -- npm install + - npm install script: -- npm run compile -- npm run test:coverage -- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run coveralls; fi' -- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run codacy; fi' + - npm run compile + - npm run test:coverage + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run coveralls; fi' + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run codacy; fi' env: global: - - secure: x+Nxbq8RrOVJyQ7JWNRpXdBmp61rXPKulYPxUwGeIe/ZJwX1QHsy2HAAB2m7aRvAMBAqr2urBaIKgPBmBklyY0elRTD/chUdT5cJiPhMIxBghqkQ1NYqx/WzcCBUrZbRzoQcpAES7sJnUs0PMujKv3wMsujoFJ9b9Z+trHMqD0IztBlg45azAh4A6ApVcDB8j4L+g42kps6d4r5jUt2d4uW537PKXpsnWJMaaj2Pw7pxU2H5kBaeNGnvlK+w9k3porToop7OUG+HBTN2BjofdF1PSHm8fizzFL6/h2x39cLYMxFvHb7oVUKBiWQe8PBXD5+k/X0RgPJMZO9AggMHln5MIihTowGvuSLK/3d95ta/qXTmzG0Csv4J8xWD+koCJm0xpSzsrBSUOPt5ZKN71o0VmLmc7U4Z0aEplZyVcMdTbwA1XeoeXD4UU1fD7BlzYl4oOTB8HlucJILwAZFg0upPB33lQchAUIgoUCDxze3OoG3V1Odcw4u64bXlPrdqgCg8AQZgnrYP+EzKczjGd7pBQZRVxKyq+44JV8JOUAXEka3qQRPvmw5wcAaXgsqU7uv1C6FcQb+j/ZKQ6GlWu8qDzouRR+OqbKeLk2lOvtU08Y32tn6u14+vVNbmsG3iXxGf2+esGcETFP/0EYluPGpo257h/9qC1yMN8ZExey0= - - secure: l5s8AWcMM9Ih8aq1OElM47vBI+NS06EB/7k19r7xsurU6+t7s1CoqdJn3HDzUfKax54HtJZzkbAAnfIhVJNIvC9srInW0fRCbD6hW9qS8o0HYDb7dakFa1/CxzoQv8Wz+xus9+Gx2IUJPGJ4ZzVGak704KW0Ds5CFnzQTorohyl/2a6jlODd2gAZMciJA0ZjQGiQPRYpt73cHa5QN03n5Buybp/m0ErsA2Wc7OZONTl0oW0hoQ0A8hICUP1nIbrZjavw8tIf5cComp9GxuatbFCRCaOu5kgbM/O5x0bKJkJutVabO1HC2dYd78o+X7e9ApH+Oly9cLEsuLyYLWnH5Kbdv2j/Huz6wP8H6is4FQUgasTUCcV5+9og6mSccoKDHIvuy0c5lkC30wuaiXJAAWSeohZ8lM6SnrDNp7Q+5mWx5ooVo4A6AGLdXNFeIkqmBat59eNijlnspkJ7MRp2+5mVI+rTyX+fwjLw6Z/1oY5GA9NY061+yPs8LL0BQYkm5r1et3lTIWGo3bJeLIZM4Dsh+VXv1Z8q7oz1PkhSwbmQH19FyQdeohgyzokidbQhGTgk8tO2ol1j2tZMPkwAh3MTRU4Gpmo641Qye69TMhBrhIb5ebmTFXt8HnRbfJT0x/hLjLdCd8hUzo27ICu7yCqZTR74RfIdBvIumSvGQJQ= + - secure: x+Nxbq8RrOVJyQ7JWNRpXdBmp61rXPKulYPxUwGeIe/ZJwX1QHsy2HAAB2m7aRvAMBAqr2urBaIKgPBmBklyY0elRTD/chUdT5cJiPhMIxBghqkQ1NYqx/WzcCBUrZbRzoQcpAES7sJnUs0PMujKv3wMsujoFJ9b9Z+trHMqD0IztBlg45azAh4A6ApVcDB8j4L+g42kps6d4r5jUt2d4uW537PKXpsnWJMaaj2Pw7pxU2H5kBaeNGnvlK+w9k3porToop7OUG+HBTN2BjofdF1PSHm8fizzFL6/h2x39cLYMxFvHb7oVUKBiWQe8PBXD5+k/X0RgPJMZO9AggMHln5MIihTowGvuSLK/3d95ta/qXTmzG0Csv4J8xWD+koCJm0xpSzsrBSUOPt5ZKN71o0VmLmc7U4Z0aEplZyVcMdTbwA1XeoeXD4UU1fD7BlzYl4oOTB8HlucJILwAZFg0upPB33lQchAUIgoUCDxze3OoG3V1Odcw4u64bXlPrdqgCg8AQZgnrYP+EzKczjGd7pBQZRVxKyq+44JV8JOUAXEka3qQRPvmw5wcAaXgsqU7uv1C6FcQb+j/ZKQ6GlWu8qDzouRR+OqbKeLk2lOvtU08Y32tn6u14+vVNbmsG3iXxGf2+esGcETFP/0EYluPGpo257h/9qC1yMN8ZExey0= + - secure: l5s8AWcMM9Ih8aq1OElM47vBI+NS06EB/7k19r7xsurU6+t7s1CoqdJn3HDzUfKax54HtJZzkbAAnfIhVJNIvC9srInW0fRCbD6hW9qS8o0HYDb7dakFa1/CxzoQv8Wz+xus9+Gx2IUJPGJ4ZzVGak704KW0Ds5CFnzQTorohyl/2a6jlODd2gAZMciJA0ZjQGiQPRYpt73cHa5QN03n5Buybp/m0ErsA2Wc7OZONTl0oW0hoQ0A8hICUP1nIbrZjavw8tIf5cComp9GxuatbFCRCaOu5kgbM/O5x0bKJkJutVabO1HC2dYd78o+X7e9ApH+Oly9cLEsuLyYLWnH5Kbdv2j/Huz6wP8H6is4FQUgasTUCcV5+9og6mSccoKDHIvuy0c5lkC30wuaiXJAAWSeohZ8lM6SnrDNp7Q+5mWx5ooVo4A6AGLdXNFeIkqmBat59eNijlnspkJ7MRp2+5mVI+rTyX+fwjLw6Z/1oY5GA9NY061+yPs8LL0BQYkm5r1et3lTIWGo3bJeLIZM4Dsh+VXv1Z8q7oz1PkhSwbmQH19FyQdeohgyzokidbQhGTgk8tO2ol1j2tZMPkwAh3MTRU4Gpmo641Qye69TMhBrhIb5ebmTFXt8HnRbfJT0x/hLjLdCd8hUzo27ICu7yCqZTR74RfIdBvIumSvGQJQ= branches: only: - - /.*/ + - /.*/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..c83e2634 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["esbenp.prettier-vscode"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..1b6457c5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" +} diff --git a/CHANGE_HISTORY.md b/CHANGE_HISTORY.md index fc6801b7..846f45f4 100644 --- a/CHANGE_HISTORY.md +++ b/CHANGE_HISTORY.md @@ -1,210 +1,177 @@ -## (2024-06-02) - -* Add `express` as peer dependency (#907) ([4e8bc84](https://github.com/cdimascio/express-openapi-validator/commit/4e8bc84)), closes [#907](https://github.com/cdimascio/express-openapi-validator/issues/907) -* Add multipart fix when does not exist any body (#905) ([5c98d17](https://github.com/cdimascio/express-openapi-validator/commit/5c98d17)), closes [#905](https://github.com/cdimascio/express-openapi-validator/issues/905) -* add reponse serializer tests for arrays ([bbbd160](https://github.com/cdimascio/express-openapi-validator/commit/bbbd160)) -* pass coerceTypes through (#809) ([8f7c678](https://github.com/cdimascio/express-openapi-validator/commit/8f7c678)), closes [#809](https://github.com/cdimascio/express-openapi-validator/issues/809) -* Support async operation handler resolver (#921) ([a4a7175](https://github.com/cdimascio/express-openapi-validator/commit/a4a7175)), closes [#921](https://github.com/cdimascio/express-openapi-validator/issues/921) -* upgrade ajv ([a708132](https://github.com/cdimascio/express-openapi-validator/commit/a708132)) -* upgrade example 3 ([43cccc8](https://github.com/cdimascio/express-openapi-validator/commit/43cccc8)) -* upgrade example 4 ([255f20f](https://github.com/cdimascio/express-openapi-validator/commit/255f20f)) -* v5.2.0 ([42cb3ab](https://github.com/cdimascio/express-openapi-validator/commit/42cb3ab)) -* chore: apiSpec may be const literal (#854) ([e35a07c](https://github.com/cdimascio/express-openapi-validator/commit/e35a07c)), closes [#854](https://github.com/cdimascio/express-openapi-validator/issues/854) -* chore(dependencies): bump @apidevtools/json-schema-ref-parser to 11.6.2 to prevent vulnerability (#9 ([61ff0cf](https://github.com/cdimascio/express-openapi-validator/commit/61ff0cf)), closes [#918](https://github.com/cdimascio/express-openapi-validator/issues/918) -* chore(deps-dev): bump @babel/traverse (#924) ([5a04ea9](https://github.com/cdimascio/express-openapi-validator/commit/5a04ea9)), closes [#924](https://github.com/cdimascio/express-openapi-validator/issues/924) -* chore(deps): bump axios, @nestjs/common, @nestjs/core, @nestjs/platform-express and @nestjs/testing ([b77150f](https://github.com/cdimascio/express-openapi-validator/commit/b77150f)), closes [#925](https://github.com/cdimascio/express-openapi-validator/issues/925) -* chore(deps): bump webpack and @nestjs/cli in /examples/9-nestjs (#831) ([c0c5f4c](https://github.com/cdimascio/express-openapi-validator/commit/c0c5f4c)), closes [#831](https://github.com/cdimascio/express-openapi-validator/issues/831) -* fix: examples/4-eov-operations-babel/package.json & examples/4-eov-operations-babel/package-lock.jso ([87d173b](https://github.com/cdimascio/express-openapi-validator/commit/87d173b)), closes [#911](https://github.com/cdimascio/express-openapi-validator/issues/911) -* fix: package.json & package-lock.json to reduce vulnerabilities (#920) ([898ceb7](https://github.com/cdimascio/express-openapi-validator/commit/898ceb7)), closes [#920](https://github.com/cdimascio/express-openapi-validator/issues/920) -* fix: upgrade @types/multer from 1.4.7 to 1.4.11 (#897) ([a7d67e7](https://github.com/cdimascio/express-openapi-validator/commit/a7d67e7)), closes [#897](https://github.com/cdimascio/express-openapi-validator/issues/897) -* fix: upgrade path-to-regexp from 6.2.0 to 6.2.2 (#914) ([bce2d6a](https://github.com/cdimascio/express-openapi-validator/commit/bce2d6a)), closes [#914](https://github.com/cdimascio/express-openapi-validator/issues/914) - - +## (2024-06-02) + +- Add `express` as peer dependency (#907) ([4e8bc84](https://github.com/cdimascio/express-openapi-validator/commit/4e8bc84)), closes [#907](https://github.com/cdimascio/express-openapi-validator/issues/907) +- Add multipart fix when does not exist any body (#905) ([5c98d17](https://github.com/cdimascio/express-openapi-validator/commit/5c98d17)), closes [#905](https://github.com/cdimascio/express-openapi-validator/issues/905) +- add reponse serializer tests for arrays ([bbbd160](https://github.com/cdimascio/express-openapi-validator/commit/bbbd160)) +- pass coerceTypes through (#809) ([8f7c678](https://github.com/cdimascio/express-openapi-validator/commit/8f7c678)), closes [#809](https://github.com/cdimascio/express-openapi-validator/issues/809) +- Support async operation handler resolver (#921) ([a4a7175](https://github.com/cdimascio/express-openapi-validator/commit/a4a7175)), closes [#921](https://github.com/cdimascio/express-openapi-validator/issues/921) +- upgrade ajv ([a708132](https://github.com/cdimascio/express-openapi-validator/commit/a708132)) +- upgrade example 3 ([43cccc8](https://github.com/cdimascio/express-openapi-validator/commit/43cccc8)) +- upgrade example 4 ([255f20f](https://github.com/cdimascio/express-openapi-validator/commit/255f20f)) +- v5.2.0 ([42cb3ab](https://github.com/cdimascio/express-openapi-validator/commit/42cb3ab)) +- chore: apiSpec may be const literal (#854) ([e35a07c](https://github.com/cdimascio/express-openapi-validator/commit/e35a07c)), closes [#854](https://github.com/cdimascio/express-openapi-validator/issues/854) +- chore(dependencies): bump @apidevtools/json-schema-ref-parser to 11.6.2 to prevent vulnerability (#9 ([61ff0cf](https://github.com/cdimascio/express-openapi-validator/commit/61ff0cf)), closes [#918](https://github.com/cdimascio/express-openapi-validator/issues/918) +- chore(deps-dev): bump @babel/traverse (#924) ([5a04ea9](https://github.com/cdimascio/express-openapi-validator/commit/5a04ea9)), closes [#924](https://github.com/cdimascio/express-openapi-validator/issues/924) +- chore(deps): bump axios, @nestjs/common, @nestjs/core, @nestjs/platform-express and @nestjs/testing ([b77150f](https://github.com/cdimascio/express-openapi-validator/commit/b77150f)), closes [#925](https://github.com/cdimascio/express-openapi-validator/issues/925) +- chore(deps): bump webpack and @nestjs/cli in /examples/9-nestjs (#831) ([c0c5f4c](https://github.com/cdimascio/express-openapi-validator/commit/c0c5f4c)), closes [#831](https://github.com/cdimascio/express-openapi-validator/issues/831) +- fix: examples/4-eov-operations-babel/package.json & examples/4-eov-operations-babel/package-lock.jso ([87d173b](https://github.com/cdimascio/express-openapi-validator/commit/87d173b)), closes [#911](https://github.com/cdimascio/express-openapi-validator/issues/911) +- fix: package.json & package-lock.json to reduce vulnerabilities (#920) ([898ceb7](https://github.com/cdimascio/express-openapi-validator/commit/898ceb7)), closes [#920](https://github.com/cdimascio/express-openapi-validator/issues/920) +- fix: upgrade @types/multer from 1.4.7 to 1.4.11 (#897) ([a7d67e7](https://github.com/cdimascio/express-openapi-validator/commit/a7d67e7)), closes [#897](https://github.com/cdimascio/express-openapi-validator/issues/897) +- fix: upgrade path-to-regexp from 6.2.0 to 6.2.2 (#914) ([bce2d6a](https://github.com/cdimascio/express-openapi-validator/commit/bce2d6a)), closes [#914](https://github.com/cdimascio/express-openapi-validator/issues/914) ## 5.1.6 (2024-02-11) -* Fixes for 881 - multiple specs w/validateRequests fail (#903) ([766806b](https://github.com/cdimascio/express-openapi-validator/commit/766806b)), closes [#903](https://github.com/cdimascio/express-openapi-validator/issues/903) - - +- Fixes for 881 - multiple specs w/validateRequests fail (#903) ([766806b](https://github.com/cdimascio/express-openapi-validator/commit/766806b)), closes [#903](https://github.com/cdimascio/express-openapi-validator/issues/903) ## 5.1.5 (2024-02-10) -* fixes write-only tests ([8c53e58](https://github.com/cdimascio/express-openapi-validator/commit/8c53e58)) -* Support writeOnly + required combination #149 (#756) ([4f16ed2](https://github.com/cdimascio/express-openapi-validator/commit/4f16ed2)), closes [#149](https://github.com/cdimascio/express-openapi-validator/issues/149) [#756](https://github.com/cdimascio/express-openapi-validator/issues/756) -* v5.1.5 ([708f2f5](https://github.com/cdimascio/express-openapi-validator/commit/708f2f5)) - - +- fixes write-only tests ([8c53e58](https://github.com/cdimascio/express-openapi-validator/commit/8c53e58)) +- Support writeOnly + required combination #149 (#756) ([4f16ed2](https://github.com/cdimascio/express-openapi-validator/commit/4f16ed2)), closes [#149](https://github.com/cdimascio/express-openapi-validator/issues/149) [#756](https://github.com/cdimascio/express-openapi-validator/issues/756) +- v5.1.5 ([708f2f5](https://github.com/cdimascio/express-openapi-validator/commit/708f2f5)) ## 5.1.4 (2024-02-09) -* add cookies to examples 1 and 2 (#891) ([2c95d5b](https://github.com/cdimascio/express-openapi-validator/commit/2c95d5b)), closes [#891](https://github.com/cdimascio/express-openapi-validator/issues/891) -* Direct example broken link to the guide ([00a9c8f](https://github.com/cdimascio/express-openapi-validator/commit/00a9c8f)) -* fixes badging for build and test ([631fb7b](https://github.com/cdimascio/express-openapi-validator/commit/631fb7b)) -* npm audit fix (#892) ([2977c0a](https://github.com/cdimascio/express-openapi-validator/commit/2977c0a)), closes [#892](https://github.com/cdimascio/express-openapi-validator/issues/892) -* Remove read only and write only fields (#895) ([97617fd](https://github.com/cdimascio/express-openapi-validator/commit/97617fd)), closes [#895](https://github.com/cdimascio/express-openapi-validator/issues/895) [#627](https://github.com/cdimascio/express-openapi-validator/issues/627) -* removes lodash.uniq and lodash.zipobject dependencies (#893) ([1206802](https://github.com/cdimascio/express-openapi-validator/commit/1206802)), closes [#893](https://github.com/cdimascio/express-openapi-validator/issues/893) -* Update CONTRIBUTING.md ([6d67169](https://github.com/cdimascio/express-openapi-validator/commit/6d67169)) -* Update README.md ([dffda28](https://github.com/cdimascio/express-openapi-validator/commit/dffda28)) -* Update README.md ([bdd0d79](https://github.com/cdimascio/express-openapi-validator/commit/bdd0d79)) -* Update README.md (#896) ([bb66916](https://github.com/cdimascio/express-openapi-validator/commit/bb66916)), closes [#896](https://github.com/cdimascio/express-openapi-validator/issues/896) -* v5.1.4 ([b3d7483](https://github.com/cdimascio/express-openapi-validator/commit/b3d7483)) -* v5.1.4 ([509fa22](https://github.com/cdimascio/express-openapi-validator/commit/509fa22)) -* fix: #887 allow multiple params with wildcard (#898) ([2d33d0a](https://github.com/cdimascio/express-openapi-validator/commit/2d33d0a)), closes [#887](https://github.com/cdimascio/express-openapi-validator/issues/887) [#898](https://github.com/cdimascio/express-openapi-validator/issues/898) [#1](https://github.com/cdimascio/express-openapi-validator/issues/1) -* docs: fix doc typo in README.md (#885) ([8a81bf8](https://github.com/cdimascio/express-openapi-validator/commit/8a81bf8)), closes [#885](https://github.com/cdimascio/express-openapi-validator/issues/885) - - +- add cookies to examples 1 and 2 (#891) ([2c95d5b](https://github.com/cdimascio/express-openapi-validator/commit/2c95d5b)), closes [#891](https://github.com/cdimascio/express-openapi-validator/issues/891) +- Direct example broken link to the guide ([00a9c8f](https://github.com/cdimascio/express-openapi-validator/commit/00a9c8f)) +- fixes badging for build and test ([631fb7b](https://github.com/cdimascio/express-openapi-validator/commit/631fb7b)) +- npm audit fix (#892) ([2977c0a](https://github.com/cdimascio/express-openapi-validator/commit/2977c0a)), closes [#892](https://github.com/cdimascio/express-openapi-validator/issues/892) +- Remove read only and write only fields (#895) ([97617fd](https://github.com/cdimascio/express-openapi-validator/commit/97617fd)), closes [#895](https://github.com/cdimascio/express-openapi-validator/issues/895) [#627](https://github.com/cdimascio/express-openapi-validator/issues/627) +- removes lodash.uniq and lodash.zipobject dependencies (#893) ([1206802](https://github.com/cdimascio/express-openapi-validator/commit/1206802)), closes [#893](https://github.com/cdimascio/express-openapi-validator/issues/893) +- Update CONTRIBUTING.md ([6d67169](https://github.com/cdimascio/express-openapi-validator/commit/6d67169)) +- Update README.md ([dffda28](https://github.com/cdimascio/express-openapi-validator/commit/dffda28)) +- Update README.md ([bdd0d79](https://github.com/cdimascio/express-openapi-validator/commit/bdd0d79)) +- Update README.md (#896) ([bb66916](https://github.com/cdimascio/express-openapi-validator/commit/bb66916)), closes [#896](https://github.com/cdimascio/express-openapi-validator/issues/896) +- v5.1.4 ([b3d7483](https://github.com/cdimascio/express-openapi-validator/commit/b3d7483)) +- v5.1.4 ([509fa22](https://github.com/cdimascio/express-openapi-validator/commit/509fa22)) +- fix: #887 allow multiple params with wildcard (#898) ([2d33d0a](https://github.com/cdimascio/express-openapi-validator/commit/2d33d0a)), closes [#887](https://github.com/cdimascio/express-openapi-validator/issues/887) [#898](https://github.com/cdimascio/express-openapi-validator/issues/898) [#1](https://github.com/cdimascio/express-openapi-validator/issues/1) +- docs: fix doc typo in README.md (#885) ([8a81bf8](https://github.com/cdimascio/express-openapi-validator/commit/8a81bf8)), closes [#885](https://github.com/cdimascio/express-openapi-validator/issues/885) ## 5.1.3 (2024-01-27) -* CLS Context is lost after using multer middleware (#695) ([40716fb](https://github.com/cdimascio/express-openapi-validator/commit/40716fb)), closes [#695](https://github.com/cdimascio/express-openapi-validator/issues/695) -* remove examples from schema (#890) ([0ad49ec](https://github.com/cdimascio/express-openapi-validator/commit/0ad49ec)), closes [#890](https://github.com/cdimascio/express-openapi-validator/issues/890) -* v5.1.3 ([f806690](https://github.com/cdimascio/express-openapi-validator/commit/f806690)) -* v5.1.3 ([e567701](https://github.com/cdimascio/express-openapi-validator/commit/e567701)) - - +- CLS Context is lost after using multer middleware (#695) ([40716fb](https://github.com/cdimascio/express-openapi-validator/commit/40716fb)), closes [#695](https://github.com/cdimascio/express-openapi-validator/issues/695) +- remove examples from schema (#890) ([0ad49ec](https://github.com/cdimascio/express-openapi-validator/commit/0ad49ec)), closes [#890](https://github.com/cdimascio/express-openapi-validator/issues/890) +- v5.1.3 ([f806690](https://github.com/cdimascio/express-openapi-validator/commit/f806690)) +- v5.1.3 ([e567701](https://github.com/cdimascio/express-openapi-validator/commit/e567701)) ## 5.1.2 (2023-12-04) -* Normalize request body ContentTypes (#863) ([0099b0d](https://github.com/cdimascio/express-openapi-validator/commit/0099b0d)), closes [#863](https://github.com/cdimascio/express-openapi-validator/issues/863) -* Safer handling of multipart nested JSON body props (#878) ([807e09c](https://github.com/cdimascio/express-openapi-validator/commit/807e09c)), closes [#878](https://github.com/cdimascio/express-openapi-validator/issues/878) -* v5.1.1 ([4b0c989](https://github.com/cdimascio/express-openapi-validator/commit/4b0c989)) - - +- Normalize request body ContentTypes (#863) ([0099b0d](https://github.com/cdimascio/express-openapi-validator/commit/0099b0d)), closes [#863](https://github.com/cdimascio/express-openapi-validator/issues/863) +- Safer handling of multipart nested JSON body props (#878) ([807e09c](https://github.com/cdimascio/express-openapi-validator/commit/807e09c)), closes [#878](https://github.com/cdimascio/express-openapi-validator/issues/878) +- v5.1.1 ([4b0c989](https://github.com/cdimascio/express-openapi-validator/commit/4b0c989)) ## 5.1.1 (2023-11-21) -* Pass-through HttpError caught in multipart handler (#867) ([240c876](https://github.com/cdimascio/express-openapi-validator/commit/240c876)), closes [#867](https://github.com/cdimascio/express-openapi-validator/issues/867) -* v5.1.0 ([a9a3b0b](https://github.com/cdimascio/express-openapi-validator/commit/a9a3b0b)) -* v5.1.1 ([a4e62ac](https://github.com/cdimascio/express-openapi-validator/commit/a4e62ac)) - - +- Pass-through HttpError caught in multipart handler (#867) ([240c876](https://github.com/cdimascio/express-openapi-validator/commit/240c876)), closes [#867](https://github.com/cdimascio/express-openapi-validator/issues/867) +- v5.1.0 ([a9a3b0b](https://github.com/cdimascio/express-openapi-validator/commit/a9a3b0b)) +- v5.1.1 ([a4e62ac](https://github.com/cdimascio/express-openapi-validator/commit/a4e62ac)) ## 5.1.0 (2023-11-12) -* Allow optional use of `req.url` (#857) ([f732379](https://github.com/cdimascio/express-openapi-validator/commit/f732379)), closes [#857](https://github.com/cdimascio/express-openapi-validator/issues/857) -* Reorder upload and security middlewares (#866) ([95543d6](https://github.com/cdimascio/express-openapi-validator/commit/95543d6)), closes [#866](https://github.com/cdimascio/express-openapi-validator/issues/866) [#865](https://github.com/cdimascio/express-openapi-validator/issues/865) -* Update build and packaging scripts (#872) ([dd4027f](https://github.com/cdimascio/express-openapi-validator/commit/dd4027f)), closes [#872](https://github.com/cdimascio/express-openapi-validator/issues/872) -* update version locks ([bb8d6b8](https://github.com/cdimascio/express-openapi-validator/commit/bb8d6b8)) -* v5.1.0 ([839f859](https://github.com/cdimascio/express-openapi-validator/commit/839f859)) - - +- Allow optional use of `req.url` (#857) ([f732379](https://github.com/cdimascio/express-openapi-validator/commit/f732379)), closes [#857](https://github.com/cdimascio/express-openapi-validator/issues/857) +- Reorder upload and security middlewares (#866) ([95543d6](https://github.com/cdimascio/express-openapi-validator/commit/95543d6)), closes [#866](https://github.com/cdimascio/express-openapi-validator/issues/866) [#865](https://github.com/cdimascio/express-openapi-validator/issues/865) +- Update build and packaging scripts (#872) ([dd4027f](https://github.com/cdimascio/express-openapi-validator/commit/dd4027f)), closes [#872](https://github.com/cdimascio/express-openapi-validator/issues/872) +- update version locks ([bb8d6b8](https://github.com/cdimascio/express-openapi-validator/commit/bb8d6b8)) +- v5.1.0 ([839f859](https://github.com/cdimascio/express-openapi-validator/commit/839f859)) ## 5.0.5 (2023-08-23) -* #841 return error thrown in serDes deserializer (#842) ([d029401](https://github.com/cdimascio/express-openapi-validator/commit/d029401)), closes [#841](https://github.com/cdimascio/express-openapi-validator/issues/841) [#842](https://github.com/cdimascio/express-openapi-validator/issues/842) -* fix documentation links ([01950b7](https://github.com/cdimascio/express-openapi-validator/commit/01950b7)) -* fix example schema removal and upgrade patch version ([495dabd](https://github.com/cdimascio/express-openapi-validator/commit/495dabd)) -* fixing default export function issue (#846) ([268d38a](https://github.com/cdimascio/express-openapi-validator/commit/268d38a)), closes [#846](https://github.com/cdimascio/express-openapi-validator/issues/846) -* Remove body-parser deps in example (#845) ([c73b7c1](https://github.com/cdimascio/express-openapi-validator/commit/c73b7c1)), closes [#845](https://github.com/cdimascio/express-openapi-validator/issues/845) -* Remove examples from apiDoc when validating requests (#774) ([950d429](https://github.com/cdimascio/express-openapi-validator/commit/950d429)), closes [#774](https://github.com/cdimascio/express-openapi-validator/issues/774) -* Resolve "reference resolves to more than one schema" errors when AJV processes OpenAPI document and ([9d215be](https://github.com/cdimascio/express-openapi-validator/commit/9d215be)), closes [#853](https://github.com/cdimascio/express-openapi-validator/issues/853) -* v5.0.5 change history ([b5cc33a](https://github.com/cdimascio/express-openapi-validator/commit/b5cc33a)) - - +- #841 return error thrown in serDes deserializer (#842) ([d029401](https://github.com/cdimascio/express-openapi-validator/commit/d029401)), closes [#841](https://github.com/cdimascio/express-openapi-validator/issues/841) [#842](https://github.com/cdimascio/express-openapi-validator/issues/842) +- fix documentation links ([01950b7](https://github.com/cdimascio/express-openapi-validator/commit/01950b7)) +- fix example schema removal and upgrade patch version ([495dabd](https://github.com/cdimascio/express-openapi-validator/commit/495dabd)) +- fixing default export function issue (#846) ([268d38a](https://github.com/cdimascio/express-openapi-validator/commit/268d38a)), closes [#846](https://github.com/cdimascio/express-openapi-validator/issues/846) +- Remove body-parser deps in example (#845) ([c73b7c1](https://github.com/cdimascio/express-openapi-validator/commit/c73b7c1)), closes [#845](https://github.com/cdimascio/express-openapi-validator/issues/845) +- Remove examples from apiDoc when validating requests (#774) ([950d429](https://github.com/cdimascio/express-openapi-validator/commit/950d429)), closes [#774](https://github.com/cdimascio/express-openapi-validator/issues/774) +- Resolve "reference resolves to more than one schema" errors when AJV processes OpenAPI document and ([9d215be](https://github.com/cdimascio/express-openapi-validator/commit/9d215be)), closes [#853](https://github.com/cdimascio/express-openapi-validator/issues/853) +- v5.0.5 change history ([b5cc33a](https://github.com/cdimascio/express-openapi-validator/commit/b5cc33a)) ## 5.0.4 (2023-04-30) -* Switch json-schema-ref-parser to non-deprecated package (#829) ([f5bbce9](https://github.com/cdimascio/express-openapi-validator/commit/f5bbce9)), closes [#829](https://github.com/cdimascio/express-openapi-validator/issues/829) -* v5.0.4 ([9b89c79](https://github.com/cdimascio/express-openapi-validator/commit/9b89c79)) -* fix: Deserialize custom types with inline schemas (#823) ([d53621d](https://github.com/cdimascio/express-openapi-validator/commit/d53621d)), closes [#823](https://github.com/cdimascio/express-openapi-validator/issues/823) - - +- Switch json-schema-ref-parser to non-deprecated package (#829) ([f5bbce9](https://github.com/cdimascio/express-openapi-validator/commit/f5bbce9)), closes [#829](https://github.com/cdimascio/express-openapi-validator/issues/829) +- v5.0.4 ([9b89c79](https://github.com/cdimascio/express-openapi-validator/commit/9b89c79)) +- fix: Deserialize custom types with inline schemas (#823) ([d53621d](https://github.com/cdimascio/express-openapi-validator/commit/d53621d)), closes [#823](https://github.com/cdimascio/express-openapi-validator/issues/823) ## 5.0.3 (2023-03-04) -* FIx serialization/deserialization in additionalProperties (#822) ([a9067b8](https://github.com/cdimascio/express-openapi-validator/commit/a9067b8)), closes [#822](https://github.com/cdimascio/express-openapi-validator/issues/822) -* Rename field `error_code` to `errorCode` in `ValidationErrorItem` (#819) ([1a1b2cc](https://github.com/cdimascio/express-openapi-validator/commit/1a1b2cc)), closes [#819](https://github.com/cdimascio/express-openapi-validator/issues/819) -* v5.0.3 ([6e93a96](https://github.com/cdimascio/express-openapi-validator/commit/6e93a96)) -* chore(deps): bump cookiejar from 2.1.2 to 2.1.4 in /examples/9-nestjs (#805) ([07d9879](https://github.com/cdimascio/express-openapi-validator/commit/07d9879)), closes [#805](https://github.com/cdimascio/express-openapi-validator/issues/805) -* chore(deps): bump cookiejar from 2.1.3 to 2.1.4 (#806) ([0da34f8](https://github.com/cdimascio/express-openapi-validator/commit/0da34f8)), closes [#806](https://github.com/cdimascio/express-openapi-validator/issues/806) -* chore(deps): bump http-cache-semantics (#811) ([7a779f6](https://github.com/cdimascio/express-openapi-validator/commit/7a779f6)), closes [#811](https://github.com/cdimascio/express-openapi-validator/issues/811) -* chore(deps): bump http-cache-semantics (#813) ([336683d](https://github.com/cdimascio/express-openapi-validator/commit/336683d)), closes [#813](https://github.com/cdimascio/express-openapi-validator/issues/813) -* chore(deps): bump http-cache-semantics (#814) ([3721092](https://github.com/cdimascio/express-openapi-validator/commit/3721092)), closes [#814](https://github.com/cdimascio/express-openapi-validator/issues/814) -* chore(deps): bump http-cache-semantics (#816) ([466e337](https://github.com/cdimascio/express-openapi-validator/commit/466e337)), closes [#816](https://github.com/cdimascio/express-openapi-validator/issues/816) -* chore(deps): bump http-cache-semantics (#817) ([582b395](https://github.com/cdimascio/express-openapi-validator/commit/582b395)), closes [#817](https://github.com/cdimascio/express-openapi-validator/issues/817) -* chore(deps): bump http-cache-semantics in /examples/1-standard (#810) ([e6ef9d3](https://github.com/cdimascio/express-openapi-validator/commit/e6ef9d3)), closes [#810](https://github.com/cdimascio/express-openapi-validator/issues/810) -* chore(deps): bump http-cache-semantics in /examples/3-eov-operations (#812) ([fd04b5e](https://github.com/cdimascio/express-openapi-validator/commit/fd04b5e)), closes [#812](https://github.com/cdimascio/express-openapi-validator/issues/812) -* chore(deps): bump http-cache-semantics in /examples/6-multi-file-spec (#815) ([b2704b0](https://github.com/cdimascio/express-openapi-validator/commit/b2704b0)), closes [#815](https://github.com/cdimascio/express-openapi-validator/issues/815) -* chore(deps): bump json5 from 1.0.1 to 1.0.2 in /examples/9-nestjs (#801) ([30defdc](https://github.com/cdimascio/express-openapi-validator/commit/30defdc)), closes [#801](https://github.com/cdimascio/express-openapi-validator/issues/801) -* chore(deps): bump json5 in /examples/4-eov-operations-babel (#799) ([a100192](https://github.com/cdimascio/express-openapi-validator/commit/a100192)), closes [#799](https://github.com/cdimascio/express-openapi-validator/issues/799) -* fix: upgrade ajv from 8.11.0 to 8.11.2 (#797) ([e774d4b](https://github.com/cdimascio/express-openapi-validator/commit/e774d4b)), closes [#797](https://github.com/cdimascio/express-openapi-validator/issues/797) -* fix: upgrade body-parser from 1.19.0 to 1.20.1 (#798) ([87a2000](https://github.com/cdimascio/express-openapi-validator/commit/87a2000)), closes [#798](https://github.com/cdimascio/express-openapi-validator/issues/798) -* fix: upgrade content-type from 1.0.4 to 1.0.5 (#818) ([541d5f9](https://github.com/cdimascio/express-openapi-validator/commit/541d5f9)), closes [#818](https://github.com/cdimascio/express-openapi-validator/issues/818) - - +- FIx serialization/deserialization in additionalProperties (#822) ([a9067b8](https://github.com/cdimascio/express-openapi-validator/commit/a9067b8)), closes [#822](https://github.com/cdimascio/express-openapi-validator/issues/822) +- Rename field `error_code` to `errorCode` in `ValidationErrorItem` (#819) ([1a1b2cc](https://github.com/cdimascio/express-openapi-validator/commit/1a1b2cc)), closes [#819](https://github.com/cdimascio/express-openapi-validator/issues/819) +- v5.0.3 ([6e93a96](https://github.com/cdimascio/express-openapi-validator/commit/6e93a96)) +- chore(deps): bump cookiejar from 2.1.2 to 2.1.4 in /examples/9-nestjs (#805) ([07d9879](https://github.com/cdimascio/express-openapi-validator/commit/07d9879)), closes [#805](https://github.com/cdimascio/express-openapi-validator/issues/805) +- chore(deps): bump cookiejar from 2.1.3 to 2.1.4 (#806) ([0da34f8](https://github.com/cdimascio/express-openapi-validator/commit/0da34f8)), closes [#806](https://github.com/cdimascio/express-openapi-validator/issues/806) +- chore(deps): bump http-cache-semantics (#811) ([7a779f6](https://github.com/cdimascio/express-openapi-validator/commit/7a779f6)), closes [#811](https://github.com/cdimascio/express-openapi-validator/issues/811) +- chore(deps): bump http-cache-semantics (#813) ([336683d](https://github.com/cdimascio/express-openapi-validator/commit/336683d)), closes [#813](https://github.com/cdimascio/express-openapi-validator/issues/813) +- chore(deps): bump http-cache-semantics (#814) ([3721092](https://github.com/cdimascio/express-openapi-validator/commit/3721092)), closes [#814](https://github.com/cdimascio/express-openapi-validator/issues/814) +- chore(deps): bump http-cache-semantics (#816) ([466e337](https://github.com/cdimascio/express-openapi-validator/commit/466e337)), closes [#816](https://github.com/cdimascio/express-openapi-validator/issues/816) +- chore(deps): bump http-cache-semantics (#817) ([582b395](https://github.com/cdimascio/express-openapi-validator/commit/582b395)), closes [#817](https://github.com/cdimascio/express-openapi-validator/issues/817) +- chore(deps): bump http-cache-semantics in /examples/1-standard (#810) ([e6ef9d3](https://github.com/cdimascio/express-openapi-validator/commit/e6ef9d3)), closes [#810](https://github.com/cdimascio/express-openapi-validator/issues/810) +- chore(deps): bump http-cache-semantics in /examples/3-eov-operations (#812) ([fd04b5e](https://github.com/cdimascio/express-openapi-validator/commit/fd04b5e)), closes [#812](https://github.com/cdimascio/express-openapi-validator/issues/812) +- chore(deps): bump http-cache-semantics in /examples/6-multi-file-spec (#815) ([b2704b0](https://github.com/cdimascio/express-openapi-validator/commit/b2704b0)), closes [#815](https://github.com/cdimascio/express-openapi-validator/issues/815) +- chore(deps): bump json5 from 1.0.1 to 1.0.2 in /examples/9-nestjs (#801) ([30defdc](https://github.com/cdimascio/express-openapi-validator/commit/30defdc)), closes [#801](https://github.com/cdimascio/express-openapi-validator/issues/801) +- chore(deps): bump json5 in /examples/4-eov-operations-babel (#799) ([a100192](https://github.com/cdimascio/express-openapi-validator/commit/a100192)), closes [#799](https://github.com/cdimascio/express-openapi-validator/issues/799) +- fix: upgrade ajv from 8.11.0 to 8.11.2 (#797) ([e774d4b](https://github.com/cdimascio/express-openapi-validator/commit/e774d4b)), closes [#797](https://github.com/cdimascio/express-openapi-validator/issues/797) +- fix: upgrade body-parser from 1.19.0 to 1.20.1 (#798) ([87a2000](https://github.com/cdimascio/express-openapi-validator/commit/87a2000)), closes [#798](https://github.com/cdimascio/express-openapi-validator/issues/798) +- fix: upgrade content-type from 1.0.4 to 1.0.5 (#818) ([541d5f9](https://github.com/cdimascio/express-openapi-validator/commit/541d5f9)), closes [#818](https://github.com/cdimascio/express-openapi-validator/issues/818) ## 5.0.2 (2023-02-11) -* v5.0.2 ([3b0e70c](https://github.com/cdimascio/express-openapi-validator/commit/3b0e70c)) -* v5.0.2 ([24ad64f](https://github.com/cdimascio/express-openapi-validator/commit/24ad64f)) -* fix: objects in form-data (#730) ([e5cb5d6](https://github.com/cdimascio/express-openapi-validator/commit/e5cb5d6)), closes [#730](https://github.com/cdimascio/express-openapi-validator/issues/730) - - +- v5.0.2 ([3b0e70c](https://github.com/cdimascio/express-openapi-validator/commit/3b0e70c)) +- v5.0.2 ([24ad64f](https://github.com/cdimascio/express-openapi-validator/commit/24ad64f)) +- fix: objects in form-data (#730) ([e5cb5d6](https://github.com/cdimascio/express-openapi-validator/commit/e5cb5d6)), closes [#730](https://github.com/cdimascio/express-openapi-validator/issues/730) ## 5.0.1 (2023-01-09) -* enhance SchemaObject type (#697) ([ca43431](https://github.com/cdimascio/express-openapi-validator/commit/ca43431)), closes [#697](https://github.com/cdimascio/express-openapi-validator/issues/697) -* implement github actions workflow (#793) ([d415425](https://github.com/cdimascio/express-openapi-validator/commit/d415425)), closes [#793](https://github.com/cdimascio/express-openapi-validator/issues/793) -* Update README.md ([33da583](https://github.com/cdimascio/express-openapi-validator/commit/33da583)) -* Update README.md ([ccd981a](https://github.com/cdimascio/express-openapi-validator/commit/ccd981a)) -* v5.0.1 ([de0708b](https://github.com/cdimascio/express-openapi-validator/commit/de0708b)) -* chore(deps): bump ansi-regex from 3.0.0 to 3.0.1 in /examples/9-nestjs (#738) ([60afead](https://github.com/cdimascio/express-openapi-validator/commit/60afead)), closes [#738](https://github.com/cdimascio/express-openapi-validator/issues/738) -* chore(deps): bump minimatch from 3.0.4 to 3.1.2 in /examples/1-standard (#764) ([0d04305](https://github.com/cdimascio/express-openapi-validator/commit/0d04305)), closes [#764](https://github.com/cdimascio/express-openapi-validator/issues/764) -* chore(deps): bump minimatch from 3.0.4 to 3.1.2 in /examples/9-nestjs (#760) ([c1cf0d9](https://github.com/cdimascio/express-openapi-validator/commit/c1cf0d9)), closes [#760](https://github.com/cdimascio/express-openapi-validator/issues/760) -* chore(deps): bump minimatch in /examples/2-standard-multiple-api-specs (#763) ([fe5e95e](https://github.com/cdimascio/express-openapi-validator/commit/fe5e95e)), closes [#763](https://github.com/cdimascio/express-openapi-validator/issues/763) -* chore(deps): bump minimatch in /examples/3-eov-operations (#766) ([3285f3a](https://github.com/cdimascio/express-openapi-validator/commit/3285f3a)), closes [#766](https://github.com/cdimascio/express-openapi-validator/issues/766) -* chore(deps): bump minimatch in /examples/4-eov-operations-babel (#768) ([5bcc81b](https://github.com/cdimascio/express-openapi-validator/commit/5bcc81b)), closes [#768](https://github.com/cdimascio/express-openapi-validator/issues/768) -* chore(deps): bump minimatch in /examples/5-custom-operation-resolver (#765) ([b5b03b3](https://github.com/cdimascio/express-openapi-validator/commit/b5b03b3)), closes [#765](https://github.com/cdimascio/express-openapi-validator/issues/765) -* chore(deps): bump minimatch in /examples/6-multi-file-spec (#767) ([e8f54e8](https://github.com/cdimascio/express-openapi-validator/commit/e8f54e8)), closes [#767](https://github.com/cdimascio/express-openapi-validator/issues/767) -* chore(deps): bump minimatch in /examples/7-response-date-serialization (#759) ([9b9433e](https://github.com/cdimascio/express-openapi-validator/commit/9b9433e)), closes [#759](https://github.com/cdimascio/express-openapi-validator/issues/759) -* chore(deps): bump minimatch in /examples/8-top-level-discriminator (#761) ([46afe5c](https://github.com/cdimascio/express-openapi-validator/commit/46afe5c)), closes [#761](https://github.com/cdimascio/express-openapi-validator/issues/761) -* chore(deps): bump minimist and @nestjs/cli in /examples/9-nestjs (#769) ([8d31f9a](https://github.com/cdimascio/express-openapi-validator/commit/8d31f9a)), closes [#769](https://github.com/cdimascio/express-openapi-validator/issues/769) -* chore(deps): bump terser from 5.7.2 to 5.14.2 in /examples/9-nestjs (#750) ([a83ff9d](https://github.com/cdimascio/express-openapi-validator/commit/a83ff9d)), closes [#750](https://github.com/cdimascio/express-openapi-validator/issues/750) -* fix: upgrade body-parser from 1.19.0 to 1.19.1 (#689) ([40736f8](https://github.com/cdimascio/express-openapi-validator/commit/40736f8)), closes [#689](https://github.com/cdimascio/express-openapi-validator/issues/689) -* fix: upgrade body-parser from 1.19.0 to 1.19.1 (#690) ([9038edc](https://github.com/cdimascio/express-openapi-validator/commit/9038edc)), closes [#690](https://github.com/cdimascio/express-openapi-validator/issues/690) -* fix: upgrade body-parser from 1.19.0 to 1.19.1 (#691) ([e64a91c](https://github.com/cdimascio/express-openapi-validator/commit/e64a91c)), closes [#691](https://github.com/cdimascio/express-openapi-validator/issues/691) - - +- enhance SchemaObject type (#697) ([ca43431](https://github.com/cdimascio/express-openapi-validator/commit/ca43431)), closes [#697](https://github.com/cdimascio/express-openapi-validator/issues/697) +- implement github actions workflow (#793) ([d415425](https://github.com/cdimascio/express-openapi-validator/commit/d415425)), closes [#793](https://github.com/cdimascio/express-openapi-validator/issues/793) +- Update README.md ([33da583](https://github.com/cdimascio/express-openapi-validator/commit/33da583)) +- Update README.md ([ccd981a](https://github.com/cdimascio/express-openapi-validator/commit/ccd981a)) +- v5.0.1 ([de0708b](https://github.com/cdimascio/express-openapi-validator/commit/de0708b)) +- chore(deps): bump ansi-regex from 3.0.0 to 3.0.1 in /examples/9-nestjs (#738) ([60afead](https://github.com/cdimascio/express-openapi-validator/commit/60afead)), closes [#738](https://github.com/cdimascio/express-openapi-validator/issues/738) +- chore(deps): bump minimatch from 3.0.4 to 3.1.2 in /examples/1-standard (#764) ([0d04305](https://github.com/cdimascio/express-openapi-validator/commit/0d04305)), closes [#764](https://github.com/cdimascio/express-openapi-validator/issues/764) +- chore(deps): bump minimatch from 3.0.4 to 3.1.2 in /examples/9-nestjs (#760) ([c1cf0d9](https://github.com/cdimascio/express-openapi-validator/commit/c1cf0d9)), closes [#760](https://github.com/cdimascio/express-openapi-validator/issues/760) +- chore(deps): bump minimatch in /examples/2-standard-multiple-api-specs (#763) ([fe5e95e](https://github.com/cdimascio/express-openapi-validator/commit/fe5e95e)), closes [#763](https://github.com/cdimascio/express-openapi-validator/issues/763) +- chore(deps): bump minimatch in /examples/3-eov-operations (#766) ([3285f3a](https://github.com/cdimascio/express-openapi-validator/commit/3285f3a)), closes [#766](https://github.com/cdimascio/express-openapi-validator/issues/766) +- chore(deps): bump minimatch in /examples/4-eov-operations-babel (#768) ([5bcc81b](https://github.com/cdimascio/express-openapi-validator/commit/5bcc81b)), closes [#768](https://github.com/cdimascio/express-openapi-validator/issues/768) +- chore(deps): bump minimatch in /examples/5-custom-operation-resolver (#765) ([b5b03b3](https://github.com/cdimascio/express-openapi-validator/commit/b5b03b3)), closes [#765](https://github.com/cdimascio/express-openapi-validator/issues/765) +- chore(deps): bump minimatch in /examples/6-multi-file-spec (#767) ([e8f54e8](https://github.com/cdimascio/express-openapi-validator/commit/e8f54e8)), closes [#767](https://github.com/cdimascio/express-openapi-validator/issues/767) +- chore(deps): bump minimatch in /examples/7-response-date-serialization (#759) ([9b9433e](https://github.com/cdimascio/express-openapi-validator/commit/9b9433e)), closes [#759](https://github.com/cdimascio/express-openapi-validator/issues/759) +- chore(deps): bump minimatch in /examples/8-top-level-discriminator (#761) ([46afe5c](https://github.com/cdimascio/express-openapi-validator/commit/46afe5c)), closes [#761](https://github.com/cdimascio/express-openapi-validator/issues/761) +- chore(deps): bump minimist and @nestjs/cli in /examples/9-nestjs (#769) ([8d31f9a](https://github.com/cdimascio/express-openapi-validator/commit/8d31f9a)), closes [#769](https://github.com/cdimascio/express-openapi-validator/issues/769) +- chore(deps): bump terser from 5.7.2 to 5.14.2 in /examples/9-nestjs (#750) ([a83ff9d](https://github.com/cdimascio/express-openapi-validator/commit/a83ff9d)), closes [#750](https://github.com/cdimascio/express-openapi-validator/issues/750) +- fix: upgrade body-parser from 1.19.0 to 1.19.1 (#689) ([40736f8](https://github.com/cdimascio/express-openapi-validator/commit/40736f8)), closes [#689](https://github.com/cdimascio/express-openapi-validator/issues/689) +- fix: upgrade body-parser from 1.19.0 to 1.19.1 (#690) ([9038edc](https://github.com/cdimascio/express-openapi-validator/commit/9038edc)), closes [#690](https://github.com/cdimascio/express-openapi-validator/issues/690) +- fix: upgrade body-parser from 1.19.0 to 1.19.1 (#691) ([e64a91c](https://github.com/cdimascio/express-openapi-validator/commit/e64a91c)), closes [#691](https://github.com/cdimascio/express-openapi-validator/issues/691) ## 5.0.0 (2022-11-19) -* Fix #699 serdes missed on items in a collection, with tests. (#704) ([77bc4ae](https://github.com/cdimascio/express-openapi-validator/commit/77bc4ae)), closes [#699](https://github.com/cdimascio/express-openapi-validator/issues/699) [#704](https://github.com/cdimascio/express-openapi-validator/issues/704) -* fixed router parameters (#762) ([2bbed6f](https://github.com/cdimascio/express-openapi-validator/commit/2bbed6f)), closes [#762](https://github.com/cdimascio/express-openapi-validator/issues/762) -* v5.0.0 with ajv8 ([1d1d71b](https://github.com/cdimascio/express-openapi-validator/commit/1d1d71b)) - - +- Fix #699 serdes missed on items in a collection, with tests. (#704) ([77bc4ae](https://github.com/cdimascio/express-openapi-validator/commit/77bc4ae)), closes [#699](https://github.com/cdimascio/express-openapi-validator/issues/699) [#704](https://github.com/cdimascio/express-openapi-validator/issues/704) +- fixed router parameters (#762) ([2bbed6f](https://github.com/cdimascio/express-openapi-validator/commit/2bbed6f)), closes [#762](https://github.com/cdimascio/express-openapi-validator/issues/762) +- v5.0.0 with ajv8 ([1d1d71b](https://github.com/cdimascio/express-openapi-validator/commit/1d1d71b)) ## 4.13.8 (2022-05-30) -* Bump AJV to v8 (#713) ([2b27332](https://github.com/cdimascio/express-openapi-validator/commit/2b27332)), closes [#713](https://github.com/cdimascio/express-openapi-validator/issues/713) -* Bump multer to version that removes dicer as sub-dependency (#739) ([6501a62](https://github.com/cdimascio/express-openapi-validator/commit/6501a62)), closes [#739](https://github.com/cdimascio/express-openapi-validator/issues/739) -* update ansi-regex ([6448f45](https://github.com/cdimascio/express-openapi-validator/commit/6448f45)) -* Update README.md ([c954b4b](https://github.com/cdimascio/express-openapi-validator/commit/c954b4b)) -* v4.14.0-beta.1 ([369a4a6](https://github.com/cdimascio/express-openapi-validator/commit/369a4a6)) -* v4.14.0-beta.2 ([1706538](https://github.com/cdimascio/express-openapi-validator/commit/1706538)) -* chore(deps): bump ansi-regex in /examples/2-standard-multiple-api-specs (#727) ([3e803b5](https://github.com/cdimascio/express-openapi-validator/commit/3e803b5)), closes [#727](https://github.com/cdimascio/express-openapi-validator/issues/727) -* chore(deps): bump ansi-regex in /examples/3-eov-operations (#726) ([aba3cd0](https://github.com/cdimascio/express-openapi-validator/commit/aba3cd0)), closes [#726](https://github.com/cdimascio/express-openapi-validator/issues/726) -* chore(deps): bump ansi-regex in /examples/5-custom-operation-resolver (#725) ([2bf250e](https://github.com/cdimascio/express-openapi-validator/commit/2bf250e)), closes [#725](https://github.com/cdimascio/express-openapi-validator/issues/725) -* chore(deps): bump ansi-regex in /examples/6-multi-file-spec (#723) ([e29c1eb](https://github.com/cdimascio/express-openapi-validator/commit/e29c1eb)), closes [#723](https://github.com/cdimascio/express-openapi-validator/issues/723) -* chore(deps): bump ansi-regex in /examples/7-response-date-serialization (#722) ([acdae50](https://github.com/cdimascio/express-openapi-validator/commit/acdae50)), closes [#722](https://github.com/cdimascio/express-openapi-validator/issues/722) -* chore(deps): bump ansi-regex in /examples/8-top-level-discriminator (#719) ([45059a6](https://github.com/cdimascio/express-openapi-validator/commit/45059a6)), closes [#719](https://github.com/cdimascio/express-openapi-validator/issues/719) -* chore(deps): bump follow-redirects in /examples/9-nestjs (#705) ([15e91aa](https://github.com/cdimascio/express-openapi-validator/commit/15e91aa)), closes [#705](https://github.com/cdimascio/express-openapi-validator/issues/705) -* chore(deps): bump minimist from 1.2.5 to 1.2.6 in /examples/1-standard (#714) ([1eecf40](https://github.com/cdimascio/express-openapi-validator/commit/1eecf40)), closes [#714](https://github.com/cdimascio/express-openapi-validator/issues/714) -* chore(deps): bump minimist in /examples/2-standard-multiple-api-specs (#716) ([6f6ea71](https://github.com/cdimascio/express-openapi-validator/commit/6f6ea71)), closes [#716](https://github.com/cdimascio/express-openapi-validator/issues/716) -* chore(deps): bump minimist in /examples/3-eov-operations (#715) ([3f6cb37](https://github.com/cdimascio/express-openapi-validator/commit/3f6cb37)), closes [#715](https://github.com/cdimascio/express-openapi-validator/issues/715) -* chore(deps): bump minimist in /examples/4-eov-operations-babel (#717) ([6b90f35](https://github.com/cdimascio/express-openapi-validator/commit/6b90f35)), closes [#717](https://github.com/cdimascio/express-openapi-validator/issues/717) -* chore(deps): bump minimist in /examples/5-custom-operation-resolver (#718) ([acc3f33](https://github.com/cdimascio/express-openapi-validator/commit/acc3f33)), closes [#718](https://github.com/cdimascio/express-openapi-validator/issues/718) -* chore(deps): bump minimist in /examples/6-multi-file-spec (#724) ([15814ba](https://github.com/cdimascio/express-openapi-validator/commit/15814ba)), closes [#724](https://github.com/cdimascio/express-openapi-validator/issues/724) -* chore(deps): bump minimist in /examples/7-response-date-serialization (#721) ([ff63618](https://github.com/cdimascio/express-openapi-validator/commit/ff63618)), closes [#721](https://github.com/cdimascio/express-openapi-validator/issues/721) -* chore(deps): bump minimist in /examples/8-top-level-discriminator (#720) ([a23a09f](https://github.com/cdimascio/express-openapi-validator/commit/a23a09f)), closes [#720](https://github.com/cdimascio/express-openapi-validator/issues/720) -* chore(deps): bump node-fetch from 2.6.1 to 2.6.7 in /examples/9-nestjs (#711) ([87bb6df](https://github.com/cdimascio/express-openapi-validator/commit/87bb6df)), closes [#711](https://github.com/cdimascio/express-openapi-validator/issues/711) - - +- Bump AJV to v8 (#713) ([2b27332](https://github.com/cdimascio/express-openapi-validator/commit/2b27332)), closes [#713](https://github.com/cdimascio/express-openapi-validator/issues/713) +- Bump multer to version that removes dicer as sub-dependency (#739) ([6501a62](https://github.com/cdimascio/express-openapi-validator/commit/6501a62)), closes [#739](https://github.com/cdimascio/express-openapi-validator/issues/739) +- update ansi-regex ([6448f45](https://github.com/cdimascio/express-openapi-validator/commit/6448f45)) +- Update README.md ([c954b4b](https://github.com/cdimascio/express-openapi-validator/commit/c954b4b)) +- v4.14.0-beta.1 ([369a4a6](https://github.com/cdimascio/express-openapi-validator/commit/369a4a6)) +- v4.14.0-beta.2 ([1706538](https://github.com/cdimascio/express-openapi-validator/commit/1706538)) +- chore(deps): bump ansi-regex in /examples/2-standard-multiple-api-specs (#727) ([3e803b5](https://github.com/cdimascio/express-openapi-validator/commit/3e803b5)), closes [#727](https://github.com/cdimascio/express-openapi-validator/issues/727) +- chore(deps): bump ansi-regex in /examples/3-eov-operations (#726) ([aba3cd0](https://github.com/cdimascio/express-openapi-validator/commit/aba3cd0)), closes [#726](https://github.com/cdimascio/express-openapi-validator/issues/726) +- chore(deps): bump ansi-regex in /examples/5-custom-operation-resolver (#725) ([2bf250e](https://github.com/cdimascio/express-openapi-validator/commit/2bf250e)), closes [#725](https://github.com/cdimascio/express-openapi-validator/issues/725) +- chore(deps): bump ansi-regex in /examples/6-multi-file-spec (#723) ([e29c1eb](https://github.com/cdimascio/express-openapi-validator/commit/e29c1eb)), closes [#723](https://github.com/cdimascio/express-openapi-validator/issues/723) +- chore(deps): bump ansi-regex in /examples/7-response-date-serialization (#722) ([acdae50](https://github.com/cdimascio/express-openapi-validator/commit/acdae50)), closes [#722](https://github.com/cdimascio/express-openapi-validator/issues/722) +- chore(deps): bump ansi-regex in /examples/8-top-level-discriminator (#719) ([45059a6](https://github.com/cdimascio/express-openapi-validator/commit/45059a6)), closes [#719](https://github.com/cdimascio/express-openapi-validator/issues/719) +- chore(deps): bump follow-redirects in /examples/9-nestjs (#705) ([15e91aa](https://github.com/cdimascio/express-openapi-validator/commit/15e91aa)), closes [#705](https://github.com/cdimascio/express-openapi-validator/issues/705) +- chore(deps): bump minimist from 1.2.5 to 1.2.6 in /examples/1-standard (#714) ([1eecf40](https://github.com/cdimascio/express-openapi-validator/commit/1eecf40)), closes [#714](https://github.com/cdimascio/express-openapi-validator/issues/714) +- chore(deps): bump minimist in /examples/2-standard-multiple-api-specs (#716) ([6f6ea71](https://github.com/cdimascio/express-openapi-validator/commit/6f6ea71)), closes [#716](https://github.com/cdimascio/express-openapi-validator/issues/716) +- chore(deps): bump minimist in /examples/3-eov-operations (#715) ([3f6cb37](https://github.com/cdimascio/express-openapi-validator/commit/3f6cb37)), closes [#715](https://github.com/cdimascio/express-openapi-validator/issues/715) +- chore(deps): bump minimist in /examples/4-eov-operations-babel (#717) ([6b90f35](https://github.com/cdimascio/express-openapi-validator/commit/6b90f35)), closes [#717](https://github.com/cdimascio/express-openapi-validator/issues/717) +- chore(deps): bump minimist in /examples/5-custom-operation-resolver (#718) ([acc3f33](https://github.com/cdimascio/express-openapi-validator/commit/acc3f33)), closes [#718](https://github.com/cdimascio/express-openapi-validator/issues/718) +- chore(deps): bump minimist in /examples/6-multi-file-spec (#724) ([15814ba](https://github.com/cdimascio/express-openapi-validator/commit/15814ba)), closes [#724](https://github.com/cdimascio/express-openapi-validator/issues/724) +- chore(deps): bump minimist in /examples/7-response-date-serialization (#721) ([ff63618](https://github.com/cdimascio/express-openapi-validator/commit/ff63618)), closes [#721](https://github.com/cdimascio/express-openapi-validator/issues/721) +- chore(deps): bump minimist in /examples/8-top-level-discriminator (#720) ([a23a09f](https://github.com/cdimascio/express-openapi-validator/commit/a23a09f)), closes [#720](https://github.com/cdimascio/express-openapi-validator/issues/720) +- chore(deps): bump node-fetch from 2.6.1 to 2.6.7 in /examples/9-nestjs (#711) ([87bb6df](https://github.com/cdimascio/express-openapi-validator/commit/87bb6df)), closes [#711](https://github.com/cdimascio/express-openapi-validator/issues/711) ## 4.13.7 (2022-03-27) -* migrate README to wiki ([4887ba5](https://github.com/cdimascio/express-openapi-validator/commit/4887ba5)) -* Update README ([13b26d6](https://github.com/cdimascio/express-openapi-validator/commit/13b26d6)) - - - +- migrate README to wiki ([4887ba5](https://github.com/cdimascio/express-openapi-validator/commit/4887ba5)) +- Update README ([13b26d6](https://github.com/cdimascio/express-openapi-validator/commit/13b26d6)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 5d506909..ee9d2140 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation. Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting ## Our Responsibilities diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd88b86d..1a8368fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,7 @@ Contributors are welcome! See something that needs fixing? Got an idea for a new feature? Contribute a [Pull Request](#Create-a-Pull-Request)! ## Easy path to contribution + Click the Gitpod badge to setup a ready to code dev env in the cloud. [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/cdimascio/express-openapi-validator) @@ -26,7 +27,7 @@ Click the Gitpod badge to setup a ready to code dev env in the cloud. # From the project directory, run npm i ``` - + Be [Create a Pull Request](#create-a-pull-request) once you've written you code. ## Run the tests @@ -56,11 +57,12 @@ Be [Create a Pull Request](#create-a-pull-request) once you've written you code. 3. Make a new branch 4. Make your changes 5. Push it back to your repo -6. From the Github UI, Click the Compare & pull request button +6. From the Github UI, Click the Compare & pull request button NOTE: this button will be present for some period of time after 5. If the button no longer there, Create pull request and select the branches manually) -6. From the Github UI, Click Create pull request to open a new pull request -7. Detailed steps with example here: + +7. From the Github UI, Click Create pull request to open a new pull request +8. Detailed steps with example here: ## Project structure @@ -74,12 +76,13 @@ Reach out on [gitter](https://gitter.im/cdimascio-oss/community). We're happy to help! ## FAQ + **Q:** I don't have permission to create a branch and I can't push my changes **A:** You cannot directly create a branch in this repo. Instead [Create a Pull Request](#create-a-pull-request) +## Misc -## Misc If you are not a project, you may ignore this section ### Generate Change Log diff --git a/README.md b/README.md index a73489f3..0735dd78 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ docs. - 🎈 file upload **Docs:** + - 📖 [documentation](https://cdimascio.github.io/express-openapi-validator-documentation/) [![GitHub stars](https://img.shields.io/github/stars/cdimascio/express-openapi-validator.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/cdimascio/express-openapi-validator/stargazers/) [![Twitter URL](https://img.shields.io/twitter/url/https/github.com/cdimascio/express-openapi-validator.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20express-openapi-validator%20by%20%40CarmineDiMascio%20https%3A%2F%2Fgithub.com%2Fcdimascio%2Fexpress-openapi-validator%20%F0%9F%91%8D) @@ -83,7 +84,7 @@ _**Important:** Ensure express is configured with all relevant body parsers. Bod See the [doc](https://cdimascio.github.io/express-openapi-validator-documentation/) for complete documenation -_deprecated_ [legacy doc](https://github.com/cdimascio/express-openapi-validator/wiki) +_deprecated_ [legacy doc](https://github.com/cdimascio/express-openapi-validator/wiki) ## License diff --git a/_config.yml b/_config.yml index c4192631..277f1f2c 100644 --- a/_config.yml +++ b/_config.yml @@ -1 +1 @@ -theme: jekyll-theme-cayman \ No newline at end of file +theme: jekyll-theme-cayman diff --git a/examples/1-standard/services/index.js b/examples/1-standard/services/index.js index 47cef69a..d7822814 100644 --- a/examples/1-standard/services/index.js +++ b/examples/1-standard/services/index.js @@ -24,11 +24,11 @@ module.exports.Pets = class { this.id = 4; } findAll({ type, limit }) { - return data.filter(d => d.type === type).slice(0, limit); + return data.filter((d) => d.type === type).slice(0, limit); } findById(id) { - return data.filter(p => p.id === id)[0]; + return data.filter((p) => p.id === id)[0]; } create(pet) { @@ -38,6 +38,6 @@ module.exports.Pets = class { } delete(id) { - return data.filter(e => e.id !== id); + return data.filter((e) => e.id !== id); } }; diff --git a/examples/3-eov-operations/routes/pets.js b/examples/3-eov-operations/routes/pets.js index 0f8c89a3..354f5f9a 100644 --- a/examples/3-eov-operations/routes/pets.js +++ b/examples/3-eov-operations/routes/pets.js @@ -23,7 +23,7 @@ module.exports = { console.log(req.files); res.status(201).json({ - files_metadata: req.files.map(f => ({ + files_metadata: req.files.map((f) => ({ originalname: f.originalname, encoding: f.encoding, mimetype: f.mimetype, diff --git a/examples/3-eov-operations/services/index.js b/examples/3-eov-operations/services/index.js index 1c7afd6e..d7822814 100644 --- a/examples/3-eov-operations/services/index.js +++ b/examples/3-eov-operations/services/index.js @@ -24,11 +24,11 @@ module.exports.Pets = class { this.id = 4; } findAll({ type, limit }) { - return data.filter(d => d.type === type).slice(0, limit); + return data.filter((d) => d.type === type).slice(0, limit); } findById(id) { - return data.filter(p => p.id === id)[0]; + return data.filter((p) => p.id === id)[0]; } create(pet) { @@ -38,6 +38,6 @@ module.exports.Pets = class { } delete(id) { - return data.filter(e => e.id !== id); + return data.filter((e) => e.id !== id); } -} +}; diff --git a/examples/4-eov-operations-babel/.babelrc b/examples/4-eov-operations-babel/.babelrc index 022790fc..394c5435 100644 --- a/examples/4-eov-operations-babel/.babelrc +++ b/examples/4-eov-operations-babel/.babelrc @@ -1,12 +1,12 @@ { - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "current" - } + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "node": "current" } - ] + } ] - } \ No newline at end of file + ] +} diff --git a/examples/4-eov-operations-babel/src/api.yaml b/examples/4-eov-operations-babel/src/api.yaml index 5f8906e4..9c641f3d 100644 --- a/examples/4-eov-operations-babel/src/api.yaml +++ b/examples/4-eov-operations-babel/src/api.yaml @@ -15,8 +15,8 @@ paths: description: | ping then pong! # use operationId, (x-eov-operation-id is optional. it can be used in place of operationId or to override it) - operationId: ping - x-eov-operation-handler: routes/ping + operationId: ping + x-eov-operation-handler: routes/ping responses: '200': description: OK diff --git a/examples/4-eov-operations-babel/src/routes/pets.js b/examples/4-eov-operations-babel/src/routes/pets.js index 5827b1ac..053ee158 100644 --- a/examples/4-eov-operations-babel/src/routes/pets.js +++ b/examples/4-eov-operations-babel/src/routes/pets.js @@ -23,7 +23,7 @@ export default { console.log(req.files); res.status(201).json({ - files_metadata: req.files.map(f => ({ + files_metadata: req.files.map((f) => ({ originalname: f.originalname, encoding: f.encoding, mimetype: f.mimetype, diff --git a/examples/4-eov-operations-babel/src/services/index.js b/examples/4-eov-operations-babel/src/services/index.js index 1c7afd6e..d7822814 100644 --- a/examples/4-eov-operations-babel/src/services/index.js +++ b/examples/4-eov-operations-babel/src/services/index.js @@ -24,11 +24,11 @@ module.exports.Pets = class { this.id = 4; } findAll({ type, limit }) { - return data.filter(d => d.type === type).slice(0, limit); + return data.filter((d) => d.type === type).slice(0, limit); } findById(id) { - return data.filter(p => p.id === id)[0]; + return data.filter((p) => p.id === id)[0]; } create(pet) { @@ -38,6 +38,6 @@ module.exports.Pets = class { } delete(id) { - return data.filter(e => e.id !== id); + return data.filter((e) => e.id !== id); } -} +}; diff --git a/examples/5-custom-operation-resolver/README.md b/examples/5-custom-operation-resolver/README.md index f55663ab..ade73ffc 100644 --- a/examples/5-custom-operation-resolver/README.md +++ b/examples/5-custom-operation-resolver/README.md @@ -29,7 +29,7 @@ curl http://localhost:3000/v1/pets ## [Example Express API Server: with custom operation resolver](https://github.com/cdimascio/express-openapi-validator/tree/master/examples/5-custom-operation-resolver) -By default, when you configure `operationHandlers` to be the base path to your operation handler files, we use `operationId`, `x-eov-operation-id` and `x-eov-operation-handler` to determine what request handler should be used during routing. +By default, when you configure `operationHandlers` to be the base path to your operation handler files, we use `operationId`, `x-eov-operation-id` and `x-eov-operation-handler` to determine what request handler should be used during routing. If you ever want _FULL_ control over how that resolution happens (e.g. you want to use your own extended attributes or simply rely on `operationId`), then here's how you can accomplish that following an example where our `operationId` becomes a template that follows `{module}.{function}`. @@ -58,16 +58,20 @@ new OpenApiValidator({ } }); ``` + - Next, use `operationId` to specify the id of opeartion handler to invoke. + ```yaml /pets: get: - # This means our resolver will look for a file named "pets.js" at our - # configured base path and will return an export named "list" from + # This means our resolver will look for a file named "pets.js" at our + # configured base path and will return an export named "list" from # that module as the Express RequestHandler. operationId: pets.list ``` + - Finally, create the express handler module e.g. `routes/pets.js` + ```javascript module.exports = { // the express handler implementation for the pets collection diff --git a/examples/5-custom-operation-resolver/api.yaml b/examples/5-custom-operation-resolver/api.yaml index 8b3dd535..c9e1e721 100644 --- a/examples/5-custom-operation-resolver/api.yaml +++ b/examples/5-custom-operation-resolver/api.yaml @@ -14,7 +14,7 @@ paths: get: description: | ping then pong! - operationId: ping.ping + operationId: ping.ping responses: '200': description: OK diff --git a/examples/5-custom-operation-resolver/routes/pets.js b/examples/5-custom-operation-resolver/routes/pets.js index dd51ead9..cd0e800b 100644 --- a/examples/5-custom-operation-resolver/routes/pets.js +++ b/examples/5-custom-operation-resolver/routes/pets.js @@ -23,7 +23,7 @@ module.exports = { console.log(req.files); res.status(201).json({ - files_metadata: req.files.map(f => ({ + files_metadata: req.files.map((f) => ({ originalname: f.originalname, encoding: f.encoding, mimetype: f.mimetype, diff --git a/examples/5-custom-operation-resolver/services/index.js b/examples/5-custom-operation-resolver/services/index.js index 1c7afd6e..d7822814 100644 --- a/examples/5-custom-operation-resolver/services/index.js +++ b/examples/5-custom-operation-resolver/services/index.js @@ -24,11 +24,11 @@ module.exports.Pets = class { this.id = 4; } findAll({ type, limit }) { - return data.filter(d => d.type === type).slice(0, limit); + return data.filter((d) => d.type === type).slice(0, limit); } findById(id) { - return data.filter(p => p.id === id)[0]; + return data.filter((p) => p.id === id)[0]; } create(pet) { @@ -38,6 +38,6 @@ module.exports.Pets = class { } delete(id) { - return data.filter(e => e.id !== id); + return data.filter((e) => e.id !== id); } -} +}; diff --git a/examples/6-multi-file-spec/ems.yaml b/examples/6-multi-file-spec/ems.yaml index 2a11f7a2..bcdc83f2 100644 --- a/examples/6-multi-file-spec/ems.yaml +++ b/examples/6-multi-file-spec/ems.yaml @@ -93,4 +93,4 @@ components: content: application/json: schema: - $ref: 'schemas/queryrequest.yaml' \ No newline at end of file + $ref: 'schemas/queryrequest.yaml' diff --git a/examples/6-multi-file-spec/schemas/queries.yaml b/examples/6-multi-file-spec/schemas/queries.yaml index 4ed219d8..9b107d61 100644 --- a/examples/6-multi-file-spec/schemas/queries.yaml +++ b/examples/6-multi-file-spec/schemas/queries.yaml @@ -1,3 +1,3 @@ type: array items: - $ref: 'queryrequest.yaml' \ No newline at end of file + $ref: 'queryrequest.yaml' diff --git a/examples/6-multi-file-spec/schemas/queryrequest.yaml b/examples/6-multi-file-spec/schemas/queryrequest.yaml index c79936e5..dabd68ce 100644 --- a/examples/6-multi-file-spec/schemas/queryrequest.yaml +++ b/examples/6-multi-file-spec/schemas/queryrequest.yaml @@ -7,4 +7,4 @@ properties: type: string folder: type: string - nullable: true \ No newline at end of file + nullable: true diff --git a/examples/6-multi-file-spec/schemas/queryrequests.yaml b/examples/6-multi-file-spec/schemas/queryrequests.yaml index 8d97ec5c..58c1bfaa 100644 --- a/examples/6-multi-file-spec/schemas/queryrequests.yaml +++ b/examples/6-multi-file-spec/schemas/queryrequests.yaml @@ -3,4 +3,4 @@ properties: list: type: array items: - type: string \ No newline at end of file + type: string diff --git a/examples/7-response-date-serialization/api.yaml b/examples/7-response-date-serialization/api.yaml index 1f3cbd98..840d3b8c 100644 --- a/examples/7-response-date-serialization/api.yaml +++ b/examples/7-response-date-serialization/api.yaml @@ -34,7 +34,7 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - + components: schemas: Date: @@ -43,8 +43,7 @@ components: User: type: object properties: - id: + id: type: number created_at: - $ref: "#/components/schemas/Date" - \ No newline at end of file + $ref: '#/components/schemas/Date' diff --git a/launch.json b/launch.json index ec4d7e8a..86b7ca51 100644 --- a/launch.json +++ b/launch.json @@ -4,7 +4,6 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { "name": "Attach", "port": 9229, diff --git a/package-lock.json b/package-lock.json index 54c7ecac..8f8b196d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "morgan": "^1.10.0", "nodemon": "^3.1.3", "nyc": "^15.1.0", - "prettier": "^2.8.8", + "prettier": "^3.3.0", "rimraf": "^5.0.7", "source-map-support": "0.5.21", "supertest": "^6.3.4", @@ -5474,16 +5474,16 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.0.tgz", + "integrity": "sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==", "dev": true, "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" diff --git a/package.json b/package.json index 0187e825..5fab6e3e 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "compile": "rimraf dist && tsc", "compile:release": "rimraf dist && tsc --sourceMap false", + "format": "prettier -w .", "test": "mocha -r source-map-support/register -r ts-node/register --files --recursive -R spec test/**/*.spec.ts", "test:debug": "mocha -r source-map-support/register -r ts-node/register --inspect-brk --files --recursive test/**/*.spec.ts", "test:coverage": "nyc mocha -r source-map-support/register -r ts-node/register --recursive test/**/*.spec.ts", @@ -66,7 +67,7 @@ "morgan": "^1.10.0", "nodemon": "^3.1.3", "nyc": "^15.1.0", - "prettier": "^2.8.8", + "prettier": "^3.3.0", "rimraf": "^5.0.7", "source-map-support": "0.5.21", "supertest": "^6.3.4", diff --git a/src/framework/ajv/index.ts b/src/framework/ajv/index.ts index 5dda5ffa..fa7b4791 100644 --- a/src/framework/ajv/index.ts +++ b/src/framework/ajv/index.ts @@ -37,11 +37,11 @@ function createAjv( }); // Clean openApiSpec - traverse(openApiSpec, { allKeys: true }, (schema => { + traverse(openApiSpec, { allKeys: true }, ((schema) => { if ('x-stoplight' in schema) { - delete schema['x-stoplight'] + delete schema['x-stoplight']; } - })) + })); // Formats will overwrite existing validation, // so set in order of least->most important. @@ -117,12 +117,15 @@ function createAjv( compile: (sch, p, it) => { if (sch) { const validate: DataValidateFunction = (data, ctx) => { - if (options.removeAdditional == true || options.removeAdditional == "all" || options.removeAdditional == "failing") { + if ( + options.removeAdditional == true || + options.removeAdditional == 'all' || + options.removeAdditional == 'failing' + ) { // Remove readonly properties in request delete ctx.parentData[ctx.parentDataProperty]; return true; - } - else { + } else { const isValid = data == null; if (!isValid) { validate.errors = [ @@ -185,12 +188,15 @@ function createAjv( compile: (sch, p, it) => { if (sch) { const validate: DataValidateFunction = (data, ctx) => { - if (options.removeAdditional == true || options.removeAdditional == "all" || options.removeAdditional == "failing") { + if ( + options.removeAdditional == true || + options.removeAdditional == 'all' || + options.removeAdditional == 'failing' + ) { // Remove readonly properties in request delete ctx.parentData[ctx.parentDataProperty]; return true; - } - else { + } else { const isValid = data == null; if (!isValid) { validate.errors = [ @@ -199,7 +205,7 @@ function createAjv( instancePath: ctx.instancePath, schemaPath: it.schemaPath.str, message: `is write-only`, - params: {writeOnly: ctx.parentDataProperty}, + params: { writeOnly: ctx.parentDataProperty }, }, ]; } diff --git a/src/framework/base.path.ts b/src/framework/base.path.ts index f67dbdd2..0327f2f3 100644 --- a/src/framework/base.path.ts +++ b/src/framework/base.path.ts @@ -20,9 +20,9 @@ export class BasePath { let urlPath = this.findUrlPath(server.url); if (/:/.test(urlPath)) { // escape colons as (any at this point) do not signify express route params. - // this is an openapi base path, thus route params are wrapped in braces {}, + // this is an openapi base path, thus route params are wrapped in braces {}, // not prefixed by colon : (like express route params) - urlPath = urlPath.replace(':','\\:') + urlPath = urlPath.replace(':', '\\:'); } if (/{\w+}/.test(urlPath)) { // has variable that we need to check out @@ -47,7 +47,7 @@ export class BasePath { if (!servers) { return [new BasePath({ url: '' })]; } - return servers.map(server => new BasePath(server)); + return servers.map((server) => new BasePath(server)); } public hasVariables(): boolean { @@ -61,7 +61,7 @@ export class BasePath { // ignore variables that are not part of path params const allParams = Object.entries(this.variables).reduce((acc, v) => { const [key, value] = v; - const params = value.enum.map(e => ({ + const params = value.enum.map((e) => ({ [key]: e, })); acc.push(params); @@ -79,12 +79,12 @@ export class BasePath { } private findUrlPath(u: string): string { - const findColonSlashSlash = p => { + const findColonSlashSlash = (p) => { const r = /:\/\//.exec(p); if (r) return r.index; return -1; }; - const findFirstSlash = p => { + const findFirstSlash = (p) => { const r = /\//.exec(p); if (r) return r.index; return -1; diff --git a/src/framework/base.serdes.ts b/src/framework/base.serdes.ts index cd65ae48..57eb2a8f 100644 --- a/src/framework/base.serdes.ts +++ b/src/framework/base.serdes.ts @@ -1,26 +1,23 @@ import { SerDes, SerDesSingleton } from './types'; -export const dateTime : SerDesSingleton = new SerDesSingleton({ - format : 'date-time', +export const dateTime: SerDesSingleton = new SerDesSingleton({ + format: 'date-time', serialize: (d: Date) => { return d && d.toISOString(); }, deserialize: (s: string) => { return new Date(s); - } + }, }); -export const date : SerDesSingleton = new SerDesSingleton({ - format : 'date', +export const date: SerDesSingleton = new SerDesSingleton({ + format: 'date', serialize: (d: Date) => { return d && d.toISOString().split('T')[0]; }, deserialize: (s: string) => { return new Date(s); - } + }, }); -export const defaultSerDes : SerDes[] = [ - date.serializer, - dateTime.serializer -]; +export const defaultSerDes: SerDes[] = [date.serializer, dateTime.serializer]; diff --git a/src/framework/json.ref.schema.ts b/src/framework/json.ref.schema.ts index 8b137891..e69de29b 100644 --- a/src/framework/json.ref.schema.ts +++ b/src/framework/json.ref.schema.ts @@ -1 +0,0 @@ - diff --git a/src/framework/modded.express.mung.ts b/src/framework/modded.express.mung.ts index fc6c0a51..6c774880 100644 --- a/src/framework/modded.express.mung.ts +++ b/src/framework/modded.express.mung.ts @@ -23,7 +23,7 @@ mung.onError = (err, req, res, next) => { }; mung.json = function json(fn, options) { - return function(req, res, next) { + return function (req, res, next) { let original = res.json; options = options || {}; let mungError = options.mungError; @@ -63,7 +63,7 @@ mung.json = function json(fn, options) { }; mung.jsonAsync = function json(fn, options) { - return function(req, res, next) { + return function (req, res, next) { let original = res.json; options = options || {}; let mungError = options.mungError; @@ -75,7 +75,7 @@ mung.jsonAsync = function json(fn, options) { if (!mungError && res.statusCode >= 400) return original.call(this, json); try { fn(json, req, res) - .then(json => { + .then((json) => { if (res.headersSent) return; // If null, then 204 No Content @@ -89,7 +89,7 @@ mung.jsonAsync = function json(fn, options) { return original.call(this, json); }) - .catch(e => mung.onError(e, req, res, next)); + .catch((e) => mung.onError(e, req, res, next)); } catch (e) { mung.onError(e, req, res, next); } @@ -103,7 +103,7 @@ mung.jsonAsync = function json(fn, options) { }; mung.headers = function headers(fn) { - return function(req, res, next) { + return function (req, res, next) { let original = res.end; function headers_hook() { res.end = original; @@ -129,9 +129,9 @@ mung.headers = function headers(fn) { }; mung.headersAsync = function headersAsync(fn) { - return function(req, res, next) { + return function (req, res, next) { let original = res.end; - let onError = e => { + let onError = (e) => { res.end = original; return mung.onError(e, req, res, next); }; @@ -146,7 +146,7 @@ mung.headersAsync = function headersAsync(fn) { if (res.headersSent) return; original.apply(this, args); }) - .catch(e => onError(e)); + .catch((e) => onError(e)); } catch (e) { onError(e); } @@ -158,7 +158,7 @@ mung.headersAsync = function headersAsync(fn) { }; mung.write = function write(fn, options: any = {}) { - return function(req, res, next) { + return function (req, res, next) { const original = res.write; const mungError = options.mungError; diff --git a/src/framework/openapi.context.ts b/src/framework/openapi.context.ts index 8d6fc23f..8932ea8c 100644 --- a/src/framework/openapi.context.ts +++ b/src/framework/openapi.context.ts @@ -42,7 +42,9 @@ export class OpenApiContext { } public shouldIgnoreRoute(path: string) { - return typeof this.ignorePaths === 'function' ? this.ignorePaths(path) : this.ignorePaths?.test(path); + return typeof this.ignorePaths === 'function' + ? this.ignorePaths(path) + : this.ignorePaths?.test(path); } public routePair(route: string): RoutePair { diff --git a/src/framework/openapi.spec.loader.ts b/src/framework/openapi.spec.loader.ts index 3ccb1486..7b0e17fe 100644 --- a/src/framework/openapi.spec.loader.ts +++ b/src/framework/openapi.spec.loader.ts @@ -69,7 +69,10 @@ export class OpenApiSpecLoader { continue; } const pathParams = new Set(); - const parameters = [...schema.parameters ?? [], ...methods.parameters ?? []] + const parameters = [ + ...(schema.parameters ?? []), + ...(methods.parameters ?? []), + ]; for (const param of parameters) { if (param.in === 'path') { pathParams.add(param.name); @@ -101,7 +104,7 @@ export class OpenApiSpecLoader { apiDoc, basePaths, routes, - serial + serial, }; } diff --git a/src/framework/types.ts b/src/framework/types.ts index 9d4d0c65..de76d0b1 100644 --- a/src/framework/types.ts +++ b/src/framework/types.ts @@ -44,7 +44,7 @@ export interface Options extends ajv.Options { ajvFormats?: FormatsPluginOptions; } -export interface RequestValidatorOptions extends Options, ValidateRequestOpts { } +export interface RequestValidatorOptions extends Options, ValidateRequestOpts {} export type ValidateRequestOpts = { allowUnknownQueryParameters?: boolean; @@ -107,29 +107,36 @@ export class SerDesSingleton implements SerDes { serialize: param.serialize, }; } -}; +} export type SerDesMap = { - [format: string]: SerDes + [format: string]: SerDes; }; -type Primitive = undefined | null | boolean | string | number | Function +type Primitive = undefined | null | boolean | string | number | Function; -type Immutable = - T extends Primitive ? T : - T extends Array ? ReadonlyArray : - T extends Map ? ReadonlyMap : Readonly +type Immutable = T extends Primitive + ? T + : T extends Array + ? ReadonlyArray + : T extends Map + ? ReadonlyMap + : Readonly; -type DeepImmutable = - T extends Primitive ? T : - T extends Array ? DeepImmutableArray : - T extends Map ? DeepImmutableMap : DeepImmutableObject +type DeepImmutable = T extends Primitive + ? T + : T extends Array + ? DeepImmutableArray + : T extends Map + ? DeepImmutableMap + : DeepImmutableObject; interface DeepImmutableArray extends ReadonlyArray> {} -interface DeepImmutableMap extends ReadonlyMap, DeepImmutable> {} +interface DeepImmutableMap + extends ReadonlyMap, DeepImmutable> {} type DeepImmutableObject = { - readonly [K in keyof T]: DeepImmutable -} + readonly [K in keyof T]: DeepImmutable; +}; export interface OpenApiValidatorOpts { apiSpec: DeepImmutable | string; @@ -263,7 +270,7 @@ export namespace OpenAPIV3 { in: string; } - export interface HeaderObject extends ParameterBaseObject { } + export interface HeaderObject extends ParameterBaseObject {} interface ParameterBaseObject { description?: string; @@ -287,14 +294,18 @@ export namespace OpenAPIV3 { | 'integer'; export type ArraySchemaObjectType = 'array'; - export type SchemaObject = ArraySchemaObject | NonArraySchemaObject | CompositionSchemaObject; + export type SchemaObject = + | ArraySchemaObject + | NonArraySchemaObject + | CompositionSchemaObject; - export interface ArraySchemaObject extends BaseSchemaObject { + export interface ArraySchemaObject + extends BaseSchemaObject { items: ReferenceObject | SchemaObject; } - export interface NonArraySchemaObject extends BaseSchemaObject { - } + export interface NonArraySchemaObject + extends BaseSchemaObject {} export interface CompositionSchemaObject extends BaseSchemaObject { // JSON schema allowed properties, adjusted for OpenAPI diff --git a/src/middlewares/openapi.multipart.ts b/src/middlewares/openapi.multipart.ts index e868b300..6bb7b565 100644 --- a/src/middlewares/openapi.multipart.ts +++ b/src/middlewares/openapi.multipart.ts @@ -42,7 +42,7 @@ export function multipart( // // This is a bit complex because the schema may be defined inline (easy) or via a $ref (complex) in which // case we must follow the $ref to check the type. - + if (req.files) { // to handle single and multiple file upload at the same time, let us this initialize this count variable // for example { "files": 5 } @@ -52,7 +52,7 @@ export function multipart( acc[curr] = (acc[curr] || 0) + 1; return acc; }, {}); - + // add file(s) to body Object.entries(count_by_fieldname).forEach( ([fieldname, count]: [string, number]) => { @@ -68,7 +68,7 @@ export function multipart( } }); }); - next() + next(); } catch (error) { next(error); } diff --git a/src/middlewares/openapi.response.validator.ts b/src/middlewares/openapi.response.validator.ts index a187ad0a..a87fa23f 100644 --- a/src/middlewares/openapi.response.validator.ts +++ b/src/middlewares/openapi.response.validator.ts @@ -69,8 +69,8 @@ export class ResponseValidator { const accepts: [string] = contentType ? [contentType] : accept - ? accept.split(',').map((h) => h.trim()) - : []; + ? accept.split(',').map((h) => h.trim()) + : []; try { return this._validate({ diff --git a/src/middlewares/parsers/body.parse.ts b/src/middlewares/parsers/body.parse.ts index 324aa313..317efe3b 100644 --- a/src/middlewares/parsers/body.parse.ts +++ b/src/middlewares/parsers/body.parse.ts @@ -7,8 +7,7 @@ import { } from '../../framework/types'; export class BodySchemaParser { - constructor() { - } + constructor() {} public parse( path: string, pathSchema: OpenAPIV3.OperationObject, @@ -44,7 +43,11 @@ export class BodySchemaParser { const equivalentContentTypes = contentType.equivalents(); for (const type of requestBodyTypes) { let openApiContentType = ContentType.fromString(type); - if (equivalentContentTypes.find((type2) => openApiContentType.normalize() === type2.normalize())) { + if ( + equivalentContentTypes.find( + (type2) => openApiContentType.normalize() === type2.normalize(), + ) + ) { content = requestBody.content[type]; break; } @@ -74,13 +77,15 @@ export class BodySchemaParser { if (!content) { // check if required is false, if so allow request when no content type is supplied const contentNotProvided = contentType.normalize() === 'not_provided'; - if ((contentType.normalize() === undefined || contentNotProvided) && requestBody.required === false) { + if ( + (contentType.normalize() === undefined || contentNotProvided) && + requestBody.required === false + ) { return {}; } - const msg = - contentNotProvided - ? 'media type not specified' - : `unsupported media type ${contentType.normalize()}`; + const msg = contentNotProvided + ? 'media type not specified' + : `unsupported media type ${contentType.normalize()}`; throw new UnsupportedMediaType({ path: path, message: msg }); } return content.schema ?? {}; diff --git a/src/middlewares/parsers/req.parameter.mutator.ts b/src/middlewares/parsers/req.parameter.mutator.ts index 00ece3cd..1215f410 100644 --- a/src/middlewares/parsers/req.parameter.mutator.ts +++ b/src/middlewares/parsers/req.parameter.mutator.ts @@ -187,8 +187,8 @@ export class RequestParameterMutator { const properties = hasXOf ? xOfProperties(schema) : type === 'object' - ? Object.keys(schema.properties ?? {}) - : []; + ? Object.keys(schema.properties ?? {}) + : []; this.explodedJsonObjectAndMutateRequest( req, diff --git a/src/middlewares/parsers/schema.preprocessor.ts b/src/middlewares/parsers/schema.preprocessor.ts index 8e14f4c0..e0f54f29 100644 --- a/src/middlewares/parsers/schema.preprocessor.ts +++ b/src/middlewares/parsers/schema.preprocessor.ts @@ -44,16 +44,24 @@ class Node { } type SchemaObjectNode = Node; -function isParameterObject(node: ParameterObject | ReferenceObject): node is ParameterObject { - return !((node as ReferenceObject).$ref); +function isParameterObject( + node: ParameterObject | ReferenceObject, +): node is ParameterObject { + return !(node as ReferenceObject).$ref; } -function isReferenceObject(node: ArraySchemaObject | NonArraySchemaObject | ReferenceObject): node is ReferenceObject { - return !!((node as ReferenceObject).$ref); +function isReferenceObject( + node: ArraySchemaObject | NonArraySchemaObject | ReferenceObject, +): node is ReferenceObject { + return !!(node as ReferenceObject).$ref; } -function isArraySchemaObject(node: ArraySchemaObject | NonArraySchemaObject | ReferenceObject): node is ArraySchemaObject { - return !!((node as ArraySchemaObject).items); +function isArraySchemaObject( + node: ArraySchemaObject | NonArraySchemaObject | ReferenceObject, +): node is ArraySchemaObject { + return !!(node as ArraySchemaObject).items; } -function isNonArraySchemaObject(node: ArraySchemaObject | NonArraySchemaObject | ReferenceObject): node is NonArraySchemaObject { +function isNonArraySchemaObject( + node: ArraySchemaObject | NonArraySchemaObject | ReferenceObject, +): node is NonArraySchemaObject { return !isArraySchemaObject(node) && !isReferenceObject(node); } @@ -160,7 +168,8 @@ export class SchemaPreprocessor { const node = new Root(operation, path); const requestBodies = this.extractRequestBodySchemaNodes(node); const responseBodies = this.extractResponseSchemaNodes(node); - const requestParameters = this.extractRequestParameterSchemaNodes(node); + const requestParameters = + this.extractRequestParameterSchemaNodes(node); requestBodySchemas.push(...requestBodies); responseSchemas.push(...responseBodies); @@ -233,7 +242,10 @@ export class SchemaPreprocessor { recurse(node, child, opts); }); } else if (schema.additionalProperties) { - const child = new Node(node, schema.additionalProperties, [...node.path, 'additionalProperties']); + const child = new Node(node, schema.additionalProperties, [ + ...node.path, + 'additionalProperties', + ]); recurse(node, child, opts); } }; @@ -289,7 +301,7 @@ export class SchemaPreprocessor { this.handleReadonly(pschema, nschema, options); this.handleWriteonly(pschema, nschema, options); this.processDiscriminator(pschema, nschema, options); - this.removeExamples(pschema, nschema, options) + this.removeExamples(pschema, nschema, options); } } } @@ -452,10 +464,10 @@ export class SchemaPreprocessor { ) { if (schema.type !== 'object') return; if (schema?.example) { - delete schema.example + delete schema.example; } if (schema?.examples) { - delete schema.examples + delete schema.examples; } } @@ -573,21 +585,20 @@ export class SchemaPreprocessor { private extractRequestParameterSchemaNodes( operationNode: Root, ): Root[] { - return (operationNode.schema.parameters ?? []).flatMap((node) => { const parameterObject = isParameterObject(node) ? node : undefined; if (!parameterObject?.schema) return []; - const schema = isNonArraySchemaObject(parameterObject.schema) ? - parameterObject.schema : - undefined; + const schema = isNonArraySchemaObject(parameterObject.schema) + ? parameterObject.schema + : undefined; if (!schema) return []; return new Root(schema, [ ...operationNode.path, 'parameters', parameterObject.name, - parameterObject.in + parameterObject.in, ]); }); } diff --git a/src/middlewares/util.ts b/src/middlewares/util.ts index 991d4a80..812504bb 100644 --- a/src/middlewares/util.ts +++ b/src/middlewares/util.ts @@ -5,11 +5,14 @@ import { ValidationError } from '../framework/types'; export class ContentType { public readonly mediaType: string = null; public readonly isWildCard: boolean; - public readonly parameters: { charset?: string, boundary?: string } & Record = {}; + public readonly parameters: { charset?: string; boundary?: string } & Record< + string, + string + > = {}; private constructor(contentType: string | null) { if (contentType) { const parameterRegExp = /;\s*([^=]+)=([^;]+)/g; - const paramMatches = contentType.matchAll(parameterRegExp) + const paramMatches = contentType.matchAll(parameterRegExp); if (paramMatches) { this.parameters = {}; for (let match of paramMatches) { @@ -22,7 +25,7 @@ export class ContentType { value = value.toLowerCase(); } this.parameters[key] = value; - }; + } } this.mediaType = contentType.split(';')[0].toLowerCase().trim(); this.isWildCard = RegExp(/^[a-z]+\/\*$/).test(contentType); @@ -44,7 +47,9 @@ export class ContentType { types.push(new ContentType(this.mediaType)); if (!this.parameters['charset']) { - types.push(new ContentType(`${this.normalize(['charset'])}; charset=utf-8`)); + types.push( + new ContentType(`${this.normalize(['charset'])}; charset=utf-8`), + ); } return types; } @@ -55,11 +60,10 @@ export class ContentType { .sort() .forEach((key) => { if (!excludeParams.includes(key)) { - parameters += `; ${key}=${this.parameters[key]}` + parameters += `; ${key}=${this.parameters[key]}`; } }); - if (this.mediaType) - return this.mediaType + parameters; + if (this.mediaType) return this.mediaType + parameters; } } @@ -130,10 +134,10 @@ export const findResponseContent = function ( expectedTypes: string[], ): string { const expectedTypesMap = new Map(); - for(let type of expectedTypes) { + for (let type of expectedTypes) { expectedTypesMap.set(ContentType.fromString(type).normalize(), type); } - + // if accepts are supplied, try to find a match, and use its validator for (const accept of accepts) { const act = ContentType.fromString(accept); @@ -167,7 +171,6 @@ export const findResponseContent = function ( export const zipObject = (keys, values) => keys.reduce((acc, key, idx) => { - acc[key] = values[idx] - return acc - }, {}) - + acc[key] = values[idx]; + return acc; + }, {}); diff --git a/src/openapi.validator.ts b/src/openapi.validator.ts index 3265c187..e9e1a188 100644 --- a/src/openapi.validator.ts +++ b/src/openapi.validator.ts @@ -36,9 +36,9 @@ export { } from './framework/types'; interface MiddlewareContext { - context: OpenApiContext, - responseApiDoc: OpenAPIV3.Document, - error: any, + context: OpenApiContext; + responseApiDoc: OpenAPIV3.Document; + error: any; } export class OpenApiValidator { @@ -208,7 +208,9 @@ export class OpenApiValidator { middlewares.push(function responseMiddleware(req, res, next) { return pContext .then(({ responseApiDoc, context: { serial } }) => { - resmw = resmw || self.responseValidationMiddleware(responseApiDoc, serial); + resmw = + resmw || + self.responseValidationMiddleware(responseApiDoc, serial); return resmw(req, res, next); }) .catch(next); @@ -221,7 +223,9 @@ export class OpenApiValidator { middlewares.push(function operationHandlersMiddleware(req, res, next) { if (router) return router(req, res, next); return pContext - .then(({context}) => self.installOperationHandlers(req.baseUrl, context)) + .then(({ context }) => + self.installOperationHandlers(req.baseUrl, context), + ) .then((installedRouter) => (router = installedRouter)(req, res, next)) .catch(next); }); @@ -239,7 +243,7 @@ export class OpenApiValidator { } // install param on routes with paths - const uniqPathParams = [...new Set(pathParams)] + const uniqPathParams = [...new Set(pathParams)]; for (const p of uniqPathParams) { app.param( p, @@ -291,17 +295,23 @@ export class OpenApiValidator { return (req, res, next) => requestValidator.validate(req, res, next); } - private responseValidationMiddleware(apiDoc: OpenAPIV3.Document, serial: number) { + private responseValidationMiddleware( + apiDoc: OpenAPIV3.Document, + serial: number, + ) { return new middlewares.ResponseValidator( apiDoc, this.ajvOpts.response, // This has already been converted from boolean if required this.options.validateResponses as ValidateResponseOpts, - serial + serial, ).validate(); } - async installOperationHandlers(baseUrl: string, context: OpenApiContext): Promise { + async installOperationHandlers( + baseUrl: string, + context: OpenApiContext, + ): Promise { const router = express.Router({ mergeParams: true }); this.installPathParams(router, context); diff --git a/src/resolvers.ts b/src/resolvers.ts index 3092e3a3..efc3c6d3 100644 --- a/src/resolvers.ts +++ b/src/resolvers.ts @@ -35,7 +35,10 @@ export function defaultResolver( tmpModules[modulePath] = require(modulePath); } - const handler = tmpModules[modulePath][oId] || tmpModules[modulePath].default[oId] || tmpModules[modulePath].default; + const handler = + tmpModules[modulePath][oId] || + tmpModules[modulePath].default[oId] || + tmpModules[modulePath].default; if (!handler) { throw Error( diff --git a/test/356.campaign.spec.ts b/test/356.campaign.spec.ts index fbe834db..57004cd5 100644 --- a/test/356.campaign.spec.ts +++ b/test/356.campaign.spec.ts @@ -1,4 +1,4 @@ - import * as path from 'path'; +import * as path from 'path'; import * as express from 'express'; import * as request from 'supertest'; import { createApp } from './common/app'; diff --git a/test/356.campaign.yaml b/test/356.campaign.yaml index 0f01a687..cae88114 100644 --- a/test/356.campaign.yaml +++ b/test/356.campaign.yaml @@ -69,8 +69,8 @@ components: endDate: type: string format: date-time - example: - type: string + example: + type: string example: name: 'hi' - description: 'yo' \ No newline at end of file + description: 'yo' diff --git a/test/440.spec.ts b/test/440.spec.ts index e105f07e..83912f97 100644 --- a/test/440.spec.ts +++ b/test/440.spec.ts @@ -45,16 +45,19 @@ describe(packageJson.name, () => { }, }, }; - app = await createApp({ - apiSpec, - validateRequests: true, - validateResponses: true, - }, 3005, (app) => - app.use( - express - .Router() - .post(`/test/abc123`, (req, res) => res.status(200).json(req.body)), - ), + app = await createApp( + { + apiSpec, + validateRequests: true, + validateResponses: true, + }, + 3005, + (app) => + app.use( + express + .Router() + .post(`/test/abc123`, (req, res) => res.status(200).json(req.body)), + ), ); }); diff --git a/test/577.spec.ts b/test/577.spec.ts index 4c9b26fa..18377095 100644 --- a/test/577.spec.ts +++ b/test/577.spec.ts @@ -13,7 +13,7 @@ describe('#577 - Exclude response validation that is not in api spec', () => { const app = await createApp(apiSpec); await request(app).get('/users').expect(200, 'some users'); await request(app).post('/users').expect(201, 'Created!'); - await request(app).get ('/example').expect(200, 'Example indeed') + await request(app).get('/example').expect(200, 'Example indeed'); app.server.close(); deepStrictEqual(apiSpec, createApiSpec()); @@ -34,18 +34,15 @@ async function createApp( }), ); app.get('/users', (req, res) => { - res.status(200).send('some users'); - } - ); + res.status(200).send('some users'); + }); app.post('/users', (req, res) => { - res.status(201).send('Created!'); - } - ); + res.status(201).send('Created!'); + }); app.get('/example', (req, res) => { - res.status(200).send('Example indeed'); - } - ); + res.status(200).send('Example indeed'); + }); await startServer(app, 3001); return app; diff --git a/test/699.spec.ts b/test/699.spec.ts index 2997299b..f420aefc 100644 --- a/test/699.spec.ts +++ b/test/699.spec.ts @@ -10,19 +10,18 @@ const apiSpecPath = path.join('test', 'resources', '699.yaml'); class ObjectID { id: string; - constructor(id: string = "5fdefd13a6640bb5fb5fa925") { + constructor(id: string = '5fdefd13a6640bb5fb5fa925') { this.id = id; } toString() { return this.id; } - } class BadDate extends Date { public toISOString(): string { - return "oh no a bad iso date"; + return 'oh no a bad iso date'; } } @@ -35,16 +34,16 @@ describe('699', () => { { apiSpec: apiSpecPath, validateRequests: { - coerceTypes: true + coerceTypes: true, }, validateResponses: { - coerceTypes: true + coerceTypes: true, }, serDes: [ date, dateTime, { - format: "mongo-objectid", + format: 'mongo-objectid', deserialize: (s) => new ObjectID(s), serialize: (o) => o.toString(), }, @@ -55,9 +54,9 @@ describe('699', () => { (app) => { app.get([`${app.basePath}/users/:id?`], (req, res) => { if (typeof req.params.id !== 'object') { - throw new Error("Should be deserialized to ObjectId object"); + throw new Error('Should be deserialized to ObjectId object'); } - let date = new Date("2020-12-20T07:28:19.213Z"); + let date = new Date('2020-12-20T07:28:19.213Z'); res.json({ id: req.params.id, creationDateTime: date, @@ -68,11 +67,18 @@ describe('699', () => { }); }); app.post([`${app.basePath}/users`], (req, res) => { - if (typeof req.body.history[0].modificationDate !== 'object' || !(req.body.history[0].modificationDate instanceof Date)) { - throw new Error("Should be deserialized to Date object"); + if ( + typeof req.body.history[0].modificationDate !== 'object' || + !(req.body.history[0].modificationDate instanceof Date) + ) { + throw new Error('Should be deserialized to Date object'); } - if (typeof req.body.historyWithoutRef[0].modificationDate !== 'object' || !(req.body.historyWithoutRef[0].modificationDate instanceof Date)) { - throw new Error("Should be deserialized to Date object"); + if ( + typeof req.body.historyWithoutRef[0].modificationDate !== + 'object' || + !(req.body.historyWithoutRef[0].modificationDate instanceof Date) + ) { + throw new Error('Should be deserialized to Date object'); } res.json(req.body); }); @@ -85,7 +91,7 @@ describe('699', () => { }, false, ); - return app + return app; }); after(() => { @@ -97,8 +103,10 @@ describe('699', () => { .get(`${app.basePath}/users/5fdefd13a6640bb5fb5fa925`) .expect(200) .then((r) => { - expect(r.body.history[0].modificationDate).to.equal("2020-12-20"); - expect(r.body.historyWithoutRef[0].modificationDate).to.equal("2020-12-20"); + expect(r.body.history[0].modificationDate).to.equal('2020-12-20'); + expect(r.body.historyWithoutRef[0].modificationDate).to.equal( + '2020-12-20', + ); })); it('should POST also works with deserialize on request then serialize en response', async () => @@ -115,8 +123,10 @@ describe('699', () => { .set('Content-Type', 'application/json') .expect(200) .then((r) => { - expect(r.body.history[0].modificationDate).to.equal("2020-12-20"); - expect(r.body.historyWithoutRef[0].modificationDate).to.equal("2020-12-20"); + expect(r.body.history[0].modificationDate).to.equal('2020-12-20'); + expect(r.body.historyWithoutRef[0].modificationDate).to.equal( + '2020-12-20', + ); })); it('should POST throw error on invalid schema Date', async () => @@ -132,7 +142,9 @@ describe('699', () => { .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/history/0/modificationDate must match format "date"'); + expect(r.body.message).to.equal( + 'request/body/history/0/modificationDate must match format "date"', + ); })); it('should POST throw error on invalid schema Date', async () => @@ -148,13 +160,12 @@ describe('699', () => { .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/historyWithoutRef/0/modificationDate must match format "date"'); + expect(r.body.message).to.equal( + 'request/body/historyWithoutRef/0/modificationDate must match format "date"', + ); })); - }); - - describe('699 serialize response components only', () => { let app = null; @@ -164,16 +175,16 @@ describe('699 serialize response components only', () => { { apiSpec: apiSpecPath, validateRequests: { - coerceTypes: true + coerceTypes: true, }, validateResponses: { - coerceTypes: true + coerceTypes: true, }, serDes: [ date.serializer, dateTime.serializer, { - format: "mongo-objectid", + format: 'mongo-objectid', serialize: (o) => o.toString(), }, ], @@ -184,9 +195,9 @@ describe('699 serialize response components only', () => { app.get([`${app.basePath}/users/:id?`], (req, res) => { debugger; if (typeof req.params.id !== 'string') { - throw new Error("Should be not be deserialized to ObjectId object"); + throw new Error('Should be not be deserialized to ObjectId object'); } - let date = new Date("2020-12-20T07:28:19.213Z"); + let date = new Date('2020-12-20T07:28:19.213Z'); let result = { id: new ObjectID(req.params.id), creationDateTime: date, @@ -198,20 +209,20 @@ describe('699 serialize response components only', () => { if (req.query.baddateresponse === 'functionNotExists') { result.history[0].modificationDate = new ObjectID(); result.historyWithoutRef[0].modificationDate = date; - } - else if (req.query.baddateresponse === 'functionNotExistsWithoutRef') { + } else if ( + req.query.baddateresponse === 'functionNotExistsWithoutRef' + ) { result.history[0].modificationDate = date; result.historyWithoutRef[0].modificationDate = new ObjectID(); - } - else if (req.query.baddateresponse === 'functionBadFormat') { + } else if (req.query.baddateresponse === 'functionBadFormat') { result.history[0].modificationDate = new BadDate(); result.historyWithoutRef[0].modificationDate = date; - } - else if (req.query.baddateresponse === 'functionBadFormatWithoutRef') { + } else if ( + req.query.baddateresponse === 'functionBadFormatWithoutRef' + ) { result.history[0].modificationDate = date; result.historyWithoutRef[0].modificationDate = new BadDate(); - } - else { + } else { result.history[0].modificationDate = date; result.historyWithoutRef[0].modificationDate = date; } @@ -219,18 +230,24 @@ describe('699 serialize response components only', () => { }); app.post([`${app.basePath}/users`], (req, res) => { if (typeof req.body.id !== 'string') { - throw new Error("Should NOT be deserialized to ObjectId object"); + throw new Error('Should NOT be deserialized to ObjectId object'); } if (typeof req.body.history[0].modificationDate !== 'string') { - throw new Error("Should NTO be deserialized to Date object"); + throw new Error('Should NTO be deserialized to Date object'); } - if (typeof req.body.historyWithoutRef[0].modificationDate !== 'string') { - throw new Error("Should NOT be deserialized to Date object"); + if ( + typeof req.body.historyWithoutRef[0].modificationDate !== 'string' + ) { + throw new Error('Should NOT be deserialized to Date object'); } req.body.id = new ObjectID(req.body.id); req.body.creationDateTime = new Date(req.body.creationDateTime); - req.body.history[0].modificationDate = new Date(req.body.history[0].modificationDate); - req.body.historyWithoutRef[0].modificationDate = new Date(req.body.historyWithoutRef[0].modificationDate); + req.body.history[0].modificationDate = new Date( + req.body.history[0].modificationDate, + ); + req.body.historyWithoutRef[0].modificationDate = new Date( + req.body.historyWithoutRef[0].modificationDate, + ); // We let creationDate et al as String and it should also work (either in Date Object ou String 'date' format) res.json(req.body); }); @@ -243,7 +260,7 @@ describe('699 serialize response components only', () => { }, false, ); - return app + return app; }); after(() => { @@ -257,9 +274,11 @@ describe('699 serialize response components only', () => { .then((r) => { expect(r.body.id).to.equal('5fdefd13a6640bb5fb5fa925'); expect(r.body.creationDate).to.equal('2020-12-20'); - expect(r.body.creationDateTime).to.equal("2020-12-20T07:28:19.213Z"); - expect(r.body.history[0].modificationDate).to.equal("2020-12-20"); - expect(r.body.historyWithoutRef[0].modificationDate).to.equal("2020-12-20"); + expect(r.body.creationDateTime).to.equal('2020-12-20T07:28:19.213Z'); + expect(r.body.history[0].modificationDate).to.equal('2020-12-20'); + expect(r.body.historyWithoutRef[0].modificationDate).to.equal( + '2020-12-20', + ); })); it('should POST also works with deserialize on request then serialize en response', async () => @@ -275,8 +294,10 @@ describe('699 serialize response components only', () => { .set('Content-Type', 'application/json') .expect(200) .then((r) => { - expect(r.body.history[0].modificationDate).to.equal("2020-12-20"); - expect(r.body.historyWithoutRef[0].modificationDate).to.equal("2020-12-20"); + expect(r.body.history[0].modificationDate).to.equal('2020-12-20'); + expect(r.body.historyWithoutRef[0].modificationDate).to.equal( + '2020-12-20', + ); })); it('should POST throw error on invalid schema Date', async () => @@ -292,7 +313,9 @@ describe('699 serialize response components only', () => { .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/history/0/modificationDate must match format "date"'); + expect(r.body.message).to.equal( + 'request/body/history/0/modificationDate must match format "date"', + ); })); it('should POST throw error on invalid schema Date', async () => @@ -308,7 +331,9 @@ describe('699 serialize response components only', () => { .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/historyWithoutRef/0/modificationDate must match format "date"'); + expect(r.body.message).to.equal( + 'request/body/historyWithoutRef/0/modificationDate must match format "date"', + ); })); it('should throw error 500 on invalid object type instead of Date expected', async () => @@ -347,7 +372,4 @@ describe('699 serialize response components only', () => { })); */ - }); - - diff --git a/test/821.spec.ts b/test/821.spec.ts index 42eda867..590bd254 100644 --- a/test/821.spec.ts +++ b/test/821.spec.ts @@ -7,24 +7,22 @@ import { startServer } from './common/app.common'; import { deepStrictEqual } from 'assert'; import * as path from 'path'; - const apiSpecPath = path.join('test', 'resources', '699.yaml'); -const date = new Date() +const date = new Date(); describe('issue #821 - serialization inside addiotionalProperties', () => { it('serializa both outer and inner date in addiotionalProperties', async () => { - const app = await createApp(apiSpecPath); - await request(app).get('/test').expect(200, - { + await request(app) + .get('/test') + .expect(200, { outer_date: date.toISOString(), other_info: { something: { - inner_date: date.toISOString() - } - } - } - ); + inner_date: date.toISOString(), + }, + }, + }); app.server!.close(); }); }); @@ -46,12 +44,11 @@ async function createApp( outer_date: date, other_info: { something: { - inner_date: date - } - } - }) - - }) + inner_date: date, + }, + }, + }); + }); app.use((err, req, res, next) => { console.error(err); // dump error to console for debug @@ -64,5 +61,3 @@ async function createApp( await startServer(app, 3001); return app; } - - diff --git a/test/ajv.options.spec.ts b/test/ajv.options.spec.ts index 5407dd5c..54306fd2 100644 --- a/test/ajv.options.spec.ts +++ b/test/ajv.options.spec.ts @@ -10,8 +10,8 @@ describe('AjvOptions', () => { apiSpec: './spec', validateApiSpec: false, validateRequests: { - allowUnknownQueryParameters: false, - coerceTypes: false, + allowUnknownQueryParameters: false, + coerceTypes: false, }, validateResponses: { coerceTypes: false, diff --git a/test/ajv.resolves.more.than.one.schema.spec.ts b/test/ajv.resolves.more.than.one.schema.spec.ts index a61c6d7e..550520cc 100644 --- a/test/ajv.resolves.more.than.one.schema.spec.ts +++ b/test/ajv.resolves.more.than.one.schema.spec.ts @@ -12,15 +12,17 @@ describe('AJV: reference resolves to more than one schema', () => { const app = await createApp(apiSpec); - await request(app).get('/bear').expect(res => { - if (res.text.includes('resolves to more than one schema')) { - throw new Error('AJV not processing x-stoplight property correctly.') - } + await request(app) + .get('/bear') + .expect((res) => { + if (res.text.includes('resolves to more than one schema')) { + throw new Error('AJV not processing x-stoplight property correctly.'); + } - if (!res.text.includes('Black Bear')) { - throw new Error() - } - }) + if (!res.text.includes('Black Bear')) { + throw new Error(); + } + }); app.server.close(); @@ -46,8 +48,8 @@ async function createApp( ); app.use((err, req, res, next) => { - res.status(500).send(err.stack) - }) + res.status(500).send(err.stack); + }); await startServer(app, 3001); return app; @@ -65,15 +67,15 @@ function createApiSpec() { parameters: [], get: { responses: { - '200': { + '200': { description: 'OK', content: { 'application/json': { schema: { - $ref: '#/components/schemas/Bear' - } - } - } + $ref: '#/components/schemas/Bear', + }, + }, + }, }, }, }, @@ -84,15 +86,15 @@ function createApiSpec() { Bear: { title: 'Bear', 'x-stoplight': { - id: 'ug68n9uynqll0' + id: 'ug68n9uynqll0', }, properties: { type: { - type: 'string' - } - } - } - } - } + type: 'string', + }, + }, + }, + }, + }, }; } diff --git a/test/common/app.common.ts b/test/common/app.common.ts index 523948e8..355f23fd 100644 --- a/test/common/app.common.ts +++ b/test/common/app.common.ts @@ -17,22 +17,22 @@ export function routes(app) { const basePath = app.basePath; const router1 = express .Router() - .post('/', function(req: Request, res: Response): void { + .post('/', function (req: Request, res: Response): void { res.json({ name: `${req.method}: /router_1`, }); }) - .get('/', function(req: Request, res: Response): void { + .get('/', function (req: Request, res: Response): void { res.json({ name: `${req.method}: /router_1`, }); }) - .get('/:id', function(req: Request, res: Response): void { + .get('/:id', function (req: Request, res: Response): void { res.json({ name: `${req.method}: /router_1/${req.params.id}`, }); }) - .get('/:id/best/:bid', function(req: Request, res: Response): void { + .get('/:id/best/:bid', function (req: Request, res: Response): void { res.json({ name: `${req.method}: /router_1/${req.params.id}/best/${req.params.bid}`, }); @@ -40,7 +40,7 @@ export function routes(app) { app.use(`${basePath}/router_1`, router1); - app.get(`${basePath}/pets`, function(req: Request, res: Response): void { + app.get(`${basePath}/pets`, function (req: Request, res: Response): void { res.json({ test: 'hi', body: req.body, @@ -48,7 +48,7 @@ export function routes(app) { }); }); - app.post(`${basePath}/pets`, function(req: Request, res: Response): void { + app.post(`${basePath}/pets`, function (req: Request, res: Response): void { res.json({ body: req.body, query: req.query, @@ -56,48 +56,48 @@ export function routes(app) { }); }); - app.get(`${basePath}/pets/:id`, function(req: Request, res: Response): void { + app.get(`${basePath}/pets/:id`, function (req: Request, res: Response): void { res.json({ id: req.params.id, }); }); - app.get(`${basePath}/pets/:id/attributes`, function( - req: Request, - res: Response, - ): void { - res.json({ - id: req.params.id, - }); - }); + app.get( + `${basePath}/pets/:id/attributes`, + function (req: Request, res: Response): void { + res.json({ + id: req.params.id, + }); + }, + ); - app.get(`${basePath}/pets/:id/attributes/:attribute_id`, function( - req: Request, - res: Response, - ): void { - res.json({ - id: req.params.id, - attribute_id: req.params.attribute_id, - }); - }); + app.get( + `${basePath}/pets/:id/attributes/:attribute_id`, + function (req: Request, res: Response): void { + res.json({ + id: req.params.id, + attribute_id: req.params.attribute_id, + }); + }, + ); - app.post(`${basePath}/route_defined_in_express_not_openapi`, function( - req: Request, - res: Response, - ): void { - res.json({ - id: req.params.id, - }); - }); + app.post( + `${basePath}/route_defined_in_express_not_openapi`, + function (req: Request, res: Response): void { + res.json({ + id: req.params.id, + }); + }, + ); - app.get('/not_under_an_openapi_basepath', function( - req: Request, - res: Response, - ): void { - res.json({ - id: '/not_under_an_openapi_basepath', - }); - }); + app.get( + '/not_under_an_openapi_basepath', + function (req: Request, res: Response): void { + res.json({ + id: '/not_under_an_openapi_basepath', + }); + }, + ); // app.post('/v1/pets/:id/photos', function(req: Request, res: Response): void { // // req.file is the `avatar` file @@ -108,7 +108,7 @@ export function routes(app) { // metadata: req.body.metadata, // }); // }); - app.post('/v1/pets_charset', function(req: Request, res: Response): void { + app.post('/v1/pets_charset', function (req: Request, res: Response): void { // req.file is the `avatar` file // req.body will hold the text fields, if there were any res.json({ @@ -117,13 +117,16 @@ export function routes(app) { }); }); - app.post('/v1/pets_content_types', function(req: Request, res: Response): void { - // req.file is the `avatar` file - // req.body will hold the text fields, if there were any - res.json({ - ...req.body, - contentType: req.headers['content-type'], - id: 'new-id', - }); - }); + app.post( + '/v1/pets_content_types', + function (req: Request, res: Response): void { + // req.file is the `avatar` file + // req.body will hold the text fields, if there were any + res.json({ + ...req.body, + contentType: req.headers['content-type'], + id: 'new-id', + }); + }, + ); } diff --git a/test/common/app.ts b/test/common/app.ts index 91c120f0..db076f88 100644 --- a/test/common/app.ts +++ b/test/common/app.ts @@ -4,7 +4,7 @@ import * as cookieParser from 'cookie-parser'; import * as bodyParser from 'body-parser'; import * as logger from 'morgan'; -import * as OpenApiValidator from '../../src'; +import * as OpenApiValidator from '../../src'; import { startServer, routes } from './app.common'; import { OpenApiValidatorOpts } from '../../src/framework/types'; diff --git a/test/common/test.yaml b/test/common/test.yaml index 4d952dd9..d7ca5323 100644 --- a/test/common/test.yaml +++ b/test/common/test.yaml @@ -230,4 +230,4 @@ components: ApiKeyAuth: type: apiKey in: header - name: X-API-Key \ No newline at end of file + name: X-API-Key diff --git a/test/component.params.spec.ts b/test/component.params.spec.ts index 0a4c83ba..d0ffad4e 100644 --- a/test/component.params.spec.ts +++ b/test/component.params.spec.ts @@ -11,7 +11,7 @@ describe(packageJson.name, () => { before(async () => { // Set up the express app const apiSpec = path.join('test', 'resources', 'component.params.yaml'); - app = await createApp({ apiSpec }, 3005, app => + app = await createApp({ apiSpec }, 3005, (app) => app.use( `/`, express @@ -30,7 +30,7 @@ describe(packageJson.name, () => { request(app) .get(`/api/v1/meeting/${id}`) .expect(200) - .then(r => { + .then((r) => { expect(r.body.id).to.equal(id); }); }); diff --git a/test/content.type.spec.ts b/test/content.type.spec.ts index 9db4fbbf..9f55025e 100644 --- a/test/content.type.spec.ts +++ b/test/content.type.spec.ts @@ -38,10 +38,7 @@ describe('contentType', () => { }); it('should match media type if charset is specified in accepts, but charset not defined in schema', async () => { - const expectedTypes = [ - 'application/json', - 'application/xml', - ]; + const expectedTypes = ['application/json', 'application/xml']; const accepts = ['application/json; charset=utf-8']; const contentType = findResponseContent(accepts, expectedTypes); diff --git a/test/datetime.validation.spec.ts b/test/datetime.validation.spec.ts index 5538ec7b..685643d7 100644 --- a/test/datetime.validation.spec.ts +++ b/test/datetime.validation.spec.ts @@ -1,22 +1,22 @@ import * as path from 'path'; -import {expect} from 'chai'; +import { expect } from 'chai'; import * as request from 'supertest'; -import {createApp} from './common/app'; +import { createApp } from './common/app'; -describe("datetime.validation", () => { +describe('datetime.validation', () => { let app = null; - async function setupServer(validateFormats?: false | "full" | "fast") { + async function setupServer(validateFormats?: false | 'full' | 'fast') { // Set up the express app const apiSpec = path.join('test', 'resources', 'datetime.validation.yaml'); app = await createApp( { apiSpec, validateResponses: true, - validateFormats + validateFormats, }, 3005, - app => { + (app) => { // Define new coercion routes app.post(`${app.basePath}/date-time-validation`, (req, res) => { res.json(req.body); @@ -32,11 +32,10 @@ describe("datetime.validation", () => { afterEach(async () => { if (app) { - await new Promise(resolve => app.server.close(resolve)); + await new Promise((resolve) => app.server.close(resolve)); } }); - it('should return 200 if testDateTimeProperty is provided with invalid, but correctly formatted date time and default validation is enabled (past compatibility)', async () => { await setupServer(); await request(app) @@ -45,8 +44,8 @@ describe("datetime.validation", () => { testDateTimeProperty: '2000-13-03T12:13:14Z', }) .expect(200) - .then(r => { - const {body} = r; + .then((r) => { + const { body } = r; expect(body).to.have.property('testDateTimeProperty'); }); }); @@ -69,28 +68,28 @@ describe("datetime.validation", () => { testDateTimeProperty: 'blah-blah', }) .expect(200) - .then(r => { - const {body} = r; + .then((r) => { + const { body } = r; expect(body).to.have.property('testDateTimeProperty'); }); }); it('should return 200 if testDateTimeProperty is provided with valid date time and full validation enabled', async () => { - await setupServer("full"); + await setupServer('full'); await request(app) .post(`${app.basePath}/date-time-validation`) .send({ testDateTimeProperty: '2000-02-03T12:13:14Z', }) .expect(200) - .then(r => { - const {body} = r; + .then((r) => { + const { body } = r; expect(body).to.have.property('testDateTimeProperty'); }); }); it('should return 400 if testDateTimeProperty is provided with invalid date time and full validation enabled', async () => { - await setupServer("full"); + await setupServer('full'); await request(app) .post(`${app.basePath}/date-time-validation`) .send({ diff --git a/test/default-export.spec.ts b/test/default-export.spec.ts index cacff56d..ef60789c 100644 --- a/test/default-export.spec.ts +++ b/test/default-export.spec.ts @@ -13,8 +13,8 @@ const schema = { get: { operationId: 'anything', 'x-eov-operation-handler': 'controller-with-default', - responses: { 200: { description: 'home api' } } - } + responses: { 200: { description: 'home api' } }, + }, }, }, } as const; diff --git a/test/default.export.fn.spec.ts b/test/default.export.fn.spec.ts index d0cdaebe..d13f1fd4 100644 --- a/test/default.export.fn.spec.ts +++ b/test/default.export.fn.spec.ts @@ -20,8 +20,8 @@ describe('default export resolver', () => { operationId: 'test#get', // @ts-ignore 'x-eov-operation-handler': 'routes/default-export-fn', - responses: { 200: { description: 'homepage' } } - } + responses: { 200: { description: 'homepage' } }, + }, }, }, }, @@ -40,7 +40,7 @@ describe('default export resolver', () => { .get(`/`) .expect(200) .then((r) => { - expect(r.body).to.have.property('message').that.equals("It Works!"); + expect(r.body).to.have.property('message').that.equals('It Works!'); }); }); }); diff --git a/test/empty.servers.spec.ts b/test/empty.servers.spec.ts index d9a634f5..1ffdf1f1 100644 --- a/test/empty.servers.spec.ts +++ b/test/empty.servers.spec.ts @@ -10,12 +10,10 @@ describe('empty servers', () => { before(async () => { // Set up the express app const apiSpec = path.join('test', 'resources', 'empty.servers.yaml'); - app = await createApp({ apiSpec }, 3007, app => + app = await createApp({ apiSpec }, 3007, (app) => app.use( ``, - express - .Router() - .get(`/pets`, (req, res) => res.json(req.body)), + express.Router().get(`/pets`, (req, res) => res.json(req.body)), ), ); }); @@ -28,7 +26,7 @@ describe('empty servers', () => { request(app) .get(`/pets`) .expect(400) - .then(r => { + .then((r) => { expect(r.body.errors).to.be.an('array'); expect(r.body.errors).to.have.length(2); })); diff --git a/test/escaped.characters.in.ref.path.spec.ts b/test/escaped.characters.in.ref.path.spec.ts index 2a2ec4e5..30c37d44 100644 --- a/test/escaped.characters.in.ref.path.spec.ts +++ b/test/escaped.characters.in.ref.path.spec.ts @@ -8,27 +8,35 @@ describe('when escaped characters are in path', () => { before(async () => { // Set up the express app - const apiSpec = path.join('test', 'resources', 'escaped.characters.in.path.yaml'); - app = await createApp({ apiSpec, $refParser: {mode: 'dereference'} }, 3005, app => { - app.use( - `${app.basePath}`, - express - .Router() - .post(`/auth/login`, (req, res) => res.json({ - 'token': 'SOME_JWT_TOKEN', - 'user': { - 'fullName': 'Eric Cartman', - 'role': 'admin', - }, - })), - ); - app.use( - `${app.basePath}`, - express - .Router() - .post(`/auth/register`, (req, res) => res.status(200).end()), - ); - }); + const apiSpec = path.join( + 'test', + 'resources', + 'escaped.characters.in.path.yaml', + ); + app = await createApp( + { apiSpec, $refParser: { mode: 'dereference' } }, + 3005, + (app) => { + app.use( + `${app.basePath}`, + express.Router().post(`/auth/login`, (req, res) => + res.json({ + token: 'SOME_JWT_TOKEN', + user: { + fullName: 'Eric Cartman', + role: 'admin', + }, + }), + ), + ); + app.use( + `${app.basePath}`, + express + .Router() + .post(`/auth/register`, (req, res) => res.status(200).end()), + ); + }, + ); }); after(() => { @@ -44,8 +52,7 @@ describe('when escaped characters are in path', () => { password: '123456', fullName: 'Eric Cartman', }) - .expect(200), - ); + .expect(200)); it('should be able to use an endpoint with some nested paths $ref 2', async () => request(app) @@ -54,7 +61,5 @@ describe('when escaped characters are in path', () => { email: 'jy95@perdu.com', password: '123456', }) - .expect(200), - ); - + .expect(200)); }); diff --git a/test/headers.2.spec.ts b/test/headers.2.spec.ts index d67c0afa..81f9b582 100644 --- a/test/headers.2.spec.ts +++ b/test/headers.2.spec.ts @@ -54,9 +54,7 @@ describe(packageJson.name, () => { .expect(400) .then((r) => { const e = r.body; - expect(e.message).to.contain( - 'must NOT have more than 255 characters', - ); + expect(e.message).to.contain('must NOT have more than 255 characters'); }); }); diff --git a/test/headers.spec.ts b/test/headers.spec.ts index 7c3ec860..79959ce6 100644 --- a/test/headers.spec.ts +++ b/test/headers.spec.ts @@ -71,7 +71,7 @@ describe(packageJson.name, () => { }) .expect(200)); - it('should succeed in sending a content-type: "application/json; version=1" in multiple ways', async () =>{ + it('should succeed in sending a content-type: "application/json; version=1" in multiple ways', async () => { await request(app) .post(`${app.basePath}/pets_content_types`) .set('Content-Type', 'application/json; version=1') @@ -82,7 +82,7 @@ describe(packageJson.name, () => { }) .expect(200) .expect((res) => { - expect(res.body.contentType).to.equal('application/json; version=1') + expect(res.body.contentType).to.equal('application/json; version=1'); }); await request(app) @@ -95,10 +95,10 @@ describe(packageJson.name, () => { }) .expect(200) .expect((res) => { - expect(res.body.contentType).to.equal('application/json;version=1') + expect(res.body.contentType).to.equal('application/json;version=1'); }); }); - + it('should throw a 415 error for unsupported "application/json; version=2" content type', async () => request(app) .post(`${app.basePath}/pets_content_types`) @@ -121,9 +121,9 @@ describe(packageJson.name, () => { }) .expect(200) .expect((res) => { - expect(res.body.contentType).to.equal('application/json;version=1') + expect(res.body.contentType).to.equal('application/json;version=1'); }); - + await request(app) .post(`${app.basePath}/pets_content_types`) .set('Content-Type', 'application/json; version=3') diff --git a/test/httperror.spec.ts b/test/httperror.spec.ts index 91ed8475..45b8872d 100644 --- a/test/httperror.spec.ts +++ b/test/httperror.spec.ts @@ -86,7 +86,9 @@ describe(packageJson.name, () => { path: '/method_not_allowed', message: 'POST method not allowed', }; - expect(new error.MethodNotAllowed(err)).to.be.an.instanceof(error.MethodNotAllowed); + expect(new error.MethodNotAllowed(err)).to.be.an.instanceof( + error.MethodNotAllowed, + ); expect( HttpError.create({ status: 405, diff --git a/test/ignore.paths.spec.ts b/test/ignore.paths.spec.ts index b795b7a3..6ff49924 100644 --- a/test/ignore.paths.spec.ts +++ b/test/ignore.paths.spec.ts @@ -12,7 +12,7 @@ describe('ignorePaths as RegExp', () => { app = await createApp( { apiSpec, ignorePaths: /.*\/hippies$/ }, 3005, - app => { + (app) => { app.all('/v1/hippies', (req, res) => { res.json([ { id: 1, name: 'farah' }, @@ -74,7 +74,7 @@ describe('ignorePaths as RegExp', () => { return request(app) .get(`${basePath}/pets/${id}`) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].path).contains('id'); expect(e[0].message).equals('must be integer'); @@ -85,7 +85,7 @@ describe('ignorePaths as RegExp', () => { request(app) .get(`${basePath}/route_defined_in_openapi_only`) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).to.equal("must have required property 'id'"); })); @@ -95,7 +95,7 @@ describe('ignorePaths as RegExp', () => { .get(`${basePath}/route_defined_in_openapi_only`) .query({ id: 123 }) .expect(404) - .then(r => { + .then((r) => { const e = r.body; // There is no route defined by express, hence the validator verifies parameters, // then it fails over to the express error handler. In this case returns empty @@ -114,7 +114,7 @@ describe('ignorePaths as Function', () => { app = await createApp( { apiSpec, ignorePaths: (path) => path.endsWith('/hippies') }, 3005, - app => { + (app) => { app.all('/v1/hippies', (req, res) => { res.json([ { id: 1, name: 'farah' }, @@ -173,7 +173,7 @@ describe('ignorePaths as Function', () => { return request(app) .get(`${basePath}/pets/${id}`) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].path).contains('id'); expect(e[0].message).equals('must be integer'); @@ -184,7 +184,7 @@ describe('ignorePaths as Function', () => { request(app) .get(`${basePath}/route_defined_in_openapi_only`) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).to.equal("must have required property 'id'"); })); @@ -194,7 +194,7 @@ describe('ignorePaths as Function', () => { .get(`${basePath}/route_defined_in_openapi_only`) .query({ id: 123 }) .expect(404) - .then(r => { + .then((r) => { const e = r.body; // There is no route defined by express, hence the validator verifies parameters, // then it fails over to the express error handler. In this case returns empty diff --git a/test/multipart.disabled.spec.ts b/test/multipart.disabled.spec.ts index dad4d24c..0c4fa3df 100644 --- a/test/multipart.disabled.spec.ts +++ b/test/multipart.disabled.spec.ts @@ -9,7 +9,7 @@ describe(packageJson.name, () => { let app = null; before(async () => { const apiSpec = path.join('test', 'resources', 'multipart.yaml'); - app = await createApp({ apiSpec, fileUploader: false }, 3003, app => + app = await createApp({ apiSpec, fileUploader: false }, 3003, (app) => app.use( `${app.basePath}`, express @@ -30,10 +30,8 @@ describe(packageJson.name, () => { .set('Content-Type', 'multipart/form-data') .set('Accept', 'application/json') .expect(400) - .then(e => { - expect(e.body) - .has.property('errors') - .with.length(2); + .then((e) => { + expect(e.body).has.property('errors').with.length(2); expect(e.body.errors[0]) .has.property('message') .equal("must have required property 'file'"); @@ -84,10 +82,8 @@ describe(packageJson.name, () => { .set('Content-Type', 'application/json') .expect('Content-Type', /json/) .expect(415) - .then(r => { - expect(r.body) - .has.property('errors') - .with.length(1); + .then((r) => { + expect(r.body).has.property('errors').with.length(1); expect(r.body.errors[0]) .has.property('message') .equal('unsupported media type application/json'); @@ -102,7 +98,7 @@ describe(packageJson.name, () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e).to.have.length(1); expect(e[0].path).to.contain('number'); diff --git a/test/multipart.spec.ts b/test/multipart.spec.ts index 807e3759..51352822 100644 --- a/test/multipart.spec.ts +++ b/test/multipart.spec.ts @@ -129,8 +129,8 @@ describe('a multipart request', () => { it('should validate multipart file and metadata', async () => { const array_with_objects = JSON.stringify([ { - foo: 'bar' - } + foo: 'bar', + }, ]); await request(app) @@ -169,16 +169,13 @@ describe('when request does not use parsers', () => { (app) => app.use( `${app.basePath}`, - express - .Router() - .post(`/sample_7`, (req, res) => res.json('ok')), + express.Router().post(`/sample_7`, (req, res) => res.json('ok')), ), false, false, ); }); - it('should validate that endpoint exists', async () => { await request(app) .post(`${app.basePath}/sample_7`) diff --git a/test/nested.routes.spec.ts b/test/nested.routes.spec.ts index 8bb8b81e..243d7a5b 100644 --- a/test/nested.routes.spec.ts +++ b/test/nested.routes.spec.ts @@ -10,31 +10,28 @@ describe(packageJson.name, () => { before(async () => { // Set up the express app - const apiSpec = path.join( - 'test', - 'resources', - 'nested.routes.yaml', - ); + const apiSpec = path.join('test', 'resources', 'nested.routes.yaml'); const apiRoute = express.Router(), nestedRoute = express.Router(); - app = await createApp({ - apiSpec, - validateRequests: true, - validateResponses: true, + app = await createApp( + { + apiSpec, + validateRequests: true, + validateResponses: true, }, 3005, - app =>{ + (app) => { app.use(`${app.basePath}`, apiRoute); apiRoute.use('/api-path', nestedRoute); nestedRoute.get('/pets', (_req, res) => { const json = [ { name: 'test', - tag: 'tag' - } + tag: 'tag', + }, ]; return res.json(json); - }) + }); }, true, ); @@ -51,6 +48,8 @@ describe(packageJson.name, () => { .expect(500) .then((r: any) => { const e = r.body; - expect(e.message).to.contain("/response/0 must have required property 'id'"); + expect(e.message).to.contain( + "/response/0 must have required property 'id'", + ); })); }); diff --git a/test/one.of.spec.ts b/test/one.of.spec.ts index 15c652d2..1a405a52 100644 --- a/test/one.of.spec.ts +++ b/test/one.of.spec.ts @@ -12,7 +12,7 @@ describe(packageJson.name, () => { app = await createApp( { apiSpec }, 3005, - app => { + (app) => { app.post(`${app.basePath}/one_of`, (req, res) => { res.json(req.body); }); @@ -80,11 +80,9 @@ describe(packageJson.name, () => { ], }) .expect(400) - .then(r => { + .then((r) => { const e = r.body; - expect(e.message).to.contain( - 'must match exactly one schema in oneOf', - ); + expect(e.message).to.contain('must match exactly one schema in oneOf'); }); }); @@ -136,11 +134,9 @@ describe(packageJson.name, () => { ], }) .expect(400) - .then(r => { + .then((r) => { const e = r.body; - expect(e.message).to.contain( - 'must match exactly one schema in oneOf', - ); + expect(e.message).to.contain('must match exactly one schema in oneOf'); }); }); }); diff --git a/test/oneof.readonly.yaml b/test/oneof.readonly.yaml index e2501405..6e1a49a0 100644 --- a/test/oneof.readonly.yaml +++ b/test/oneof.readonly.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Dummy API description: Dummy API - version: "0.1.0" + version: '0.1.0' servers: - url: /v1 paths: @@ -10,54 +10,54 @@ paths: post: requestBody: content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/subE' - - $ref: '#/components/schemas/subF' - discriminator: - propertyName: type - mapping: - A: '#/components/schemas/subE' - B: '#/components/schemas/subF' + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/subE' + - $ref: '#/components/schemas/subF' + discriminator: + propertyName: type + mapping: + A: '#/components/schemas/subE' + B: '#/components/schemas/subF' responses: - 200: - description: successful operation + 200: + description: successful operation /any_of: post: requestBody: content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/subA' - - $ref: '#/components/schemas/subB' - discriminator: - propertyName: type - mapping: - A: '#/components/schemas/subA' - B: '#/components/schemas/subB' + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/subA' + - $ref: '#/components/schemas/subB' + discriminator: + propertyName: type + mapping: + A: '#/components/schemas/subA' + B: '#/components/schemas/subB' responses: - 200: - description: successful operation + 200: + description: successful operation /one_of: post: requestBody: content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/subC' - - $ref: '#/components/schemas/subD' - discriminator: - propertyName: type - mapping: - C: '#/components/schemas/subC' - D: '#/components/schemas/subD' + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/subC' + - $ref: '#/components/schemas/subD' + discriminator: + propertyName: type + mapping: + C: '#/components/schemas/subC' + D: '#/components/schemas/subD' responses: - 200: - description: successful operation + 200: + description: successful operation components: schemas: @@ -69,10 +69,10 @@ components: type: string type: type: string - enum: [A, B] + enum: [A, B] required: - id - - type + - type one_required: type: object @@ -82,7 +82,7 @@ components: type: string type: type: string - enum: [A, B] + enum: [A, B] required: - id @@ -103,10 +103,10 @@ components: type: string type: type: string - enum: [C, D] + enum: [C, D] required: - id - - type + - type subD: allOf: @@ -117,10 +117,10 @@ components: type: string type: type: string - enum: [C, D] + enum: [C, D] required: - id - - type + - type subE: allOf: @@ -128,4 +128,4 @@ components: subF: allOf: - - $ref: '#/components/schemas/one_required' \ No newline at end of file + - $ref: '#/components/schemas/one_required' diff --git a/test/openapi.spec.ts b/test/openapi.spec.ts index 6a810bb0..e3172c74 100644 --- a/test/openapi.spec.ts +++ b/test/openapi.spec.ts @@ -22,11 +22,11 @@ describe(packageJson.name, () => { }); after(() => { - apps.forEach(app => app.server.close()); + apps.forEach((app) => app.server.close()); }); // [0,1] simulate range of 2 items - each item references an index in `apps` - [0, 1].forEach(i => { + [0, 1].forEach((i) => { describe(`GET ${basePath}/pets`, () => { it('should throw 400 on missing required query parameter', async () => request(apps[i]) @@ -34,7 +34,7 @@ describe(packageJson.name, () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e).to.have.length(2); expect(e[0].path).to.equal('/query/limit'); @@ -63,12 +63,12 @@ describe(packageJson.name, () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(400) - .then(r => { + .then((r) => { expect(r.body.errors).to.deep.equal([ { path: '/query/unknown_param', - message: "Unknown query parameter 'unknown_param'" - } + message: "Unknown query parameter 'unknown_param'", + }, ]); })); @@ -82,7 +82,7 @@ describe(packageJson.name, () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e).to.have.length(1); expect(e[0].path).to.contain('limit'); @@ -95,7 +95,7 @@ describe(packageJson.name, () => { .query(`limit=10&test=one&testJson={"foo": "bar"}`) .set('Accept', 'application/json') .expect('Content-Type', /json/) - .then(r => { + .then((r) => { expect(r.body) .to.have.property('message') .that.equals( @@ -126,7 +126,7 @@ describe(packageJson.name, () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e).to.have.length(1); expect(e[0].path).to.contain('testJson'); @@ -154,7 +154,7 @@ describe(packageJson.name, () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(400) - .then(r => { + .then((r) => { expect(r.body) .to.have.property('message') .that.equals( @@ -183,7 +183,7 @@ describe(packageJson.name, () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e).to.have.length(1); expect(e[0].path).to.contain('testArray'); @@ -209,7 +209,7 @@ describe(packageJson.name, () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e).to.have.length(1); expect(e[0].path).to.contain('testArrayExplode'); @@ -225,11 +225,9 @@ describe(packageJson.name, () => { .post(`${basePath}/pets`) .set('content-type', 'application/json') .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; - expect(e[0].message).to.equal( - "must have required property 'name'", - ); + expect(e[0].message).to.equal("must have required property 'name'"); })); it('should return 400 if required "name" property is missing', async () => @@ -237,11 +235,9 @@ describe(packageJson.name, () => { .post(`${basePath}/pets`) .send({}) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; - expect(e[0].message).to.equal( - "must have required property 'name'", - ); + expect(e[0].message).to.equal("must have required property 'name'"); })); it('should return 200 when post props are met', async () => @@ -251,7 +247,7 @@ describe(packageJson.name, () => { name: 'test', }) .expect(200) - .then(r => { + .then((r) => { expect(r.body.id).to.equal('new-id'); })); }); @@ -261,7 +257,7 @@ describe(packageJson.name, () => { request(apps[i]) .get('/not_under_an_openapi_basepath') .expect(200) - .then(r => { + .then((r) => { expect(r.body.id).to.equal('/not_under_an_openapi_basepath'); })); @@ -272,7 +268,7 @@ describe(packageJson.name, () => { request(apps[i]) .get(`${basePath}/route_not_defined_within_express`) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).to.equal( "must have required property 'name'", @@ -285,7 +281,7 @@ describe(packageJson.name, () => { .get(`${basePath}/route_not_defined_within_express`) .query({ name: 'test' }) .expect(404) - .then(r => { + .then((r) => { const e = r.body; // There is no route defined by express, hence the validator verifies parameters, // then it fails over to the express error handler. In this case returns empty @@ -297,7 +293,7 @@ describe(packageJson.name, () => { .get(`${basePath}/router_1/10`) .set('Accept', 'application/json') .expect(404) - .then(r => { + .then((r) => { const e = r.body.errors[0]; expect(e.message).to.equal('not found'); expect(e.path).to.equal(`${basePath}/router_1/10`); @@ -308,7 +304,7 @@ describe(packageJson.name, () => { .post(`${basePath}/route_not_defined_within_express`) .send() .expect(405) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).to.equal('POST method not allowed'); expect(e[0].path).to.equal( @@ -323,7 +319,7 @@ describe(packageJson.name, () => { name: 'test', }) .expect(404) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).to.equal('not found'); expect(e[0].path).to.equal(`${basePath}/unknown_route`); @@ -336,7 +332,7 @@ describe(packageJson.name, () => { name: 'test', }) .expect(404) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).to.equal('not found'); expect(e[0].path).to.equal( @@ -350,7 +346,7 @@ describe(packageJson.name, () => { .send('stuff') .set('content-type', 'application/xml') .expect(415) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).to.equal( 'unsupported media type application/xml', @@ -362,7 +358,7 @@ describe(packageJson.name, () => { .patch(`${basePath}/pets`) .send({ name: 'test' }) .expect(405) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).to.equal('PATCH method not allowed'); })); @@ -375,7 +371,7 @@ describe(packageJson.name, () => { return request(apps[i]) .get(`${basePath}/pets/${id}`) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].path).contains('id'); expect(e[0].message).equals('must be integer'); @@ -391,7 +387,7 @@ describe(packageJson.name, () => { testArray: ['unknown_value'], }) .expect(400) - .then(r => { + .then((r) => { const e = r.body.errors; expect(e[0].message).equals( 'must be equal to one of the allowed values: foo, bar, baz', @@ -405,7 +401,7 @@ describe(packageJson.name, () => { return request(apps[i]) .get(`${basePath}/pets/${id}/attributes/${attributeId}`) .expect(200) - .then(r => { + .then((r) => { expect(r.body.id).equals(Number.parseInt(id)); expect(r.body.attribute_id).equals(Number.parseInt(attributeId)); }); @@ -416,7 +412,7 @@ describe(packageJson.name, () => { return request(apps[i]) .get(`${basePath}/pets/${id}`) .expect(200) - .then(r => { + .then((r) => { expect(r.body.id).equals(id); }); }); diff --git a/test/operation.handler.spec.ts b/test/operation.handler.spec.ts index b7e60fe9..7b57e7da 100644 --- a/test/operation.handler.spec.ts +++ b/test/operation.handler.spec.ts @@ -119,5 +119,4 @@ describe('custom operation handler', () => { expect(r.text).to.be.equal('pong'); }); }); - }); diff --git a/test/optional-request-body.spec.ts b/test/optional-request-body.spec.ts index f99aa8d6..ad49fa5b 100644 --- a/test/optional-request-body.spec.ts +++ b/test/optional-request-body.spec.ts @@ -33,9 +33,7 @@ describe(packageJson.name, () => { .expect(201)); it('create document should return 201 with empty body', async () => - request(app) - .post(`/documents`) - .expect(201)); + request(app).post(`/documents`).expect(201)); it('return 415', async () => request(app) diff --git a/test/path.level.parameters.spec.ts b/test/path.level.parameters.spec.ts index 56d1f5e8..f734c55f 100644 --- a/test/path.level.parameters.spec.ts +++ b/test/path.level.parameters.spec.ts @@ -15,7 +15,7 @@ describe(packageJson.name, () => { 'resources', 'path.level.parameters.yaml', ); - app = await createApp({ apiSpec }, 3005, app => + app = await createApp({ apiSpec }, 3005, (app) => app.use( `${app.basePath}`, express @@ -34,7 +34,7 @@ describe(packageJson.name, () => { .get(`${app.basePath}/path_level_parameters?operationLevel=123`) .send() .expect(400) - .then(r => { + .then((r) => { expect(r.body.errors).to.be.an('array'); expect(r.body.errors).to.have.length(1); const message = r.body.errors[0].message; @@ -46,7 +46,7 @@ describe(packageJson.name, () => { .get(`${app.basePath}/path_level_parameters?pathLevel=123`) .send() .expect(400) - .then(r => { + .then((r) => { expect(r.body.errors).to.be.an('array'); expect(r.body.errors).to.have.length(1); const message = r.body.errors[0].message; @@ -60,10 +60,10 @@ describe(packageJson.name, () => { .get(`${app.basePath}/path_level_parameters`) .send() .expect(400) - .then(r => { + .then((r) => { expect(r.body.errors).to.be.an('array'); expect(r.body.errors).to.have.length(2); - const messages = r.body.errors.map(err => err.message); + const messages = r.body.errors.map((err) => err.message); expect(messages).to.have.members([ "must have required property 'pathLevel'", "must have required property 'operationLevel'", @@ -72,7 +72,9 @@ describe(packageJson.name, () => { it('should return 200 if both pathLevel and operationLevel query parameter are provided', async () => request(app) - .get(`${app.basePath}/path_level_parameters?operationLevel=123&pathLevel=123`) + .get( + `${app.basePath}/path_level_parameters?operationLevel=123&pathLevel=123`, + ) .send() .expect(200)); }); diff --git a/test/paths.sort.spec.ts b/test/paths.sort.spec.ts index 6d2fc4fa..1adfaad7 100644 --- a/test/paths.sort.spec.ts +++ b/test/paths.sort.spec.ts @@ -1,6 +1,4 @@ -import { - sortRoutes, -} from '../src/framework/openapi.spec.loader'; +import { sortRoutes } from '../src/framework/openapi.spec.loader'; import { expect } from 'chai'; describe('url sorter', () => { @@ -38,7 +36,7 @@ describe('url sorter', () => { }); function asRouteMetadatas(urls: string[]) { - return urls.map(u => ({ + return urls.map((u) => ({ expressRoute: u, })); } diff --git a/test/query.params.allow.unknown.spec.ts b/test/query.params.allow.unknown.spec.ts index 22b360fa..cd43cd4c 100644 --- a/test/query.params.allow.unknown.spec.ts +++ b/test/query.params.allow.unknown.spec.ts @@ -15,7 +15,7 @@ describe(packageJson.name, () => { app = await createApp( { apiSpec, validateRequests: { allowUnknownQueryParameters: true } }, 3005, - app => + (app) => app.use( `${app.basePath}`, express @@ -62,7 +62,7 @@ describe(packageJson.name, () => { unknown_prop: 'test', }) .expect(400) - .then(r => { + .then((r) => { expect(r.body.errors).to.be.an('array'); })); }); diff --git a/test/query.params.spec.ts b/test/query.params.spec.ts index 536f0034..9a546f27 100644 --- a/test/query.params.spec.ts +++ b/test/query.params.spec.ts @@ -11,7 +11,7 @@ describe(packageJson.name, () => { before(async () => { // Set up the express app const apiSpec = path.join('test', 'resources', 'query.params.yaml'); - app = await createApp({ apiSpec }, 3005, app => + app = await createApp({ apiSpec }, 3005, (app) => app.use( `${app.basePath}`, express @@ -50,7 +50,7 @@ describe(packageJson.name, () => { name: 'max', }) .expect(400) - .then(r => { + .then((r) => { expect(r.body.errors).to.be.an('array'); })); @@ -58,7 +58,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/no_query_params`) .expect(200) - .then(r => { + .then((r) => { expect(r.body.complete).to.equal(true); })); @@ -74,7 +74,7 @@ describe(packageJson.name, () => { unknown_prop: 'test', }) .expect(400) - .then(r => { + .then((r) => { expect(r.body.errors).to.be.an('array'); })); @@ -98,13 +98,11 @@ describe(packageJson.name, () => { owner_name: 'carmine', }) .expect(400) - .then(r => { + .then((r) => { expect(r.body) .to.have.property('message') .that.equals("Empty value found for query parameter 'breed'"); - expect(r.body.errors) - .to.be.an('array') - .with.length(1); + expect(r.body.errors).to.be.an('array').with.length(1); expect(r.body.errors[0].path).to.equal('/query/breed'); })); @@ -131,7 +129,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/no_reserved?value=ThisHas$ReservedChars!`) .expect(400) - .then(r => { + .then((r) => { const body = r.body; expect(body.message).equals( "Parameter 'value' must be url encoded. Its value may not contain reserved characters.", diff --git a/test/query.serialization.ts b/test/query.serialization.ts index 019e55ab..4070714d 100644 --- a/test/query.serialization.ts +++ b/test/query.serialization.ts @@ -13,8 +13,12 @@ describe('styles', () => { `/`, express .Router() - .get('/api/q_form_explode', (req, res) => res.json({ query: req.query })) - .get('/api/q_form_nexplode', (req, res) => res.json({ query: req.query })), + .get('/api/q_form_explode', (req, res) => + res.json({ query: req.query }), + ) + .get('/api/q_form_nexplode', (req, res) => + res.json({ query: req.query }), + ), ), ); }); diff --git a/test/read.only.removeadditional.spec.ts b/test/read.only.removeadditional.spec.ts index 2f065c04..cad46ce9 100644 --- a/test/read.only.removeadditional.spec.ts +++ b/test/read.only.removeadditional.spec.ts @@ -10,51 +10,58 @@ describe(packageJson.name, () => { before(async () => { // Set up the express app const apiSpec = path.join('test', 'resources', 'read.only.yaml'); - app = await createApp({ apiSpec, validateRequests: {removeAdditional:true}, validateResponses: true }, 3005, (app) => - app - .post(`${app.basePath}/products`, (req, res) => res.json(req.body)) - .get(`${app.basePath}/products`, (req, res) => - res.json([ - { - id: 'id_1', - name: 'name_1', - price: 9.99, - created_at: new Date().toISOString(), - }, - ]), - ) - .post(`${app.basePath}/products/inlined`, (req, res) => - res.json(req.body), - ) - .post(`${app.basePath}/user`, (req, res) => - res.json({ - ...req.body, - ...(req.query.include_id ? { id: 'test_id' } : {}), - }), - ) - .post(`${app.basePath}/user_inlined`, (req, res) => - res.json({ - ...req.body, - ...(req.query.include_id ? { id: 'test_id' } : {}), + app = await createApp( + { + apiSpec, + validateRequests: { removeAdditional: true }, + validateResponses: true, + }, + 3005, + (app) => + app + .post(`${app.basePath}/products`, (req, res) => res.json(req.body)) + .get(`${app.basePath}/products`, (req, res) => + res.json([ + { + id: 'id_1', + name: 'name_1', + price: 9.99, + created_at: new Date().toISOString(), + }, + ]), + ) + .post(`${app.basePath}/products/inlined`, (req, res) => + res.json(req.body), + ) + .post(`${app.basePath}/user`, (req, res) => + res.json({ + ...req.body, + ...(req.query.include_id ? { id: 'test_id' } : {}), + }), + ) + .post(`${app.basePath}/user_inlined`, (req, res) => + res.json({ + ...req.body, + ...(req.query.include_id ? { id: 'test_id' } : {}), + }), + ) + .post(`${app.basePath}/products/nested`, (req, res) => { + const body = req.body; + body.id = 'test'; + body.created_at = new Date().toISOString(); + body.reviews = body.reviews.map((r) => ({ + id: 99, + rating: r.rating ?? 2, + })); + res.json(body); + }) + .post(`${app.basePath}/readonly_required_allof`, (req, res) => { + const json = { + name: 'My Name', + ...(req.query.include_id ? { id: 'test_id' } : {}), + }; + res.json(json); }), - ) - .post(`${app.basePath}/products/nested`, (req, res) => { - const body = req.body; - body.id = 'test'; - body.created_at = new Date().toISOString(); - body.reviews = body.reviews.map((r) => ({ - id: 99, - rating: r.rating ?? 2, - })); - res.json(body); - }) - .post(`${app.basePath}/readonly_required_allof`, (req, res) => { - const json = { - name: 'My Name', - ...(req.query.include_id ? { id: 'test_id' } : {}), - }; - res.json(json); - }), ); }); @@ -63,23 +70,22 @@ describe(packageJson.name, () => { }); it('should remove read only properties in requests thanks to removeAdditional', async () => - request(app) - .post(`${app.basePath}/products`) - .set('content-type', 'application/json') - .send({ - id: 'id_1', - name: 'some name', - price: 10.99, - created_at: new Date().toISOString(), - }) - .expect(200) - .then((r) => { - const body = r.body; - // id is a readonly property and should not be allowed in the request - // but, as removeAdditional is true for requests, it should be deleted before entering in the route - expect(body.id).to.be.undefined; - })); - + request(app) + .post(`${app.basePath}/products`) + .set('content-type', 'application/json') + .send({ + id: 'id_1', + name: 'some name', + price: 10.99, + created_at: new Date().toISOString(), + }) + .expect(200) + .then((r) => { + const body = r.body; + // id is a readonly property and should not be allowed in the request + // but, as removeAdditional is true for requests, it should be deleted before entering in the route + expect(body.id).to.be.undefined; + })); it('should allow read only properties in responses', async () => request(app) @@ -102,12 +108,11 @@ describe(packageJson.name, () => { .expect(200) .then((r) => { const body = r.body; - // id is a readonly property and should not not be allowed in the request - // but, as removeAdditional is true for requests, it should be deleted before entering in the route - expect(body.id).to.be.undefined; + // id is a readonly property and should not not be allowed in the request + // but, as removeAdditional is true for requests, it should be deleted before entering in the route + expect(body.id).to.be.undefined; })); - it('should remove read only properties in requests (nested and deep nested schema $refs) thanks to removeAdditional', async () => request(app) .post(`${app.basePath}/products/nested`) @@ -117,18 +122,20 @@ describe(packageJson.name, () => { name: 'some name', price: 10.99, created_at: new Date().toISOString(), - reviews: [{ - id: 10, - rating: 5, - }], + reviews: [ + { + id: 10, + rating: 5, + }, + ], }) .expect(200) .then((r) => { const body = r.body; - // id is a readonly property and should not not be allowed in the request - // but, as removeAdditional is true for requests, it should be deleted before entering in the route - expect(body.id).to.be.equal('test'); - expect(body.reviews[0].id).to.be.equal(99); + // id is a readonly property and should not not be allowed in the request + // but, as removeAdditional is true for requests, it should be deleted before entering in the route + expect(body.id).to.be.equal('test'); + expect(body.reviews[0].id).to.be.equal(99); })); it('should pass validation if required read only properties to be missing from request ($ref)', async () => diff --git a/test/read.only.spec.ts b/test/read.only.spec.ts index da4ffc0e..66d62535 100644 --- a/test/read.only.spec.ts +++ b/test/read.only.spec.ts @@ -113,10 +113,12 @@ describe(packageJson.name, () => { name: 'some name', price: 10.99, created_at: new Date().toISOString(), - reviews: [{ - id: 'review_id', - rating: 5, - }], + reviews: [ + { + id: 'review_id', + rating: 5, + }, + ], }) .expect(400) .then((r) => { diff --git a/test/request.bodies.ref.spec.ts b/test/request.bodies.ref.spec.ts index 26e7d98a..78b066fd 100644 --- a/test/request.bodies.ref.spec.ts +++ b/test/request.bodies.ref.spec.ts @@ -122,9 +122,7 @@ describe('request bodies', () => { expect(r.body.errors).to.be.an('array'); expect(r.body.errors).to.have.length(1); const message = r.body.errors[0].message; - expect(message).to.equal( - "must have required property 'testProperty'", - ); + expect(message).to.equal("must have required property 'testProperty'"); })); it('should return 200 if testProperty body property is provided', async () => diff --git a/test/resources/699.yaml b/test/resources/699.yaml index 0126109f..2107f2f8 100644 --- a/test/resources/699.yaml +++ b/test/resources/699.yaml @@ -1,7 +1,7 @@ -openapi: "3.0.0" +openapi: '3.0.0' info: - title: "Test for allOf" - version: "1" + title: 'Test for allOf' + version: '1' servers: - url: /v1/ paths: @@ -12,7 +12,7 @@ paths: in: path required: true schema: - $ref: "#/components/schemas/ObjectId" + $ref: '#/components/schemas/ObjectId' - name: baddateresponse in: query schema: @@ -26,28 +26,28 @@ paths: in: query required: false schema: - $ref: "#/components/schemas/ShortOrLong" + $ref: '#/components/schemas/ShortOrLong' responses: 200: - description: "" + description: '' content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' /users: post: requestBody: - content : + content: application/json: schema: $ref: '#/components/schemas/User' responses: 200: - description: "" + description: '' content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' components: schemas: ObjectId: @@ -70,7 +70,7 @@ components: type: object properties: modificationDate: - $ref: "#/components/schemas/Date" + $ref: '#/components/schemas/Date' StringList: type: string format: string-list @@ -78,19 +78,19 @@ components: type: object properties: id: - $ref: "#/components/schemas/ObjectId" + $ref: '#/components/schemas/ObjectId' tags: - $ref: "#/components/schemas/StringList" + $ref: '#/components/schemas/StringList' creationDateTime: - $ref: "#/components/schemas/DateTime" + $ref: '#/components/schemas/DateTime' creationDate: - $ref: "#/components/schemas/Date" + $ref: '#/components/schemas/Date' shortOrLong: - $ref: "#/components/schemas/ShortOrLong" + $ref: '#/components/schemas/ShortOrLong' history: type: array items: - $ref: "#/components/schemas/HistoryItem" + $ref: '#/components/schemas/HistoryItem' historyWithoutRef: type: array items: @@ -99,4 +99,3 @@ components: modificationDate: type: string format: date - diff --git a/test/resources/821.yaml b/test/resources/821.yaml index e9533d76..edc85cf9 100644 --- a/test/resources/821.yaml +++ b/test/resources/821.yaml @@ -4,7 +4,7 @@ info: title: Test additionalProperties date-time paths: /test: - get: + get: responses: '200': description: foo diff --git a/test/resources/additional.props.query.params.yaml b/test/resources/additional.props.query.params.yaml index b75d7cd7..e9214e67 100644 --- a/test/resources/additional.props.query.params.yaml +++ b/test/resources/additional.props.query.params.yaml @@ -37,5 +37,3 @@ paths: responses: '200': description: the response - - diff --git a/test/resources/all.of.yaml b/test/resources/all.of.yaml index 7110589d..8a8c812c 100644 --- a/test/resources/all.of.yaml +++ b/test/resources/all.of.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.0" +openapi: '3.0.0' info: version: 1.0.0 title: Test @@ -13,10 +13,10 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Pet" + $ref: '#/components/schemas/Pet' responses: - "200": + '200': description: success components: @@ -37,7 +37,7 @@ components: # This causes AVJ validation to fail - https://github.com/epoberezkin/ajv/issues/837 # additionalProperties: false allOf: - - $ref: "#/components/schemas/NewPet" + - $ref: '#/components/schemas/NewPet' - required: - id type: object diff --git a/test/resources/circular.yaml b/test/resources/circular.yaml index f0a2397f..e6d580ca 100644 --- a/test/resources/circular.yaml +++ b/test/resources/circular.yaml @@ -14,7 +14,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/User' responses: '200': description: Updated @@ -30,11 +30,9 @@ components: type: number name: type: string - favorite: + favorite: $ref: '#/components/schemas/User' children: type: array items: $ref: '#/components/schemas/User' - - \ No newline at end of file diff --git a/test/resources/coercion.yaml b/test/resources/coercion.yaml index 5e9344f4..9de59596 100644 --- a/test/resources/coercion.yaml +++ b/test/resources/coercion.yaml @@ -51,16 +51,16 @@ paths: description: Returns pets by name operationId: addPet parameters: - - in: query - name: filter - schema: - type: object - additionalProperties: false - properties: - names: - type: array - items: - type: string + - in: query + name: filter + schema: + type: object + additionalProperties: false + properties: + names: + type: array + items: + type: string responses: '200': description: pet response diff --git a/test/resources/controller-with-default.ts b/test/resources/controller-with-default.ts index b52090a2..442ca7c6 100644 --- a/test/resources/controller-with-default.ts +++ b/test/resources/controller-with-default.ts @@ -1,3 +1,3 @@ export default function (req, res) { - res.json({success: true}).end(); + res.json({ success: true }).end(); } diff --git a/test/resources/empty.servers.yaml b/test/resources/empty.servers.yaml index 621c6430..4fbbbf28 100644 --- a/test/resources/empty.servers.yaml +++ b/test/resources/empty.servers.yaml @@ -91,4 +91,3 @@ components: format: int32 message: type: string - diff --git a/test/resources/eov-operations.modulepath.yaml b/test/resources/eov-operations.modulepath.yaml index 1eb397d0..fa22217b 100644 --- a/test/resources/eov-operations.modulepath.yaml +++ b/test/resources/eov-operations.modulepath.yaml @@ -14,7 +14,7 @@ paths: get: description: | ping then pong! - operationId: ping.ping + operationId: ping.ping responses: '200': description: OK diff --git a/test/resources/eov-operations.yaml b/test/resources/eov-operations.yaml index 5f8906e4..9c641f3d 100644 --- a/test/resources/eov-operations.yaml +++ b/test/resources/eov-operations.yaml @@ -15,8 +15,8 @@ paths: description: | ping then pong! # use operationId, (x-eov-operation-id is optional. it can be used in place of operationId or to override it) - operationId: ping - x-eov-operation-handler: routes/ping + operationId: ping + x-eov-operation-handler: routes/ping responses: '200': description: OK diff --git a/test/resources/escaped.characters.in.path.yaml b/test/resources/escaped.characters.in.path.yaml index 7a34bfd0..e2d9544c 100644 --- a/test/resources/escaped.characters.in.path.yaml +++ b/test/resources/escaped.characters.in.path.yaml @@ -1,11 +1,11 @@ openapi: '3.0.0' info: - description: "Some escaped characters in $ref" - version: "1.0.0" - title: "Source Code" + description: 'Some escaped characters in $ref' + version: '1.0.0' + title: 'Source Code' license: - name: "GPL-3.0-or-later" - url: "https://choosealicense.com/licenses/gpl-3.0/" + name: 'GPL-3.0-or-later' + url: 'https://choosealicense.com/licenses/gpl-3.0/' servers: - url: /v1/ @@ -32,4 +32,4 @@ components: description: Explanation about an error required: - message - - errors \ No newline at end of file + - errors diff --git a/test/resources/formats.yaml b/test/resources/formats.yaml index 6a29dc14..4dc9e9fa 100644 --- a/test/resources/formats.yaml +++ b/test/resources/formats.yaml @@ -7,7 +7,7 @@ servers: paths: /fees: get: - parameters: + parameters: - name: id in: query required: true @@ -26,7 +26,7 @@ paths: /formats/1: get: - parameters: + parameters: - name: string_id in: query schema: @@ -56,4 +56,3 @@ paths: responses: '200': description: response - diff --git a/test/resources/headers.yaml b/test/resources/headers.yaml index 3859efbf..e974b208 100644 --- a/test/resources/headers.yaml +++ b/test/resources/headers.yaml @@ -12,7 +12,7 @@ servers: paths: /headers_1: get: - operationId: ping + operationId: ping parameters: - name: x-userid in: header @@ -27,4 +27,4 @@ paths: text/plain: schema: type: string - example: headers_1 \ No newline at end of file + example: headers_1 diff --git a/test/resources/ignore.paths.yaml b/test/resources/ignore.paths.yaml index f2142f91..da4e151f 100644 --- a/test/resources/ignore.paths.yaml +++ b/test/resources/ignore.paths.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.0" +openapi: '3.0.0' info: version: 1.0.0 title: Swagger Petstore @@ -22,7 +22,7 @@ paths: schema: type: string responses: - "200": + '200': description: user response /pets/{id}: @@ -38,12 +38,12 @@ paths: type: integer format: int64 responses: - "200": + '200': description: pet response content: application/json: schema: - $ref: "#/components/schemas/Pet" + $ref: '#/components/schemas/Pet' /route_defined_in_openapi_only: get: @@ -56,7 +56,7 @@ paths: type: integer format: int64 responses: - "200": + '200': description: test components: diff --git a/test/resources/multipart.yaml b/test/resources/multipart.yaml index 64592f8a..765b1324 100644 --- a/test/resources/multipart.yaml +++ b/test/resources/multipart.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.0" +openapi: '3.0.0' info: version: 1.0.0 title: Swagger Petstore @@ -40,7 +40,7 @@ paths: p2: type: string responses: - "200": + '200': description: form data /sample_2: @@ -73,7 +73,7 @@ paths: form_p2: type: string responses: - "200": + '200': description: form data /sample_3: @@ -87,7 +87,7 @@ paths: type: string format: binary responses: - "200": + '200': description: binary /sample_4: @@ -153,7 +153,7 @@ paths: minimum: 5 maximum: 10 responses: - "200": + '200': description: form data components: diff --git a/test/resources/nested.routes.yaml b/test/resources/nested.routes.yaml index 4e0450ca..e4e87234 100644 --- a/test/resources/nested.routes.yaml +++ b/test/resources/nested.routes.yaml @@ -69,4 +69,4 @@ components: type: integer format: int32 message: - type: string \ No newline at end of file + type: string diff --git a/test/resources/one.of.2.yaml b/test/resources/one.of.2.yaml index d954633f..5e9967c2 100644 --- a/test/resources/one.of.2.yaml +++ b/test/resources/one.of.2.yaml @@ -104,7 +104,7 @@ components: # add CatObject as an option # so that the non-mapping / implied mapping tests can pass enum: [cat, kitty, CatObject] - color: + color: type: string default: gray @@ -118,7 +118,7 @@ components: discriminator: propertyName: pet_type - Dog: # "Dog" is a value for the pet_type property (the discriminator value) + Dog: # "Dog" is a value for the pet_type property (the discriminator value) allOf: # Combines the main `Pet` schema with `Dog`-specific properties - $ref: '#/components/schemas/Pet' - type: object @@ -129,7 +129,7 @@ components: breed: type: string enum: [Dingo, Husky, Retriever, Shepherd] - Cat: # "Cat" is a value for the pet_type property (the discriminator value) + Cat: # "Cat" is a value for the pet_type property (the discriminator value) allOf: # Combines the main `Pet` schema with `Cat`-specific properties - $ref: '#/components/schemas/Pet' - type: object @@ -138,4 +138,4 @@ components: hunts: type: boolean age: - type: integer \ No newline at end of file + type: integer diff --git a/test/resources/one.of.yaml b/test/resources/one.of.yaml index cf638026..88ebf659 100644 --- a/test/resources/one.of.yaml +++ b/test/resources/one.of.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.2" +openapi: '3.0.2' info: version: 1.0.0 title: requestBodies $ref @@ -15,17 +15,17 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/OneOfType" + $ref: '#/components/schemas/OneOfType' responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/OneOfType' - "400": + '400': description: Bad Request - + /one_of_b: post: requestBody: @@ -33,22 +33,22 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/OneOfTypeB" + $ref: '#/components/schemas/OneOfTypeB' responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/OneOfType' - "400": + '400': description: Bad Request components: schemas: SimilarTypeOne: allOf: - - $ref: "#/components/schemas/SimilarSuperType" + - $ref: '#/components/schemas/SimilarSuperType' - type: object properties: type: @@ -63,7 +63,7 @@ components: SimilarTypeTwo: allOf: - - $ref: "#/components/schemas/SimilarSuperType" + - $ref: '#/components/schemas/SimilarSuperType' - type: object properties: type: @@ -83,14 +83,14 @@ components: type: array items: oneOf: - - $ref: "#/components/schemas/SimilarTypeOne" - - $ref: "#/components/schemas/SimilarTypeTwo" + - $ref: '#/components/schemas/SimilarTypeOne' + - $ref: '#/components/schemas/SimilarTypeTwo' discriminator: propertyName: type SimilarTypeOneB: allOf: - - $ref: "#/components/schemas/SimilarSuperTypeB" + - $ref: '#/components/schemas/SimilarSuperTypeB' properties: type: type: string @@ -101,7 +101,7 @@ components: value: type: number format: int32 - enum: [ 1 ] + enum: [1] default: 1 required: - type @@ -110,7 +110,7 @@ components: SimilarTypeTwoB: allOf: - - $ref: "#/components/schemas/SimilarSuperTypeB" + - $ref: '#/components/schemas/SimilarSuperTypeB' properties: type: type: string @@ -121,7 +121,7 @@ components: value: type: number format: int32 - enum: [ 2 ] + enum: [2] default: 2 required: - type @@ -135,8 +135,8 @@ components: type: array items: oneOf: - - $ref: "#/components/schemas/SimilarTypeOneB" - - $ref: "#/components/schemas/SimilarTypeTwoB" + - $ref: '#/components/schemas/SimilarTypeOneB' + - $ref: '#/components/schemas/SimilarTypeTwoB' discriminator: propertyName: type @@ -145,7 +145,7 @@ components: properties: id: type: string - + SimilarSuperTypeB: type: object properties: @@ -158,4 +158,3 @@ components: propertyName: type required: - value - diff --git a/test/resources/openapi.json b/test/resources/openapi.json index 3af067a5..e86bf33f 100644 --- a/test/resources/openapi.json +++ b/test/resources/openapi.json @@ -1,565 +1,526 @@ { - "openapi": "3.0.0", - "info": { - "version": "1.0.0", - "title": "Swagger Petstore", - "description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification", - "termsOfService": "http://swagger.io/terms/", - "contact": { - "name": "Swagger API Team", - "email": "apiteam@swagger.io", - "url": "http://swagger.io" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "servers": [ - { - "url": "/v1/" - }, - { - "url": "http://{name}.swagger.io:{port}/{version}", - "variables": { - "name": { - "default": "petstore", - "enum": [ - "petstore", - "storeofpets" - ] - }, - "port": { - "enum": [ - "443", - "8443" - ], - "default": "443" - }, - "version": { - "default": "v1", - "enum": [ - "v1", - "v2" - ] - } - } - } - ], - "paths": { - "/pets": { - "get": { - "description": "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n", - "operationId": "findPets", - "parameters": [ - { - "name": "tags", - "in": "query", - "description": "tags to filter by", - "required": false, - "style": "form", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "limit", - "in": "query", - "description": "maximum number of results to return", - "required": true, - "schema": { - "type": "integer", - "format": "int32", - "minimum": 5 - } - }, - { - "name": "test", - "in": "query", - "description": "maximum number of results to return", - "required": true, - "schema": { - "type": "string", - "enum": [ - "one", - "two" - ] - } - }, - { - "name": "testJson", - "in": "query", - "description": "JSON in query params", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "foo": { - "type": "string", - "enum": [ - "bar", - "baz" - ] - } - } - } - } - } - }, - { - "name": "testArray", - "in": "query", - "description": "Array in query param", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "foo", - "bar", - "baz" - ] - } - }, - "style": "form", - "explode": false - }, - { - "name": "testArrayExplode", - "in": "query", - "description": "Array explode in query param", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "foo", - "bar", - "baz" - ] - } - }, - "style": "form", - "explode": true - } - ], - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Pet" - } - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "post": { - "description": "Creates a new pet in the store. Duplicates are allowed", - "operationId": "addPet", - "requestBody": { - "description": "Pet to add to the store", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewPet" - } - } - } - }, - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pet" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/pets/{id}": { - "get": { - "description": "Returns a user based on a single ID, if the user does not have access to the pet", - "operationId": "find pet by id", - "parameters": [ - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pet" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "delete": { - "description": "deletes a single pet based on the ID supplied", - "operationId": "deletePet", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of pet to delete", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "204": { - "description": "pet deleted" - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/pets/{id}/photos": { - "post": { - "description": "upload a photo of the pet", - "operationId": "uploadPetPhoto", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of pet to fetch", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "required": [ - "file", - "metadata" - ], - "properties": { - "file": { - "description": "The photo", - "type": "string", - "format": "binary" - }, - "metadata": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "photo uploaded" - } - } - } - }, - "/pets/{id}/attributes": { - "get": { - "description": "Returns attributes for this pet", - "operationId": "find attributes", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of pet to fetch", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "in": "header", - "name": "X-Attribute-Id", - "schema": { - "type": "string", - "format": "uuid" - }, - "required": true - } - ], - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attribute" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/pets/{id}/attributes/{attribute_id}": { - "get": { - "description": "Returns the attribute specified by attribute_id", - "operationId": "find attributes by pet id", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of pet to fetch", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "in": "path", - "name": "attribute_id", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": true - } - ], - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attribute" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/route_not_defined_within_express": { - "get": { - "description": "Returns attributes for this pet", - "operationId": "route-not-defined-within-express", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "the name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attribute" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - } - }, - "components": { - "parameters": { - "id": { - "name": "id", - "in": "path", - "description": "ID of pet to fetch", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "schemas": { - "NewPet": { - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "tag": { - "type": "string" - } - } - }, - "Pet": { - "allOf": [ - { - "$ref": "#/components/schemas/NewPet" - }, - { - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - } - } - } - ] - }, - "NewAttribute": { - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - } - } - }, - "Attribute": { - "allOf": [ - { - "$ref": "#/components/schemas/NewAttribute" - }, - { - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - } - } - } - ] - }, - "NewPhoto": { - "type": "object", - "required": [ - "file" - ], - "properties": { - "file": { - "description": "The photo", - "type": "string", - "format": "binary" - } - } - }, - "Error": { - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - } - } - } - } - } + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Swagger Petstore", + "description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "name": "Swagger API Team", + "email": "apiteam@swagger.io", + "url": "http://swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "servers": [ + { + "url": "/v1/" + }, + { + "url": "http://{name}.swagger.io:{port}/{version}", + "variables": { + "name": { + "default": "petstore", + "enum": ["petstore", "storeofpets"] + }, + "port": { + "enum": ["443", "8443"], + "default": "443" + }, + "version": { + "default": "v1", + "enum": ["v1", "v2"] + } + } + } + ], + "paths": { + "/pets": { + "get": { + "description": "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n", + "operationId": "findPets", + "parameters": [ + { + "name": "tags", + "in": "query", + "description": "tags to filter by", + "required": false, + "style": "form", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "limit", + "in": "query", + "description": "maximum number of results to return", + "required": true, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 5 + } + }, + { + "name": "test", + "in": "query", + "description": "maximum number of results to return", + "required": true, + "schema": { + "type": "string", + "enum": ["one", "two"] + } + }, + { + "name": "testJson", + "in": "query", + "description": "JSON in query params", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "foo": { + "type": "string", + "enum": ["bar", "baz"] + } + } + } + } + } + }, + { + "name": "testArray", + "in": "query", + "description": "Array in query param", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": ["foo", "bar", "baz"] + } + }, + "style": "form", + "explode": false + }, + { + "name": "testArrayExplode", + "in": "query", + "description": "Array explode in query param", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": ["foo", "bar", "baz"] + } + }, + "style": "form", + "explode": true + } + ], + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "description": "Creates a new pet in the store. Duplicates are allowed", + "operationId": "addPet", + "requestBody": { + "description": "Pet to add to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewPet" + } + } + } + }, + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/pets/{id}": { + "get": { + "description": "Returns a user based on a single ID, if the user does not have access to the pet", + "operationId": "find pet by id", + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "description": "deletes a single pet based on the ID supplied", + "operationId": "deletePet", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to delete", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "pet deleted" + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/pets/{id}/photos": { + "post": { + "description": "upload a photo of the pet", + "operationId": "uploadPetPhoto", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to fetch", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "required": ["file", "metadata"], + "properties": { + "file": { + "description": "The photo", + "type": "string", + "format": "binary" + }, + "metadata": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "photo uploaded" + } + } + } + }, + "/pets/{id}/attributes": { + "get": { + "description": "Returns attributes for this pet", + "operationId": "find attributes", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to fetch", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "header", + "name": "X-Attribute-Id", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/pets/{id}/attributes/{attribute_id}": { + "get": { + "description": "Returns the attribute specified by attribute_id", + "operationId": "find attributes by pet id", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to fetch", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "path", + "name": "attribute_id", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/route_not_defined_within_express": { + "get": { + "description": "Returns attributes for this pet", + "operationId": "route-not-defined-within-express", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "the name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "parameters": { + "id": { + "name": "id", + "in": "path", + "description": "ID of pet to fetch", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "schemas": { + "NewPet": { + "required": ["name"], + "properties": { + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "Pet": { + "allOf": [ + { + "$ref": "#/components/schemas/NewPet" + }, + { + "required": ["id"], + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "NewAttribute": { + "required": ["name"], + "properties": { + "name": { + "type": "string" + } + } + }, + "Attribute": { + "allOf": [ + { + "$ref": "#/components/schemas/NewAttribute" + }, + { + "required": ["id"], + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "NewPhoto": { + "type": "object", + "required": ["file"], + "properties": { + "file": { + "description": "The photo", + "type": "string", + "format": "binary" + } + } + }, + "Error": { + "required": ["code", "message"], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } + } } diff --git a/test/resources/path.order.yaml b/test/resources/path.order.yaml index b6578542..7b660c30 100644 --- a/test/resources/path.order.yaml +++ b/test/resources/path.order.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.0" +openapi: '3.0.0' info: version: 1.0.0 title: Swagger Petstore @@ -22,12 +22,12 @@ paths: schema: type: string responses: - "200": + '200': description: user response content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' /users/jimmy: post: @@ -38,14 +38,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' responses: - "200": + '200': description: user response content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' components: schemas: diff --git a/test/resources/path.params.yaml b/test/resources/path.params.yaml index 014afadc..22d7a29b 100644 --- a/test/resources/path.params.yaml +++ b/test/resources/path.params.yaml @@ -1,7 +1,7 @@ -openapi: "3.0.0" +openapi: '3.0.0' info: - title: "Test for allOf" - version: "1" + title: 'Test for allOf' + version: '1' servers: - url: /v1/ paths: @@ -15,11 +15,11 @@ paths: type: string responses: 200: - description: "" + description: '' content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' /users_alt/{id}: parameters: - name: id @@ -30,11 +30,11 @@ paths: get: responses: 200: - description: "" + description: '' content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' /multi_users/{ids}: get: summary: Deletes Features given a number of uuids. @@ -48,13 +48,13 @@ paths: type: string style: simple responses: - "200": + '200': description: Features were successfully deleted content: application/json: schema: type: object - "/user_lookup:{name}": + '/user_lookup:{name}': get: parameters: - name: name @@ -64,15 +64,15 @@ paths: type: string responses: 200: - description: "" + description: '' content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' components: schemas: User: type: object properties: id: - type: "string" + type: 'string' diff --git a/test/resources/query.params.yaml b/test/resources/query.params.yaml index 599552d7..491a041b 100644 --- a/test/resources/query.params.yaml +++ b/test/resources/query.params.yaml @@ -44,7 +44,7 @@ paths: /allow_reserved: get: parameters: - - name: value + - name: value in: query required: true schema: @@ -57,7 +57,7 @@ paths: /allow_reserved/array_explode: get: parameters: - - name: value + - name: value in: query required: true schema: diff --git a/test/resources/query.serialization.yaml b/test/resources/query.serialization.yaml index 5ffb5d24..63d0139b 100644 --- a/test/resources/query.serialization.yaml +++ b/test/resources/query.serialization.yaml @@ -6,7 +6,7 @@ info: paths: /api/q_form_explode: get: - parameters: + parameters: - description: Description schema: title: State @@ -26,7 +26,7 @@ paths: /api/q_form_nexplode: get: - parameters: + parameters: - description: Description required: false explode: false @@ -37,7 +37,7 @@ paths: $ref: '#/components/schemas/Foo' description: A description name: state - in: query + in: query responses: 200: description: OK @@ -45,8 +45,7 @@ paths: 'application/json; charset=utf-8': schema: type: object - - + components: schemas: Foo: @@ -54,5 +53,3 @@ components: enum: - on - off - - \ No newline at end of file diff --git a/test/resources/read.only.yaml b/test/resources/read.only.yaml index ffc5670f..23978698 100644 --- a/test/resources/read.only.yaml +++ b/test/resources/read.only.yaml @@ -145,11 +145,11 @@ paths: application/json: schema: $ref: '#/components/schemas/ProductNested' - + /readonly_required_allof: post: description: readonly required - parameters: + parameters: - name: include_id in: query schema: @@ -162,7 +162,7 @@ paths: schema: type: object properties: - optional: + optional: type: string responses: '200': diff --git a/test/resources/response.object.serializer.yaml b/test/resources/response.object.serializer.yaml index dce9c369..955bc081 100644 --- a/test/resources/response.object.serializer.yaml +++ b/test/resources/response.object.serializer.yaml @@ -1,7 +1,7 @@ -openapi: "3.0.0" +openapi: '3.0.0' info: - title: "Test for allOf" - version: "1" + title: 'Test for allOf' + version: '1' servers: - url: /v1/ paths: @@ -59,7 +59,7 @@ components: User: type: object properties: - id: + id: type: number created_at: - $ref: "#/components/schemas/Date" + $ref: '#/components/schemas/Date' diff --git a/test/resources/response.validation.defaults.yaml b/test/resources/response.validation.defaults.yaml index 518adc85..0f532ebb 100644 --- a/test/resources/response.validation.defaults.yaml +++ b/test/resources/response.validation.defaults.yaml @@ -5,38 +5,38 @@ info: servers: - url: /v1 paths: - /default_inline: - get: - parameters: - - name: q - in: 'query' - required: true - schema: - type: string - responses: - '200': - description: Success - content: - 'application/json': - schema: - type: object - properties: - data: - description: Some data - type: string - required: - - data - default: - description: Unexpected error - content: - 'application/json': - schema: - required: - - code - - message - properties: - code: - type: integer - format: int32 - message: - type: string \ No newline at end of file + /default_inline: + get: + parameters: + - name: q + in: 'query' + required: true + schema: + type: string + responses: + '200': + description: Success + content: + 'application/json': + schema: + type: object + properties: + data: + description: Some data + type: string + required: + - data + default: + description: Unexpected error + content: + 'application/json': + schema: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/test/resources/response.validation.yaml b/test/resources/response.validation.yaml index 550c4b8e..e26437d6 100644 --- a/test/resources/response.validation.yaml +++ b/test/resources/response.validation.yaml @@ -49,7 +49,7 @@ paths: responses: '204': description: empty - + /boolean: description: get boolean responses get: diff --git a/test/resources/routes/pets.js b/test/resources/routes/pets.js index 3b3e8be0..7e85650b 100644 --- a/test/resources/routes/pets.js +++ b/test/resources/routes/pets.js @@ -24,7 +24,7 @@ module.exports = { console.log(req.files); res.status(201).json({ - files_metadata: req.files.map(f => ({ + files_metadata: req.files.map((f) => ({ originalname: f.originalname, encoding: f.encoding, mimetype: f.mimetype, @@ -55,7 +55,7 @@ module.exports = { console.log(req.files); res.status(201).json({ - files_metadata: req.files.map(f => ({ + files_metadata: req.files.map((f) => ({ originalname: f.originalname, encoding: f.encoding, mimetype: f.mimetype, diff --git a/test/resources/security.top.level.yaml b/test/resources/security.top.level.yaml index 7f6e9534..5fa4d6ea 100644 --- a/test/resources/security.top.level.yaml +++ b/test/resources/security.top.level.yaml @@ -43,7 +43,7 @@ paths: get: security: - ApiKeyQueryAuth: [] - parameters: + parameters: - name: param1 in: query schema: diff --git a/test/resources/security.yaml b/test/resources/security.yaml index 6ae8de5b..d26e5f57 100644 --- a/test/resources/security.yaml +++ b/test/resources/security.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.2" +openapi: '3.0.2' info: version: 1.0.0 title: requestBodies $ref @@ -15,15 +15,15 @@ paths: BearerAuth: [] - BasicAuth: [] responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized /no_security: get: responses: - "200": + '200': description: OK /api_key: @@ -31,9 +31,9 @@ paths: security: - ApiKeyAuth: [] responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized /api_key_or_anonymous: @@ -43,9 +43,9 @@ paths: - {} - ApiKeyAuth: [] responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized # This api key with scopes should fail validation and return 500 @@ -53,11 +53,11 @@ paths: /api_key_with_scopes: get: security: - - ApiKeyAuth: ["read", "write"] + - ApiKeyAuth: ['read', 'write'] responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized /bearer: @@ -65,9 +65,9 @@ paths: security: - BearerAuth: [] responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized /basic: @@ -75,9 +75,9 @@ paths: security: - BasicAuth: [] responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized /cookie_auth: @@ -85,9 +85,9 @@ paths: security: - CookieAuth: [] responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized /oauth2: @@ -97,9 +97,9 @@ paths: - scope1 - scope2 responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized /openid: @@ -109,9 +109,9 @@ paths: - scope1 - scope2 responses: - "200": + '200': description: OK - "401": + '401': description: unauthorized components: diff --git a/test/resources/serdes.yaml b/test/resources/serdes.yaml index 6a4f29ed..41e1f48a 100644 --- a/test/resources/serdes.yaml +++ b/test/resources/serdes.yaml @@ -1,7 +1,7 @@ -openapi: "3.0.0" +openapi: '3.0.0' info: - title: "Test for allOf" - version: "1" + title: 'Test for allOf' + version: '1' servers: - url: /v1/ paths: @@ -12,7 +12,7 @@ paths: in: path required: true schema: - $ref: "#/components/schemas/ObjectId" + $ref: '#/components/schemas/ObjectId' - name: date-time-from-inline in: query required: false @@ -23,7 +23,7 @@ paths: in: query required: false schema: - $ref: "#/components/schemas/DateTime" + $ref: '#/components/schemas/DateTime' - name: baddateresponse in: query schema: @@ -33,15 +33,15 @@ paths: in: query required: false schema: - $ref: "#/components/schemas/ShortOrLong" + $ref: '#/components/schemas/ShortOrLong' responses: 200: - description: "" + description: '' content: application/json: schema: allOf: - - $ref: "#/components/schemas/User" + - $ref: '#/components/schemas/User' - type: object properties: summary: @@ -56,7 +56,7 @@ paths: /users: post: requestBody: - content : + content: application/json: schema: allOf: @@ -68,12 +68,12 @@ paths: format: date-time responses: 200: - description: "" + description: '' content: application/json: schema: allOf: - - $ref: "#/components/schemas/User" + - $ref: '#/components/schemas/User' - type: object properties: summary: @@ -110,12 +110,12 @@ components: type: object properties: id: - $ref: "#/components/schemas/ObjectId" + $ref: '#/components/schemas/ObjectId' tags: - $ref: "#/components/schemas/StringList" + $ref: '#/components/schemas/StringList' creationDateTime: - $ref: "#/components/schemas/DateTime" + $ref: '#/components/schemas/DateTime' creationDate: - $ref: "#/components/schemas/Date" + $ref: '#/components/schemas/Date' shortOrLong: - $ref: "#/components/schemas/ShortOrLong" + $ref: '#/components/schemas/ShortOrLong' diff --git a/test/resources/serialized-deep-object.objects.yaml b/test/resources/serialized-deep-object.objects.yaml index 4ede419f..0517f3c6 100644 --- a/test/resources/serialized-deep-object.objects.yaml +++ b/test/resources/serialized-deep-object.objects.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.2" +openapi: '3.0.2' info: version: 1.0.0 title: Request Query Serialization @@ -12,7 +12,7 @@ paths: x-vendorExtension1: accounts get: x-vendorExtension2: accounts - summary: "retrieve a deep object" + summary: 'retrieve a deep object' operationId: getDeepObject parameters: - in: query @@ -31,21 +31,21 @@ paths: minItems: 1 state: type: string - enum: ["default", "validated", "pending"] - default: "default" + enum: ['default', 'validated', 'pending'] + default: 'default' description: "Filter the tags by their validity. The default value ('default') stands for no filtering." greeting: type: string - default: "hello" + default: 'hello' responses: - "200": + '200': description: the object /deep_object_2: get: parameters: - - $ref: '#/components/parameters/pedestrian' + - $ref: '#/components/parameters/pedestrian' responses: - "200": + '200': description: the object components: @@ -76,7 +76,7 @@ components: # greeting: # type: string # default: "hello" - + parameters: pedestrian: name: pedestrian diff --git a/test/resources/serialized.objects.defaults.yaml b/test/resources/serialized.objects.defaults.yaml index 4cd9e9ec..cd892729 100644 --- a/test/resources/serialized.objects.defaults.yaml +++ b/test/resources/serialized.objects.defaults.yaml @@ -2,8 +2,8 @@ components: schemas: PageSort: allOf: - - $ref: "#/components/schemas/Paging" - - $ref: "#/components/schemas/Sorting" + - $ref: '#/components/schemas/Paging' + - $ref: '#/components/schemas/Sorting' Paging: properties: page: @@ -47,10 +47,10 @@ paths: in: query name: pagesort schema: - $ref: "#/components/schemas/PageSort" + $ref: '#/components/schemas/PageSort' style: deepObject responses: - "200": + '200': description: description content: application/json: diff --git a/test/resources/serialized.objects.yaml b/test/resources/serialized.objects.yaml index bdf62637..8c36004b 100644 --- a/test/resources/serialized.objects.yaml +++ b/test/resources/serialized.objects.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.2" +openapi: '3.0.2' info: version: 1.0.0 title: Request Query Serialization @@ -12,7 +12,7 @@ paths: x-vendorExtension1: accounts get: x-vendorExtension2: accounts - summary: "retrieve a deep object" + summary: 'retrieve a deep object' operationId: getDeepObject parameters: - in: query @@ -30,19 +30,19 @@ paths: minItems: 1 state: type: string - enum: ["default", "validated", "pending"] - default: "default" + enum: ['default', 'validated', 'pending'] + default: 'default' description: "Filter the tags by their validity. The default value ('default') stands for no filtering." greeting: type: string - default: "hello" + default: 'hello' responses: - "200": + '200': description: the object /deep_object_2: get: - summary: "retrieve a deep object" + summary: 'retrieve a deep object' operationId: getDeepObject2 parameters: - in: query @@ -52,11 +52,11 @@ paths: schema: $ref: '#/components/schemas/Deep' responses: - "200": + '200': description: the object /tags: get: - summary: "Retrieve all tags" + summary: 'Retrieve all tags' operationId: getTags parameters: - in: query @@ -74,15 +74,15 @@ paths: minItems: 1 state: type: string - enum: ["default", "validated", "pending"] - default: "default" + enum: ['default', 'validated', 'pending'] + default: 'default' description: "Filter the tags by their validity. The default value ('default') stands for no filtering." responses: - "200": - description: "An array of tag" + '200': + description: 'An array of tag' /serialisable: get: - summary: "Retrieve something" + summary: 'Retrieve something' parameters: - in: query style: form @@ -109,7 +109,7 @@ paths: description: Should not be serialized schema: description: Value passed to Javascript's `new Date()`. - example: "2019-06-24T12:34:56.789Z" + example: '2019-06-24T12:34:56.789Z' anyOf: - type: integer description: Unix milliseconds @@ -134,7 +134,7 @@ paths: required: - foo responses: - "200": + '200': description: parsed & validated query params content: application/json: @@ -143,7 +143,7 @@ paths: components: schemas: - Deep: + Deep: type: object properties: tag_ids: @@ -154,9 +154,9 @@ components: minItems: 1 state: type: string - enum: ["default", "validated", "pending"] - default: "default" + enum: ['default', 'validated', 'pending'] + default: 'default' description: "Filter the tags by their validity. The default value ('default') stands for no filtering." greeting: type: string - default: "hello" + default: 'hello' diff --git a/test/resources/servers.1.yaml b/test/resources/servers.1.yaml index eeed9719..11d3a218 100644 --- a/test/resources/servers.1.yaml +++ b/test/resources/servers.1.yaml @@ -18,7 +18,7 @@ servers: paths: /ping: get: - parameters: + parameters: - name: id in: query required: true diff --git a/test/resources/servers.2.yaml b/test/resources/servers.2.yaml index bdd805a2..77e6c3e8 100644 --- a/test/resources/servers.2.yaml +++ b/test/resources/servers.2.yaml @@ -18,7 +18,7 @@ servers: paths: /ping: get: - parameters: + parameters: - name: id in: query required: true diff --git a/test/resources/services/index.js b/test/resources/services/index.js index 1c7afd6e..d7822814 100644 --- a/test/resources/services/index.js +++ b/test/resources/services/index.js @@ -24,11 +24,11 @@ module.exports.Pets = class { this.id = 4; } findAll({ type, limit }) { - return data.filter(d => d.type === type).slice(0, limit); + return data.filter((d) => d.type === type).slice(0, limit); } findById(id) { - return data.filter(p => p.id === id)[0]; + return data.filter((p) => p.id === id)[0]; } create(pet) { @@ -38,6 +38,6 @@ module.exports.Pets = class { } delete(id) { - return data.filter(e => e.id !== id); + return data.filter((e) => e.id !== id); } -} +}; diff --git a/test/resources/sub_files/paths/auth.yaml b/test/resources/sub_files/paths/auth.yaml index d5860cf4..50ce1f2c 100644 --- a/test/resources/sub_files/paths/auth.yaml +++ b/test/resources/sub_files/paths/auth.yaml @@ -1,7 +1,7 @@ paths: /auth/login: post: - summary: "Logs user into the system" + summary: 'Logs user into the system' operationId: signIn tags: - guest @@ -10,7 +10,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Auth" + $ref: '#/components/schemas/Auth' responses: '200': description: A JSON containing the JWT Token and some information about the user @@ -18,7 +18,7 @@ paths: application/json: schema: allOf: - - $ref: "#/components/schemas/JWTToken" + - $ref: '#/components/schemas/JWTToken' - type: object description: Some basic information on this user properties: @@ -27,14 +27,14 @@ paths: properties: fullName: type: string - description: "The full name of this user" - example: "Eric Cartman" + description: 'The full name of this user' + example: 'Eric Cartman' minLength: 1 maxLength: 50 role: type: string enum: [admin, user] - description: "What kind of user are we ?" + description: 'What kind of user are we ?' required: - fullName - role @@ -42,14 +42,14 @@ paths: - user # Definition of all error statuses default: - description: "Whatever error : 4XX - Client error (Bad Request, Unauthorized, etc.) , 5XX - Server error" + description: 'Whatever error : 4XX - Client error (Bad Request, Unauthorized, etc.) , 5XX - Server error' content: application/json: schema: - $ref: "#/components/schemas/ErrorObject" + $ref: '#/components/schemas/ErrorObject' /auth/register: post: - summary: "Creates a new user into the system" + summary: 'Creates a new user into the system' operationId: register tags: - guest @@ -59,13 +59,13 @@ paths: application/json: schema: allOf: - - $ref: "#/components/schemas/Auth" + - $ref: '#/components/schemas/Auth' - type: object properties: fullName: type: string - example: "Some User" - description: "The full name of this new user" + example: 'Some User' + description: 'The full name of this new user' minLength: 1 maxLength: 50 required: @@ -75,11 +75,11 @@ paths: description: OK # Definition of all error statuses default: - description: "Whatever error : 4XX - Client error (Bad Request, Unauthorized, etc.) , 5XX - Server error" + description: 'Whatever error : 4XX - Client error (Bad Request, Unauthorized, etc.) , 5XX - Server error' content: application/json: schema: - $ref: "#/components/schemas/ErrorObject" + $ref: '#/components/schemas/ErrorObject' components: schemas: @@ -89,11 +89,11 @@ components: email: type: string format: email - example: "jy95@perdu.com" + example: 'jy95@perdu.com' password: type: string format: password - example: "42" + example: '42' required: - email - password @@ -118,4 +118,4 @@ components: description: Explanation about an error required: - message - - errors \ No newline at end of file + - errors diff --git a/test/resources/unknown.formats.yaml b/test/resources/unknown.formats.yaml index 95735e5c..82acca03 100644 --- a/test/resources/unknown.formats.yaml +++ b/test/resources/unknown.formats.yaml @@ -3,7 +3,7 @@ info: title: Formats version: 1.0.0 servers: -- url: /v1 + - url: /v1 paths: /persons: post: @@ -16,12 +16,11 @@ paths: 200: description: Invalid ID supplied - components: schemas: Person: required: - - id + - id type: object properties: id: @@ -32,4 +31,4 @@ components: hypertext: type: string format: hypertext - example: "

Hello. I am..." \ No newline at end of file + example: '

Hello. I am...' diff --git a/test/resources/unknown.keywords.yaml b/test/resources/unknown.keywords.yaml index b254d601..9938f5eb 100644 --- a/test/resources/unknown.keywords.yaml +++ b/test/resources/unknown.keywords.yaml @@ -3,7 +3,7 @@ info: title: Keywords version: 1.0.0 servers: -- url: /v1 + - url: /v1 paths: /persons: post: @@ -21,7 +21,7 @@ components: schemas: Person: required: - - id + - id type: object x-custom-keyword: Ignored by validator. properties: diff --git a/test/resources/wildcard.path.params.yaml b/test/resources/wildcard.path.params.yaml index 13bf3a4a..b84b50e8 100644 --- a/test/resources/wildcard.path.params.yaml +++ b/test/resources/wildcard.path.params.yaml @@ -3,7 +3,7 @@ info: title: dummy api version: 1.0.0 servers: -- url: /v1 + - url: /v1 paths: /d1/{id}: @@ -91,4 +91,4 @@ paths: responses: 200: description: dummy response - content: {} \ No newline at end of file + content: {} diff --git a/test/resources/write.only.yaml b/test/resources/write.only.yaml index cf8d62e1..9868f07d 100644 --- a/test/resources/write.only.yaml +++ b/test/resources/write.only.yaml @@ -15,7 +15,7 @@ paths: post: description: create products operationId: createProductsInline - parameters: + parameters: - name: exclude_write_only in: query schema: @@ -50,7 +50,7 @@ paths: post: description: create products operationId: createProductsNested - parameters: + parameters: - name: exclude_write_only in: query schema: @@ -96,7 +96,7 @@ components: ProductNested: type: object required: - - "password" + - 'password' properties: id: type: string @@ -126,7 +126,7 @@ components: Review: type: object required: - - "review_password" + - 'review_password' properties: id: type: integer diff --git a/test/resources/xt.newpet.yaml b/test/resources/xt.newpet.yaml index 971d0750..86bea101 100644 --- a/test/resources/xt.newpet.yaml +++ b/test/resources/xt.newpet.yaml @@ -7,4 +7,4 @@ NewPet: type: string nullable: true tag: - type: string \ No newline at end of file + type: string diff --git a/test/resources/xt.openapi.parameters.yaml b/test/resources/xt.openapi.parameters.yaml index 105f04c9..a262f7d1 100644 --- a/test/resources/xt.openapi.parameters.yaml +++ b/test/resources/xt.openapi.parameters.yaml @@ -6,4 +6,4 @@ parameters: required: true schema: type: integer - format: int64 \ No newline at end of file + format: int64 diff --git a/test/response.object.serializer.spec.ts b/test/response.object.serializer.spec.ts index ffffeb6c..3d0b13d5 100644 --- a/test/response.object.serializer.spec.ts +++ b/test/response.object.serializer.spec.ts @@ -31,10 +31,12 @@ describe('response serializer', () => { app.get([`${app.basePath}/array-of-date-times`], (req, res) => { let date = new Date('2020-12-20T07:28:19.213Z'); res.json({ - users: [{ - id: req.params.id, - created_at: date, - }], + users: [ + { + id: req.params.id, + created_at: date, + }, + ], }); }); app.get([`${app.basePath}/date`], (req, res) => { @@ -80,7 +82,9 @@ describe('response serializer', () => { .get(`${app.basePath}/array-of-date-times`) .expect(200) .then((r) => { - expect(r.body.users[0].created_at).to.equal('2020-12-20T07:28:19.213Z'); + expect(r.body.users[0].created_at).to.equal( + '2020-12-20T07:28:19.213Z', + ); })); }); }); diff --git a/test/response.validation.coerce.types.spec.ts b/test/response.validation.coerce.types.spec.ts index f13108a1..b36c14e1 100644 --- a/test/response.validation.coerce.types.spec.ts +++ b/test/response.validation.coerce.types.spec.ts @@ -48,7 +48,5 @@ describe('response validation with type coercion', () => { expect(r.body).to.equal(true); })); it('should coerce id from string to number', async () => - request(app) - .get(`${app.basePath}/object`) - .expect(200)); + request(app).get(`${app.basePath}/object`).expect(200)); }); diff --git a/test/response.validation.on.error.spec.ts b/test/response.validation.on.error.spec.ts index 36ad9643..465a9a38 100644 --- a/test/response.validation.on.error.spec.ts +++ b/test/response.validation.on.error.spec.ts @@ -16,16 +16,16 @@ describe(packageJson.name, () => { { apiSpec: apiSpecPath, validateResponses: { - onError: function(_err, body) { + onError: function (_err, body) { onErrorArgs = Array.from(arguments); if (body[0].id === 'bad_id_throw') { throw new Error('error in onError handler'); } - } + }, }, }, 3005, - app => { + (app) => { app.get(`${app.basePath}/users`, (_req, res) => { const json = ['user1', 'user2', 'user3']; return res.json(json); @@ -52,7 +52,7 @@ describe(packageJson.name, () => { afterEach(() => { onErrorArgs = null; - }) + }); after(() => { app.server.close(); @@ -66,10 +66,12 @@ describe(packageJson.name, () => { const data = [{ id: 'bad_id', name: 'name', tag: 'tag' }]; expect(r.body).to.eql(data); expect(onErrorArgs.length).to.equal(3); - expect(onErrorArgs[0].message).to.equal('/response/0/id must be integer'); + expect(onErrorArgs[0].message).to.equal( + '/response/0/id must be integer', + ); expect(onErrorArgs[1]).to.eql(data); expect(onErrorArgs[2].query).to.eql({ - mode: 'bad_type' + mode: 'bad_type', }); })); @@ -90,7 +92,9 @@ describe(packageJson.name, () => { const data = [{ id: 'bad_id_throw', name: 'name', tag: 'tag' }]; expect(r.body.message).to.equal('error in onError handler'); expect(onErrorArgs.length).to.equal(3); - expect(onErrorArgs[0].message).to.equal('/response/0/id must be integer'); + expect(onErrorArgs[0].message).to.equal( + '/response/0/id must be integer', + ); expect(onErrorArgs[1]).to.eql(data); })); }); diff --git a/test/response.validator.spec.ts b/test/response.validator.spec.ts index c3b26c17..191ef067 100644 --- a/test/response.validator.spec.ts +++ b/test/response.validator.spec.ts @@ -8,7 +8,9 @@ import * as packageJson from '../package.json'; import { OpenAPIV3, OpenApiRequest } from '../src/framework/types'; const apiSpecPath = path.join('test', 'resources', 'response.validation.yaml'); -const apiSpec = jsyaml.load(fs.readFileSync(apiSpecPath, 'utf8')) as OpenAPIV3.Document; +const apiSpec = jsyaml.load( + fs.readFileSync(apiSpecPath, 'utf8'), +) as OpenAPIV3.Document; const fakeReq: OpenApiRequest = { method: 'GET', headers: { 'content-type': 'application/json' }, @@ -17,10 +19,10 @@ const fakeReq: OpenApiRequest = { describe(packageJson.name, () => { it('should validate the using default (in this case the error object)', async () => { const v = new ResponseValidator(cloneDeep(apiSpec), { - formats: { - 'date-time': true, - }, - strict: false, + formats: { + 'date-time': true, + }, + strict: false, }); const responses = petsResponseSchema(); const validators = v._getOrBuildValidator(fakeReq, responses); @@ -42,10 +44,10 @@ describe(packageJson.name, () => { it('should throw error when default response is invalid', async () => { const v = new ResponseValidator(apiSpec, { - formats: { - 'date-time': true, - }, - strict: false, + formats: { + 'date-time': true, + }, + strict: false, }); const responses = petsResponseSchema(); const validators = v._getOrBuildValidator(fakeReq, responses); @@ -71,10 +73,10 @@ describe(packageJson.name, () => { it('should return an error if field type is invalid', async () => { const v = new ResponseValidator(apiSpec, { - formats: { - 'date-time': true, - }, - strict: false, + formats: { + 'date-time': true, + }, + strict: false, }); const responses = petsResponseSchema(); const validators = v._getOrBuildValidator(fakeReq, responses); diff --git a/test/security.defaults.spec.ts b/test/security.defaults.spec.ts index 58b5e429..50866d86 100644 --- a/test/security.defaults.spec.ts +++ b/test/security.defaults.spec.ts @@ -61,7 +61,7 @@ describe('security.defaults', () => { .then((r) => { expect(r.body) .to.have.property('message') - .that.equals('cookie \'JSESSIONID\' required'); + .that.equals("cookie 'JSESSIONID' required"); }); }); }); diff --git a/test/security.disabled.spec.ts b/test/security.disabled.spec.ts index 610c0bf3..9e0c75b6 100644 --- a/test/security.disabled.spec.ts +++ b/test/security.disabled.spec.ts @@ -29,19 +29,13 @@ describe('security.disabled', () => { }); it('should return 200 if no security', async () => - request(app) - .get(`${basePath}/no_security`) - .expect(200)); + request(app).get(`${basePath}/no_security`).expect(200)); it('should skip validation, even if auth header is missing for basic auth', async () => { - return request(app) - .get(`${basePath}/basic`) - .expect(200); + return request(app).get(`${basePath}/basic`).expect(200); }); it('should skip security validation, even if auth header is missing for bearer auth', async () => { - return request(app) - .get(`${basePath}/bearer`) - .expect(200); + return request(app).get(`${basePath}/bearer`).expect(200); }); }); diff --git a/test/security.top.level.spec.ts b/test/security.top.level.spec.ts index 8f8641a8..e5113494 100644 --- a/test/security.top.level.spec.ts +++ b/test/security.top.level.spec.ts @@ -38,7 +38,7 @@ describe('security.top.level', () => { request(app) .get(`${basePath}/api_key`) .expect(401) - .then(r => { + .then((r) => { const body = r.body; expect(body.errors).to.be.an('array'); expect(body.errors).to.have.length(1); @@ -56,7 +56,7 @@ describe('security.top.level', () => { .get(`${basePath}/api_key_undefined_path`) .set('X-API-Key', 'test') .expect(404) - .then(r => { + .then((r) => { const body = r.body; expect(body.errors).to.be.an('array'); expect(body.errors).to.have.length(1); @@ -68,7 +68,7 @@ describe('security.top.level', () => { .post(`${basePath}/api_key`) .set('X-API-Key', 'test') .expect(405) - .then(r => { + .then((r) => { const body = r.body; expect(body.errors).to.be.an('array'); expect(body.errors).to.have.length(1); @@ -98,15 +98,13 @@ describe('security.top.level', () => { .expect(200), ); it('should return 200 if apikey or anonymous', async () => - request(app) - .get(`${basePath}/api_key_or_anonymous`) - .expect(200)); + request(app).get(`${basePath}/api_key_or_anonymous`).expect(200)); it('should override api key with bearer and return 401 if bearer is missing', async () => request(app) .get(`${basePath}/bearer`) .expect(401) - .then(r => { + .then((r) => { const body = r.body; expect(body.errors).to.be.an('array'); expect(body.errors).to.have.length(1); @@ -122,12 +120,8 @@ describe('security.top.level', () => { .expect(200)); it('should override api key with anonymous', async () => - request(app) - .get(`${basePath}/anonymous_2`) - .expect(200)); + request(app).get(`${basePath}/anonymous_2`).expect(200)); it('should override api key with anonymous', async () => - request(app) - .get(`${basePath}/anonymous`) - .expect(200)); + request(app).get(`${basePath}/anonymous`).expect(200)); }); diff --git a/test/serdes.spec.ts b/test/serdes.spec.ts index 25774403..e3504b4e 100644 --- a/test/serdes.spec.ts +++ b/test/serdes.spec.ts @@ -10,19 +10,18 @@ const apiSpecPath = path.join('test', 'resources', 'serdes.yaml'); class ObjectID { id: string; - constructor(id: string = "5fdefd13a6640bb5fb5fa925") { + constructor(id: string = '5fdefd13a6640bb5fb5fa925') { this.id = id; } toString() { return this.id; } - } class BadDate extends Date { public toISOString(): string { - return "oh no a bad iso date"; + return 'oh no a bad iso date'; } } @@ -30,9 +29,9 @@ function toSummary(title, value) { return { [title]: { value: value?.toISOString?.() || value?.toString(), - typeof: typeof value - } - } + typeof: typeof value, + }, + }; } describe('serdes', () => { @@ -44,16 +43,16 @@ describe('serdes', () => { { apiSpec: apiSpecPath, validateRequests: { - coerceTypes: true + coerceTypes: true, }, validateResponses: { - coerceTypes: true + coerceTypes: true, }, serDes: [ date, dateTime, { - format: "mongo-objectid", + format: 'mongo-objectid', deserialize: (s) => new ObjectID(s), serialize: (o) => o.toString(), }, @@ -64,36 +63,54 @@ describe('serdes', () => { (app) => { app.get([`${app.basePath}/users/:id?`], (req, res) => { if (typeof req.params.id !== 'object') { - throw new Error("Should be deserialized to ObjectId object"); + throw new Error('Should be deserialized to ObjectId object'); } - let date = new Date("2020-12-20T07:28:19.213Z"); + let date = new Date('2020-12-20T07:28:19.213Z'); res.json({ id: req.params.id, creationDateTime: date, creationDate: date, shortOrLong: 'a', summary: { - ...toSummary('req.query.date-time-from-inline', req.query['date-time-from-inline']), - ...toSummary('req.query.date-time-from-schema', req.query['date-time-from-schema']), + ...toSummary( + 'req.query.date-time-from-inline', + req.query['date-time-from-inline'], + ), + ...toSummary( + 'req.query.date-time-from-schema', + req.query['date-time-from-schema'], + ), }, }); }); app.post([`${app.basePath}/users`], (req, res) => { if (typeof req.body.id !== 'object') { - throw new Error("Should be deserialized to ObjectId object"); + throw new Error('Should be deserialized to ObjectId object'); } - if (typeof req.body.creationDate !== 'object' || !(req.body.creationDate instanceof Date)) { - throw new Error("Should be deserialized to Date object"); + if ( + typeof req.body.creationDate !== 'object' || + !(req.body.creationDate instanceof Date) + ) { + throw new Error('Should be deserialized to Date object'); } - if (typeof req.body.creationDateTime !== 'object' || !(req.body.creationDateTime instanceof Date)) { - throw new Error("Should be deserialized to Date object"); + if ( + typeof req.body.creationDateTime !== 'object' || + !(req.body.creationDateTime instanceof Date) + ) { + throw new Error('Should be deserialized to Date object'); } - if (typeof req.body.creationDateTimeInline !== 'object' || !(req.body.creationDateTimeInline instanceof Date)) { - throw new Error("Should be deserialized to Date object"); + if ( + typeof req.body.creationDateTimeInline !== 'object' || + !(req.body.creationDateTimeInline instanceof Date) + ) { + throw new Error('Should be deserialized to Date object'); } res.json({ ...req.body, - summary: Object.entries(req.body).reduce((acc, [k, v]) => Object.assign(acc, toSummary(k, v)), {}) + summary: Object.entries(req.body).reduce( + (acc, [k, v]) => Object.assign(acc, toSummary(k, v)), + {}, + ), }); }); app.use((err, req, res, next) => { @@ -105,7 +122,7 @@ describe('serdes', () => { }, false, ); - return app + return app; }); after(() => { @@ -117,21 +134,33 @@ describe('serdes', () => { .get(`${app.basePath}/users/1234`) .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/params/id must match pattern "^[0-9a-fA-F]{24}$"'); + expect(r.body.message).to.equal( + 'request/params/id must match pattern "^[0-9a-fA-F]{24}$"', + ); })); it('should control GOOD id format and get a response in expected format', async () => request(app) - .get(`${app.basePath}/users/5fdefd13a6640bb5fb5fa925?date-time-from-inline=2019-11-20T01%3A11%3A54.930Z&date-time-from-schema=2020-11-20T01%3A11%3A54.930Z`) + .get( + `${app.basePath}/users/5fdefd13a6640bb5fb5fa925?date-time-from-inline=2019-11-20T01%3A11%3A54.930Z&date-time-from-schema=2020-11-20T01%3A11%3A54.930Z`, + ) .expect(200) .then((r) => { expect(r.body.id).to.equal('5fdefd13a6640bb5fb5fa925'); expect(r.body.creationDate).to.equal('2020-12-20'); - expect(r.body.creationDateTime).to.equal("2020-12-20T07:28:19.213Z"); - expect(r.body.summary['req.query.date-time-from-schema'].value).to.equal("2020-11-20T01:11:54.930Z"); - expect(r.body.summary['req.query.date-time-from-schema'].typeof).to.equal("object"); - expect(r.body.summary['req.query.date-time-from-inline'].value).to.equal("2019-11-20T01:11:54.930Z"); - expect(r.body.summary['req.query.date-time-from-inline'].typeof).to.equal("object"); + expect(r.body.creationDateTime).to.equal('2020-12-20T07:28:19.213Z'); + expect( + r.body.summary['req.query.date-time-from-schema'].value, + ).to.equal('2020-11-20T01:11:54.930Z'); + expect( + r.body.summary['req.query.date-time-from-schema'].typeof, + ).to.equal('object'); + expect( + r.body.summary['req.query.date-time-from-inline'].value, + ).to.equal('2019-11-20T01:11:54.930Z'); + expect( + r.body.summary['req.query.date-time-from-inline'].typeof, + ).to.equal('object'); })); it('should POST also works with deserialize on request then serialize en response', async () => @@ -149,13 +178,21 @@ describe('serdes', () => { .then((r) => { expect(r.body.id).to.equal('5fdefd13a6640bb5fb5fa925'); expect(r.body.creationDate).to.equal('2020-12-20'); - expect(r.body.creationDateTime).to.equal("2020-12-20T07:28:19.213Z"); - expect(r.body.summary['creationDate'].value).to.equal('2020-12-20T00:00:00.000Z'); + expect(r.body.creationDateTime).to.equal('2020-12-20T07:28:19.213Z'); + expect(r.body.summary['creationDate'].value).to.equal( + '2020-12-20T00:00:00.000Z', + ); expect(r.body.summary['creationDate'].typeof).to.equal('object'); - expect(r.body.summary['creationDateTime'].value).to.equal('2020-12-20T07:28:19.213Z'); + expect(r.body.summary['creationDateTime'].value).to.equal( + '2020-12-20T07:28:19.213Z', + ); expect(r.body.summary['creationDateTime'].typeof).to.equal('object'); - expect(r.body.summary['creationDateTimeInline'].value).to.equal('2019-11-21T07:24:19.213Z'); - expect(r.body.summary['creationDateTimeInline'].typeof).to.equal('object'); + expect(r.body.summary['creationDateTimeInline'].value).to.equal( + '2019-11-21T07:24:19.213Z', + ); + expect(r.body.summary['creationDateTimeInline'].typeof).to.equal( + 'object', + ); })); it('should POST throw error on invalid schema ObjectId', async () => @@ -170,7 +207,9 @@ describe('serdes', () => { .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/id must match pattern "^[0-9a-fA-F]{24}$"'); + expect(r.body.message).to.equal( + 'request/body/id must match pattern "^[0-9a-fA-F]{24}$"', + ); })); it('should POST throw error on invalid schema Date', async () => @@ -179,12 +218,14 @@ describe('serdes', () => { .send({ id: '5fdefd13a6640bb5fb5fa925', creationDateTime: '2020-12-20T07:28:19.213Z', - creationDate: '2020-1f-20' + creationDate: '2020-1f-20', }) .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/creationDate must match format "date"'); + expect(r.body.message).to.equal( + 'request/body/creationDate must match format "date"', + ); })); it('should enforce anyOf validations', async () => @@ -209,8 +250,6 @@ describe('serdes', () => { })); }); - - describe('serdes serialize response components only', () => { let app = null; @@ -220,16 +259,16 @@ describe('serdes serialize response components only', () => { { apiSpec: apiSpecPath, validateRequests: { - coerceTypes: true + coerceTypes: true, }, validateResponses: { - coerceTypes: true + coerceTypes: true, }, serDes: [ date.serializer, dateTime.serializer, { - format: "mongo-objectid", + format: 'mongo-objectid', serialize: (o) => o.toString(), }, ], @@ -239,9 +278,9 @@ describe('serdes serialize response components only', () => { (app) => { app.get([`${app.basePath}/users/:id?`], (req, res) => { if (typeof req.params.id !== 'string') { - throw new Error("Should be not be deserialized to ObjectId object"); + throw new Error('Should be not be deserialized to ObjectId object'); } - let date = new Date("2020-12-20T07:28:19.213Z"); + let date = new Date('2020-12-20T07:28:19.213Z'); let result = { id: new ObjectID(req.params.id), creationDateTime: date, @@ -250,24 +289,22 @@ describe('serdes serialize response components only', () => { }; if (req.query.baddateresponse === 'functionNotExists') { result.creationDate = new ObjectID(); - } - else if (req.query.baddateresponse === 'functionBadFormat') { + } else if (req.query.baddateresponse === 'functionBadFormat') { result.creationDate = new BadDate(); - } - else { + } else { result.creationDate = date; } res.json(result); }); app.post([`${app.basePath}/users`], (req, res) => { if (typeof req.body.id !== 'string') { - throw new Error("Should NOT be deserialized to ObjectId object"); + throw new Error('Should NOT be deserialized to ObjectId object'); } if (typeof req.body.creationDate !== 'string') { - throw new Error("Should NTO be deserialized to Date object"); + throw new Error('Should NTO be deserialized to Date object'); } if (typeof req.body.creationDateTime !== 'string') { - throw new Error("Should NOT be deserialized to Date object"); + throw new Error('Should NOT be deserialized to Date object'); } req.body.id = new ObjectID(req.body.id); req.body.creationDateTime = new Date(req.body.creationDateTime); @@ -283,7 +320,7 @@ describe('serdes serialize response components only', () => { }, false, ); - return app + return app; }); after(() => { @@ -295,7 +332,9 @@ describe('serdes serialize response components only', () => { .get(`${app.basePath}/users/1234`) .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/params/id must match pattern "^[0-9a-fA-F]{24}$"'); + expect(r.body.message).to.equal( + 'request/params/id must match pattern "^[0-9a-fA-F]{24}$"', + ); })); it('should control GOOD id format and get a response in expected format', async () => @@ -305,7 +344,7 @@ describe('serdes serialize response components only', () => { .then((r) => { expect(r.body.id).to.equal('5fdefd13a6640bb5fb5fa925'); expect(r.body.creationDate).to.equal('2020-12-20'); - expect(r.body.creationDateTime).to.equal("2020-12-20T07:28:19.213Z"); + expect(r.body.creationDateTime).to.equal('2020-12-20T07:28:19.213Z'); })); it('should POST also works with deserialize on request then serialize en response', async () => @@ -314,14 +353,14 @@ describe('serdes serialize response components only', () => { .send({ id: '5fdefd13a6640bb5fb5fa925', creationDateTime: '2020-12-20T07:28:19.213Z', - creationDate: '2020-12-20' + creationDate: '2020-12-20', }) .set('Content-Type', 'application/json') .expect(200) .then((r) => { expect(r.body.id).to.equal('5fdefd13a6640bb5fb5fa925'); expect(r.body.creationDate).to.equal('2020-12-20'); - expect(r.body.creationDateTime).to.equal("2020-12-20T07:28:19.213Z"); + expect(r.body.creationDateTime).to.equal('2020-12-20T07:28:19.213Z'); })); it('should POST throw error on invalid schema ObjectId', async () => @@ -330,12 +369,14 @@ describe('serdes serialize response components only', () => { .send({ id: '5fdefd13a6640bb5fb5fa', creationDateTime: '2020-12-20T07:28:19.213Z', - creationDate: '2020-12-20' + creationDate: '2020-12-20', }) .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/id must match pattern "^[0-9a-fA-F]{24}$"'); + expect(r.body.message).to.equal( + 'request/body/id must match pattern "^[0-9a-fA-F]{24}$"', + ); })); it('should POST throw error on invalid schema Date', async () => @@ -344,12 +385,14 @@ describe('serdes serialize response components only', () => { .send({ id: '5fdefd13a6640bb5fb5fa925', creationDateTime: '2020-12-20T07:28:19.213Z', - creationDate: '2020-1f-20' + creationDate: '2020-1f-20', }) .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/creationDate must match format "date"'); + expect(r.body.message).to.equal( + 'request/body/creationDate must match format "date"', + ); })); it('should throw error 500 on invalid object type instead of Date expected', async () => @@ -397,7 +440,6 @@ describe('serdes serialize response components only', () => { })); */ - }); describe('serdes with array type string-list', () => { @@ -409,22 +451,22 @@ describe('serdes with array type string-list', () => { { apiSpec: apiSpecPath, validateRequests: { - coerceTypes: true + coerceTypes: true, }, validateResponses: { - coerceTypes: true + coerceTypes: true, }, serDes: [ date, dateTime, { - format: "mongo-objectid", + format: 'mongo-objectid', deserialize: (s) => new ObjectID(s), serialize: (o) => o.toString(), }, { format: 'string-list', - deserialize: (s): string[] => s.split(',').map(s => s.trim()), + deserialize: (s): string[] => s.split(',').map((s) => s.trim()), serialize: (o): string => (o as string[]).join(','), }, ], @@ -433,28 +475,34 @@ describe('serdes with array type string-list', () => { (app) => { app.get([`${app.basePath}/users/:id?`], (req, res) => { if (typeof req.params.id !== 'object') { - throw new Error("Should be deserialized to ObjectId object"); + throw new Error('Should be deserialized to ObjectId object'); } - let date = new Date("2020-12-20T07:28:19.213Z"); + let date = new Date('2020-12-20T07:28:19.213Z'); res.json({ id: req.params.id, tags: ['aa', 'bb', 'cc'], creationDateTime: date, - creationDate: date + creationDate: date, }); }); app.post([`${app.basePath}/users`], (req, res) => { if (typeof req.body.id !== 'object') { - throw new Error("Should be deserialized to ObjectId object"); + throw new Error('Should be deserialized to ObjectId object'); } if (!Array.isArray(req.body.tags)) { - throw new Error("Should be deserialized to an Array object"); + throw new Error('Should be deserialized to an Array object'); } - if (typeof req.body.creationDate !== 'object' || !(req.body.creationDate instanceof Date)) { - throw new Error("Should be deserialized to Date object"); + if ( + typeof req.body.creationDate !== 'object' || + !(req.body.creationDate instanceof Date) + ) { + throw new Error('Should be deserialized to Date object'); } - if (typeof req.body.creationDateTime !== 'object' || !(req.body.creationDateTime instanceof Date)) { - throw new Error("Should be deserialized to Date object"); + if ( + typeof req.body.creationDateTime !== 'object' || + !(req.body.creationDateTime instanceof Date) + ) { + throw new Error('Should be deserialized to Date object'); } res.json(req.body); }); @@ -467,7 +515,7 @@ describe('serdes with array type string-list', () => { }, false, ); - return app + return app; }); after(() => { @@ -479,7 +527,9 @@ describe('serdes with array type string-list', () => { .get(`${app.basePath}/users/1234`) .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/params/id must match pattern "^[0-9a-fA-F]{24}$"'); + expect(r.body.message).to.equal( + 'request/params/id must match pattern "^[0-9a-fA-F]{24}$"', + ); })); it('should control GOOD id format and get a response in expected format', async () => { @@ -489,12 +539,11 @@ describe('serdes with array type string-list', () => { .then((r) => { expect(r.body.id).to.equal('5fdefd13a6640bb5fb5fa925'); expect(r.body.creationDate).to.equal('2020-12-20'); - expect(r.body.creationDateTime).to.equal("2020-12-20T07:28:19.213Z"); + expect(r.body.creationDateTime).to.equal('2020-12-20T07:28:19.213Z'); expect(r.body.tags).to.equal('aa,bb,cc'); - }) + }); }); - it('should POST also works with deserialize on request then serialize en response', async () => request(app) .post(`${app.basePath}/users`) @@ -510,7 +559,7 @@ describe('serdes with array type string-list', () => { .then((r) => { expect(r.body.id).to.equal('5fdefd13a6640bb5fb5fa925'); expect(r.body.creationDate).to.equal('2020-12-20'); - expect(r.body.creationDateTime).to.equal("2020-12-20T07:28:19.213Z"); + expect(r.body.creationDateTime).to.equal('2020-12-20T07:28:19.213Z'); expect(r.body.tags).to.equal('aa,bb,cc'); })); @@ -521,12 +570,14 @@ describe('serdes with array type string-list', () => { id: '5fdefd13a6640bb5fb5fa', tags: 'aa,bb,cc', creationDateTime: '2020-12-20T07:28:19.213Z', - creationDate: '2020-12-20' + creationDate: '2020-12-20', }) .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/id must match pattern "^[0-9a-fA-F]{24}$"'); + expect(r.body.message).to.equal( + 'request/body/id must match pattern "^[0-9a-fA-F]{24}$"', + ); })); it('should POST throw error on invalid schema Date', async () => @@ -536,12 +587,14 @@ describe('serdes with array type string-list', () => { id: '5fdefd13a6640bb5fb5fa925', tags: 'aa,bb,cc', creationDateTime: '2020-12-20T07:28:19.213Z', - creationDate: '2020-1f-20' + creationDate: '2020-1f-20', }) .set('Content-Type', 'application/json') .expect(400) .then((r) => { - expect(r.body.message).to.equal('request/body/creationDate must match format "date"'); + expect(r.body.message).to.equal( + 'request/body/creationDate must match format "date"', + ); })); it('should POST throw error for deserialize on request of non-string format', async () => @@ -551,7 +604,7 @@ describe('serdes with array type string-list', () => { id: '5fdefd13a6640bb5fb5fa925', tags: ['aa', 'bb', 'cc'], creationDateTime: '2020-12-20T07:28:19.213Z', - creationDate: '2020-12-20' + creationDate: '2020-12-20', }) .set('Content-Type', 'application/json') .expect(400) @@ -580,5 +633,3 @@ describe('serdes with array type string-list', () => { ); })); }); - - diff --git a/test/servers.spec.ts b/test/servers.spec.ts index ed229c29..f525f28c 100644 --- a/test/servers.spec.ts +++ b/test/servers.spec.ts @@ -14,9 +14,15 @@ describe(packageJson.name, () => { }, 3005, (app) => { - app.get(`/api/v1/petstore/ping`, (req, res) => res.json({ ...req.body })); - app.get(`/api/v2/storeofpets/ping`, (req, res) => res.json({ ...req.body })); - app.get(`/api/v3/petstore/ping`, (req, res) => res.json({ ...req.body })); + app.get(`/api/v1/petstore/ping`, (req, res) => + res.json({ ...req.body }), + ); + app.get(`/api/v2/storeofpets/ping`, (req, res) => + res.json({ ...req.body }), + ); + app.get(`/api/v3/petstore/ping`, (req, res) => + res.json({ ...req.body }), + ); }, true, ); @@ -31,43 +37,48 @@ describe(packageJson.name, () => { request(app).get('/api/v2/storeofpets/ping').send({}).expect(400)); it('should skip validation of api path with invalid enum value v3, and valid value petstore', async () => - // the validator should not validate routes that do note match one declare in the opeanpi apec - // in this case, 'v3' is not a valid value for api - // TODO throw an error instead of ignoring it + // the validator should not validate routes that do note match one declare in the opeanpi apec + // in this case, 'v3' is not a valid value for api + // TODO throw an error instead of ignoring it request(app).get('/api/v3/petstore/ping').send({}).expect(200)); }); describe(packageJson.name, () => { - let app = null; - - before(async () => { - const apiSpec = path.join('test', 'resources', 'servers.2.yaml'); - app = await createApp( - { - apiSpec, - }, - 3005, - (app) => { - app.get(`/api/v1:petstore/ping`, (req, res) => res.json({ ...req.body })); - app.get(`/api/v2:storeofpets/ping`, (req, res) => res.json({ ...req.body })); - app.get(`/api/v3:petstore/ping`, (req, res) => res.json({ ...req.body })); - }, - true, - ); - }); - - after(() => app.server.close()); - - it('should validate server path with version variables, v2 and petstore', async () => - request(app).get('/api/v1:petstore/ping').query({}).expect(400)); - - it('should validate server path with version variables, v2 and storeofpets', async () => - request(app).get('/api/v2:storeofpets/ping').send({}).expect(400)); - - it('should skip validation of api path with invalid variable value, v2, and valid variable petstore', async () => - // the validator should not validate routes that do note match one declare in the opeanpi apec - // in this case, 'v3' is not a valid value for api - // TODO throw an error instead of ignoring it - request(app).get('/api/v3:petstore/ping').send({}).expect(200)); + let app = null; + + before(async () => { + const apiSpec = path.join('test', 'resources', 'servers.2.yaml'); + app = await createApp( + { + apiSpec, + }, + 3005, + (app) => { + app.get(`/api/v1:petstore/ping`, (req, res) => + res.json({ ...req.body }), + ); + app.get(`/api/v2:storeofpets/ping`, (req, res) => + res.json({ ...req.body }), + ); + app.get(`/api/v3:petstore/ping`, (req, res) => + res.json({ ...req.body }), + ); + }, + true, + ); }); - \ No newline at end of file + + after(() => app.server.close()); + + it('should validate server path with version variables, v2 and petstore', async () => + request(app).get('/api/v1:petstore/ping').query({}).expect(400)); + + it('should validate server path with version variables, v2 and storeofpets', async () => + request(app).get('/api/v2:storeofpets/ping').send({}).expect(400)); + + it('should skip validation of api path with invalid variable value, v2, and valid variable petstore', async () => + // the validator should not validate routes that do note match one declare in the opeanpi apec + // in this case, 'v3' is not a valid value for api + // TODO throw an error instead of ignoring it + request(app).get('/api/v3:petstore/ping').send({}).expect(200)); +}); From 594074d5c065e9284028dd5ae76b304a36252228 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sat, 1 Jun 2024 08:38:14 -0700 Subject: [PATCH 5/7] Update tsconfig and imports - Set min node.js version to 18 - Set lib, target, module, and moduleResolution to recommended settings from https://github.com/tsconfig/bases/blob/main/bases/node18.json - Use default imports where possible --- package-lock.json | 3 +++ package.json | 3 +++ src/framework/ajv/index.ts | 2 +- src/framework/index.ts | 6 +++--- src/framework/types.ts | 2 +- src/index.ts | 2 +- src/middlewares/openapi.multipart.ts | 1 - src/middlewares/openapi.response.validator.ts | 4 ++-- src/middlewares/parsers/req.parameter.mutator.ts | 6 +++--- src/middlewares/parsers/schema.preprocessor.ts | 5 ++--- src/middlewares/parsers/util.ts | 2 -- src/openapi.validator.ts | 2 +- src/resolvers.ts | 2 +- test/356.campaign.spec.ts | 6 +++--- test/440.spec.ts | 4 ++-- test/478.spec.ts | 2 +- test/509.spec.ts | 2 +- test/511.spec.ts | 2 +- test/535.spec.ts | 4 ++-- test/577.spec.ts | 4 ++-- test/699.spec.ts | 4 ++-- test/821.spec.ts | 7 +++---- test/881.spec.ts | 2 +- test/additional.props.query.params.spec.ts | 6 +++--- test/additional.props.spec.ts | 6 +++--- test/ajv.resolves.more.than.one.schema.spec.ts | 5 ++--- test/all.of.spec.ts | 6 +++--- test/allow.header.spec.ts | 4 ++-- test/circular.spec.ts | 7 +++---- test/coercion.spec.ts | 6 +++--- test/common/app.common.ts | 4 ++-- test/common/app.mw.ts | 10 +++++----- test/common/app.ts | 10 +++++----- test/common/run.ts | 2 +- test/component.params.spec.ts | 6 +++--- test/datetime.validation.spec.ts | 4 ++-- test/default-export.spec.ts | 6 +++--- test/default.export.fn.spec.ts | 6 +++--- test/empty.servers.spec.ts | 6 +++--- test/escaped.characters.in.ref.path.spec.ts | 6 +++--- test/formats.spec.ts | 4 ++-- test/headers.2.spec.ts | 4 ++-- test/headers.spec.ts | 4 ++-- test/ignore.paths.spec.ts | 4 ++-- test/invalid.apispec.spec.ts | 4 ++-- test/missing.spec.ts | 7 +++---- test/multi.spec.spec.ts | 2 +- test/multipart.disabled.spec.ts | 6 +++--- test/multipart.spec.ts | 8 ++++---- test/nested.routes.spec.ts | 6 +++--- test/no.components.spec.ts | 4 ++-- test/nullable.spec.ts | 6 +++--- test/one.of.2.spec.ts | 4 ++-- test/one.of.spec.ts | 4 ++-- test/oneof.readonly.spec.ts | 6 +++--- test/openapi.spec.ts | 4 ++-- test/operation.handler.spec.ts | 6 +++--- test/optional-request-body.spec.ts | 6 +++--- test/path.level.parameters.spec.ts | 6 +++--- test/path.order.spec.ts | 6 +++--- test/path.params.spec.ts | 4 ++-- test/petstore.spec.ts | 2 +- test/query.params.allow.unknown.spec.ts | 6 +++--- test/query.params.spec.ts | 6 +++--- test/query.serialization.ts | 6 +++--- test/read.only.removeadditional.spec.ts | 4 ++-- test/read.only.spec.ts | 4 ++-- test/request.bodies.ref.spec.ts | 5 ++--- test/request.body.validation.coerce.types.spec.ts | 4 ++-- test/response.object.serializer.spec.ts | 4 ++-- test/response.validation.coerce.types.spec.ts | 4 ++-- test/response.validation.defaults.spec.ts | 4 ++-- test/response.validation.on.error.spec.ts | 4 ++-- test/response.validation.options.spec.ts | 4 ++-- test/response.validation.spec.ts | 4 ++-- test/response.validator.spec.ts | 8 ++++---- test/router.spec.ts | 4 ++-- test/security.defaults.spec.ts | 6 +++--- test/security.disabled.spec.ts | 6 +++--- test/security.handlers.spec.ts | 6 +++--- test/security.top.level.spec.ts | 6 +++--- test/serdes.spec.ts | 4 ++-- test/serialized-deep-object.objects.spec.ts | 6 +++--- test/serialized.objects.defaults.spec.ts | 6 +++--- test/serialized.objects.spec.ts | 6 +++--- test/servers.spec.ts | 4 ++-- test/unknown.formats.spec.ts | 4 ++-- test/unknown.keywords.spec.ts | 4 ++-- test/user-request-url.router.spec.ts | 5 ++--- test/wildcard.path.params.spec.ts | 4 ++-- test/write.only.removeadditional.spec.ts | 4 ++-- test/write.only.spec.ts | 4 ++-- tsconfig.json | 14 +++++--------- typings/index.d.ts | 2 +- 94 files changed, 219 insertions(+), 227 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f8b196d..9fe26b8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,6 +49,9 @@ "ts-node": "^10.9.2", "typescript": "^5.4.5" }, + "engines": { + "node": ">=18.0.0" + }, "peerDependencies": { "express": "*" } diff --git a/package.json b/package.json index 5fab6e3e..ff5aa960 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,9 @@ "repository": { "url": "https://github.com/cdimascio/express-openapi-validator" }, + "engines": { + "node": ">=18.0.0" + }, "files": [ "/dist" ], diff --git a/src/framework/ajv/index.ts b/src/framework/ajv/index.ts index fa7b4791..1f262047 100644 --- a/src/framework/ajv/index.ts +++ b/src/framework/ajv/index.ts @@ -4,7 +4,7 @@ import ajvType from 'ajv/dist/vocabularies/jtd/type'; import addFormats from 'ajv-formats'; import { formats } from './formats'; import { OpenAPIV3, Options, SerDes } from '../types'; -import * as traverse from 'json-schema-traverse'; +import traverse from 'json-schema-traverse'; interface SerDesSchema extends Partial { kind?: 'req' | 'res'; diff --git a/src/framework/index.ts b/src/framework/index.ts index 471d6183..d5e4b01c 100644 --- a/src/framework/index.ts +++ b/src/framework/index.ts @@ -1,6 +1,6 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import * as $RefParser from '@apidevtools/json-schema-ref-parser'; +import fs from 'fs'; +import path from 'path'; +import $RefParser from '@apidevtools/json-schema-ref-parser'; import { OpenAPISchemaValidator } from './openapi.schema.validator'; import { BasePath } from './base.path'; import { diff --git a/src/framework/types.ts b/src/framework/types.ts index de76d0b1..9afe3ef1 100644 --- a/src/framework/types.ts +++ b/src/framework/types.ts @@ -1,5 +1,5 @@ import * as ajv from 'ajv'; -import * as multer from 'multer'; +import multer from 'multer'; import { FormatsPluginOptions } from 'ajv-formats'; import { Request, Response, NextFunction, RequestHandler } from 'express'; import { RouteMetadata } from './openapi.spec.loader'; diff --git a/src/index.ts b/src/index.ts index 60a8b949..6befb096 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import * as cloneDeep from 'lodash.clonedeep'; +import cloneDeep from 'lodash.clonedeep'; import * as res from './resolvers'; import { OpenApiValidator, OpenApiValidatorOpts } from './openapi.validator'; import { OpenApiSpecLoader } from './framework/openapi.spec.loader'; diff --git a/src/middlewares/openapi.multipart.ts b/src/middlewares/openapi.multipart.ts index 6bb7b565..87ea6a59 100644 --- a/src/middlewares/openapi.multipart.ts +++ b/src/middlewares/openapi.multipart.ts @@ -1,4 +1,3 @@ -import { OpenApiContext } from '../framework/openapi.context'; import { createRequestAjv } from '../framework/ajv'; import { OpenAPIV3, diff --git a/src/middlewares/openapi.response.validator.ts b/src/middlewares/openapi.response.validator.ts index a87fa23f..ed6fb483 100644 --- a/src/middlewares/openapi.response.validator.ts +++ b/src/middlewares/openapi.response.validator.ts @@ -15,8 +15,8 @@ import { InternalServerError, ValidateResponseOpts, } from '../framework/types'; -import * as mediaTypeParser from 'media-typer'; -import * as contentTypeParser from 'content-type'; +import mediaTypeParser from 'media-typer'; +import contentTypeParser from 'content-type'; interface ValidateResult { validators: { [key: string]: ValidateFunction }; diff --git a/src/middlewares/parsers/req.parameter.mutator.ts b/src/middlewares/parsers/req.parameter.mutator.ts index 1215f410..953b56ad 100644 --- a/src/middlewares/parsers/req.parameter.mutator.ts +++ b/src/middlewares/parsers/req.parameter.mutator.ts @@ -7,10 +7,10 @@ import { ValidationSchema, BadRequest, } from '../../framework/types'; -import * as url from 'url'; +import url from 'url'; import { dereferenceParameter, normalizeParameter } from './util'; -import * as mediaTypeParser from 'media-typer'; -import * as contentTypeParser from 'content-type'; +import mediaTypeParser from 'media-typer'; +import contentTypeParser from 'content-type'; type SchemaObject = OpenAPIV3.SchemaObject; type ReferenceObject = OpenAPIV3.ReferenceObject; diff --git a/src/middlewares/parsers/schema.preprocessor.ts b/src/middlewares/parsers/schema.preprocessor.ts index e0f54f29..fff9e707 100644 --- a/src/middlewares/parsers/schema.preprocessor.ts +++ b/src/middlewares/parsers/schema.preprocessor.ts @@ -1,7 +1,6 @@ import Ajv from 'ajv'; -import ajv = require('ajv'); -import * as cloneDeep from 'lodash.clonedeep'; -import * as _get from 'lodash.get'; +import cloneDeep from 'lodash.clonedeep'; +import _get from 'lodash.get'; import { createRequestAjv } from '../../framework/ajv'; import { OpenAPIV3, diff --git a/src/middlewares/parsers/util.ts b/src/middlewares/parsers/util.ts index aa0642e3..1fce3d58 100644 --- a/src/middlewares/parsers/util.ts +++ b/src/middlewares/parsers/util.ts @@ -1,7 +1,5 @@ import Ajv from 'ajv'; import { OpenAPIV3 } from '../../framework/types'; -import ajv = require('ajv'); -import { OpenAPIFramework } from '../../framework'; export function dereferenceParameter( apiDocs: OpenAPIV3.Document, diff --git a/src/openapi.validator.ts b/src/openapi.validator.ts index e9e1a188..456c2144 100644 --- a/src/openapi.validator.ts +++ b/src/openapi.validator.ts @@ -1,6 +1,6 @@ import { Options } from 'ajv'; import ono from 'ono'; -import * as express from 'express'; +import express from 'express'; import * as middlewares from './middlewares'; import { Application, Response, NextFunction, Router } from 'express'; import { OpenApiContext } from './framework/openapi.context'; diff --git a/src/resolvers.ts b/src/resolvers.ts index efc3c6d3..fcba8286 100644 --- a/src/resolvers.ts +++ b/src/resolvers.ts @@ -1,4 +1,4 @@ -import * as path from 'path'; +import path from 'path'; import { RequestHandler } from 'express'; import { RouteMetadata } from './framework/openapi.spec.loader'; import { OpenAPIV3 } from './framework/types'; diff --git a/test/356.campaign.spec.ts b/test/356.campaign.spec.ts index 57004cd5..4701df24 100644 --- a/test/356.campaign.spec.ts +++ b/test/356.campaign.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; import { expect } from 'chai'; diff --git a/test/440.spec.ts b/test/440.spec.ts index 83912f97..1db4b65c 100644 --- a/test/440.spec.ts +++ b/test/440.spec.ts @@ -1,5 +1,5 @@ -import * as express from 'express'; -import * as request from 'supertest'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; import { OpenAPIV3 } from '../src/framework/types'; diff --git a/test/478.spec.ts b/test/478.spec.ts index 5825bc22..c3e371fc 100644 --- a/test/478.spec.ts +++ b/test/478.spec.ts @@ -1,4 +1,4 @@ -import * as request from 'supertest'; +import request from 'supertest'; import { OpenAPIV3 } from '../src/framework/types'; import { createApp } from './common/app'; diff --git a/test/509.spec.ts b/test/509.spec.ts index 305ea7cb..a1af553f 100644 --- a/test/509.spec.ts +++ b/test/509.spec.ts @@ -1,4 +1,4 @@ -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('509 schema.preprocessor', () => { diff --git a/test/511.spec.ts b/test/511.spec.ts index 4d18b07f..2485f40e 100644 --- a/test/511.spec.ts +++ b/test/511.spec.ts @@ -1,4 +1,4 @@ -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('511 schema.preprocessor inheritance', () => { diff --git a/test/535.spec.ts b/test/535.spec.ts index c07beee8..9c5a40bc 100644 --- a/test/535.spec.ts +++ b/test/535.spec.ts @@ -1,6 +1,6 @@ -import * as express from 'express'; +import express from 'express'; import { Server } from 'http'; -import * as request from 'supertest'; +import request from 'supertest'; import * as OpenApiValidator from '../src'; import { OpenAPIV3 } from '../src/framework/types'; import { startServer } from './common/app.common'; diff --git a/test/577.spec.ts b/test/577.spec.ts index 18377095..512bd24f 100644 --- a/test/577.spec.ts +++ b/test/577.spec.ts @@ -1,6 +1,6 @@ -import * as express from 'express'; +import express from 'express'; import { Server } from 'http'; -import * as request from 'supertest'; +import request from 'supertest'; import * as OpenApiValidator from '../src'; import { OpenAPIV3 } from '../src/framework/types'; import { startServer } from './common/app.common'; diff --git a/test/699.spec.ts b/test/699.spec.ts index f420aefc..b7b28435 100644 --- a/test/699.spec.ts +++ b/test/699.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import { date, dateTime } from '../src/framework/base.serdes'; diff --git a/test/821.spec.ts b/test/821.spec.ts index 590bd254..7105ee24 100644 --- a/test/821.spec.ts +++ b/test/821.spec.ts @@ -1,11 +1,10 @@ -import * as express from 'express'; +import express from 'express'; import { Server } from 'http'; -import * as request from 'supertest'; +import request from 'supertest'; import * as OpenApiValidator from '../src'; import { OpenAPIV3 } from '../src/framework/types'; import { startServer } from './common/app.common'; -import { deepStrictEqual } from 'assert'; -import * as path from 'path'; +import path from 'path'; const apiSpecPath = path.join('test', 'resources', '699.yaml'); diff --git a/test/881.spec.ts b/test/881.spec.ts index 33bd3d19..0744359e 100644 --- a/test/881.spec.ts +++ b/test/881.spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; describe('multi-spec', () => { let app = null; diff --git a/test/additional.props.query.params.spec.ts b/test/additional.props.query.params.spec.ts index 0e5b662e..3b05a864 100644 --- a/test/additional.props.query.params.spec.ts +++ b/test/additional.props.query.params.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; import { expect } from 'chai'; diff --git a/test/additional.props.spec.ts b/test/additional.props.spec.ts index e76d78eb..2ab11e8e 100644 --- a/test/additional.props.spec.ts +++ b/test/additional.props.spec.ts @@ -1,6 +1,6 @@ -import * as request from 'supertest'; -import * as path from 'path'; -import * as express from 'express'; +import request from 'supertest'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/ajv.resolves.more.than.one.schema.spec.ts b/test/ajv.resolves.more.than.one.schema.spec.ts index 550520cc..3cd4098c 100644 --- a/test/ajv.resolves.more.than.one.schema.spec.ts +++ b/test/ajv.resolves.more.than.one.schema.spec.ts @@ -1,8 +1,7 @@ -import * as express from 'express'; +import express from 'express'; import { Server } from 'http'; -import * as request from 'supertest'; +import request from 'supertest'; import * as OpenApiValidator from '../src'; -import { OpenAPIV3 } from '../src/framework/types'; import { startServer } from './common/app.common'; import { deepStrictEqual } from 'assert'; diff --git a/test/all.of.spec.ts b/test/all.of.spec.ts index e1a2792e..499c747b 100644 --- a/test/all.of.spec.ts +++ b/test/all.of.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/allow.header.spec.ts b/test/allow.header.spec.ts index 25620c81..cc275edd 100644 --- a/test/allow.header.spec.ts +++ b/test/allow.header.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; -import * as express from 'express'; +import express from 'express'; import { Server } from 'http'; -import * as request from 'supertest'; +import request from 'supertest'; import * as packageJson from '../package.json'; import * as OpenApiValidator from '../src'; import { OpenAPIV3 } from '../src/framework/types'; diff --git a/test/circular.spec.ts b/test/circular.spec.ts index 0a32b595..5888d0d6 100644 --- a/test/circular.spec.ts +++ b/test/circular.spec.ts @@ -1,7 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import { expect } from 'chai'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/coercion.spec.ts b/test/coercion.spec.ts index 7dda3a06..3cdd252e 100644 --- a/test/coercion.spec.ts +++ b/test/coercion.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/common/app.common.ts b/test/common/app.common.ts index 355f23fd..e2c3d696 100644 --- a/test/common/app.common.ts +++ b/test/common/app.common.ts @@ -1,6 +1,6 @@ import { Request, Response } from 'express'; -import * as http from 'http'; -import * as express from 'express'; +import http from 'http'; +import express from 'express'; export function startServer(app, port: number): Promise { return new Promise((resolve, reject) => { diff --git a/test/common/app.mw.ts b/test/common/app.mw.ts index a9a6bd47..18590ef2 100644 --- a/test/common/app.mw.ts +++ b/test/common/app.mw.ts @@ -1,8 +1,8 @@ -import * as express from 'express'; -import * as path from 'path'; -import * as cookieParser from 'cookie-parser'; -import * as bodyParser from 'body-parser'; -import * as logger from 'morgan'; +import express from 'express'; +import path from 'path'; +import cookieParser from 'cookie-parser'; +import bodyParser from 'body-parser'; +import logger from 'morgan'; import * as OpenApiValidator from '../../src'; import { startServer, routes } from './app.common'; diff --git a/test/common/app.ts b/test/common/app.ts index db076f88..21e396df 100644 --- a/test/common/app.ts +++ b/test/common/app.ts @@ -1,8 +1,8 @@ -import * as express from 'express'; -import * as path from 'path'; -import * as cookieParser from 'cookie-parser'; -import * as bodyParser from 'body-parser'; -import * as logger from 'morgan'; +import express from 'express'; +import path from 'path'; +import cookieParser from 'cookie-parser'; +import bodyParser from 'body-parser'; +import logger from 'morgan'; import * as OpenApiValidator from '../../src'; import { startServer, routes } from './app.common'; diff --git a/test/common/run.ts b/test/common/run.ts index a7152811..4cc5c4a5 100644 --- a/test/common/run.ts +++ b/test/common/run.ts @@ -1,4 +1,4 @@ -import * as path from 'path'; +import path from 'path'; import { createApp } from '../common/app'; const apiSpec = path.join('test', 'resources', 'openapi.yaml'); diff --git a/test/component.params.spec.ts b/test/component.params.spec.ts index d0ffad4e..5cbd17d3 100644 --- a/test/component.params.spec.ts +++ b/test/component.params.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/datetime.validation.spec.ts b/test/datetime.validation.spec.ts index 685643d7..2e315628 100644 --- a/test/datetime.validation.spec.ts +++ b/test/datetime.validation.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('datetime.validation', () => { diff --git a/test/default-export.spec.ts b/test/default-export.spec.ts index ef60789c..c2806b94 100644 --- a/test/default-export.spec.ts +++ b/test/default-export.spec.ts @@ -1,8 +1,8 @@ -import * as express from 'express'; +import express from 'express'; import * as OpenApiValidator from '../src'; import { expect } from 'chai'; -import * as request from 'supertest'; -import * as path from 'path'; +import request from 'supertest'; +import path from 'path'; const schema = { openapi: '3.0.0', diff --git a/test/default.export.fn.spec.ts b/test/default.export.fn.spec.ts index d13f1fd4..ae33582c 100644 --- a/test/default.export.fn.spec.ts +++ b/test/default.export.fn.spec.ts @@ -1,8 +1,8 @@ -import * as express from 'express'; +import express from 'express'; import * as OpenApiValidator from '../src'; import { expect } from 'chai'; -import * as request from 'supertest'; -import * as path from 'path'; +import request from 'supertest'; +import path from 'path'; describe('default export resolver', () => { let server = null; diff --git a/test/empty.servers.spec.ts b/test/empty.servers.spec.ts index 1ffdf1f1..9ec93905 100644 --- a/test/empty.servers.spec.ts +++ b/test/empty.servers.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('empty servers', () => { diff --git a/test/escaped.characters.in.ref.path.spec.ts b/test/escaped.characters.in.ref.path.spec.ts index 30c37d44..33ade72f 100644 --- a/test/escaped.characters.in.ref.path.spec.ts +++ b/test/escaped.characters.in.ref.path.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; describe('when escaped characters are in path', () => { diff --git a/test/formats.spec.ts b/test/formats.spec.ts index b761a909..a595fc05 100644 --- a/test/formats.spec.ts +++ b/test/formats.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; const apiSpecPath = path.join('test', 'resources', 'formats.yaml'); diff --git a/test/headers.2.spec.ts b/test/headers.2.spec.ts index 81f9b582..0bfcc0b0 100644 --- a/test/headers.2.spec.ts +++ b/test/headers.2.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/headers.spec.ts b/test/headers.spec.ts index 79959ce6..ad615357 100644 --- a/test/headers.spec.ts +++ b/test/headers.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/ignore.paths.spec.ts b/test/ignore.paths.spec.ts index 6ff49924..54186524 100644 --- a/test/ignore.paths.spec.ts +++ b/test/ignore.paths.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('ignorePaths as RegExp', () => { diff --git a/test/invalid.apispec.spec.ts b/test/invalid.apispec.spec.ts index 2b7b02e8..55438cdc 100644 --- a/test/invalid.apispec.spec.ts +++ b/test/invalid.apispec.spec.ts @@ -1,6 +1,6 @@ -import * as express from 'express'; +import express from 'express'; import { Server } from 'http'; -import * as request from 'supertest'; +import request from 'supertest'; import * as OpenApiValidator from '../src'; import { OpenAPIV3, OpenApiValidatorOpts } from '../src/framework/types'; import { startServer } from './common/app.common'; diff --git a/test/missing.spec.ts b/test/missing.spec.ts index ccb57a23..8c3fb411 100644 --- a/test/missing.spec.ts +++ b/test/missing.spec.ts @@ -1,7 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import { expect } from 'chai'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/multi.spec.spec.ts b/test/multi.spec.spec.ts index f7ee0ee9..d50d296e 100644 --- a/test/multi.spec.spec.ts +++ b/test/multi.spec.spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; describe('multi-spec', () => { let app = null; diff --git a/test/multipart.disabled.spec.ts b/test/multipart.disabled.spec.ts index 0c4fa3df..208a1eb8 100644 --- a/test/multipart.disabled.spec.ts +++ b/test/multipart.disabled.spec.ts @@ -1,7 +1,7 @@ -import * as express from 'express'; -import * as path from 'path'; +import express from 'express'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/multipart.spec.ts b/test/multipart.spec.ts index 51352822..e86854a6 100644 --- a/test/multipart.spec.ts +++ b/test/multipart.spec.ts @@ -1,8 +1,8 @@ -import * as express from 'express'; -import * as path from 'path'; -import * as fs from 'fs'; +import express from 'express'; +import path from 'path'; +import fs from 'fs'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('a multipart request', () => { diff --git a/test/nested.routes.spec.ts b/test/nested.routes.spec.ts index 243d7a5b..baf3f789 100644 --- a/test/nested.routes.spec.ts +++ b/test/nested.routes.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/no.components.spec.ts b/test/no.components.spec.ts index 0373bd3f..115c9cd6 100644 --- a/test/no.components.spec.ts +++ b/test/no.components.spec.ts @@ -1,6 +1,6 @@ -import * as express from 'express'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import { OpenAPIV3 } from '../src/framework/types'; diff --git a/test/nullable.spec.ts b/test/nullable.spec.ts index 0e8e7c52..a67d35fb 100644 --- a/test/nullable.spec.ts +++ b/test/nullable.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/one.of.2.spec.ts b/test/one.of.2.spec.ts index 0e2d62c3..06106a49 100644 --- a/test/one.of.2.spec.ts +++ b/test/one.of.2.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('oneOf with discriminator', () => { diff --git a/test/one.of.spec.ts b/test/one.of.spec.ts index 1a405a52..96c480b5 100644 --- a/test/one.of.spec.ts +++ b/test/one.of.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/oneof.readonly.spec.ts b/test/oneof.readonly.spec.ts index c4b05972..bdcae233 100644 --- a/test/oneof.readonly.spec.ts +++ b/test/oneof.readonly.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import { expect } from 'chai'; diff --git a/test/openapi.spec.ts b/test/openapi.spec.ts index e3172c74..aa44bea3 100644 --- a/test/openapi.spec.ts +++ b/test/openapi.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/operation.handler.spec.ts b/test/operation.handler.spec.ts index 7b57e7da..7058f3ef 100644 --- a/test/operation.handler.spec.ts +++ b/test/operation.handler.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import * as OpenApiValidator from '../src'; import * as resolvers from '../src/resolvers'; import { createApp } from './common/app'; diff --git a/test/optional-request-body.spec.ts b/test/optional-request-body.spec.ts index ad49fa5b..607872f9 100644 --- a/test/optional-request-body.spec.ts +++ b/test/optional-request-body.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/path.level.parameters.spec.ts b/test/path.level.parameters.spec.ts index f734c55f..5c6a4b3f 100644 --- a/test/path.level.parameters.spec.ts +++ b/test/path.level.parameters.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/path.order.spec.ts b/test/path.order.spec.ts index fc5119a3..f71f3403 100644 --- a/test/path.order.spec.ts +++ b/test/path.order.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/path.params.spec.ts b/test/path.params.spec.ts index 57bde2e7..f1e4b5d3 100644 --- a/test/path.params.spec.ts +++ b/test/path.params.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; const apiSpecPath = path.join('test', 'resources', 'path.params.yaml'); diff --git a/test/petstore.spec.ts b/test/petstore.spec.ts index 1edf43e7..c89b18d2 100644 --- a/test/petstore.spec.ts +++ b/test/petstore.spec.ts @@ -1,4 +1,4 @@ -import * as request from 'supertest'; +import request from 'supertest'; import { OpenAPIV3 } from '../src/framework/types'; import { createApp } from './common/app'; diff --git a/test/query.params.allow.unknown.spec.ts b/test/query.params.allow.unknown.spec.ts index cd43cd4c..e11286eb 100644 --- a/test/query.params.allow.unknown.spec.ts +++ b/test/query.params.allow.unknown.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/query.params.spec.ts b/test/query.params.spec.ts index 9a546f27..9d3645ec 100644 --- a/test/query.params.spec.ts +++ b/test/query.params.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/query.serialization.ts b/test/query.serialization.ts index 4070714d..badb2227 100644 --- a/test/query.serialization.ts +++ b/test/query.serialization.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; -import * as express from 'express'; -import * as path from 'path'; -import * as request from 'supertest'; +import express from 'express'; +import path from 'path'; +import request from 'supertest'; import { createApp } from './common/app'; describe('styles', () => { diff --git a/test/read.only.removeadditional.spec.ts b/test/read.only.removeadditional.spec.ts index cad46ce9..3c68cc4f 100644 --- a/test/read.only.removeadditional.spec.ts +++ b/test/read.only.removeadditional.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/read.only.spec.ts b/test/read.only.spec.ts index 66d62535..81c4a35a 100644 --- a/test/read.only.spec.ts +++ b/test/read.only.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/request.bodies.ref.spec.ts b/test/request.bodies.ref.spec.ts index 78b066fd..8d2e1253 100644 --- a/test/request.bodies.ref.spec.ts +++ b/test/request.bodies.ref.spec.ts @@ -1,8 +1,7 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; -import * as packageJson from '../package.json'; describe('request bodies', () => { let app = null; diff --git a/test/request.body.validation.coerce.types.spec.ts b/test/request.body.validation.coerce.types.spec.ts index 2649e5cf..c6c74cd1 100644 --- a/test/request.body.validation.coerce.types.spec.ts +++ b/test/request.body.validation.coerce.types.spec.ts @@ -1,5 +1,5 @@ -import * as path from 'path'; -import * as request from 'supertest'; +import path from 'path'; +import request from 'supertest'; import { createApp } from './common/app'; describe('request body validation coercion', () => { diff --git a/test/response.object.serializer.spec.ts b/test/response.object.serializer.spec.ts index 3d0b13d5..5c53f388 100644 --- a/test/response.object.serializer.spec.ts +++ b/test/response.object.serializer.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; const apiSpecPath = path.join( diff --git a/test/response.validation.coerce.types.spec.ts b/test/response.validation.coerce.types.spec.ts index b36c14e1..35ba3aff 100644 --- a/test/response.validation.coerce.types.spec.ts +++ b/test/response.validation.coerce.types.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; const apiSpecPath = path.join('test', 'resources', 'response.validation.yaml'); diff --git a/test/response.validation.defaults.spec.ts b/test/response.validation.defaults.spec.ts index 3cef764e..369f3fef 100644 --- a/test/response.validation.defaults.spec.ts +++ b/test/response.validation.defaults.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; const apiSpecPath = path.join( diff --git a/test/response.validation.on.error.spec.ts b/test/response.validation.on.error.spec.ts index 465a9a38..4e5941d9 100644 --- a/test/response.validation.on.error.spec.ts +++ b/test/response.validation.on.error.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/response.validation.options.spec.ts b/test/response.validation.options.spec.ts index 6e99e120..a1913f3c 100644 --- a/test/response.validation.options.spec.ts +++ b/test/response.validation.options.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/response.validation.spec.ts b/test/response.validation.spec.ts index f55e343b..cfe9e13c 100644 --- a/test/response.validation.spec.ts +++ b/test/response.validation.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/response.validator.spec.ts b/test/response.validator.spec.ts index 191ef067..1655ee79 100644 --- a/test/response.validator.spec.ts +++ b/test/response.validator.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as fs from 'fs'; -import * as cloneDeep from 'lodash.clonedeep'; -import * as jsyaml from 'js-yaml'; +import path from 'path'; +import fs from 'fs'; +import cloneDeep from 'lodash.clonedeep'; +import jsyaml from 'js-yaml'; import { expect } from 'chai'; import { ResponseValidator } from '../src/middlewares/openapi.response.validator'; import * as packageJson from '../package.json'; diff --git a/test/router.spec.ts b/test/router.spec.ts index 26466eb9..9cd47e91 100644 --- a/test/router.spec.ts +++ b/test/router.spec.ts @@ -1,6 +1,6 @@ -import * as express from 'express'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import * as OpenApiValidator from '../src'; describe('security.defaults', () => { diff --git a/test/security.defaults.spec.ts b/test/security.defaults.spec.ts index 50866d86..2dd95a86 100644 --- a/test/security.defaults.spec.ts +++ b/test/security.defaults.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('security.defaults', () => { diff --git a/test/security.disabled.spec.ts b/test/security.disabled.spec.ts index 9e0c75b6..d6239da5 100644 --- a/test/security.disabled.spec.ts +++ b/test/security.disabled.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import { createApp } from './common/app'; // NOTE/TODO: These tests modify eovConf.validateSecurity.handlers diff --git a/test/security.handlers.spec.ts b/test/security.handlers.spec.ts index 209f16d1..3d730c01 100644 --- a/test/security.handlers.spec.ts +++ b/test/security.handlers.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import { OpenApiValidatorOpts, diff --git a/test/security.top.level.spec.ts b/test/security.top.level.spec.ts index e5113494..a73e115c 100644 --- a/test/security.top.level.spec.ts +++ b/test/security.top.level.spec.ts @@ -1,7 +1,7 @@ -import * as path from 'path'; -import * as express from 'express'; +import path from 'path'; +import express from 'express'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('security.top.level', () => { diff --git a/test/serdes.spec.ts b/test/serdes.spec.ts index e3504b4e..61bdaac2 100644 --- a/test/serdes.spec.ts +++ b/test/serdes.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import { date, dateTime } from '../src/framework/base.serdes'; diff --git a/test/serialized-deep-object.objects.spec.ts b/test/serialized-deep-object.objects.spec.ts index 66d41920..b0964aa5 100644 --- a/test/serialized-deep-object.objects.spec.ts +++ b/test/serialized-deep-object.objects.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import * as packageJson from '../package.json'; import { expect } from 'chai'; import { createApp } from './common/app'; diff --git a/test/serialized.objects.defaults.spec.ts b/test/serialized.objects.defaults.spec.ts index dc810a90..5a100468 100644 --- a/test/serialized.objects.defaults.spec.ts +++ b/test/serialized.objects.defaults.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import * as packageJson from '../package.json'; import { expect } from 'chai'; import { createApp } from './common/app'; diff --git a/test/serialized.objects.spec.ts b/test/serialized.objects.spec.ts index 71c987b7..f651c543 100644 --- a/test/serialized.objects.spec.ts +++ b/test/serialized.objects.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; -import * as express from 'express'; -import * as request from 'supertest'; +import path from 'path'; +import express from 'express'; +import request from 'supertest'; import * as packageJson from '../package.json'; import { expect } from 'chai'; import { createApp } from './common/app'; diff --git a/test/servers.spec.ts b/test/servers.spec.ts index f525f28c..0d93437c 100644 --- a/test/servers.spec.ts +++ b/test/servers.spec.ts @@ -1,5 +1,5 @@ -import * as path from 'path'; -import * as request from 'supertest'; +import path from 'path'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/unknown.formats.spec.ts b/test/unknown.formats.spec.ts index 7acc84d3..8a8a1add 100644 --- a/test/unknown.formats.spec.ts +++ b/test/unknown.formats.spec.ts @@ -1,5 +1,5 @@ -import * as path from 'path'; -import * as request from 'supertest'; +import path from 'path'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/unknown.keywords.spec.ts b/test/unknown.keywords.spec.ts index 88f5f725..f7850ff3 100644 --- a/test/unknown.keywords.spec.ts +++ b/test/unknown.keywords.spec.ts @@ -1,5 +1,5 @@ -import * as path from 'path'; -import * as request from 'supertest'; +import path from 'path'; +import request from 'supertest'; import { createApp } from './common/app'; describe('Unknown x- keywords', () => { diff --git a/test/user-request-url.router.spec.ts b/test/user-request-url.router.spec.ts index 4bba5dee..81ea77cb 100644 --- a/test/user-request-url.router.spec.ts +++ b/test/user-request-url.router.spec.ts @@ -6,11 +6,10 @@ import type { NextFunction, Request, } from 'express'; -import * as express from 'express'; +import express from 'express'; import { OpenAPIV3 } from '../src/framework/types'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; - import * as OpenApiValidator from '../src'; import { Server } from 'http'; diff --git a/test/wildcard.path.params.spec.ts b/test/wildcard.path.params.spec.ts index cbf610b9..f1c42879 100644 --- a/test/wildcard.path.params.spec.ts +++ b/test/wildcard.path.params.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; describe('wildcard path params', () => { diff --git a/test/write.only.removeadditional.spec.ts b/test/write.only.removeadditional.spec.ts index cbf91614..a39093e4 100644 --- a/test/write.only.removeadditional.spec.ts +++ b/test/write.only.removeadditional.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/test/write.only.spec.ts b/test/write.only.spec.ts index 565fcbff..0fdcb607 100644 --- a/test/write.only.spec.ts +++ b/test/write.only.spec.ts @@ -1,6 +1,6 @@ -import * as path from 'path'; +import path from 'path'; import { expect } from 'chai'; -import * as request from 'supertest'; +import request from 'supertest'; import { createApp } from './common/app'; import * as packageJson from '../package.json'; diff --git a/tsconfig.json b/tsconfig.json index 22f73d96..4edd520c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { "compilerOptions": { "declaration": true, - "target": "es2017", - "lib": ["es2019", "es2019.array"], - "module": "commonjs", - "moduleResolution": "node", + "target": "es2022", + "lib": ["es2023"], + "module": "node16", + "moduleResolution": "node16", "outDir": "dist", "sourceMap": true, "resolveJsonModule": true, @@ -14,9 +14,5 @@ "files": true }, "exclude": ["node_modules"], - "include": [ - "typings/**/*.d.ts", - "src/**/*.ts", - "src/framework/modded.express.mung.ts" - ] + "include": ["typings/**/*.d.ts", "src/**/*.ts"] } diff --git a/typings/index.d.ts b/typings/index.d.ts index 76fdaa04..08b84c21 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1,4 +1,4 @@ -import * as MulterExt from 'multer'; +import 'multer'; declare module 'multer' { type ErrorCodes = From b685f587a5d04970b220cf3df87365517bee6c51 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sat, 1 Jun 2024 08:43:25 -0700 Subject: [PATCH 6/7] Add additional types packages - Make types available for chai, lodash.get, and lodash.clonedeep - Update OpenApiSpecLoader constructor to allow immutable document (now that cloneDeep() correctly passes through the object type) --- package-lock.json | 37 +++++++++++++++++++++++++++++++++++++ package.json | 3 +++ src/framework/types.ts | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 9fe26b8e..dec4615f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,9 +24,12 @@ "path-to-regexp": "^6.2.2" }, "devDependencies": { + "@types/chai": "^4.3.16", "@types/cookie-parser": "^1.4.7", "@types/express": "4.17.21", "@types/js-yaml": "^4.0.9", + "@types/lodash.clonedeep": "^4.5.9", + "@types/lodash.get": "^4.4.9", "@types/mocha": "^10.0.6", "@types/morgan": "^1.9.9", "@types/node": "^18.19.34", @@ -926,6 +929,13 @@ "@types/node": "*" } }, + "node_modules/@types/chai": { + "version": "4.3.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.16.tgz", + "integrity": "sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/connect": { "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", @@ -1006,6 +1016,33 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "license": "MIT" }, + "node_modules/@types/lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/lodash.clonedeep": { + "version": "4.5.9", + "resolved": "https://registry.npmjs.org/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.9.tgz", + "integrity": "sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, + "node_modules/@types/lodash.get": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/@types/lodash.get/-/lodash.get-4.4.9.tgz", + "integrity": "sha512-J5dvW98sxmGnamqf+/aLP87PYXyrha9xIgc2ZlHl6OHMFR2Ejdxep50QfU0abO1+CH6+ugx+8wEUN1toImAinA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/methods": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@types/methods/-/methods-1.1.4.tgz", diff --git a/package.json b/package.json index ff5aa960..c765cbf3 100644 --- a/package.json +++ b/package.json @@ -52,9 +52,12 @@ "path-to-regexp": "^6.2.2" }, "devDependencies": { + "@types/chai": "^4.3.16", "@types/cookie-parser": "^1.4.7", "@types/express": "4.17.21", "@types/js-yaml": "^4.0.9", + "@types/lodash.clonedeep": "^4.5.9", + "@types/lodash.get": "^4.4.9", "@types/mocha": "^10.0.6", "@types/morgan": "^1.9.9", "@types/node": "^18.19.34", diff --git a/src/framework/types.ts b/src/framework/types.ts index 9afe3ef1..6940a027 100644 --- a/src/framework/types.ts +++ b/src/framework/types.ts @@ -509,7 +509,7 @@ export interface OpenAPIFrameworkPathObject { } interface OpenAPIFrameworkArgs { - apiDoc: OpenAPIV3.Document | string; + apiDoc: DeepImmutableObject | OpenAPIV3.Document | string; validateApiSpec?: boolean; $refParser?: { mode: 'bundle' | 'dereference'; From e326e4f5143aaeb7ae6acb78035ee37fbb3dd426 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sun, 2 Jun 2024 15:04:57 -0700 Subject: [PATCH 7/7] Test improvements - Replace many "any" types with narrower types (this isn't comprehensive, but is an improvement) - Fix some asynchronous calls being invoked as "void" in test blocks - Use same server start/stop routine in all tests --- test/356.campaign.spec.ts | 8 +- test/440.spec.ts | 8 +- test/478.spec.ts | 8 +- test/509.spec.ts | 12 +-- test/511.spec.ts | 12 +-- test/535.spec.ts | 25 +++-- test/577.spec.ts | 25 +++-- test/699.spec.ts | 35 ++++--- test/821.spec.ts | 37 +++++--- test/881.spec.ts | 46 +++++----- test/additional.props.query.params.spec.ts | 8 +- test/additional.props.spec.ts | 8 +- test/ajv.options.spec.ts | 9 +- .../ajv.resolves.more.than.one.schema.spec.ts | 39 +++++--- test/all.of.spec.ts | 8 +- test/allow.header.spec.ts | 14 +-- test/circular.spec.ts | 8 +- test/coercion.spec.ts | 12 +-- test/common/app.common.ts | 37 ++++++-- test/common/app.mw.ts | 21 +++-- test/common/app.ts | 21 +++-- test/common/run.ts | 4 +- test/component.params.spec.ts | 10 +- test/datetime.validation.spec.ts | 28 +++--- test/default-export.spec.ts | 15 ++- test/default.export.fn.spec.ts | 18 ++-- test/empty.servers.spec.ts | 8 +- test/escaped.characters.in.ref.path.spec.ts | 8 +- test/formats.spec.ts | 17 ++-- test/headers.2.spec.ts | 13 +-- test/headers.spec.ts | 14 ++- test/ignore.paths.spec.ts | 24 +++-- test/invalid.apispec.spec.ts | 37 +++++--- test/missing.spec.ts | 16 ++-- test/multi.spec.spec.ts | 46 +++++----- test/multipart.disabled.spec.ts | 11 ++- test/multipart.spec.ts | 44 ++++----- test/nested.routes.spec.ts | 10 +- test/no.components.spec.ts | 8 +- test/nullable.spec.ts | 8 +- test/one.of.2.spec.ts | 13 +-- test/one.of.spec.ts | 13 +-- test/oneof.readonly.spec.ts | 8 +- test/openapi.spec.ts | 23 ++--- test/operation.handler.spec.ts | 22 +++-- test/optional-request-body.spec.ts | 8 +- test/path.level.parameters.spec.ts | 8 +- test/path.order.spec.ts | 8 +- test/path.params.spec.ts | 15 +-- test/petstore.spec.ts | 8 +- test/query.params.allow.unknown.spec.ts | 9 +- test/query.params.spec.ts | 8 +- ...ization.ts => query.serialization.spec.ts} | 11 ++- test/read.only.removeadditional.spec.ts | 8 +- test/read.only.spec.ts | 8 +- test/request.bodies.ref.spec.ts | 23 +++-- ...quest.body.validation.coerce.types.spec.ts | 14 +-- test/response.object.serializer.spec.ts | 17 ++-- test/response.validation.coerce.types.spec.ts | 11 ++- test/response.validation.defaults.spec.ts | 8 +- test/response.validation.on.error.spec.ts | 39 ++++---- test/response.validation.options.spec.ts | 23 ++--- test/response.validation.spec.ts | 39 ++++---- test/response.validator.spec.ts | 6 +- test/router.spec.ts | 24 +++-- test/security.defaults.spec.ts | 31 +++---- test/security.disabled.spec.ts | 21 ++--- test/security.handlers.spec.ts | 91 +++++++------------ test/security.top.level.spec.ts | 10 +- test/serdes.spec.ts | 49 +++++----- test/serialized-deep-object.objects.spec.ts | 8 +- test/serialized.objects.defaults.spec.ts | 8 +- test/serialized.objects.spec.ts | 8 +- test/servers.spec.ts | 14 ++- test/unknown.formats.spec.ts | 8 +- test/unknown.keywords.spec.ts | 8 +- test/user-request-url.router.spec.ts | 52 ++++------- test/wildcard.path.params.spec.ts | 8 +- test/write.only.removeadditional.spec.ts | 8 +- test/write.only.spec.ts | 8 +- 80 files changed, 768 insertions(+), 678 deletions(-) rename test/{query.serialization.ts => query.serialization.spec.ts} (82%) diff --git a/test/356.campaign.spec.ts b/test/356.campaign.spec.ts index 4701df24..37936f72 100644 --- a/test/356.campaign.spec.ts +++ b/test/356.campaign.spec.ts @@ -1,12 +1,12 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { createApp, ExpressWithServer } from './common/app'; import * as packageJson from '../package.json'; import { expect } from 'chai'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -27,8 +27,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('create campaign should return 201', async () => diff --git a/test/440.spec.ts b/test/440.spec.ts index 1db4b65c..29ae1f18 100644 --- a/test/440.spec.ts +++ b/test/440.spec.ts @@ -1,11 +1,11 @@ import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { createApp, ExpressWithServer } from './common/app'; import * as packageJson from '../package.json'; import { OpenAPIV3 } from '../src/framework/types'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -61,8 +61,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('create campaign should return 200', async () => diff --git a/test/478.spec.ts b/test/478.spec.ts index c3e371fc..08badb76 100644 --- a/test/478.spec.ts +++ b/test/478.spec.ts @@ -1,9 +1,9 @@ import request from 'supertest'; import { OpenAPIV3 } from '../src/framework/types'; -import { createApp } from './common/app'; +import { createApp, ExpressWithServer } from './common/app'; describe('issue #478', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -38,8 +38,8 @@ describe('issue #478', () => { return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 200', async () => diff --git a/test/509.spec.ts b/test/509.spec.ts index a1af553f..0fda3499 100644 --- a/test/509.spec.ts +++ b/test/509.spec.ts @@ -1,8 +1,9 @@ import request from 'supertest'; -import { createApp } from './common/app'; +import { createApp, ExpressWithServer } from './common/app'; +import { OpenAPIV3 } from '../src/framework/types'; describe('509 schema.preprocessor', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -24,18 +25,17 @@ describe('509 schema.preprocessor', () => { }, false, ); - return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 200', async () => request(app).get(`${app.basePath}/users/aafasdf`).expect(200)); }); -function apiSpec(): any { +function apiSpec(): OpenAPIV3.Document { return { openapi: '3.0.1', info: { diff --git a/test/511.spec.ts b/test/511.spec.ts index 2485f40e..a72aa710 100644 --- a/test/511.spec.ts +++ b/test/511.spec.ts @@ -1,8 +1,9 @@ import request from 'supertest'; -import { createApp } from './common/app'; +import { createApp, ExpressWithServer } from './common/app'; +import { OpenAPIV3 } from '../src/framework/types'; describe('511 schema.preprocessor inheritance', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -27,8 +28,8 @@ describe('511 schema.preprocessor inheritance', () => { return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 201', async () => @@ -43,7 +44,7 @@ describe('511 schema.preprocessor inheritance', () => { .expect(201)); }); -function apiSpec(): any { +function apiSpec(): OpenAPIV3.Document { return { openapi: '3.0.0', info: { @@ -86,7 +87,6 @@ function apiSpec(): any { components: { schemas: { PolyObject: { - type: 'object', discriminator: { propertyName: 'object_type', mapping: { diff --git a/test/535.spec.ts b/test/535.spec.ts index 9c5a40bc..714ca4fb 100644 --- a/test/535.spec.ts +++ b/test/535.spec.ts @@ -1,27 +1,34 @@ import express from 'express'; -import { Server } from 'http'; import request from 'supertest'; import * as OpenApiValidator from '../src'; import { OpenAPIV3 } from '../src/framework/types'; -import { startServer } from './common/app.common'; +import { ExpressWithServer, startServer } from './common/app.common'; import { deepStrictEqual } from 'assert'; describe('#535 - calling `middleware()` multiple times', () => { - it('does not mutate the API specification', async () => { - const apiSpec = createApiSpec(); + let apiSpec: OpenAPIV3.Document; + let app: ExpressWithServer; - const app = await createApp(apiSpec); - await request(app).get('/ping/GNU Sir Terry').expect(200, 'GNU Sir Terry'); - app.server.close(); + before(async () => { + apiSpec = createApiSpec(); + app = await createApp(apiSpec); + }); + after(async () => { + await app.closeServer(); + }); + + it('does not mutate the API specification', async () => { + await request(app).get('/ping/GNU Sir Terry').expect(200, 'GNU Sir Terry'); deepStrictEqual(apiSpec, createApiSpec()); }); }); async function createApp( apiSpec: OpenAPIV3.Document, -): Promise { - const app = express(); +): Promise { + const app = express() as ExpressWithServer; + app.basePath = ''; app.use( OpenApiValidator.middleware({ diff --git a/test/577.spec.ts b/test/577.spec.ts index 512bd24f..3926db4b 100644 --- a/test/577.spec.ts +++ b/test/577.spec.ts @@ -1,29 +1,36 @@ import express from 'express'; -import { Server } from 'http'; import request from 'supertest'; import * as OpenApiValidator from '../src'; import { OpenAPIV3 } from '../src/framework/types'; -import { startServer } from './common/app.common'; +import { ExpressWithServer, startServer } from './common/app.common'; import { deepStrictEqual } from 'assert'; describe('#577 - Exclude response validation that is not in api spec', () => { - it('does not validate responses which are not present in the spec', async () => { - const apiSpec = createApiSpec(); + let apiSpec: OpenAPIV3.Document; + let app: ExpressWithServer; + + before(async () => { + apiSpec = createApiSpec(); + app = await createApp(apiSpec); + }); - const app = await createApp(apiSpec); + after(async () => { + await app.closeServer(); + }); + + it('does not validate responses which are not present in the spec', async () => { await request(app).get('/users').expect(200, 'some users'); await request(app).post('/users').expect(201, 'Created!'); await request(app).get('/example').expect(200, 'Example indeed'); - app.server.close(); - deepStrictEqual(apiSpec, createApiSpec()); }); }); async function createApp( apiSpec: OpenAPIV3.Document, -): Promise { - const app = express(); +): Promise { + const app = express() as ExpressWithServer; + app.basePath = ''; app.use( OpenApiValidator.middleware({ diff --git a/test/699.spec.ts b/test/699.spec.ts index b7b28435..63c279a1 100644 --- a/test/699.spec.ts +++ b/test/699.spec.ts @@ -1,8 +1,8 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; - +import { createApp, ExpressWithServer } from './common/app'; +import { EovErrorHandler } from './common/app.common'; import { date, dateTime } from '../src/framework/base.serdes'; const apiSpecPath = path.join('test', 'resources', '699.yaml'); @@ -26,7 +26,7 @@ class BadDate extends Date { } describe('699', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -56,7 +56,7 @@ describe('699', () => { if (typeof req.params.id !== 'object') { throw new Error('Should be deserialized to ObjectId object'); } - let date = new Date('2020-12-20T07:28:19.213Z'); + const date = new Date('2020-12-20T07:28:19.213Z'); res.json({ id: req.params.id, creationDateTime: date, @@ -82,20 +82,20 @@ describe('699', () => { } res.json(req.body); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should control GOOD id format and get a response in expected format', async () => @@ -167,7 +167,7 @@ describe('699', () => { }); describe('699 serialize response components only', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -193,18 +193,17 @@ describe('699 serialize response components only', () => { 3005, (app) => { app.get([`${app.basePath}/users/:id?`], (req, res) => { - debugger; if (typeof req.params.id !== 'string') { throw new Error('Should be not be deserialized to ObjectId object'); } - let date = new Date('2020-12-20T07:28:19.213Z'); - let result = { + const date = new Date('2020-12-20T07:28:19.213Z'); + const result = { id: new ObjectID(req.params.id), creationDateTime: date, creationDate: date, shortOrLong: 'a', - history: [{ modificationDate: undefined }], - historyWithoutRef: [{ modificationDate: undefined }], + history: [{} as { modificationDate?: ObjectID | Date }], + historyWithoutRef: [{} as { modificationDate?: ObjectID | Date }], }; if (req.query.baddateresponse === 'functionNotExists') { result.history[0].modificationDate = new ObjectID(); @@ -251,20 +250,20 @@ describe('699 serialize response components only', () => { // We let creationDate et al as String and it should also work (either in Date Object ou String 'date' format) res.json(req.body); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should control GOOD id format and get a response in expected format', async () => diff --git a/test/821.spec.ts b/test/821.spec.ts index 7105ee24..e32b502c 100644 --- a/test/821.spec.ts +++ b/test/821.spec.ts @@ -1,18 +1,30 @@ import express from 'express'; -import { Server } from 'http'; import request from 'supertest'; import * as OpenApiValidator from '../src'; import { OpenAPIV3 } from '../src/framework/types'; -import { startServer } from './common/app.common'; +import { + EovErrorHandler, + ExpressWithServer, + startServer, +} from './common/app.common'; import path from 'path'; const apiSpecPath = path.join('test', 'resources', '699.yaml'); - const date = new Date(); + describe('issue #821 - serialization inside addiotionalProperties', () => { - it('serializa both outer and inner date in addiotionalProperties', async () => { - const app = await createApp(apiSpecPath); - await request(app) + let app: ExpressWithServer; + + before(async () => { + app = await createApp(apiSpecPath); + }); + + after(async () => { + await app.closeServer(); + }); + + it('serializa both outer and inner date in addiotionalProperties', async () => + request(app) .get('/test') .expect(200, { outer_date: date.toISOString(), @@ -21,15 +33,14 @@ describe('issue #821 - serialization inside addiotionalProperties', () => { inner_date: date.toISOString(), }, }, - }); - app.server!.close(); - }); + })); }); async function createApp( apiSpec: OpenAPIV3.Document | string, -): Promise { - const app = express(); +): Promise { + const app = express() as ExpressWithServer; + app.basePath = ''; app.use( OpenApiValidator.middleware({ @@ -49,13 +60,13 @@ async function createApp( }); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { console.error(err); // dump error to console for debug res.status(err.status || 500).json({ message: err.message, errors: err.errors, }); - }); + })); await startServer(app, 3001); return app; diff --git a/test/881.spec.ts b/test/881.spec.ts index 0744359e..e77992cc 100644 --- a/test/881.spec.ts +++ b/test/881.spec.ts @@ -1,16 +1,25 @@ +import path from 'path'; +import express from 'express'; +import bodyParser from 'body-parser'; +import * as OpenApiValidator from '../src'; import { expect } from 'chai'; import request from 'supertest'; +import { + EovErrorHandler, + ExpressWithServer, + startServer, +} from './common/app.common'; describe('multi-spec', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app - app = createServer(); + app = await createServer(); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('create campaign should return 200', async () => @@ -31,14 +40,10 @@ describe('multi-spec', () => { })); }); -function createServer() { - const express = require('express'); - const path = require('path'); - const bodyParser = require('body-parser'); - const http = require('http'); - const OpenApiValidator = require('../src'); +async function createServer() { + const app = express() as ExpressWithServer; + app.basePath = ''; - const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.text()); app.use(bodyParser.json()); @@ -57,16 +62,14 @@ function createServer() { routes(app, v); } - const server = http.createServer(app); - server.listen(3000); - console.log('Listening on port 3000'); + await startServer(app, 3000); - function routes(app, v) { + function routes(app: ExpressWithServer, v: number) { if (v === 1) routesV1(app); if (v === 2) routesV2(app); } - function routesV1(app) { + function routesV1(app: ExpressWithServer) { const v = '/v1'; app.post(`${v}/pets`, (req, res, next) => { res.json({ ...req.body }); @@ -81,16 +84,16 @@ function createServer() { ]); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { // format error res.status(err.status || 500).json({ message: err.message, errors: err.errors, }); - }); + })); } - function routesV2(app) { + function routesV2(app: ExpressWithServer) { const v = '/v2'; app.get(`${v}/pets`, (req, res, next) => { res.json([ @@ -105,15 +108,14 @@ function createServer() { res.json({ ...req.body }); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { // format error res.status(err.status || 500).json({ message: err.message, errors: err.errors, }); - }); + })); } - app.server = server; return app; } diff --git a/test/additional.props.query.params.spec.ts b/test/additional.props.query.params.spec.ts index 3b05a864..20c2c47b 100644 --- a/test/additional.props.query.params.spec.ts +++ b/test/additional.props.query.params.spec.ts @@ -1,12 +1,12 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; import { expect } from 'chai'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -26,8 +26,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should allow additional / unknown properties properties', async () => diff --git a/test/additional.props.spec.ts b/test/additional.props.spec.ts index 2ab11e8e..200270d4 100644 --- a/test/additional.props.spec.ts +++ b/test/additional.props.spec.ts @@ -2,11 +2,11 @@ import request from 'supertest'; import path from 'path'; import express from 'express'; import { expect } from 'chai'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -26,8 +26,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 400 if additionalProperties=false, and type is invalid', async () => diff --git a/test/ajv.options.spec.ts b/test/ajv.options.spec.ts index 54306fd2..9f70a2c5 100644 --- a/test/ajv.options.spec.ts +++ b/test/ajv.options.spec.ts @@ -26,25 +26,25 @@ describe('AjvOptions', () => { validateFormats: true, }; - it('should not validate schema for requests since schema is validated on startup', async () => { + it('should not validate schema for requests since schema is validated on startup', () => { const ajv = new AjvOptions(baseOptions); const options = ajv.request; expect(options.validateSchema).to.be.false; }); - it('should not validate schema for response since schema is validated on startup', async () => { + it('should not validate schema for response since schema is validated on startup', () => { const ajv = new AjvOptions(baseOptions); const options = ajv.response; expect(options.validateSchema).to.be.false; }); - it('should not validate schema for preprocessor since schema is validated on startup', async () => { + it('should not validate schema for preprocessor since schema is validated on startup', () => { const ajv = new AjvOptions(baseOptions); const options = ajv.preprocessor; expect(options.validateSchema).to.be.false; }); - it('should not validate schema for multipar since schema is validated on startup', async () => { + it('should not validate schema for multipar since schema is validated on startup', () => { const ajv = new AjvOptions(baseOptions); const options = ajv.multipart; expect(options.validateSchema).to.be.false; @@ -61,6 +61,7 @@ describe('AjvOptions', () => { ], }); const options = ajv.multipart; + expect(options.serDesMap).has.property('custom-1'); expect(options.serDesMap['custom-1']).has.property('deserialize'); expect(options.serDesMap['custom-1']).does.not.have.property('serialize'); }); diff --git a/test/ajv.resolves.more.than.one.schema.spec.ts b/test/ajv.resolves.more.than.one.schema.spec.ts index 3cd4098c..19c823dc 100644 --- a/test/ajv.resolves.more.than.one.schema.spec.ts +++ b/test/ajv.resolves.more.than.one.schema.spec.ts @@ -1,16 +1,28 @@ import express from 'express'; -import { Server } from 'http'; import request from 'supertest'; import * as OpenApiValidator from '../src'; -import { startServer } from './common/app.common'; +import { + EovErrorHandler, + ExpressWithServer, + startServer, +} from './common/app.common'; import { deepStrictEqual } from 'assert'; +import { OpenAPIV3 } from '../src/framework/types'; describe('AJV: reference resolves to more than one schema', () => { - it('it should ignore x-stoplight properties', async () => { - const apiSpec = createApiSpec(); + let apiSpec: OpenAPIV3.Document; + let app: ExpressWithServer; + + before(async () => { + apiSpec = createApiSpec(); + app = await createApp(apiSpec); + }); - const app = await createApp(apiSpec); + after(async () => { + await app.closeServer(); + }); + it('it should ignore x-stoplight properties', async () => { await request(app) .get('/bear') .expect((res) => { @@ -23,16 +35,15 @@ describe('AJV: reference resolves to more than one schema', () => { } }); - app.server.close(); - deepStrictEqual(apiSpec, createApiSpec()); }); }); async function createApp( - apiSpec: any, -): Promise { - const app = express(); + apiSpec: OpenAPIV3.Document, +): Promise { + const app = express() as ExpressWithServer; + app.basePath = ''; app.use( OpenApiValidator.middleware({ @@ -46,15 +57,15 @@ async function createApp( }), ); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(500).send(err.stack); - }); + })); await startServer(app, 3001); return app; } -function createApiSpec() { +function createApiSpec(): OpenAPIV3.Document { return { openapi: '3.0.3', info: { @@ -92,7 +103,7 @@ function createApiSpec() { type: 'string', }, }, - }, + } as OpenAPIV3.SchemaObject, }, }, }; diff --git a/test/all.of.spec.ts b/test/all.of.spec.ts index 499c747b..f9144d77 100644 --- a/test/all.of.spec.ts +++ b/test/all.of.spec.ts @@ -2,11 +2,11 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -19,8 +19,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should validate allOf', async () => diff --git a/test/allow.header.spec.ts b/test/allow.header.spec.ts index cc275edd..984c361c 100644 --- a/test/allow.header.spec.ts +++ b/test/allow.header.spec.ts @@ -1,21 +1,20 @@ import { expect } from 'chai'; import express from 'express'; -import { Server } from 'http'; import request from 'supertest'; import * as packageJson from '../package.json'; import * as OpenApiValidator from '../src'; import { OpenAPIV3 } from '../src/framework/types'; -import { startServer } from './common/app.common'; +import { ExpressWithServer, startServer } from './common/app.common'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { app = await createApp(); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('adds "Allow" header to 405 - Method Not Allowed', async () => @@ -30,8 +29,9 @@ describe(packageJson.name, () => { })); }); -async function createApp(): Promise { - const app = express(); +async function createApp(): Promise { + const app = express() as ExpressWithServer; + app.basePath = ''; app.use( OpenApiValidator.middleware({ diff --git a/test/circular.spec.ts b/test/circular.spec.ts index 5888d0d6..23112141 100644 --- a/test/circular.spec.ts +++ b/test/circular.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -18,8 +18,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should validate circular ref successfully', async () => diff --git a/test/coercion.spec.ts b/test/coercion.spec.ts index 3cdd252e..aa3e7937 100644 --- a/test/coercion.spec.ts +++ b/test/coercion.spec.ts @@ -2,12 +2,12 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; - let arrayCoercedApp = null; + let app: ExpressWithServer; + let arrayCoercedApp: ExpressWithServer; before(async () => { // Set up the express app @@ -32,9 +32,9 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); - arrayCoercedApp.server.close(); + after(async () => { + await app.closeServer(); + await arrayCoercedApp.closeServer(); }); it('should return 400 since is_cat is passed as string not boolean', async () => diff --git a/test/common/app.common.ts b/test/common/app.common.ts index e2c3d696..3c023242 100644 --- a/test/common/app.common.ts +++ b/test/common/app.common.ts @@ -1,19 +1,42 @@ -import { Request, Response } from 'express'; +import { Express, NextFunction, Request, Response } from 'express'; import http from 'http'; import express from 'express'; +import { HttpError } from '../../src/framework/types'; -export function startServer(app, port: number): Promise { - return new Promise((resolve, reject) => { - const http = require('http'); - const server = http.createServer(app); - app.server = server; +export type ExpressWithServer = Express & { + server: http.Server; + closeServer: () => Promise; + basePath: string; +}; + +export type EovErrorHandler = ( + err: HttpError, + req: Request, + res: Response, + next: NextFunction, +) => void; + +export async function startServer( + app: ExpressWithServer, + port: number, +): Promise { + const http = await import('http'); + const server = http.createServer(app); + + app.server = server; + app.closeServer = async () => { + app.server.closeAllConnections(); + return new Promise((resolve) => app.server.close(() => resolve())); + }; + + return new Promise((resolve) => { server.listen(port, () => { resolve(server); }); }); } -export function routes(app) { +export function routes(app: ExpressWithServer) { const basePath = app.basePath; const router1 = express .Router() diff --git a/test/common/app.mw.ts b/test/common/app.mw.ts index 18590ef2..aaac3e00 100644 --- a/test/common/app.mw.ts +++ b/test/common/app.mw.ts @@ -5,18 +5,25 @@ import bodyParser from 'body-parser'; import logger from 'morgan'; import * as OpenApiValidator from '../../src'; -import { startServer, routes } from './app.common'; +import { + startServer, + routes, + ExpressWithServer, + EovErrorHandler, +} from './app.common'; import { OpenApiValidatorOpts } from '../../src/framework/types'; +export type { ExpressWithServer }; + export async function createApp( - opts?: OpenApiValidatorOpts, + opts: OpenApiValidatorOpts, port = 3000, - customRoutes = (app) => {}, + customRoutes = (app: ExpressWithServer) => {}, useRoutes = true, apiRouter = undefined, ) { - var app = express(); - (app).basePath = '/v1'; + const app = express() as ExpressWithServer; + app.basePath = '/v1'; app.use(bodyParser.json()); app.use(bodyParser.json({ type: 'application/*+json' })); @@ -41,12 +48,12 @@ export async function createApp( if (useRoutes) { // Register error handler - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, errors: err.errors, }); - }); + })); } const server = await startServer(app, port); diff --git a/test/common/app.ts b/test/common/app.ts index 21e396df..a472cb38 100644 --- a/test/common/app.ts +++ b/test/common/app.ts @@ -5,18 +5,25 @@ import bodyParser from 'body-parser'; import logger from 'morgan'; import * as OpenApiValidator from '../../src'; -import { startServer, routes } from './app.common'; +import { + startServer, + routes, + ExpressWithServer, + EovErrorHandler, +} from './app.common'; import { OpenApiValidatorOpts } from '../../src/framework/types'; +export type { ExpressWithServer }; + export async function createApp( - opts?: OpenApiValidatorOpts, + opts: OpenApiValidatorOpts, port = 3000, - customRoutes = (app) => {}, + customRoutes = (app: ExpressWithServer) => {}, useRoutes = true, useParsers = true, ) { - var app = express(); - (app).basePath = '/v1'; + const app = express() as ExpressWithServer; + app.basePath = '/v1'; if (useParsers) { app.use(bodyParser.json()); @@ -44,13 +51,13 @@ export async function createApp( if (useRoutes) { // Register error handler - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { // console.error(err); res.status(err.status ?? 500).json({ message: err.message, errors: err.errors, }); - }); + })); } const server = await startServer(app, port); diff --git a/test/common/run.ts b/test/common/run.ts index 4cc5c4a5..4ef7ceae 100644 --- a/test/common/run.ts +++ b/test/common/run.ts @@ -2,4 +2,6 @@ import path from 'path'; import { createApp } from '../common/app'; const apiSpec = path.join('test', 'resources', 'openapi.yaml'); -createApp({ apiSpec }, 3000); +createApp({ apiSpec }, 3000).catch((err) => { + console.error('Runtime failure', err); +}); diff --git a/test/component.params.spec.ts b/test/component.params.spec.ts index 5cbd17d3..2d1b9106 100644 --- a/test/component.params.spec.ts +++ b/test/component.params.spec.ts @@ -2,11 +2,11 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -21,13 +21,13 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should handle components.parameter $refs', async () => { const id = `01701deb-34cb-46c2-972d-6eeea3850342`; - request(app) + return request(app) .get(`/api/v1/meeting/${id}`) .expect(200) .then((r) => { diff --git a/test/datetime.validation.spec.ts b/test/datetime.validation.spec.ts index 2e315628..27b5bce5 100644 --- a/test/datetime.validation.spec.ts +++ b/test/datetime.validation.spec.ts @@ -1,15 +1,17 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('datetime.validation', () => { - let app = null; + let app: ExpressWithServer; - async function setupServer(validateFormats?: false | 'full' | 'fast') { + function setupServer( + validateFormats?: false | 'full' | 'fast', + ): Promise { // Set up the express app const apiSpec = path.join('test', 'resources', 'datetime.validation.yaml'); - app = await createApp( + return createApp( { apiSpec, validateResponses: true, @@ -26,18 +28,12 @@ describe('datetime.validation', () => { ); } - beforeEach(() => { - app = null; - }); - afterEach(async () => { - if (app) { - await new Promise((resolve) => app.server.close(resolve)); - } + await app.closeServer(); }); it('should return 200 if testDateTimeProperty is provided with invalid, but correctly formatted date time and default validation is enabled (past compatibility)', async () => { - await setupServer(); + app = await setupServer(); await request(app) .post(`${app.basePath}/date-time-validation`) .send({ @@ -51,7 +47,7 @@ describe('datetime.validation', () => { }); it('should return 400 if testDateTimeProperty is provided with incorrectly formatted date time and default validation enabled (past compatibility)', async () => { - await setupServer(); + app = await setupServer(); await request(app) .post(`${app.basePath}/date-time-validation`) .send({ @@ -61,7 +57,7 @@ describe('datetime.validation', () => { }); it('should return 200 if testDateTimeProperty is provided with incorrectly formatted date time and format validation disabled', async () => { - await setupServer(false); + app = await setupServer(false); await request(app) .post(`${app.basePath}/date-time-validation`) .send({ @@ -75,7 +71,7 @@ describe('datetime.validation', () => { }); it('should return 200 if testDateTimeProperty is provided with valid date time and full validation enabled', async () => { - await setupServer('full'); + app = await setupServer('full'); await request(app) .post(`${app.basePath}/date-time-validation`) .send({ @@ -89,7 +85,7 @@ describe('datetime.validation', () => { }); it('should return 400 if testDateTimeProperty is provided with invalid date time and full validation enabled', async () => { - await setupServer('full'); + app = await setupServer('full'); await request(app) .post(`${app.basePath}/date-time-validation`) .send({ diff --git a/test/default-export.spec.ts b/test/default-export.spec.ts index c2806b94..b00180d2 100644 --- a/test/default-export.spec.ts +++ b/test/default-export.spec.ts @@ -3,6 +3,8 @@ import * as OpenApiValidator from '../src'; import { expect } from 'chai'; import request from 'supertest'; import path from 'path'; +import { ExpressWithServer, startServer } from './common/app.common'; +import { OpenAPIV3 } from '../src/framework/types'; const schema = { openapi: '3.0.0', @@ -20,10 +22,12 @@ const schema = { } as const; describe('default export resolver', () => { - let server = null; - let app = express(); + let app: ExpressWithServer; before(async () => { + app = express() as ExpressWithServer; + app.basePath = ''; + app.use( OpenApiValidator.middleware({ apiSpec: schema, @@ -31,11 +35,12 @@ describe('default export resolver', () => { }), ); - server = app.listen(3000); - console.log('server start port 3000'); + await startServer(app, 3000); }); - after(async () => server.close()); + after(async () => { + await app.closeServer(); + }); it('should use default export operation', async () => { return request(app) diff --git a/test/default.export.fn.spec.ts b/test/default.export.fn.spec.ts index ae33582c..8404ef03 100644 --- a/test/default.export.fn.spec.ts +++ b/test/default.export.fn.spec.ts @@ -3,12 +3,16 @@ import * as OpenApiValidator from '../src'; import { expect } from 'chai'; import request from 'supertest'; import path from 'path'; +import { ExpressWithServer, startServer } from './common/app.common'; +import { OpenAPIV3 } from '../src/framework/types'; describe('default export resolver', () => { - let server = null; - let app = express(); + let app: ExpressWithServer; before(async () => { + app = express() as ExpressWithServer; + app.basePath = ''; + app.use( OpenApiValidator.middleware({ apiSpec: { @@ -18,10 +22,9 @@ describe('default export resolver', () => { '/': { get: { operationId: 'test#get', - // @ts-ignore 'x-eov-operation-handler': 'routes/default-export-fn', responses: { 200: { description: 'homepage' } }, - }, + } as OpenAPIV3.OperationObject, }, }, }, @@ -29,11 +32,12 @@ describe('default export resolver', () => { }), ); - server = app.listen(3000); - console.log('server start port 3000'); + await startServer(app, 3000); }); - after(async () => server.close()); + after(async () => { + await app.closeServer(); + }); it('should use default export operation', async () => { return request(app) diff --git a/test/empty.servers.spec.ts b/test/empty.servers.spec.ts index 9ec93905..07df6a2c 100644 --- a/test/empty.servers.spec.ts +++ b/test/empty.servers.spec.ts @@ -2,10 +2,10 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('empty servers', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -18,8 +18,8 @@ describe('empty servers', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should throw 400 if servers are empty and request is malformed', async () => diff --git a/test/escaped.characters.in.ref.path.spec.ts b/test/escaped.characters.in.ref.path.spec.ts index 33ade72f..a235915f 100644 --- a/test/escaped.characters.in.ref.path.spec.ts +++ b/test/escaped.characters.in.ref.path.spec.ts @@ -1,10 +1,10 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('when escaped characters are in path', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -39,8 +39,8 @@ describe('when escaped characters are in path', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); // Without option "unsafeRefs" this test will fail diff --git a/test/formats.spec.ts b/test/formats.spec.ts index a595fc05..6dfa9dbc 100644 --- a/test/formats.spec.ts +++ b/test/formats.spec.ts @@ -1,12 +1,13 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; const apiSpecPath = path.join('test', 'resources', 'formats.yaml'); describe('path params', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -17,12 +18,12 @@ describe('path params', () => { { name: 'three-digits', type: 'number', - validate: (v) => /^[0-9]{3}$/.test(v.toString()), + validate: (v: number) => /^[0-9]{3}$/.test(v.toString()), }, { name: 'three-letters', type: 'string', - validate: (v) => /^[A-Za-z]{3}$/.test(v), + validate: (v: string) => /^[A-Za-z]{3}$/.test(v), }, ], }, @@ -32,20 +33,20 @@ describe('path params', () => { app.all(`${app.basePath}/formats/1`, (req, res) => res.json([req.query]), ); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); // TODO add tests for min and max float values diff --git a/test/headers.2.spec.ts b/test/headers.2.spec.ts index 0bfcc0b0..0a733df9 100644 --- a/test/headers.2.spec.ts +++ b/test/headers.2.spec.ts @@ -1,11 +1,12 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'headers.yaml'); @@ -16,19 +17,19 @@ describe(packageJson.name, () => { app.use(`${app.basePath}/headers_1`, (req, res) => { res.send('headers_1'); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 400 missing required header', async () => { diff --git a/test/headers.spec.ts b/test/headers.spec.ts index ad615357..88f19a77 100644 --- a/test/headers.spec.ts +++ b/test/headers.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; /** * Required to create app for each step, since 'buildMiddleware' is cached by media-type in contentType. @@ -14,15 +14,13 @@ describe(packageJson.name, () => { * To avoid any potential error, use beforeEach and afterEach. * * */ - beforeEach(() => { + beforeEach(async () => { const apiSpec = path.join('test', 'resources', 'openapi.yaml'); - return createApp({ apiSpec }, 3004).then((a) => { - app = a; - }); + app = await createApp({ apiSpec }, 3004); }); - afterEach(() => { - (app).server.close(); + afterEach(async () => { + await app.closeServer(); }); it('should throw 400 if required header is missing', async () => diff --git a/test/ignore.paths.spec.ts b/test/ignore.paths.spec.ts index 54186524..ce5f76e6 100644 --- a/test/ignore.paths.spec.ts +++ b/test/ignore.paths.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('ignorePaths as RegExp', () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; + let basePath: string; before(async () => { const apiSpec = path.join('test', 'resources', 'ignore.paths.yaml'); @@ -33,7 +33,9 @@ describe('ignorePaths as RegExp', () => { basePath = app.basePath; }); - after(() => app.server.close()); + after(async () => { + await app.closeServer(); + }); it('should ignore path and return 200, rather than validate', async () => request(app) @@ -68,7 +70,7 @@ describe('ignorePaths as RegExp', () => { .expect('Content-Type', /json/) .expect(404)); - describe(`GET ${basePath}/pets/:id`, () => { + describe(`GET /pets/:id`, () => { it('should validate a path within the base path that is not ignored', async () => { const id = 'my_id'; return request(app) @@ -105,14 +107,14 @@ describe('ignorePaths as RegExp', () => { }); describe('ignorePaths as Function', () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; + let basePath: string; before(async () => { const apiSpec = path.join('test', 'resources', 'ignore.paths.yaml'); app = await createApp( - { apiSpec, ignorePaths: (path) => path.endsWith('/hippies') }, + { apiSpec, ignorePaths: (path: string) => path.endsWith('/hippies') }, 3005, (app) => { app.all('/v1/hippies', (req, res) => { @@ -132,7 +134,9 @@ describe('ignorePaths as Function', () => { basePath = app.basePath; }); - after(() => app.server.close()); + after(async () => { + await app.closeServer(); + }); it('should ignore path and return 200, rather than validate', async () => request(app) @@ -167,7 +171,7 @@ describe('ignorePaths as Function', () => { .expect('Content-Type', /json/) .expect(404)); - describe(`GET ${basePath}/pets/:id`, () => { + describe(`GET /pets/:id`, () => { it('should validate a path within the base path that is not ignored', async () => { const id = 'my_id'; return request(app) diff --git a/test/invalid.apispec.spec.ts b/test/invalid.apispec.spec.ts index 55438cdc..50f81b10 100644 --- a/test/invalid.apispec.spec.ts +++ b/test/invalid.apispec.spec.ts @@ -1,39 +1,47 @@ -import express from 'express'; -import { Server } from 'http'; +import express, { Request } from 'express'; import request from 'supertest'; import * as OpenApiValidator from '../src'; import { OpenAPIV3, OpenApiValidatorOpts } from '../src/framework/types'; -import { startServer } from './common/app.common'; +import { ExpressWithServer, startServer } from './common/app.common'; describe('invalid api spec', () => { + let apiSpec: OpenAPIV3.Document; + let app: ExpressWithServer; + + beforeEach(() => { + apiSpec = createApiSpec(); + }); + + afterEach(async () => { + await app.closeServer(); + }); + it('should propagate spec errors when validateApiSpec is true', async () => { - const apiSpec = createApiSpec(); - const app = await createApp({ + app = await createApp({ apiSpec, }); await request(app).get('/dev/hello/echo').expect(500); - app.server.close(); }); + it('should fail gracefully when validateApiSpec is false', async () => { - const apiSpec = createApiSpec(); - const app = await createApp({ + app = await createApp({ apiSpec, validateApiSpec: false, }); await request(app).get('/dev/hello/echo').expect(500); - app.server.close(); }); }); async function createApp( opts: OpenApiValidatorOpts, -): Promise { - const app = express(); +): Promise { + const app = express() as ExpressWithServer; + app.basePath = ''; app.use(OpenApiValidator.middleware(opts)); app.use( express.Router().get('/dev/hello/echo', (req, res) => { - res.status(200).send((req.params).value); + res.status(200).send((req as Request).params.value); }), ); @@ -42,7 +50,7 @@ async function createApp( } function createApiSpec(): OpenAPIV3.Document { - return { + return { openapi: '3.0.3', info: { title: 'The API', @@ -69,7 +77,8 @@ function createApiSpec(): OpenAPIV3.Document { summary: 'Responds with the request.', description: '', responses: { '200': { description: 'OK' } }, - parameters: { q: 'string' }, // <-- THE INCORRECT BIT + // Incorrect parameters, should be array. + parameters: { q: 'string' } as unknown as OpenAPIV3.ParameterObject[], tags: ['dev/hello'], }, }, diff --git a/test/missing.spec.ts b/test/missing.spec.ts index 8c3fb411..f400a3a5 100644 --- a/test/missing.spec.ts +++ b/test/missing.spec.ts @@ -1,16 +1,13 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe.skip(packageJson.name, () => { - let app = null; - after(() => { - app.server.close(); - }); + let app: ExpressWithServer; - it('should propagate missing spec to err handler', async () => { + before(async () => { const apiSpec = path.join('test', 'resources', 'does-not-exist.yaml'); app = await createApp({ apiSpec, coerceTypes: false }, 3005, (app) => app.use( @@ -18,7 +15,12 @@ describe.skip(packageJson.name, () => { express.Router().get(`/test`, (req, res) => res.json(req.body)), ), ); + }); - request(app).get('/test').expect(500); + after(async () => { + await app.closeServer(); }); + + it('should propagate missing spec to err handler', async () => + request(app).get('/test').expect(500)); }); diff --git a/test/multi.spec.spec.ts b/test/multi.spec.spec.ts index d50d296e..4cabdc08 100644 --- a/test/multi.spec.spec.ts +++ b/test/multi.spec.spec.ts @@ -1,16 +1,25 @@ +import express from 'express'; +import path from 'path'; +import bodyParser from 'body-parser'; +import * as OpenApiValidator from '../src'; import { expect } from 'chai'; import request from 'supertest'; +import { + EovErrorHandler, + ExpressWithServer, + startServer, +} from './common/app.common'; describe('multi-spec', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app - app = createServer(); + app = await createServer(); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('create campaign should return 200', async () => @@ -31,14 +40,10 @@ describe('multi-spec', () => { })); }); -function createServer() { - const express = require('express'); - const path = require('path'); - const bodyParser = require('body-parser'); - const http = require('http'); - const OpenApiValidator = require('../src'); +async function createServer(): Promise { + const app = express() as ExpressWithServer; + app.basePath = ''; - const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.text()); app.use(bodyParser.json()); @@ -56,16 +61,14 @@ function createServer() { routes(app, v); } - const server = http.createServer(app); - server.listen(3000); - console.log('Listening on port 3000'); + await startServer(app, 3000); - function routes(app, v) { + function routes(app: ExpressWithServer, v: number) { if (v === 1) routesV1(app); if (v === 2) routesV2(app); } - function routesV1(app) { + function routesV1(app: ExpressWithServer) { const v = '/v1'; app.post(`${v}/pets`, (req, res, next) => { res.json({ ...req.body }); @@ -80,16 +83,16 @@ function createServer() { ]); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { // format error res.status(err.status || 500).json({ message: err.message, errors: err.errors, }); - }); + })); } - function routesV2(app) { + function routesV2(app: ExpressWithServer) { const v = '/v2'; app.get(`${v}/pets`, (req, res, next) => { res.json([ @@ -104,15 +107,14 @@ function createServer() { res.json({ ...req.body }); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { // format error res.status(err.status || 500).json({ message: err.message, errors: err.errors, }); - }); + })); } - app.server = server; return app; } diff --git a/test/multipart.disabled.spec.ts b/test/multipart.disabled.spec.ts index 208a1eb8..9710bfc0 100644 --- a/test/multipart.disabled.spec.ts +++ b/test/multipart.disabled.spec.ts @@ -2,11 +2,12 @@ import express from 'express'; import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; + before(async () => { const apiSpec = path.join('test', 'resources', 'multipart.yaml'); app = await createApp({ apiSpec, fileUploader: false }, 3003, (app) => @@ -20,9 +21,11 @@ describe(packageJson.name, () => { ), ); }); - after(() => { - (app).server.close(); + + after(async () => { + await app.closeServer(); }); + describe(`multipart disabled`, () => { it('should throw 400 when required multipart file field', async () => request(app) diff --git a/test/multipart.spec.ts b/test/multipart.spec.ts index e86854a6..f28b78d9 100644 --- a/test/multipart.spec.ts +++ b/test/multipart.spec.ts @@ -3,11 +3,14 @@ import path from 'path'; import fs from 'fs'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { Writable } from 'stream'; +import { finished } from 'stream/promises'; describe('a multipart request', () => { - let app; - const fileNames = []; + let app: ExpressWithServer; + const fileNames: string[] = []; + before(async () => { const apiSpec = path.join('test', 'resources', 'multipart.yaml'); app = await createApp( @@ -37,11 +40,13 @@ describe('a multipart request', () => { ), ); }); + beforeEach(() => { fileNames.length = 0; }); - after(() => { - (app).server.close(); + + after(async () => { + await app.closeServer(); }); describe('that contains $refs', () => { @@ -94,9 +99,9 @@ describe('a multipart request', () => { .get(`${app.basePath}/sample_2`) .set('Content-Type', 'multipart/form-data') .set('Accept', 'application/json') - .expect('Content-Type', /json/) .attach('file', 'package.json') .field('metadata', 'some-metadata') + .expect('Content-Type', /json/) .expect(405)); it('should throw 415 unsupported media type', async () => @@ -115,23 +120,20 @@ describe('a multipart request', () => { }); describe('that is well formed', () => { - it('should validate application/octet-stream file and metadata', (done) => { + it('should validate application/octet-stream file and metadata', async () => { const testImage = `${__dirname}/assets/image.png`; + const imgStream = fs.createReadStream(testImage); const req = request(app) .post(`${app.basePath}/sample_3`) .set('content-type', 'application/octet-stream'); - - const imgStream = fs.createReadStream(testImage); - imgStream.on('end', () => req.end(done)); - imgStream.pipe(req, { end: false }); + const reqStream = new Writable({ write: req.write.bind(req) }); + imgStream.pipe(reqStream); + await finished(imgStream); + await req.expect(200); }); it('should validate multipart file and metadata', async () => { - const array_with_objects = JSON.stringify([ - { - foo: 'bar', - }, - ]); + const array_with_objects = JSON.stringify([{ foo: 'bar' }]); await request(app) .post(`${app.basePath}/sample_2`) @@ -153,11 +155,7 @@ describe('a multipart request', () => { }); describe('when request does not use parsers', () => { - let app; - - after(() => { - (app).server.close(); - }); + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'multipart.yaml'); @@ -176,6 +174,10 @@ describe('when request does not use parsers', () => { ); }); + after(async () => { + await app.closeServer(); + }); + it('should validate that endpoint exists', async () => { await request(app) .post(`${app.basePath}/sample_7`) diff --git a/test/nested.routes.spec.ts b/test/nested.routes.spec.ts index baf3f789..eb270244 100644 --- a/test/nested.routes.spec.ts +++ b/test/nested.routes.spec.ts @@ -2,11 +2,11 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -37,8 +37,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should fail, because response does not satisfy schema', async () => @@ -46,7 +46,7 @@ describe(packageJson.name, () => { .get(`${app.basePath}/api-path/pets?qparam=test`) .send() .expect(500) - .then((r: any) => { + .then((r) => { const e = r.body; expect(e.message).to.contain( "/response/0 must have required property 'id'", diff --git a/test/no.components.spec.ts b/test/no.components.spec.ts index 115c9cd6..3f2660a3 100644 --- a/test/no.components.spec.ts +++ b/test/no.components.spec.ts @@ -1,11 +1,11 @@ import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import { OpenAPIV3 } from '../src/framework/types'; describe('no components', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -20,8 +20,8 @@ describe('no components', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should pass if /components is not present', async () => diff --git a/test/nullable.spec.ts b/test/nullable.spec.ts index a67d35fb..8421e261 100644 --- a/test/nullable.spec.ts +++ b/test/nullable.spec.ts @@ -2,11 +2,11 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -23,8 +23,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should allow null to be set (name: nullable true)', async () => diff --git a/test/one.of.2.spec.ts b/test/one.of.2.spec.ts index 06106a49..c4fd81f6 100644 --- a/test/one.of.2.spec.ts +++ b/test/one.of.2.spec.ts @@ -1,10 +1,11 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; describe('oneOf with discriminator', () => { - let app = null; + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'one.of.2.yaml'); @@ -21,19 +22,19 @@ describe('oneOf with discriminator', () => { app.post(`${app.basePath}/pets_all`, (req, res) => { res.json(req.body); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); describe('/discriminator_implied', () => { diff --git a/test/one.of.spec.ts b/test/one.of.spec.ts index 96c480b5..3d41bf58 100644 --- a/test/one.of.spec.ts +++ b/test/one.of.spec.ts @@ -1,11 +1,12 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'one.of.yaml'); @@ -19,19 +20,19 @@ describe(packageJson.name, () => { app.post(`${app.basePath}/one_of_b`, (req, res) => { res.json(req.body); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 200 one first oneOf option', async () => { diff --git a/test/oneof.readonly.spec.ts b/test/oneof.readonly.spec.ts index bdcae233..27c9fa2c 100644 --- a/test/oneof.readonly.spec.ts +++ b/test/oneof.readonly.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import { expect } from 'chai'; describe('one.of readonly', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -27,8 +27,8 @@ describe('one.of readonly', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('post type anyOf (without readonly id) should pass', async () => diff --git a/test/openapi.spec.ts b/test/openapi.spec.ts index aa44bea3..0fa1cc59 100644 --- a/test/openapi.spec.ts +++ b/test/openapi.spec.ts @@ -1,28 +1,25 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - const apps = []; - let basePath = null; + let apps: ExpressWithServer[] = []; + let basePath: string; - before(() => { + before(async () => { const apiSpecPath = path.join('test', 'resources', 'openapi.yaml'); - const apiSpecJson = require('./resources/openapi.json'); - return Promise.all([ + const apiSpecJson = path.join('test', 'resources', 'openapi.json'); + apps = await Promise.all([ createApp({ apiSpec: apiSpecPath }, 3001), createApp({ apiSpec: apiSpecJson }, 3002), - ]).then(([a1, a2]) => { - apps.push(a1); - apps.push(a2); - basePath = (a1).basePath; - }); + ]); + basePath = apps[0].basePath; }); - after(() => { - apps.forEach((app) => app.server.close()); + after(async () => { + await Promise.all(apps.map((app) => app.closeServer())); }); // [0,1] simulate range of 2 items - each item references an index in `apps` diff --git a/test/operation.handler.spec.ts b/test/operation.handler.spec.ts index 7058f3ef..08ad53a9 100644 --- a/test/operation.handler.spec.ts +++ b/test/operation.handler.spec.ts @@ -4,13 +4,13 @@ import { expect } from 'chai'; import request from 'supertest'; import * as OpenApiValidator from '../src'; import * as resolvers from '../src/resolvers'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import { OpenApiValidatorOpts } from '../src/framework/types'; describe('operation handler', () => { - let defaultNumberOfRoutes = null; + let defaultNumberOfRoutes: number; - before(async () => { + before(() => { const apiSpec = path.join(__dirname, 'resources/eov-operations.yaml'); const app = express(); @@ -89,8 +89,9 @@ describe('operation handler', () => { }); describe('custom operation handler', () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; + let basePath: string; + const apiSpec = path.join( __dirname, 'resources/eov-operations.modulepath.yaml', @@ -109,14 +110,15 @@ describe('custom operation handler', () => { basePath = app.basePath; }); - after(async () => app.server.close()); + after(async () => { + await app.closeServer(); + }); - it('should recognize mapped operation', async () => { - return request(app) + it('should recognize mapped operation', async () => + request(app) .get(`${basePath}/ping`) .expect(200) .then((r) => { expect(r.text).to.be.equal('pong'); - }); - }); + })); }); diff --git a/test/optional-request-body.spec.ts b/test/optional-request-body.spec.ts index 607872f9..b74bf82b 100644 --- a/test/optional-request-body.spec.ts +++ b/test/optional-request-body.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -22,8 +22,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('create document should return 201', async () => diff --git a/test/path.level.parameters.spec.ts b/test/path.level.parameters.spec.ts index 5c6a4b3f..567d0894 100644 --- a/test/path.level.parameters.spec.ts +++ b/test/path.level.parameters.spec.ts @@ -2,11 +2,11 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -25,8 +25,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 400 if pathLevel query parameter is not provided', async () => diff --git a/test/path.order.spec.ts b/test/path.order.spec.ts index f71f3403..e1a3dfbf 100644 --- a/test/path.order.spec.ts +++ b/test/path.order.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -23,8 +23,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should match on users test', async () => diff --git a/test/path.params.spec.ts b/test/path.params.spec.ts index f1e4b5d3..f1f71718 100644 --- a/test/path.params.spec.ts +++ b/test/path.params.spec.ts @@ -1,12 +1,13 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; const apiSpecPath = path.join('test', 'resources', 'path.params.yaml'); describe('path params', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -27,7 +28,7 @@ describe('path params', () => { ); app.get(`${app.basePath}/user_lookup\\::name`, (req, res) => { res.json({ - id: req.params.name, + id: 'name' in req.params ? req.params.name : undefined, }); }); app.get(`${app.basePath}/multi_users/:ids?`, (req, res) => { @@ -35,20 +36,20 @@ describe('path params', () => { ids: req.params.ids, }); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should url decode path parameters (type level)', async () => diff --git a/test/petstore.spec.ts b/test/petstore.spec.ts index c89b18d2..c76715bd 100644 --- a/test/petstore.spec.ts +++ b/test/petstore.spec.ts @@ -1,9 +1,9 @@ import request from 'supertest'; import { OpenAPIV3 } from '../src/framework/types'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('petstore', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -28,8 +28,8 @@ describe('petstore', () => { return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 200', async () => diff --git a/test/query.params.allow.unknown.spec.ts b/test/query.params.allow.unknown.spec.ts index e11286eb..150defd1 100644 --- a/test/query.params.allow.unknown.spec.ts +++ b/test/query.params.allow.unknown.spec.ts @@ -2,12 +2,11 @@ import { expect } from 'chai'; import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -25,8 +24,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should pass if known query params are specified', async () => diff --git a/test/query.params.spec.ts b/test/query.params.spec.ts index 9d3645ec..d81e9757 100644 --- a/test/query.params.spec.ts +++ b/test/query.params.spec.ts @@ -2,11 +2,11 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -27,8 +27,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should pass if known query params are specified', async () => diff --git a/test/query.serialization.ts b/test/query.serialization.spec.ts similarity index 82% rename from test/query.serialization.ts rename to test/query.serialization.spec.ts index badb2227..d8ece987 100644 --- a/test/query.serialization.ts +++ b/test/query.serialization.spec.ts @@ -2,10 +2,11 @@ import { expect } from 'chai'; import express from 'express'; import path from 'path'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; + +describe('query.serialization', () => { + let app: ExpressWithServer; -describe('styles', () => { - let app = null; before(async () => { const apiSpec = path.join('test', 'resources', 'query.serialization.yaml'); app = await createApp({ apiSpec }, 3005, (app) => @@ -24,7 +25,7 @@ describe('styles', () => { }); after(async () => { - app.server.close(); + await app.closeServer(); }); it('should handle querey param (default) style=form, explode=true', async () => @@ -35,7 +36,7 @@ describe('styles', () => { expect(r.body.query.state).is.an('array').of.length(2); })); - it.only('should handle query param with style=form, explode=false', async () => + it('should handle query param with style=form, explode=false', async () => request(app) .get('/api/q_form_nexplode') .query({ diff --git a/test/read.only.removeadditional.spec.ts b/test/read.only.removeadditional.spec.ts index 3c68cc4f..69657533 100644 --- a/test/read.only.removeadditional.spec.ts +++ b/test/read.only.removeadditional.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -65,8 +65,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should remove read only properties in requests thanks to removeAdditional', async () => diff --git a/test/read.only.spec.ts b/test/read.only.spec.ts index 81c4a35a..407fe1c1 100644 --- a/test/read.only.spec.ts +++ b/test/read.only.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -58,8 +58,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should not allow read only properties in requests', async () => diff --git a/test/request.bodies.ref.spec.ts b/test/request.bodies.ref.spec.ts index 8d2e1253..adb48490 100644 --- a/test/request.bodies.ref.spec.ts +++ b/test/request.bodies.ref.spec.ts @@ -1,10 +1,10 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('request bodies', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -24,12 +24,13 @@ describe('request bodies', () => { ...req, })) .post(`${app.basePath}/request_bodies_ref`, (req, res) => { + const accept_header = req.header('accept'); if (req.query.bad_body) { const r = req.body; r.unexpected_prop = 'bad'; res.json(r); - } else if (req.header('accept')) { - res.type(req.header('accept')).send(req.body); + } else if (accept_header) { + res.type(accept_header).send(req.body); } else { res.json(req.body); } @@ -39,8 +40,8 @@ describe('request bodies', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 415 for undeclared media type', async () => @@ -79,7 +80,7 @@ describe('request bodies', () => { }); }); - it('should return 200 if application/ld+json request body is satisfied by application/*', async () => { + it('should return 200 if application/ld+json request body is satisfied by application/*', async () => request(app) .post(`${app.basePath}/request_bodies_ref`) .set('accept', 'application/ld+json') @@ -92,10 +93,9 @@ describe('request bodies', () => { const { body } = r; expect(r.get('content-type')).to.contain('application/ld+json'); expect(body).to.have.property('testProperty'); - }); - }); + })); - it('should return 200 if application/vnd.api+json; type=two request body is validated agains the corrent schema', async () => { + it('should return 200 if application/vnd.api+json; type=two request body is validated agains the corrent schema', async () => request(app) .post(`${app.basePath}/request_bodies_ref`) .set('accept', 'application/vnd.api+json; type=two') @@ -109,8 +109,7 @@ describe('request bodies', () => { expect(r.get('content-type')).to.contain('application/vnd.api+json'); expect(r.get('content-type')).to.contain(' type=two'); expect(body).to.have.property('testPropertyTwo'); - }); - }); + })); it('should return 400 if testProperty body property is not provided', async () => request(app) diff --git a/test/request.body.validation.coerce.types.spec.ts b/test/request.body.validation.coerce.types.spec.ts index c6c74cd1..c3475022 100644 --- a/test/request.body.validation.coerce.types.spec.ts +++ b/test/request.body.validation.coerce.types.spec.ts @@ -1,12 +1,12 @@ import path from 'path'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('request body validation coercion', () => { - let coerceApp = null; - let nonCoerceApp = null; + let coerceApp: ExpressWithServer; + let nonCoerceApp: ExpressWithServer; - const defineRoutes = (app) => { + const defineRoutes = (app: ExpressWithServer) => { app.post(`${app.basePath}/coercion_test`, (req, res) => { res.status(200).send(); }); @@ -39,9 +39,9 @@ describe('request body validation coercion', () => { ); }); - after(() => { - coerceApp.server.close(); - nonCoerceApp.server.close(); + after(async () => { + await coerceApp.closeServer(); + await nonCoerceApp.closeServer(); }); it('should return 200 if coercion is enabled and the type is correct', async () => diff --git a/test/response.object.serializer.spec.ts b/test/response.object.serializer.spec.ts index 5c53f388..ca2fbbb0 100644 --- a/test/response.object.serializer.spec.ts +++ b/test/response.object.serializer.spec.ts @@ -1,7 +1,8 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; const apiSpecPath = path.join( 'test', @@ -10,7 +11,7 @@ const apiSpecPath = path.join( ); describe('response serializer', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -22,7 +23,7 @@ describe('response serializer', () => { 3005, (app) => { app.get([`${app.basePath}/date-time`], (req, res) => { - let date = new Date('2020-12-20T07:28:19.213Z'); + const date = new Date('2020-12-20T07:28:19.213Z'); res.json({ id: req.params.id, created_at: date, @@ -40,26 +41,26 @@ describe('response serializer', () => { }); }); app.get([`${app.basePath}/date`], (req, res) => { - let date = new Date('2020-12-20T07:28:19.213Z'); + const date = new Date('2020-12-20T07:28:19.213Z'); res.json({ id: req.params.id, created_at: date, }); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); describe('that receive a Date object', () => { diff --git a/test/response.validation.coerce.types.spec.ts b/test/response.validation.coerce.types.spec.ts index 35ba3aff..9de5e59d 100644 --- a/test/response.validation.coerce.types.spec.ts +++ b/test/response.validation.coerce.types.spec.ts @@ -1,12 +1,12 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; const apiSpecPath = path.join('test', 'resources', 'response.validation.yaml'); describe('response validation with type coercion', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -36,17 +36,18 @@ describe('response validation with type coercion', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should be able to return `true` as the response body', async () => request(app) .get(`${app.basePath}/boolean?value=true`) .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body).to.equal(true); })); + it('should coerce id from string to number', async () => request(app).get(`${app.basePath}/object`).expect(200)); }); diff --git a/test/response.validation.defaults.spec.ts b/test/response.validation.defaults.spec.ts index 369f3fef..36e334f8 100644 --- a/test/response.validation.defaults.spec.ts +++ b/test/response.validation.defaults.spec.ts @@ -1,7 +1,7 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; const apiSpecPath = path.join( 'test', @@ -10,7 +10,7 @@ const apiSpecPath = path.join( ); describe('response validation with type coercion', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -36,8 +36,8 @@ describe('response validation with type coercion', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should validate 200 using explicit response', async () => diff --git a/test/response.validation.on.error.spec.ts b/test/response.validation.on.error.spec.ts index 4e5941d9..f1aa9d25 100644 --- a/test/response.validation.on.error.spec.ts +++ b/test/response.validation.on.error.spec.ts @@ -1,15 +1,16 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; import * as packageJson from '../package.json'; const apiSpecPath = path.join('test', 'resources', 'response.validation.yaml'); describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; + let onErrorArgs: any[] | undefined; - let onErrorArgs = null; before(async () => { // set up express app app = await createApp( @@ -39,38 +40,38 @@ describe(packageJson.name, () => { } return res.json(json); }); - app.use((err, _req, res, _next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); }); afterEach(() => { - onErrorArgs = null; + onErrorArgs = undefined; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('custom error handler invoked if response field has a value of incorrect type', async () => request(app) .get(`${app.basePath}/pets?mode=bad_type`) .expect(200) - .then((r: any) => { + .then((r) => { const data = [{ id: 'bad_id', name: 'name', tag: 'tag' }]; expect(r.body).to.eql(data); - expect(onErrorArgs.length).to.equal(3); - expect(onErrorArgs[0].message).to.equal( + expect(onErrorArgs?.length).to.equal(3); + expect(onErrorArgs?.[0].message).to.equal( '/response/0/id must be integer', ); - expect(onErrorArgs[1]).to.eql(data); - expect(onErrorArgs[2].query).to.eql({ + expect(onErrorArgs?.[1]).to.eql(data); + expect(onErrorArgs?.[2].query).to.eql({ mode: 'bad_type', }); })); @@ -79,22 +80,22 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/users`) .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body).is.an('array').with.length(3); - expect(onErrorArgs).to.equal(null); + expect(onErrorArgs).to.be.undefined; })); it('returns error if custom error handler throws', async () => request(app) .get(`${app.basePath}/pets?mode=bad_type_throw`) .expect(500) - .then((r: any) => { + .then((r) => { const data = [{ id: 'bad_id_throw', name: 'name', tag: 'tag' }]; expect(r.body.message).to.equal('error in onError handler'); - expect(onErrorArgs.length).to.equal(3); - expect(onErrorArgs[0].message).to.equal( + expect(onErrorArgs?.length).to.equal(3); + expect(onErrorArgs?.[0].message).to.equal( '/response/0/id must be integer', ); - expect(onErrorArgs[1]).to.eql(data); + expect(onErrorArgs?.[1]).to.eql(data); })); }); diff --git a/test/response.validation.options.spec.ts b/test/response.validation.options.spec.ts index a1913f3c..566e80af 100644 --- a/test/response.validation.options.spec.ts +++ b/test/response.validation.options.spec.ts @@ -1,13 +1,14 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; import * as packageJson from '../package.json'; const apiSpecPath = path.join('test', 'resources', 'response.validation.yaml'); describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -26,7 +27,7 @@ describe(packageJson.name, () => { }); app.get(`${app.basePath}/pets`, (req, res) => { let json = {}; - if ((req.query.mode = 'bad_type')) { + if (req.query.mode == 'bad_type') { json = [{ id: 'bad_id', name: 'name', tag: 'tag' }]; } return res.json(json); @@ -34,26 +35,26 @@ describe(packageJson.name, () => { app.post(`${app.basePath}/no_additional_props`, (req, res) => { res.json(req.body); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should fail if response field has a value of incorrect type', async () => request(app) .get(`${app.basePath}/pets?mode=bad_type`) .expect(500) - .then((r: any) => { + .then((r) => { expect(r.body.message).to.contain('must be integer'); expect(r.body).to.have.property('code').that.equals(500); })); @@ -72,7 +73,7 @@ describe(packageJson.name, () => { some_invalid_prop: 'test', }) .expect(200) - .then((r: any) => { + .then((r) => { const body = r.body; expect(body).to.have.property('token_type'); expect(body).to.not.have.property('some_invalid_prop'); @@ -92,7 +93,7 @@ describe(packageJson.name, () => { }, }) .expect(200) - .then((r: any) => { + .then((r) => { const body = r.body; expect(body.user).to.have.property('id'); expect(body.user).to.not.have.property('extra_prop'); @@ -102,7 +103,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/users`) .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body).is.an('array').with.length(3); })); }); diff --git a/test/response.validation.spec.ts b/test/response.validation.spec.ts index cfe9e13c..435f2470 100644 --- a/test/response.validation.spec.ts +++ b/test/response.validation.spec.ts @@ -1,14 +1,15 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; import * as packageJson from '../package.json'; const apiSpecPath = path.join('test', 'resources', 'response.validation.yaml'); const today = new Date(); describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -77,26 +78,26 @@ describe(packageJson.name, () => { app.post(`${app.basePath}/no_additional_props`, (req, res) => { res.json(req.body); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 200 on valid responses 200 $ref', async () => request(app) .get(`${app.basePath}/ref_response_body`) .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body.id).to.be.a('number').that.equals(213); })); @@ -105,7 +106,7 @@ describe(packageJson.name, () => { .get(`${app.basePath}/ref_response_body`) .set('Accept', 'APPLICATION/JSON') .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body.id).to.be.a('number').that.equals(213); })); @@ -113,7 +114,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/pets?mode=bad_type`) .expect(500) - .then((r: any) => { + .then((r) => { expect(r.body.message).to.contain('must be integer'); expect(r.body).to.have.property('code').that.equals(500); })); @@ -123,7 +124,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/object`) .expect(500) - .then((r: any) => { + .then((r) => { expect(r.body.message).to.contain('must be object'); expect(r.body).to.have.property('code').that.equals(500); })); @@ -133,7 +134,7 @@ describe(packageJson.name, () => { .post(`${app.basePath}/object?mode=array`) .send({ id: 1, name: 'fido' }) .expect(500) - .then((r: any) => { + .then((r) => { expect(r.body.message).to.contain('must be object'); expect(r.body).to.have.property('code').that.equals(500); })); @@ -148,7 +149,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/pets?mode=empty_object`) .expect(500) - .then((r: any) => { + .then((r) => { expect(r.body.message).to.contain('must be array'); expect(r.body).to.have.property('code').that.equals(500); })); @@ -157,7 +158,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/pets?mode=empty_response`) .expect(500) - .then((r: any) => { + .then((r) => { expect(r.body.message).to.contain('body required'); expect(r.body).to.have.property('code').that.equals(500); })); @@ -201,7 +202,7 @@ describe(packageJson.name, () => { some_invalid_prop: 'test', }) .expect(500) - .then((r: any) => { + .then((r) => { const e = r.body; expect(e.message).to.contain('must NOT have additional properties'); expect(e.code).to.equal(500); @@ -221,7 +222,7 @@ describe(packageJson.name, () => { }, }) .expect(500) - .then((r: any) => { + .then((r) => { const e = r.body; expect(e.message).to.contain('must NOT have additional properties'); expect(e.code).to.equal(500); @@ -231,7 +232,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/pets?mode=check_null`) .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body).is.an('array').with.length(3); expect(r.body[0].bought_at).equal(null); expect(r.body[1].bought_at).equal(today.toISOString()); @@ -242,7 +243,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/users`) .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body).is.an('array').with.length(3); })); @@ -250,7 +251,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/boolean?value=true`) .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body).to.equal(true); })); @@ -258,7 +259,7 @@ describe(packageJson.name, () => { request(app) .get(`${app.basePath}/boolean?value=false`) .expect(200) - .then((r: any) => { + .then((r) => { expect(r.body).to.equal(false); })); }); diff --git a/test/response.validator.spec.ts b/test/response.validator.spec.ts index 1655ee79..1bcdb157 100644 --- a/test/response.validator.spec.ts +++ b/test/response.validator.spec.ts @@ -17,7 +17,7 @@ const fakeReq: OpenApiRequest = { openapi: { expressRoute: '/api/test' }, }; describe(packageJson.name, () => { - it('should validate the using default (in this case the error object)', async () => { + it('should validate the using default (in this case the error object)', () => { const v = new ResponseValidator(cloneDeep(apiSpec), { formats: { 'date-time': true, @@ -42,7 +42,7 @@ describe(packageJson.name, () => { } }); - it('should throw error when default response is invalid', async () => { + it('should throw error when default response is invalid', () => { const v = new ResponseValidator(apiSpec, { formats: { 'date-time': true, @@ -71,7 +71,7 @@ describe(packageJson.name, () => { } }); - it('should return an error if field type is invalid', async () => { + it('should return an error if field type is invalid', () => { const v = new ResponseValidator(apiSpec, { formats: { 'date-time': true, diff --git a/test/router.spec.ts b/test/router.spec.ts index 9cd47e91..be213b06 100644 --- a/test/router.spec.ts +++ b/test/router.spec.ts @@ -2,13 +2,20 @@ import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; import * as OpenApiValidator from '../src'; +import { + EovErrorHandler, + ExpressWithServer, + startServer, +} from './common/app.common'; describe('security.defaults', () => { - let app = express(); - let basePath = '/api'; - let server = null; + let app: ExpressWithServer; + let basePath: string; before(async () => { + app = express() as ExpressWithServer; + basePath = '/api'; + const router = express.Router(); router.use( OpenApiValidator.middleware({ @@ -31,18 +38,19 @@ describe('security.defaults', () => { app.get('/', (req, res) => res.status(200).send('home\n')); app.use(basePath, router); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, errors: err.errors, }); - }); + })); - server = app.listen(3000); - console.log('server start port 3000'); + await startServer(app, 3000); }); - after(async () => server.close()); + after(async () => { + await app.closeServer(); + }); it('should return 404 for undocumented route when using Router', async () => { return request(app) diff --git a/test/security.defaults.spec.ts b/test/security.defaults.spec.ts index 2dd95a86..68d68ffd 100644 --- a/test/security.defaults.spec.ts +++ b/test/security.defaults.spec.ts @@ -2,11 +2,11 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('security.defaults', () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; + let basePath: string; before(async () => { const apiSpec = path.join('test', 'resources', 'security.yaml'); @@ -25,43 +25,40 @@ describe('security.defaults', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 200 if no security', async () => request(app).get(`${basePath}/no_security`).expect(200)); - it('should skip validation, even if auth header is missing for basic auth', async () => { - return request(app) + it('should skip validation, even if auth header is missing for basic auth', async () => + request(app) .get(`${basePath}/basic`) .expect(401) .then((r) => { expect(r.body) .to.have.property('message') .that.equals('Authorization header required'); - }); - }); + })); - it('should skip security validation, even if auth header is missing for bearer auth', async () => { - return request(app) + it('should skip security validation, even if auth header is missing for bearer auth', async () => + request(app) .get(`${basePath}/bearer`) .expect(401) .then((r) => { expect(r.body) .to.have.property('message') .that.equals('Authorization header required'); - }); - }); + })); - it('should return 401 if cookie auth property is missing', async () => { - return request(app) + it('should return 401 if cookie auth property is missing', async () => + request(app) .get(`${basePath}/cookie_auth`) .expect(401) .then((r) => { expect(r.body) .to.have.property('message') .that.equals("cookie 'JSESSIONID' required"); - }); - }); + })); }); diff --git a/test/security.disabled.spec.ts b/test/security.disabled.spec.ts index d6239da5..126987bb 100644 --- a/test/security.disabled.spec.ts +++ b/test/security.disabled.spec.ts @@ -1,13 +1,14 @@ import path from 'path'; import express from 'express'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; // NOTE/TODO: These tests modify eovConf.validateSecurity.handlers // Thus test execution order matters :-( describe('security.disabled', () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; + let basePath: string; + before(async () => { // Set up the express app const apiSpec = path.join('test', 'resources', 'security.yaml'); @@ -24,18 +25,16 @@ describe('security.disabled', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 200 if no security', async () => request(app).get(`${basePath}/no_security`).expect(200)); - it('should skip validation, even if auth header is missing for basic auth', async () => { - return request(app).get(`${basePath}/basic`).expect(200); - }); + it('should skip validation, even if auth header is missing for basic auth', async () => + request(app).get(`${basePath}/basic`).expect(200)); - it('should skip security validation, even if auth header is missing for bearer auth', async () => { - return request(app).get(`${basePath}/bearer`).expect(200); - }); + it('should skip security validation, even if auth header is missing for bearer auth', async () => + request(app).get(`${basePath}/bearer`).expect(200)); }); diff --git a/test/security.handlers.spec.ts b/test/security.handlers.spec.ts index 3d730c01..a2e404cd 100644 --- a/test/security.handlers.spec.ts +++ b/test/security.handlers.spec.ts @@ -2,7 +2,7 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import { OpenApiValidatorOpts, ValidateSecurityOpts, @@ -12,8 +12,9 @@ import { // NOTE/TODO: These tests modify eovConf.validateSecurity.handlers // Thus test execution order matters :-( describe('security.handlers', () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; + let basePath: string; + const eovConf: OpenApiValidatorOpts = { apiSpec: path.join('test', 'resources', 'security.yaml'), validateSecurity: { @@ -24,6 +25,7 @@ describe('security.handlers', () => { }, }, }; + before(async () => { // Set up the express app app = await createApp(eovConf, 3005); @@ -46,8 +48,8 @@ describe('security.handlers', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 200 if no security', async () => @@ -69,7 +71,7 @@ describe('security.handlers', () => { it('should return 401 if apikey handler returns false', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.ApiKeyAuth = function (req, scopes, schema) { + validateSecurity.handlers!.ApiKeyAuth = function (req, scopes, schema) { expect(scopes).to.be.an('array').with.length(0); return false; }; @@ -87,7 +89,7 @@ describe('security.handlers', () => { it('should return 401 if apikey handler returns Promise with false', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.ApiKeyAuth = function (req, scopes, schema) { + validateSecurity.handlers!.ApiKeyAuth = function (req, scopes, schema) { expect(scopes).to.be.an('array').with.length(0); return Promise.resolve(false); }; @@ -105,7 +107,7 @@ describe('security.handlers', () => { it('should return 401 if cookie auth handler returns Promise with false', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.CookieAuth = function (req, scopes, schema) { + validateSecurity.handlers!.CookieAuth = function (req, scopes, schema) { expect(scopes).to.be.an('array').with.length(0); return Promise.resolve(false); }; @@ -123,7 +125,7 @@ describe('security.handlers', () => { it('should return 401 if apikey handler returns Promise reject with custom message', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.ApiKeyAuth = (req, scopes, schema) => { + validateSecurity.handlers!.ApiKeyAuth = (req, scopes, schema) => { expect(scopes).to.be.an('array').with.length(0); return Promise.reject(new Error('rejected promise')); }; @@ -141,7 +143,7 @@ describe('security.handlers', () => { it('should return 401 if apikey header is missing', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.ApiKeyAuth = (req, scopes, schema) => true; + validateSecurity.handlers!.ApiKeyAuth = (req, scopes, schema) => true; return request(app) .get(`${basePath}/api_key`) .expect(401) @@ -155,11 +157,8 @@ describe('security.handlers', () => { it('should return 200 if apikey header exists and handler returns true', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.ApiKeyAuth = function ( - req, - scopes, - schema: OpenAPIV3.ApiKeySecurityScheme, - ) { + validateSecurity.handlers!.ApiKeyAuth = function (req, scopes, schema) { + if (!('in' in schema)) throw new Error('Unexpected schema type'); expect(schema.type).to.equal('apiKey'); expect(schema.in).to.equal('header'); expect(schema.name).to.equal('X-API-Key'); @@ -174,11 +173,8 @@ describe('security.handlers', () => { it('should return 404 if apikey header exists and handler returns true but path doesnt exist', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.ApiKeyAuth = ( - req, - scopes, - schema: OpenAPIV3.ApiKeySecurityScheme, - ) => { + validateSecurity.handlers!.ApiKeyAuth = (req, scopes, schema) => { + if (!('in' in schema)) throw new Error('Unexpected schema type'); expect(schema.type).to.equal('apiKey'); expect(schema.in).to.equal('header'); expect(schema.name).to.equal('X-API-Key'); @@ -193,7 +189,7 @@ describe('security.handlers', () => { it('should return 401 if auth header is missing for basic auth', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.BasicAuth = (req, scopes, schema) => true; + validateSecurity.handlers!.BasicAuth = (req, scopes, schema) => true; return request(app) .get(`${basePath}/basic`) .expect(401) @@ -207,7 +203,7 @@ describe('security.handlers', () => { it('should return 401 if auth header has malformed basic auth', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.BasicAuth = (req, scopes, schema) => true; + validateSecurity.handlers!.BasicAuth = (req, scopes, schema) => true; return request(app) .get(`${basePath}/basic`) .set('Authorization', 'XXXX') @@ -224,7 +220,7 @@ describe('security.handlers', () => { it('should return 401 if auth header is missing for bearer auth', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.BearerAuth = (req, scopes, schema) => true; + validateSecurity.handlers!.BearerAuth = (req, scopes, schema) => true; return request(app) .get(`${basePath}/bearer`) .expect(401) @@ -238,7 +234,7 @@ describe('security.handlers', () => { it('should return 401 if auth header has malformed bearer auth', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.BearerAuth = (req, scopes, schema) => true; + validateSecurity.handlers!.BearerAuth = (req, scopes, schema) => true; return request(app) .get(`${basePath}/bearer`) .set('Authorization', 'XXXX') @@ -255,11 +251,8 @@ describe('security.handlers', () => { it('should return 200 if bearer auth succeeds', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.BearerAuth = ( - req, - scopes, - schema: OpenAPIV3.HttpSecurityScheme, - ) => { + validateSecurity.handlers!.BearerAuth = (req, scopes, schema) => { + if (!('scheme' in schema)) throw new Error('Unexpected schema type'); expect(schema.type).to.equal('http'); expect(schema.scheme).to.equal('bearer'); expect(scopes).to.be.an('array').with.length(0); @@ -273,11 +266,7 @@ describe('security.handlers', () => { it('should return 200 if oauth2 auth succeeds', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.OAuth2 = function ( - req, - scopes, - schema: OpenAPIV3.OAuth2SecurityScheme, - ) { + validateSecurity.handlers!.OAuth2 = function (req, scopes, schema) { expect(schema.type).to.equal('oauth2'); expect(schema).to.have.property('flows'); expect(scopes).to.be.an('array').with.length(2); @@ -289,11 +278,7 @@ describe('security.handlers', () => { it('should return 403 if oauth2 handler throws 403', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.OAuth2 = function ( - req, - scopes: string[], - schema: OpenAPIV3.OAuth2SecurityScheme, - ) { + validateSecurity.handlers!.OAuth2 = function (req, scopes, schema) { expect(schema.type).to.equal('oauth2'); expect(schema).to.have.property('flows'); expect(scopes).to.be.an('array').with.length(2); @@ -311,11 +296,7 @@ describe('security.handlers', () => { it('should return 200 if openid auth succeeds', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.OpenID = ( - req, - scopes, - schema: OpenAPIV3.OpenIdSecurityScheme, - ) => { + validateSecurity.handlers!.OpenID = (req, scopes, schema) => { expect(schema.type).to.equal('openIdConnect'); expect(schema).to.have.property('openIdConnectUrl'); expect(scopes).to.be.an('array').with.length(2); @@ -327,12 +308,8 @@ describe('security.handlers', () => { it('should return 500 if security handlers are defined, but not for all securities', async () => { const validateSecurity = eovConf.validateSecurity; - delete validateSecurity.handlers.OpenID; - validateSecurity.handlers.Test = ( - req, - scopes, - schema: OpenAPIV3.OpenIdSecurityScheme, - ) => { + delete validateSecurity.handlers!.OpenID; + validateSecurity.handlers!.Test = (req, scopes, schema) => { expect(schema.type).to.equal('openIdConnect'); expect(schema).to.have.property('openIdConnectUrl'); expect(scopes).to.be.an('array').with.length(2); @@ -353,13 +330,13 @@ describe('security.handlers', () => { it('should return 200 if api_key or anonymous and no api key is supplied', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.ApiKeyAuth = ((req, scopes, schema) => true); + validateSecurity.handlers!.ApiKeyAuth = (req, scopes, schema) => true; return request(app).get(`${basePath}/api_key_or_anonymous`).expect(200); }); it('should return 200 if api_key or anonymous and api key is supplied', async () => { const validateSecurity = eovConf.validateSecurity; - validateSecurity.handlers.ApiKeyAuth = ((req, scopes, schema) => true); + validateSecurity.handlers!.ApiKeyAuth = (req, scopes, schema) => true; return request(app) .get(`${basePath}/api_key_or_anonymous`) .set('x-api-key', 'XXX') @@ -368,11 +345,13 @@ describe('security.handlers', () => { }); describe('when securities declare: (apikey && bearer) || basic', () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; + let basePath: string; + const eovConf: OpenApiValidatorOpts = { apiSpec: path.join('test', 'resources', 'security.yaml'), }; + before(async () => { app = await createApp(eovConf, 3005); basePath = app.basePath; @@ -387,8 +366,8 @@ describe('when securities declare: (apikey && bearer) || basic', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should return 401 if not X-Api-Key is missing', async () => diff --git a/test/security.top.level.spec.ts b/test/security.top.level.spec.ts index a73e115c..a1fe130f 100644 --- a/test/security.top.level.spec.ts +++ b/test/security.top.level.spec.ts @@ -2,11 +2,11 @@ import path from 'path'; import express from 'express'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('security.top.level', () => { - let app = null; - let basePath = null; + let app: ExpressWithServer; + let basePath: string; before(async () => { // Set up the express app @@ -30,8 +30,8 @@ describe('security.top.level', () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should inherit top level security and return 401 if apikey header is missing', async () => diff --git a/test/serdes.spec.ts b/test/serdes.spec.ts index 61bdaac2..8cd89fce 100644 --- a/test/serdes.spec.ts +++ b/test/serdes.spec.ts @@ -1,8 +1,8 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; - +import { ExpressWithServer, createApp } from './common/app'; +import { EovErrorHandler } from './common/app.common'; import { date, dateTime } from '../src/framework/base.serdes'; const apiSpecPath = path.join('test', 'resources', 'serdes.yaml'); @@ -35,7 +35,7 @@ function toSummary(title, value) { } describe('serdes', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -65,7 +65,7 @@ describe('serdes', () => { if (typeof req.params.id !== 'object') { throw new Error('Should be deserialized to ObjectId object'); } - let date = new Date('2020-12-20T07:28:19.213Z'); + const date = new Date('2020-12-20T07:28:19.213Z'); res.json({ id: req.params.id, creationDateTime: date, @@ -113,20 +113,20 @@ describe('serdes', () => { ), }); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should control BAD id format and throw an error', async () => @@ -251,7 +251,7 @@ describe('serdes', () => { }); describe('serdes serialize response components only', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -280,11 +280,11 @@ describe('serdes serialize response components only', () => { if (typeof req.params.id !== 'string') { throw new Error('Should be not be deserialized to ObjectId object'); } - let date = new Date('2020-12-20T07:28:19.213Z'); - let result = { + const date = new Date('2020-12-20T07:28:19.213Z'); + const result = { id: new ObjectID(req.params.id), creationDateTime: date, - creationDate: undefined, + creationDate: undefined as unknown, shortOrLong: 'a', }; if (req.query.baddateresponse === 'functionNotExists') { @@ -311,20 +311,20 @@ describe('serdes serialize response components only', () => { // We let creationDate as String and it should also work (either in Date Object ou String 'date' format) res.json(req.body); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should control BAD id format and throw an error', async () => @@ -443,7 +443,7 @@ describe('serdes serialize response components only', () => { }); describe('serdes with array type string-list', () => { - let app = null; + let app: ExpressWithServer; before(async () => { // set up express app @@ -477,7 +477,7 @@ describe('serdes with array type string-list', () => { if (typeof req.params.id !== 'object') { throw new Error('Should be deserialized to ObjectId object'); } - let date = new Date('2020-12-20T07:28:19.213Z'); + const date = new Date('2020-12-20T07:28:19.213Z'); res.json({ id: req.params.id, tags: ['aa', 'bb', 'cc'], @@ -506,20 +506,20 @@ describe('serdes with array type string-list', () => { } res.json(req.body); }); - app.use((err, req, res, next) => { + app.use(((err, req, res, next) => { res.status(err.status ?? 500).json({ message: err.message, code: err.status ?? 500, }); - }); + })); }, false, ); return app; }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should control BAD id format and throw an error', async () => @@ -532,7 +532,7 @@ describe('serdes with array type string-list', () => { ); })); - it('should control GOOD id format and get a response in expected format', async () => { + it('should control GOOD id format and get a response in expected format', async () => request(app) .get(`${app.basePath}/users/5fdefd13a6640bb5fb5fa925`) .expect(200) @@ -541,8 +541,7 @@ describe('serdes with array type string-list', () => { expect(r.body.creationDate).to.equal('2020-12-20'); expect(r.body.creationDateTime).to.equal('2020-12-20T07:28:19.213Z'); expect(r.body.tags).to.equal('aa,bb,cc'); - }); - }); + })); it('should POST also works with deserialize on request then serialize en response', async () => request(app) diff --git a/test/serialized-deep-object.objects.spec.ts b/test/serialized-deep-object.objects.spec.ts index b0964aa5..96614791 100644 --- a/test/serialized-deep-object.objects.spec.ts +++ b/test/serialized-deep-object.objects.spec.ts @@ -3,10 +3,10 @@ import express from 'express'; import request from 'supertest'; import * as packageJson from '../package.json'; import { expect } from 'chai'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -26,8 +26,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should explode deepObject and set default', async () => diff --git a/test/serialized.objects.defaults.spec.ts b/test/serialized.objects.defaults.spec.ts index 5a100468..26c3c8f8 100644 --- a/test/serialized.objects.defaults.spec.ts +++ b/test/serialized.objects.defaults.spec.ts @@ -3,10 +3,10 @@ import express from 'express'; import request from 'supertest'; import * as packageJson from '../package.json'; import { expect } from 'chai'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -23,8 +23,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should use defaults when empty', async () => diff --git a/test/serialized.objects.spec.ts b/test/serialized.objects.spec.ts index f651c543..8f6fa795 100644 --- a/test/serialized.objects.spec.ts +++ b/test/serialized.objects.spec.ts @@ -3,10 +3,10 @@ import express from 'express'; import request from 'supertest'; import * as packageJson from '../package.json'; import { expect } from 'chai'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -24,8 +24,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should deserialize object', async () => diff --git a/test/servers.spec.ts b/test/servers.spec.ts index 0d93437c..e399fe4a 100644 --- a/test/servers.spec.ts +++ b/test/servers.spec.ts @@ -1,10 +1,10 @@ import path from 'path'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'servers.1.yaml'); @@ -28,7 +28,9 @@ describe(packageJson.name, () => { ); }); - after(() => app.server.close()); + after(async () => { + await app.closeServer(); + }); it('should validate server path with version variable, v2 and petstore', async () => request(app).get('/api/v1/petstore/ping').query({}).expect(400)); @@ -44,7 +46,7 @@ describe(packageJson.name, () => { }); describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'servers.2.yaml'); @@ -68,7 +70,9 @@ describe(packageJson.name, () => { ); }); - after(() => app.server.close()); + after(async () => { + await app.closeServer(); + }); it('should validate server path with version variables, v2 and petstore', async () => request(app).get('/api/v1:petstore/ping').query({}).expect(400)); diff --git a/test/unknown.formats.spec.ts b/test/unknown.formats.spec.ts index 8a8a1add..b2f5c269 100644 --- a/test/unknown.formats.spec.ts +++ b/test/unknown.formats.spec.ts @@ -1,10 +1,10 @@ import path from 'path'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'unknown.formats.yaml'); @@ -25,7 +25,9 @@ describe(packageJson.name, () => { ); }); - after(() => app.server.close()); + after(async () => { + await app.closeServer(); + }); it('should return 200 for valid request with unknown format', async () => request(app) diff --git a/test/unknown.keywords.spec.ts b/test/unknown.keywords.spec.ts index f7850ff3..96e4d9b3 100644 --- a/test/unknown.keywords.spec.ts +++ b/test/unknown.keywords.spec.ts @@ -1,9 +1,9 @@ import path from 'path'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('Unknown x- keywords', () => { - let app = null; + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'unknown.keywords.yaml'); @@ -23,7 +23,9 @@ describe('Unknown x- keywords', () => { ); }); - after(() => app.server.close()); + after(async () => { + await app.closeServer(); + }); it('should return 200 for valid request with unknown x- keywords', async () => request(app) diff --git a/test/user-request-url.router.spec.ts b/test/user-request-url.router.spec.ts index 81ea77cb..8d323238 100644 --- a/test/user-request-url.router.spec.ts +++ b/test/user-request-url.router.spec.ts @@ -1,17 +1,10 @@ import { expect } from 'chai'; -import type { - Express, - IRouter, - Response, - NextFunction, - Request, -} from 'express'; +import type { IRouter } from 'express'; import express from 'express'; import { OpenAPIV3 } from '../src/framework/types'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as OpenApiValidator from '../src'; -import { Server } from 'http'; interface HTTPError extends Error { status: number; @@ -20,8 +13,8 @@ interface HTTPError extends Error { path: string; } -describe('when useRequestUrl is set to "true" on the child router', async () => { - let app: Express & { server?: Server }; +describe('when useRequestUrl is set to "true" on the child router', () => { + let app: ExpressWithServer; before(async () => { const router = makeRouter({ useRequestUrl: true }); @@ -29,7 +22,9 @@ describe('when useRequestUrl is set to "true" on the child router', async () => app.use(router); }); - after(() => app?.server?.close()); + after(async () => { + await app.closeServer(); + }); it('should apply parent app schema to requests', async () => { const result = await request(app).get('/api/pets/1'); @@ -63,8 +58,8 @@ describe('when useRequestUrl is set to "true" on the child router', async () => }); }); -describe('when useRequestUrl is set to "false" on the child router', async () => { - let app: Express & { server?: Server }; +describe('when useRequestUrl is set to "false" on the child router', () => { + let app: ExpressWithServer; before(async () => { const router = makeRouter({ useRequestUrl: false }); @@ -72,7 +67,9 @@ describe('when useRequestUrl is set to "false" on the child router', async () => app.use(router); }); - after(() => app?.server?.close()); + after(async () => { + await app.closeServer(); + }); it('should throw not found', async () => { const result = await request(app).get('/api/pets/valid-pet-id'); @@ -219,16 +216,7 @@ const childRouterSpec: OpenAPIV3.Document = { }, }; -function redirectToInternalService( - req: Request, - _res: Response, - next: NextFunction, -): void { - req.url = `/internal${req.originalUrl}`; - next(); -} - -function makeMainApp(): ReturnType { +function makeMainApp() { return createApp( { apiSpec: gatewaySpec, @@ -238,13 +226,13 @@ function makeMainApp(): ReturnType { 3000, (app) => { app - .get( - '/api/pets/:petId', - function (_req: Request, _res: Response, next: NextFunction) { - next(); - }, - ) - .use(redirectToInternalService); + .get('/api/pets/:petId', (_req, _res, next) => { + next(); + }) + .use((req, _res, next) => { + req.url = `/internal${req.originalUrl}`; + next(); + }); }, false, ); diff --git a/test/wildcard.path.params.spec.ts b/test/wildcard.path.params.spec.ts index f1c42879..4a38aae7 100644 --- a/test/wildcard.path.params.spec.ts +++ b/test/wildcard.path.params.spec.ts @@ -1,10 +1,10 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; describe('wildcard path params', () => { - let app = null; + let app: ExpressWithServer; before(async () => { const apiSpec = path.join('test', 'resources', 'wildcard.path.params.yaml'); @@ -49,7 +49,9 @@ describe('wildcard path params', () => { ); }); - after(() => app.server.close()); + after(async () => { + await app.closeServer(); + }); it('should allow path param without wildcard', async () => request(app) diff --git a/test/write.only.removeadditional.spec.ts b/test/write.only.removeadditional.spec.ts index a39093e4..426cf6d2 100644 --- a/test/write.only.removeadditional.spec.ts +++ b/test/write.only.removeadditional.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -41,8 +41,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should remove write only inlined properties in responses thanks to removeAdditional', async () => diff --git a/test/write.only.spec.ts b/test/write.only.spec.ts index 0fdcb607..5da27757 100644 --- a/test/write.only.spec.ts +++ b/test/write.only.spec.ts @@ -1,11 +1,11 @@ import path from 'path'; import { expect } from 'chai'; import request from 'supertest'; -import { createApp } from './common/app'; +import { ExpressWithServer, createApp } from './common/app'; import * as packageJson from '../package.json'; describe(packageJson.name, () => { - let app = null; + let app: ExpressWithServer; before(async () => { // Set up the express app @@ -45,8 +45,8 @@ describe(packageJson.name, () => { ); }); - after(() => { - app.server.close(); + after(async () => { + await app.closeServer(); }); it('should not allow ready only inlined properties in requests', async () =>