@tsed/cli 7.0.0-beta.3 → 7.0.0-beta.4

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 (47) hide show
  1. package/lib/esm/bin/tsed.js +3 -1
  2. package/lib/esm/commands/add/AddCmd.js +2 -1
  3. package/lib/esm/commands/generate/GenerateCmd.js +2 -1
  4. package/lib/esm/commands/index.js +3 -1
  5. package/lib/esm/commands/init/InitCmd.js +10 -103
  6. package/lib/esm/commands/init/InitOptionsCmd.js +17 -0
  7. package/lib/esm/commands/init/config/FeaturesPrompt.js +29 -29
  8. package/lib/esm/commands/init/config/InitSchema.js +297 -16
  9. package/lib/esm/commands/mcp/McpCommand.js +15 -0
  10. package/lib/esm/commands/mcp/schema/InitMCPSchema.js +9 -0
  11. package/lib/esm/{mcp → commands/mcp}/schema/ProjectPreferencesSchema.js +2 -2
  12. package/lib/esm/{mcp → commands/mcp}/tools/generateTool.js +3 -3
  13. package/lib/esm/{mcp → commands/mcp}/tools/getTemplateTool.js +2 -2
  14. package/lib/esm/{mcp → commands/mcp}/tools/index.js +2 -1
  15. package/lib/esm/commands/mcp/tools/initProjectTool.js +65 -0
  16. package/lib/esm/{mcp → commands/mcp}/tools/listTemplatesTool.js +2 -2
  17. package/lib/esm/commands/run/RunCmd.js +2 -1
  18. package/lib/esm/commands/template/CreateTemplateCommand.js +2 -1
  19. package/lib/esm/commands/update/UpdateCmd.js +3 -4
  20. package/lib/esm/index.js +2 -2
  21. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  22. package/lib/types/commands/index.d.ts +103 -1
  23. package/lib/types/commands/init/InitCmd.d.ts +1 -4
  24. package/lib/types/commands/init/InitOptionsCmd.d.ts +52 -0
  25. package/lib/types/commands/init/config/FeaturesPrompt.d.ts +25 -25
  26. package/lib/types/commands/init/config/InitSchema.d.ts +12 -7
  27. package/lib/types/commands/mcp/McpCommand.d.ts +52 -0
  28. package/lib/types/commands/mcp/schema/InitMCPSchema.d.ts +5 -0
  29. package/lib/types/{mcp → commands/mcp}/schema/ProjectPreferencesSchema.d.ts +2 -2
  30. package/lib/types/{mcp → commands/mcp}/tools/generateTool.d.ts +6 -0
  31. package/lib/types/{mcp → commands/mcp}/tools/getTemplateTool.d.ts +6 -0
  32. package/lib/types/commands/mcp/tools/initProjectTool.d.ts +94 -0
  33. package/lib/types/{mcp → commands/mcp}/tools/listTemplatesTool.d.ts +6 -0
  34. package/lib/types/{mcp → commands/mcp}/tools/setWorkspaceTool.d.ts +6 -0
  35. package/lib/types/index.d.ts +2 -2
  36. package/lib/types/interfaces/InitCmdOptions.d.ts +1 -1
  37. package/package.json +11 -12
  38. package/lib/esm/bin/tsed-mcp.js +0 -42
  39. package/lib/types/bin/tsed-mcp.d.ts +0 -2
  40. /package/lib/esm/{mcp → commands/mcp}/resources/index.js +0 -0
  41. /package/lib/esm/{mcp → commands/mcp}/resources/projectInfoResource.js +0 -0
  42. /package/lib/esm/{mcp → commands/mcp}/resources/serverInfoResource.js +0 -0
  43. /package/lib/esm/{mcp → commands/mcp}/tools/setWorkspaceTool.js +0 -0
  44. /package/lib/types/{mcp → commands/mcp}/resources/index.d.ts +0 -0
  45. /package/lib/types/{mcp → commands/mcp}/resources/projectInfoResource.d.ts +0 -0
  46. /package/lib/types/{mcp → commands/mcp}/resources/serverInfoResource.d.ts +0 -0
  47. /package/lib/types/{mcp → commands/mcp}/tools/index.d.ts +0 -0
@@ -4,5 +4,107 @@ import { InitCmd } from "./init/InitCmd.js";
4
4
  import { RunCmd } from "./run/RunCmd.js";
