create-done-coding 0.11.22 → 0.11.23-alpha.0
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 +1 -1
- package/es/{index-806d3134.js → index-9589c795.js} +1605 -1573
- package/es/index.mjs +9 -7
- package/package.json +7 -7
- package/types/index.d.ts +62 -1
package/es/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { F as s, G as d, S as p, e as c, a as u, b as l, h as b, d as f, i as C } from "./index-9589c795.js";
|
|
3
3
|
import "@done-coding/cli-utils";
|
|
4
4
|
import "node:child_process";
|
|
5
5
|
import "node:fs";
|
|
@@ -7,11 +7,13 @@ import "node:path";
|
|
|
7
7
|
import "@done-coding/cli-template";
|
|
8
8
|
import "@done-coding/cli-git";
|
|
9
9
|
export {
|
|
10
|
-
s as
|
|
11
|
-
d as
|
|
12
|
-
p as
|
|
13
|
-
c as
|
|
10
|
+
s as FormNameEnum,
|
|
11
|
+
d as GitRemoteRepoAliasNameEnum,
|
|
12
|
+
p as SubcommandEnum,
|
|
13
|
+
c as commandCliInfo,
|
|
14
|
+
u as crateAsSubcommand,
|
|
14
15
|
l as createCommandCliInfo,
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
b as createHandler,
|
|
17
|
+
f as handler,
|
|
18
|
+
C as injectInfo
|
|
17
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-done-coding",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.23-alpha.0",
|
|
4
4
|
"description": "项目创建命令行工具",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/node": "^18.0.0",
|
|
42
42
|
"@types/yargs": "^17.0.28",
|
|
43
43
|
"rimraf": "^6.0.1",
|
|
44
|
-
"typescript": "^5.
|
|
44
|
+
"typescript": "^5.8.3",
|
|
45
45
|
"vite": "^4.4.11",
|
|
46
46
|
"vite-plugin-dts": "^3.6.0"
|
|
47
47
|
},
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"node": ">=18.0.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@done-coding/cli-git": "0.6.
|
|
53
|
-
"@done-coding/cli-inject": "0.5.
|
|
54
|
-
"@done-coding/cli-template": "0.8.
|
|
55
|
-
"@done-coding/cli-utils": "0.8.
|
|
52
|
+
"@done-coding/cli-git": "0.6.13-alpha.0",
|
|
53
|
+
"@done-coding/cli-inject": "0.5.21-alpha.0",
|
|
54
|
+
"@done-coding/cli-template": "0.8.8-alpha.0",
|
|
55
|
+
"@done-coding/cli-utils": "0.8.2-alpha.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "b09dd794f69ba2dafe22a3519d712d059c2eb376"
|
|
58
58
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -18,9 +18,15 @@ export declare const createHandler: (argv: CliHandlerArgv<CreateOptions>) => Pro
|
|
|
18
18
|
|
|
19
19
|
export declare interface CreateOptions {
|
|
20
20
|
/** 项目名称 */
|
|
21
|
-
|
|
21
|
+
[FormNameEnum.PROJECT_NAME]?: string;
|
|
22
22
|
/** 是否仅仅(从done-coding系列项目列表中)克隆远程仓库 */
|
|
23
23
|
justCloneFromDoneCoding?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* mcp所有问题答案预设
|
|
26
|
+
* ----
|
|
27
|
+
* 为mcp预留的选项,不会被命令行使用
|
|
28
|
+
*/
|
|
29
|
+
_mcp?: McpCreateAnswerPreset;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
/** 创建模板-分支信息 */
|
|
@@ -45,6 +51,38 @@ export declare interface CreateTemplateChoiceItem {
|
|
|
45
51
|
instances?: string[];
|
|
46
52
|
}
|
|
47
53
|
|
|
54
|
+
/** 表单name枚举 */
|
|
55
|
+
export declare enum FormNameEnum {
|
|
56
|
+
/** 项目名称选择 */
|
|
57
|
+
PROJECT_NAME = "projectName",
|
|
58
|
+
/** 模板选择 */
|
|
59
|
+
TEMPLATE = "template",
|
|
60
|
+
/** 是否保留git记录 */
|
|
61
|
+
IS_SAVE_GIT_HISTORY = "saveGitHistory",
|
|
62
|
+
/** 转换为ssh url */
|
|
63
|
+
IS_TRANS_HTTP_URL_TO_SSH_URL = "isTransToSshUrl",
|
|
64
|
+
/** 是否移除同名目录 */
|
|
65
|
+
IS_REMOVE_SAME_NAME_DIR = "isRemove",
|
|
66
|
+
/** 是否更改分支名-当指定模板分支时(即本地是否需要重命名分支名) */
|
|
67
|
+
IS_CHANGE_BRANCH_NAME = "isChangeBranchName",
|
|
68
|
+
/** (如果要改分支名)本地分支名 */
|
|
69
|
+
LOCAL_BRANCH_NAME = "localBranchName",
|
|
70
|
+
/** 是否浅克隆 */
|
|
71
|
+
IS_SHALLOW_CLONE = "shallowClone",
|
|
72
|
+
/** 自定义模板路径 */
|
|
73
|
+
CUSTOM_GIT_URL_INPUT = "customUrl",
|
|
74
|
+
/** git的提交信息 */
|
|
75
|
+
GIT_COMMIT_MESSAGE = "gitCommitMessage",
|
|
76
|
+
/**
|
|
77
|
+
* 模板仓库地址
|
|
78
|
+
* ----
|
|
79
|
+
* 为mcp拓展所加
|
|
80
|
+
*/
|
|
81
|
+
TEMPLATE_GIT_PATH = "templateGitPath",
|
|
82
|
+
/** 模板仓库分支 */
|
|
83
|
+
TEMPLATE_GIT_BRANCH = "templateGitBranch"
|
|
84
|
+
}
|
|
85
|
+
|
|
48
86
|
/** 远程仓库别名枚举 */
|
|
49
87
|
export declare enum GitRemoteRepoAliasNameEnum {
|
|
50
88
|
/** 默认 */
|
|
@@ -55,6 +93,29 @@ export declare enum GitRemoteRepoAliasNameEnum {
|
|
|
55
93
|
|
|
56
94
|
export declare const handler: (command: SubcommandEnum, argv: CliHandlerArgv<any>) => Promise<undefined>;
|
|
57
95
|
|
|
96
|
+
export declare const injectInfo: {
|
|
97
|
+
"name": "create-done-coding",
|
|
98
|
+
"version": "0.11.23-alpha.0",
|
|
99
|
+
"description": "项目创建命令行工具",
|
|
100
|
+
"bin": "es/cli.mjs",
|
|
101
|
+
"cliConfig": {
|
|
102
|
+
"namespaceDir": ".done-coding",
|
|
103
|
+
"moduleName": "create"
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* mcp项目创建答案预设
|
|
109
|
+
*/
|
|
110
|
+
export declare interface McpCreateAnswerPreset {
|
|
111
|
+
/** 项目名称 */
|
|
112
|
+
[FormNameEnum.PROJECT_NAME]: string;
|
|
113
|
+
/** 模板仓库地址 */
|
|
114
|
+
[FormNameEnum.TEMPLATE_GIT_PATH]: string;
|
|
115
|
+
/** 模板仓库分支 */
|
|
116
|
+
[FormNameEnum.TEMPLATE_GIT_BRANCH]?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
58
119
|
export declare enum SubcommandEnum {
|
|
59
120
|
CREATE = "create"
|
|
60
121
|
}
|