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AO,KAAK,IAAI,OAAO,EAAa,SACpC,EAAO,KAAK,GACZ,EAAO,KAAK,IAAI,OAAO,EAAa,SAEpC,EAAO,QAAQ,WACX,EAAQ,iBACR,EAAQ,IAAI,UAAU,YAAY,iBAGtC,QAD2B,EAAI,YAAY,cAAc,EAAM,EAAQ,KAAK,WAAY,IACjE,GACvB,EAAI,SAAS,kBAAiB,EAAI,oBAAoB,iBAAiB,IACvE,SAAS,UAAU,IAAI,cAAc,MAAO,GACxC,EAAQ,KAAK,WAAW,UACxB,SAAS,UAAU,IAAI,EAAQ,KAAK,WAAW,UAAW,GAG1D,SAAS,UAAU,IAAI,OAAQ,GAEnC,SAAS,UAAU,IAAI,mBAAmB,aAAc,IAAI,mBAAmB,aAAa,EAAQ,EAAQ,aAC5G,SAAS,UAAU,IAAI,cAAc,QAAS,GAC1C,EAAQ,MACR,EAAI,WAAW,SAAS,EAAQ,IAAK,SAGnC,EAAI,qBAAqB,SAAS,EAAQ,KAAM,EAAQ,EAAQ,6BAA8B,EAAM,QAC1G,MAAM,QAAqB,WAAW,KAAK,EAAS,EAAa,EAAQ,GASzE,OARA,OAAO,KAAK,EAAa,IAAK,EAAS,EAAa,EAAa,GAE7D,EAAQ,SAAS,yBACjB,EAAI,0BAA0B,kBAAkB,EAAQ,EAAQ,SAAU,EAAa,cAGrF,EAAI,qBAAqB,SAAS,EAAQ,KAAM,EAAQ,EAAQ,8BAA+B,EAAM,WAC3G,EAAO,QAAQ,WACR,CAAY","file":"/npm/@neo9/n9-node-routing@3.0.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@neo9/n9-node-routing@3.0.0/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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PrometheusClient = exports.N9NodeRouting = exports.ExtendConfigKeyFormat = exports.removeColors = exports.safeStringify = exports.N9Log = exports.getMetadataArgsStorage = exports.plainToInstance = exports.instanceToPlain = exports.Expose = exports.Exclude = exports.Transform = exports.Type = exports.useContainer = exports.getFromContainer = exports.Container = exports.Service = exports.Inject = void 0;\nrequire(\"reflect-metadata\");\nrequire(\"./utils/error-to-json\");\nconst Path = require(\"node:path\");\nconst n9_node_conf_1 = require(\"@neo9/n9-node-conf\");\nconst n9_node_log_1 = require(\"@neo9/n9-node-log\");\nconst AppRootDir = require(\"app-root-dir\");\nconst class_transformer_1 = require(\"class-transformer\");\nconst PrometheusClient = require(\"prom-client\");\nexports.PrometheusClient = PrometheusClient;\nconst typedi_1 = require(\"typedi\");\nconst ExpressApp = require(\"./express-app\");\nconst init_apm_1 = require(\"./init-apm\");\nconst init_conf_1 = require(\"./init-conf\");\nconst initialise_modules_1 = require(\"./initialise-modules\");\nconst N9NodeRouting = require(\"./models/routing\");\nconst options_1 = require(\"./options\");\nconst register_system_signals_1 = require(\"./register-system-signals\");\nconst requestid_1 = require(\"./requestid\");\nconst Routes = require(\"./routes\");\nconst routes_1 = require(\"./routes\");\nconst utils_1 = require(\"./utils\");\nconst http_client_base_1 = require(\"./utils/http-client-base\");\n/* istanbul ignore next */\nfunction handleThrow(err) {\n    throw err;\n}\n__exportStar(require(\"routing-controllers\"), exports);\nvar typedi_2 = require(\"typedi\");\nObject.defineProperty(exports, \"Inject\", { enumerable: true, get: function () { return typedi_2.Inject; } });\nObject.defineProperty(exports, \"Service\", { enumerable: true, get: function () { return typedi_2.Service; } });\nObject.defineProperty(exports, \"Container\", { enumerable: true, get: function () { return typedi_2.Container; } });\nvar class_validator_1 = require(\"class-validator\");\nObject.defineProperty(exports, \"getFromContainer\", { enumerable: true, get: function () { return class_validator_1.getFromContainer; } });\nObject.defineProperty(exports, \"useContainer\", { enumerable: true, get: function () { return class_validator_1.useContainer; } });\n__exportStar(require(\"class-validator\"), exports);\nvar class_transformer_2 = require(\"class-transformer\");\nObject.defineProperty(exports, \"Type\", { enumerable: true, get: function () { return class_transformer_2.Type; } });\nObject.defineProperty(exports, \"Transform\", { enumerable: true, get: function () { return class_transformer_2.Transform; } });\nObject.defineProperty(exports, \"Exclude\", { enumerable: true, get: function () { return class_transformer_2.Exclude; } });\nObject.defineProperty(exports, \"Expose\", { enumerable: true, get: function () { return class_transformer_2.Expose; } });\nObject.defineProperty(exports, \"instanceToPlain\", { enumerable: true, get: function () { return class_transformer_2.instanceToPlain; } });\nObject.defineProperty(exports, \"plainToInstance\", { enumerable: true, get: function () { return class_transformer_2.plainToInstance; } });\nvar routing_controllers_1 = require(\"routing-controllers\");\nObject.defineProperty(exports, \"getMetadataArgsStorage\", { enumerable: true, get: function () { return routing_controllers_1.getMetadataArgsStorage; } });\n__exportStar(require(\"routing-controllers-openapi\"), exports);\n__exportStar(require(\"@neo9/n9-node-utils\"), exports); // allow users to use n9-node-utils without importing it specifically\nvar n9_node_log_2 = require(\"@neo9/n9-node-log\");\nObject.defineProperty(exports, \"N9Log\", { enumerable: true, get: function () { return n9_node_log_2.N9Log; } });\nObject.defineProperty(exports, \"safeStringify\", { enumerable: true, get: function () { return n9_node_log_2.safeStringify; } });\nObject.defineProperty(exports, \"removeColors\", { enumerable: true, get: function () { return n9_node_log_2.removeColors; } });\n__exportStar(require(\"./decorators/acl.decorator\"), exports);\n__exportStar(require(\"./validators\"), exports);\n__exportStar(require(\"./transformer\"), exports);\n__exportStar(require(\"./models/routes.models\"), exports);\n__exportStar(require(\"./utils/http-client-base\"), exports);\n__exportStar(require(\"./utils/http-cargo-builder\"), exports);\n__exportStar(require(\"./utils/cargo\"), exports);\n__exportStar(require(\"./generate-documentation-json\"), exports);\nvar n9_node_conf_2 = require(\"@neo9/n9-node-conf\");\nObject.defineProperty(exports, \"ExtendConfigKeyFormat\", { enumerable: true, get: function () { return n9_node_conf_2.ExtendConfigKeyFormat; } });\nexports.N9NodeRouting = require(\"./models/routing\");\n// tslint:disable-next-line:cyclomatic-complexity\nexports.default = async (optionsParam = {}) => {\n    // Provides a stack trace for unhandled rejections instead of the default message string.\n    process.on('unhandledRejection', handleThrow);\n    // Options default\n    const environment = (0, utils_1.getEnvironment)();\n    // eslint-disable-next-line @typescript-eslint/no-var-requires,global-require,import/no-dynamic-require\n    const packageJson = require(Path.join(AppRootDir.get(), 'package.json'));\n    let conf = (0, n9_node_conf_1.default)((0, options_1.getLoadingConfOptions)(optionsParam));\n    const options = (0, options_1.mergeOptionsAndConf)(optionsParam, conf.n9NodeRoutingOptions);\n    (0, options_1.applyDefaultValuesOnOptions)(options, environment, packageJson.name);\n    const logger = options.log;\n    // print app infos\n    const initialInfos = `${conf.name} version : ${conf.version} env: ${conf.env} node: ${process.version}`;\n    logger.info('-'.repeat(initialInfos.length));\n    logger.info(initialInfos);\n    logger.info('-'.repeat(initialInfos.length));\n    // Profile startup boot time\n    logger.profile('startup');\n    if (options.enableRequestId) {\n        options.log.addFilter(requestid_1.requestIdFilter);\n    }\n    const confInstance = await (0, init_conf_1.validateConf)(conf, options.conf.validation, logger);\n    conf = confInstance || conf;\n    (0, routes_1.initExposedConf)((0, class_transformer_1.instanceToPlain)(conf));\n    typedi_1.Container.set(n9_node_log_1.N9Log, logger);\n    if (options.conf.validation.classType) {\n        typedi_1.Container.set(options.conf.validation.classType, conf);\n    }\n    else {\n        typedi_1.Container.set('conf', conf);\n    }\n    typedi_1.Container.set(http_client_base_1.N9HttpClient, new http_client_base_1.N9HttpClient(logger, options.httpClient));\n    typedi_1.Container.set(N9NodeRouting.Options, options);\n    if (options.apm) {\n        (0, init_apm_1.initAPM)(options.apm, logger);\n    }\n    // Execute all *.init.ts files in modules before app started listening on the HTTP Port\n    await (0, initialise_modules_1.default)(options.path, logger, options.firstSequentialInitFileNames, conf, 'init');\n    const returnObject = await ExpressApp.init(options, packageJson, logger, conf);\n    Routes.init(returnObject.app, options, packageJson, environment, logger);\n    // Manage SIGTERM & SIGINT\n    if (options.shutdown.enableGracefulShutdown) {\n        (0, register_system_signals_1.registerShutdown)(logger, options.shutdown, returnObject.server);\n    }\n    // Execute all *.started.ts files in modules after app started listening on the HTTP Port\n    await (0, initialise_modules_1.default)(options.path, logger, options.firstSequentialStartFileNames, conf, 'started');\n    logger.profile('startup');\n    return returnObject;\n};\n"]}