5
5
  import { CreateTemplateCommand } from "./template/CreateTemplateCommand.js";
6
6
  import { UpdateCmd } from "./update/UpdateCmd.js";
7
- declare const _default: (typeof CreateTemplateCommand | typeof AddCmd | typeof GenerateCmd | typeof InitCmd | typeof RunCmd | typeof UpdateCmd)[];
7
+ declare const _default: (typeof CreateTemplateCommand | typeof AddCmd | typeof GenerateCmd | typeof InitCmd | import("@tsed/di").FactoryTokenProvider<{
8
+ $prompt: any;
9
+ $exec: any;
10
+ token: import("@tsed/di").TokenProvider<import("@tsed/cli-core").CommandProvider>;
11
+ name: string;
12
+ alias?: string;
13
+ description: string;
14
+ args?: {
15
+ [key: string]: import("@tsed/cli-core").CommandArg;
16
+ };
17
+ inputSchema?: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
18
+ indent: import("@tsed/schema").JsonSchema<number>;
19
+ }>> | (() => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
20
+ indent: import("@tsed/schema").JsonSchema<number>;
21
+ }>>) | undefined;
22
+ options?: {
23
+ [key: string]: import("@tsed/cli-core").CommandOpts;
24
+ };
25
+ allowUnknownOption?: boolean;
26
+ enableFeatures?: string[];
27
+ disableReadUpPkg?: boolean;
28
+ bindLogger?: boolean;
29
+ } | {
30
+ $prompt: any;
31
+ $exec: any;
32
+ prompt?<T extends import("inquirer").Answers = import("inquirer").Answers>(initialOptions: Partial<import("@tsed/schema").PropsToShape<{
33
+ indent: import("@tsed/schema").JsonSchema<number>;
34
+ }>>): import("@tsed/cli-core").QuestionOptions<T> | Promise<import("@tsed/cli-core").QuestionOptions<T>>;
35
+ handler: (data: import("@tsed/schema").PropsToShape<{
36
+ indent: import("@tsed/schema").JsonSchema<number>;
37
+ }>) => import("@tsed/cli-core").Tasks | Promise<import("@tsed/cli-core").Tasks> | any | Promise<any>;
38
+ name: string;
39
+ alias?: string;
40
+ description: string;
41
+ args?: {
42
+ [key: string]: import("@tsed/cli-core").CommandArg;
43
+ };
44
+ inputSchema?: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
45
+ indent: import("@tsed/schema").JsonSchema<number>;
46
+ }>> | (() => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
47
+ indent: import("@tsed/schema").JsonSchema<number>;
48
+ }>>) | undefined;
49
+ options?: {
50
+ [key: string]: import("@tsed/cli-core").CommandOpts;
51
+ };
52
+ allowUnknownOption?: boolean;
53
+ enableFeatures?: string[];
54
+ disableReadUpPkg?: boolean;
55
+ bindLogger?: boolean;
56
+ }> | import("@tsed/core").Type<import("@tsed/cli-core").CommandProvider<import("@tsed/schema").PropsToShape<{
57
+ indent: import("@tsed/schema").JsonSchema<number>;
58
+ }>>> | import("@tsed/di").FactoryTokenProvider<{
59
+ $prompt: any;
60
+ $exec: any;
61
+ token: import("@tsed/di").TokenProvider<import("@tsed/cli-core").CommandProvider>;
62
+ name: string;
63
+ alias?: string;
64
+ description: string;
65
+ args?: {
66
+ [key: string]: import("@tsed/cli-core").CommandArg;
67
+ };
68
+ inputSchema?: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
69
+ http: import("@tsed/schema").JsonSchema<boolean>;
70
+ }>> | (() => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
71
+ http: import("@tsed/schema").JsonSchema<boolean>;
72
+ }>>) | undefined;
73
+ options?: {
74
+ [key: string]: import("@tsed/cli-core").CommandOpts;
75
+ };
76
+ allowUnknownOption?: boolean;
77
+ enableFeatures?: string[];
78
+ disableReadUpPkg?: boolean;
79
+ bindLogger?: boolean;
80
+ } | {
81
+ $prompt: any;
82
+ $exec: any;
83
+ prompt?<T extends import("inquirer").Answers = import("inquirer").Answers>(initialOptions: Partial<import("@tsed/schema").PropsToShape<{
84
+ http: import("@tsed/schema").JsonSchema<boolean>;
85
+ }>>): import("@tsed/cli-core").QuestionOptions<T> | Promise<import("@tsed/cli-core").QuestionOptions<T>>;
86
+ handler: (data: import("@tsed/schema").PropsToShape<{
87
+ http: import("@tsed/schema").JsonSchema<boolean>;
88
+ }>) => import("@tsed/cli-core").Tasks | Promise<import("@tsed/cli-core").Tasks> | any | Promise<any>;
89
+ name: string;
90
+ alias?: string;
91
+ description: string;
92
+ args?: {
93
+ [key: string]: import("@tsed/cli-core").CommandArg;
94
+ };
95
+ inputSchema?: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
96
+ http: import("@tsed/schema").JsonSchema<boolean>;
97
+ }>> | (() => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
98
+ http: import("@tsed/schema").JsonSchema<boolean>;
99
+ }>>) | undefined;
100
+ options?: {
101
+ [key: string]: import("@tsed/cli-core").CommandOpts;
102
+ };
103
+ allowUnknownOption?: boolean;
104
+ enableFeatures?: string[];
105
+ disableReadUpPkg?: boolean;
106
+ bindLogger?: boolean;
107
+ }> | import("@tsed/core").Type<import("@tsed/cli-core").CommandProvider<import("@tsed/schema").PropsToShape<{
108
+ http: import("@tsed/schema").JsonSchema<boolean>;
109
+ }>>> | typeof RunCmd | typeof UpdateCmd)[];
8
110
  export default _default;
