@tsed/cli 5.4.3 → 6.0.0-alpha.10

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 (233) hide show
  1. package/lib/esm/Cli.js +5 -19
  2. package/lib/esm/bin/tsed.js +15 -2
  3. package/lib/esm/commands/add/AddCmd.js +1 -5
  4. package/lib/esm/commands/generate/GenerateCmd.js +8 -15
  5. package/lib/esm/commands/generate/ProviderTypes.js +0 -1
  6. package/lib/esm/commands/index.js +3 -4
  7. package/lib/esm/commands/init/InitCmd.js +25 -32
  8. package/lib/esm/commands/init/config/FeaturesPrompt.js +6 -18
  9. package/lib/esm/commands/init/config/InitFileSchema.js +1 -2
  10. package/lib/esm/commands/init/interfaces/InitCmdContext.js +0 -1
  11. package/lib/esm/commands/init/interfaces/InitOptions.js +5 -2
  12. package/lib/esm/commands/init/interfaces/InitPromptAnswers.js +2 -2
  13. package/lib/esm/commands/init/mappers/mapToContext.js +0 -1
  14. package/lib/esm/commands/init/mappers/mapUniqFeatures.js +1 -1
  15. package/lib/esm/commands/init/prompts/getFeaturesPrompt.js +0 -1
  16. package/lib/esm/commands/init/utils/hasFeature.js +0 -1
  17. package/lib/esm/commands/init/utils/isPlatform.js +0 -1
  18. package/lib/esm/commands/run/RunCmd.js +5 -25
  19. package/lib/esm/commands/update/UpdateCmd.js +1 -7
  20. package/lib/esm/constants/index.js +3 -6
  21. package/lib/esm/index.js +8 -9
  22. package/lib/esm/interfaces/ArchitectureConvention.js +0 -1
  23. package/lib/esm/interfaces/PlatformType.js +0 -1
  24. package/lib/esm/interfaces/ProjectConvention.js +0 -1
  25. package/lib/esm/interfaces/index.js +2 -3
  26. package/lib/esm/loaders/alias.hook.js +9 -0
  27. package/lib/esm/pipes/ClassNamePipe.js +3 -6
  28. package/lib/esm/pipes/OutputFilePathPipe.js +1 -5
  29. package/lib/esm/pipes/RoutePipe.js +3 -4
  30. package/lib/esm/pipes/index.js +0 -1
  31. package/lib/esm/platforms/InitPlatformsModule.js +1 -3
  32. package/lib/esm/platforms/supports/InitBasePlatform.js +0 -1
  33. package/lib/esm/platforms/supports/InitExpressPlatform.js +3 -2
  34. package/lib/esm/platforms/supports/InitKoaPlatform.js +3 -2
  35. package/lib/esm/runtimes/RuntimesModule.js +5 -9
  36. package/lib/esm/runtimes/index.js +0 -2
  37. package/lib/esm/runtimes/supports/BabelRuntime.js +14 -5
  38. package/lib/esm/runtimes/supports/BaseRuntime.js +7 -5
  39. package/lib/esm/runtimes/supports/BunRuntime.js +12 -5
  40. package/lib/esm/runtimes/supports/NodeRuntime.js +28 -15
  41. package/lib/esm/runtimes/supports/WebpackRuntime.js +10 -4
  42. package/lib/esm/services/ProvidersInfoService.js +4 -3
  43. package/lib/esm/utils/fillImports.js +7 -8
  44. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  45. package/lib/types/Cli.d.ts +3 -4
  46. package/lib/types/commands/add/AddCmd.d.ts +1 -1
  47. package/lib/types/commands/generate/GenerateCmd.d.ts +7 -6
  48. package/lib/types/commands/index.d.ts +6 -6
  49. package/lib/types/commands/init/InitCmd.d.ts +6 -6
  50. package/lib/types/commands/init/config/FeaturesPrompt.d.ts +1 -2
  51. package/lib/types/commands/init/config/InitFileSchema.d.ts +2 -2
  52. package/lib/types/commands/init/interfaces/InitCmdContext.d.ts +2 -2
  53. package/lib/types/commands/init/interfaces/InitOptions.d.ts +4 -4
  54. package/lib/types/commands/init/interfaces/InitPromptAnswers.d.ts +1 -1
  55. package/lib/types/commands/init/mappers/mapToContext.d.ts +1 -1
  56. package/lib/types/commands/init/mappers/mapUniqFeatures.d.ts +2 -2
  57. package/lib/types/commands/init/prompts/getFeaturesPrompt.d.ts +1 -1
  58. package/lib/types/commands/run/RunCmd.d.ts +1 -2
  59. package/lib/types/commands/update/UpdateCmd.d.ts +1 -1
  60. package/lib/types/constants/index.d.ts +1 -1
  61. package/lib/types/index.d.ts +15 -15
  62. package/lib/types/interfaces/index.d.ts +3 -3
  63. package/lib/types/loaders/alias.hook.d.ts +2 -0
  64. package/lib/types/pipes/ClassNamePipe.d.ts +2 -2
  65. package/lib/types/pipes/OutputFilePathPipe.d.ts +3 -3
  66. package/lib/types/pipes/index.d.ts +3 -3
  67. package/lib/types/platforms/InitPlatformsModule.d.ts +1 -1
  68. package/lib/types/platforms/supports/InitExpressPlatform.d.ts +1 -1
  69. package/lib/types/platforms/supports/InitKoaPlatform.d.ts +1 -1
  70. package/lib/types/runtimes/RuntimesModule.d.ts +1 -1
  71. package/lib/types/runtimes/index.d.ts +6 -7
  72. package/lib/types/runtimes/supports/BabelRuntime.d.ts +4 -1
  73. package/lib/types/runtimes/supports/BaseRuntime.d.ts +1 -0
  74. package/lib/types/runtimes/supports/BunRuntime.d.ts +2 -1
  75. package/lib/types/runtimes/supports/NodeRuntime.d.ts +6 -4
  76. package/lib/types/runtimes/supports/WebpackRuntime.d.ts +3 -1
  77. package/package.json +52 -49
  78. package/templates/init/{.barrelsby.json.hbs → .barrels.json.hbs} +3 -3
  79. package/templates/init/.dockerignore.hbs +1 -0
  80. package/templates/init/.swcrc.hbs +1 -1
  81. package/templates/init/README.md.hbs +6 -6
  82. package/templates/init/docker/bun/Dockerfile.hbs +2 -2
  83. package/templates/init/docker/npm/Dockerfile.hbs +5 -5
  84. package/templates/init/docker/pnpm/Dockerfile.hbs +5 -5
  85. package/templates/init/docker/yarn/Dockerfile.hbs +5 -5
  86. package/templates/init/docker/yarn_berry/Dockerfile.hbs +5 -5
  87. package/templates/init/nodemon.json.hbs +9 -0
  88. package/templates/init/pm2/bun/processes.config.cjs.hbs +23 -0
  89. package/templates/init/{processes.config.js.hbs → pm2/node-compiled/processes.config.cjs.hbs} +3 -4
  90. package/templates/init/pm2/node-loader/processes.config.cjs.hbs +24 -0
  91. package/templates/init/src/bin/index.ts.hbs +2 -2
  92. package/templates/init/src/config/index.ts.hbs +4 -4
  93. package/templates/init/src/index.ts.hbs +1 -1
  94. package/templates/init/tsconfig.base.json.hbs +29 -0
  95. package/templates/init/tsconfig.json.hbs +11 -35
  96. package/templates/init/tsconfig.node.json.hbs +20 -0
  97. package/templates/init/tsconfig.spec.json.hbs +24 -0
  98. package/lib/cjs/Cli.js +0 -75
  99. package/lib/cjs/Cli.js.map +0 -1
  100. package/lib/cjs/bin/tsed.js +0 -9
  101. package/lib/cjs/bin/tsed.js.map +0 -1
  102. package/lib/cjs/commands/add/AddCmd.js +0 -68
  103. package/lib/cjs/commands/add/AddCmd.js.map +0 -1
  104. package/lib/cjs/commands/generate/GenerateCmd.js +0 -263
  105. package/lib/cjs/commands/generate/GenerateCmd.js.map +0 -1
  106. package/lib/cjs/commands/generate/ProviderTypes.js +0 -107
  107. package/lib/cjs/commands/generate/ProviderTypes.js.map +0 -1
  108. package/lib/cjs/commands/index.js +0 -9
  109. package/lib/cjs/commands/index.js.map +0 -1
  110. package/lib/cjs/commands/init/InitCmd.js +0 -439
  111. package/lib/cjs/commands/init/InitCmd.js.map +0 -1
  112. package/lib/cjs/commands/init/config/FeaturesPrompt.js +0 -398
  113. package/lib/cjs/commands/init/config/FeaturesPrompt.js.map +0 -1
  114. package/lib/cjs/commands/init/config/InitFileSchema.js +0 -53
  115. package/lib/cjs/commands/init/config/InitFileSchema.js.map +0 -1
  116. package/lib/cjs/commands/init/interfaces/InitCmdContext.js +0 -3
  117. package/lib/cjs/commands/init/interfaces/InitCmdContext.js.map +0 -1
  118. package/lib/cjs/commands/init/interfaces/InitOptions.js +0 -3
  119. package/lib/cjs/commands/init/interfaces/InitOptions.js.map +0 -1
  120. package/lib/cjs/commands/init/interfaces/InitPromptAnswers.js +0 -3
  121. package/lib/cjs/commands/init/interfaces/InitPromptAnswers.js.map +0 -1
  122. package/lib/cjs/commands/init/mappers/mapToContext.js +0 -16
  123. package/lib/cjs/commands/init/mappers/mapToContext.js.map +0 -1
  124. package/lib/cjs/commands/init/mappers/mapUniqFeatures.js +0 -18
  125. package/lib/cjs/commands/init/mappers/mapUniqFeatures.js.map +0 -1
  126. package/lib/cjs/commands/init/prompts/getFeaturesPrompt.js +0 -25
  127. package/lib/cjs/commands/init/prompts/getFeaturesPrompt.js.map +0 -1
  128. package/lib/cjs/commands/init/utils/hasFeature.js +0 -13
  129. package/lib/cjs/commands/init/utils/hasFeature.js.map +0 -1
  130. package/lib/cjs/commands/init/utils/isPlatform.js +0 -8
  131. package/lib/cjs/commands/init/utils/isPlatform.js.map +0 -1
  132. package/lib/cjs/commands/run/RunCmd.js +0 -71
  133. package/lib/cjs/commands/run/RunCmd.js.map +0 -1
  134. package/lib/cjs/commands/update/UpdateCmd.js +0 -128
  135. package/lib/cjs/commands/update/UpdateCmd.js.map +0 -1
  136. package/lib/cjs/constants/index.js +0 -16
  137. package/lib/cjs/constants/index.js.map +0 -1
  138. package/lib/cjs/index.js +0 -19
  139. package/lib/cjs/index.js.map +0 -1
  140. package/lib/cjs/interfaces/ArchitectureConvention.js +0 -9
  141. package/lib/cjs/interfaces/ArchitectureConvention.js.map +0 -1
  142. package/lib/cjs/interfaces/PlatformType.js +0 -9
  143. package/lib/cjs/interfaces/PlatformType.js.map +0 -1
  144. package/lib/cjs/interfaces/ProjectConvention.js +0 -9
  145. package/lib/cjs/interfaces/ProjectConvention.js.map +0 -1
  146. package/lib/cjs/interfaces/index.js +0 -7
  147. package/lib/cjs/interfaces/index.js.map +0 -1
  148. package/lib/cjs/package.json +0 -3
  149. package/lib/cjs/pipes/ClassNamePipe.js +0 -46
  150. package/lib/cjs/pipes/ClassNamePipe.js.map +0 -1
  151. package/lib/cjs/pipes/OutputFilePathPipe.js +0 -41
  152. package/lib/cjs/pipes/OutputFilePathPipe.js.map +0 -1
  153. package/lib/cjs/pipes/RoutePipe.js +0 -26
  154. package/lib/cjs/pipes/RoutePipe.js.map +0 -1
  155. package/lib/cjs/pipes/index.js +0 -7
  156. package/lib/cjs/pipes/index.js.map +0 -1
  157. package/lib/cjs/platforms/InitPlatformsModule.js +0 -26
  158. package/lib/cjs/platforms/InitPlatformsModule.js.map +0 -1
  159. package/lib/cjs/platforms/supports/InitBasePlatform.js +0 -3
  160. package/lib/cjs/platforms/supports/InitBasePlatform.js.map +0 -1
  161. package/lib/cjs/platforms/supports/InitExpressPlatform.js +0 -35
  162. package/lib/cjs/platforms/supports/InitExpressPlatform.js.map +0 -1
  163. package/lib/cjs/platforms/supports/InitKoaPlatform.js +0 -39
  164. package/lib/cjs/platforms/supports/InitKoaPlatform.js.map +0 -1
  165. package/lib/cjs/runtimes/RuntimesModule.js +0 -67
  166. package/lib/cjs/runtimes/RuntimesModule.js.map +0 -1
  167. package/lib/cjs/runtimes/index.js +0 -11
  168. package/lib/cjs/runtimes/index.js.map +0 -1
  169. package/lib/cjs/runtimes/supports/BabelRuntime.js +0 -41
  170. package/lib/cjs/runtimes/supports/BabelRuntime.js.map +0 -1
  171. package/lib/cjs/runtimes/supports/BaseRuntime.js +0 -45
  172. package/lib/cjs/runtimes/supports/BaseRuntime.js.map +0 -1
  173. package/lib/cjs/runtimes/supports/BunRuntime.js +0 -27
  174. package/lib/cjs/runtimes/supports/BunRuntime.js.map +0 -1
  175. package/lib/cjs/runtimes/supports/NodeRuntime.js +0 -33
  176. package/lib/cjs/runtimes/supports/NodeRuntime.js.map +0 -1
  177. package/lib/cjs/runtimes/supports/SWCRuntime.js +0 -35
  178. package/lib/cjs/runtimes/supports/SWCRuntime.js.map +0 -1
  179. package/lib/cjs/runtimes/supports/WebpackRuntime.js +0 -35
  180. package/lib/cjs/runtimes/supports/WebpackRuntime.js.map +0 -1
  181. package/lib/cjs/services/ProvidersInfoService.js +0 -48
  182. package/lib/cjs/services/ProvidersInfoService.js.map +0 -1
  183. package/lib/cjs/utils/fillImports.js +0 -40
  184. package/lib/cjs/utils/fillImports.js.map +0 -1
  185. package/lib/esm/Cli.js.map +0 -1
  186. package/lib/esm/bin/tsed.js.map +0 -1
  187. package/lib/esm/commands/add/AddCmd.js.map +0 -1
  188. package/lib/esm/commands/generate/GenerateCmd.js.map +0 -1
  189. package/lib/esm/commands/generate/ProviderTypes.js.map +0 -1
  190. package/lib/esm/commands/index.js.map +0 -1
  191. package/lib/esm/commands/init/InitCmd.js.map +0 -1
  192. package/lib/esm/commands/init/config/FeaturesPrompt.js.map +0 -1
  193. package/lib/esm/commands/init/config/InitFileSchema.js.map +0 -1
  194. package/lib/esm/commands/init/interfaces/InitCmdContext.js.map +0 -1
  195. package/lib/esm/commands/init/interfaces/InitOptions.js.map +0 -1
  196. package/lib/esm/commands/init/interfaces/InitPromptAnswers.js.map +0 -1
  197. package/lib/esm/commands/init/mappers/mapToContext.js.map +0 -1
  198. package/lib/esm/commands/init/mappers/mapUniqFeatures.js.map +0 -1
  199. package/lib/esm/commands/init/prompts/getFeaturesPrompt.js.map +0 -1
  200. package/lib/esm/commands/init/utils/hasFeature.js.map +0 -1
  201. package/lib/esm/commands/init/utils/isPlatform.js.map +0 -1
  202. package/lib/esm/commands/run/RunCmd.js.map +0 -1
  203. package/lib/esm/commands/update/UpdateCmd.js.map +0 -1
  204. package/lib/esm/constants/index.js.map +0 -1
  205. package/lib/esm/index.js.map +0 -1
  206. package/lib/esm/interfaces/ArchitectureConvention.js.map +0 -1
  207. package/lib/esm/interfaces/PlatformType.js.map +0 -1
  208. package/lib/esm/interfaces/ProjectConvention.js.map +0 -1
  209. package/lib/esm/interfaces/index.js.map +0 -1
  210. package/lib/esm/package.json +0 -3
  211. package/lib/esm/pipes/ClassNamePipe.js.map +0 -1
  212. package/lib/esm/pipes/OutputFilePathPipe.js.map +0 -1
  213. package/lib/esm/pipes/RoutePipe.js.map +0 -1
  214. package/lib/esm/pipes/index.js.map +0 -1
  215. package/lib/esm/platforms/InitPlatformsModule.js.map +0 -1
  216. package/lib/esm/platforms/supports/InitBasePlatform.js.map +0 -1
  217. package/lib/esm/platforms/supports/InitExpressPlatform.js.map +0 -1
  218. package/lib/esm/platforms/supports/InitKoaPlatform.js.map +0 -1
  219. package/lib/esm/runtimes/RuntimesModule.js.map +0 -1
  220. package/lib/esm/runtimes/index.js.map +0 -1
  221. package/lib/esm/runtimes/supports/BabelRuntime.js.map +0 -1
  222. package/lib/esm/runtimes/supports/BaseRuntime.js.map +0 -1
  223. package/lib/esm/runtimes/supports/BunRuntime.js.map +0 -1
  224. package/lib/esm/runtimes/supports/NodeRuntime.js.map +0 -1
  225. package/lib/esm/runtimes/supports/SWCRuntime.js +0 -32
  226. package/lib/esm/runtimes/supports/SWCRuntime.js.map +0 -1
  227. package/lib/esm/runtimes/supports/WebpackRuntime.js.map +0 -1
  228. package/lib/esm/services/ProvidersInfoService.js.map +0 -1
  229. package/lib/esm/utils/fillImports.js.map +0 -1
  230. package/lib/tsconfig.tsbuildinfo +0 -1
  231. package/lib/types/runtimes/supports/SWCRuntime.d.ts +0 -9
  232. package/templates/init/.node-dev.json.hbs +0 -5
  233. package/templates/init/tsconfig.compile.json.hbs +0 -15
