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D,MAAM,EAAoB,EAAW,UAAU,GAC/C,GAAI,GAAqB,EAAkB,OAAS,GAAG,WAAW,eAC9D,MAAM,IAAI,aAAa,sBAAsB,EAAY,EAAU,KAAO,6BAE9E,GAAQ,EAAkB,IAC9B,CACA,MAAO,CACH,OACA,YAAa,cAAc,SAAS,GACpC,KAAM,EAAK,WACX,OAAQ,EAAO,IAAM,OAAa,EAE1C,EACA,mBAAA,CAAoB,GAChB,IAAI,EAAO,GACX,MAAM,EAAoB,EAAW,UAAU,GAC/C,GAAI,EAAkB,OAAS,GAAG,WAAW,cACzC,EAAO,EAAkB,UAExB,GAAI,EAAkB,OAAS,GAAG,WAAW,uBAAwB,CACtE,MAAM,EAAyB,EAC3B,EAAuB,SAAS,OAAM,GAAW,EAAQ,OAAS,GAAG,WAAW,kBAChF,EAAO,EAAuB,SAAS,KAAK,GAAY,EAAQ,OAAM,KAAK,MAEnF,CACA,IAAK,EACD,MAAM,IAAI,aAAa,sBAAsB,EAAY,sDAE7D,MAAO,CAAE,OACb,EACA,aAAA,CAAc,GACV,MAAM,IAAI,aAAa,sBAAsB,EAAY,yBAC7D,EACA,WAAW,GACO,EAAW,UAAU,GACtB,MAGrB,OAAO,QAAU","file":"/npm/tsoa-routing-controllers@0.1.2/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/tsoa-routing-controllers@0.1.2/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar ts = require(\"typescript\");\nvar exceptions_1 = require(\"tsoa/dist/metadataGeneration/exceptions\");\nvar statusCodes_1 = require(\"tsoa/dist/utils/statusCodes\");\nlet routingControllerDecoratorPlugin = {\n    exampleIdentifiers: [],\n    methodActionIdentifiers: ['Get', 'Post', 'Patch', 'Put', 'Delete', 'Head', 'Method'],\n    parameterIdentifiers: [\n        { name: 'Req', type: 'request' },\n        { name: 'Body', type: 'body' },\n        { name: 'BodyParam', type: 'body-prop' },\n        { name: 'HeaderParam', type: 'header' },\n        { name: 'QueryParam', type: 'query' },\n        { name: 'Param', type: 'path' },\n    ],\n    produceIdentifiers: ['ContentType'],\n    responseIdentifiers: ['HttpCode', 'OnNull', 'OnUndefined', 'Redirect'],\n    routeIdentifiers: ['Controller', 'JsonController'],\n    securityIdentifiers: ['Authorize'],\n    tagIdentifiers: [],\n    getExample(expression) {\n        throw new exceptions_1.GenerateMetadataError(expression, 'Example is not supported.');\n    },\n    getRoutePrefix(expression) {\n        const value = expression.arguments[0];\n        return value ? value.text.replace(/^\\//, '') : '';\n    },\n    getMethodAction(expression) {\n        const decorator = expression.expression;\n        let decoratorArgument = expression.arguments[0];\n        let method = decorator.text.toLowerCase();\n        if (decorator.text === 'Method') {\n            method = decoratorArgument.text.toLowerCase();\n            decoratorArgument = expression.arguments[1];\n        }\n        if (decoratorArgument && decoratorArgument.kind !== ts.SyntaxKind.StringLiteral) {\n            throw new exceptions_1.GenerateMetadataError(expression, decorator.text + ' argument must be string.');\n        }\n        return {\n            method,\n            path: decoratorArgument ? `${decoratorArgument.text.replace(/:(\\w+)\\b/g, '{$1}')}` : ''\n        };\n    },\n    getMethodResponse(expression, returnType) {\n        const decorator = expression.expression;\n        let code = 200;\n        if (decorator.text === 'Redirect') {\n            code = 302;\n        }\n        else {\n            const decoratorArgument = expression.arguments[0];\n            if (decoratorArgument && decoratorArgument.kind !== ts.SyntaxKind.NumericLiteral) {\n                throw new exceptions_1.GenerateMetadataError(expression, decorator.text + ' argument must be number.');\n            }\n            code = +decoratorArgument.text;\n        }\n        return {\n            code,\n            description: statusCodes_1.getPhase(code),\n            name: code.toString(),\n            schema: code < 300 ? returnType : undefined\n        };\n    },\n    getMethodSecurities(expression) {\n        let name = '';\n        const decoratorArgument = expression.arguments[0];\n        if (decoratorArgument.kind === ts.SyntaxKind.StringLiteral) {\n            name = decoratorArgument.text;\n        }\n        else if (decoratorArgument.kind === ts.SyntaxKind.ArrayLiteralExpression) {\n            const arrayLiteralExpression = decoratorArgument;\n            if (arrayLiteralExpression.elements.every(element => element.kind === ts.SyntaxKind.StringLiteral)) {\n                name = arrayLiteralExpression.elements.map((element) => element.text).join(', ');\n            }\n        }\n        if (!name) {\n            throw new exceptions_1.GenerateMetadataError(expression, 'Authorize argument must be string or string array.');\n        }\n        return { name };\n    },\n    getMethodTags(expression) {\n        throw new exceptions_1.GenerateMetadataError(expression, 'Tags is not supported.');\n    },\n    getProduce(expression) {\n        const value = expression.arguments[0];\n        return value.text;\n    }\n};\nmodule.exports = routingControllerDecoratorPlugin;\n"]}