@@ -16,11 +16,8 @@ export declare class InitCmd implements CommandProvider {
16
16
  protected project: CliProjectService;
17
17
  protected execa: CliExeca;
18
18
  protected fs: CliFs;
19
- checkPrecondition(ctx: InitOptions): void;
20
- $beforePrompt(initialOptions: Partial<InitOptions>): Promise<Partial<InitOptions>>;
21
- $prompt(initialOptions: Partial<InitOptions>): QuestionOptions;
19
+ $prompt(initialOptions: Partial<InitOptions>): Promise<QuestionOptions>;
22
20
  $mapContext(ctx: any): InitOptions;
23
- $beforeExec(ctx: InitOptions): Promise<any>;
24
21
  $exec(ctx: InitOptions): Promise<Task[]>;
25
22
  $afterPostInstall(): {
26
23
  title: string;
@@ -0,0 +1,52 @@
1
+ export declare const InitOptionsCommand: import("@tsed/cli-core").FactoryTokenProvider<{
2
+ $prompt: any;
3
+ $exec: any;
4
+ token: import("@tsed/cli-core").TokenProvider<import("@tsed/cli-core").CommandProvider>;
5
+ name: string;
6
+ alias?: string;
7
+ description: string;
8
+ args?: {
9
+ [key: string]: import("@tsed/cli-core").CommandArg;
10
+ };
11
+ inputSchema?: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
12
+ indent: import("@tsed/schema").JsonSchema<number>;
13
+ }>> | (() => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
14
+ indent: import("@tsed/schema").JsonSchema<number>;
15
+ }>>) | undefined;
16
+ options?: {
17
+ [key: string]: import("@tsed/cli-core").CommandOpts;
18
+ };
19
+ allowUnknownOption?: boolean;
20
+ enableFeatures?: string[];
21
+ disableReadUpPkg?: boolean;
22
+ bindLogger?: boolean;
23
+ } | {
24
+ $prompt: any;
25
+ $exec: any;
26
+ prompt?<T extends import("inquirer").Answers = import("inquirer").Answers>(initialOptions: Partial<import("@tsed/schema").PropsToShape<{
27
+ indent: import("@tsed/schema").JsonSchema<number>;
28
+ }>>): import("@tsed/cli-core").QuestionOptions<T> | Promise<import("@tsed/cli-core").QuestionOptions<T>>;
29
+ handler: (data: import("@tsed/schema").PropsToShape<{
30
+ indent: import("@tsed/schema").JsonSchema<number>;
31
+ }>) => import("@tsed/cli-core").Tasks | Promise<import("@tsed/cli-core").Tasks> | any | Promise<any>;
32
+ name: string;
33
+ alias?: string;
34
+ description: string;
35
+ args?: {
36
+ [key: string]: import("@tsed/cli-core").CommandArg;
37
+ };
38
+ inputSchema?: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
39
+ indent: import("@tsed/schema").JsonSchema<number>;
40
+ }>> | (() => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
41
+ indent: import("@tsed/schema").JsonSchema<number>;
42
+ }>>) | undefined;
43
+ options?: {
44
+ [key: string]: import("@tsed/cli-core").CommandOpts;
45
+ };
46
+ allowUnknownOption?: boolean;
47
+ enableFeatures?: string[];
48
+ disableReadUpPkg?: boolean;
49
+ bindLogger?: boolean;
50
+ }> | import("@tsed/cli-core").Type<import("@tsed/cli-core").CommandProvider<import("@tsed/schema").PropsToShape<{
51
+ indent: import("@tsed/schema").JsonSchema<number>;
52
+ }>>>;
@@ -14,7 +14,7 @@ export declare enum FeatureType {
14
14
  PASSPORTJS = "passportjs",
15
15
  CONFIG = "config",
16
16
  COMMANDS = "commands",
17
- DB = "db",
17
+ ORM = "orm",
18
18
  DOC = "doc",
19
19
  CONFIG_ENVS = "config:envs",
20
20
  CONFIG_DOTENV = "config:dotenv",
@@ -25,32 +25,32 @@ export declare enum FeatureType {
25
25
  CONFIG_MONGO = "config:mongo:premium",
26
26
  CONFIG_VAULT = "config:vault:premium",
27
27
  CONFIG_POSTGRES = "config:postgres:premium",
28
- SWAGGER = "swagger",
29
- SCALAR = "scalar",
30
- PRISMA = "prisma",
31
- MONGOOSE = "mongoose",
32
- TYPEORM = "typeorm",
33
- TYPEORM_MYSQL = "typeorm:mysql",
34
- TYPEORM_MARIADB = "typeorm:mariadb",
35
- TYPEORM_POSTGRES = "typeorm:postgres",
36
- TYPEORM_COCKROACHDB = "typeorm:cockroachdb",
37
- TYPEORM_SQLITE = "typeorm:sqlite",
38
- TYPEORM_BETTER_SQLITE3 = "typeorm:better-sqlite3",
39
- TYPEORM_CORDOVA = "typeorm:cordova",
40
- TYPEORM_NATIVESCRIPT = "typeorm:nativescript",
41
- TYPEORM_ORACLE = "typeorm:oracle",
42
- TYPEORM_MSSQL = "typeorm:mssql",
43
- TYPEORM_MONGODB = "typeorm:mongodb",
44
- TYPEORM_SQLJS = "typeorm:sqljs",
45
- TYPEORM_REACTNATIVE = "typeorm:reactnative",
46
- TYPEORM_EXPO = "typeorm:expo",
28
+ SWAGGER = "doc:swagger",
29
+ SCALAR = "doc:scalar",
30
+ PRISMA = "orm:prisma",
31
+ MONGOOSE = "orm:mongoose",
32
+ TYPEORM = "orm:typeorm",
33
+ TYPEORM_MYSQL = "orm:typeorm:mysql",
34
+ TYPEORM_MARIADB = "orm:typeorm:mariadb",
35
+ TYPEORM_POSTGRES = "orm:typeorm:postgres",
36
+ TYPEORM_COCKROACHDB = "orm:typeorm:cockroachdb",
37
+ TYPEORM_SQLITE = "orm:typeorm:sqlite",
38
+ TYPEORM_BETTER_SQLITE3 = "orm:typeorm:better-sqlite3",
39
+ TYPEORM_CORDOVA = "orm:typeorm:cordova",
40
+ TYPEORM_NATIVESCRIPT = "orm:typeorm:nativescript",
41
+ TYPEORM_ORACLE = "orm:typeorm:oracle",
42
+ TYPEORM_MSSQL = "orm:typeorm:mssql",
43
+ TYPEORM_MONGODB = "orm:typeorm:mongodb",
44
+ TYPEORM_SQLJS = "orm:typeorm:sqljs",
45
+ TYPEORM_REACTNATIVE = "orm:typeorm:reactnative",
46
+ TYPEORM_EXPO = "orm:typeorm:expo",
47
47
  TESTING = "testing",
48
- JEST = "jest",
49
- VITEST = "vitest",
48
+ JEST = "testing:jest",
49
+ VITEST = "testing:vitest",
50
50
  LINTER = "linter",
51
- ESLINT = "eslint",
52
- LINT_STAGED = "lintstaged",
53
- PRETTIER = "prettier"
51
+ ESLINT = "linter:eslint",
52
+ LINT_STAGED = "linter:lintstaged",
53
+ PRETTIER = "linter:prettier"
54
54
  }
55
55
  export declare const FeaturesMap: Record<string, Feature>;
56
56
  export declare const FrameworksPrompt: {
@@ -1,13 +1,18 @@
1
1
  import { PackageManager } from "@tsed/cli-core";
2
- import { PlatformType, ProjectConvention } from "../../../interfaces/index.js";
3
- import { FeatureType } from "./FeaturesPrompt.js";
4
- export declare const InitSchema: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
5
- tsedVersion: import("@tsed/schema").JsonSchema<string | undefined>;
2
+ import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces/index.js";
3
+ import type { RuntimeTypes } from "../../../interfaces/RuntimeTypes.js";
4
+ import { FeatureType } from "../../init/config/FeaturesPrompt.js";
5
+ export declare const InitSchema: () => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
6
+ root: import("@tsed/schema").JsonSchema<string>;
6
7
  projectName: import("@tsed/schema").JsonSchema<string | undefined>;
7
8
  platform: import("@tsed/schema").JsonSchema<PlatformType>;
9
+ architecture: import("@tsed/schema").JsonSchema<ArchitectureConvention>;
8
10
  convention: import("@tsed/schema").JsonSchema<ProjectConvention>;
9
- packageManager: import("@tsed/schema").JsonSchema<PackageManager>;
10
- runtime: import("@tsed/schema").JsonSchema<"node" | "babel" | "webpack" | "bun" | "swc">;
11
11
  features: import("@tsed/schema").JsonSchema<FeatureType[]>;
12
- skipPrompt: import("@tsed/schema").JsonSchema<boolean>;
12
+ runtime: import("@tsed/schema").JsonSchema<RuntimeTypes>;
13
+ packageManager: import("@tsed/schema").JsonSchema<PackageManager>;
14
+ GH_TOKEN: import("@tsed/schema").JsonSchema<string | undefined>;
15
+ tsedVersion: import("@tsed/schema").JsonSchema<string | undefined>;
16
+ file: import("@tsed/schema").JsonSchema<string | undefined>;
17
+ skipPrompt: import("@tsed/schema").JsonSchema<boolean | undefined>;
13
18
  }> & Record<string, unknown>>;
@@ -0,0 +1,52 @@
1
+ export declare const McpCommand: import("@tsed/cli-core").FactoryTokenProvider<{
2
+ $prompt: any;
3
+ $exec: any;
4
+ token: import("@tsed/cli-core").TokenProvider<import("@tsed/cli-core").CommandProvider>;
5
+ name: string;
6
+ alias?: string;
7
+ description: string;
8
+ args?: {
9
+ [key: string]: import("@tsed/cli-core").CommandArg;
10
+ };
11
+ inputSchema?: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
12
+ http: import("@tsed/schema").JsonSchema<boolean>;
13
+ }>> | (() => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
14
+ http: import("@tsed/schema").JsonSchema<boolean>;
15
+ }>>) | undefined;
16
+ options?: {
17
+ [key: string]: import("@tsed/cli-core").CommandOpts;
18
+ };
19
+ allowUnknownOption?: boolean;
20
+ enableFeatures?: string[];
21
+ disableReadUpPkg?: boolean;
22
+ bindLogger?: boolean;
23
+ } | {
24
+ $prompt: any;
25
+ $exec: any;
26
+ prompt?<T extends import("inquirer").Answers = import("inquirer").Answers>(initialOptions: Partial<import("@tsed/schema").PropsToShape<{
27
+ http: import("@tsed/schema").JsonSchema<boolean>;
28
+ }>>): import("@tsed/cli-core").QuestionOptions<T> | Promise<import("@tsed/cli-core").QuestionOptions<T>>;
29
+ handler: (data: import("@tsed/schema").PropsToShape<{
30
+ http: import("@tsed/schema").JsonSchema<boolean>;
31
+ }>) => import("@tsed/cli-core").Tasks | Promise<import("@tsed/cli-core").Tasks> | any | Promise<any>;
32
+ name: string;
33
+ alias?: string;
34
+ description: string;
35
+ args?: {
36
+ [key: string]: import("@tsed/cli-core").CommandArg;
37
+ };
38
+ inputSchema?: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
39
+ http: import("@tsed/schema").JsonSchema<boolean>;
40
+ }>> | (() => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
41
+ http: import("@tsed/schema").JsonSchema<boolean>;
42
+ }>>) | undefined;
43
+ options?: {
44
+ [key: string]: import("@tsed/cli-core").CommandOpts;
45
+ };
46
+ allowUnknownOption?: boolean;
47
+ enableFeatures?: string[];
48
+ disableReadUpPkg?: boolean;
49
+ bindLogger?: boolean;
50
+ }> | import("@tsed/cli-core").Type<import("@tsed/cli-core").CommandProvider<import("@tsed/schema").PropsToShape<{
51
+ http: import("@tsed/schema").JsonSchema<boolean>;
52
+ }>>>;
@@ -0,0 +1,5 @@
1
+ export declare const InitMCPSchema: () => import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
2
+ cwd: import("@tsed/schema").JsonSchema<string>;
3
+ }> & {
4
+ [x: string]: unknown;
5
+ }>;
@@ -1,6 +1,6 @@
1
1
  import { PackageManager } from "@tsed/cli-core";