@@ -1,16 +1,16 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { Injectable } from "@tsed/cli-core";
3
- import { paramCase } from "change-case";
3
+ import { kebabCase } from "change-case";
4
4
  let RoutePipe = class RoutePipe {
5
5
  transform(route) {
6
6
  const r = route
7
7
  .split("/")
8
8
  .reduce((paths, path) => {
9
- const word = paramCase(path);
9
+ const word = kebabCase(path);
10
10
  if (paths.includes(`${word}s`) || paths.includes(word)) {
11
11
  return paths;
12
12
  }
13
- return [...paths, paramCase(path)];
13
+ return [...paths, kebabCase(path)];
14
14
  }, [])
15
15
  .join("/");
16
16
  return `/${r}`.replace(/\/\//gi, "/");
@@ -20,4 +20,3 @@ RoutePipe = __decorate([
20
20
  Injectable()
21
21
  ], RoutePipe);
22
22
  export { RoutePipe };
23
- //# sourceMappingURL=RoutePipe.js.map
@@ -1,4 +1,3 @@
1
1
  export * from "./ClassNamePipe.js";
2
2
  export * from "./OutputFilePathPipe.js";
3
3
  export * from "./RoutePipe.js";
4
- //# sourceMappingURL=index.js.map
@@ -1,10 +1,9 @@
1
1
  import { __decorate, __metadata, __param } from "tslib";
2
+ import { Inject } from "@tsed/cli-core";
2
3
  import { Module } from "@tsed/di";
3
4
  import { InitExpressPlatform } from "./supports/InitExpressPlatform.js";
4
5
  import { InitKoaPlatform } from "./supports/InitKoaPlatform.js";
5
- import { Inject } from "@tsed/cli-core";
6
6
  let InitPlatformsModule = class InitPlatformsModule {
7
- platforms;
8
7
  constructor(platforms) {
9
8
  this.platforms = platforms;
10
9
  }
@@ -20,4 +19,3 @@ InitPlatformsModule = __decorate([
20
19
  __metadata("design:paramtypes", [Array])
21
20
  ], InitPlatformsModule);
22
21
  export { InitPlatformsModule };
23
- //# sourceMappingURL=InitPlatformsModule.js.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=InitBasePlatform.js.map
@@ -1,7 +1,9 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { Injectable } from "@tsed/cli-core";
3
3
  let InitExpressPlatform = class InitExpressPlatform {
4
- name = "express";
4
+ constructor() {
5
+ this.name = "express";
6
+ }
5
7
  dependencies(ctx) {
6
8
  return {
7
9
  "@tsed/platform-express": ctx.tsedVersion,
@@ -29,4 +31,3 @@ InitExpressPlatform = __decorate([
29
31
  })
30
32
  ], InitExpressPlatform);
31
33
  export { InitExpressPlatform };
32
- //# sourceMappingURL=InitExpressPlatform.js.map
@@ -1,7 +1,9 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { Injectable } from "@tsed/cli-core";
3
3
  let InitKoaPlatform = class InitKoaPlatform {
4
- name = "koa";
4
+ constructor() {
5
+ this.name = "koa";
6
+ }
5
7
  dependencies(ctx) {
6
8
  return {
7
9
  "@tsed/platform-koa": ctx.tsedVersion,
@@ -33,4 +35,3 @@ InitKoaPlatform = __decorate([
33
35
  })
34
36
  ], InitKoaPlatform);
35
37
  export { InitKoaPlatform };
36
- //# sourceMappingURL=InitKoaPlatform.js.map
@@ -1,15 +1,12 @@
1
1
  import { __decorate, __metadata, __param } from "tslib";
2
2
  import { PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
3
3
  import { Inject, Module } from "@tsed/di";
4
- import { NodeRuntime } from "./supports/NodeRuntime.js";
5
4
  import { BabelRuntime } from "./supports/BabelRuntime.js";
6
- import { WebpackRuntime } from "./supports/WebpackRuntime.js";
5
+ import { BaseRuntime } from "./supports/BaseRuntime.js";
7
6
  import { BunRuntime } from "./supports/BunRuntime.js";
8
- import { SWCRuntime } from "./supports/SWCRuntime.js";
7
+ import { NodeRuntime } from "./supports/NodeRuntime.js";
8
+ import { WebpackRuntime } from "./supports/WebpackRuntime.js";
9
9
  let RuntimesModule = class RuntimesModule {
10
- runtimes;
11
- projectPackageJson;
12
- packagesManager;
13
10
  constructor(runtimes) {
14
11
  this.runtimes = runtimes;
15
12
  this.runtimes = runtimes.filter((manager) => manager.has());
@@ -39,7 +36,7 @@ let RuntimesModule = class RuntimesModule {
39
36
  const runtime = this.get(ctx.runtime);
40
37
  return {
41
38
  build: `${runtime.run("barrels")} && ${runtime.compile("src/index.ts", "dist/index.js")}`,
42
- barrels: "barrelsby --config .barrelsby.json",
39
+ barrels: "barrels",
43
40
  start: `${runtime.run("barrels")} && ${runtime.startDev("src/index.ts")}`,
44
41
  "start:prod": `cross-env NODE_ENV=production ${runtime.startProd("dist/index.js")}`
45
42
  };
@@ -55,10 +52,9 @@ __decorate([
55
52
  ], RuntimesModule.prototype, "packagesManager", void 0);
56
53
  RuntimesModule = __decorate([
57
54
  Module({
58
- imports: [NodeRuntime, BabelRuntime, WebpackRuntime, SWCRuntime, BunRuntime]
55
+ imports: [NodeRuntime, BabelRuntime, WebpackRuntime, BunRuntime]
59
56
  }),
60
57
  __param(0, Inject("runtime")),
61
58
  __metadata("design:paramtypes", [Array])
62
59
  ], RuntimesModule);
63
60
  export { RuntimesModule };
64
- //# sourceMappingURL=RuntimesModule.js.map
@@ -3,6 +3,4 @@ export * from "./supports/BabelRuntime.js";
3
3
  export * from "./supports/BaseRuntime.js";
4
4
  export * from "./supports/BunRuntime.js";
5
5
  export * from "./supports/NodeRuntime.js";
6
- export * from "./supports/SWCRuntime.js";
7
6
  export * from "./supports/WebpackRuntime.js";
8
- //# sourceMappingURL=index.js.map
@@ -1,16 +1,25 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { Injectable } from "@tsed/di";
3
- import { NodeRuntime } from "./NodeRuntime.js";
4
3
  import { dirname } from "path";
4
+ import { NodeRuntime } from "./NodeRuntime.js";
5
5
  let BabelRuntime = class BabelRuntime extends NodeRuntime {
6
- name = "babel";
7
- order = 1;
6
+ constructor() {
7
+ super(...arguments);
8
+ this.name = "babel";
9
+ this.order = 1;
10
+ }
11
+ isCompiled() {
12
+ return false;
13
+ }
8
14
  files() {
9
15
  return ["/init/.babelrc.hbs"];
10
16
  }
11
17
  startDev(main) {
12
18
  return `babel-watch --extensions .ts ${main}`;
13
19
  }
20
+ startProd(args) {
21
+ return `${this.cmd} ${args}`;
22
+ }
14
23
  compile(src, out) {
15
24
  return `tsc && babel ${dirname(src)} --out-dir ${dirname(out)} --extensions ".ts,.tsx" --source-maps inline`;
16
25
  }
@@ -25,7 +34,8 @@ let BabelRuntime = class BabelRuntime extends NodeRuntime {
25
34
  "@babel/preset-typescript": "latest",
26
35
  "@babel/plugin-proposal-object-rest-spread": "latest",
27
36
  "babel-plugin-transform-typescript-metadata": "latest",
28
- "babel-watch": "latest"
37
+ "babel-watch": "latest",
38
+ typescript: "latest"
29
39
  };
30
40
  }
31
41
  };
@@ -35,4 +45,3 @@ BabelRuntime = __decorate([
35
45
  })
36
46
  ], BabelRuntime);
37
47
  export { BabelRuntime };
38
- //# sourceMappingURL=BabelRuntime.js.map
@@ -1,13 +1,16 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { Inject } from "@tsed/di";
3
2
  import { CliExeca, PackageManagersModule } from "@tsed/cli-core";
3
+ import { Inject } from "@tsed/di";
4
4
  export class BaseRuntime {
5
- order = 10;
6
- packageManagers;
7
- cliExeca;
5
+ constructor() {
6
+ this.order = 10;
7
+ }
8
8
  get packageManager() {
9
9
  return this.packageManagers.get();
10
10
  }
11
+ isCompiled() {
12
+ return true;
13
+ }
11
14
  files() {
12
15
  return [];
13
16
  }
@@ -38,4 +41,3 @@ __decorate([
38
41
  Inject(CliExeca),
39
42
  __metadata("design:type", CliExeca)
40
43
  ], BaseRuntime.prototype, "cliExeca", void 0);
41
- //# sourceMappingURL=BaseRuntime.js.map
@@ -1,10 +1,13 @@
1
1
  import { __decorate } from "tslib";
2
- import { BaseRuntime } from "./BaseRuntime.js";
3
2
  import { Injectable } from "@tsed/di";
3
+ import { BaseRuntime } from "./BaseRuntime.js";
4
4
  let BunRuntime = class BunRuntime extends BaseRuntime {
5
- name = "bun";
6
- cmd = "bun";
7
- order = 4;
5
+ constructor() {
6
+ super(...arguments);
7
+ this.name = "bun";
8
+ this.cmd = "bun";
9
+ this.order = 4;
10
+ }
8
11
  compile(src, out) {
9
12
  return `${this.cmd} build --target=bun ${src} --outfile=${out}`;
10
13
  }
@@ -14,6 +17,11 @@ let BunRuntime = class BunRuntime extends BaseRuntime {
14
17
  startProd(args) {
15
18
  return `${this.cmd} ${args}`;
16
19
  }
20
+ dependencies() {
21
+ return {
22
+ typescript: "latest"
23
+ };
24
+ }
17
25
  };
18
26
  BunRuntime = __decorate([
19
27
  Injectable({
@@ -21,4 +29,3 @@ BunRuntime = __decorate([
21
29
  })
22
30
  ], BunRuntime);
23
31
  export { BunRuntime };
24
- //# sourceMappingURL=BunRuntime.js.map
@@ -1,24 +1,38 @@
1
1
  import { __decorate } from "tslib";
2
- import { BaseRuntime } from "./BaseRuntime.js";
3
2
  import { Injectable } from "@tsed/di";
3
+ import { BaseRuntime } from "./BaseRuntime.js";
4
4
  let NodeRuntime = class NodeRuntime extends BaseRuntime {
5
- name = "node";
6
- cmd = "node";
7
- order = 0;
8
- devDependencies() {
9
- return {
10
- "ts-node": "latest",
11
- "ts-node-dev": "latest"
12
- };
5
+ constructor() {
6
+ super(...arguments);
7
+ this.name = "node";
8
+ this.cmd = "node";
9
+ this.order = 0;
13
10
  }
14
- compile(src, out) {
15
- return `tsc --project tsconfig.compile.json`;
11
+ files() {
12
+ return ["/init/.swcrc.hbs", "/init/nodemon.json.hbs"];
16
13
  }
17
14
  startDev(main) {
18
- return `tsnd --inspect --exit-child --cls --ignore-watch node_modules --respawn --transpile-only ${main}`;
15
+ return `nodemon ${main}`;
19
16
  }
20
- startProd(args) {
21
- return `${this.cmd} ${args}`;
17
+ startProd(main) {
18
+ return `${this.cmd} --import @swc-node/register/register-esm ${main.replace("dist", "src")}`;
19
+ }
20
+ compile(src, out) {
21
+ return `swc ${src.replace("/index.ts", "")} --out-dir ${out.replace("/index.js", "")} -s`;
22
+ }
23
+ dependencies() {
24
+ return {
25
+ "@swc/core": "latest",
26
+ "@swc/cli": "latest",
27
+ "@swc/helpers": "latest",
28
+ "@swc-node/register": "latest",
29
+ typescript: "latest"
30
+ };
31
+ }
32
+ devDependencies() {
33
+ return {
34
+ nodemon: "latest"
35
+ };
22
36
  }
23
37
  };
24
38
  NodeRuntime = __decorate([
@@ -27,4 +41,3 @@ NodeRuntime = __decorate([
27
41
  })
28
42
  ], NodeRuntime);
29
43
  export { NodeRuntime };
30
- //# sourceMappingURL=NodeRuntime.js.map
@@ -1,10 +1,16 @@
1
1
  import { __decorate } from "tslib";
2
- import { dirname } from "path";
3
2
  import { Injectable } from "@tsed/di";
3
+ import { dirname } from "path";
4
4
  import { BabelRuntime } from "./BabelRuntime.js";
5
5
  let WebpackRuntime = class WebpackRuntime extends BabelRuntime {
6
- name = "webpack";
7
- order = 2;
6
+ constructor() {
7
+ super(...arguments);
8
+ this.name = "webpack";
9
+ this.order = 2;
10
+ }
11
+ isCompiled() {
12
+ return true;
13
+ }
8
14
  files() {
9
15
  return [...super.files(), "/init/webpack.config.js.hbs"];
10
16
  }
@@ -17,6 +23,7 @@ let WebpackRuntime = class WebpackRuntime extends BabelRuntime {
17
23
  devDependencies() {
18
24
  return {
19
25
  ...super.devDependencies(),
26
+ typescript: "latest",
20
27
  "babel-loader": "latest",
21
28
  webpack: "latest",
22
29
  "webpack-cli": "latest"
@@ -29,4 +36,3 @@ WebpackRuntime = __decorate([
29
36
  })
30
37
  ], WebpackRuntime);
31
38
  export { WebpackRuntime };
32
- //# sourceMappingURL=WebpackRuntime.js.map
@@ -1,7 +1,9 @@
1
1
  import { __decorate } from "tslib";
2
- import { Injectable, nameOf } from "@tsed/cli-core";
2
+ import { Injectable, nameOf, Type } from "@tsed/cli-core";
3
3
  let ProvidersInfoService = class ProvidersInfoService {
4
- map = new Map();
4
+ constructor() {
5
+ this.map = new Map();
6
+ }
5
7
  /**
6
8
  *
7
9
  * @param providerInfo
@@ -42,4 +44,3 @@ ProvidersInfoService = __decorate([
42
44
  Injectable()
43
45
  ], ProvidersInfoService);
44
46
  export { ProvidersInfoService };
45
- //# sourceMappingURL=ProvidersInfoService.js.map
@@ -1,4 +1,4 @@
1
- import { ArchitectureConvention, PlatformType } from "../interfaces.js";
1
+ import { ArchitectureConvention, PlatformType } from "../interfaces/index.js";
2
2
  export function fillImports(ctx) {
3
3
  ctx = { ...ctx };
4
4
  Object.values(PlatformType).forEach((type) => {
@@ -21,16 +21,15 @@ export function fillImports(ctx) {
21
21
  ctx.oidc && { from: "@tsed/oidc-provider" },
22
22
  ctx.passportjs && { from: "@tsed/passport" },
23
23
  ctx.graphql && { from: "@tsed/typegraphql" },
24
- ctx.graphql && { from: "./datasources/index" },
25
- ctx.graphql && { from: "./resolvers/index" },
26
- { symbols: "{config}", from: "./config/index" },
27
- { symbols: "* as rest", from: isFeature ? "./rest/index" : "./controllers/rest/index" },
24
+ ctx.graphql && { from: "./datasources/index.js" },
25
+ ctx.graphql && { from: "./resolvers/index.js" },
26
+ { symbols: "{config}", from: "./config/index.js" },
27
+ { symbols: "* as rest", from: isFeature ? "./rest/index.js" : "./controllers/rest/index.js" },
28
28
  (ctx.swagger || ctx.oidc) && {
29
29
  symbols: "* as pages",
30
- from: isFeature ? "./pages/index" : "./controllers/pages/index"
30
+ from: isFeature ? "./pages/index.js" : "./controllers/pages/index.js"
31
31
  },
32
- ctx.oidc && { symbols: "{InteractionsController}", from: "./controllers/oidc/InteractionsController" }
32
+ ctx.oidc && { symbols: "{InteractionsController}", from: "./controllers/oidc/InteractionsController.js" }
33
33
  ].filter(Boolean);
34
34
  return ctx;
35
35
  }
36
- //# sourceMappingURL=fillImports.js.map