From 885caa082960eae694959740ea222937b9efbe19 Mon Sep 17 00:00:00 2001 From: Samir AMZANI Date: Tue, 14 May 2024 15:43:41 +0200 Subject: [PATCH] feat: rollback API server --- package-lock.json | 1205 +---------------- package.json | 22 +- .../api/controllers/generator.controller.ts | 113 -- .../api/controllers/ping.controller.ts | 21 - src/adapters/api/core/app.ts | 78 -- src/adapters/api/core/constants.ts | 4 - .../api/core/exceptions/problem.exception.ts | 12 - src/adapters/api/core/interfaces.ts | 23 - .../core/middlewares/problem.middleware.ts | 27 - src/adapters/api/core/server-api.d.ts | 10 - src/adapters/cli/commands/start/api.ts | 20 - src/api.ts | 13 - src/{adapters => }/cli/commands/bundle.ts | 0 .../cli/commands/config/analytics.ts | 0 .../cli/commands/config/context/add.ts | 2 +- .../cli/commands/config/context/current.ts | 2 +- .../cli/commands/config/context/edit.ts | 2 +- .../cli/commands/config/context/index.ts | 0 .../cli/commands/config/context/init.ts | 0 .../cli/commands/config/context/list.ts | 2 +- .../cli/commands/config/context/remove.ts | 2 +- .../cli/commands/config/context/use.ts | 2 +- .../cli/commands/config/index.ts | 0 .../cli/commands/config/versions.ts | 0 src/{adapters => }/cli/commands/convert.ts | 6 +- src/{adapters => }/cli/commands/diff.ts | 6 +- .../cli/commands/generate/fromTemplate.ts | 8 +- .../cli/commands/generate/index.ts | 0 .../cli/commands/generate/models.ts | 0 src/{adapters => }/cli/commands/new/file.ts | 9 +- src/{adapters => }/cli/commands/new/glee.ts | 0 src/{adapters => }/cli/commands/new/index.ts | 0 .../cli/commands/new/project.ts | 0 src/{adapters => }/cli/commands/optimize.ts | 2 +- .../cli/commands/start/index.ts | 0 .../cli/commands/start/studio.ts | 0 src/{adapters => }/cli/commands/validate.ts | 0 src/{adapters => }/cli/core/base.ts | 0 .../cli/core/flags/bundle.flags.ts | 0 .../cli/core/flags/config/context.flags.ts | 0 .../cli/core/flags/convert.flags.ts | 0 .../cli/core/flags/diff.flags.ts | 0 .../core/flags/generate/fromTemplate.flags.ts | 5 + .../cli/core/flags/generate/models.flags.ts | 5 + .../cli/core/flags/global.flags.ts | 0 .../cli/core/flags/new/file.flags.ts | 0 .../cli/core/flags/new/glee.flags.ts | 0 .../cli/core/flags/optimize.flags.ts | 0 .../cli/core/flags/start/api.flags.ts | 0 .../cli/core/flags/start/studio.flags.ts | 0 .../cli/core/flags/validate.flags.ts | 0 src/{adapters => }/cli/core/global.d.ts | 0 src/{adapters => }/cli/core/globals.ts | 0 .../core/hooks/command_not_found/myhook.ts | 0 src/{adapters => }/cli/core/models/Context.ts | 2 +- .../cli/core/models/SpecificationFile.ts | 4 +- src/{adapters => }/cli/core/models/Studio.ts | 2 +- src/{adapters => }/cli/core/parser.ts | 0 src/core/services/archiver.service.ts | 59 - .../services}/generator.interface.ts | 0 src/core/services/generator.service.ts | 2 +- src/utils/logger.ts | 38 - src/utils/temp-dir.ts | 19 - test/helpers/index.ts | 34 +- test/integration/api.test.ts | 33 - test/integration/context.test.ts | 50 +- test/integration/convert.test.ts | 40 +- test/integration/optimize.test.ts | 26 +- test/integration/validate.test.ts | 56 +- 69 files changed, 150 insertions(+), 1816 deletions(-) delete mode 100644 src/adapters/api/controllers/generator.controller.ts delete mode 100644 src/adapters/api/controllers/ping.controller.ts delete mode 100644 src/adapters/api/core/app.ts delete mode 100644 src/adapters/api/core/constants.ts delete mode 100644 src/adapters/api/core/exceptions/problem.exception.ts delete mode 100644 src/adapters/api/core/interfaces.ts delete mode 100644 src/adapters/api/core/middlewares/problem.middleware.ts delete mode 100644 src/adapters/api/core/server-api.d.ts delete mode 100644 src/adapters/cli/commands/start/api.ts delete mode 100644 src/api.ts rename src/{adapters => }/cli/commands/bundle.ts (100%) rename src/{adapters => }/cli/commands/config/analytics.ts (100%) rename src/{adapters => }/cli/commands/config/context/add.ts (97%) rename src/{adapters => }/cli/commands/config/context/current.ts (96%) rename src/{adapters => }/cli/commands/config/context/edit.ts (97%) rename src/{adapters => }/cli/commands/config/context/index.ts (100%) rename src/{adapters => }/cli/commands/config/context/init.ts (100%) rename src/{adapters => }/cli/commands/config/context/list.ts (96%) rename src/{adapters => }/cli/commands/config/context/remove.ts (96%) rename src/{adapters => }/cli/commands/config/context/use.ts (96%) rename src/{adapters => }/cli/commands/config/index.ts (100%) rename src/{adapters => }/cli/commands/config/versions.ts (100%) rename src/{adapters => }/cli/commands/convert.ts (94%) rename src/{adapters => }/cli/commands/diff.ts (97%) rename src/{adapters => }/cli/commands/generate/fromTemplate.ts (97%) rename src/{adapters => }/cli/commands/generate/index.ts (100%) rename src/{adapters => }/cli/commands/generate/models.ts (100%) rename src/{adapters => }/cli/commands/new/file.ts (94%) rename src/{adapters => }/cli/commands/new/glee.ts (100%) rename src/{adapters => }/cli/commands/new/index.ts (100%) rename src/{adapters => }/cli/commands/new/project.ts (100%) rename src/{adapters => }/cli/commands/optimize.ts (99%) rename src/{adapters => }/cli/commands/start/index.ts (100%) rename src/{adapters => }/cli/commands/start/studio.ts (100%) rename src/{adapters => }/cli/commands/validate.ts (100%) rename src/{adapters => }/cli/core/base.ts (100%) rename src/{adapters => }/cli/core/flags/bundle.flags.ts (100%) rename src/{adapters => }/cli/core/flags/config/context.flags.ts (100%) rename src/{adapters => }/cli/core/flags/convert.flags.ts (100%) rename src/{adapters => }/cli/core/flags/diff.flags.ts (100%) rename src/{adapters => }/cli/core/flags/generate/fromTemplate.flags.ts (90%) rename src/{adapters => }/cli/core/flags/generate/models.flags.ts (96%) rename src/{adapters => }/cli/core/flags/global.flags.ts (100%) rename src/{adapters => }/cli/core/flags/new/file.flags.ts (100%) rename src/{adapters => }/cli/core/flags/new/glee.flags.ts (100%) rename src/{adapters => }/cli/core/flags/optimize.flags.ts (100%) rename src/{adapters => }/cli/core/flags/start/api.flags.ts (100%) rename src/{adapters => }/cli/core/flags/start/studio.flags.ts (100%) rename src/{adapters => }/cli/core/flags/validate.flags.ts (100%) rename src/{adapters => }/cli/core/global.d.ts (100%) rename src/{adapters => }/cli/core/globals.ts (100%) rename src/{adapters => }/cli/core/hooks/command_not_found/myhook.ts (100%) rename src/{adapters => }/cli/core/models/Context.ts (99%) rename src/{adapters => }/cli/core/models/SpecificationFile.ts (97%) rename src/{adapters => }/cli/core/models/Studio.ts (97%) rename src/{adapters => }/cli/core/parser.ts (100%) delete mode 100644 src/core/services/archiver.service.ts rename src/{ports => core/services}/generator.interface.ts (100%) delete mode 100644 src/utils/logger.ts delete mode 100644 src/utils/temp-dir.ts delete mode 100644 test/integration/api.test.ts diff --git a/package-lock.json b/package-lock.json index 90150f4b608..1c8004d8a8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,16 +29,10 @@ "@smoya/multi-parser": "^5.0.7", "@stoplight/spectral-cli": "6.9.0", "ajv": "^8.12.0", - "archiver": "^6.0.1", - "body-parser": "^1.20.2", "chalk": "^4.1.0", "chokidar": "^3.5.2", - "compression": "^1.7.4", - "cors": "^2.8.5", - "express": "^4.18.2", "fast-levenshtein": "^3.0.0", "fs-extra": "^11.1.0", - "helmet": "^7.1.0", "indent-string": "^4.0.0", "inquirer": "^8.2.0", "js-yaml": "^4.1.0", @@ -53,7 +47,6 @@ "strip-ansi": "^6.0.0", "unzipper": "^0.10.11", "uuid": "^9.0.1", - "winston": "^3.11.0", "wrap-ansi": "^9.0.0", "ws": "^8.2.3" }, @@ -65,16 +58,9 @@ "@babel/core": "^7.19.3", "@oclif/test": "^2", "@swc/core": "^1.3.2", - "@types/archiver": "^6.0.2", - "@types/body-parser": "^1.19.5", "@types/chai": "^4.3.6", - "@types/compression": "^1.7.5", - "@types/config": "^3.3.3", - "@types/cors": "^2.8.17", - "@types/express": "^4.17.21", "@types/fast-levenshtein": "^0.0.2", "@types/fs-extra": "^11.0.1", - "@types/helmet": "^4.0.0", "@types/inquirer": "^8.1.3", "@types/js-yaml": "^4.0.5", "@types/lodash.template": "^4.4.4", @@ -101,7 +87,6 @@ "globby": "^10.0.2", "markdown-toc": "^1.2.0", "mocha": "^10.2.0", - "nodemon": "^3.1.0", "nyc": "^15.1.0", "react": "^16.14.0", "react-dom": "^16.14.0", @@ -3548,6 +3533,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -3557,14 +3543,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@colors/colors": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", - "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", - "engines": { - "node": ">=0.1.90" - } - }, "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", @@ -3585,16 +3563,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@dabh/diagnostics": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", - "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, "node_modules/@ebay/nice-modal-react": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/@ebay/nice-modal-react/-/nice-modal-react-1.2.13.tgz", @@ -37336,25 +37304,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@types/archiver": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-6.0.2.tgz", - "integrity": "sha512-KmROQqbQzKGuaAbmK+ZcytkJ51+YqDa7NmbXjmtC5YBLSyQYo21YaUnQ3HbaPFKL1ooo6RQ6OPYPIDyxfpDDXw==", - "dev": true, - "dependencies": { - "@types/readdir-glob": "*" - } - }, - "node_modules/@types/body-parser": { - "version": "1.19.5", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", - "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, "node_modules/@types/cacheable-request": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", @@ -37380,45 +37329,12 @@ "@types/node": "*" } }, - "node_modules/@types/compression": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@types/compression/-/compression-1.7.5.tgz", - "integrity": "sha512-AAQvK5pxMpaT+nDvhHrsBhLSYG5yQdtkaJE1WYieSNY2mVFKAgmU4ks65rkZD5oqnGCFLyQpUr1CqI4DmUMyDg==", - "dev": true, - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/config": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@types/config/-/config-3.3.3.tgz", - "integrity": "sha512-BB8DBAud88EgiAKlz8WQStzI771Kb6F3j4dioRJ4GD+tP4tzcZyMlz86aXuZT4s9hyesFORehMQE6eqtA5O+Vg==", - "dev": true - }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/cookiejar": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.5.tgz", "integrity": "sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==", "dev": true }, - "node_modules/@types/cors": { - "version": "2.8.17", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", - "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/d3": { "version": "7.4.3", "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", @@ -37675,30 +37591,6 @@ "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==" }, - "node_modules/@types/express": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", - "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.43", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz", - "integrity": "sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, "node_modules/@types/fast-levenshtein": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/@types/fast-levenshtein/-/fast-levenshtein-0.0.2.tgz", @@ -37730,27 +37622,11 @@ "@types/node": "*" } }, - "node_modules/@types/helmet": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/helmet/-/helmet-4.0.0.tgz", - "integrity": "sha512-ONIn/nSNQA57yRge3oaMQESef/6QhoeX7llWeDli0UZIfz8TQMkfNPTXA8VnnyeA1WUjG2pGqdjEIueYonMdfQ==", - "deprecated": "This is a stub types definition. helmet provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "helmet": "*" - } - }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" }, - "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==", - "dev": true - }, "node_modules/@types/inquirer": { "version": "8.2.10", "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-8.2.10.tgz", @@ -37837,12 +37713,6 @@ "integrity": "sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==", "dev": true }, - "node_modules/@types/mime": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true - }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -37888,27 +37758,6 @@ "@types/node": "*" } }, - "node_modules/@types/qs": { - "version": "6.9.12", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.12.tgz", - "integrity": "sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==", - "dev": true - }, - "node_modules/@types/range-parser": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true - }, - "node_modules/@types/readdir-glob": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@types/readdir-glob/-/readdir-glob-1.1.5.tgz", - "integrity": "sha512-raiuEPUYqXu+nvtY2Pe8s8FEmZ3x5yAH4VkLdihcPdalvsHltomrRC9BzuStrJ9yk06470hS0Crw0f1pXqD+Hg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/responselike": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", @@ -37938,16 +37787,6 @@ "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, - "node_modules/@types/send": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", - "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", - "dev": true, - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, "node_modules/@types/serve-handler": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/@types/serve-handler/-/serve-handler-6.1.4.tgz", @@ -37957,17 +37796,6 @@ "@types/node": "*" } }, - "node_modules/@types/serve-static": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", - "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", - "dev": true, - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, "node_modules/@types/sinon": { "version": "17.0.3", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", @@ -38025,11 +37853,6 @@ "@types/node": "*" } }, - "node_modules/@types/triple-beam": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", - "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==" - }, "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", @@ -38455,18 +38278,6 @@ "node": ">=6.5" } }, - "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==", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", @@ -38723,39 +38534,6 @@ "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" }, - "node_modules/archiver": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-6.0.2.tgz", - "integrity": "sha512-UQ/2nW7NMl1G+1UnrLypQw1VdT9XZg/ECcKPq7l+STzStrSivFIXIp34D8M5zeNGW5NoOupdYCHv6VySCPNNlw==", - "dependencies": { - "archiver-utils": "^4.0.1", - "async": "^3.2.4", - "buffer-crc32": "^0.2.1", - "readable-stream": "^3.6.0", - "readdir-glob": "^1.1.2", - "tar-stream": "^3.0.0", - "zip-stream": "^5.0.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/archiver-utils": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-4.0.1.tgz", - "integrity": "sha512-Q4Q99idbvzmgCTEAAhi32BkOyq8iVI5EwdO0PmBDSGIzzjYNdcFn7Q7k3OzbLy4kLUPXfJtG6fO2RjftXbobBg==", - "dependencies": { - "glob": "^8.0.0", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash": "^4.17.15", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", @@ -38824,11 +38602,6 @@ "node": ">=8" } }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" - }, "node_modules/array-includes": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", @@ -39127,11 +38900,6 @@ "dequal": "^2.0.3" } }, - "node_modules/b4a": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", - "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==" - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.11", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", @@ -39189,12 +38957,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/bare-events": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.1.tgz", - "integrity": "sha512-9GYPpsPFvrWBkelIhOhTWtkeZxVxZOdb3VnFTCzlOo3OjvmTvzLoZFUT8kNFACx0vJej6QPney1Cf9BvzCNE/A==", - "optional": true - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -39308,42 +39070,6 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==" }, - "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/bowser": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", @@ -39434,14 +39160,6 @@ "ieee754": "^1.1.13" } }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "engines": { - "node": "*" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -39480,14 +39198,6 @@ "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==" }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/cacache": { "version": "16.1.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", @@ -40058,15 +39768,6 @@ "node": ">=0.8.0" } }, - "node_modules/color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -40100,19 +39801,6 @@ "color-support": "bin.js" } }, - "node_modules/color/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, "node_modules/colors": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", @@ -40121,15 +39809,6 @@ "node": ">=0.1.90" } }, - "node_modules/colorspace": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", - "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -40168,69 +39847,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/compress-commons": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-5.0.3.tgz", - "integrity": "sha512-/UIcLWvwAQyVibgpQDPtfNM3SvqN7G9elAPAV7GM0L53EbNWwWiCsWtK8Fwed/APEbptPHXs5PuW+y8Bq8lFTA==", - "dependencies": { - "crc-32": "^1.2.0", - "crc32-stream": "^5.0.0", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/compression/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/compression/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -40311,36 +39927,6 @@ "upper-case": "^2.0.2" } }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "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==", - "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", @@ -40354,19 +39940,6 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "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": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" - }, "node_modules/cookiejar": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", @@ -40390,41 +39963,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/crc32-stream": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-5.0.1.tgz", - "integrity": "sha512-lO1dFui+CEUh/ztYIpgpKItKW9Bb4NWakCRJrnqAbFIYD+OZAwb2VfD5T5eXMw2FNcsDHkQcNl/Wh3iVXYwU6g==", - "dependencies": { - "crc-32": "^1.2.0", - "readable-stream": "^3.4.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -40822,14 +40360,6 @@ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/dependency-graph": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", @@ -40852,15 +40382,6 @@ "node": ">=6" } }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, "node_modules/detect-indent": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.1.tgz", @@ -41026,11 +40547,6 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, "node_modules/ejs": { "version": "3.1.9", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", @@ -41055,19 +40571,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, - "node_modules/enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" - }, - "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==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", @@ -41315,11 +40818,6 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -42902,14 +42400,6 @@ "node": ">=0.10.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", @@ -43015,79 +42505,6 @@ "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" }, - "node_modules/express": { - "version": "4.18.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", - "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.2", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "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==", - "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/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -43156,11 +42573,6 @@ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "dev": true }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" - }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -43255,11 +42667,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fecha": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", - "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" - }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -43356,36 +42763,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -43502,11 +42879,6 @@ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, - "node_modules/fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" - }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -43609,22 +42981,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -44403,14 +43759,6 @@ "tslib": "^2.0.3" } }, - "node_modules/helmet": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-7.1.0.tgz", - "integrity": "sha512-g+HZqgfbpXdCkme/Cd/mZkV0aV3BZZZSugecH03kl38m/Kmdx8jKjBikpDj2cr+Iynv4KpYEviojNdTJActJAg==", - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/hexoid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", @@ -44477,21 +43825,6 @@ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, - "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==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -44605,12 +43938,6 @@ "node": ">= 4" } }, - "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 - }, "node_modules/ignore-walk": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", @@ -44794,14 +44121,6 @@ "node": ">= 12" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/is-array-buffer": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", @@ -45883,11 +45202,6 @@ "node": ">=0.10.0" } }, - "node_modules/kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" - }, "node_modules/language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -45918,44 +45232,6 @@ "node": ">=0.10.0" } }, - "node_modules/lazystream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", - "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", - "dependencies": { - "readable-stream": "^2.0.5" - }, - "engines": { - "node": ">= 0.6.3" - } - }, - "node_modules/lazystream/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, - "node_modules/lazystream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/lazystream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -46178,30 +45454,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/logform": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", - "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", - "dependencies": { - "@colors/colors": "1.6.0", - "@types/triple-beam": "^1.3.2", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/logform/node_modules/safe-stable-stringify": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", - "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", - "engines": { - "node": ">=10" - } - }, "node_modules/loglevel": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", @@ -46407,14 +45659,6 @@ "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mem-fs": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-2.3.0.tgz", @@ -46527,11 +45771,6 @@ "node": ">=0.10.0" } }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -46549,6 +45788,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, "engines": { "node": ">= 0.6" } @@ -46565,17 +45805,6 @@ "node": ">=8.6" } }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -47224,55 +46453,6 @@ "node": ">=12" } }, - "node_modules/nodemon": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz", - "integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==", - "dev": true, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^4", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^7.5.3", - "simple-update-notifier": "^2.0.0", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/nodemon/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/nodemon/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/nopt": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", @@ -65193,25 +64373,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "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==", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -65220,14 +64381,6 @@ "wrappy": "1" } }, - "node_modules/one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "dependencies": { - "fn.name": "1.x.x" - } - }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -65759,14 +64912,6 @@ "webidl-conversions": "^3.0.0" } }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/pascal-case": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", @@ -65869,11 +65014,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -66216,29 +65356,11 @@ "undici-types": "~5.26.4" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, - "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 - }, "node_modules/pubsub-js": { "version": "1.9.4", "resolved": "https://registry.npmjs.org/pubsub-js/-/pubsub-js-1.9.4.tgz", @@ -66258,20 +65380,6 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -66296,11 +65404,6 @@ } ] }, - "node_modules/queue-tick": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", - "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" - }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -66407,28 +65510,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/react": { "version": "16.14.0", "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", @@ -66671,33 +65752,6 @@ "node": ">= 6" } }, - "node_modules/readdir-glob": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", - "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", - "dependencies": { - "minimatch": "^5.1.0" - } - }, - "node_modules/readdir-glob/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==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/readdir-glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/readdir-scoped-modules": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", @@ -67338,47 +66392,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, "node_modules/sentence-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", @@ -67461,20 +66474,6 @@ "node": ">= 0.6" } }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -67527,11 +66526,6 @@ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, "node_modules/shallow-clone": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", @@ -67953,18 +66947,6 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, - "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, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -68239,14 +67221,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", - "engines": { - "node": "*" - } - }, "node_modules/stacktracey": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", @@ -68261,14 +67235,6 @@ "resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz", "integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==" }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/stdout-stderr": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/stdout-stderr/-/stdout-stderr-0.1.13.tgz", @@ -68282,18 +67248,6 @@ "node": ">=8.0.0" } }, - "node_modules/streamx": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz", - "integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==", - "dependencies": { - "fast-fifo": "^1.1.0", - "queue-tick": "^1.0.1" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" - } - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -68692,16 +67646,6 @@ "node": ">=10" } }, - "node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, "node_modules/tar/node_modules/minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", @@ -68749,11 +67693,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -68873,47 +67812,12 @@ "node": ">=0.12.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, "node_modules/toml": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/toml/-/toml-2.3.6.tgz", "integrity": "sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==", "dev": true }, - "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==", - "dev": true, - "dependencies": { - "nopt": "~1.0.10" - }, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/touch/node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } - }, "node_modules/tough-cookie": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", @@ -69007,14 +67911,6 @@ "node": ">=0.8.0" } }, - "node_modules/triple-beam": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", - "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", - "engines": { - "node": ">= 14.0.0" - } - }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -69557,18 +68453,6 @@ "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==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", @@ -69741,12 +68625,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -69823,14 +68701,6 @@ "node": ">= 10.0.0" } }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", @@ -69991,14 +68861,6 @@ "node": ">= 4" } }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -70040,14 +68902,6 @@ "builtins": "^1.0.3" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -70347,48 +69201,6 @@ "node": ">=8" } }, - "node_modules/winston": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.12.0.tgz", - "integrity": "sha512-OwbxKaOlESDi01mC9rkM0dQqQt2I8DAUMRLZ/HpbwvDXm85IryEHgoogy5fziQy38PntgZsLlhAYHz//UPHZ5w==", - "dependencies": { - "@colors/colors": "^1.6.0", - "@dabh/diagnostics": "^2.0.2", - "async": "^3.2.3", - "is-stream": "^2.0.0", - "logform": "^2.4.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "safe-stable-stringify": "^2.3.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.7.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/winston-transport": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", - "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", - "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/winston/node_modules/safe-stable-stringify": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", - "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", - "engines": { - "node": ">=10" - } - }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -71909,19 +70721,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/zip-stream": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-5.0.2.tgz", - "integrity": "sha512-LfOdrUvPB8ZoXtvOBz6DlNClfvi//b5d56mSWyJi7XbH/HfhOHfUhOqxhT/rUiR7yiktlunqRo+jY6y/cWC/5g==", - "dependencies": { - "archiver-utils": "^4.0.1", - "compress-commons": "^5.0.1", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/zustand": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.2.tgz", diff --git a/package.json b/package.json index 4849582b6d3..69b802baa68 100644 --- a/package.json +++ b/package.json @@ -28,16 +28,10 @@ "@smoya/multi-parser": "^5.0.7", "@stoplight/spectral-cli": "6.9.0", "ajv": "^8.12.0", - "archiver": "^6.0.1", - "body-parser": "^1.20.2", "chalk": "^4.1.0", "chokidar": "^3.5.2", - "compression": "^1.7.4", - "cors": "^2.8.5", - "express": "^4.18.2", "fast-levenshtein": "^3.0.0", "fs-extra": "^11.1.0", - "helmet": "^7.1.0", "indent-string": "^4.0.0", "inquirer": "^8.2.0", "js-yaml": "^4.1.0", @@ -52,7 +46,6 @@ "strip-ansi": "^6.0.0", "unzipper": "^0.10.11", "uuid": "^9.0.1", - "winston": "^3.11.0", "wrap-ansi": "^9.0.0", "ws": "^8.2.3" }, @@ -61,16 +54,9 @@ "@babel/core": "^7.19.3", "@oclif/test": "^2", "@swc/core": "^1.3.2", - "@types/archiver": "^6.0.2", - "@types/body-parser": "^1.19.5", "@types/chai": "^4.3.6", - "@types/compression": "^1.7.5", - "@types/config": "^3.3.3", - "@types/cors": "^2.8.17", - "@types/express": "^4.17.21", "@types/fast-levenshtein": "^0.0.2", "@types/fs-extra": "^11.0.1", - "@types/helmet": "^4.0.0", "@types/inquirer": "^8.1.3", "@types/js-yaml": "^4.0.5", "@types/lodash.template": "^4.4.4", @@ -97,7 +83,6 @@ "globby": "^10.0.2", "markdown-toc": "^1.2.0", "mocha": "^10.2.0", - "nodemon": "^3.1.0", "nyc": "^15.1.0", "react": "^16.14.0", "react-dom": "^16.14.0", @@ -126,11 +111,11 @@ "license": "Apache-2.0", "main": "lib/index.js", "oclif": { - "commands": "./lib/adapters/cli/commands", + "commands": "./lib/cli/commands", "bin": "asyncapi", "hooks": { "command_not_found": [ - "./lib/adapters/cli/hooks/command_not_found/myhook" + "./lib/cli/hooks/command_not_found/myhook" ] }, "macos": { @@ -166,9 +151,6 @@ "build": "rimraf lib && node scripts/fetch-asyncapi-example.js && tsc && oclif manifest && echo \"Build Completed\"", "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION", "dev": "tsc --watch", - "api:prod": "npm run build && cross-env NODE_ENV=production node lib/api.js", - "api:local": "npm run build && cross-env NODE_ENV=production NODE_API_PORT=3001 node lib/api.js", - "api:dev": "cross-env NODE_ENV=production NODE_API_PORT=3001 nodemon src/api.ts", "docker:build": "docker build -t asyncapi/cli:latest .", "generate:readme:create": "node -e \"const fs = require('fs'); fs.writeFileSync('scripts/README.md', '# Usage\\n\\n\\n\\n# Commands\\n\\n\\n');\"", "generate:readme:commands": "npm run build && cd scripts && cross-env DEBUG=* oclif readme", diff --git a/src/adapters/api/controllers/generator.controller.ts b/src/adapters/api/controllers/generator.controller.ts deleted file mode 100644 index 81af45ce560..00000000000 --- a/src/adapters/api/controllers/generator.controller.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { Router, Request, Response, NextFunction } from 'express'; -import { Controller } from '../core/interfaces'; -import { ArchiverService } from '../../../core/services/archiver.service'; -import { GeneratorService } from '../../../core/services/generator.service'; -import { ProblemException } from '../core/exceptions/problem.exception'; -// import { ProblemException } from '../exceptions/problem.exception'; - -export class GeneratorController implements Controller { - public basepath = '/generate'; - - private archiverService = new ArchiverService(); - private generatorService = new GeneratorService(); - - private async generate(req: Request, res: Response, next: NextFunction) { - console.log('Start archiverService.createZip'); - const zip = this.archiverService.createZip(res); - - let tmpDir: string | undefined; - try { - console.log('Creating temp dire'); - tmpDir = await this.archiverService.createTempDirectory(); - console.log(`tmpDir: ${tmpDir}`); - const { asyncapi, template, parameters } = req.body; - const generatorParameters = { - forceWrite: true, - templateParams: parameters - }; - - try { - console.log(`Generating: ${asyncapi} with template: ${template} parameters: ${parameters}, tmpDir: ${tmpDir}, parserConfig: ${JSON.stringify(this.prepareParserConfig(req))}`); - await this.generatorService.generate( - asyncapi, - template, - tmpDir, - generatorParameters, - this.prepareParserConfig(req) - ); - console.log(`Generated: ${asyncapi} with template: ${template} parameters: ${parameters}, tmpDir: ${tmpDir}, parserConfig: ${JSON.stringify(this.prepareParserConfig(req))}`); - } catch (genErr: unknown) { - console.log(genErr); - return next( - new ProblemException({ - type: 'internal-generator-error', - title: 'Internal Generator error', - status: 500, - detail: (genErr as Error).message, - }) - ); - } - - console.log('Start appending files'); - this.archiverService.appendDirectory(zip, tmpDir, 'template'); - this.archiverService.appendAsyncAPIDocument(zip, asyncapi); - console.log('Finish appending files'); - - res.status(200); - return await this.archiverService.finalize(zip); - } catch (err: unknown) { - return next( - new ProblemException({ - type: 'internal-server-error', - title: 'Internal server error', - status: 500, - detail: (err as Error).message, - }) - ); - } finally { - if (tmpDir) { - this.archiverService.removeTempDirectory(tmpDir); - } - } - } - - private prepareParserConfig(req?: Request) { - if (!req) { - return { - resolve: { - file: false, - }, - }; - } - - return { - resolve: { - file: false, - http: { - headers: { - Cookie: req.header('Cookie'), - }, - withCredentials: true, - }, - }, - path: - req.header('x-asyncapi-base-url') || - req.header('referer') || - req.header('origin'), - }; - } - - private hello(req: Request, res: Response) { - res.status(200).send('ok'); - return true; - } - public async boot(): Promise { - const router: Router = Router(); - - router.post(`${this.basepath}`, async (req: Request, res: Response, next: NextFunction) => { - next(); - }, this.generate.bind(this)); - - return router; - } -} diff --git a/src/adapters/api/controllers/ping.controller.ts b/src/adapters/api/controllers/ping.controller.ts deleted file mode 100644 index 4769f6d07a0..00000000000 --- a/src/adapters/api/controllers/ping.controller.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Router, Request, Response, NextFunction } from 'express'; -import { Controller } from '../core/interfaces'; -// import { ProblemException } from '../exceptions/problem.exception'; - -export class PingController implements Controller { - public basepath = '/ping'; - - public async boot(): Promise { - const router: Router = Router(); - - router.get(`${this.basepath}`, async (req: Request, res: Response, next: NextFunction) => { - try { - return res.status(200).send('pong'); - } catch (err) { - return next(err); - } - }); - - return router; - } -} diff --git a/src/adapters/api/core/app.ts b/src/adapters/api/core/app.ts deleted file mode 100644 index b2854d0e0ca..00000000000 --- a/src/adapters/api/core/app.ts +++ /dev/null @@ -1,78 +0,0 @@ -import express from 'express'; -import bodyParser from 'body-parser'; -import compression from 'compression'; -import cors from 'cors'; -// eslint-disable-next-line -// @ts-ignore -import helmet from 'helmet'; -import { problemMiddleware } from './middlewares/problem.middleware'; -import { logger } from '../../../utils/logger'; -import { API_VERSION, - CORS_ORIGIN, - CORS_CREDENTIALS, - REQUEST_BODY_LIMIT } from './constants'; -import { Controller } from './interfaces'; - -export class App { - private app: express.Application; - private port: string | number; - private env: string; - - constructor( - private readonly controllers: Controller[], port: string | number - ) { - this.app = express(); - // this.port = process.env.NODE_API_PORT || 80; - this.port = port; - this.env = process.env.NODE_ENV || 'development'; - } - - public async init() { - // initialize core middlewares - await this.initializeMiddlewares(); - // initialize controllers - await this.initializeControllers(); - // initialize error handling - await this.initializeErrorHandling(); - } - public listen() { - return this.app.listen(this.port, () => { - logger.info('================================='); - logger.info(`= 🚀 AsyncAPI Server API listening on the port ${this.port}`); - logger.info('================================='); - }); - } - - public getServer() { - return this.app; - } - - private async initializeControllers() { - for (const controller of this.controllers) { - this.app.use(`/${API_VERSION}/`, await controller.boot()); - } - } - - private async initializeMiddlewares() { - this.app.use(cors({ origin: CORS_ORIGIN, credentials: CORS_CREDENTIALS })); - this.app.use(compression()); - this.app.use(bodyParser.text({ type: ['text/*'], limit: REQUEST_BODY_LIMIT })); - this.app.use(bodyParser.urlencoded({ extended: true, limit: REQUEST_BODY_LIMIT })); - this.app.use(bodyParser.json({ type: ['json', '*/json', '+json'], limit: REQUEST_BODY_LIMIT })); - this.app.use(helmet({ - contentSecurityPolicy: { - directives: { - // for `/docs` path - we need to fetch redoc component from unpkg.com domain - 'script-src': ['\'self\'', 'unpkg.com'], - 'worker-src': ['\'self\' blob:'] - }, - }, - // for `/docs` path - crossOriginEmbedderPolicy: false, - })); - } - - private async initializeErrorHandling() { - this.app.use(problemMiddleware); - } -} diff --git a/src/adapters/api/core/constants.ts b/src/adapters/api/core/constants.ts deleted file mode 100644 index fdba27738e2..00000000000 --- a/src/adapters/api/core/constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const API_VERSION = 'v1'; -export const CORS_ORIGIN = true; -export const CORS_CREDENTIALS = false; -export const REQUEST_BODY_LIMIT = '5mb'; diff --git a/src/adapters/api/core/exceptions/problem.exception.ts b/src/adapters/api/core/exceptions/problem.exception.ts deleted file mode 100644 index 8cf08c595ba..00000000000 --- a/src/adapters/api/core/exceptions/problem.exception.ts +++ /dev/null @@ -1,12 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import { ProblemMixin } from '@asyncapi/problem'; - -export interface ProblemExceptionProps { - status: number; - [key: string]: any; -} - -const typePrefix = 'https://api.asyncapi.com/problem'; - -export class ProblemException extends ProblemMixin({ typePrefix }) {} diff --git a/src/adapters/api/core/interfaces.ts b/src/adapters/api/core/interfaces.ts deleted file mode 100644 index 46a2470df61..00000000000 --- a/src/adapters/api/core/interfaces.ts +++ /dev/null @@ -1,23 +0,0 @@ -import specs from '@asyncapi/specs'; -import { Router } from 'express'; - -export interface Controller { - basepath: string; - boot(): Router | Promise; -} - -export interface Problem { - type: string; - title: string; - status: number; - detail?: string; - instance?: string; - [key: string]: any; -} - -export type AsyncAPIDocument = { asyncapi: string } & Record; - -export const ALL_SPECS = [...Object.keys(specs)]; -export const LAST_SPEC_VERSION = ALL_SPECS[ALL_SPECS.length - 1]; - -export type SpecsEnum = keyof typeof specs | 'latest'; diff --git a/src/adapters/api/core/middlewares/problem.middleware.ts b/src/adapters/api/core/middlewares/problem.middleware.ts deleted file mode 100644 index 4cb0d4852da..00000000000 --- a/src/adapters/api/core/middlewares/problem.middleware.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { NextFunction, Request, Response } from 'express'; - -import { ProblemException } from '../exceptions/problem.exception'; -import { logger } from '../../../../utils/logger'; - -/** - * Catch problem exception, log it and serialize error to human readable form. - */ -export function problemMiddleware(error: ProblemException, req: Request, res: Response, next: NextFunction) { - if (res.headersSent) { - return next(error); - } - - try { - const problemShape = error.get(); - const status = problemShape.status = problemShape.status || 500; - problemShape.title = problemShape.title || 'Internal server error'; - - logger.error(`[${req.method}] ${req.path} >> Status:: ${status}, Type:: ${problemShape.type.replace('https://api.asyncapi.com/problem/', '')}, Title:: ${problemShape.title}, Detail:: ${problemShape.detail}`); - - const isError = status >= 500; - const problem = error.toObject({ includeStack: isError, includeCause: isError }); - res.status(status).json(problem); - } catch (err: unknown) { - next(err); - } -} diff --git a/src/adapters/api/core/server-api.d.ts b/src/adapters/api/core/server-api.d.ts deleted file mode 100644 index c649a37f1f1..00000000000 --- a/src/adapters/api/core/server-api.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { OldAsyncAPIDocument as AsyncAPIDocument } from '@asyncapi/parser'; - -declare module 'express' { - export interface Request { - asyncapi?: { - parsedDocument?: AsyncAPIDocument; - parsedDocuments?: Array; - }, - } -} diff --git a/src/adapters/cli/commands/start/api.ts b/src/adapters/cli/commands/start/api.ts deleted file mode 100644 index 4182cf7e78f..00000000000 --- a/src/adapters/cli/commands/start/api.ts +++ /dev/null @@ -1,20 +0,0 @@ -import Command from '../../core/base'; -import { runApi } from '../../../../api'; -import { apiFlags } from '../../core/flags/start/api.flags'; - -const defaultPort = 3001; - -export default class StartApi extends Command { - static description = 'starts a new local instance of AsyncAPI'; - - static flags = apiFlags(defaultPort); - - static args = []; - - async run() { - const { flags } = await this.parse(StartApi); - const port = flags.port; - - await runApi(port); - } -} diff --git a/src/api.ts b/src/api.ts deleted file mode 100644 index 2780dcf698b..00000000000 --- a/src/api.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { App } from './adapters/api/core/app'; -import { PingController } from './adapters/api/controllers/ping.controller'; -import { GeneratorController } from './adapters/api/controllers/generator.controller'; - -export async function runApi(port: string| number) { - const app = new App([ - new PingController(), - new GeneratorController() - ], port); - await app.init(); - return app.listen(); -} -// runApi(); diff --git a/src/adapters/cli/commands/bundle.ts b/src/cli/commands/bundle.ts similarity index 100% rename from src/adapters/cli/commands/bundle.ts rename to src/cli/commands/bundle.ts diff --git a/src/adapters/cli/commands/config/analytics.ts b/src/cli/commands/config/analytics.ts similarity index 100% rename from src/adapters/cli/commands/config/analytics.ts rename to src/cli/commands/config/analytics.ts diff --git a/src/adapters/cli/commands/config/context/add.ts b/src/cli/commands/config/context/add.ts similarity index 97% rename from src/adapters/cli/commands/config/context/add.ts rename to src/cli/commands/config/context/add.ts index 37c927ffeab..30e2ed2ab40 100644 --- a/src/adapters/cli/commands/config/context/add.ts +++ b/src/cli/commands/config/context/add.ts @@ -3,7 +3,7 @@ import { addContext, setCurrentContext } from '../../../core/models/Context'; import { MissingContextFileError, ContextFileWrongFormatError, -} from '../../../../../errors/context-error'; +} from '../../../../errors/context-error'; import { addFlags } from '../../../core/flags/config/context.flags'; export default class ContextAdd extends Command { diff --git a/src/adapters/cli/commands/config/context/current.ts b/src/cli/commands/config/context/current.ts similarity index 96% rename from src/adapters/cli/commands/config/context/current.ts rename to src/cli/commands/config/context/current.ts index 6a84d6cb98c..1658632b9ae 100644 --- a/src/adapters/cli/commands/config/context/current.ts +++ b/src/cli/commands/config/context/current.ts @@ -5,7 +5,7 @@ import { ContextFileWrongFormatError, ContextFileEmptyError, ContextNotFoundError, -} from '../../../../../errors/context-error'; +} from '../../../../errors/context-error'; import { helpFlag } from '../../../core/flags/global.flags'; export default class ContextCurrent extends Command { diff --git a/src/adapters/cli/commands/config/context/edit.ts b/src/cli/commands/config/context/edit.ts similarity index 97% rename from src/adapters/cli/commands/config/context/edit.ts rename to src/cli/commands/config/context/edit.ts index 0fe94af3acd..a1e14c911e2 100644 --- a/src/adapters/cli/commands/config/context/edit.ts +++ b/src/cli/commands/config/context/edit.ts @@ -4,7 +4,7 @@ import { MissingContextFileError, ContextFileWrongFormatError, ContextFileEmptyError, -} from '../../../../../errors/context-error'; +} from '../../../../errors/context-error'; import { helpFlag } from '../../../core/flags/global.flags'; export default class ContextEdit extends Command { diff --git a/src/adapters/cli/commands/config/context/index.ts b/src/cli/commands/config/context/index.ts similarity index 100% rename from src/adapters/cli/commands/config/context/index.ts rename to src/cli/commands/config/context/index.ts diff --git a/src/adapters/cli/commands/config/context/init.ts b/src/cli/commands/config/context/init.ts similarity index 100% rename from src/adapters/cli/commands/config/context/init.ts rename to src/cli/commands/config/context/init.ts diff --git a/src/adapters/cli/commands/config/context/list.ts b/src/cli/commands/config/context/list.ts similarity index 96% rename from src/adapters/cli/commands/config/context/list.ts rename to src/cli/commands/config/context/list.ts index c4150830d60..57c6df1f62f 100644 --- a/src/adapters/cli/commands/config/context/list.ts +++ b/src/cli/commands/config/context/list.ts @@ -7,7 +7,7 @@ import { import { MissingContextFileError, ContextFileWrongFormatError, -} from '../../../../../errors/context-error'; +} from '../../../../errors/context-error'; import { helpFlag } from '../../../core/flags/global.flags'; export default class ContextList extends Command { diff --git a/src/adapters/cli/commands/config/context/remove.ts b/src/cli/commands/config/context/remove.ts similarity index 96% rename from src/adapters/cli/commands/config/context/remove.ts rename to src/cli/commands/config/context/remove.ts index 0a4ceb69cda..bdd69973baa 100644 --- a/src/adapters/cli/commands/config/context/remove.ts +++ b/src/cli/commands/config/context/remove.ts @@ -4,7 +4,7 @@ import { MissingContextFileError, ContextFileWrongFormatError, ContextFileEmptyError, -} from '../../../../../errors/context-error'; +} from '../../../../errors/context-error'; import { helpFlag } from '../../../core/flags/global.flags'; export default class ContextRemove extends Command { diff --git a/src/adapters/cli/commands/config/context/use.ts b/src/cli/commands/config/context/use.ts similarity index 96% rename from src/adapters/cli/commands/config/context/use.ts rename to src/cli/commands/config/context/use.ts index ce9e2da5274..6e4f1122d3e 100644 --- a/src/adapters/cli/commands/config/context/use.ts +++ b/src/cli/commands/config/context/use.ts @@ -4,7 +4,7 @@ import { MissingContextFileError, ContextFileWrongFormatError, ContextFileEmptyError, -} from '../../../../../errors/context-error'; +} from '../../../../errors/context-error'; import { helpFlag } from '../../../core/flags/global.flags'; export default class ContextUse extends Command { diff --git a/src/adapters/cli/commands/config/index.ts b/src/cli/commands/config/index.ts similarity index 100% rename from src/adapters/cli/commands/config/index.ts rename to src/cli/commands/config/index.ts diff --git a/src/adapters/cli/commands/config/versions.ts b/src/cli/commands/config/versions.ts similarity index 100% rename from src/adapters/cli/commands/config/versions.ts rename to src/cli/commands/config/versions.ts diff --git a/src/adapters/cli/commands/convert.ts b/src/cli/commands/convert.ts similarity index 94% rename from src/adapters/cli/commands/convert.ts rename to src/cli/commands/convert.ts index c70b4e986b8..097e33b9470 100644 --- a/src/adapters/cli/commands/convert.ts +++ b/src/cli/commands/convert.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { promises as fPromises } from 'fs'; import Command from '../core/base'; -import { ValidationError } from '../../../errors/validation-error'; +import { ValidationError } from '../../errors/validation-error'; import { load } from '../core/models/SpecificationFile'; -import { SpecificationFileNotFound } from '../../../errors/specification-file'; +import { SpecificationFileNotFound } from '../../errors/specification-file'; import { convert } from '@asyncapi/converter'; import type { ConvertVersion } from '@asyncapi/converter'; import { cyan, green } from 'picocolors'; @@ -67,6 +67,6 @@ export default class Convert extends Command { } else { this.error(err as Error); } - } + } } } diff --git a/src/adapters/cli/commands/diff.ts b/src/cli/commands/diff.ts similarity index 97% rename from src/adapters/cli/commands/diff.ts rename to src/cli/commands/diff.ts index 9eb2e64fa57..167d416237a 100644 --- a/src/adapters/cli/commands/diff.ts +++ b/src/cli/commands/diff.ts @@ -5,13 +5,13 @@ import { promises as fs } from 'fs'; import chalk from 'chalk'; import { load, Specification } from '../core/models/SpecificationFile'; import Command from '../core/base'; -import { ValidationError } from '../../../errors/validation-error'; -import { SpecificationFileNotFound } from '../../../errors/specification-file'; +import { ValidationError } from '../../errors/validation-error'; +import { SpecificationFileNotFound } from '../../errors/specification-file'; import { DiffBreakingChangeError, DiffOverrideFileError, DiffOverrideJSONError, -} from '../../../errors/diff-error'; +} from '../../errors/diff-error'; import { specWatcher } from '../core/globals'; import { parse, convertToOldAPI } from '../core/parser'; diff --git a/src/adapters/cli/commands/generate/fromTemplate.ts b/src/cli/commands/generate/fromTemplate.ts similarity index 97% rename from src/adapters/cli/commands/generate/fromTemplate.ts rename to src/cli/commands/generate/fromTemplate.ts index 28bd63ceac0..38e7668544f 100644 --- a/src/adapters/cli/commands/generate/fromTemplate.ts +++ b/src/cli/commands/generate/fromTemplate.ts @@ -4,14 +4,14 @@ import Command from '../../core/base'; import path from 'path'; import fs from 'fs'; import { load, Specification } from '../../core/models/SpecificationFile'; -import { isLocalTemplate, Watcher } from '../../../../utils/generator'; -import { ValidationError } from '../../../../errors/validation-error'; -import { GeneratorError } from '../../../../errors/generator-error'; +import { isLocalTemplate, Watcher } from '../../../utils/generator'; +import { ValidationError } from '../../../errors/validation-error'; +import { GeneratorError } from '../../../errors/generator-error'; import { Parser } from '@asyncapi/parser'; import type { Example } from '@oclif/core/lib/interfaces'; import { intro, isCancel, spinner, text } from '@clack/prompts'; import { inverse, yellow, magenta, green, red } from 'picocolors'; -import { GeneratorService } from '../../../../core/services/generator.service'; +import { GeneratorService } from '../../../core/services/generator.service'; import { fromTemplateFlags } from '../../core/flags/generate/fromTemplate.flags'; interface IMapBaseUrlToFlag { diff --git a/src/adapters/cli/commands/generate/index.ts b/src/cli/commands/generate/index.ts similarity index 100% rename from src/adapters/cli/commands/generate/index.ts rename to src/cli/commands/generate/index.ts diff --git a/src/adapters/cli/commands/generate/models.ts b/src/cli/commands/generate/models.ts similarity index 100% rename from src/adapters/cli/commands/generate/models.ts rename to src/cli/commands/generate/models.ts diff --git a/src/adapters/cli/commands/new/file.ts b/src/cli/commands/new/file.ts similarity index 94% rename from src/adapters/cli/commands/new/file.ts rename to src/cli/commands/new/file.ts index b949f4f131e..f9de4503f0e 100644 --- a/src/adapters/cli/commands/new/file.ts +++ b/src/cli/commands/new/file.ts @@ -2,7 +2,6 @@ import { promises as fPromises, readFileSync } from 'fs'; import Command from '../../core/base'; import * as inquirer from 'inquirer'; import { start as startStudio, DEFAULT_PORT } from '../../core/models/Studio'; -import { runApi } from '../../../../api'; import { resolve } from 'path'; import { load } from '../../core/models/SpecificationFile'; import { cyan } from 'picocolors'; @@ -18,7 +17,7 @@ interface IExample{ } function loadExampleFile (): IExample[] { - const exampleFiles = readFileSync(resolve(__dirname, '../../../../../assets/examples/examples.json'), { encoding: 'utf8' }); + const exampleFiles = readFileSync(resolve(__dirname, '../../../../assets/examples/examples.json'), { encoding: 'utf8' }); return JSON.parse(exampleFiles); } @@ -56,7 +55,6 @@ export default class NewFile extends Command { if (flags.studio) { if (isTTY) { - runApi(3001); startStudio(fileName, flags.port || DEFAULT_PORT); } else { this.warn('Warning: --studio flag was passed but the terminal is not interactive. Ignoring...'); @@ -84,7 +82,7 @@ export default class NewFile extends Command { } try { - const exampleFiles = await readFile(resolve(__dirname, '../../../../../assets/examples/examples.json'), { encoding: 'utf8' }); + const exampleFiles = await readFile(resolve(__dirname, '../../../../assets/examples/examples.json'), { encoding: 'utf8' }); examples = JSON.parse(exampleFiles); } catch (error) { // no examples found @@ -130,13 +128,12 @@ export default class NewFile extends Command { await this.createAsyncapiFile(fileName, selectedTemplate); if (openStudio) { - runApi(3001); startStudio(fileName, flags.port || DEFAULT_PORT); } } async createAsyncapiFile(fileName:string, selectedTemplate:string) { - const asyncApiFile = await readFile(resolve(__dirname, '../../../../../assets/examples/', selectedTemplate), { encoding: 'utf8' }); + const asyncApiFile = await readFile(resolve(__dirname, '../../../../assets/examples/', selectedTemplate), { encoding: 'utf8' }); let fileNameToWriteToDisk; diff --git a/src/adapters/cli/commands/new/glee.ts b/src/cli/commands/new/glee.ts similarity index 100% rename from src/adapters/cli/commands/new/glee.ts rename to src/cli/commands/new/glee.ts diff --git a/src/adapters/cli/commands/new/index.ts b/src/cli/commands/new/index.ts similarity index 100% rename from src/adapters/cli/commands/new/index.ts rename to src/cli/commands/new/index.ts diff --git a/src/adapters/cli/commands/new/project.ts b/src/cli/commands/new/project.ts similarity index 100% rename from src/adapters/cli/commands/new/project.ts rename to src/cli/commands/new/project.ts diff --git a/src/adapters/cli/commands/optimize.ts b/src/cli/commands/optimize.ts similarity index 99% rename from src/adapters/cli/commands/optimize.ts rename to src/cli/commands/optimize.ts index 1d8a8f04348..484e303f2ea 100644 --- a/src/adapters/cli/commands/optimize.ts +++ b/src/cli/commands/optimize.ts @@ -1,6 +1,6 @@ import { Optimizer, Output, Report, ReportElement } from '@asyncapi/optimizer'; import Command from '../core/base'; -import { ValidationError } from '../../../errors/validation-error'; +import { ValidationError } from '../../errors/validation-error'; import { load } from '../core/models/SpecificationFile'; import * as inquirer from 'inquirer'; import chalk from 'chalk'; diff --git a/src/adapters/cli/commands/start/index.ts b/src/cli/commands/start/index.ts similarity index 100% rename from src/adapters/cli/commands/start/index.ts rename to src/cli/commands/start/index.ts diff --git a/src/adapters/cli/commands/start/studio.ts b/src/cli/commands/start/studio.ts similarity index 100% rename from src/adapters/cli/commands/start/studio.ts rename to src/cli/commands/start/studio.ts diff --git a/src/adapters/cli/commands/validate.ts b/src/cli/commands/validate.ts similarity index 100% rename from src/adapters/cli/commands/validate.ts rename to src/cli/commands/validate.ts diff --git a/src/adapters/cli/core/base.ts b/src/cli/core/base.ts similarity index 100% rename from src/adapters/cli/core/base.ts rename to src/cli/core/base.ts diff --git a/src/adapters/cli/core/flags/bundle.flags.ts b/src/cli/core/flags/bundle.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/bundle.flags.ts rename to src/cli/core/flags/bundle.flags.ts diff --git a/src/adapters/cli/core/flags/config/context.flags.ts b/src/cli/core/flags/config/context.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/config/context.flags.ts rename to src/cli/core/flags/config/context.flags.ts diff --git a/src/adapters/cli/core/flags/convert.flags.ts b/src/cli/core/flags/convert.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/convert.flags.ts rename to src/cli/core/flags/convert.flags.ts diff --git a/src/adapters/cli/core/flags/diff.flags.ts b/src/cli/core/flags/diff.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/diff.flags.ts rename to src/cli/core/flags/diff.flags.ts diff --git a/src/adapters/cli/core/flags/generate/fromTemplate.flags.ts b/src/cli/core/flags/generate/fromTemplate.flags.ts similarity index 90% rename from src/adapters/cli/core/flags/generate/fromTemplate.flags.ts rename to src/cli/core/flags/generate/fromTemplate.flags.ts index ec9ac427e40..0228f8452d0 100644 --- a/src/adapters/cli/core/flags/generate/fromTemplate.flags.ts +++ b/src/cli/core/flags/generate/fromTemplate.flags.ts @@ -9,6 +9,11 @@ export const fromTemplateFlags = () => { description: 'Disable a specific hook type or hooks from a given hook type', multiple: true }), + 'no-interactive': Flags.boolean({ + description: 'Disable interactive mode and run with the provided flags.', + required: false, + default: false, + }), install: Flags.boolean({ char: 'i', default: false, diff --git a/src/adapters/cli/core/flags/generate/models.flags.ts b/src/cli/core/flags/generate/models.flags.ts similarity index 96% rename from src/adapters/cli/core/flags/generate/models.flags.ts rename to src/cli/core/flags/generate/models.flags.ts index c06c94d734a..4d5764495a0 100644 --- a/src/adapters/cli/core/flags/generate/models.flags.ts +++ b/src/cli/core/flags/generate/models.flags.ts @@ -4,6 +4,11 @@ import { validationFlags } from '../../parser'; export const modelsFlags = () => { return { help: Flags.help({ char: 'h' }), + 'no-interactive': Flags.boolean({ + description: 'Disable interactive mode and run with the provided flags.', + required: false, + default: false, + }), output: Flags.string({ char: 'o', description: 'The output directory where the models should be written to. Omitting this flag will write the models to `stdout`.', diff --git a/src/adapters/cli/core/flags/global.flags.ts b/src/cli/core/flags/global.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/global.flags.ts rename to src/cli/core/flags/global.flags.ts diff --git a/src/adapters/cli/core/flags/new/file.flags.ts b/src/cli/core/flags/new/file.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/new/file.flags.ts rename to src/cli/core/flags/new/file.flags.ts diff --git a/src/adapters/cli/core/flags/new/glee.flags.ts b/src/cli/core/flags/new/glee.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/new/glee.flags.ts rename to src/cli/core/flags/new/glee.flags.ts diff --git a/src/adapters/cli/core/flags/optimize.flags.ts b/src/cli/core/flags/optimize.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/optimize.flags.ts rename to src/cli/core/flags/optimize.flags.ts diff --git a/src/adapters/cli/core/flags/start/api.flags.ts b/src/cli/core/flags/start/api.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/start/api.flags.ts rename to src/cli/core/flags/start/api.flags.ts diff --git a/src/adapters/cli/core/flags/start/studio.flags.ts b/src/cli/core/flags/start/studio.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/start/studio.flags.ts rename to src/cli/core/flags/start/studio.flags.ts diff --git a/src/adapters/cli/core/flags/validate.flags.ts b/src/cli/core/flags/validate.flags.ts similarity index 100% rename from src/adapters/cli/core/flags/validate.flags.ts rename to src/cli/core/flags/validate.flags.ts diff --git a/src/adapters/cli/core/global.d.ts b/src/cli/core/global.d.ts similarity index 100% rename from src/adapters/cli/core/global.d.ts rename to src/cli/core/global.d.ts diff --git a/src/adapters/cli/core/globals.ts b/src/cli/core/globals.ts similarity index 100% rename from src/adapters/cli/core/globals.ts rename to src/cli/core/globals.ts diff --git a/src/adapters/cli/core/hooks/command_not_found/myhook.ts b/src/cli/core/hooks/command_not_found/myhook.ts similarity index 100% rename from src/adapters/cli/core/hooks/command_not_found/myhook.ts rename to src/cli/core/hooks/command_not_found/myhook.ts diff --git a/src/adapters/cli/core/models/Context.ts b/src/cli/core/models/Context.ts similarity index 99% rename from src/adapters/cli/core/models/Context.ts rename to src/cli/core/models/Context.ts index 66736168dca..a9c293d59fd 100644 --- a/src/adapters/cli/core/models/Context.ts +++ b/src/cli/core/models/Context.ts @@ -10,7 +10,7 @@ import { ContextAlreadyExistsError, ContextFileEmptyError, ContextFileWriteError, -} from '../../../../errors/context-error'; +} from '../../../errors/context-error'; const { readFile, writeFile } = fs; diff --git a/src/adapters/cli/core/models/SpecificationFile.ts b/src/cli/core/models/SpecificationFile.ts similarity index 97% rename from src/adapters/cli/core/models/SpecificationFile.ts rename to src/cli/core/models/SpecificationFile.ts index 9abd4fac937..7cedd5e54ef 100644 --- a/src/adapters/cli/core/models/SpecificationFile.ts +++ b/src/cli/core/models/SpecificationFile.ts @@ -4,8 +4,8 @@ import { URL } from 'url'; import fetch from 'node-fetch'; import yaml from 'js-yaml'; import { loadContext } from './Context'; -import { ErrorLoadingSpec } from '../../../../errors/specification-file'; -import { MissingContextFileError } from '../../../../errors/context-error'; +import { ErrorLoadingSpec } from '../../../errors/specification-file'; +import { MissingContextFileError } from '../../../errors/context-error'; const { readFile, lstat } = fs; const allowedFileNames: string[] = [ diff --git a/src/adapters/cli/core/models/Studio.ts b/src/cli/core/models/Studio.ts similarity index 97% rename from src/adapters/cli/core/models/Studio.ts rename to src/cli/core/models/Studio.ts index 88627b06bec..0ad445adab1 100644 --- a/src/adapters/cli/core/models/Studio.ts +++ b/src/cli/core/models/Studio.ts @@ -1,5 +1,5 @@ import { existsSync, promises as fPromises } from 'fs'; -import { SpecificationFileNotFound } from '../../../../errors/specification-file'; +import { SpecificationFileNotFound } from '../../../errors/specification-file'; import { createServer } from 'http'; import serveHandler from 'serve-handler'; import { WebSocketServer } from 'ws'; diff --git a/src/adapters/cli/core/parser.ts b/src/cli/core/parser.ts similarity index 100% rename from src/adapters/cli/core/parser.ts rename to src/cli/core/parser.ts diff --git a/src/core/services/archiver.service.ts b/src/core/services/archiver.service.ts deleted file mode 100644 index ef09355d59f..00000000000 --- a/src/core/services/archiver.service.ts +++ /dev/null @@ -1,59 +0,0 @@ -import archiver, { Archiver } from 'archiver'; -import { Response } from 'express'; - -import { createTempDirectory, removeTempDirectory } from '../../utils/temp-dir'; - -/** - * Service wrapping the `archiver` module: - - easier zip creation - - adding proper `Content-Type` header - - easier adding an AsyncAPI document to the archive - - easier stream finalization - */ -export class ArchiverService { - public createZip(res?: Response) { - const zip = archiver('zip', { zlib: { level: 9 } }); - if (res) { - zip.pipe(res); - res.attachment('asyncapi.zip'); - } - return zip; - } - - public appendDirectory(archive: Archiver, from: string, to: string) { - archive.directory(from, to); - } - - private retrieveLangauge(content: string): 'json' | 'yaml' { - if (content.trim()[0] === '{') { - return 'json'; - } - return 'yaml'; - } - - public appendAsyncAPIDocument(archive: Archiver, asyncapi: string, fileName = 'asyncapi') { - asyncapi = JSON.stringify(asyncapi); - const language = this.retrieveLangauge(asyncapi); - if (language === 'yaml') { - archive.append(asyncapi, { name: `${fileName}.yml` }); - } else { - archive.append(asyncapi, { name: `${fileName}.json`}); - } - } - - public async finalize(archive: Archiver) { - await new Promise((resolve) => { - // wait for end stream - archive.on('end', resolve); - archive.finalize(); - }); - } - - public createTempDirectory() { - return createTempDirectory(); - } - - public removeTempDirectory(tmpDir: string) { - return removeTempDirectory(tmpDir); - } -} diff --git a/src/ports/generator.interface.ts b/src/core/services/generator.interface.ts similarity index 100% rename from src/ports/generator.interface.ts rename to src/core/services/generator.interface.ts diff --git a/src/core/services/generator.service.ts b/src/core/services/generator.service.ts index c3710a91cd7..dc362b7fb02 100644 --- a/src/core/services/generator.service.ts +++ b/src/core/services/generator.service.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import AsyncAPIGenerator from '@asyncapi/generator'; -import { IGenerator } from '../../ports/generator.interface'; +import { IGenerator } from './generator.interface'; import { GeneratorError } from '../../errors/generator-error'; import path from 'path'; import os from 'os'; diff --git a/src/utils/logger.ts b/src/utils/logger.ts deleted file mode 100644 index cfb7426959a..00000000000 --- a/src/utils/logger.ts +++ /dev/null @@ -1,38 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -import winston from 'winston'; - -const LOG_DIR = '../logs'; - -const logDir: string = path.join(__dirname, LOG_DIR); -if (!fs.existsSync(logDir)) { - fs.mkdirSync(logDir); -} - -/* - * Log Level - * error: 0, warn: 1, info: 2, http: 3, verbose: 4, debug: 5, silly: 6 - */ -const logger = winston.createLogger({ - format: winston.format.combine( - winston.format.timestamp({ - format: 'YYYY-MM-DD HH:mm:ss', - }), - // Define log format - winston.format.printf(({ timestamp, level, message }) => `${timestamp} ${level}: ${message}`), - ), -}); - -logger.add( - new winston.transports.Console({ - format: winston.format.combine(winston.format.splat(), winston.format.colorize()), - }), -); - -const stream = { - write: (message: string) => { - logger.info(message.substring(0, message.lastIndexOf('\n'))); - }, -}; - -export { logger, stream }; diff --git a/src/utils/temp-dir.ts b/src/utils/temp-dir.ts deleted file mode 100644 index 2e0e847c793..00000000000 --- a/src/utils/temp-dir.ts +++ /dev/null @@ -1,19 +0,0 @@ -import os from 'os'; -import fs, { promises as fsp } from 'fs'; -import path from 'path'; -import { v4 as uuidv4 } from 'uuid'; - -import { logger } from './logger'; - -export function createTempDirectory() { - return fsp.mkdtemp(path.join(os.tmpdir(), uuidv4())); -} - -export async function removeTempDirectory(tmpDir: string) { - try { - // eslint-disable-next-line no-unused-expressions - tmpDir && fs.existsSync(tmpDir) && await fsp.rmdir(tmpDir); - } catch (e) { - logger.error(`An error has occurred while removing the temp folder at ${tmpDir}. Please remove it manually. Error: ${e}`); - } -} diff --git a/test/helpers/index.ts b/test/helpers/index.ts index 396d579c1b3..d618f5d3c9a 100644 --- a/test/helpers/index.ts +++ b/test/helpers/index.ts @@ -1,7 +1,7 @@ import { existsSync, writeFileSync, unlinkSync,rmdirSync, mkdirSync, promises as fs } from 'fs'; import * as path from 'path'; -import { IContextFile, CONTEXT_FILE_PATH } from '../../src/adapters/cli/core/models/Context'; -import SpecificationFile from '../../src/adapters/cli/core/models/SpecificationFile'; +import { IContextFile, CONTEXT_FILE_PATH } from '../../src/cli/core/models/Context'; +import SpecificationFile from '../../src/cli/core/models/SpecificationFile'; import http from 'http'; import rimraf from 'rimraf'; @@ -30,17 +30,33 @@ export default class ContextTestingHelper { return this._context; } - createDummyContextFile(): void { - writeFileSync(CONTEXT_FILE_PATH, JSON.stringify(this._context), { encoding: 'utf8' }); + async createDummyContextFile(): Promise { + // writeFileSync(CONTEXT_FILE_PATH, JSON.stringify(this._context), { encoding: 'utf8' }); + await fs.writeFile(CONTEXT_FILE_PATH, JSON.stringify(this._context), { encoding: 'utf8' }); + if (existsSync(ASYNCAPI_FILE_PATH)) { + console.log("Created dummy context file at: " + CONTEXT_FILE_PATH); + } else { + console.log("Failed to create dummy context file at: " + CONTEXT_FILE_PATH, + " With this content" + JSON.stringify(this._context)); + } } - createDummyContextFileWrong(data: string): void { - writeFileSync(CONTEXT_FILE_PATH, JSON.stringify(data)); + async createDummyContextFileWrong(data: string): Promise { + await fs.writeFile(CONTEXT_FILE_PATH, JSON.stringify(data), { encoding: 'utf8' }); + if (existsSync(ASYNCAPI_FILE_PATH)) { + console.log("Created dummy context file at: " + CONTEXT_FILE_PATH); + } else { + console.log("Failed to create dummy context file at: " + CONTEXT_FILE_PATH); + } } - deleteDummyContextFile(): void { - if (existsSync(CONTEXT_FILE_PATH)) { - unlinkSync(CONTEXT_FILE_PATH); + async deleteDummyContextFile(): Promise { + try { + if (existsSync(CONTEXT_FILE_PATH)) { + await fs.unlink(CONTEXT_FILE_PATH); + } + } catch (error) { + console.error("Failed to delete dummy context file at: " + CONTEXT_FILE_PATH, error); + throw error; } } diff --git a/test/integration/api.test.ts b/test/integration/api.test.ts deleted file mode 100644 index 2ed25fd1023..00000000000 --- a/test/integration/api.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -// api.test.js -import { expect, test } from '@oclif/test'; -import supertest from 'supertest'; -import { App } from '../../src/adapters/api/core/app'; -import { PingController } from '../../src/adapters/api/controllers/ping.controller'; -import { GeneratorController } from '../../src/adapters/api/controllers/generator.controller'; - -const apiUrl = 'http://localhost:3001/v1'; -let server: any; -let api: any; - -describe('API Tests', () => { - before(async() => { - api = new App([ - new PingController(), - new GeneratorController() - ], 3001); - await api.init(); - server = api.listen(); - }); - after(() => { - server.close(); - }); - describe('/ping', () => { - test - .it('should return 200 for /ping', async (ctx, done) => { - const response = await supertest(apiUrl).get('/ping'); - console.log(`response: ${JSON.stringify(response)}`); - expect(response.status).to.equal(200); - done(); - }); - }); -}); diff --git a/test/integration/context.test.ts b/test/integration/context.test.ts index b9542167873..3fdf7675a00 100644 --- a/test/integration/context.test.ts +++ b/test/integration/context.test.ts @@ -2,17 +2,17 @@ import path from 'path'; import { expect, test } from '@oclif/test'; import TestHelper from '../helpers'; -import { CONTEXT_FILE_PATH } from '../../src/adapters/cli/core/models/Context'; +import { CONTEXT_FILE_PATH } from '../../src/cli/core/models/Context'; const testHelper = new TestHelper(); describe('config:context, positive scenario', () => { - after(() => { - testHelper.deleteDummyContextFile(); + after(async () => { + await testHelper.deleteDummyContextFile(); }); - before(() => { - testHelper.createDummyContextFile(); + before(async() => { + await testHelper.createDummyContextFile(); }); describe('config:context:current', () => { @@ -170,20 +170,20 @@ describe('config:context, positive scenario', () => { }); describe('config:context, negative scenario', () => { - before(() => { + before(async() => { // Any context file needs to be created before starting test suite, // otherwise a totally legitimate context file will be created automatically // by `addContext()`. - testHelper.createDummyContextFileWrong(''); + await testHelper.createDummyContextFileWrong(''); }); - after(() => { - testHelper.deleteDummyContextFile(); + after(async() => { + await testHelper.deleteDummyContextFile(); }); - describe('config:context:add', () => { - testHelper.deleteDummyContextFile(); - testHelper.createDummyContextFileWrong(''); + describe('config:context:add', async() => { + await testHelper.deleteDummyContextFile(); + await testHelper.createDummyContextFileWrong(''); test .stderr() .stdout() @@ -200,9 +200,9 @@ describe('config:context, negative scenario', () => { ); }); - describe('config:context:add', () => { - testHelper.deleteDummyContextFile(); - testHelper.createDummyContextFileWrong('{}'); + describe('config:context:add', async() => { + await testHelper.deleteDummyContextFile(); + await testHelper.createDummyContextFileWrong('{}'); test .stderr() .stdout() @@ -219,9 +219,9 @@ describe('config:context, negative scenario', () => { ); }); - describe('config:context:add', () => { - testHelper.deleteDummyContextFile(); - testHelper.createDummyContextFileWrong('[]'); + describe('config:context:add', async() => { + await testHelper.deleteDummyContextFile(); + await testHelper.createDummyContextFileWrong('[]'); test .stderr() .stdout() @@ -243,9 +243,9 @@ describe('config:context, negative scenario', () => { // `{"current":"home","store":{"home":"homeSpecFile","code":"codeSpecFile"}}` // is considered wrong in `@oclif/test`, limiting possibilities of negative // scenarios coding. - describe('config:context:add', () => { - testHelper.deleteDummyContextFile(); - testHelper.createDummyContextFileWrong( + describe('config:context:add', async() => { + await testHelper.deleteDummyContextFile(); + await testHelper.createDummyContextFileWrong( '{"current":"home","current2":"test","store":{"home":"homeSpecFile","code":"codeSpecFile"}}' ); test @@ -266,12 +266,12 @@ describe('config:context, negative scenario', () => { }); describe('config:context, negative scenario', () => { - after(() => { - testHelper.deleteDummyContextFile(); + after(async () => { + await testHelper.deleteDummyContextFile(); }); - describe('config:context:list', () => { - testHelper.deleteDummyContextFile(); + describe('config:context:list', async () => { + await testHelper.deleteDummyContextFile(); test .stderr() .stdout() diff --git a/test/integration/convert.test.ts b/test/integration/convert.test.ts index 64c72ad1f9d..a6c8386e61c 100644 --- a/test/integration/convert.test.ts +++ b/test/integration/convert.test.ts @@ -11,12 +11,12 @@ const JSONFilePath = './test/fixtures/specification.json'; describe('convert', () => { describe('with file paths', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async() => { + await testHelper.deleteDummyContextFile(); }); before(() => { @@ -59,13 +59,13 @@ describe('convert', () => { }); describe('with no arguments', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { + afterEach(async() => { testHelper.setCurrentContext('home'); - testHelper.deleteDummyContextFile(); + await testHelper.deleteDummyContextFile(); }); test @@ -81,9 +81,9 @@ describe('convert', () => { test .stderr() .stdout() - .do(() => { + .do(async() => { testHelper.unsetCurrentContext(); - testHelper.createDummyContextFile(); + await testHelper.createDummyContextFile(); }) .command(['convert']) .it('throws error message if no current context', (ctx, done) => { @@ -94,9 +94,9 @@ describe('convert', () => { }); describe('with no context file', () => { - beforeEach(() => { + beforeEach(async() => { try { - testHelper.deleteDummyContextFile(); + await testHelper.deleteDummyContextFile(); } catch (e: any) { if (e.code !== 'ENOENT') { throw e; @@ -116,12 +116,12 @@ describe('convert', () => { }); describe('with target-version flag', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async() => { + await testHelper.deleteDummyContextFile(); }); test @@ -146,12 +146,12 @@ describe('convert', () => { }); describe('with output flag', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async () => { + await testHelper.deleteDummyContextFile(); }); test diff --git a/test/integration/optimize.test.ts b/test/integration/optimize.test.ts index 169ca7c5cb9..91b93ce57ce 100644 --- a/test/integration/optimize.test.ts +++ b/test/integration/optimize.test.ts @@ -2,7 +2,7 @@ import path from 'path'; import { test } from '@oclif/test'; import TestHelper, { createMockServer, stopMockServer } from '../helpers'; import inquirer from 'inquirer'; -import {Optimizations, Outputs} from '../../src/adapters/cli/core/flags/optimize.flags'; +import {Optimizations, Outputs} from '../../src/cli/core/flags/optimize.flags'; import { expect } from '@oclif/test'; const testHelper = new TestHelper(); @@ -13,12 +13,12 @@ const asyncapiv3 = './test/fixtures/specification-v3.yml'; describe('optimize', () => { describe('no optimization needed', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async () => { + await testHelper.deleteDummyContextFile(); }); before(() => { @@ -61,13 +61,13 @@ describe('optimize', () => { }); describe('with no arguments', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { + afterEach(async () => { testHelper.setCurrentContext('home'); - testHelper.deleteDummyContextFile(); + await testHelper.deleteDummyContextFile(); }); test @@ -83,9 +83,9 @@ describe('optimize', () => { test .stderr() .stdout() - .do(() => { + .do(async() => { testHelper.unsetCurrentContext(); - testHelper.createDummyContextFile(); + await testHelper.createDummyContextFile(); }) .command(['optimize']) .it('throws error message if no current context', (ctx, done) => { @@ -96,9 +96,9 @@ describe('optimize', () => { }); describe('with no context file', () => { - beforeEach(() => { + beforeEach(async() => { try { - testHelper.deleteDummyContextFile(); + await testHelper.deleteDummyContextFile(); } catch (e: any) { if (e.code !== 'ENOENT') { throw e; diff --git a/test/integration/validate.test.ts b/test/integration/validate.test.ts index 72d5bbbdc51..c49c3c55a5e 100644 --- a/test/integration/validate.test.ts +++ b/test/integration/validate.test.ts @@ -10,12 +10,12 @@ const testHelper = new TestHelper(); describe('validate', () => { describe('with file paths', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async() => { + await testHelper.deleteDummyContextFile(); }); before(() => { @@ -78,12 +78,12 @@ describe('validate', () => { }); describe('with context names', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async() => { + await testHelper.deleteDummyContextFile(); }); test @@ -109,13 +109,13 @@ describe('validate', () => { }); describe('with no arguments', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async() => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { + afterEach(async () => { testHelper.setCurrentContext('home'); - testHelper.deleteDummyContextFile(); + await testHelper.deleteDummyContextFile(); }); test @@ -132,9 +132,9 @@ describe('validate', () => { test .stderr() .stdout() - .do(() => { + .do(async() => { testHelper.unsetCurrentContext(); - testHelper.createDummyContextFile(); + await testHelper.createDummyContextFile(); }) .command(['validate']) .it('throws error message if no current context', (ctx, done) => { @@ -145,9 +145,9 @@ describe('validate', () => { }); describe('with no context file', () => { - beforeEach(() => { + beforeEach(async() => { try { - testHelper.deleteDummyContextFile(); + await testHelper.deleteDummyContextFile(); } catch (e: any) { if (e.code !== 'ENOENT') { throw e; @@ -167,12 +167,12 @@ describe('validate', () => { }); describe('with --log-diagnostics flag', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async () => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async() => { + await testHelper.deleteDummyContextFile(); }); test @@ -197,12 +197,12 @@ describe('validate', () => { }); describe('with --diagnostics-format flag', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async () => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async() => { + await testHelper.deleteDummyContextFile(); }); test @@ -227,12 +227,12 @@ describe('validate', () => { }); describe('with --fail-severity flag', () => { - beforeEach(() => { - testHelper.createDummyContextFile(); + beforeEach(async () => { + await testHelper.createDummyContextFile(); }); - afterEach(() => { - testHelper.deleteDummyContextFile(); + afterEach(async() => { + await testHelper.deleteDummyContextFile(); }); test