@tsed/cli 5.3.0 → 6.0.0-alpha.1

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 (200) hide show
  1. package/lib/esm/Cli.js +10 -11
  2. package/lib/esm/Cli.js.map +1 -1
  3. package/lib/esm/bin/tsed.js.map +1 -1
  4. package/lib/esm/commands/add/AddCmd.js +1 -4
  5. package/lib/esm/commands/add/AddCmd.js.map +1 -1
  6. package/lib/esm/commands/generate/GenerateCmd.js +4 -10
  7. package/lib/esm/commands/generate/GenerateCmd.js.map +1 -1
  8. package/lib/esm/commands/index.js +3 -3
  9. package/lib/esm/commands/index.js.map +1 -1
  10. package/lib/esm/commands/init/InitCmd.js +14 -27
  11. package/lib/esm/commands/init/InitCmd.js.map +1 -1
  12. package/lib/esm/commands/init/config/FeaturesPrompt.js +7 -18
  13. package/lib/esm/commands/init/config/FeaturesPrompt.js.map +1 -1
  14. package/lib/esm/commands/init/config/InitFileSchema.js +1 -1
  15. package/lib/esm/commands/init/config/InitFileSchema.js.map +1 -1
  16. package/lib/esm/commands/init/mappers/mapToContext.js.map +1 -1
  17. package/lib/esm/commands/init/prompts/getFeaturesPrompt.js.map +1 -1
  18. package/lib/esm/commands/run/RunCmd.js +5 -24
  19. package/lib/esm/commands/run/RunCmd.js.map +1 -1
  20. package/lib/esm/commands/update/UpdateCmd.js +1 -6
  21. package/lib/esm/commands/update/UpdateCmd.js.map +1 -1
  22. package/lib/esm/constants/index.js +2 -4
  23. package/lib/esm/constants/index.js.map +1 -1
  24. package/lib/esm/index.js +8 -8
  25. package/lib/esm/index.js.map +1 -1
  26. package/lib/esm/interfaces/ArchitectureConvention.js +1 -1
  27. package/lib/esm/interfaces/ArchitectureConvention.js.map +1 -1
  28. package/lib/esm/interfaces/PlatformType.js +1 -1
  29. package/lib/esm/interfaces/PlatformType.js.map +1 -1
  30. package/lib/esm/interfaces/ProjectConvention.js +1 -1
  31. package/lib/esm/interfaces/ProjectConvention.js.map +1 -1
  32. package/lib/esm/interfaces/index.js +2 -2
  33. package/lib/esm/interfaces/index.js.map +1 -1
  34. package/lib/esm/pipes/ClassNamePipe.js +1 -3
  35. package/lib/esm/pipes/ClassNamePipe.js.map +1 -1
  36. package/lib/esm/pipes/OutputFilePathPipe.js +1 -4
  37. package/lib/esm/pipes/OutputFilePathPipe.js.map +1 -1
  38. package/lib/esm/pipes/index.js.map +1 -1
  39. package/lib/esm/platforms/InitPlatformsModule.js +1 -2
  40. package/lib/esm/platforms/InitPlatformsModule.js.map +1 -1
  41. package/lib/esm/platforms/supports/InitExpressPlatform.js +3 -1
  42. package/lib/esm/platforms/supports/InitExpressPlatform.js.map +1 -1
  43. package/lib/esm/platforms/supports/InitKoaPlatform.js +3 -1
  44. package/lib/esm/platforms/supports/InitKoaPlatform.js.map +1 -1
  45. package/lib/esm/runtimes/RuntimesModule.js +4 -8
  46. package/lib/esm/runtimes/RuntimesModule.js.map +1 -1
  47. package/lib/esm/runtimes/index.js +0 -1
  48. package/lib/esm/runtimes/index.js.map +1 -1
  49. package/lib/esm/runtimes/supports/BabelRuntime.js +11 -4
  50. package/lib/esm/runtimes/supports/BabelRuntime.js.map +1 -1
  51. package/lib/esm/runtimes/supports/BaseRuntime.js +4 -4
  52. package/lib/esm/runtimes/supports/BaseRuntime.js.map +1 -1
  53. package/lib/esm/runtimes/supports/BunRuntime.js +12 -4
  54. package/lib/esm/runtimes/supports/BunRuntime.js.map +1 -1
  55. package/lib/esm/runtimes/supports/NodeRuntime.js +28 -14
  56. package/lib/esm/runtimes/supports/NodeRuntime.js.map +1 -1
  57. package/lib/esm/runtimes/supports/WebpackRuntime.js +7 -3
  58. package/lib/esm/runtimes/supports/WebpackRuntime.js.map +1 -1
  59. package/lib/esm/services/ProvidersInfoService.js +3 -1
  60. package/lib/esm/services/ProvidersInfoService.js.map +1 -1
  61. package/lib/esm/utils/fillImports.js +12 -12
  62. package/lib/esm/utils/fillImports.js.map +1 -1
  63. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  64. package/lib/types/Cli.d.ts +2 -2
  65. package/lib/types/commands/generate/GenerateCmd.d.ts +5 -5
  66. package/lib/types/commands/index.d.ts +6 -6
  67. package/lib/types/commands/init/InitCmd.d.ts +5 -5
  68. package/lib/types/commands/init/config/FeaturesPrompt.d.ts +1 -2
  69. package/lib/types/commands/init/config/InitFileSchema.d.ts +2 -2
  70. package/lib/types/commands/init/interfaces/InitCmdContext.d.ts +1 -1
  71. package/lib/types/commands/init/interfaces/InitOptions.d.ts +4 -4
  72. package/lib/types/commands/init/interfaces/InitPromptAnswers.d.ts +1 -1
  73. package/lib/types/commands/init/mappers/mapToContext.d.ts +1 -1
  74. package/lib/types/commands/init/mappers/mapUniqFeatures.d.ts +2 -2
  75. package/lib/types/commands/init/prompts/getFeaturesPrompt.d.ts +1 -1
  76. package/lib/types/commands/run/RunCmd.d.ts +0 -1
  77. package/lib/types/index.d.ts +15 -15
  78. package/lib/types/interfaces/index.d.ts +3 -3
  79. package/lib/types/pipes/ClassNamePipe.d.ts +2 -2
  80. package/lib/types/pipes/OutputFilePathPipe.d.ts +3 -3
  81. package/lib/types/pipes/index.d.ts +3 -3
  82. package/lib/types/platforms/InitPlatformsModule.d.ts +1 -1
  83. package/lib/types/platforms/supports/InitExpressPlatform.d.ts +1 -1
  84. package/lib/types/platforms/supports/InitKoaPlatform.d.ts +1 -1
  85. package/lib/types/runtimes/RuntimesModule.d.ts +1 -1
  86. package/lib/types/runtimes/index.d.ts +6 -7
  87. package/lib/types/runtimes/supports/BabelRuntime.d.ts +3 -1
  88. package/lib/types/runtimes/supports/BunRuntime.d.ts +2 -1
  89. package/lib/types/runtimes/supports/NodeRuntime.d.ts +6 -4
  90. package/lib/types/runtimes/supports/WebpackRuntime.d.ts +2 -1
  91. package/package.json +25 -22
  92. package/templates/init/{.barrelsby.json.hbs → .barrels.json.hbs} +3 -3
  93. package/templates/init/README.md.hbs +6 -6
  94. package/templates/init/docker/npm/Dockerfile.hbs +1 -1
  95. package/templates/init/docker/pnpm/Dockerfile.hbs +1 -1
  96. package/templates/init/docker/yarn/Dockerfile.hbs +1 -1
  97. package/templates/init/docker/yarn_berry/Dockerfile.hbs +1 -1
  98. package/templates/init/nodemon.json.hbs +9 -0
  99. package/templates/init/src/bin/index.ts.hbs +2 -2
  100. package/templates/init/src/config/index.ts.hbs +4 -4
  101. package/templates/init/src/index.ts.hbs +1 -1
  102. package/templates/init/tsconfig.base.json.hbs +29 -0
  103. package/templates/init/tsconfig.json.hbs +11 -35
  104. package/templates/init/tsconfig.node.json.hbs +20 -0
  105. package/templates/init/tsconfig.spec.json.hbs +24 -0
  106. package/lib/cjs/Cli.js +0 -75
  107. package/lib/cjs/Cli.js.map +0 -1
  108. package/lib/cjs/bin/tsed.js +0 -9
  109. package/lib/cjs/bin/tsed.js.map +0 -1
  110. package/lib/cjs/commands/add/AddCmd.js +0 -68
  111. package/lib/cjs/commands/add/AddCmd.js.map +0 -1
  112. package/lib/cjs/commands/generate/GenerateCmd.js +0 -263
  113. package/lib/cjs/commands/generate/GenerateCmd.js.map +0 -1
  114. package/lib/cjs/commands/generate/ProviderTypes.js +0 -107
  115. package/lib/cjs/commands/generate/ProviderTypes.js.map +0 -1
  116. package/lib/cjs/commands/index.js +0 -9
  117. package/lib/cjs/commands/index.js.map +0 -1
  118. package/lib/cjs/commands/init/InitCmd.js +0 -439
  119. package/lib/cjs/commands/init/InitCmd.js.map +0 -1
  120. package/lib/cjs/commands/init/config/FeaturesPrompt.js +0 -398
  121. package/lib/cjs/commands/init/config/FeaturesPrompt.js.map +0 -1
  122. package/lib/cjs/commands/init/config/InitFileSchema.js +0 -53
  123. package/lib/cjs/commands/init/config/InitFileSchema.js.map +0 -1
  124. package/lib/cjs/commands/init/interfaces/InitCmdContext.js +0 -3
  125. package/lib/cjs/commands/init/interfaces/InitCmdContext.js.map +0 -1
  126. package/lib/cjs/commands/init/interfaces/InitOptions.js +0 -3
  127. package/lib/cjs/commands/init/interfaces/InitOptions.js.map +0 -1
  128. package/lib/cjs/commands/init/interfaces/InitPromptAnswers.js +0 -3
  129. package/lib/cjs/commands/init/interfaces/InitPromptAnswers.js.map +0 -1
  130. package/lib/cjs/commands/init/mappers/mapToContext.js +0 -16
  131. package/lib/cjs/commands/init/mappers/mapToContext.js.map +0 -1
  132. package/lib/cjs/commands/init/mappers/mapUniqFeatures.js +0 -18
  133. package/lib/cjs/commands/init/mappers/mapUniqFeatures.js.map +0 -1
  134. package/lib/cjs/commands/init/prompts/getFeaturesPrompt.js +0 -25
  135. package/lib/cjs/commands/init/prompts/getFeaturesPrompt.js.map +0 -1
  136. package/lib/cjs/commands/init/utils/hasFeature.js +0 -13
  137. package/lib/cjs/commands/init/utils/hasFeature.js.map +0 -1
  138. package/lib/cjs/commands/init/utils/isPlatform.js +0 -8
  139. package/lib/cjs/commands/init/utils/isPlatform.js.map +0 -1
  140. package/lib/cjs/commands/run/RunCmd.js +0 -71
  141. package/lib/cjs/commands/run/RunCmd.js.map +0 -1
  142. package/lib/cjs/commands/update/UpdateCmd.js +0 -128
  143. package/lib/cjs/commands/update/UpdateCmd.js.map +0 -1
  144. package/lib/cjs/constants/index.js +0 -16
  145. package/lib/cjs/constants/index.js.map +0 -1
  146. package/lib/cjs/index.js +0 -19
  147. package/lib/cjs/index.js.map +0 -1
  148. package/lib/cjs/interfaces/ArchitectureConvention.js +0 -9
  149. package/lib/cjs/interfaces/ArchitectureConvention.js.map +0 -1
  150. package/lib/cjs/interfaces/PlatformType.js +0 -9
  151. package/lib/cjs/interfaces/PlatformType.js.map +0 -1
  152. package/lib/cjs/interfaces/ProjectConvention.js +0 -9
  153. package/lib/cjs/interfaces/ProjectConvention.js.map +0 -1
  154. package/lib/cjs/interfaces/index.js +0 -7
  155. package/lib/cjs/interfaces/index.js.map +0 -1
  156. package/lib/cjs/package.json +0 -3
  157. package/lib/cjs/pipes/ClassNamePipe.js +0 -46
  158. package/lib/cjs/pipes/ClassNamePipe.js.map +0 -1
  159. package/lib/cjs/pipes/OutputFilePathPipe.js +0 -41
  160. package/lib/cjs/pipes/OutputFilePathPipe.js.map +0 -1
  161. package/lib/cjs/pipes/RoutePipe.js +0 -26
  162. package/lib/cjs/pipes/RoutePipe.js.map +0 -1
  163. package/lib/cjs/pipes/index.js +0 -7
  164. package/lib/cjs/pipes/index.js.map +0 -1
  165. package/lib/cjs/platforms/InitPlatformsModule.js +0 -26
  166. package/lib/cjs/platforms/InitPlatformsModule.js.map +0 -1
  167. package/lib/cjs/platforms/supports/InitBasePlatform.js +0 -3
  168. package/lib/cjs/platforms/supports/InitBasePlatform.js.map +0 -1
  169. package/lib/cjs/platforms/supports/InitExpressPlatform.js +0 -35
  170. package/lib/cjs/platforms/supports/InitExpressPlatform.js.map +0 -1
  171. package/lib/cjs/platforms/supports/InitKoaPlatform.js +0 -39
  172. package/lib/cjs/platforms/supports/InitKoaPlatform.js.map +0 -1
  173. package/lib/cjs/runtimes/RuntimesModule.js +0 -67
  174. package/lib/cjs/runtimes/RuntimesModule.js.map +0 -1
  175. package/lib/cjs/runtimes/index.js +0 -11
  176. package/lib/cjs/runtimes/index.js.map +0 -1
  177. package/lib/cjs/runtimes/supports/BabelRuntime.js +0 -41
  178. package/lib/cjs/runtimes/supports/BabelRuntime.js.map +0 -1
  179. package/lib/cjs/runtimes/supports/BaseRuntime.js +0 -45
  180. package/lib/cjs/runtimes/supports/BaseRuntime.js.map +0 -1
  181. package/lib/cjs/runtimes/supports/BunRuntime.js +0 -27
  182. package/lib/cjs/runtimes/supports/BunRuntime.js.map +0 -1
  183. package/lib/cjs/runtimes/supports/NodeRuntime.js +0 -33
  184. package/lib/cjs/runtimes/supports/NodeRuntime.js.map +0 -1
  185. package/lib/cjs/runtimes/supports/SWCRuntime.js +0 -35
  186. package/lib/cjs/runtimes/supports/SWCRuntime.js.map +0 -1
  187. package/lib/cjs/runtimes/supports/WebpackRuntime.js +0 -35
  188. package/lib/cjs/runtimes/supports/WebpackRuntime.js.map +0 -1
  189. package/lib/cjs/services/ProvidersInfoService.js +0 -48
  190. package/lib/cjs/services/ProvidersInfoService.js.map +0 -1
  191. package/lib/cjs/utils/fillImports.js +0 -40
  192. package/lib/cjs/utils/fillImports.js.map +0 -1
  193. package/lib/esm/package.json +0 -3
  194. package/lib/esm/runtimes/supports/SWCRuntime.js +0 -32
  195. package/lib/esm/runtimes/supports/SWCRuntime.js.map +0 -1
  196. package/lib/tsconfig.tsbuildinfo +0 -1
  197. package/lib/types/runtimes/supports/SWCRuntime.d.ts +0 -9
  198. package/templates/init/.node-dev.json.hbs +0 -5
  199. package/templates/init/tsconfig.compile.json.hbs +0 -15
  200. /package/templates/init/{processes.config.js.hbs → processes.config.cjs.hbs} +0 -0
