@tsed/common 6.114.15 → 6.114.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/jest.config.js +14 -0
  2. package/lib/cjs/builder/PlatformBuilder.js +54 -33
  3. package/lib/cjs/builder/PlatformBuilder.js.map +1 -1
  4. package/lib/cjs/builder/PlatformControllerBuilder.js +1 -1
  5. package/lib/cjs/builder/PlatformControllerBuilder.js.map +1 -1
  6. package/lib/cjs/domain/AnyToPromiseWithCtx.js +3 -1
  7. package/lib/cjs/domain/AnyToPromiseWithCtx.js.map +1 -1
  8. package/lib/cjs/domain/ControllerProvider.js +1 -0
  9. package/lib/cjs/domain/ControllerProvider.js.map +1 -1
  10. package/lib/cjs/domain/HandlerMetadata.js +10 -5
  11. package/lib/cjs/domain/HandlerMetadata.js.map +1 -1
  12. package/lib/cjs/domain/PlatformContext.js +20 -6
  13. package/lib/cjs/domain/PlatformContext.js.map +1 -1
  14. package/lib/cjs/domain/PlatformRouteDetails.js +2 -0
  15. package/lib/cjs/domain/PlatformRouteDetails.js.map +1 -1
  16. package/lib/cjs/middlewares/PlatformAcceptMimesMiddleware.js +2 -1
  17. package/lib/cjs/middlewares/PlatformAcceptMimesMiddleware.js.map +1 -1
  18. package/lib/cjs/middlewares/PlatformMulterMiddleware.js +2 -0
  19. package/lib/cjs/middlewares/PlatformMulterMiddleware.js.map +1 -1
  20. package/lib/cjs/services/FakeAdapter.js +1 -3
  21. package/lib/cjs/services/FakeAdapter.js.map +1 -1
  22. package/lib/cjs/services/Platform.js +4 -2
  23. package/lib/cjs/services/Platform.js.map +1 -1
  24. package/lib/cjs/services/PlatformAdapter.js +12 -0
  25. package/lib/cjs/services/PlatformAdapter.js.map +1 -1
  26. package/lib/cjs/services/PlatformApplication.js +2 -0
  27. package/lib/cjs/services/PlatformApplication.js.map +1 -1
  28. package/lib/cjs/services/PlatformHandler.js +5 -2
  29. package/lib/cjs/services/PlatformHandler.js.map +1 -1
  30. package/lib/cjs/services/PlatformMiddlewaresChain.js +2 -0
  31. package/lib/cjs/services/PlatformMiddlewaresChain.js.map +1 -1
  32. package/lib/cjs/services/PlatformRequest.js +6 -0
  33. package/lib/cjs/services/PlatformRequest.js.map +1 -1
  34. package/lib/cjs/services/PlatformResponse.js +7 -0
  35. package/lib/cjs/services/PlatformResponse.js.map +1 -1
  36. package/lib/cjs/services/PlatformRouter.js +7 -1
  37. package/lib/cjs/services/PlatformRouter.js.map +1 -1
  38. package/lib/cjs/services/PlatformTest.js +4 -5
  39. package/lib/cjs/services/PlatformTest.js.map +1 -1
  40. package/lib/cjs/utils/createContext.js +2 -3
  41. package/lib/cjs/utils/createContext.js.map +1 -1
  42. package/lib/cjs/utils/setResponseHeaders.js +7 -13
  43. package/lib/cjs/utils/setResponseHeaders.js.map +1 -1
  44. package/lib/esm/builder/PlatformBuilder.js +29 -31
  45. package/lib/esm/builder/PlatformBuilder.js.map +1 -1
  46. package/lib/esm/builder/PlatformControllerBuilder.js +1 -1
  47. package/lib/esm/builder/PlatformControllerBuilder.js.map +1 -1
  48. package/lib/esm/domain/AnyToPromiseWithCtx.js +3 -1
  49. package/lib/esm/domain/AnyToPromiseWithCtx.js.map +1 -1
  50. package/lib/esm/domain/ControllerProvider.js +1 -0
  51. package/lib/esm/domain/ControllerProvider.js.map +1 -1
  52. package/lib/esm/domain/HandlerMetadata.js +10 -5
  53. package/lib/esm/domain/HandlerMetadata.js.map +1 -1
  54. package/lib/esm/domain/PlatformContext.js +20 -6
  55. package/lib/esm/domain/PlatformContext.js.map +1 -1
  56. package/lib/esm/domain/PlatformRouteDetails.js +2 -0
  57. package/lib/esm/domain/PlatformRouteDetails.js.map +1 -1
  58. package/lib/esm/middlewares/PlatformAcceptMimesMiddleware.js +2 -1
  59. package/lib/esm/middlewares/PlatformAcceptMimesMiddleware.js.map +1 -1
  60. package/lib/esm/middlewares/PlatformMulterMiddleware.js +2 -0
  61. package/lib/esm/middlewares/PlatformMulterMiddleware.js.map +1 -1
  62. package/lib/esm/services/FakeAdapter.js +1 -3
  63. package/lib/esm/services/FakeAdapter.js.map +1 -1
  64. package/lib/esm/services/Platform.js +4 -2
  65. package/lib/esm/services/Platform.js.map +1 -1
  66. package/lib/esm/services/PlatformAdapter.js +12 -0
  67. package/lib/esm/services/PlatformAdapter.js.map +1 -1
  68. package/lib/esm/services/PlatformApplication.js +2 -0
  69. package/lib/esm/services/PlatformApplication.js.map +1 -1
  70. package/lib/esm/services/PlatformHandler.js +5 -2
  71. package/lib/esm/services/PlatformHandler.js.map +1 -1
  72. package/lib/esm/services/PlatformMiddlewaresChain.js +2 -0
  73. package/lib/esm/services/PlatformMiddlewaresChain.js.map +1 -1
  74. package/lib/esm/services/PlatformRequest.js +6 -0
  75. package/lib/esm/services/PlatformRequest.js.map +1 -1
  76. package/lib/esm/services/PlatformResponse.js +7 -0
  77. package/lib/esm/services/PlatformResponse.js.map +1 -1
  78. package/lib/esm/services/PlatformRouter.js +7 -1
  79. package/lib/esm/services/PlatformRouter.js.map +1 -1
  80. package/lib/esm/services/PlatformTest.js +4 -5
  81. package/lib/esm/services/PlatformTest.js.map +1 -1
  82. package/lib/esm/utils/createContext.js +2 -3
  83. package/lib/esm/utils/createContext.js.map +1 -1
  84. package/lib/esm/utils/setResponseHeaders.js +7 -13
  85. package/lib/esm/utils/setResponseHeaders.js.map +1 -1
  86. package/lib/types/utils/createHttpsServer.d.ts +1 -0
  87. package/lib/types/utils/listenServer.d.ts +2 -0
  88. package/package.json +22 -21
  89. package/lib/cjs/middlewares/__mock__/FakeCtrl.js +0 -12
  90. package/lib/cjs/middlewares/__mock__/FakeCtrl.js.map +0 -1
  91. package/lib/cjs/utils/__mock__/Test1.js +0 -8
  92. package/lib/cjs/utils/__mock__/Test1.js.map +0 -1
  93. package/lib/cjs/utils/__mock__/Test2.js +0 -8
  94. package/lib/cjs/utils/__mock__/Test2.js.map +0 -1
  95. package/lib/cjs/utils/__mock__/controllers/rest/TestCtrl.js +0 -12
  96. package/lib/cjs/utils/__mock__/controllers/rest/TestCtrl.js.map +0 -1
  97. package/lib/cjs/utils/__mock__/module1/Module1.js +0 -19
  98. package/lib/cjs/utils/__mock__/module1/Module1.js.map +0 -1
  99. package/lib/cjs/utils/__mock__/module1/controllers/M1Ctrl1.js +0 -17
  100. package/lib/cjs/utils/__mock__/module1/controllers/M1Ctrl1.js.map +0 -1
  101. package/lib/cjs/utils/__mock__/module1/services/M1Service.js +0 -17
  102. package/lib/cjs/utils/__mock__/module1/services/M1Service.js.map +0 -1
  103. package/lib/cjs/utils/__mock__/module1/submodule/SubModule.js +0 -15
  104. package/lib/cjs/utils/__mock__/module1/submodule/SubModule.js.map +0 -1
  105. package/lib/cjs/utils/__mock__/module1/submodule/SubService.js +0 -12
  106. package/lib/cjs/utils/__mock__/module1/submodule/SubService.js.map +0 -1
  107. package/lib/cjs/utils/__mock__/module2/Module2.js +0 -18
  108. package/lib/cjs/utils/__mock__/module2/Module2.js.map +0 -1
  109. package/lib/cjs/utils/__mock__/module2/controllers/M2Ctrl.js +0 -12
  110. package/lib/cjs/utils/__mock__/module2/controllers/M2Ctrl.js.map +0 -1
  111. package/lib/esm/middlewares/__mock__/FakeCtrl.js +0 -9
  112. package/lib/esm/middlewares/__mock__/FakeCtrl.js.map +0 -1
  113. package/lib/esm/utils/__mock__/Test1.js +0 -4
  114. package/lib/esm/utils/__mock__/Test1.js.map +0 -1
  115. package/lib/esm/utils/__mock__/Test2.js +0 -4
  116. package/lib/esm/utils/__mock__/Test2.js.map +0 -1
  117. package/lib/esm/utils/__mock__/controllers/rest/TestCtrl.js +0 -9
  118. package/lib/esm/utils/__mock__/controllers/rest/TestCtrl.js.map +0 -1
  119. package/lib/esm/utils/__mock__/module1/Module1.js +0 -16
  120. package/lib/esm/utils/__mock__/module1/Module1.js.map +0 -1
  121. package/lib/esm/utils/__mock__/module1/controllers/M1Ctrl1.js +0 -14
  122. package/lib/esm/utils/__mock__/module1/controllers/M1Ctrl1.js.map +0 -1
  123. package/lib/esm/utils/__mock__/module1/services/M1Service.js +0 -14
  124. package/lib/esm/utils/__mock__/module1/services/M1Service.js.map +0 -1
  125. package/lib/esm/utils/__mock__/module1/submodule/SubModule.js +0 -12
  126. package/lib/esm/utils/__mock__/module1/submodule/SubModule.js.map +0 -1
  127. package/lib/esm/utils/__mock__/module1/submodule/SubService.js +0 -9
  128. package/lib/esm/utils/__mock__/module1/submodule/SubService.js.map +0 -1
  129. package/lib/esm/utils/__mock__/module2/Module2.js +0 -15
  130. package/lib/esm/utils/__mock__/module2/Module2.js.map +0 -1
  131. package/lib/esm/utils/__mock__/module2/controllers/M2Ctrl.js +0 -9
  132. package/lib/esm/utils/__mock__/module2/controllers/M2Ctrl.js.map +0 -1
  133. package/lib/types/middlewares/__mock__/FakeCtrl.d.ts +0 -2
  134. package/lib/types/utils/__mock__/Test1.d.ts +0 -3
  135. package/lib/types/utils/__mock__/Test2.d.ts +0 -3
  136. package/lib/types/utils/__mock__/controllers/rest/TestCtrl.d.ts +0 -2
  137. package/lib/types/utils/__mock__/module1/Module1.d.ts +0 -2
  138. package/lib/types/utils/__mock__/module1/controllers/M1Ctrl1.d.ts +0 -5
  139. package/lib/types/utils/__mock__/module1/services/M1Service.d.ts +0 -5
  140. package/lib/types/utils/__mock__/module1/submodule/SubModule.d.ts +0 -2
  141. package/lib/types/utils/__mock__/module1/submodule/SubService.d.ts +0 -2
  142. package/lib/types/utils/__mock__/module2/Module2.d.ts +0 -2
  143. package/lib/types/utils/__mock__/module2/controllers/M2Ctrl.d.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"createContext.js","sourceRoot":"","sources":["../../../src/utils/createContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,EAAE,EAAC,MAAM,MAAM,CAAC;AAExB,MAAM,mBAAmB,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAE7F;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,QAAyB;;IACrD,MAAM,aAAa,GAAG,MAAA,QAAQ,CAAC,WAAW,CAAC,gBAAgB,CAAC,0CAAE,QAAQ,CAAC;IACvE,MAAM,YAAY,GAAG,MAAA,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,0CAAE,QAAQ,CAAC;IACrE,MAAM,EAAC,YAAY,GAAG,mBAAmB,EAAE,GAAG,aAAa,EAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;IAExF,OAAO,KAAK,EAAE,KAAoB,EAA4B,EAAE;QAC9D,MAAM,GAAG,GAAG,IAAI,eAAe,CAAC;YAC9B,KAAK;YACL,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC;YAC/B,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,GAAG,aAAa;YAChB,QAAQ;YACR,aAAa;YACb,YAAY;SACb,CAAC,CAAC;QAEH,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;YAC5B,MAAM,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;YACnC,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,MAAM,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;QAElC,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {InjectorService} from \"@tsed/di\";\nimport {PlatformContext} from \"../domain/PlatformContext\";\nimport {PlatformRequest} from \"../services/PlatformRequest\";\nimport {PlatformResponse} from \"../services/PlatformResponse\";\nimport {IncomingEvent} from \"../interfaces/IncomingEvent\";\nimport {v4} from \"uuid\";\n\nconst defaultReqIdBuilder = (req: any) => req.get(\"x-request-id\") || v4().replace(/-/gi, \"\");\n\n/**\n * Create the TsED context to wrap request, response, injector, etc...\n * @param injector\n * @ignore\n */\nexport function createContext(injector: InjectorService) {\n const ResponseKlass = injector.getProvider(PlatformResponse)?.useClass;\n const RequestKlass = injector.getProvider(PlatformRequest)?.useClass;\n const {reqIdBuilder = defaultReqIdBuilder, ...loggerOptions} = injector.settings.logger;\n\n return async (event: IncomingEvent): Promise<PlatformContext> => {\n const ctx = new PlatformContext({\n event,\n id: reqIdBuilder(event.request),\n logger: injector.logger,\n ...loggerOptions,\n injector,\n ResponseKlass,\n RequestKlass\n });\n\n ctx.response.onEnd(async () => {\n await ctx.emit(\"$onResponse\", ctx);\n await ctx.destroy();\n });\n\n await ctx.emit(\"$onRequest\", ctx);\n\n return ctx;\n };\n}\n"]}
