diff --git a/server/package.json b/server/package.json index 9edcb4293..83732c9b7 100644 --- a/server/package.json +++ b/server/package.json @@ -14,7 +14,7 @@ "supertest": "^6.3.4", "swagger-jsdoc": "^6.2.8", "swagger-ui-express": "^5.0.0", - "tsoa": "^6.0.1" + "tsoa": "~6.2.0" }, "devDependencies": { "@types/cors": "^2.8.17", diff --git a/server/src/middleware/__generated__/routes.ts b/server/src/middleware/__generated__/routes.ts index 42b8f1ac7..e8a55bc1a 100644 --- a/server/src/middleware/__generated__/routes.ts +++ b/server/src/middleware/__generated__/routes.ts @@ -1,14 +1,17 @@ /* tslint:disable */ /* eslint-disable */ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { Controller, ValidationService, FieldErrors, ValidateError, TsoaRoute, HttpStatusCodeLiteral, TsoaResponse, fetchMiddlewares } from '@tsoa/runtime'; +import { TsoaRoute, fetchMiddlewares, ExpressTemplateService } from '@tsoa/runtime'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { UsersController } from './../../service-layer/controllers/UserController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { StripeWebhook } from './../../service-layer/controllers/StripeWebhook'; import { expressAuthentication } from './../../business-layer/security/Authentication'; // @ts-ignore - no great way to install types from subpackage -import type { RequestHandler, Router } from 'express'; +import type { Request as ExRequest, Response as ExResponse, RequestHandler, Router } from 'express'; + +const expressAuthenticationRecasted = expressAuthentication as (req: ExRequest, securityName: string, scopes?: string[], res?: ExResponse) => Promise; + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -76,7 +79,7 @@ const models: TsoaRoute.Models = { }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa }; -const validationService = new ValidationService(models); +const templateService = new ExpressTemplateService(models, {"noImplicitAdditionalProperties":"throw-on-extras","bodyCoercion":true}); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -90,21 +93,26 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.getAllUsers)), - function UsersController_getAllUsers(request: any, response: any, next: any) { - const args = { + function UsersController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa let validatedArgs: any[] = []; try { - validatedArgs = getValidatedArgs(args, request, response); + validatedArgs = templateService.getValidatedArgs({ args, request, response }); const controller = new UsersController(); - - const promise = controller.getAllUsers.apply(controller, validatedArgs as any); - promiseHandler(controller, promise, response, 200, next); + templateService.apiHandler({ + methodName: 'getAllUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); } catch (err) { return next(err); } @@ -115,8 +123,8 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.getSelf)), - function UsersController_getSelf(request: any, response: any, next: any) { - const args = { + function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -124,13 +132,18 @@ export function RegisterRoutes(app: Router) { let validatedArgs: any[] = []; try { - validatedArgs = getValidatedArgs(args, request, response); + validatedArgs = templateService.getValidatedArgs({ args, request, response }); const controller = new UsersController(); - - const promise = controller.getSelf.apply(controller, validatedArgs as any); - promiseHandler(controller, promise, response, 200, next); + templateService.apiHandler({ + methodName: 'getSelf', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); } catch (err) { return next(err); } @@ -141,8 +154,8 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.createUser)), - function UsersController_createUser(request: any, response: any, next: any) { - const args = { + function UsersController_createUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, }; @@ -150,13 +163,18 @@ export function RegisterRoutes(app: Router) { let validatedArgs: any[] = []; try { - validatedArgs = getValidatedArgs(args, request, response); + validatedArgs = templateService.getValidatedArgs({ args, request, response }); const controller = new UsersController(); - - const promise = controller.createUser.apply(controller, validatedArgs as any); - promiseHandler(controller, promise, response, 200, next); + templateService.apiHandler({ + methodName: 'createUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); } catch (err) { return next(err); } @@ -167,8 +185,8 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.editUsers)), - function UsersController_editUsers(request: any, response: any, next: any) { - const args = { + function UsersController_editUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, }; @@ -176,13 +194,18 @@ export function RegisterRoutes(app: Router) { let validatedArgs: any[] = []; try { - validatedArgs = getValidatedArgs(args, request, response); + validatedArgs = templateService.getValidatedArgs({ args, request, response }); const controller = new UsersController(); - - const promise = controller.editUsers.apply(controller, validatedArgs as any); - promiseHandler(controller, promise, response, 200, next); + templateService.apiHandler({ + methodName: 'editUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); } catch (err) { return next(err); } @@ -192,8 +215,8 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(StripeWebhook)), ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), - function StripeWebhook_receiveWebhook(request: any, response: any, next: any) { - const args = { + function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -201,13 +224,18 @@ export function RegisterRoutes(app: Router) { let validatedArgs: any[] = []; try { - validatedArgs = getValidatedArgs(args, request, response); + validatedArgs = templateService.getValidatedArgs({ args, request, response }); const controller = new StripeWebhook(); - - const promise = controller.receiveWebhook.apply(controller, validatedArgs as any); - promiseHandler(controller, promise, response, 200, next); + templateService.apiHandler({ + methodName: 'receiveWebhook', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); } catch (err) { return next(err); } @@ -220,7 +248,7 @@ export function RegisterRoutes(app: Router) { // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa function authenticateMiddleware(security: TsoaRoute.Security[] = []) { - return async function runAuthenticationMiddleware(request: any, _response: any, next: any) { + return async function runAuthenticationMiddleware(request: any, response: any, next: any) { // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -240,7 +268,7 @@ export function RegisterRoutes(app: Router) { for (const name in secMethod) { secMethodAndPromises.push( - expressAuthentication(request, name, secMethod[name]) + expressAuthenticationRecasted(request, name, secMethod[name], response) .catch(pushAndRethrow) ); } @@ -252,7 +280,7 @@ export function RegisterRoutes(app: Router) { } else { for (const name in secMethod) { secMethodOrPromises.push( - expressAuthentication(request, name, secMethod[name]) + expressAuthenticationRecasted(request, name, secMethod[name], response) .catch(pushAndRethrow) ); } @@ -263,107 +291,28 @@ export function RegisterRoutes(app: Router) { try { request['user'] = await Promise.any(secMethodOrPromises); + + // Response was sent in middleware, abort + if (response.writableEnded) { + return; + } + next(); } catch(err) { // Show most recent error as response const error = failedAttempts.pop(); error.status = error.status || 401; - next(error); - } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - } - } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - function isController(object: any): object is Controller { - return 'getHeaders' in object && 'getStatus' in object && 'setStatus' in object; - } - function promiseHandler(controllerObj: any, promise: any, response: any, successStatus: any, next: any) { - return Promise.resolve(promise) - .then((data: any) => { - let statusCode = successStatus; - let headers; - if (isController(controllerObj)) { - headers = controllerObj.getHeaders(); - statusCode = controllerObj.getStatus() || statusCode; + // Response was sent in middleware, abort + if (response.writableEnded) { + return; } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - returnHandler(response, statusCode, data, headers) - }) - .catch((error: any) => next(error)); - } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - function returnHandler(response: any, statusCode?: number, data?: any, headers: any = {}) { - if (response.headersSent) { - return; - } - Object.keys(headers).forEach((name: string) => { - response.set(name, headers[name]); - }); - if (data && typeof data.pipe === 'function' && data.readable && typeof data._read === 'function') { - response.status(statusCode || 200) - data.pipe(response); - } else if (data !== null && data !== undefined) { - response.status(statusCode || 200).json(data); - } else { - response.status(statusCode || 204).end(); - } - } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - function responder(response: any): TsoaResponse { - return function(status, data, headers) { - returnHandler(response, status, data, headers); - }; - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - function getValidatedArgs(args: any, request: any, response: any): any[] { - const fieldErrors: FieldErrors = {}; - const values = Object.keys(args).map((key) => { - const name = args[key].name; - switch (args[key].in) { - case 'request': - return request; - case 'query': - return validationService.ValidateParam(args[key], request.query[name], name, fieldErrors, undefined, {"noImplicitAdditionalProperties":"throw-on-extras"}); - case 'queries': - return validationService.ValidateParam(args[key], request.query, name, fieldErrors, undefined, {"noImplicitAdditionalProperties":"throw-on-extras"}); - case 'path': - return validationService.ValidateParam(args[key], request.params[name], name, fieldErrors, undefined, {"noImplicitAdditionalProperties":"throw-on-extras"}); - case 'header': - return validationService.ValidateParam(args[key], request.header(name), name, fieldErrors, undefined, {"noImplicitAdditionalProperties":"throw-on-extras"}); - case 'body': - return validationService.ValidateParam(args[key], request.body, name, fieldErrors, undefined, {"noImplicitAdditionalProperties":"throw-on-extras"}); - case 'body-prop': - return validationService.ValidateParam(args[key], request.body[name], name, fieldErrors, 'body.', {"noImplicitAdditionalProperties":"throw-on-extras"}); - case 'formData': - if (args[key].dataType === 'file') { - return validationService.ValidateParam(args[key], request.file, name, fieldErrors, undefined, {"noImplicitAdditionalProperties":"throw-on-extras"}); - } else if (args[key].dataType === 'array' && args[key].array.dataType === 'file') { - return validationService.ValidateParam(args[key], request.files, name, fieldErrors, undefined, {"noImplicitAdditionalProperties":"throw-on-extras"}); - } else { - return validationService.ValidateParam(args[key], request.body[name], name, fieldErrors, undefined, {"noImplicitAdditionalProperties":"throw-on-extras"}); - } - case 'res': - return responder(response); + next(error); } - }); - if (Object.keys(fieldErrors).length > 0) { - throw new ValidateError(fieldErrors, ''); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa } - return values; } // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa diff --git a/yarn.lock b/yarn.lock index 80c4c2482..97a1df539 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2859,6 +2859,314 @@ __metadata: languageName: node linkType: hard +"@hapi/accept@npm:^6.0.1": + version: 6.0.3 + resolution: "@hapi/accept@npm:6.0.3" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/6860dc50c337c6f4fcf8597c10e74ca4a481d3925075860110b641a0e670a036cdecccb49049745dc1c7ab219a1538ae56c40a38420c7f4aceef13cadd56cb1d + languageName: node + linkType: hard + +"@hapi/ammo@npm:^6.0.1": + version: 6.0.1 + resolution: "@hapi/ammo@npm:6.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/95f2f2a52f97b0346354b89be1a1b79a393bcf0f461e3c09b34523714aca8bf5287f6b02efda63cd4a24152e22ec7e92f98f1b9cc18b2991c665fe40ceceba80 + languageName: node + linkType: hard + +"@hapi/b64@npm:^6.0.1": + version: 6.0.1 + resolution: "@hapi/b64@npm:6.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/d2eda488e98359c913dbe6a4374e57273fc1d1bf3d43175788b3379004a45ef86b9c34d94322c2c903cd538747faac08939a116347b753e067be3ce90a38a262 + languageName: node + linkType: hard + +"@hapi/boom@npm:^10.0.0, @hapi/boom@npm:^10.0.1": + version: 10.0.1 + resolution: "@hapi/boom@npm:10.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/e4ae8a69bb67c5687320d320a0706ac66e797a659c19fb1c9b909eaefe3b41780e4ecd4382de1297b10c33e9db81f79667324576b9153f57b0cf701293b908d0 + languageName: node + linkType: hard + +"@hapi/bounce@npm:^3.0.1": + version: 3.0.1 + resolution: "@hapi/bounce@npm:3.0.1" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/c0c1bd43adf04a5b952fd26d2248584a9b2a81bf012bb027260bf407977e88172982fac85d08be7c9ea76aa89b179785a00a7c7d7e8d530cfee2155607202627 + languageName: node + linkType: hard + +"@hapi/bourne@npm:^3.0.0": + version: 3.0.0 + resolution: "@hapi/bourne@npm:3.0.0" + checksum: 10c0/2e2df62f6bc6f32b980ba5bbdc09200c93c55c8306399ec0f2781da088a82aab699498c89fe94fec4acf770210f9aee28c75bfc2f04044849ac01b034134e717 + languageName: node + linkType: hard + +"@hapi/call@npm:^9.0.1": + version: 9.0.1 + resolution: "@hapi/call@npm:9.0.1" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/c08b1b639cdc92227e3296c664483e0a46631810d97c4fe081fded61c6262a109a71ced2cfbb43cc9e8440f1d9ab7d441bbead5f4330e5de71dc0183af9fd5a2 + languageName: node + linkType: hard + +"@hapi/catbox-memory@npm:^6.0.1": + version: 6.0.1 + resolution: "@hapi/catbox-memory@npm:6.0.1" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/d11f9e0b87f7b80e845cdb5d87ea3529318d0385a8cfeb71578768085389735946b717c571ff1f65597d209082fd8477d19d0ca1403ee28c7b19bdd170aafc43 + languageName: node + linkType: hard + +"@hapi/catbox@npm:^12.1.1": + version: 12.1.1 + resolution: "@hapi/catbox@npm:12.1.1" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/hoek": "npm:^11.0.2" + "@hapi/podium": "npm:^5.0.0" + "@hapi/validate": "npm:^2.0.1" + checksum: 10c0/290328458df736146fb718fe1ddd27f65f1fd0f99b60f1cc69a3c1c56bc6e0a04b1577b7ad4c5ed0fa1027c2028a3444c64e521e25fff598007727961c5fa774 + languageName: node + linkType: hard + +"@hapi/content@npm:^6.0.0": + version: 6.0.0 + resolution: "@hapi/content@npm:6.0.0" + dependencies: + "@hapi/boom": "npm:^10.0.0" + checksum: 10c0/e7a88299b6d7d2391d9c6223c5debd6bfc4c40e3e81d313c080721d332f844a08f6c7835b3f4308355aea4d295ec12b66423a447f952b3b47cdb8d23bca299df + languageName: node + linkType: hard + +"@hapi/cryptiles@npm:^6.0.1": + version: 6.0.1 + resolution: "@hapi/cryptiles@npm:6.0.1" + dependencies: + "@hapi/boom": "npm:^10.0.1" + checksum: 10c0/2ca7c40a29cd5695ffd076558fbb57eb43708e473429105d85e766ecd9509d1292994e8147a51d38cb07b69c81c4293f3a7e1e9e5d8cc887d3414a24505c97df + languageName: node + linkType: hard + +"@hapi/file@npm:^3.0.0": + version: 3.0.0 + resolution: "@hapi/file@npm:3.0.0" + checksum: 10c0/eb1a83a314daf58ca717effbc9179dc26f1541e8113392aa876518ab0fcde26d9227e0c719f4091c6d6e9313ec852d816ffc4f4ee94185cd331c77892d0506d2 + languageName: node + linkType: hard + +"@hapi/hapi@npm:^21.3.3": + version: 21.3.7 + resolution: "@hapi/hapi@npm:21.3.7" + dependencies: + "@hapi/accept": "npm:^6.0.1" + "@hapi/ammo": "npm:^6.0.1" + "@hapi/boom": "npm:^10.0.1" + "@hapi/bounce": "npm:^3.0.1" + "@hapi/call": "npm:^9.0.1" + "@hapi/catbox": "npm:^12.1.1" + "@hapi/catbox-memory": "npm:^6.0.1" + "@hapi/heavy": "npm:^8.0.1" + "@hapi/hoek": "npm:^11.0.2" + "@hapi/mimos": "npm:^7.0.1" + "@hapi/podium": "npm:^5.0.1" + "@hapi/shot": "npm:^6.0.1" + "@hapi/somever": "npm:^4.1.1" + "@hapi/statehood": "npm:^8.1.1" + "@hapi/subtext": "npm:^8.1.0" + "@hapi/teamwork": "npm:^6.0.0" + "@hapi/topo": "npm:^6.0.1" + "@hapi/validate": "npm:^2.0.1" + checksum: 10c0/c0b75dcb5fa761b2f771ae61f1cfda25e986ead129a604054980ab1bb07bcb470412888199eaa85bd56ea720436d544e2560b3699ed1fc2cb18b99350c765311 + languageName: node + linkType: hard + +"@hapi/heavy@npm:^8.0.1": + version: 8.0.1 + resolution: "@hapi/heavy@npm:8.0.1" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/hoek": "npm:^11.0.2" + "@hapi/validate": "npm:^2.0.1" + checksum: 10c0/da7afd4f785ae19dfa851d569e9d97eedc013de187f294b7578ec7d6a95ebc34e385ecc0e4579babf59f0ebf334d9768eb07429eeab6061f0c900a52f2b1ebe7 + languageName: node + linkType: hard + +"@hapi/hoek@npm:^11.0.2": + version: 11.0.4 + resolution: "@hapi/hoek@npm:11.0.4" + checksum: 10c0/3c0e487824daaf3af4c29e46fd57b0c5801ce9164fef2417c70e271cd970e13cc542b196f70ba1cfc9ef944eed825fcac261085ab5e2928c6017428bf576b363 + languageName: node + linkType: hard + +"@hapi/iron@npm:^7.0.1": + version: 7.0.1 + resolution: "@hapi/iron@npm:7.0.1" + dependencies: + "@hapi/b64": "npm:^6.0.1" + "@hapi/boom": "npm:^10.0.1" + "@hapi/bourne": "npm:^3.0.0" + "@hapi/cryptiles": "npm:^6.0.1" + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/a0acfd7964bed462d3622bb9ab2456b716635dc7910a9edf01ea84ecf2110c52ec8bee3bc6f5dfbc8efb10b1e87fd127c7b34be8cb7558d97e9e23f955dac638 + languageName: node + linkType: hard + +"@hapi/mimos@npm:^7.0.1": + version: 7.0.1 + resolution: "@hapi/mimos@npm:7.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + mime-db: "npm:^1.52.0" + checksum: 10c0/e423b359083237de77b79c5f0ff73df5e70913a6707311f7bdeb8e744a224e4ed6d5a0ea74cb3ba29544017761b986c647fb73b2fc7c588df7269cefaf343eee + languageName: node + linkType: hard + +"@hapi/nigel@npm:^5.0.1": + version: 5.0.1 + resolution: "@hapi/nigel@npm:5.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + "@hapi/vise": "npm:^5.0.1" + checksum: 10c0/dcb9c0afa0117948ac52d0cf2e7494e2773c09272001df7ace83f18c202c1972ae392a3723ec900109465dc3cf769ae77ca85ba083d5a44cb9f5696d40953b0a + languageName: node + linkType: hard + +"@hapi/pez@npm:^6.1.0": + version: 6.1.0 + resolution: "@hapi/pez@npm:6.1.0" + dependencies: + "@hapi/b64": "npm:^6.0.1" + "@hapi/boom": "npm:^10.0.1" + "@hapi/content": "npm:^6.0.0" + "@hapi/hoek": "npm:^11.0.2" + "@hapi/nigel": "npm:^5.0.1" + checksum: 10c0/fc9c3ffd961f7a23f0675acf077ad8f3d489a700e781199608ad06d335668f8ed9c2f409b694b795ebf351be423f4e2d46ab881657c7ed80fabd2bfeb4921509 + languageName: node + linkType: hard + +"@hapi/podium@npm:^5.0.0, @hapi/podium@npm:^5.0.1": + version: 5.0.1 + resolution: "@hapi/podium@npm:5.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + "@hapi/teamwork": "npm:^6.0.0" + "@hapi/validate": "npm:^2.0.1" + checksum: 10c0/5dd4f5dee5434dd347a996fb575f060a87b9093511ce4b8d65c693173c707b7107f7cff6fa6147e00795aa88f58bd4ae9234082149d7898eba4666e4ecc6d3f4 + languageName: node + linkType: hard + +"@hapi/shot@npm:^6.0.1": + version: 6.0.1 + resolution: "@hapi/shot@npm:6.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + "@hapi/validate": "npm:^2.0.1" + checksum: 10c0/5d4e51c41b137dd5b94fd6e84b2501d6ab4f292ef2c38647410ac31852454ca1a1dc39339b60f790a4a01b35c38d42a6f617b6849a89d9154451147cedaa09c8 + languageName: node + linkType: hard + +"@hapi/somever@npm:^4.1.1": + version: 4.1.1 + resolution: "@hapi/somever@npm:4.1.1" + dependencies: + "@hapi/bounce": "npm:^3.0.1" + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/af86789d6302a615db0d44a7cd8baa409a688f3a26f7a5c871e6e75a36cae4cc80de8e28be00e34af2853799f4e5991ee29accf52719923fc55f80491d41a067 + languageName: node + linkType: hard + +"@hapi/statehood@npm:^8.1.1": + version: 8.1.1 + resolution: "@hapi/statehood@npm:8.1.1" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/bounce": "npm:^3.0.1" + "@hapi/bourne": "npm:^3.0.0" + "@hapi/cryptiles": "npm:^6.0.1" + "@hapi/hoek": "npm:^11.0.2" + "@hapi/iron": "npm:^7.0.1" + "@hapi/validate": "npm:^2.0.1" + checksum: 10c0/d0586a6cbc7048a618014fbdf4399a9aa2d091637d6222961859e40fa3193e41dd577177ec35a9db0f21a84d58a632b69ef490ecdfc57bce5d09f13b422a1c11 + languageName: node + linkType: hard + +"@hapi/subtext@npm:^8.1.0": + version: 8.1.0 + resolution: "@hapi/subtext@npm:8.1.0" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/bourne": "npm:^3.0.0" + "@hapi/content": "npm:^6.0.0" + "@hapi/file": "npm:^3.0.0" + "@hapi/hoek": "npm:^11.0.2" + "@hapi/pez": "npm:^6.1.0" + "@hapi/wreck": "npm:^18.0.1" + checksum: 10c0/ee86d07bcea5c9321d050a497eac015e032a1debf34bb61dd1dcb5dedaa9eef6eef2d39ad8140765079ba41f97720802275eaf8cd1f517da848d38f0950b609e + languageName: node + linkType: hard + +"@hapi/teamwork@npm:^6.0.0": + version: 6.0.0 + resolution: "@hapi/teamwork@npm:6.0.0" + checksum: 10c0/1939071025708e0b4f3868b33f6fc43911741f9675a908ccba84d6a6a5f830f961d709f44b64b4625209c16d79bd5e28b287096d98bd5d00fecac1775262f867 + languageName: node + linkType: hard + +"@hapi/topo@npm:^6.0.1": + version: 6.0.2 + resolution: "@hapi/topo@npm:6.0.2" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/5a0079805e9a542bdb852912ce6ed3221ddd0a58569354b3900e165faabe50fb1d2d488067db97c494194835684b055828b6267be3064ac42cf2ce28db02edfc + languageName: node + linkType: hard + +"@hapi/validate@npm:^2.0.1": + version: 2.0.1 + resolution: "@hapi/validate@npm:2.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + "@hapi/topo": "npm:^6.0.1" + checksum: 10c0/2f433c1849befaec50bce67fdb0a27a1aea2a3ce2a016273ba577ef4ee59c5bfc3eb115edce670a23a4a14003a301c0386c5fc82070582a9890bb423276f6cbb + languageName: node + linkType: hard + +"@hapi/vise@npm:^5.0.1": + version: 5.0.1 + resolution: "@hapi/vise@npm:5.0.1" + dependencies: + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/16bc81caa7f433e29c98503d77b8df37e47022a500b5a2871e3483f18b0e5d6bc6cd6616de88cab0e14f07a7ba94504c8603c7ff8e664c3e245b5b53c0543052 + languageName: node + linkType: hard + +"@hapi/wreck@npm:^18.0.1": + version: 18.0.1 + resolution: "@hapi/wreck@npm:18.0.1" + dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/bourne": "npm:^3.0.0" + "@hapi/hoek": "npm:^11.0.2" + checksum: 10c0/46b1b1f750a66c4724964eb6d9192d1d19cfa45e602386aae76f52e3b423c9ae14a03a0f0e9f962e7d973708e1b0b6ab42d2ae77539a691fa77a18c78ccf285c + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.11.14": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" @@ -5272,36 +5580,49 @@ __metadata: languageName: node linkType: hard -"@tsoa/cli@npm:^6.0.1": - version: 6.0.1 - resolution: "@tsoa/cli@npm:6.0.1" +"@tsoa/cli@npm:^6.2.0": + version: 6.2.0 + resolution: "@tsoa/cli@npm:6.2.0" dependencies: - "@tsoa/runtime": "npm:^6.0.0" + "@tsoa/runtime": "npm:^6.2.0" "@types/multer": "npm:^1.4.11" - deepmerge: "npm:^4.3.1" fs-extra: "npm:^11.2.0" glob: "npm:^10.3.10" handlebars: "npm:^4.7.8" merge-anything: "npm:^5.1.4" minimatch: "npm:^9.0.1" + ts-deepmerge: "npm:^7.0.0" typescript: "npm:^5.3.3" validator: "npm:^13.11.0" - yamljs: "npm:^0.3.0" + yaml: "npm:^2.4.1" yargs: "npm:^17.7.1" bin: tsoa: dist/cli.js - checksum: 10c0/1479760a6ac38bc9f424b6c5d07831d56c266792987711f1c94d6ba65016cf333d03501aaf2dea5b7e0510c07e07cf7876a9f394bd7b587637fc4be8121cf7f3 + checksum: 10c0/580b4cc20257b62186ffc3ae3f8cd4161ebbeafc6f735c676d034eafd249d0a2b1d3c1c41f5cf38ca6f3b81b2ceb421bc2bd0e639bc177b10c343ab9795503fa languageName: node linkType: hard -"@tsoa/runtime@npm:^6.0.0": - version: 6.0.0 - resolution: "@tsoa/runtime@npm:6.0.0" +"@tsoa/runtime@npm:^6.2.0": + version: 6.2.0 + resolution: "@tsoa/runtime@npm:6.2.0" dependencies: + "@hapi/boom": "npm:^10.0.1" + "@hapi/hapi": "npm:^21.3.3" + "@types/koa": "npm:^2.15.0" "@types/multer": "npm:^1.4.11" + express: "npm:^4.18.3" reflect-metadata: "npm:^0.2.1" validator: "npm:^13.11.0" - checksum: 10c0/748ce2b6fd0b00b23420ac15faa9e23d18343fbb8a8e94c06212a0b31de4dce5be22e0eafbac6c4e9d04d6f936f06e2eec00e0cf178b6749313a4651188ad801 + checksum: 10c0/6c6bf0bdde11c5b2fe4225f10e11faa723f723153ab34a3339b673f56ee4a902acffcbad726e2e97890555cc062df98649478b6730b73bf753d49eb6e003e2a0 + languageName: node + linkType: hard + +"@types/accepts@npm:*": + version: 1.3.7 + resolution: "@types/accepts@npm:1.3.7" + dependencies: + "@types/node": "npm:*" + checksum: 10c0/7b21efc78b98ed57063ac31588f871f11501c080cd1201ca3743cf02ee0aee74bdb5a634183bc0987dc8dc582b26316789fd203650319ccc89a66cf88311d64f languageName: node linkType: hard @@ -5386,6 +5707,13 @@ __metadata: languageName: node linkType: hard +"@types/content-disposition@npm:*": + version: 0.5.8 + resolution: "@types/content-disposition@npm:0.5.8" + checksum: 10c0/f10baeab2ec44579012c1170763851687e740ea30531a80cd7a403475730ce7d7ead4f88927cea6970cc2d5e74fa7af38cdf4f039c5f115fba1bb98ec0014977 + languageName: node + linkType: hard + "@types/cookiejar@npm:^2.1.5": version: 2.1.5 resolution: "@types/cookiejar@npm:2.1.5" @@ -5393,6 +5721,18 @@ __metadata: languageName: node linkType: hard +"@types/cookies@npm:*": + version: 0.9.0 + resolution: "@types/cookies@npm:0.9.0" + dependencies: + "@types/connect": "npm:*" + "@types/express": "npm:*" + "@types/keygrip": "npm:*" + "@types/node": "npm:*" + checksum: 10c0/ce95c1968532af674185efd4092cbdec8d5d3bda72f729e512bf37fa77877f466ad4bd5f00fca299f94c6e3d2a3875744ae5a705ffc5113183f5e46b76d8846a + languageName: node + linkType: hard + "@types/cors@npm:^2.8.17": version: 2.8.17 resolution: "@types/cors@npm:2.8.17" @@ -5564,6 +5904,13 @@ __metadata: languageName: node linkType: hard +"@types/http-assert@npm:*": + version: 1.5.5 + resolution: "@types/http-assert@npm:1.5.5" + checksum: 10c0/02e7ba584d6d14bdb4dad05dd36ecbc4a2f4209472287e6d558e222c93182214445a0c6cd096f114bfc88446be03d82ef6db24ecda13922b0d697918c76b4067 + languageName: node + linkType: hard + "@types/http-errors@npm:*": version: 2.0.4 resolution: "@types/http-errors@npm:2.0.4" @@ -5640,6 +5987,38 @@ __metadata: languageName: node linkType: hard +"@types/keygrip@npm:*": + version: 1.0.6 + resolution: "@types/keygrip@npm:1.0.6" + checksum: 10c0/1045a79913259f539ac1d04384ea8f61cf29f1d299040eb4b67d92304ec3bcea59b7e4b83cf95a73aa251ff62e55924e380d0c563a21fe8f6e91de20cc610386 + languageName: node + linkType: hard + +"@types/koa-compose@npm:*": + version: 3.2.8 + resolution: "@types/koa-compose@npm:3.2.8" + dependencies: + "@types/koa": "npm:*" + checksum: 10c0/f2bfb7376c1e9075e8df7a46a5fce073159b01b94ec7dcca6e9f68627d48ea86a726bcfbd06491e1c99f68c0f27b8174b498081f9a3e4f976694452b5d0b5f01 + languageName: node + linkType: hard + +"@types/koa@npm:*, @types/koa@npm:^2.15.0": + version: 2.15.0 + resolution: "@types/koa@npm:2.15.0" + dependencies: + "@types/accepts": "npm:*" + "@types/content-disposition": "npm:*" + "@types/cookies": "npm:*" + "@types/http-assert": "npm:*" + "@types/http-errors": "npm:*" + "@types/keygrip": "npm:*" + "@types/koa-compose": "npm:*" + "@types/node": "npm:*" + checksum: 10c0/3fd591e25ecffc32ffa7cb152d2c5caeccefe5a72cb09d187102d8f41101bdaeeb802a07a6672eac58f805fa59892e79c1cc203ca7b27b0de75d7eac508c2b47 + languageName: node + linkType: hard + "@types/linkify-it@npm:*": version: 3.0.5 resolution: "@types/linkify-it@npm:3.0.5" @@ -8115,6 +8494,13 @@ __metadata: languageName: node linkType: hard +"cookie@npm:0.6.0": + version: 0.6.0 + resolution: "cookie@npm:0.6.0" + checksum: 10c0/f2318b31af7a31b4ddb4a678d024514df5e705f9be5909a192d7f116cfb6d45cbacf96a473fa733faa95050e7cff26e7832bb3ef94751592f1387b71c8956686 + languageName: node + linkType: hard + "cookiejar@npm:^2.1.4": version: 2.1.4 resolution: "cookiejar@npm:2.1.4" @@ -8479,7 +8865,7 @@ __metadata: languageName: node linkType: hard -"deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.1": +"deepmerge@npm:^4.2.2": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" checksum: 10c0/e53481aaf1aa2c4082b5342be6b6d8ad9dfe387bc92ce197a66dea08bd4265904a087e75e464f14d1347cf2ac8afe1e4c16b266e0561cc5df29382d3c5f80044 @@ -9807,6 +10193,45 @@ __metadata: languageName: node linkType: hard +"express@npm:^4.18.3": + version: 4.19.2 + resolution: "express@npm:4.19.2" + dependencies: + accepts: "npm:~1.3.8" + array-flatten: "npm:1.1.1" + body-parser: "npm:1.20.2" + content-disposition: "npm:0.5.4" + content-type: "npm:~1.0.4" + cookie: "npm:0.6.0" + cookie-signature: "npm:1.0.6" + debug: "npm:2.6.9" + depd: "npm:2.0.0" + encodeurl: "npm:~1.0.2" + escape-html: "npm:~1.0.3" + etag: "npm:~1.8.1" + finalhandler: "npm:1.2.0" + fresh: "npm:0.5.2" + http-errors: "npm:2.0.0" + merge-descriptors: "npm:1.0.1" + methods: "npm:~1.1.2" + on-finished: "npm:2.4.1" + parseurl: "npm:~1.3.3" + path-to-regexp: "npm:0.1.7" + proxy-addr: "npm:~2.0.7" + qs: "npm:6.11.0" + range-parser: "npm:~1.2.1" + safe-buffer: "npm:5.2.1" + send: "npm:0.18.0" + serve-static: "npm:1.15.0" + setprototypeof: "npm:1.2.0" + statuses: "npm:2.0.1" + type-is: "npm:~1.6.18" + utils-merge: "npm:1.0.1" + vary: "npm:~1.1.2" + checksum: 10c0/e82e2662ea9971c1407aea9fc3c16d6b963e55e3830cd0ef5e00b533feda8b770af4e3be630488ef8a752d7c75c4fcefb15892868eeaafe7353cb9e3e269fdcb + languageName: node + linkType: hard + "extend@npm:^3.0.0, extend@npm:^3.0.2, extend@npm:~3.0.2": version: 3.0.2 resolution: "extend@npm:3.0.2" @@ -10779,7 +11204,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.5, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.2.0, glob@npm:^7.2.3": +"glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.2.0, glob@npm:^7.2.3": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -13794,7 +14219,7 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.52.0, mime-db@npm:>= 1.43.0 < 2": +"mime-db@npm:1.52.0, mime-db@npm:>= 1.43.0 < 2, mime-db@npm:^1.52.0": version: 1.52.0 resolution: "mime-db@npm:1.52.0" checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa @@ -16510,7 +16935,7 @@ __metadata: ts-node: "npm:^10.9.2" tsc-alias: "npm:^1.8.8" tsconfig-paths: "npm:^4.2.0" - tsoa: "npm:^6.0.1" + tsoa: "npm:~6.2.0" typescript: "npm:^5.3.3" languageName: unknown linkType: soft @@ -17732,6 +18157,13 @@ __metadata: languageName: node linkType: hard +"ts-deepmerge@npm:^7.0.0": + version: 7.0.0 + resolution: "ts-deepmerge@npm:7.0.0" + checksum: 10c0/60a7a068b98d3de57e76897e2a8ea2dec0a74b10a9a3869e1bb512f2ff9f9769cb6b37713f3320a386bbca6140268ab77bae26d65b3e48231227e7643700bc82 + languageName: node + linkType: hard + "ts-interface-checker@npm:^0.1.9": version: 0.1.13 resolution: "ts-interface-checker@npm:0.1.13" @@ -17877,15 +18309,15 @@ __metadata: languageName: node linkType: hard -"tsoa@npm:^6.0.1": - version: 6.0.1 - resolution: "tsoa@npm:6.0.1" +"tsoa@npm:~6.2.0": + version: 6.2.0 + resolution: "tsoa@npm:6.2.0" dependencies: - "@tsoa/cli": "npm:^6.0.1" - "@tsoa/runtime": "npm:^6.0.0" + "@tsoa/cli": "npm:^6.2.0" + "@tsoa/runtime": "npm:^6.2.0" bin: tsoa: dist/cli.js - checksum: 10c0/13a10985fcb6c72c929fecfb172f49e5b05a888f7870367224ce0ff94bd745210875257c02f55c357beeab85433345f11077d4e77dbdc9e2b4b47c7a7a46f4ee + checksum: 10c0/7797810726c3273ade1ca47412ea498f71fe171352f2a34d05401702cc53a30aea2b5a0e204bef405412a0915a0e38f5ed3a3e408a35ff76debe836741d61d80 languageName: node linkType: hard @@ -19095,7 +19527,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.3.4": +"yaml@npm:^2.3.4, yaml@npm:^2.4.1": version: 2.4.1 resolution: "yaml@npm:2.4.1" bin: @@ -19104,19 +19536,6 @@ __metadata: languageName: node linkType: hard -"yamljs@npm:^0.3.0": - version: 0.3.0 - resolution: "yamljs@npm:0.3.0" - dependencies: - argparse: "npm:^1.0.7" - glob: "npm:^7.0.5" - bin: - json2yaml: ./bin/json2yaml - yaml2json: ./bin/yaml2json - checksum: 10c0/61bea60327c9326fc05ddc53983e0e28d019f191499e8e0bf631fa2cd233935bbce89199d852574bcc90f436a5c040e458e882aed5a143ba9e9d85621444bbc9 - languageName: node - linkType: hard - "yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1"