create-done-coding 0.11.6-alpha.0 → 0.11.7-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 +3 -3
- package/es/{index-cbd532d9.js → index-4d284b70.js} +1159 -1178
- package/es/index.mjs +3 -3
- package/package.json +6 -6
- package/types/handler.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/injectInfo.json.d.ts +1 -1
- package/types/types/index.d.ts +22 -0
- package/types/utils/const.d.ts +0 -4
- package/types/utils/index.d.ts +0 -2
- package/types/utils/question.d.ts +4 -16
- package/types/utils/readConfig.d.ts +0 -7
- package/types/utils/types.d.ts +0 -6
package/es/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as n, h as s } from "./index-
|
|
2
|
+
import { a as n, h as s } from "./index-4d284b70.js";
|
|
3
|
+
import "@done-coding/cli-utils";
|
|
3
4
|
import "node:child_process";
|
|
4
|
-
import "node:path";
|
|
5
5
|
import "node:fs";
|
|
6
|
-
import "
|
|
6
|
+
import "node:path";
|
|
7
7
|
import "@done-coding/cli-template";
|
|
8
8
|
import "@done-coding/cli-git";
|
|
9
9
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-done-coding",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7-alpha.0",
|
|
4
4
|
"description": "项目创建命令行工具",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"node": ">=18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@done-coding/cli-git": "^0.5.5-alpha.
|
|
52
|
-
"@done-coding/cli-inject": "^0.5.
|
|
53
|
-
"@done-coding/cli-template": "^0.7.8-alpha.
|
|
54
|
-
"@done-coding/cli-utils": "^0.
|
|
51
|
+
"@done-coding/cli-git": "^0.5.5-alpha.1",
|
|
52
|
+
"@done-coding/cli-inject": "^0.5.8-alpha.0",
|
|
53
|
+
"@done-coding/cli-template": "^0.7.8-alpha.1",
|
|
54
|
+
"@done-coding/cli-utils": "^0.6.0-alpha.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "5879161383e32e7bed351d71d3ef607d81dc021a"
|
|
57
57
|
}
|
package/types/handler.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface Options {
|
|
2
|
+
/** 项目名称 */
|
|
3
|
+
projectName?: string;
|
|
4
|
+
/** 是否仅仅(从done-coding系列项目列表中)克隆远程仓库 */
|
|
5
|
+
justCloneFromDoneCoding?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** 模版选项 */
|
|
8
|
+
export interface CreateTemplateChoiceItem {
|
|
9
|
+
/** 模板名 */
|
|
10
|
+
name: string;
|
|
11
|
+
/** 仓库地址 */
|
|
12
|
+
url?: string;
|
|
13
|
+
/** 描述 */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** 目标分支 */
|
|
16
|
+
branch?: string;
|
|
17
|
+
/** 应用实例 */
|
|
18
|
+
instances?: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface CreateConfigJson {
|
|
21
|
+
templateList: CreateTemplateChoiceItem[];
|
|
22
|
+
}
|
package/types/utils/const.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
/** 配置仓库地址 */
|
|
2
|
-
export declare const CONFIG_GIT_REPO: string;
|
|
3
1
|
/** 自定义模板路径 */
|
|
4
2
|
export declare const CUSTOM_TEMPLATE_NAME = "\u81EA\u5B9A\u4E49\u6A21\u7248\u8DEF\u5F84";
|
|
5
3
|
/** 某个公共仓库 */
|
|
6
4
|
export declare const SOMEONE_PUBLIC_REPO_NAME = "\u67D0\u4E2Agit\u5E73\u53F0\u7528\u6237\u4ED3\u5E93";
|
|
7
|
-
/** 临时目录 */
|
|
8
|
-
export declare const READ_CONFIG_TEMPORARY_DIRECTORY: string;
|
package/types/utils/index.d.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
export interface TemplateChoiceItem {
|
|
4
|
-
/** 模板名 */
|
|
5
|
-
name: string;
|
|
6
|
-
/** 仓库地址 */
|
|
7
|
-
url?: string;
|
|
8
|
-
/** 描述 */
|
|
9
|
-
description?: string;
|
|
10
|
-
/** 目标分支 */
|
|
11
|
-
branch?: string;
|
|
12
|
-
/** 应用实例 */
|
|
13
|
-
instances?: string[];
|
|
14
|
-
}
|
|
1
|
+
import { type PromptObject } from "@done-coding/cli-utils";
|
|
2
|
+
import type { CreateTemplateChoiceItem } from '../types';
|
|
15
3
|
/** 获取模版选项 */
|
|
16
|
-
export declare const getTemplateList: () => Promise<
|
|
4
|
+
export declare const getTemplateList: () => Promise<CreateTemplateChoiceItem[]>;
|
|
17
5
|
/** 模版选项 */
|
|
18
|
-
export declare const getTemplateChoices: () => Promise<
|
|
6
|
+
export declare const getTemplateChoices: () => Promise<CreateTemplateChoiceItem[]>;
|
|
19
7
|
export declare const projectNameForm: PromptObject<string>;
|
|
20
8
|
export declare const getTemplateForm: () => Promise<PromptObject<string>>;
|
|
21
9
|
export declare const saveGitHistoryForm: {
|