1
+ {"version":3,"file":"createContext.js","sourceRoot":"","sources":["../../../src/utils/createContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,EAAE,EAAC,MAAM,MAAM,CAAC;AAExB,MAAM,mBAAmB,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAE7F;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,QAAyB;IACrD,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IACvE,MAAM,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAC;IACrE,MAAM,EAAC,YAAY,GAAG,mBAAmB,EAAE,GAAG,aAAa,EAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;IAExF,OAAO,KAAK,EAAE,KAAoB,EAA4B,EAAE;QAC9D,MAAM,GAAG,GAAG,IAAI,eAAe,CAAC;YAC9B,KAAK;YACL,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC;YAC/B,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,GAAG,aAAa;YAChB,QAAQ;YACR,aAAa;YACb,YAAY;SACb,CAAC,CAAC;QAEH,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;YAC5B,MAAM,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;YACnC,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,MAAM,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;QAElC,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {InjectorService} from \"@tsed/di\";\nimport {PlatformContext} from \"../domain/PlatformContext\";\nimport {PlatformRequest} from \"../services/PlatformRequest\";\nimport {PlatformResponse} from \"../services/PlatformResponse\";\nimport {IncomingEvent} from \"../interfaces/IncomingEvent\";\nimport {v4} from \"uuid\";\n\nconst defaultReqIdBuilder = (req: any) => req.get(\"x-request-id\") || v4().replace(/-/gi, \"\");\n\n/**\n * Create the TsED context to wrap request, response, injector, etc...\n * @param injector\n * @ignore\n */\nexport function createContext(injector: InjectorService) {\n const ResponseKlass = injector.getProvider(PlatformResponse)?.useClass;\n const RequestKlass = injector.getProvider(PlatformRequest)?.useClass;\n const {reqIdBuilder = defaultReqIdBuilder, ...loggerOptions} = injector.settings.logger;\n\n return async (event: IncomingEvent): Promise<PlatformContext> => {\n const ctx = new PlatformContext({\n event,\n id: reqIdBuilder(event.request),\n logger: injector.logger,\n ...loggerOptions,\n injector,\n ResponseKlass,\n RequestKlass\n });\n\n ctx.response.onEnd(async () => {\n await ctx.emit(\"$onResponse\", ctx);\n await ctx.destroy();\n });\n\n await ctx.emit(\"$onRequest\", ctx);\n\n return ctx;\n };\n}\n"]}
@@ -1,12 +1,3 @@
1
- function mergeHeaders(specHeaders, headers) {
2
- return Object.entries(specHeaders).reduce((headers, [key, item]) => {
3
- key = key.toLowerCase();
4
- return {
5
- ...headers,
6
- [key]: headers[key] === undefined ? String(item.example) : headers[key]
7
- };
8
- }, headers);
9
- }
10
1
  /**
11
2
  * @ignore
12
3
  */
