@tsed/cli 7.0.0-alpha.4 → 7.0.0-alpha.5

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 (70) hide show
  1. package/lib/esm/Cli.js +1 -0
  2. package/lib/esm/bin/tsed.js +1 -0
  3. package/lib/esm/commands/generate/GenerateCmd.js +6 -5
  4. package/lib/esm/commands/index.js +2 -1
  5. package/lib/esm/commands/template/CreateTemplateCommand.js +99 -0
  6. package/lib/esm/services/CliProjectService.js +4 -5
  7. package/lib/esm/services/CliTemplatesService.js +57 -9
  8. package/lib/esm/services/ProjectClient.js +22 -22
  9. package/lib/esm/services/mappers/addContextMethods.js +17 -0
  10. package/lib/esm/services/mappers/mapDefaultTemplateOptions.js +7 -1
  11. package/lib/esm/templates/barrels.template.js +3 -2
  12. package/lib/esm/templates/controller.template.js +24 -25
  13. package/lib/esm/templates/decorator.template.js +26 -24
  14. package/lib/esm/templates/docker-compose.template.js +2 -2
  15. package/lib/esm/templates/dockerfile.template.js +5 -5
  16. package/lib/esm/templates/index.command.template.js +1 -0
  17. package/lib/esm/templates/index.config.utils.template.js +1 -1
  18. package/lib/esm/templates/index.js +1 -0
  19. package/lib/esm/templates/index.logger.template.js +2 -1
  20. package/lib/esm/templates/middleware.template.js +16 -14
  21. package/lib/esm/templates/new-template.template.js +67 -0
  22. package/lib/esm/templates/readme.template.js +3 -3
  23. package/lib/esm/templates/tsconfig.spec.template.js +5 -4
  24. package/lib/esm/templates/tsconfig.template.js +3 -2
  25. package/lib/esm/utils/defineTemplate.js +2 -2
  26. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  27. package/lib/types/Cli.d.ts +2 -1
  28. package/lib/types/bin/tsed.d.ts +1 -1
  29. package/lib/types/commands/generate/GenerateCmd.d.ts +1 -36
  30. package/lib/types/commands/index.d.ts +2 -1
  31. package/lib/types/commands/template/CreateTemplateCommand.d.ts +62 -0
  32. package/lib/types/interfaces/GenerateCmdContext.d.ts +2 -0
  33. package/lib/types/pipes/SymbolNamePipe.d.ts +1 -1
  34. package/lib/types/services/CliProjectService.d.ts +2 -2
  35. package/lib/types/services/CliTemplatesService.d.ts +7 -3
  36. package/lib/types/services/ProjectClient.d.ts +3 -3
  37. package/lib/types/services/mappers/addContextMethods.d.ts +12 -0
  38. package/lib/types/templates/asyncFactory.template.d.ts +15 -1
  39. package/lib/types/templates/barrels.template.d.ts +15 -1
  40. package/lib/types/templates/command.template.d.ts +15 -1
  41. package/lib/types/templates/config.template.d.ts +15 -1
  42. package/lib/types/templates/controller.template.d.ts +16 -1
  43. package/lib/types/templates/decorator.template.d.ts +16 -1
  44. package/lib/types/templates/docker-compose.template.d.ts +15 -1
  45. package/lib/types/templates/exception-filter.template.d.ts +15 -1
  46. package/lib/types/templates/factory.template.d.ts +15 -1
  47. package/lib/types/templates/index.command.template.d.ts +15 -1
  48. package/lib/types/templates/index.config.utils.template.d.ts +15 -1
  49. package/lib/types/templates/index.controller.template.d.ts +15 -1
  50. package/lib/types/templates/index.d.ts +1 -0
  51. package/lib/types/templates/index.logger.template.d.ts +15 -1
  52. package/lib/types/templates/index.template.d.ts +15 -1
  53. package/lib/types/templates/interceptor.template.d.ts +15 -1
  54. package/lib/types/templates/interface.template.d.ts +15 -1
  55. package/lib/types/templates/middleware.template.d.ts +16 -1
  56. package/lib/types/templates/model.template.d.ts +15 -1
  57. package/lib/types/templates/module.template.d.ts +15 -1
  58. package/lib/types/templates/new-template.template.d.ts +9 -0
  59. package/lib/types/templates/pipe.template.d.ts +15 -1
  60. package/lib/types/templates/prisma.service.template.d.ts +15 -1
  61. package/lib/types/templates/readme.template.d.ts +15 -1
  62. package/lib/types/templates/repository.template.d.ts +15 -1
  63. package/lib/types/templates/response-filter.template.d.ts +15 -1
  64. package/lib/types/templates/server.template.d.ts +15 -1
  65. package/lib/types/templates/service.template.d.ts +15 -1
  66. package/lib/types/templates/tsconfig.spec.template.d.ts +15 -1
  67. package/lib/types/templates/tsconfig.template.d.ts +15 -1
  68. package/lib/types/templates/value.template.d.ts +15 -1
  69. package/lib/types/utils/defineTemplate.d.ts +31 -3
  70. package/package.json +3 -3