@@ -1,12 +1,12 @@
1
1
  import { CliCore } from "@tsed/cli-core";
2
- import { ArchitectureConvention, ProjectConvention } from "./interfaces";
2
+ import { ArchitectureConvention, ProjectConvention } from "./interfaces/index.js";
3
3
  export declare class Cli extends CliCore {
4
4
  static defaults: {
5
5
  name: string;
6
6
  pkg: import("read-pkg").NormalizedPackageJson;
7
7
  templateDir: string;
8
8
  plugins: boolean;
9
- commands: (typeof import(".").InitCmd | typeof import(".").GenerateCmd | typeof import(".").UpdateCmd | typeof import(".").AddCmd | typeof import("./commands/run/RunCmd").RunCmd)[];
9
+ commands: (typeof import("./index.js").AddCmd | typeof import("./index.js").GenerateCmd | typeof import("./index.js").InitCmd | typeof import("./commands/run/RunCmd.js").RunCmd | typeof import("./index.js").UpdateCmd)[];
10
10
  defaultProjectPreferences(): {
11
11
  convention: ProjectConvention;
12
12
  architecture: ArchitectureConvention;
@@ -1,9 +1,9 @@
1
1
  import { CliDefaultOptions, CommandProvider, ProjectPackageJson, SrcRendererService } from "@tsed/cli-core";
2
- import { ClassNamePipe } from "../../pipes/ClassNamePipe";
3
- import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe";
4
- import { RoutePipe } from "../../pipes/RoutePipe";
5
- import { ProvidersInfoService } from "../../services/ProvidersInfoService";
6
- import { ProjectConvention } from "../../interfaces/ProjectConvention";
2
+ import { ProjectConvention } from "../../interfaces/ProjectConvention.js";
3
+ import { ClassNamePipe } from "../../pipes/ClassNamePipe.js";
4
+ import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe.js";
5
+ import { RoutePipe } from "../../pipes/RoutePipe.js";
6
+ import { ProvidersInfoService } from "../../services/ProvidersInfoService.js";
7
7
  export interface GenerateCmdContext extends CliDefaultOptions {
8
8
  type: string;
9
9
  name: string;
@@ -1,7 +1,7 @@
1
- import { InitCmd } from "./init/InitCmd";
2
- import { GenerateCmd } from "./generate/GenerateCmd";
3
- import { UpdateCmd } from "./update/UpdateCmd";
4
- import { AddCmd } from "./add/AddCmd";
5
- import { RunCmd } from "./run/RunCmd";
6
- declare const _default: (typeof InitCmd | typeof GenerateCmd | typeof UpdateCmd | typeof AddCmd | typeof RunCmd)[];
1
+ import { AddCmd } from "./add/AddCmd.js";
2
+ import { GenerateCmd } from "./generate/GenerateCmd.js";
3
+ import { InitCmd } from "./init/InitCmd.js";
4
+ import { RunCmd } from "./run/RunCmd.js";
5
+ import { UpdateCmd } from "./update/UpdateCmd.js";
6
+ declare const _default: (typeof AddCmd | typeof GenerateCmd | typeof InitCmd | typeof RunCmd | typeof UpdateCmd)[];
7
7
  export default _default;
@@ -1,9 +1,9 @@
1
1
  import { CliExeca, CliFs, CliLoadFile, CliPackageJson, CliPlugins, CliService, CommandProvider, Configuration, PackageManagersModule, ProjectPackageJson, QuestionOptions, RootRendererService, Task } from "@tsed/cli-core";
2
- import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe";
3
- import { InitCmdContext } from "./interfaces/InitCmdContext";
4
- import { InitOptions } from "./interfaces/InitOptions";
5
- import { RuntimesModule } from "../../runtimes/RuntimesModule";
6
- import { InitPlatformsModule } from "../../platforms/InitPlatformsModule";
2
+ import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe.js";
3
+ import { InitPlatformsModule } from "../../platforms/InitPlatformsModule.js";
4
+ import { RuntimesModule } from "../../runtimes/RuntimesModule.js";
5
+ import { InitCmdContext } from "./interfaces/InitCmdContext.js";
6
+ import { InitOptions } from "./interfaces/InitOptions.js";
7
7
  export declare class InitCmd implements CommandProvider {
8
8
  protected configuration: Configuration;
9
9
  protected cliPlugins: CliPlugins;
@@ -1,4 +1,4 @@
1
- import { InitOptions } from "../interfaces/InitOptions";
1
+ import { InitOptions } from "../interfaces/InitOptions.js";
2
2
  export interface Feature {
3
3
  name: string;
4
4
  value?: any;
@@ -35,7 +35,6 @@ export declare enum FeatureType {
35
35
  TESTING = "testing",
36
36
  JEST = "jest",
37
37
  VITEST = "vitest",
38
- MOCHA = "mocha",
39
38
  LINTER = "linter",
40
39
  ESLINT = "eslint",
41
40
  LINT_STAGED = "lintstaged",
@@ -1,6 +1,6 @@
1
1
  import { PackageManager } from "@tsed/cli-core";
2
- import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces";
3
- import { FeatureType } from "./FeaturesPrompt";
2
+ import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces/index.js";
3
+ import { FeatureType } from "./FeaturesPrompt.js";
4
4
  export declare const InitFileSchema: {
5
5
  type: string;
6
6
  properties: {
@@ -1,5 +1,5 @@
1
1
  import { CliDefaultOptions } from "@tsed/cli-core";
2
- import { InitOptions } from "./InitOptions";
2
+ import { InitOptions } from "./InitOptions.js";
3
3
  export interface InitCmdContext extends InitOptions, CliDefaultOptions, Record<string, any> {
4
4
  root: string;
5
5
  srcDir: string;
@@ -1,8 +1,8 @@
1
1
  import { PackageManager } from "@tsed/cli-core";
2
- import { PlatformType } from "../../../interfaces/PlatformType";
3
- import { ArchitectureConvention } from "../../../interfaces/ArchitectureConvention";
4
- import { ProjectConvention } from "../../../interfaces/ProjectConvention";
5
- import { FeatureType } from "../config/FeaturesPrompt";
2
+ import { ArchitectureConvention } from "../../../interfaces/ArchitectureConvention.js";
3
+ import { PlatformType } from "../../../interfaces/PlatformType.js";
4
+ import { ProjectConvention } from "../../../interfaces/ProjectConvention.js";
5
+ import { FeatureType } from "../config/FeaturesPrompt.js";
6
6
  export interface InitOptions {
7
7
  root: string;
8
8
  projectName: string;
@@ -1,5 +1,5 @@
1
1
  import { PackageManager } from "@tsed/cli-core";
2
- import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces";
2
+ import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces/index.js";
3
3
  export interface InitPromptAnswers {
4
4
  projectName: string;
5
5
  platform: PlatformType;
@@ -1,2 +1,2 @@
1
- import { InitCmdContext } from "../interfaces/InitCmdContext";
1
+ import { InitCmdContext } from "../interfaces/InitCmdContext.js";
2
2
  export declare function mapToContext(options: any): InitCmdContext;
@@ -1,3 +1,3 @@
1
- import { InitPromptAnswers } from "../interfaces/InitPromptAnswers";
2
- import { InitOptions } from "../interfaces/InitOptions";
1
+ import { InitOptions } from "../interfaces/InitOptions.js";
2
+ import { InitPromptAnswers } from "../interfaces/InitPromptAnswers.js";
3
3
  export declare function mapUniqFeatures(answers: InitPromptAnswers & any): InitOptions;
@@ -1,2 +1,2 @@
1
- import { InitOptions } from "../interfaces/InitOptions";
1
+ import { InitOptions } from "../interfaces/InitOptions.js";
2
2
  export declare function getFeaturesPrompt(runtimes: string[], availablePackageManagers: string[], options: Partial<InitOptions>): any[];
@@ -9,5 +9,4 @@ export declare class RunCmd implements CommandProvider {
9
9
  projectPackageJson: ProjectPackageJson;
10
10
  runScript: CliRunScript;
11
11
  $exec(ctx: RunCmdContext): Promise<Tasks>;
12
- protected getCompilePath(): Promise<any>;
13
12
  }
@@ -1,15 +1,15 @@
1
- export * from "./commands/add/AddCmd";
2
- export * from "./commands/init/InitCmd";
3
- export * from "./commands/init/interfaces/InitCmdContext";
4
- export * from "./commands/init/interfaces/InitOptions";
5
- export * from "./commands/init/config/FeaturesPrompt";
6
- export * from "./commands/init/config/FeaturesPrompt";
7
- export * from "./commands/generate/GenerateCmd";
8
- export * from "./commands/update/UpdateCmd";
9
- export * from "./commands/init/prompts/getFeaturesPrompt";
10
- export * from "./runtimes/index";
11
- export * from "./interfaces";
12
- export * from "./services/ProvidersInfoService";
13
- export * from "./pipes";
14
- export * from "./constants";
15
- export * from "./Cli";
1
+ export * from "./Cli.js";
2
+ export * from "./commands/add/AddCmd.js";
3
+ export * from "./commands/generate/GenerateCmd.js";
4
+ export * from "./commands/init/config/FeaturesPrompt.js";
5
+ export * from "./commands/init/config/FeaturesPrompt.js";
6
+ export * from "./commands/init/InitCmd.js";
7
+ export * from "./commands/init/interfaces/InitCmdContext.js";
8
+ export * from "./commands/init/interfaces/InitOptions.js";
9
+ export * from "./commands/init/prompts/getFeaturesPrompt.js";
10
+ export * from "./commands/update/UpdateCmd.js";
11
+ export * from "./constants/index.js";
12
+ export * from "./interfaces/index.js";
13
+ export * from "./pipes/index.js";
14
+ export * from "./runtimes/index.js";
15
+ export * from "./services/ProvidersInfoService.js";
@@ -1,3 +1,3 @@
1
- export * from "./ProjectConvention";
2
- export * from "./PlatformType";
3
- export * from "./ArchitectureConvention";
1
+ export * from "./ArchitectureConvention.js";
2
+ export * from "./PlatformType.js";
3
+ export * from "./ProjectConvention.js";
@@ -1,6 +1,6 @@
1
1
  import { ProjectPackageJson } from "@tsed/cli-core";
2
- import { ProvidersInfoService } from "../services/ProvidersInfoService";
3
- import { ProjectConvention } from "../interfaces/ProjectConvention";
2
+ import { ProjectConvention } from "../interfaces/ProjectConvention.js";
3
+ import { ProvidersInfoService } from "../services/ProvidersInfoService.js";
4
4
  export declare class ClassNamePipe {
5
5
  providers: ProvidersInfoService;
6
6
  projectPackageJson: ProjectPackageJson;
@@ -1,7 +1,7 @@
1
1
  import { ProjectPackageJson } from "@tsed/cli-core";
2
- import { ProvidersInfoService } from "../services/ProvidersInfoService";
3
- import { ClassNamePipe } from "./ClassNamePipe";
4
- import { ProjectConvention } from "../interfaces";
2
+ import { ProjectConvention } from "../interfaces/index.js";
3
+ import { ProvidersInfoService } from "../services/ProvidersInfoService.js";
4
+ import { ClassNamePipe } from "./ClassNamePipe.js";
5
5
  export declare class OutputFilePathPipe {
6
6
  private classNamePipe;
7
7
  providers: ProvidersInfoService;
@@ -1,3 +1,3 @@
1
- export * from "./ClassNamePipe";
2
- export * from "./OutputFilePathPipe";
3
- export * from "./RoutePipe";
1
+ export * from "./ClassNamePipe.js";
2
+ export * from "./OutputFilePathPipe.js";
3
+ export * from "./RoutePipe.js";
@@ -1,4 +1,4 @@
1
- import { InitBasePlatform } from "./supports/InitBasePlatform";
1
+ import { InitBasePlatform } from "./supports/InitBasePlatform.js";
2
2
  export declare class InitPlatformsModule {
3
3
  private platforms;
4
4
  constructor(platforms: InitBasePlatform[]);
@@ -1,4 +1,4 @@
1
- import { InitBasePlatform } from "./InitBasePlatform";
1
+ import { InitBasePlatform } from "./InitBasePlatform.js";
2
2
  export declare class InitExpressPlatform implements InitBasePlatform {
3
3
  readonly name = "express";
4
4
  dependencies(ctx: any): {
@@ -1,4 +1,4 @@
1
- import { InitBasePlatform } from "./InitBasePlatform";
1
+ import { InitBasePlatform } from "./InitBasePlatform.js";
2
2
  export declare class InitKoaPlatform implements InitBasePlatform {
3
3
  readonly name = "koa";
4
4
  dependencies(ctx: any): {
@@ -1,5 +1,5 @@
1
1
  import { PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
2
- import { BaseRuntime } from "./supports/BaseRuntime";
2
+ import { BaseRuntime } from "./supports/BaseRuntime.js";
3
3
  export interface RuntimeInitOptions extends Record<string, unknown> {
4
4
  runtime?: string;
5
5
  }
@@ -1,7 +1,6 @@
1
- export * from "./RuntimesModule";
2
- export * from "./supports/BabelRuntime";
3
- export * from "./supports/BaseRuntime";
4
- export * from "./supports/BunRuntime";
5
- export * from "./supports/NodeRuntime";
6
- export * from "./supports/SWCRuntime";
7
- export * from "./supports/WebpackRuntime";
1
+ export * from "./RuntimesModule.js";
2
+ export * from "./supports/BabelRuntime.js";
3
+ export * from "./supports/BaseRuntime.js";
4
+ export * from "./supports/BunRuntime.js";
5
+ export * from "./supports/NodeRuntime.js";
6
+ export * from "./supports/WebpackRuntime.js";
@@ -1,9 +1,10 @@
1
- import { NodeRuntime } from "./NodeRuntime";
1
+ import { NodeRuntime } from "./NodeRuntime.js";
2
2
  export declare class BabelRuntime extends NodeRuntime {
3
3
  readonly name: string;
4
4
  readonly order: number;
5
5
  files(): string[];
6
6
  startDev(main: string): string;
7
+ startProd(args: string): string;
7
8
  compile(src: string, out: string): string;
8
9
  devDependencies(): {
9
10
  "@babel/cli": string;
@@ -16,5 +17,6 @@ export declare class BabelRuntime extends NodeRuntime {
16
17
  "@babel/plugin-proposal-object-rest-spread": string;
17
18
  "babel-plugin-transform-typescript-metadata": string;
18
19
  "babel-watch": string;
20
+ typescript: string;
19
21
  };
20
22
  }
@@ -1,4 +1,4 @@
1
- import { BaseRuntime } from "./BaseRuntime";
1
+ import { BaseRuntime } from "./BaseRuntime.js";
2
2
  export declare class BunRuntime extends BaseRuntime {
3
3
  readonly name = "bun";
4
4
  readonly cmd = "bun";
@@ -6,4 +6,5 @@ export declare class BunRuntime extends BaseRuntime {
6
6
  compile(src: string, out: string): string;
7
7
  startDev(main: string): string;
8
8
  startProd(args: string): string;
9
+ dependencies(): Record<string, any>;
9
10
  }
@@ -1,10 +1,12 @@
1
- import { BaseRuntime } from "./BaseRuntime";
1
+ import { BaseRuntime } from "./BaseRuntime.js";
2
2
  export declare class NodeRuntime extends BaseRuntime {
3
3
  readonly name: string;
4
4
  readonly cmd: string;
5
5
  readonly order: number;
6
- devDependencies(): Record<string, any>;
7
- compile(src: string, out: string): string;
6
+ files(): string[];
8
7
  startDev(main: string): string;
9
- startProd(args: string): string;
8
+ startProd(main: string): string;
9
+ compile(src: string, out: string): string;
10
+ dependencies(): Record<string, any>;
11
+ devDependencies(): Record<string, any>;
10
12
  }
@@ -1,4 +1,4 @@
1
- import { BabelRuntime } from "./BabelRuntime";
1
+ import { BabelRuntime } from "./BabelRuntime.js";
2
2
  export declare class WebpackRuntime extends BabelRuntime {
3
3
  readonly name = "webpack";
4
4
  readonly order: number;
@@ -6,6 +6,7 @@ export declare class WebpackRuntime extends BabelRuntime {
6
6
  compile(src: string, out: string): string;
7
7
  startProd(main: string): string;
8
8
  devDependencies(): {
9
+ typescript: string;
9
10
  "babel-loader": string;
10
11
  webpack: string;
11
12
  "webpack-cli": string;
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "@tsed/cli",
3
- "version": "5.3.0",
3
+ "description": "CLI to bootstrap your Ts.ED project",
4
+ "version": "6.0.0-alpha.1",
5
+ "type": "module",
6
+ "main": "./lib/esm/index.js",
4
7
  "source": "./src/index.ts",
5
- "main": "./lib/cjs/index.js",
6
8
  "module": "./lib/esm/index.js",
7
9
  "typings": "./lib/types/index.d.ts",
8
10
  "exports": {
9
- "types": "./lib/types/index.d.ts",
10
- "import": "./lib/esm/index.js",
11
- "require": "./lib/cjs/index.js",
12
- "default": "./lib/esm/index.js"
11
+ ".": {
12
+ "types": "./lib/types/index.d.ts",
13
+ "import": "./lib/esm/index.js",
14
+ "default": "./lib/esm/index.js"
15
+ }
13
16
  },
14
17
  "scripts": {
15
18
  "build": "yarn build:ts",
16
- "build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json && cp scripts/index.esm.js lib/esm/constants/index.js",
19
+ "build:ts": "tsc --build tsconfig.json",
17
20
  "start:help": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts -h",
18
21
  "start:help:g": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts generate -h",
19
22
  "start:help:i": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts init -h",
@@ -33,22 +36,18 @@
33
36
  "start:g:prisma": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts g service -r ./.tmp/init/awesome prisma",
34
37
  "start:generate:run": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts generate -r ./.tmp/init/awesome",
35
38
  "start:typeorm:run": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts typeorm entity:create -r ./.tmp/init/awesome --name User",
36
- "lint": "eslint '**/*.{ts,js}'",
37
- "lint:fix": "eslint '**/*.{ts,js}' --fix",
38
- "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --passWithNoTests && jest-coverage-thresholds-bumper"
39
+ "test": "vitest run -u",
40
+ "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
39
41
  },
40
42
  "bin": {
41
- "tsed": "lib/cjs/bin/tsed.js"
43
+ "tsed": "lib/esm/bin/tsed.js"
42
44
  },
43
45
  "files": [
44
- "lib/cjs/bin/tsed.js",
45
- "lib/cjs/bin",
46
46
  "lib/esm/bin/tsed.js",
47
47
  "lib/esm/bin",
48
48
  "lib",
49
49
  "templates"
50
50
  ],
51
- "description": "CLI to bootstrap your Ts.ED project",
52
51
  "keywords": [
53
52
  "Ts.ED",
54
53
  "cli",
@@ -63,7 +62,10 @@
63
62
  "node": ">=14"
64
63
  },
65
64
  "dependencies": {
66
- "@tsed/cli-core": "5.3.0",
65
+ "@swc-node/register": ">=1.10.9",
66
+ "@swc/core": ">=1.7.26",
67
+ "@swc/helpers": ">=0.5.13",
68
+ "@tsed/cli-core": "6.0.0-alpha.1",
67
69
  "@tsed/core": ">=7.14.2",
68
70
  "@tsed/di": ">=7.14.2",
69
71
  "@tsed/logger": ">=6.2.1",
@@ -79,16 +81,14 @@
79
81
  "tslib": "2.3.1"
80
82
  },
81
83
  "devDependencies": {
82
- "@tsed/eslint": "5.3.0",
83
- "@tsed/jest-config": "5.3.0",
84
- "@tsed/typescript": "5.3.0",
84
+ "@tsed/typescript": "6.0.0-alpha.1",
85
85
  "@types/change-case": "^2.3.1",
86
86
  "cross-env": "7.0.3",
87
- "eslint": "8.22.0",
88
- "jest": "29.5.0"
87
+ "typescript": "4.9.5",
88
+ "vitest": "2.1.1"
89
89
  },
90
90
  "peerDependencies": {
91
- "@tsed/cli-core": "5.3.0",
91
+ "@tsed/cli-core": "workspace:*",
92
92
  "@tsed/core": ">=7.14.2",
93
93
  "@tsed/di": ">=7.14.2",
94
94
  "@tsed/logger": ">=6.2.1",
@@ -101,5 +101,8 @@
101
101
  },
102
102
  "homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli",
103
103
  "author": "Romain Lenzotti",
104
- "license": "MIT"
104
+ "license": "MIT",
105
+ "publishConfig": {
106
+ "tag": "alpha"
107
+ }
105
108
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "directory": {{{barrels}}},
3
3
  "exclude": [
4
- "__mock__",
5
- "__mocks__",
6
- ".spec.ts"
4
+ "**/__mock__",
5
+ "**/__mocks__",
6
+ "**/*.spec.ts"
7
7
  ],
8
8
  "delete": true
9
9
  }
@@ -45,11 +45,11 @@ docker compose build
45
45
  docker compose up
46
46
  ```
47
47
 
48
- ## Barrelsby
48
+ ## Barrels
49
49
 
50
- This project uses [barrelsby](https://www.npmjs.com/package/barrelsby) to generate index files to import the controllers.
50
+ This project uses [barrels](https://www.npmjs.com/package/@tsed/barrels) to generate index files to import the controllers.
51
51
 
52
- Edit `.barreslby.json` to customize it:
52
+ Edit `.barrels.json` to customize it:
53
53
 
54
54
  ```json
55
55
  {
@@ -58,9 +58,9 @@ Edit `.barreslby.json` to customize it:
58
58
  "./src/controllers/pages"
59
59
  ],
60
60
  "exclude": [
61
- "__mock__",
62
- "__mocks__",
63
- ".spec.ts"
61
+ "**/__mock__",
62
+ "**/__mocks__",
63
+ "**/*.spec.ts"
64
64
  ],
65
65
  "delete": true
66
66
  }
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.10.0
5
5
  FROM node:${NODE_VERSION}-alpine as build
6
6
  WORKDIR /opt
7
7
 
8
- COPY package.json package-lock.json tsconfig.json tsconfig.compile.json .barrelsby.json ./
8
+ COPY package.json package-lock.json tsconfig.json tsconfig.compile.json .barrels.json ./
9
9
 
10
10
  RUN npm ci
11
11
 
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.10.0
5
5
  FROM node:${NODE_VERSION}-alpine as build
6
6
  WORKDIR /opt
7
7
 
8
- COPY package.json pnpm-lock.yaml tsconfig.json tsconfig.compile.json .barrelsby.json ./
8
+ COPY package.json pnpm-lock.yaml tsconfig.json tsconfig.compile.json .barrels.json ./
9
9
 
10
10
  RUN pnpm install --frozen-lockfile
11
11
 
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.10.0
5
5
  FROM node:${NODE_VERSION}-alpine as build
6
6
  WORKDIR /opt
7
7
 
8
- COPY package.json yarn.lock tsconfig.json tsconfig.compile.json .barrelsby.json ./
8
+ COPY package.json yarn.lock tsconfig.json tsconfig.compile.json .barrels.json ./
9
9
 
10
10
  RUN yarn install --pure-lockfile
11
11
 
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.10.0
5
5
  FROM node:${NODE_VERSION}-alpine as build
6
6
  WORKDIR /opt
7
7
 
8
- COPY package.json yarn.lock yarn.lock tsconfig.json tsconfig.compile.json .barrelsby.json ./
8
+ COPY package.json yarn.lock yarn.lock tsconfig.json tsconfig.compile.json .barrels.json ./
9
9
 
10
10
  RUN yarn set version berry
11
11
  RUN yarn install --immutable
@@ -0,0 +1,9 @@
1
+ {
2
+ "extensions": ["ts"],
3
+ "watch": ["src"],
4
+ "ignore": ["**/*.spec.ts"],
5
+ "delay": 100,
6
+ "execMap": {
7
+ "ts": "node --import @swc-node/register/esm-register"
8
+ }
9
+ }
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {CliCore} from "@tsed/cli-core";
3
- import {config} from "../config";
3
+ import {config} from "../config/index.js";
4
4
 
5
5
  CliCore.bootstrap({
6
6
  ...config,
7
7
  commands: [
8
8
  ]
9
- }).catch(console.error);
9
+ }).catch(console.error);
@@ -1,9 +1,9 @@
1
1
  import {readFileSync} from "fs";
2
- import {envs} from "./envs/index";
3
- import loggerConfig from "./logger/index";{{#if mongoose}}
4
- import mongooseConfig from "./mongoose/index";
2
+ import {envs} from "./envs/index.js";
3
+ import loggerConfig from "./logger/index.js";{{#if mongoose}}
4
+ import mongooseConfig from "./mongoose/index.js";
5
5
  {{/if}}{{#if oidc}}
6
- import oidcConfig from "./oidc/index";
6
+ import oidcConfig from "./oidc/index.js";
7
7
  import {FileSyncAdapter} from "@tsed/adapters";
8
8
  {{/if}}
9
9
 
@@ -1,6 +1,6 @@
1
1
  import {$log} from "@tsed/common";
2
2
  import { {{platformSymbol}} } from "@tsed/platform-{{platform}}";
3
- import {Server} from "./{{entryServer}}";
3
+ import {Server} from "./{{entryServer}}.js";
4
4
 
5
5
  async function bootstrap() {
6
6
  try {
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "NodeNext",
4
+ "target": "ESNext",
5
+ "experimentalDecorators": true,
6
+ "emitDecoratorMetadata": true,
7
+ "moduleResolution": "NodeNext",
8
+ "downlevelIteration": false,
9
+ "isolatedModules": false,
10
+ "suppressImplicitAnyIndexErrors": false,
11
+ "noImplicitAny": true,
12
+ "strictNullChecks": true,
13
+ "noUnusedLocals": false,
14
+ "noUnusedParameters": false,
15
+ "esModuleInterop": true,
16
+ "allowSyntheticDefaultImports": true,
17
+ "useDefineForClassFields": false,
18
+ "importHelpers": true,
19
+ "resolveJsonModule": true,
20
+ "newLine": "LF",
21
+ "skipLibCheck": true,
22
+ "lib": ["ESNext", "esnext.asynciterable"],
23
+ "declaration": false,
24
+ "noResolve": false,
25
+ "preserveConstEnums": true,
26
+ "sourceMap": true,
27
+ "noEmit": true
28
+ }
29
+ }