@@ -21,11 +12,14 @@ export function setResponseHeaders(ctx) {
21
12
  response.status(operation.getStatus());
22
13
  }
23
14
  const statusCode = response.statusCode;
24
- const headers = operation.getHeadersOf(response.statusCode);
25
- const mergedHeaders = mergeHeaders(headers, response.getHeaders());
26
- response.setHeaders(mergedHeaders);
15
+ const headers = operation.getHeadersOf(statusCode);
16
+ Object.entries(headers).forEach(([key, item]) => {
17
+ if (!response.get(key)) {
18
+ response.setHeader(key, String(item.example));
19
+ }
20
+ });
27
21
  if (operation.isRedirection(statusCode)) {
28
- response.redirect(statusCode, String(mergedHeaders["location"]));
22
+ response.redirect(statusCode, response.get("location"));
29
23
  }
30
24
  }
31
25
  //# sourceMappingURL=setResponseHeaders.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setResponseHeaders.js","sourceRoot":"","sources":["../../../src/utils/setResponseHeaders.ts"],"names":[],"mappings":"AAIA,SAAS,YAAY,CAAC,WAA2D,EAAE,OAA4B;IAC7G,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE;QACjE,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;QACxB,OAAO;YACL,GAAG,OAAO;YACV,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;SACxE,CAAC;IACJ,CAAC,EAAE,OAAO,CAAC,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAoB;IACrD,MAAM,EAAC,QAAQ,EAAE,QAAQ,EAAC,GAAG,GAAG,CAAC;IACjC,MAAM,EAAC,SAAS,EAAC,GAAG,QAAQ,CAAC;IAE7B,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE;QACrB,OAAO;KACR;IAED,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE;QACzB,kDAAkD;QAClD,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;KACxC;IAED,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACvC,MAAM,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IAEnE,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEnC,IAAI,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE;QACvC,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KAClE;AACH,CAAC","sourcesContent":["import {JsonHeader} from \"@tsed/schema\";\nimport {OutgoingHttpHeaders} from \"http\";\nimport {PlatformContext} from \"../domain/PlatformContext\";\n\nfunction mergeHeaders(specHeaders: Record<string, JsonHeader & {example: string}>, headers: OutgoingHttpHeaders) {\n return Object.entries(specHeaders).reduce((headers, [key, item]) => {\n key = key.toLowerCase();\n return {\n ...headers,\n [key]: headers[key] === undefined ? String(item.example) : headers[key]\n };\n }, headers);\n}\n\n/**\n * @ignore\n */\nexport function setResponseHeaders(ctx: PlatformContext) {\n const {response, endpoint} = ctx;\n const {operation} = endpoint;\n\n if (response.isDone()) {\n return;\n }\n\n if (!response.hasStatus()) {\n // apply status only if the isn't already modified\n response.status(operation.getStatus());\n }\n\n const statusCode = response.statusCode;\n const headers = operation.getHeadersOf(response.statusCode);\n const mergedHeaders = mergeHeaders(headers, response.getHeaders());\n\n response.setHeaders(mergedHeaders);\n\n if (operation.isRedirection(statusCode)) {\n response.redirect(statusCode, String(mergedHeaders[\"location\"]));\n }\n}\n"]}