2
- import { PlatformType } from "../../interfaces/PlatformType.js";
3
- import { ProjectConvention } from "../../interfaces/ProjectConvention.js";
2
+ import { PlatformType } from "../../../interfaces/PlatformType.js";
3
+ import { ProjectConvention } from "../../../interfaces/ProjectConvention.js";
4
4
  export declare const ProjectPreferenceSchema: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
5
5
  convention: import("@tsed/schema").JsonSchema<ProjectConvention>;
6
6
  packageManager: import("@tsed/schema").JsonSchema<PackageManager>;
@@ -78,6 +78,12 @@ export declare const generateTool: import("@tsed/cli-core").FactoryTokenProvider
78
78
  [x: string]: unknown;
79
79
  } | undefined;
80
80
  isError?: boolean | undefined;
81
+ } | {
82
+ content: never[];
83
+ structuredContent: {
84
+ code: string;
85
+ message: any;
86
+ };
81
87
  }>;
82
88
  _meta?: Record<string, unknown> | undefined;
83
89
  description?: string | undefined;
@@ -76,6 +76,12 @@ export declare const getTemplateTool: import("@tsed/di").FactoryTokenProvider<{
76
76
  [x: string]: unknown;
77
77
  } | undefined;
78
78
  isError?: boolean | undefined;
