create-done-coding 0.11.24-alpha.6 → 0.11.24

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.
package/es/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as m } from "./main-9f9ce081.js";
2
+ import { c as m } from "./index-16ca177d.js";
3
3
  import "@done-coding/cli-utils";
4
4
  import "node:fs";
5
5
  import "node:path";
@@ -6,11 +6,10 @@ import { getConfigPath as zo, batchCompileHandler as Vo, MODULE_DEFAULT_CONFIG_R
6
6
  import { getTargetRepoUrl as Qo } from "@done-coding/cli-git";
7
7
  const ie = {
8
8
  name: "create-done-coding",
9
- version: "0.11.24-alpha.6",
9
+ version: "0.11.24",
10
10
  description: "项目创建命令行工具",
11
11
  bin: {
12
- "create-done-coding": "es/cli.mjs",
13
- "mcp-server": "es/mcp-server.mjs"
12
+ "create-done-coding": "es/cli.mjs"
14
13
  },
15
14
  cliConfig: {
16
15
  namespaceDir: ".done-coding",
@@ -3608,7 +3607,7 @@ const lp = 3e4, Kn = Math.random(), Ro = {
3608
3607
  }
3609
3608
  }), tn = {
3610
3609
  name: "@done-coding/cli-git",
3611
- version: "0.6.14-alpha.2",
3610
+ version: "0.6.14",
3612
3611
  description: "git跨平台操作命令行工具",
3613
3612
  bin: {
3614
3613
  "dc-git": "es/cli.mjs"
@@ -4380,7 +4379,6 @@ export {
4380
4379
  sh as c,
4381
4380
  oh as d,
4382
4381
  Ao as e,
4383
- Yo as g,
4384
4382
  Co as h,
4385
4383
  ie as i
4386
4384
  };
package/es/index.mjs CHANGED
@@ -1,133 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import { i as r, F as n, g as m } from "./main-9f9ce081.js";
3
- import { G as w, S, e as j, a as G, b as M, h as I, d as O } from "./main-9f9ce081.js";
4
- import { outputConsole as i, hijackChildProcess as l, params2cliParams as p, updateEnvConfig as u } from "@done-coding/cli-utils";
5
- import { createServer as d } from "@done-coding/mcp-utils";
6
- import { fileURLToPath as g } from "node:url";
7
- import a from "node:path";
2
+ import { F as s, G as t, S as d, e as c, a as p, b as u, h as l, d as b, i as f } from "./index-16ca177d.js";
3
+ import "@done-coding/cli-utils";
8
4
  import "node:fs";
5
+ import "node:path";
9
6
  import "@done-coding/cli-template";
10
7
  import "@done-coding/cli-git";
11
- const f = g(import.meta.url), C = a.dirname(f), E = [
12
- (o, s) => o.registerTool(
13
- r.cliConfig.moduleName,
14
- {
15
- title: `创建项目工具 - ${r.name}`,
16
- description: "根据用户提供的项目名称、模板地址和分支创建新项目",
17
- inputSchema: s.object({
18
- [n.PROJECT_NAME]: s.string().min(1, "项目名称不能为空").describe("项目名称"),
19
- [n.TEMPLATE_GIT_PATH]: s.string().min(1, "模板仓库地址不能为空").describe("模板仓库地址"),
20
- [n.TEMPLATE_GIT_BRANCH]: s.string().optional().describe("对应的 Git 分支名称"),
21
- cwd: s.string().min(1, "创建项目的目录绝对路径不能为空").describe("创建项目的目录绝对路径")
22
- })
23
- },
24
- async (e) => {
25
- i.info(`当前运行目录: ${e.cwd}`);
26
- try {
27
- const t = {
28
- ...e,
29
- skipTemplateCompile: !0,
30
- openGitDetailOptimize: !1
31
- }, c = a.resolve(C, "./cli.mjs");
32
- return await l({
33
- command: "node",
34
- args: [c, ...p(t)],
35
- cwd: e.cwd,
36
- env: process.env
37
- }), i.success("项目创建成功"), {
38
- content: [
39
- {
40
- type: "text",
41
- text: `✅ 项目 [${e[n.PROJECT_NAME]}] 创建成功!`
42
- }
43
- ]
44
- };
45
- } catch (t) {
46
- return i.error("项目创建失败", (t == null ? void 0 : t.message) || t), {
47
- isError: !0,
48
- content: [
49
- { type: "text", text: `❌ 创建失败: ${(t == null ? void 0 : t.message) || t}` }
50
- ]
51
- };
52
- }
53
- }
54
- )
55
- ], T = [
56
- (o) => o.registerResource(
57
- `${r.cliConfig.moduleName}/templates`,
58
- `resource:///${r.cliConfig.moduleName}/templates`,
59
- {
60
- title: "可用项目模板列表",
61
- description: "包含所有可用的项目模板信息、仓库地址及可选分支"
62
- },
63
- async (s) => {
64
- try {
65
- i.stage("获取可用项目模板列表");
66
- const e = await m();
67
- return i.success("获取可用项目模板列表成功"), {
68
- contents: [
69
- {
70
- uri: s.href,
71
- text: JSON.stringify(e, null, 2),
72
- mimeType: "application/json"
73
- }
74
- ]
75
- };
76
- } catch (e) {
77
- return {
78
- isError: !0,
79
- contents: [
80
- {
81
- uri: s.href,
82
- type: "text",
83
- text: `❌ 获取可用项目模板列表失败: ${(e == null ? void 0 : e.message) || e}`
84
- }
85
- ]
86
- };
87
- }
88
- }
89
- )
90
- ], h = [
91
- (o) => o.registerPrompt(
92
- `${r.cliConfig.moduleName}/create-project-assistant`,
93
- {
94
- title: "创建项目助手",
95
- description: "基于自然语言诉求创建项目"
96
- },
97
- async () => ({
98
- messages: [
99
- {
100
- role: "user",
101
- content: {
102
- type: "text",
103
- text: `你是一个专业的项目初始化助手, 根据用户的自然语言诉求,从可用项目模板列表中挑选最匹配的选项来调用${r.cliConfig.moduleName}工具创建项目`
104
- }
105
- }
106
- ]
107
- })
108
- )
109
- ], L = async () => {
110
- u({
111
- consoleLog: !1
112
- }), await d({
113
- toolRegisterList: E,
114
- resourceRegisterList: T,
115
- promptRegisterList: h,
116
- name: r.name,
117
- version: r.version
118
- }).catch((o) => {
119
- i.error("MCP 服务启动失败:", o), process.exit(1);
120
- });
121
- };
122
8
  export {
123
- n as FormNameEnum,
124
- w as GitRemoteRepoAliasNameEnum,
125
- S as SubcommandEnum,
126
- j as commandCliInfo,
127
- G as crateAsSubcommand,
128
- M as createCommandCliInfo,
129
- I as createHandler,
130
- O as handler,
131
- r as injectInfo,
132
- L as setupMcpServer
9
+ s as FormNameEnum,
10
+ t as GitRemoteRepoAliasNameEnum,
11
+ d as SubcommandEnum,
12
+ c as commandCliInfo,
13
+ p as crateAsSubcommand,
14
+ u as createCommandCliInfo,
15
+ l as createHandler,
16
+ b as handler,
17
+ f as injectInfo
133
18
  };
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "create-done-coding",
3
- "version": "0.11.24-alpha.6",
3
+ "version": "0.11.24",
4
4
  "description": "项目创建命令行工具",
5
5
  "module": "es/index.mjs",
6
6
  "type": "module",
7
7
  "types": "types/index.d.ts",
8
8
  "bin": {
9
- "create-done-coding": "es/cli.mjs",
10
- "mcp-server": "es/mcp-server.mjs"
9
+ "create-done-coding": "es/cli.mjs"
11
10
  },
12
11
  "exports": {
13
12
  ".": {
@@ -38,7 +37,7 @@
38
37
  "license": "MIT",
39
38
  "sideEffects": false,
40
39
  "devDependencies": {
41
- "@done-coding/cli-inject": "0.5.22-alpha.2",
40
+ "@done-coding/cli-inject": "0.5.22",
42
41
  "@types/node": "^18.0.0",
43
42
  "@types/yargs": "^17.0.28",
44
43
  "typescript": "^5.8.3",
@@ -46,13 +45,12 @@
46
45
  "vite-plugin-dts": "^3.6.0"
47
46
  },
48
47
  "dependencies": {
49
- "@done-coding/cli-git": "0.6.14-alpha.2",
50
- "@done-coding/cli-template": "0.8.9-alpha.2",
51
- "@done-coding/cli-utils": "0.8.3-alpha.2",
52
- "@done-coding/mcp-utils": "0.0.2-alpha.2"
48
+ "@done-coding/cli-git": "0.6.14",
49
+ "@done-coding/cli-template": "0.8.9",
50
+ "@done-coding/cli-utils": "0.8.3"
53
51
  },
54
52
  "engines": {
55
53
  "node": ">=18.0.0"
56
54
  },
57
- "gitHead": "57548a940adaa810d2d0c870df54d5013a86bfed"
55
+ "gitHead": "4893b466954ef5925151d8dfc8fc8aa558ce654c"
58
56
  }
package/types/index.d.ts CHANGED
@@ -121,11 +121,10 @@ export declare const handler: (command: SubcommandEnum, argv: CliHandlerArgv<any
121
121
 
122
122
  export declare const injectInfo: {
123
123
  "name": "create-done-coding",
124
- "version": "0.11.24-alpha.6",
124
+ "version": "0.11.24",
125
125
  "description": "项目创建命令行工具",
126
126
  "bin": {
127
- "create-done-coding": "es/cli.mjs",
128
- "mcp-server": "es/mcp-server.mjs"
127
+ "create-done-coding": "es/cli.mjs"
129
128
  },
130
129
  "cliConfig": {
131
130
  "namespaceDir": ".done-coding",
@@ -145,9 +144,6 @@ export declare interface McpCreateToolParams extends McpCommonToolParams {
145
144
  [FormNameEnum.TEMPLATE_GIT_BRANCH]?: string;
146
145
  }
147
146
 
148
- /** 启动 MCP 服务 */
149
- export declare const setupMcpServer: () => Promise<void>;
150
-
151
147
  export declare enum SubcommandEnum {
152
148
  CREATE = "create"
153
149
  }
@@ -0,0 +1,7 @@
1
+ import type { McpToolRegisterItem, McpResourceRegisterItem, McpPromptRegisterItem } from "@done-coding/mcp-utils";
2
+ /** mcp服务 工具注册列表 */
3
+ export declare const toolRegisterList: McpToolRegisterItem[];
4
+ /** mcp服务 资源注册列表 */
5
+ export declare const resourceRegisterList: McpResourceRegisterItem[];
6
+ /** mcp服务 提示词注册列表 */
7
+ export declare const promptRegisterList: McpPromptRegisterItem[];
@@ -0,0 +1,2 @@
1
+ /** 启动 MCP 服务 */
2
+ export declare const setupMcpServer: () => Promise<void>;
@@ -1 +1 @@
1
- export { }
1
+ export {};
package/es/mcp-server.mjs DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import "@done-coding/cli-utils";
3
- import "@done-coding/mcp-utils";