1
+ {"version":3,"file":"setResponseHeaders.js","sourceRoot":"","sources":["../../../src/utils/setResponseHeaders.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAoB;IACrD,MAAM,EAAC,QAAQ,EAAE,QAAQ,EAAC,GAAG,GAAG,CAAC;IACjC,MAAM,EAAC,SAAS,EAAC,GAAG,QAAQ,CAAC;IAE7B,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE;QACrB,OAAO;KACR;IAED,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE;QACzB,kDAAkD;QAClD,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;KACxC;IAED,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACvC,MAAM,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE;QAC9C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACtB,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;SAC/C;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE;QACvC,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;KACzD;AACH,CAAC","sourcesContent":["import {PlatformContext} from \"../domain/PlatformContext\";\n\n/**\n * @ignore\n */\nexport function setResponseHeaders(ctx: PlatformContext) {\n const {response, endpoint} = ctx;\n const {operation} = endpoint;\n\n if (response.isDone()) {\n return;\n }\n\n if (!response.hasStatus()) {\n // apply status only if the isn't already modified\n response.status(operation.getStatus());\n }\n\n const statusCode = response.statusCode;\n const headers = operation.getHeadersOf(statusCode);\n\n Object.entries(headers).forEach(([key, item]) => {\n if (!response.get(key)) {\n response.setHeader(key, String(item.example));\n }\n });\n\n if (operation.isRedirection(statusCode)) {\n response.redirect(statusCode, response.get(\"location\"));\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { InjectorService } from "@tsed/di";
3
4
  import Https from "https";
4
5
  import Http from "http";
@@ -1,4 +1,6 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
2
4
  import type Http from "http";
3
5
  import type Https from "https";
4
6
  import type Http2 from "http2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/common",
3
- "version": "6.114.15",
3
+ "version": "6.114.18",
4
4
  "description": "A TypeScript Framework on top of Express",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -17,7 +17,8 @@
17
17
  "build": "yarn barrels && yarn run build:esm && yarn run build:cjs",
18
18
  "build:cjs": "tsc --build tsconfig.compile.json",
19
19
  "build:esm": "tsc --build tsconfig.compile.esm.json",
20
- "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\" -e \"getConfiguration\""
20
+ "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\" -e \"getConfiguration\"",
21
+ "test": "cross-env NODE_ENV=test yarn jest --max-workers=2"
21
22
  },
22
23
  "keywords": [
23
24
  "Express",
@@ -61,31 +62,31 @@
61
62
  }
62
63
  ],
63
64
  "dependencies": {
64
- "@tsed/components-scan": "6.114.15",
65
- "@tsed/core": "6.114.15",
66
- "@tsed/di": "6.114.15",
67
- "@tsed/exceptions": "6.114.15",
68
- "@tsed/json-mapper": "6.114.15",
69
- "@tsed/logger": ">=6.1.1",
70
- "@tsed/logger-file": ">=6.1.0",
71
- "@tsed/perf": "6.114.15",
72
- "@tsed/platform-cache": "6.114.15",
73
- "@tsed/platform-exceptions": "6.114.15",
74
- "@tsed/platform-log-middleware": "6.114.15",
75
- "@tsed/platform-middlewares": "6.114.15",
76
- "@tsed/platform-params": "6.114.15",
77
- "@tsed/platform-response-filter": "6.114.15",
78
- "@tsed/platform-views": "6.114.15",
79
- "@tsed/schema": "6.114.15",
65
+ "@tsed/components-scan": "6.114.18",
66
+ "@tsed/core": "6.114.18",
67
+ "@tsed/di": "6.114.18",
68
+ "@tsed/exceptions": "6.114.18",
69
+ "@tsed/json-mapper": "6.114.18",
70
+ "@tsed/logger": ">=6.1.4",
71
+ "@tsed/logger-file": ">=6.1.4",
72
+ "@tsed/perf": "6.114.18",
73
+ "@tsed/platform-cache": "6.114.18",
74
+ "@tsed/platform-exceptions": "6.114.18",
75
+ "@tsed/platform-log-middleware": "6.114.18",
76
+ "@tsed/platform-middlewares": "6.114.18",
77
+ "@tsed/platform-params": "6.114.18",
78
+ "@tsed/platform-response-filter": "6.114.18",
79
+ "@tsed/platform-views": "6.114.18",
80
+ "@tsed/schema": "6.114.18",
80
81
  "@types/json-schema": "7.0.11",
81
82
  "@types/on-finished": "2.3.1",
82
83
  "on-finished": "2.4.1",
83
- "tslib": "2.3.1",
84
+ "tslib": "2.4.0",
84
85
  "uuid": "8.3.2"
85
86
  },
86
87
  "peerDependencies": {
87
- "@tsed/logger": ">=6.1.1",
88
- "@tsed/logger-file": ">=6.1.0"
88
+ "@tsed/logger": ">=6.1.4",
89
+ "@tsed/logger-file": ">=6.1.4"
89
90
  },
90
91
  "peerDependenciesMeta": {
91
92
  "@tsed/logger": {
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FakeCtrl = void 0;
4
- const tslib_1 = require("tslib");
5
- const di_1 = require("@tsed/di");
6
- let FakeCtrl = class FakeCtrl {
7
- };
8
- FakeCtrl = tslib_1.__decorate([
9
- (0, di_1.Controller)("/")
10
- ], FakeCtrl);
11
- exports.FakeCtrl = FakeCtrl;
12
- //# sourceMappingURL=FakeCtrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FakeCtrl.js","sourceRoot":"","sources":["../../../../src/middlewares/__mock__/FakeCtrl.ts"],"names":[],"mappings":";;;;AAAA,iCAAoC;AAGpC,IAAa,QAAQ,GAArB,MAAa,QAAQ;CAAG,CAAA;AAAX,QAAQ;IADpB,IAAA,eAAU,EAAC,GAAG,CAAC;GACH,QAAQ,CAAG;AAAX,4BAAQ","sourcesContent":["import {Controller} from \"@tsed/di\";\n\n@Controller(\"/\")\nexport class FakeCtrl {}\n"]}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Test1 = exports.value1 = void 0;
4
- exports.value1 = "value";
5
- class Test1 {
6
- }
7
- exports.Test1 = Test1;
8
- //# sourceMappingURL=Test1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Test1.js","sourceRoot":"","sources":["../../../../src/utils/__mock__/Test1.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG,OAAO,CAAC;AAE9B,MAAa,KAAK;CAAG;AAArB,sBAAqB","sourcesContent":["export const value1 = \"value\";\n\nexport class Test1 {}\n"]}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Test2 = exports.value2 = void 0;
4
- exports.value2 = "value";
5
- class Test2 {
6
- }
7
- exports.Test2 = Test2;
8
- //# sourceMappingURL=Test2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Test2.js","sourceRoot":"","sources":["../../../../src/utils/__mock__/Test2.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG,OAAO,CAAC;AAE9B,MAAa,KAAK;CAAG;AAArB,sBAAqB","sourcesContent":["export const value2 = \"value\";\n\nexport class Test2 {}\n"]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestCtrl = void 0;
4
- const tslib_1 = require("tslib");
5
- const di_1 = require("@tsed/di");
6
- let TestCtrl = class TestCtrl {
7
- };
8
- TestCtrl = tslib_1.__decorate([
9
- (0, di_1.Controller)("/root")
10
- ], TestCtrl);
11
- exports.TestCtrl = TestCtrl;
12
- //# sourceMappingURL=TestCtrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestCtrl.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/controllers/rest/TestCtrl.ts"],"names":[],"mappings":";;;;AAAA,iCAAoC;AAGpC,IAAa,QAAQ,GAArB,MAAa,QAAQ;CAAG,CAAA;AAAX,QAAQ;IADpB,IAAA,eAAU,EAAC,OAAO,CAAC;GACP,QAAQ,CAAG;AAAX,4BAAQ","sourcesContent":["import {Controller} from \"@tsed/di\";\n\n@Controller(\"/root\")\nexport class TestCtrl {}\n"]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Module1 = void 0;
4
- const tslib_1 = require("tslib");
5
- const SubModule_1 = require("./submodule/SubModule");
6
- const di_1 = require("@tsed/di");
7
- const M1Ctrl1_1 = require("./controllers/M1Ctrl1");
8
- let Module1 = class Module1 {
9
- };
10
- Module1 = tslib_1.__decorate([
11
- (0, di_1.Module)({
12
- mount: {
13
- "/m1": [M1Ctrl1_1.M1Ctrl1]
14
- },
15
- imports: [SubModule_1.SubModule]
16
- })
17
- ], Module1);
18
- exports.Module1 = Module1;
19
- //# sourceMappingURL=Module1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Module1.js","sourceRoot":"","sources":["../../../../../src/utils/__mock__/module1/Module1.ts"],"names":[],"mappings":";;;;AAAA,qDAAgD;AAChD,iCAAgC;AAChC,mDAA8C;AAQ9C,IAAa,OAAO,GAApB,MAAa,OAAO;CAAG,CAAA;AAAV,OAAO;IANnB,IAAA,WAAM,EAAC;QACN,KAAK,EAAE;YACL,KAAK,EAAE,CAAC,iBAAO,CAAC;SACjB;QACD,OAAO,EAAE,CAAC,qBAAS,CAAC;KACrB,CAAC;GACW,OAAO,CAAG;AAAV,0BAAO","sourcesContent":["import {SubModule} from \"./submodule/SubModule\";\nimport {Module} from \"@tsed/di\";\nimport {M1Ctrl1} from \"./controllers/M1Ctrl1\";\n\n@Module({\n mount: {\n \"/m1\": [M1Ctrl1]\n },\n imports: [SubModule]\n})\nexport class Module1 {}\n"]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.M1Ctrl1 = void 0;
4
- const tslib_1 = require("tslib");
5
- const di_1 = require("@tsed/di");
6
- const M1Service_1 = require("../services/M1Service");
7
- let M1Ctrl1 = class M1Ctrl1 {
8
- constructor(service) {
9
- this.service = service;
10
- }
11
- };
12
- M1Ctrl1 = tslib_1.__decorate([
13
- (0, di_1.Controller)("/m1"),
14
- tslib_1.__metadata("design:paramtypes", [M1Service_1.M1Service])
15
- ], M1Ctrl1);
16
- exports.M1Ctrl1 = M1Ctrl1;
17
- //# sourceMappingURL=M1Ctrl1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M1Ctrl1.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module1/controllers/M1Ctrl1.ts"],"names":[],"mappings":";;;;AAAA,iCAAoC;AACpC,qDAAgD;AAGhD,IAAa,OAAO,GAApB,MAAa,OAAO;IAClB,YAAmB,OAAkB;QAAlB,YAAO,GAAP,OAAO,CAAW;IAAG,CAAC;CAC1C,CAAA;AAFY,OAAO;IADnB,IAAA,eAAU,EAAC,KAAK,CAAC;6CAEY,qBAAS;GAD1B,OAAO,CAEnB;AAFY,0BAAO","sourcesContent":["import {Controller} from \"@tsed/di\";\nimport {M1Service} from \"../services/M1Service\";\n\n@Controller(\"/m1\")\nexport class M1Ctrl1 {\n constructor(public service: M1Service) {}\n}\n"]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.M1Service = void 0;
4
- const tslib_1 = require("tslib");
5
- const di_1 = require("@tsed/di");
6
- const SubService_1 = require("../submodule/SubService");
7
- let M1Service = class M1Service {
8
- constructor(subService) {
9
- this.subService = subService;
10
- }
11
- };
12
- M1Service = tslib_1.__decorate([
13
- (0, di_1.Injectable)(),
14
- tslib_1.__metadata("design:paramtypes", [SubService_1.SubService])
15
- ], M1Service);
16
- exports.M1Service = M1Service;
17
- //# sourceMappingURL=M1Service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M1Service.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module1/services/M1Service.ts"],"names":[],"mappings":";;;;AAAA,iCAAoC;AACpC,wDAAmD;AAGnD,IAAa,SAAS,GAAtB,MAAa,SAAS;IACpB,YAAmB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;CAC9C,CAAA;AAFY,SAAS;IADrB,IAAA,eAAU,GAAE;6CAEoB,uBAAU;GAD9B,SAAS,CAErB;AAFY,8BAAS","sourcesContent":["import {Injectable} from \"@tsed/di\";\nimport {SubService} from \"../submodule/SubService\";\n\n@Injectable()\nexport class M1Service {\n constructor(public subService: SubService) {}\n}\n"]}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubModule = void 0;
4
- const tslib_1 = require("tslib");
5
- const di_1 = require("@tsed/di");
6
- const SubService_1 = require("./SubService");
7
- let SubModule = class SubModule {
8
- };
9
- SubModule = tslib_1.__decorate([
10
- (0, di_1.Module)({
11
- imports: [SubService_1.SubService]
12
- })
13
- ], SubModule);
14
- exports.SubModule = SubModule;
15
- //# sourceMappingURL=SubModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubModule.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module1/submodule/SubModule.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAChC,6CAAwC;AAKxC,IAAa,SAAS,GAAtB,MAAa,SAAS;CAAG,CAAA;AAAZ,SAAS;IAHrB,IAAA,WAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG;AAAZ,8BAAS","sourcesContent":["import {Module} from \"@tsed/di\";\nimport {SubService} from \"./SubService\";\n\n@Module({\n imports: [SubService]\n})\nexport class SubModule {}\n"]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubService = void 0;
4
- const tslib_1 = require("tslib");
5
- const di_1 = require("@tsed/di");
6
- let SubService = class SubService {
7
- };
8
- SubService = tslib_1.__decorate([
9
- (0, di_1.Injectable)()
10
- ], SubService);
11
- exports.SubService = SubService;
12
- //# sourceMappingURL=SubService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubService.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module1/submodule/SubService.ts"],"names":[],"mappings":";;;;AAAA,iCAAoC;AAGpC,IAAa,UAAU,GAAvB,MAAa,UAAU;CAAG,CAAA;AAAb,UAAU;IADtB,IAAA,eAAU,GAAE;GACA,UAAU,CAAG;AAAb,gCAAU","sourcesContent":["import {Injectable} from \"@tsed/di\";\n\n@Injectable()\nexport class SubService {}\n"]}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Module2 = void 0;
4
- const tslib_1 = require("tslib");
5
- const di_1 = require("@tsed/di");
6
- const M2Ctrl_1 = require("./controllers/M2Ctrl");
7
- let Module2 = class Module2 {
8
- };
9
- Module2 = tslib_1.__decorate([
10
- (0, di_1.Module)({
11
- mount: {
12
- "/mod2": [M2Ctrl_1.M2Ctrl]
13
- },
14
- imports: []
15
- })
16
- ], Module2);
17
- exports.Module2 = Module2;
18
- //# sourceMappingURL=Module2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Module2.js","sourceRoot":"","sources":["../../../../../src/utils/__mock__/module2/Module2.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAChC,iDAA4C;AAQ5C,IAAa,OAAO,GAApB,MAAa,OAAO;CAAG,CAAA;AAAV,OAAO;IANnB,IAAA,WAAM,EAAC;QACN,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,eAAM,CAAC;SAClB;QACD,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,OAAO,CAAG;AAAV,0BAAO","sourcesContent":["import {Module} from \"@tsed/di\";\nimport {M2Ctrl} from \"./controllers/M2Ctrl\";\n\n@Module({\n mount: {\n \"/mod2\": [M2Ctrl]\n },\n imports: []\n})\nexport class Module2 {}\n"]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.M2Ctrl = void 0;
4
- const tslib_1 = require("tslib");
5
- const di_1 = require("@tsed/di");
6
- let M2Ctrl = class M2Ctrl {
7
- };
8
- M2Ctrl = tslib_1.__decorate([
9
- (0, di_1.Controller)("/m2")
10
- ], M2Ctrl);
11
- exports.M2Ctrl = M2Ctrl;
12
- //# sourceMappingURL=M2Ctrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M2Ctrl.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module2/controllers/M2Ctrl.ts"],"names":[],"mappings":";;;;AAAA,iCAAoC;AAGpC,IAAa,MAAM,GAAnB,MAAa,MAAM;CAAG,CAAA;AAAT,MAAM;IADlB,IAAA,eAAU,EAAC,KAAK,CAAC;GACL,MAAM,CAAG;AAAT,wBAAM","sourcesContent":["import {Controller} from \"@tsed/di\";\n\n@Controller(\"/m2\")\nexport class M2Ctrl {}\n"]}
@@ -1,9 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Controller } from "@tsed/di";
3
- let FakeCtrl = class FakeCtrl {
4
- };
5
- FakeCtrl = __decorate([
6
- Controller("/")
7
- ], FakeCtrl);
8
- export { FakeCtrl };
9
- //# sourceMappingURL=FakeCtrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FakeCtrl.js","sourceRoot":"","sources":["../../../../src/middlewares/__mock__/FakeCtrl.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,IAAa,QAAQ,GAArB,MAAa,QAAQ;CAAG,CAAA;AAAX,QAAQ;IADpB,UAAU,CAAC,GAAG,CAAC;GACH,QAAQ,CAAG;SAAX,QAAQ","sourcesContent":["import {Controller} from \"@tsed/di\";\n\n@Controller(\"/\")\nexport class FakeCtrl {}\n"]}
@@ -1,4 +0,0 @@
1
- export const value1 = "value";
2
- export class Test1 {
3
- }
4
- //# sourceMappingURL=Test1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Test1.js","sourceRoot":"","sources":["../../../../src/utils/__mock__/Test1.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B,MAAM,OAAO,KAAK;CAAG","sourcesContent":["export const value1 = \"value\";\n\nexport class Test1 {}\n"]}
@@ -1,4 +0,0 @@
1
- export const value2 = "value";
2
- export class Test2 {
3
- }
4
- //# sourceMappingURL=Test2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Test2.js","sourceRoot":"","sources":["../../../../src/utils/__mock__/Test2.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B,MAAM,OAAO,KAAK;CAAG","sourcesContent":["export const value2 = \"value\";\n\nexport class Test2 {}\n"]}
@@ -1,9 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Controller } from "@tsed/di";
3
- let TestCtrl = class TestCtrl {
4
- };
5
- TestCtrl = __decorate([
6
- Controller("/root")
7
- ], TestCtrl);
8
- export { TestCtrl };
9
- //# sourceMappingURL=TestCtrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestCtrl.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/controllers/rest/TestCtrl.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,IAAa,QAAQ,GAArB,MAAa,QAAQ;CAAG,CAAA;AAAX,QAAQ;IADpB,UAAU,CAAC,OAAO,CAAC;GACP,QAAQ,CAAG;SAAX,QAAQ","sourcesContent":["import {Controller} from \"@tsed/di\";\n\n@Controller(\"/root\")\nexport class TestCtrl {}\n"]}
@@ -1,16 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { SubModule } from "./submodule/SubModule.js";
3
- import { Module } from "@tsed/di";
4
- import { M1Ctrl1 } from "./controllers/M1Ctrl1.js";
5
- let Module1 = class Module1 {
6
- };
7
- Module1 = __decorate([
8
- Module({
9
- mount: {
10
- "/m1": [M1Ctrl1]
11
- },
12
- imports: [SubModule]
13
- })
14
- ], Module1);
15
- export { Module1 };
16
- //# sourceMappingURL=Module1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Module1.js","sourceRoot":"","sources":["../../../../../src/utils/__mock__/module1/Module1.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,OAAO,EAAC,MAAM,uBAAuB,CAAC;AAQ9C,IAAa,OAAO,GAApB,MAAa,OAAO;CAAG,CAAA;AAAV,OAAO;IANnB,MAAM,CAAC;QACN,KAAK,EAAE;YACL,KAAK,EAAE,CAAC,OAAO,CAAC;SACjB;QACD,OAAO,EAAE,CAAC,SAAS,CAAC;KACrB,CAAC;GACW,OAAO,CAAG;SAAV,OAAO","sourcesContent":["import {SubModule} from \"./submodule/SubModule\";\nimport {Module} from \"@tsed/di\";\nimport {M1Ctrl1} from \"./controllers/M1Ctrl1\";\n\n@Module({\n mount: {\n \"/m1\": [M1Ctrl1]\n },\n imports: [SubModule]\n})\nexport class Module1 {}\n"]}
@@ -1,14 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Controller } from "@tsed/di";
3
- import { M1Service } from "../services/M1Service.js";
4
- let M1Ctrl1 = class M1Ctrl1 {
5
- constructor(service) {
6
- this.service = service;
7
- }
8
- };
9
- M1Ctrl1 = __decorate([
10
- Controller("/m1"),
11
- __metadata("design:paramtypes", [M1Service])
12
- ], M1Ctrl1);
13
- export { M1Ctrl1 };
14
- //# sourceMappingURL=M1Ctrl1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M1Ctrl1.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module1/controllers/M1Ctrl1.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAGhD,IAAa,OAAO,GAApB,MAAa,OAAO;IAClB,YAAmB,OAAkB;QAAlB,YAAO,GAAP,OAAO,CAAW;IAAG,CAAC;CAC1C,CAAA;AAFY,OAAO;IADnB,UAAU,CAAC,KAAK,CAAC;qCAEY,SAAS;GAD1B,OAAO,CAEnB;SAFY,OAAO","sourcesContent":["import {Controller} from \"@tsed/di\";\nimport {M1Service} from \"../services/M1Service\";\n\n@Controller(\"/m1\")\nexport class M1Ctrl1 {\n constructor(public service: M1Service) {}\n}\n"]}
@@ -1,14 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Injectable } from "@tsed/di";
3
- import { SubService } from "../submodule/SubService.js";
4
- let M1Service = class M1Service {
5
- constructor(subService) {
6
- this.subService = subService;
7
- }
8
- };
9
- M1Service = __decorate([
10
- Injectable(),
11
- __metadata("design:paramtypes", [SubService])
12
- ], M1Service);
13
- export { M1Service };
14
- //# sourceMappingURL=M1Service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M1Service.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module1/services/M1Service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAC;AAGnD,IAAa,SAAS,GAAtB,MAAa,SAAS;IACpB,YAAmB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;CAC9C,CAAA;AAFY,SAAS;IADrB,UAAU,EAAE;qCAEoB,UAAU;GAD9B,SAAS,CAErB;SAFY,SAAS","sourcesContent":["import {Injectable} from \"@tsed/di\";\nimport {SubService} from \"../submodule/SubService\";\n\n@Injectable()\nexport class M1Service {\n constructor(public subService: SubService) {}\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Module } from "@tsed/di";
3
- import { SubService } from "./SubService.js";
4
- let SubModule = class SubModule {
5
- };
6
- SubModule = __decorate([
7
- Module({
8
- imports: [SubService]
9
- })
10
- ], SubModule);
11
- export { SubModule };
12
- //# sourceMappingURL=SubModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubModule.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module1/submodule/SubModule.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAKxC,IAAa,SAAS,GAAtB,MAAa,SAAS;CAAG,CAAA;AAAZ,SAAS;IAHrB,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,UAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG;SAAZ,SAAS","sourcesContent":["import {Module} from \"@tsed/di\";\nimport {SubService} from \"./SubService\";\n\n@Module({\n imports: [SubService]\n})\nexport class SubModule {}\n"]}
@@ -1,9 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Injectable } from "@tsed/di";
3
- let SubService = class SubService {
4
- };
5
- SubService = __decorate([
6
- Injectable()
7
- ], SubService);
8
- export { SubService };
9
- //# sourceMappingURL=SubService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubService.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module1/submodule/SubService.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,IAAa,UAAU,GAAvB,MAAa,UAAU;CAAG,CAAA;AAAb,UAAU;IADtB,UAAU,EAAE;GACA,UAAU,CAAG;SAAb,UAAU","sourcesContent":["import {Injectable} from \"@tsed/di\";\n\n@Injectable()\nexport class SubService {}\n"]}
@@ -1,15 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Module } from "@tsed/di";
3
- import { M2Ctrl } from "./controllers/M2Ctrl.js";
4
- let Module2 = class Module2 {
5
- };
6
- Module2 = __decorate([
7
- Module({
8
- mount: {
9
- "/mod2": [M2Ctrl]
10
- },
11
- imports: []
12
- })
13
- ], Module2);
14
- export { Module2 };
15
- //# sourceMappingURL=Module2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Module2.js","sourceRoot":"","sources":["../../../../../src/utils/__mock__/module2/Module2.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAQ5C,IAAa,OAAO,GAApB,MAAa,OAAO;CAAG,CAAA;AAAV,OAAO;IANnB,MAAM,CAAC;QACN,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,MAAM,CAAC;SAClB;QACD,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,OAAO,CAAG;SAAV,OAAO","sourcesContent":["import {Module} from \"@tsed/di\";\nimport {M2Ctrl} from \"./controllers/M2Ctrl\";\n\n@Module({\n mount: {\n \"/mod2\": [M2Ctrl]\n },\n imports: []\n})\nexport class Module2 {}\n"]}
@@ -1,9 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Controller } from "@tsed/di";
3
- let M2Ctrl = class M2Ctrl {
4
- };
5
- M2Ctrl = __decorate([
6
- Controller("/m2")
7
- ], M2Ctrl);
8
- export { M2Ctrl };
9
- //# sourceMappingURL=M2Ctrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M2Ctrl.js","sourceRoot":"","sources":["../../../../../../src/utils/__mock__/module2/controllers/M2Ctrl.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,IAAa,MAAM,GAAnB,MAAa,MAAM;CAAG,CAAA;AAAT,MAAM;IADlB,UAAU,CAAC,KAAK,CAAC;GACL,MAAM,CAAG;SAAT,MAAM","sourcesContent":["import {Controller} from \"@tsed/di\";\n\n@Controller(\"/m2\")\nexport class M2Ctrl {}\n"]}
@@ -1,2 +0,0 @@
1
- export declare class FakeCtrl {
2
- }
@@ -1,3 +0,0 @@
1
- export declare const value1 = "value";
2
- export declare class Test1 {
3
- }
@@ -1,3 +0,0 @@
1
- export declare const value2 = "value";
2
- export declare class Test2 {
3
- }
@@ -1,2 +0,0 @@
1
- export declare class TestCtrl {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class Module1 {
2
- }
@@ -1,5 +0,0 @@
1
- import { M1Service } from "../services/M1Service";
2
- export declare class M1Ctrl1 {
3
- service: M1Service;
4
- constructor(service: M1Service);
5
- }
@@ -1,5 +0,0 @@
1
- import { SubService } from "../submodule/SubService";
2
- export declare class M1Service {
3
- subService: SubService;
4
- constructor(subService: SubService);
5
- }
@@ -1,2 +0,0 @@
1
- export declare class SubModule {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class SubService {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class Module2 {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class M2Ctrl {
2
- }