@@ -1,4 +1,5 @@
1
1
  import "@tsed/logger-std";
2
+ import "./templates/index.js";
2
3
  import { CliCore } from "@tsed/cli-core";
3
4
  import { ArchitectureConvention, ProjectConvention } from "./interfaces/index.js";
4
5
  export declare class Cli extends CliCore {
@@ -7,7 +8,7 @@ export declare class Cli extends CliCore {
7
8
  pkg: import("read-pkg-up").NormalizedPackageJson;
8
9
  templateDir: string;
9
10
  plugins: boolean;
10
- 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)[];
11
+ commands: (typeof import("./index.js").AddCmd | typeof import("./index.js").GenerateCmd | typeof import("./index.js").InitCmd | typeof import("./index.js").UpdateCmd | typeof import("./commands/template/CreateTemplateCommand.js").CreateTemplateCommand | typeof import("./commands/run/RunCmd.js").RunCmd)[];
11
12
  defaultProjectPreferences(): {
12
13
  convention: ProjectConvention;
13
14
  architecture: ArchitectureConvention;
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ import "@swc-node/register/esm-register";
@@ -2,46 +2,11 @@ import { type CommandProvider, ProjectPackageJson, type Task } from "@tsed/cli-c
2
2
  import type { GenerateCmdContext } from "../../interfaces/GenerateCmdContext.js";
3
3
  import { CliProjectService } from "../../services/CliProjectService.js";
4
4
  import { CliTemplatesService } from "../../services/CliTemplatesService.js";
5
- import type { DefineTemplateOptions } from "../../utils/defineTemplate.js";
6
5
  export declare class GenerateCmd implements CommandProvider {
7
6
  protected projectPackageJson: ProjectPackageJson;
8
7
  protected projectService: CliProjectService;
9
8
  protected templates: CliTemplatesService;
10
- $prompt(data: Partial<GenerateCmdContext>): Promise<(import("inquirer").NumberQuestion<GenerateCmdContext> | import("inquirer").InputQuestion<GenerateCmdContext> | import("inquirer").PasswordQuestion<GenerateCmdContext> | import("inquirer").ListQuestion<GenerateCmdContext> | import("inquirer").RawListQuestion<GenerateCmdContext> | import("inquirer").ExpandQuestion<GenerateCmdContext> | import("inquirer").CheckboxQuestion<GenerateCmdContext> | import("inquirer").ConfirmQuestion<GenerateCmdContext> | import("inquirer").EditorQuestion<GenerateCmdContext> | import("inquirer-autocomplete-prompt").default.AutocompleteQuestionOptions<GenerateCmdContext> | readonly import("inquirer").DistinctQuestion<GenerateCmdContext>[] | import("rxjs").Observable<import("inquirer").DistinctQuestion<GenerateCmdContext>> | {
11
- [x: string]: (import("inquirer").NumberQuestion<GenerateCmdContext> & {
12
- name?: never;
13
- }) | (import("inquirer").InputQuestion<GenerateCmdContext> & {
14
- name?: never;
15
- }) | (import("inquirer").PasswordQuestion<GenerateCmdContext> & {
16
- name?: never;
17
- }) | (import("inquirer").ListQuestion<GenerateCmdContext> & {
18
- name?: never;
19
- }) | (import("inquirer").RawListQuestion<GenerateCmdContext> & {
20
- name?: never;
21
- }) | (import("inquirer").ExpandQuestion<GenerateCmdContext> & {
22
- name?: never;
23
- }) | (import("inquirer").CheckboxQuestion<GenerateCmdContext> & {
24
- name?: never;
25
- }) | (import("inquirer").ConfirmQuestion<GenerateCmdContext> & {
26
- name?: never;
27
- }) | (import("inquirer").EditorQuestion<GenerateCmdContext> & {
28
- name?: never;
29
- }) | undefined;
30
- } | {
31
- type: string;
32
- name: string;
33
- message: string;
34
- default: string | undefined;
35
- when: () => boolean;
36
- source: (_: any, keyword: string) => DefineTemplateOptions[];
37
- } | {
38
- type: string;
39
- name: string;
40
- message: string;
41
- default: (state: Partial<GenerateCmdContext>) => string;
42
- when: boolean;
43
- source?: undefined;
44
- })[]>;
9
+ $prompt(data: Partial<GenerateCmdContext>): Promise<any[]>;
45
10
  $mapContext(ctx: Partial<GenerateCmdContext>): GenerateCmdContext;
46
11
  $exec(ctx: GenerateCmdContext): Task[];
47
12
  }
@@ -2,6 +2,7 @@ import { AddCmd } from "./add/AddCmd.js";
2
2
  import { GenerateCmd } from "./generate/GenerateCmd.js";
3
3
  import { InitCmd } from "./init/InitCmd.js";
4
4
  import { RunCmd } from "./run/RunCmd.js";
5
+ import { CreateTemplateCommand } from "./template/CreateTemplateCommand.js";
5
6
  import { UpdateCmd } from "./update/UpdateCmd.js";
6
- declare const _default: (typeof AddCmd | typeof GenerateCmd | typeof InitCmd | typeof RunCmd | typeof UpdateCmd)[];
7
+ declare const _default: (typeof AddCmd | typeof GenerateCmd | typeof InitCmd | typeof UpdateCmd | typeof CreateTemplateCommand | typeof RunCmd)[];
7
8
  export default _default;
@@ -0,0 +1,62 @@
1
+ import { type CommandProvider, ProjectPackageJson } from "@tsed/cli-core";
2
+ import type { RenderDataContext } from "../../interfaces/RenderDataContext.js";
3
+ import { CliTemplatesService } from "../../services/CliTemplatesService.js";
4
+ import type { DefineTemplateOptions } from "../../utils/defineTemplate.js";
5
+ export interface CreateTemplateCmdContext extends RenderDataContext {
6
+ name: string;
7
+ from?: string | "new";
8
+ override?: string;
9
+ templateId?: string;
10
+ template?: DefineTemplateOptions;
11
+ }
12
+ export declare class CreateTemplateCommand implements CommandProvider {
13
+ protected projectPackageJson: ProjectPackageJson;
14
+ protected templates: CliTemplatesService;
15
+ $prompt(data: Partial<CreateTemplateCmdContext>): Promise<({
16
+ type: string;
17
+ name: string;
18
+ message: string;
19
+ default: string;
20
+ when: boolean;
21
+ choices: {
22
+ name: string;
23
+ value: string;
24
+ }[];
25
+ source?: undefined;
26
+ } | {
27
+ type: string;
28
+ name: string;
29
+ message: string;
30
+ default: string | undefined;
31
+ when: (ctx: CreateTemplateCmdContext) => boolean;
32
+ source: (_: any, keyword: string) => {
33
+ name: string;
34
+ value: string;
35
+ }[];
36
+ choices?: undefined;
37
+ } | {
38
+ type: string;
39
+ name: string;
40
+ message: string;
41
+ when: (ctx: CreateTemplateCmdContext) => boolean;
42
+ default: boolean;
43
+ choices?: undefined;
44
+ source?: undefined;
45
+ } | {
46
+ type: string;
47
+ name: string;
48
+ message: string;
49
+ default: string | undefined;
50
+ when: boolean;
51
+ choices?: undefined;
52
+ source?: undefined;
53
+ })[]>;
54
+ $mapContext(ctx: Partial<any>): any;
55
+ $exec(ctx: CreateTemplateCmdContext & {
56
+ symbolName: string;
57
+ symbolPath: string;
58
+ }): {
59
+ title: string;
60
+ task: () => Promise<void>;
61
+ }[];
62
+ }
@@ -16,4 +16,6 @@ export interface GenerateCmdContext extends RenderDataContext, TsED.GenerateOpti
16
16
  symbolPath: string;
17
17
  symbolPathBasename: string;
18
18
  getName: (state: Partial<GenerateCmdContext>) => string;
19
+ getRoute: (state: Partial<GenerateCmdContext> | string) => string;
20
+ getDirectories: (dir: string) => string[];
19
21
  }
@@ -8,5 +8,5 @@ export declare class SymbolNamePipe {
8
8
  name: string;
9
9
  type: string;
10
10
  format?: ProjectConvention;
11
- }): string;
11
+ }): any;
12
12
  }