79
+ } | {
80
+ content: never[];
81
+ structuredContent: {
82
+ code: string;
83
+ message: any;
84
+ };
79
85
  }>;
80
86
  _meta?: Record<string, unknown> | undefined;
81
87
  description?: string | undefined;
@@ -0,0 +1,94 @@
1
+ export declare const initProjectTool: import("@tsed/cli-core").FactoryTokenProvider<{
2
+ inputSchema: Record<string, import("zod").AnyZodObject> | undefined;
3
+ outputSchema: Record<string, import("zod").AnyZodObject> | undefined;
4
+ handler(args: import("@tsed/schema").PropsToShape<{
5
+ cwd: import("@tsed/schema").JsonSchema<string>;
6
+ }> & {
7
+ [x: string]: unknown;
8
+ }, extra: import("@modelcontextprotocol/sdk/shared/protocol.js").RequestHandlerExtra<import("@modelcontextprotocol/sdk/types.js").ServerRequest, import("@modelcontextprotocol/sdk/types.js").ServerNotification>): Promise<{
9
+ [x: string]: unknown;
10
+ content: ({
11
+ [x: string]: unknown;
12
+ type: "text";
13
+ text: string;
14
+ _meta?: {
15
+ [x: string]: unknown;
16
+ } | undefined;
17
+ } | {
18
+ [x: string]: unknown;
19
+ type: "image";
20
+ data: string;
21
+ mimeType: string;
22
+ _meta?: {
23
+ [x: string]: unknown;
24
+ } | undefined;
25
+ } | {
26
+ [x: string]: unknown;
27
+ type: "audio";
28
+ data: string;
29
+ mimeType: string;
30
+ _meta?: {
31
+ [x: string]: unknown;
32
+ } | undefined;
33
+ } | {
34
+ [x: string]: unknown;
35
+ type: "resource_link";
36
+ name: string;
37
+ uri: string;
38
+ _meta?: {
39
+ [x: string]: unknown;
40
+ } | undefined;
41
+ description?: string | undefined;
42
+ mimeType?: string | undefined;
43
+ title?: string | undefined;
44
+ icons?: {
45
+ [x: string]: unknown;
46
+ src: string;
47
+ mimeType?: string | undefined;
48
+ sizes?: string[] | undefined;
49
+ }[] | undefined;
50
+ } | {
51
+ [x: string]: unknown;
52
+ type: "resource";
53
+ resource: {
54
+ [x: string]: unknown;
55
+ text: string;
56
+ uri: string;
57
+ _meta?: {
58
+ [x: string]: unknown;
59
+ } | undefined;
60
+ mimeType?: string | undefined;
61
+ } | {
62
+ [x: string]: unknown;
63
+ uri: string;
64
+ blob: string;
65
+ _meta?: {
66
+ [x: string]: unknown;
67
+ } | undefined;
68
+ mimeType?: string | undefined;
69
+ };
70
+ _meta?: {
71
+ [x: string]: unknown;
72
+ } | undefined;
73
+ })[];
74
+ _meta?: {
75
+ [x: string]: unknown;
76
+ } | undefined;
77
+ structuredContent?: {
78
+ [x: string]: unknown;
79
+ } | undefined;
80
+ isError?: boolean | undefined;
81
+ } | {
82
+ content: never[];
83
+ structuredContent: {
84
+ code: string;
85
+ message: any;
86
+ };
87
+ }>;
88
+ _meta?: Record<string, unknown> | undefined;
89
+ description?: string | undefined;
90
+ title?: string | undefined;
91
+ annotations?: import("@modelcontextprotocol/sdk/types.js").ToolAnnotations | undefined;
92
+ token?: import("@tsed/cli-core").TokenProvider;
93
+ name: string;
94
+ }>;
@@ -76,6 +76,12 @@ export declare const listTemplatesTool: import("@tsed/di").FactoryTokenProvider<
76
76
  [x: string]: unknown;
