@coze-arch/cli 0.0.10-alpha.11b7ea → 0.0.10-alpha.1717be
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/lib/__templates__/cli/.coze +11 -0
- package/lib/__templates__/cli/AGENTS.md +46 -0
- package/lib/__templates__/cli/README.md +19 -0
- package/lib/__templates__/cli/_gitignore +59 -0
- package/lib/__templates__/cli/_npmrc +3 -0
- package/lib/__templates__/cli/package.json +32 -0
- package/lib/__templates__/cli/pnpm-lock.yaml +550 -0
- package/lib/__templates__/cli/scripts/build.sh +13 -0
- package/lib/__templates__/cli/scripts/dev.sh +20 -0
- package/lib/__templates__/cli/scripts/publish.sh +10 -0
- package/lib/__templates__/cli/src/index.ts +34 -0
- package/lib/__templates__/cli/template.config.js +47 -0
- package/lib/__templates__/cli/tsconfig.json +15 -0
- package/lib/__templates__/templates.json +18 -0
- package/lib/cli.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 项目上下文
|
|
2
|
+
|
|
3
|
+
### 版本技术栈
|
|
4
|
+
|
|
5
|
+
- **Framework**: Node.js CLI
|
|
6
|
+
- **Command Parser**: Commander.js 12
|
|
7
|
+
- **Interactive Prompts**: Inquirer.js 5 (@inquirer/prompts)
|
|
8
|
+
- **Visuals**: Chalk 4, Ora 8
|
|
9
|
+
- **Language**: TypeScript 5
|
|
10
|
+
|
|
11
|
+
## 目录结构
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
├── scripts/ # 构建与启动脚本
|
|
15
|
+
│ ├── build.sh # 构建脚本
|
|
16
|
+
│ ├── dev.sh # 开发环境启动脚本
|
|
17
|
+
│ ├── prepare.sh # 预处理与全局链接脚本
|
|
18
|
+
│ └── start.sh # 生产环境执行脚本
|
|
19
|
+
├── src/
|
|
20
|
+
│ └── index.ts # CLI 入口文件与核心逻辑
|
|
21
|
+
├── .coze # Coze 部署与运行配置
|
|
22
|
+
├── package.json # 项目依赖管理
|
|
23
|
+
└── tsconfig.json # TypeScript 配置
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- 项目源代码默认存放在 `src/` 目录下。
|
|
27
|
+
- 编译产物默认输出到 `dist/` 目录下。
|
|
28
|
+
|
|
29
|
+
## 包管理规范
|
|
30
|
+
|
|
31
|
+
**仅允许使用 pnpm** 作为包管理器,**严禁使用 npm 或 yarn**。
|
|
32
|
+
**常用命令**:
|
|
33
|
+
- 安装依赖:`pnpm add <package>`
|
|
34
|
+
- 安装开发依赖:`pnpm add -D <package>`
|
|
35
|
+
- 安装所有依赖:`pnpm install`
|
|
36
|
+
- 移除依赖:`pnpm remove <package>`
|
|
37
|
+
|
|
38
|
+
## 开发规范
|
|
39
|
+
|
|
40
|
+
- **项目理解加速**:优先阅读 `package.json` 的 `bin` 和 `scripts` 字段,以及 `src/index.ts` 入口文件来理解 CLI 命令的挂载点。
|
|
41
|
+
- **CLI 交互设计**:
|
|
42
|
+
- 尽量使用 `@inquirer/prompts` 提供交互式问询,提升用户体验。
|
|
43
|
+
- 对于耗时任务,必须使用 `ora` 提供明确的 Loading 状态。
|
|
44
|
+
- 对于成功/失败/警告信息,使用 `chalk` 进行颜色区分输出。
|
|
45
|
+
- **参数解析**:使用 `commander` 来声明参数、选项和自动生成帮助文档(`--help`)。避免手动解析 `process.argv`。
|
|
46
|
+
- **本地调试**:由于 CLI 涉及到全局命令注册,开发过程中使用 `scripts/dev.sh`(内部使用了 `tsc --watch` 监听并编译代码,配合初始化的 `pnpm link --global`)来进行热更新调试。
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# <%= appName %>
|
|
2
|
+
|
|
3
|
+
A standard CLI application built with [Commander.js](https://github.com/tj/commander.js) and [Inquirer.js](https://github.com/SBoudrias/Inquirer.js).
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Install dependencies
|
|
9
|
+
pnpm install
|
|
10
|
+
|
|
11
|
+
# Start development (watch mode)
|
|
12
|
+
pnpm dev
|
|
13
|
+
|
|
14
|
+
# Build the CLI
|
|
15
|
+
pnpm build
|
|
16
|
+
|
|
17
|
+
# Run the built CLI
|
|
18
|
+
pnpm start
|
|
19
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
.pnp
|
|
4
|
+
.pnp.js
|
|
5
|
+
|
|
6
|
+
# Production build
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
out/
|
|
10
|
+
|
|
11
|
+
# Testing
|
|
12
|
+
coverage/
|
|
13
|
+
*.lcov
|
|
14
|
+
.nyc_output
|
|
15
|
+
|
|
16
|
+
# Environment variables
|
|
17
|
+
.env
|
|
18
|
+
.env.local
|
|
19
|
+
.env.development.local
|
|
20
|
+
.env.test.local
|
|
21
|
+
.env.production.local
|
|
22
|
+
|
|
23
|
+
# Logs
|
|
24
|
+
logs/
|
|
25
|
+
*.log
|
|
26
|
+
npm-debug.log*
|
|
27
|
+
yarn-debug.log*
|
|
28
|
+
yarn-error.log*
|
|
29
|
+
pnpm-debug.log*
|
|
30
|
+
lerna-debug.log*
|
|
31
|
+
|
|
32
|
+
# Editor directories and files
|
|
33
|
+
.vscode/*
|
|
34
|
+
!.vscode/extensions.json
|
|
35
|
+
!.vscode/settings.json
|
|
36
|
+
.idea/
|
|
37
|
+
*.suo
|
|
38
|
+
*.ntvs*
|
|
39
|
+
*.njsproj
|
|
40
|
+
*.sln
|
|
41
|
+
*.sw?
|
|
42
|
+
*.swp
|
|
43
|
+
*.swo
|
|
44
|
+
*~
|
|
45
|
+
|
|
46
|
+
# OS files
|
|
47
|
+
.DS_Store
|
|
48
|
+
.DS_Store?
|
|
49
|
+
._*
|
|
50
|
+
.Spotlight-V100
|
|
51
|
+
.Trashes
|
|
52
|
+
ehthumbs.db
|
|
53
|
+
Thumbs.db
|
|
54
|
+
Desktop.ini
|
|
55
|
+
|
|
56
|
+
# TypeScript
|
|
57
|
+
*.tsbuildinfo
|
|
58
|
+
|
|
59
|
+
.coze-logs
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= appName %>",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "CLI Tool Template",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"<%= appName %>": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "bash ./scripts/build.sh",
|
|
12
|
+
"dev": "bash ./scripts/dev.sh",
|
|
13
|
+
"preinstall": "npx only-allow pnpm",
|
|
14
|
+
"lint": "eslint",
|
|
15
|
+
"publish": "bash ./scripts/publish.sh"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@inquirer/prompts": "^5.0.7",
|
|
19
|
+
"chalk": "^4.1.2",
|
|
20
|
+
"commander": "~12.1.0",
|
|
21
|
+
"ora": "^8.0.1"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^20.14.9",
|
|
25
|
+
"only-allow": "^1.2.2",
|
|
26
|
+
"typescript": "^5.5.2"
|
|
27
|
+
},
|
|
28
|
+
"packageManager": "pnpm@9.0.0",
|
|
29
|
+
"engines": {
|
|
30
|
+
"pnpm": ">=9.0.0"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
lockfileVersion: '9.0'
|
|
2
|
+
|
|
3
|
+
settings:
|
|
4
|
+
autoInstallPeers: true
|
|
5
|
+
excludeLinksFromLockfile: false
|
|
6
|
+
|
|
7
|
+
importers:
|
|
8
|
+
|
|
9
|
+
.:
|
|
10
|
+
dependencies:
|
|
11
|
+
'@inquirer/prompts':
|
|
12
|
+
specifier: ^5.0.7
|
|
13
|
+
version: 5.5.0
|
|
14
|
+
chalk:
|
|
15
|
+
specifier: ^4.1.2
|
|
16
|
+
version: 4.1.2
|
|
17
|
+
commander:
|
|
18
|
+
specifier: ~12.1.0
|
|
19
|
+
version: 12.1.0
|
|
20
|
+
ora:
|
|
21
|
+
specifier: ^8.0.1
|
|
22
|
+
version: 8.2.0
|
|
23
|
+
devDependencies:
|
|
24
|
+
'@types/node':
|
|
25
|
+
specifier: ^20.14.9
|
|
26
|
+
version: 20.19.39
|
|
27
|
+
only-allow:
|
|
28
|
+
specifier: ^1.2.2
|
|
29
|
+
version: 1.2.2
|
|
30
|
+
typescript:
|
|
31
|
+
specifier: ^5.5.2
|
|
32
|
+
version: 5.9.3
|
|
33
|
+
|
|
34
|
+
packages:
|
|
35
|
+
|
|
36
|
+
'@inquirer/checkbox@2.5.0':
|
|
37
|
+
resolution: {integrity: sha512-sMgdETOfi2dUHT8r7TT1BTKOwNvdDGFDXYWtQ2J69SvlYNntk9I/gJe7r5yvMwwsuKnYbuRs3pNhx4tgNck5aA==}
|
|
38
|
+
engines: {node: '>=18'}
|
|
39
|
+
|
|
40
|
+
'@inquirer/confirm@3.2.0':
|
|
41
|
+
resolution: {integrity: sha512-oOIwPs0Dvq5220Z8lGL/6LHRTEr9TgLHmiI99Rj1PJ1p1czTys+olrgBqZk4E2qC0YTzeHprxSQmoHioVdJ7Lw==}
|
|
42
|
+
engines: {node: '>=18'}
|
|
43
|
+
|
|
44
|
+
'@inquirer/core@9.2.1':
|
|
45
|
+
resolution: {integrity: sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==}
|
|
46
|
+
engines: {node: '>=18'}
|
|
47
|
+
|
|
48
|
+
'@inquirer/editor@2.2.0':
|
|
49
|
+
resolution: {integrity: sha512-9KHOpJ+dIL5SZli8lJ6xdaYLPPzB8xB9GZItg39MBybzhxA16vxmszmQFrRwbOA918WA2rvu8xhDEg/p6LXKbw==}
|
|
50
|
+
engines: {node: '>=18'}
|
|
51
|
+
|
|
52
|
+
'@inquirer/expand@2.3.0':
|
|
53
|
+
resolution: {integrity: sha512-qnJsUcOGCSG1e5DTOErmv2BPQqrtT6uzqn1vI/aYGiPKq+FgslGZmtdnXbhuI7IlT7OByDoEEqdnhUnVR2hhLw==}
|
|
54
|
+
engines: {node: '>=18'}
|
|
55
|
+
|
|
56
|
+
'@inquirer/figures@1.0.15':
|
|
57
|
+
resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==}
|
|
58
|
+
engines: {node: '>=18'}
|
|
59
|
+
|
|
60
|
+
'@inquirer/input@2.3.0':
|
|
61
|
+
resolution: {integrity: sha512-XfnpCStx2xgh1LIRqPXrTNEEByqQWoxsWYzNRSEUxJ5c6EQlhMogJ3vHKu8aXuTacebtaZzMAHwEL0kAflKOBw==}
|
|
62
|
+
engines: {node: '>=18'}
|
|
63
|
+
|
|
64
|
+
'@inquirer/number@1.1.0':
|
|
65
|
+
resolution: {integrity: sha512-ilUnia/GZUtfSZy3YEErXLJ2Sljo/mf9fiKc08n18DdwdmDbOzRcTv65H1jjDvlsAuvdFXf4Sa/aL7iw/NanVA==}
|
|
66
|
+
engines: {node: '>=18'}
|
|
67
|
+
|
|
68
|
+
'@inquirer/password@2.2.0':
|
|
69
|
+
resolution: {integrity: sha512-5otqIpgsPYIshqhgtEwSspBQE40etouR8VIxzpJkv9i0dVHIpyhiivbkH9/dGiMLdyamT54YRdGJLfl8TFnLHg==}
|
|
70
|
+
engines: {node: '>=18'}
|
|
71
|
+
|
|
72
|
+
'@inquirer/prompts@5.5.0':
|
|
73
|
+
resolution: {integrity: sha512-BHDeL0catgHdcHbSFFUddNzvx/imzJMft+tWDPwTm3hfu8/tApk1HrooNngB2Mb4qY+KaRWF+iZqoVUPeslEog==}
|
|
74
|
+
engines: {node: '>=18'}
|
|
75
|
+
|
|
76
|
+
'@inquirer/rawlist@2.3.0':
|
|
77
|
+
resolution: {integrity: sha512-zzfNuINhFF7OLAtGHfhwOW2TlYJyli7lOUoJUXw/uyklcwalV6WRXBXtFIicN8rTRK1XTiPWB4UY+YuW8dsnLQ==}
|
|
78
|
+
engines: {node: '>=18'}
|
|
79
|
+
|
|
80
|
+
'@inquirer/search@1.1.0':
|
|
81
|
+
resolution: {integrity: sha512-h+/5LSj51dx7hp5xOn4QFnUaKeARwUCLs6mIhtkJ0JYPBLmEYjdHSYh7I6GrLg9LwpJ3xeX0FZgAG1q0QdCpVQ==}
|
|
82
|
+
engines: {node: '>=18'}
|
|
83
|
+
|
|
84
|
+
'@inquirer/select@2.5.0':
|
|
85
|
+
resolution: {integrity: sha512-YmDobTItPP3WcEI86GvPo+T2sRHkxxOq/kXmsBjHS5BVXUgvgZ5AfJjkvQvZr03T81NnI3KrrRuMzeuYUQRFOA==}
|
|
86
|
+
engines: {node: '>=18'}
|
|
87
|
+
|
|
88
|
+
'@inquirer/type@1.5.5':
|
|
89
|
+
resolution: {integrity: sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==}
|
|
90
|
+
engines: {node: '>=18'}
|
|
91
|
+
|
|
92
|
+
'@inquirer/type@2.0.0':
|
|
93
|
+
resolution: {integrity: sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==}
|
|
94
|
+
engines: {node: '>=18'}
|
|
95
|
+
|
|
96
|
+
'@types/mute-stream@0.0.4':
|
|
97
|
+
resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==}
|
|
98
|
+
|
|
99
|
+
'@types/node@20.19.39':
|
|
100
|
+
resolution: {integrity: sha512-orrrD74MBUyK8jOAD/r0+lfa1I2MO6I+vAkmAWzMYbCcgrN4lCrmK52gRFQq/JRxfYPfonkr4b0jcY7Olqdqbw==}
|
|
101
|
+
|
|
102
|
+
'@types/node@22.19.17':
|
|
103
|
+
resolution: {integrity: sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==}
|
|
104
|
+
|
|
105
|
+
'@types/wrap-ansi@3.0.0':
|
|
106
|
+
resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==}
|
|
107
|
+
|
|
108
|
+
ansi-escapes@4.3.2:
|
|
109
|
+
resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==}
|
|
110
|
+
engines: {node: '>=8'}
|
|
111
|
+
|
|
112
|
+
ansi-regex@5.0.1:
|
|
113
|
+
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
|
|
114
|
+
engines: {node: '>=8'}
|
|
115
|
+
|
|
116
|
+
ansi-regex@6.2.2:
|
|
117
|
+
resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==}
|
|
118
|
+
engines: {node: '>=12'}
|
|
119
|
+
|
|
120
|
+
ansi-styles@4.3.0:
|
|
121
|
+
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
|
|
122
|
+
engines: {node: '>=8'}
|
|
123
|
+
|
|
124
|
+
chalk@4.1.2:
|
|
125
|
+
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
|
126
|
+
engines: {node: '>=10'}
|
|
127
|
+
|
|
128
|
+
chalk@5.6.2:
|
|
129
|
+
resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==}
|
|
130
|
+
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
|
131
|
+
|
|
132
|
+
chardet@0.7.0:
|
|
133
|
+
resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==}
|
|
134
|
+
|
|
135
|
+
cli-cursor@5.0.0:
|
|
136
|
+
resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==}
|
|
137
|
+
engines: {node: '>=18'}
|
|
138
|
+
|
|
139
|
+
cli-spinners@2.9.2:
|
|
140
|
+
resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==}
|
|
141
|
+
engines: {node: '>=6'}
|
|
142
|
+
|
|
143
|
+
cli-width@4.1.0:
|
|
144
|
+
resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==}
|
|
145
|
+
engines: {node: '>= 12'}
|
|
146
|
+
|
|
147
|
+
color-convert@2.0.1:
|
|
148
|
+
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
|
|
149
|
+
engines: {node: '>=7.0.0'}
|
|
150
|
+
|
|
151
|
+
color-name@1.1.4:
|
|
152
|
+
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
|
153
|
+
|
|
154
|
+
commander@12.1.0:
|
|
155
|
+
resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}
|
|
156
|
+
engines: {node: '>=18'}
|
|
157
|
+
|
|
158
|
+
emoji-regex@10.6.0:
|
|
159
|
+
resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==}
|
|
160
|
+
|
|
161
|
+
emoji-regex@8.0.0:
|
|
162
|
+
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
|
163
|
+
|
|
164
|
+
external-editor@3.1.0:
|
|
165
|
+
resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==}
|
|
166
|
+
engines: {node: '>=4'}
|
|
167
|
+
|
|
168
|
+
get-east-asian-width@1.5.0:
|
|
169
|
+
resolution: {integrity: sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==}
|
|
170
|
+
engines: {node: '>=18'}
|
|
171
|
+
|
|
172
|
+
has-flag@4.0.0:
|
|
173
|
+
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
|
|
174
|
+
engines: {node: '>=8'}
|
|
175
|
+
|
|
176
|
+
iconv-lite@0.4.24:
|
|
177
|
+
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
|
|
178
|
+
engines: {node: '>=0.10.0'}
|
|
179
|
+
|
|
180
|
+
is-fullwidth-code-point@3.0.0:
|
|
181
|
+
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
|
|
182
|
+
engines: {node: '>=8'}
|
|
183
|
+
|
|
184
|
+
is-interactive@2.0.0:
|
|
185
|
+
resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==}
|
|
186
|
+
engines: {node: '>=12'}
|
|
187
|
+
|
|
188
|
+
is-unicode-supported@1.3.0:
|
|
189
|
+
resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==}
|
|
190
|
+
engines: {node: '>=12'}
|
|
191
|
+
|
|
192
|
+
is-unicode-supported@2.1.0:
|
|
193
|
+
resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==}
|
|
194
|
+
engines: {node: '>=18'}
|
|
195
|
+
|
|
196
|
+
log-symbols@6.0.0:
|
|
197
|
+
resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==}
|
|
198
|
+
engines: {node: '>=18'}
|
|
199
|
+
|
|
200
|
+
mimic-function@5.0.1:
|
|
201
|
+
resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==}
|
|
202
|
+
engines: {node: '>=18'}
|
|
203
|
+
|
|
204
|
+
mute-stream@1.0.0:
|
|
205
|
+
resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==}
|
|
206
|
+
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
|
207
|
+
|
|
208
|
+
onetime@7.0.0:
|
|
209
|
+
resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}
|
|
210
|
+
engines: {node: '>=18'}
|
|
211
|
+
|
|
212
|
+
only-allow@1.2.2:
|
|
213
|
+
resolution: {integrity: sha512-uxyNYDsCh5YIJ780G7hC5OHjVUr9reHsbZNMM80L9tZlTpb3hUzb36KXgW4ZUGtJKQnGA3xegmWg1BxhWV0jJA==}
|
|
214
|
+
hasBin: true
|
|
215
|
+
|
|
216
|
+
ora@8.2.0:
|
|
217
|
+
resolution: {integrity: sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==}
|
|
218
|
+
engines: {node: '>=18'}
|
|
219
|
+
|
|
220
|
+
os-tmpdir@1.0.2:
|
|
221
|
+
resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
|
|
222
|
+
engines: {node: '>=0.10.0'}
|
|
223
|
+
|
|
224
|
+
restore-cursor@5.1.0:
|
|
225
|
+
resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==}
|
|
226
|
+
engines: {node: '>=18'}
|
|
227
|
+
|
|
228
|
+
safer-buffer@2.1.2:
|
|
229
|
+
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
|
|
230
|
+
|
|
231
|
+
signal-exit@4.1.0:
|
|
232
|
+
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
|
|
233
|
+
engines: {node: '>=14'}
|
|
234
|
+
|
|
235
|
+
stdin-discarder@0.2.2:
|
|
236
|
+
resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==}
|
|
237
|
+
engines: {node: '>=18'}
|
|
238
|
+
|
|
239
|
+
string-width@4.2.3:
|
|
240
|
+
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
|
|
241
|
+
engines: {node: '>=8'}
|
|
242
|
+
|
|
243
|
+
string-width@7.2.0:
|
|
244
|
+
resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==}
|
|
245
|
+
engines: {node: '>=18'}
|
|
246
|
+
|
|
247
|
+
strip-ansi@6.0.1:
|
|
248
|
+
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
|
|
249
|
+
engines: {node: '>=8'}
|
|
250
|
+
|
|
251
|
+
strip-ansi@7.2.0:
|
|
252
|
+
resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==}
|
|
253
|
+
engines: {node: '>=12'}
|
|
254
|
+
|
|
255
|
+
supports-color@7.2.0:
|
|
256
|
+
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
|
|
257
|
+
engines: {node: '>=8'}
|
|
258
|
+
|
|
259
|
+
tmp@0.0.33:
|
|
260
|
+
resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==}
|
|
261
|
+
engines: {node: '>=0.6.0'}
|
|
262
|
+
|
|
263
|
+
type-fest@0.21.3:
|
|
264
|
+
resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==}
|
|
265
|
+
engines: {node: '>=10'}
|
|
266
|
+
|
|
267
|
+
typescript@5.9.3:
|
|
268
|
+
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
|
|
269
|
+
engines: {node: '>=14.17'}
|
|
270
|
+
hasBin: true
|
|
271
|
+
|
|
272
|
+
undici-types@6.21.0:
|
|
273
|
+
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
|
|
274
|
+
|
|
275
|
+
which-pm-runs@1.1.0:
|
|
276
|
+
resolution: {integrity: sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==}
|
|
277
|
+
engines: {node: '>=4'}
|
|
278
|
+
|
|
279
|
+
wrap-ansi@6.2.0:
|
|
280
|
+
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
|
|
281
|
+
engines: {node: '>=8'}
|
|
282
|
+
|
|
283
|
+
yoctocolors-cjs@2.1.3:
|
|
284
|
+
resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==}
|
|
285
|
+
engines: {node: '>=18'}
|
|
286
|
+
|
|
287
|
+
snapshots:
|
|
288
|
+
|
|
289
|
+
'@inquirer/checkbox@2.5.0':
|
|
290
|
+
dependencies:
|
|
291
|
+
'@inquirer/core': 9.2.1
|
|
292
|
+
'@inquirer/figures': 1.0.15
|
|
293
|
+
'@inquirer/type': 1.5.5
|
|
294
|
+
ansi-escapes: 4.3.2
|
|
295
|
+
yoctocolors-cjs: 2.1.3
|
|
296
|
+
|
|
297
|
+
'@inquirer/confirm@3.2.0':
|
|
298
|
+
dependencies:
|
|
299
|
+
'@inquirer/core': 9.2.1
|
|
300
|
+
'@inquirer/type': 1.5.5
|
|
301
|
+
|
|
302
|
+
'@inquirer/core@9.2.1':
|
|
303
|
+
dependencies:
|
|
304
|
+
'@inquirer/figures': 1.0.15
|
|
305
|
+
'@inquirer/type': 2.0.0
|
|
306
|
+
'@types/mute-stream': 0.0.4
|
|
307
|
+
'@types/node': 22.19.17
|
|
308
|
+
'@types/wrap-ansi': 3.0.0
|
|
309
|
+
ansi-escapes: 4.3.2
|
|
310
|
+
cli-width: 4.1.0
|
|
311
|
+
mute-stream: 1.0.0
|
|
312
|
+
signal-exit: 4.1.0
|
|
313
|
+
strip-ansi: 6.0.1
|
|
314
|
+
wrap-ansi: 6.2.0
|
|
315
|
+
yoctocolors-cjs: 2.1.3
|
|
316
|
+
|
|
317
|
+
'@inquirer/editor@2.2.0':
|
|
318
|
+
dependencies:
|
|
319
|
+
'@inquirer/core': 9.2.1
|
|
320
|
+
'@inquirer/type': 1.5.5
|
|
321
|
+
external-editor: 3.1.0
|
|
322
|
+
|
|
323
|
+
'@inquirer/expand@2.3.0':
|
|
324
|
+
dependencies:
|
|
325
|
+
'@inquirer/core': 9.2.1
|
|
326
|
+
'@inquirer/type': 1.5.5
|
|
327
|
+
yoctocolors-cjs: 2.1.3
|
|
328
|
+
|
|
329
|
+
'@inquirer/figures@1.0.15': {}
|
|
330
|
+
|
|
331
|
+
'@inquirer/input@2.3.0':
|
|
332
|
+
dependencies:
|
|
333
|
+
'@inquirer/core': 9.2.1
|
|
334
|
+
'@inquirer/type': 1.5.5
|
|
335
|
+
|
|
336
|
+
'@inquirer/number@1.1.0':
|
|
337
|
+
dependencies:
|
|
338
|
+
'@inquirer/core': 9.2.1
|
|
339
|
+
'@inquirer/type': 1.5.5
|
|
340
|
+
|
|
341
|
+
'@inquirer/password@2.2.0':
|
|
342
|
+
dependencies:
|
|
343
|
+
'@inquirer/core': 9.2.1
|
|
344
|
+
'@inquirer/type': 1.5.5
|
|
345
|
+
ansi-escapes: 4.3.2
|
|
346
|
+
|
|
347
|
+
'@inquirer/prompts@5.5.0':
|
|
348
|
+
dependencies:
|
|
349
|
+
'@inquirer/checkbox': 2.5.0
|
|
350
|
+
'@inquirer/confirm': 3.2.0
|
|
351
|
+
'@inquirer/editor': 2.2.0
|
|
352
|
+
'@inquirer/expand': 2.3.0
|
|
353
|
+
'@inquirer/input': 2.3.0
|
|
354
|
+
'@inquirer/number': 1.1.0
|
|
355
|
+
'@inquirer/password': 2.2.0
|
|
356
|
+
'@inquirer/rawlist': 2.3.0
|
|
357
|
+
'@inquirer/search': 1.1.0
|
|
358
|
+
'@inquirer/select': 2.5.0
|
|
359
|
+
|
|
360
|
+
'@inquirer/rawlist@2.3.0':
|
|
361
|
+
dependencies:
|
|
362
|
+
'@inquirer/core': 9.2.1
|
|
363
|
+
'@inquirer/type': 1.5.5
|
|
364
|
+
yoctocolors-cjs: 2.1.3
|
|
365
|
+
|
|
366
|
+
'@inquirer/search@1.1.0':
|
|
367
|
+
dependencies:
|
|
368
|
+
'@inquirer/core': 9.2.1
|
|
369
|
+
'@inquirer/figures': 1.0.15
|
|
370
|
+
'@inquirer/type': 1.5.5
|
|
371
|
+
yoctocolors-cjs: 2.1.3
|
|
372
|
+
|
|
373
|
+
'@inquirer/select@2.5.0':
|
|
374
|
+
dependencies:
|
|
375
|
+
'@inquirer/core': 9.2.1
|
|
376
|
+
'@inquirer/figures': 1.0.15
|
|
377
|
+
'@inquirer/type': 1.5.5
|
|
378
|
+
ansi-escapes: 4.3.2
|
|
379
|
+
yoctocolors-cjs: 2.1.3
|
|
380
|
+
|
|
381
|
+
'@inquirer/type@1.5.5':
|
|
382
|
+
dependencies:
|
|
383
|
+
mute-stream: 1.0.0
|
|
384
|
+
|
|
385
|
+
'@inquirer/type@2.0.0':
|
|
386
|
+
dependencies:
|
|
387
|
+
mute-stream: 1.0.0
|
|
388
|
+
|
|
389
|
+
'@types/mute-stream@0.0.4':
|
|
390
|
+
dependencies:
|
|
391
|
+
'@types/node': 20.19.39
|
|
392
|
+
|
|
393
|
+
'@types/node@20.19.39':
|
|
394
|
+
dependencies:
|
|
395
|
+
undici-types: 6.21.0
|
|
396
|
+
|
|
397
|
+
'@types/node@22.19.17':
|
|
398
|
+
dependencies:
|
|
399
|
+
undici-types: 6.21.0
|
|
400
|
+
|
|
401
|
+
'@types/wrap-ansi@3.0.0': {}
|
|
402
|
+
|
|
403
|
+
ansi-escapes@4.3.2:
|
|
404
|
+
dependencies:
|
|
405
|
+
type-fest: 0.21.3
|
|
406
|
+
|
|
407
|
+
ansi-regex@5.0.1: {}
|
|
408
|
+
|
|
409
|
+
ansi-regex@6.2.2: {}
|
|
410
|
+
|
|
411
|
+
ansi-styles@4.3.0:
|
|
412
|
+
dependencies:
|
|
413
|
+
color-convert: 2.0.1
|
|
414
|
+
|
|
415
|
+
chalk@4.1.2:
|
|
416
|
+
dependencies:
|
|
417
|
+
ansi-styles: 4.3.0
|
|
418
|
+
supports-color: 7.2.0
|
|
419
|
+
|
|
420
|
+
chalk@5.6.2: {}
|
|
421
|
+
|
|
422
|
+
chardet@0.7.0: {}
|
|
423
|
+
|
|
424
|
+
cli-cursor@5.0.0:
|
|
425
|
+
dependencies:
|
|
426
|
+
restore-cursor: 5.1.0
|
|
427
|
+
|
|
428
|
+
cli-spinners@2.9.2: {}
|
|
429
|
+
|
|
430
|
+
cli-width@4.1.0: {}
|
|
431
|
+
|
|
432
|
+
color-convert@2.0.1:
|
|
433
|
+
dependencies:
|
|
434
|
+
color-name: 1.1.4
|
|
435
|
+
|
|
436
|
+
color-name@1.1.4: {}
|
|
437
|
+
|
|
438
|
+
commander@12.1.0: {}
|
|
439
|
+
|
|
440
|
+
emoji-regex@10.6.0: {}
|
|
441
|
+
|
|
442
|
+
emoji-regex@8.0.0: {}
|
|
443
|
+
|
|
444
|
+
external-editor@3.1.0:
|
|
445
|
+
dependencies:
|
|
446
|
+
chardet: 0.7.0
|
|
447
|
+
iconv-lite: 0.4.24
|
|
448
|
+
tmp: 0.0.33
|
|
449
|
+
|
|
450
|
+
get-east-asian-width@1.5.0: {}
|
|
451
|
+
|
|
452
|
+
has-flag@4.0.0: {}
|
|
453
|
+
|
|
454
|
+
iconv-lite@0.4.24:
|
|
455
|
+
dependencies:
|
|
456
|
+
safer-buffer: 2.1.2
|
|
457
|
+
|
|
458
|
+
is-fullwidth-code-point@3.0.0: {}
|
|
459
|
+
|
|
460
|
+
is-interactive@2.0.0: {}
|
|
461
|
+
|
|
462
|
+
is-unicode-supported@1.3.0: {}
|
|
463
|
+
|
|
464
|
+
is-unicode-supported@2.1.0: {}
|
|
465
|
+
|
|
466
|
+
log-symbols@6.0.0:
|
|
467
|
+
dependencies:
|
|
468
|
+
chalk: 5.6.2
|
|
469
|
+
is-unicode-supported: 1.3.0
|
|
470
|
+
|
|
471
|
+
mimic-function@5.0.1: {}
|
|
472
|
+
|
|
473
|
+
mute-stream@1.0.0: {}
|
|
474
|
+
|
|
475
|
+
onetime@7.0.0:
|
|
476
|
+
dependencies:
|
|
477
|
+
mimic-function: 5.0.1
|
|
478
|
+
|
|
479
|
+
only-allow@1.2.2:
|
|
480
|
+
dependencies:
|
|
481
|
+
which-pm-runs: 1.1.0
|
|
482
|
+
|
|
483
|
+
ora@8.2.0:
|
|
484
|
+
dependencies:
|
|
485
|
+
chalk: 5.6.2
|
|
486
|
+
cli-cursor: 5.0.0
|
|
487
|
+
cli-spinners: 2.9.2
|
|
488
|
+
is-interactive: 2.0.0
|
|
489
|
+
is-unicode-supported: 2.1.0
|
|
490
|
+
log-symbols: 6.0.0
|
|
491
|
+
stdin-discarder: 0.2.2
|
|
492
|
+
string-width: 7.2.0
|
|
493
|
+
strip-ansi: 7.2.0
|
|
494
|
+
|
|
495
|
+
os-tmpdir@1.0.2: {}
|
|
496
|
+
|
|
497
|
+
restore-cursor@5.1.0:
|
|
498
|
+
dependencies:
|
|
499
|
+
onetime: 7.0.0
|
|
500
|
+
signal-exit: 4.1.0
|
|
501
|
+
|
|
502
|
+
safer-buffer@2.1.2: {}
|
|
503
|
+
|
|
504
|
+
signal-exit@4.1.0: {}
|
|
505
|
+
|
|
506
|
+
stdin-discarder@0.2.2: {}
|
|
507
|
+
|
|
508
|
+
string-width@4.2.3:
|
|
509
|
+
dependencies:
|
|
510
|
+
emoji-regex: 8.0.0
|
|
511
|
+
is-fullwidth-code-point: 3.0.0
|
|
512
|
+
strip-ansi: 6.0.1
|
|
513
|
+
|
|
514
|
+
string-width@7.2.0:
|
|
515
|
+
dependencies:
|
|
516
|
+
emoji-regex: 10.6.0
|
|
517
|
+
get-east-asian-width: 1.5.0
|
|
518
|
+
strip-ansi: 7.2.0
|
|
519
|
+
|
|
520
|
+
strip-ansi@6.0.1:
|
|
521
|
+
dependencies:
|
|
522
|
+
ansi-regex: 5.0.1
|
|
523
|
+
|
|
524
|
+
strip-ansi@7.2.0:
|
|
525
|
+
dependencies:
|
|
526
|
+
ansi-regex: 6.2.2
|
|
527
|
+
|
|
528
|
+
supports-color@7.2.0:
|
|
529
|
+
dependencies:
|
|
530
|
+
has-flag: 4.0.0
|
|
531
|
+
|
|
532
|
+
tmp@0.0.33:
|
|
533
|
+
dependencies:
|
|
534
|
+
os-tmpdir: 1.0.2
|
|
535
|
+
|
|
536
|
+
type-fest@0.21.3: {}
|
|
537
|
+
|
|
538
|
+
typescript@5.9.3: {}
|
|
539
|
+
|
|
540
|
+
undici-types@6.21.0: {}
|
|
541
|
+
|
|
542
|
+
which-pm-runs@1.1.0: {}
|
|
543
|
+
|
|
544
|
+
wrap-ansi@6.2.0:
|
|
545
|
+
dependencies:
|
|
546
|
+
ansi-styles: 4.3.0
|
|
547
|
+
string-width: 4.2.3
|
|
548
|
+
strip-ansi: 6.0.1
|
|
549
|
+
|
|
550
|
+
yoctocolors-cjs@2.1.3: {}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -Eeuo pipefail
|
|
3
|
+
|
|
4
|
+
COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
|
|
5
|
+
cd "${COZE_WORKSPACE_PATH}"
|
|
6
|
+
|
|
7
|
+
echo "Installing dependencies..."
|
|
8
|
+
pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
9
|
+
|
|
10
|
+
echo "Building the project..."
|
|
11
|
+
npx tsc
|
|
12
|
+
|
|
13
|
+
echo "Build completed successfully!"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -Eeuo pipefail
|
|
3
|
+
|
|
4
|
+
COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
|
|
5
|
+
cd "${COZE_WORKSPACE_PATH}"
|
|
6
|
+
|
|
7
|
+
echo "Building the project..."
|
|
8
|
+
pnpm build
|
|
9
|
+
|
|
10
|
+
echo "Linking CLI to global..."
|
|
11
|
+
pnpm link --global
|
|
12
|
+
|
|
13
|
+
echo "========================================="
|
|
14
|
+
echo "✅ CLI linked successfully!"
|
|
15
|
+
echo "💡 To unlink this CLI later, you can run:"
|
|
16
|
+
echo " pnpm unlink --global"
|
|
17
|
+
echo "========================================="
|
|
18
|
+
|
|
19
|
+
echo "Starting development mode..."
|
|
20
|
+
npx tsc --watch
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { input } from '@inquirer/prompts';
|
|
5
|
+
import ora from 'ora';
|
|
6
|
+
|
|
7
|
+
const program = new Command();
|
|
8
|
+
|
|
9
|
+
program
|
|
10
|
+
.name('<%= appName %>')
|
|
11
|
+
.description('A CLI application built with Commander and Inquirer')
|
|
12
|
+
.version('1.0.0')
|
|
13
|
+
.option('-n, --name <string>', 'Your name')
|
|
14
|
+
.action(async (options) => {
|
|
15
|
+
let name = options.name;
|
|
16
|
+
|
|
17
|
+
// 如果没有传入 --name 参数,则通过交互式问询获取
|
|
18
|
+
if (!name) {
|
|
19
|
+
name = await input({
|
|
20
|
+
message: 'What is your name?',
|
|
21
|
+
default: process.env.USER || '<%= appName %>',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const spinner = ora('Processing...').start();
|
|
26
|
+
|
|
27
|
+
// 模拟一个异步任务
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
spinner.succeed('Done!');
|
|
30
|
+
console.log(chalk.green(`Hello, ${chalk.bold(name)}! Welcome to your new CLI.`));
|
|
31
|
+
}, 1000);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
program.parse(process.argv);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export const paramsSchema = {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
appName: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
minLength: 1,
|
|
15
|
+
pattern: '^[a-z0-9-]+$',
|
|
16
|
+
description:
|
|
17
|
+
'Application name (lowercase, alphanumeric and hyphens only)',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
required: [],
|
|
21
|
+
additionalProperties: false,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const config = {
|
|
25
|
+
description: 'Standard CLI application (Commander + Inquirer)',
|
|
26
|
+
paramsSchema,
|
|
27
|
+
|
|
28
|
+
defaultParams: {
|
|
29
|
+
appName: 'my-cli',
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
skipDev: true,
|
|
33
|
+
|
|
34
|
+
onBeforeRender: async context => {
|
|
35
|
+
console.log(`Creating CLI project: ${context.appName}`);
|
|
36
|
+
return context;
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
onAfterRender: async (context, outputPath) => {
|
|
40
|
+
console.log(`\nProject created at: ${outputPath}`);
|
|
41
|
+
console.log(`\nConfiguration:`);
|
|
42
|
+
console.log(` - TypeScript: enabled`);
|
|
43
|
+
console.log(` - Framework: Commander`);
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default config;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2022",
|
|
4
|
+
"module": "nodenext",
|
|
5
|
+
"moduleResolution": "nodenext",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"types": ["node"],
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"outDir": "dist"
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft-07/schema",
|
|
3
3
|
"templates": [
|
|
4
|
+
{
|
|
5
|
+
"name": "cli",
|
|
6
|
+
"description": "Standard CLI application (Commander + Inquirer)",
|
|
7
|
+
"location": "./cli",
|
|
8
|
+
"paramsSchema": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"appName": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"pattern": "^[a-z0-9-]+$",
|
|
15
|
+
"description": "Application name (lowercase, alphanumeric and hyphens only)"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [],
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
4
22
|
{
|
|
5
23
|
"name": "expo",
|
|
6
24
|
"description": "Expo template for React Native applications",
|
package/lib/cli.js
CHANGED
|
@@ -2106,7 +2106,7 @@ const EventBuilder = {
|
|
|
2106
2106
|
};
|
|
2107
2107
|
|
|
2108
2108
|
var name = "@coze-arch/cli";
|
|
2109
|
-
var version = "0.0.10-alpha.
|
|
2109
|
+
var version = "0.0.10-alpha.1717be";
|
|
2110
2110
|
var description = "coze coding devtools cli";
|
|
2111
2111
|
var license = "MIT";
|
|
2112
2112
|
var author = "fanwenjie.fe@bytedance.com";
|