@@ -7,10 +7,10 @@ export declare class CliProjectService {
7
7
  private rootDir;
8
8
  get srcDir(): string;
9
9
  getRelativePath(path: string): string;
10
- getServerFileName(): "Server" | "server";
10
+ getServerFileName(): "server" | "Server";
11
11
  create(): void;
12
12
  get(): ProjectClient;
13
13
  transformFiles(data: RenderDataContext): Promise<void>;
14
- createFromTemplate(templateId: string, ctx: TemplateRenderOptions): Promise<TemplateRenderReturnType | undefined>;
14
+ createFromTemplate(templateId: string, data: TemplateRenderOptions): Promise<TemplateRenderReturnType | undefined>;
15
15
  getDirectories(dir: string): string[];
16
16
  }
@@ -1,7 +1,6 @@
1
1
  import { CliFs } from "@tsed/cli-core";
2
2
  import type { SourceFile } from "ts-morph";
3
3
  import type { RenderDataContext } from "../interfaces/index.js";
4
- import type { DefineTemplateOptions } from "../utils/defineTemplate.js";
5
4
  export type TemplateRenderOptions = {
6
5
  name?: string;
7
6
  symbolName?: string;
@@ -20,10 +19,15 @@ export type TemplateRenderReturnType = {
20
19
  source?: SourceFile;
21
20
  };
22
21
  export declare class CliTemplatesService {
22
+ #private;
23
23
  readonly rootDir: string;
24
24
  readonly fs: CliFs;
25
25
  get srcDir(): string;
26
- find(id?: string): DefineTemplateOptions[];
27
- get(id: string): DefineTemplateOptions | undefined;
26
+ get templatesDir(): string;
27
+ $onInit(): Promise<void>;
28
+ loadTemplates(): Promise<void>;
29
+ getAll(): any[];
30
+ find(id?: string): any[];
31
+ get(id: string): any;
28
32
  render(templateId: string, data: TemplateRenderOptions): Promise<TemplateRenderReturnType | undefined>;
29
33
  }
@@ -30,11 +30,11 @@ export declare class ProjectClient extends Project {
30
30
  initializer?: string | WriterFunction;
31
31
  kind: TKind;
32
32
  }): KindToNodeMappings[TKind] | undefined;