77
77
  } | undefined;
78
78
  isError?: boolean | undefined;
79
+ } | {
80
+ content: never[];
81
+ structuredContent: {
82
+ code: string;
83
+ message: any;
84
+ };
79
85
  }>;
80
86
  _meta?: Record<string, unknown> | undefined;
81
87
  description?: string | undefined;
@@ -81,6 +81,12 @@ export declare const setWorkspaceTool: import("@tsed/cli-core").FactoryTokenProv
81
81
  [x: string]: unknown;
82
82
  } | undefined;
83
83
  isError?: boolean | undefined;
84
+ } | {
85
+ content: never[];
86
+ structuredContent: {
87
+ code: string;
88
+ message: any;
89
+ };
84
90
  }>;
85
91
  _meta?: Record<string, unknown> | undefined;
86
92
  description?: string | undefined;
@@ -8,13 +8,13 @@ export * from "./commands/init/config/FeaturesPrompt.js";
8
8
  export * from "./commands/init/config/FeaturesPrompt.js";
9
9
  export * from "./commands/init/InitCmd.js";
10
10
  export * from "./commands/init/prompts/getFeaturesPrompt.js";
11
+ export { default as resources } from "./commands/mcp/resources/index.js";
12
+ export { default as tools } from "./commands/mcp/tools/index.js";
11
13
  export * from "./commands/update/UpdateCmd.js";
12
14
  export * from "./constants/index.js";
13
15
  export * from "./fn/exec.js";
14
16
  export * from "./fn/render.js";
15
17
  export * from "./interfaces/index.js";
16
- export { default as resources } from "./mcp/resources/index.js";
17
- export { default as tools } from "./mcp/tools/index.js";
18
18
  export * from "./pipes/index.js";
19
19
  export * from "./runtimes/index.js";
20
20
  export * from "./services/CliProjectService.js";
@@ -2,7 +2,7 @@ import type { RenderDataContext } from "./RenderDataContext.js";
2
2
  export interface InitOptions extends RenderDataContext {
3
3
  root: string;
4
4
  srcDir: string;
5
- skipPrompt: boolean;
5
+ skipPrompt?: boolean;
6
6
  GH_TOKEN?: string;
7
7
  }
8
8
  export type InitCmdContext = InitOptions;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/cli",
3
3
  "description": "CLI to bootstrap your Ts.ED project",
4
- "version": "7.0.0-beta.3",
4
+ "version": "7.0.0-beta.4",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -22,8 +22,7 @@
22
22
  "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
23
23
  },
24
24
  "bin": {
25
- "tsed": "lib/esm/bin/tsed.js",
26
- "tsed-mcp": "lib/esm/bin/tsed-mcp.js"
25
+ "tsed": "lib/esm/bin/tsed.js"
27
26
  },