33
- protected findConfigurationDecorationOptions(): ObjectLiteralExpression | undefined;
34
- protected findConfigConfiguration(): ObjectLiteralExpression | undefined;
35
- protected findBinConfiguration(): ObjectLiteralExpression | undefined;
36
33
  addConfigSource(name: string, { content, moduleSpecifier }: {
37
34
  content?: string;
38
35
  moduleSpecifier: string;
39
36
  }): void;
37
+ protected findConfigurationDecorationOptions(): ObjectLiteralExpression | undefined;
38
+ protected findConfigConfiguration(): ObjectLiteralExpression | undefined;
39
+ protected findBinConfiguration(): ObjectLiteralExpression | undefined;
40
40
  }
@@ -0,0 +1,12 @@
1
+ import type { GenerateCmdContext } from "../../interfaces/GenerateCmdContext.js";
2
+ export declare function addContextMethods(context: GenerateCmdContext): {
3
+ getName: (state: {
4
+ type?: string;
5
+ name?: string;
6
+ }) => string;
7
+ getRoute: (state: {
8
+ type?: string;
9
+ name?: string;
10
+ }) => string;
11
+ getDirectories: (dir: string) => string[];
12
+ };
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,17 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ import type { GenerateCmdContext } from "../interfaces/index.js";
2
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
3
+ id: string;
4
+ label: string;
5
+ description?: string;
6
+ outputDir: string;
7
+ type?: string;
8
+ fileName?: string;
9
+ ext: string | null;
10
+ hidden?: boolean;
11
+ preserveCase?: boolean;
12
+ preserveDirectory?: boolean;
13
+ render(symbolName: string, data: GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
14
+ prompts?(data: GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<GenerateCmdContext>[]>;
15
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
16
+ }>;
2
17
  export default _default;
@@ -1,2 +1,17 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ import type { GenerateCmdContext } from "../interfaces/index.js";
2
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
3
+ id: string;
4
+ label: string;
5
+ description?: string;
6
+ outputDir: string;
7
+ type?: string;
8
+ fileName?: string;
9
+ ext: string | null;
10
+ hidden?: boolean;
11
+ preserveCase?: boolean;
12
+ preserveDirectory?: boolean;
13
+ render(symbolName: string, data: GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
14
+ prompts?(data: GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<GenerateCmdContext>[]>;
15
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
16
+ }>;
2
17
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -29,3 +29,4 @@ import "./docker-compose.template.js";
29
29
  import "./dockerfile.template.js";
30
30
  import "./pm2.template.js";
31
31
  import "./readme.template.js";
32
+ import "./new-template.template.js";
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../interfaces/GenerateCmdContext.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../interfaces/GenerateCmdContext.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../interfaces/GenerateCmdContext.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../interfaces/GenerateCmdContext.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,17 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ import type { GenerateCmdContext } from "../interfaces/GenerateCmdContext.js";
2
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
3
+ id: string;
4
+ label: string;
5
+ description?: string;
6
+ outputDir: string;
7
+ type?: string;
8
+ fileName?: string;
9
+ ext: string | null;
10
+ hidden?: boolean;
11
+ preserveCase?: boolean;
12
+ preserveDirectory?: boolean;
13
+ render(symbolName: string, data: GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
14
+ prompts?(data: GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<GenerateCmdContext>[]>;
15
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
16
+ }>;
2
17
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;
@@ -0,0 +1,9 @@
1
+ declare global {
2
+ namespace TsED {
3
+ interface GenerateOptions extends Record<string, any> {
4
+ templateId: string;
5
+ name: string;
6
+ }
7
+ }
8
+ }
9
+ export {};
@@ -1,2 +1,16 @@
1
- declare const _default: import("../utils/defineTemplate.js").DefineTemplateOptions;
1
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ outputDir: string;
6
+ type?: string;
7
+ fileName?: string;
8
+ ext: string | null;
9
+ hidden?: boolean;
10
+ preserveCase?: boolean;
11
+ preserveDirectory?: boolean;
12
+ render(symbolName: string, data: import("../index.js").GenerateCmdContext): Promise<string | undefined | import("../index.js").TemplateRenderReturnType> | string | undefined | import("../index.js").TemplateRenderReturnType;
13
+ prompts?(data: import("../index.js").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("../index.js").GenerateCmdContext>[]>;
14
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
15
+ }>;
2
16
  export default _default;