28
27
  "files": [
29
28
  "lib/esm/bin/tsed.js",
@@ -51,16 +50,16 @@
51
50
  "@swc-node/register": "^1.10.9",
52
51
  "@swc/core": "1.7.26",
53
52
  "@swc/helpers": "^0.5.13",
54
- "@tsed/cli-core": "7.0.0-beta.3",
55
- "@tsed/cli-mcp": "7.0.0-beta.3",
56
- "@tsed/core": ">=8.18.0",
57
- "@tsed/di": ">=8.18.0",
58
- "@tsed/hooks": ">=8.18.0",
53
+ "@tsed/cli-core": "7.0.0-beta.4",
54
+ "@tsed/cli-mcp": "7.0.0-beta.4",
55
+ "@tsed/core": ">=8.21.0",
56
+ "@tsed/di": ">=8.21.0",
57
+ "@tsed/hooks": ">=8.21.0",
59
58
  "@tsed/logger": ">=8.0.3",
60
59
  "@tsed/logger-std": ">=8.0.3",
61
- "@tsed/normalize-path": ">=8.18.0",
62
- "@tsed/openspec": ">=8.18.0",
63
- "@tsed/schema": ">=8.18.0",
60
+ "@tsed/normalize-path": ">=8.21.0",
61
+ "@tsed/openspec": ">=8.21.0",
62
+ "@tsed/schema": ">=8.21.0",
64
63
  "chalk": "^5.3.0",
65
64
  "change-case": "^5.4.4",
66
65
  "consolidate": "^1.0.4",
@@ -75,7 +74,7 @@
75
74
  "tslib": "^2.7.0"
76
75
  },
77
76
  "devDependencies": {
78
- "@tsed/typescript": "7.0.0-beta.3",
77
+ "@tsed/typescript": "7.0.0-beta.4",
79
78
  "@types/change-case": "^2.3.1",
80
79
  "@types/consolidate": "0.14.4",
81
80
  "cross-env": "7.0.3",
@@ -1,42 +0,0 @@
1
- #!/usr/bin/env node
2
- import "@swc-node/register/esm-register";
3
- import { register } from "node:module";
4
- import { join } from "node:path";
5
- import { pathToFileURL } from "node:url";
6
- import { CLIMCPServer } from "@tsed/cli-mcp";
7
- const EXT = process.env.CLI_MODE === "ts" ? "ts" : "js";
8
- register(pathToFileURL(join(import.meta.dirname, `../loaders/alias.hook.${EXT}`)), {
9
- parentURL: import.meta.dirname,
10
- data: {
11
- "@tsed/core": import.meta.resolve("@tsed/core"),
12
- "@tsed/di": import.meta.resolve("@tsed/di"),
13
- "@tsed/schema": import.meta.resolve("@tsed/schema"),
14
- "@tsed/cli-core": import.meta.resolve("@tsed/cli-core"),
15
- "@tsed/cli": import.meta.resolve("@tsed/cli")
16
- },
17
- transferList: []
18
- });
19
- const { tools, resources, PKG, TEMPLATE_DIR, ArchitectureConvention, ProjectConvention } = await import("../index.js");
20
- CLIMCPServer.bootstrap({
21
- name: "tsed",
22
- version: PKG.version,
23
- pkg: PKG,
24
- templateDir: TEMPLATE_DIR,
25
- tools,
26
- resources,
27
- mcp: {
28
- mode: process.env.args?.includes("--http") || process.env.USE_MCP_HTTP ? "streamable-http" : "stdio"
29
- },
30
- defaultProjectPreferences() {
31
- return {
32
- convention: ProjectConvention.DEFAULT,
33
- architecture: ArchitectureConvention.DEFAULT
34
- };
35
- },
36
- project: {
37
- reinstallAfterRun: true
38
- }
39
- }).catch((error) => {
40
- console.error(error);
41
- process.exit(-1);
42
- });
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import "@swc-node/register/esm-register";