@nocobase/cli 2.1.0-beta.16 → 2.1.0-beta.19
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/README.md +31 -0
- package/bin/run.js +13 -11
- package/dist/commands/download.js +143 -21
- package/dist/commands/init.js +23 -7
- package/dist/commands/install.js +67 -19
- package/dist/commands/self/check.js +71 -0
- package/dist/commands/self/index.js +20 -0
- package/dist/commands/self/update.js +76 -0
- package/dist/commands/skills/check.js +63 -0
- package/dist/commands/skills/index.js +20 -0
- package/dist/commands/skills/install.js +58 -0
- package/dist/commands/skills/update.js +58 -0
- package/dist/commands/test.js +466 -0
- package/dist/lib/prompt-catalog.js +11 -4
- package/dist/lib/prompt-web-ui.js +45 -10
- package/dist/lib/run-npm.js +91 -17
- package/dist/lib/self-manager.js +246 -0
- package/dist/lib/skills-manager.js +202 -0
- package/dist/locale/en-US.json +56 -5
- package/dist/locale/zh-CN.json +57 -6
- package/package.json +11 -4
package/dist/locale/en-US.json
CHANGED
|
@@ -95,16 +95,67 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"download": {
|
|
98
|
+
"failures": {
|
|
99
|
+
"dependencyInstall": {
|
|
100
|
+
"title": "Couldn't finish preparing the local NocoBase app.",
|
|
101
|
+
"body": "The download completed, but dependency installation did not finish successfully.",
|
|
102
|
+
"hint": "Run the same command again with `--verbose` to see the full install logs."
|
|
103
|
+
},
|
|
104
|
+
"gitClone": {
|
|
105
|
+
"title": "Couldn't download NocoBase from Git.",
|
|
106
|
+
"body": "The CLI was not able to clone the selected NocoBase repository.",
|
|
107
|
+
"hint": "Run the same command again with `--verbose` to see the full clone logs."
|
|
108
|
+
},
|
|
109
|
+
"dockerPull": {
|
|
110
|
+
"title": "Couldn't download the Docker image.",
|
|
111
|
+
"body": "The CLI was not able to pull the selected NocoBase image.",
|
|
112
|
+
"hint": "Run the same command again with `--verbose` to see the full Docker pull logs."
|
|
113
|
+
},
|
|
114
|
+
"dockerSave": {
|
|
115
|
+
"title": "The Docker image was pulled, but saving the tar file failed.",
|
|
116
|
+
"body": "The CLI could not finish exporting the image to the target tarball path.",
|
|
117
|
+
"hint": "Run the same command again with `--verbose` to see the full Docker save logs."
|
|
118
|
+
},
|
|
119
|
+
"scaffold": {
|
|
120
|
+
"title": "Couldn't create the local NocoBase app scaffold.",
|
|
121
|
+
"body": "The CLI was not able to finish generating the initial app files.",
|
|
122
|
+
"hint": "Run the same command again with `--verbose` to see the full scaffold logs."
|
|
123
|
+
},
|
|
124
|
+
"build": {
|
|
125
|
+
"title": "The local NocoBase app was downloaded, but the build step failed.",
|
|
126
|
+
"body": "The CLI could not finish building the downloaded source code.",
|
|
127
|
+
"hint": "Run the same command again with `--verbose` to see the full build logs."
|
|
128
|
+
},
|
|
129
|
+
"generic": {
|
|
130
|
+
"title": "Couldn't finish downloading NocoBase.",
|
|
131
|
+
"body": "The CLI hit an unexpected command failure while preparing the download.",
|
|
132
|
+
"hint": "Run the same command again with `--verbose` to see the full command logs."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
98
135
|
"prompts": {
|
|
99
136
|
"source": {
|
|
100
137
|
"message": "How would you like to get NocoBase?",
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
138
|
+
"dockerLabel": "Docker install (Recommended)",
|
|
139
|
+
"dockerHint": "Best for no-code and low-maintenance setups. You can upgrade later by pulling a newer image and restarting the app.",
|
|
140
|
+
"npmLabel": "create-nocobase-app install",
|
|
141
|
+
"npmHint": "Best when you want an app project with business code kept separate from the NocoBase framework, while still supporting low-code development.",
|
|
142
|
+
"gitLabel": "Git source install",
|
|
143
|
+
"gitHint": "Best when you want to try the latest unreleased changes, contribute code, or debug and modify NocoBase source directly. This option is more developer-oriented."
|
|
104
144
|
},
|
|
105
145
|
"version": {
|
|
106
|
-
"message": "Which version would you like to use?
|
|
107
|
-
"
|
|
146
|
+
"message": "Which version would you like to use?",
|
|
147
|
+
"latestLabel": "latest",
|
|
148
|
+
"latestHint": "Stable release. Best for production use and the most predictable experience. Currently unavailable.",
|
|
149
|
+
"betaLabel": "beta",
|
|
150
|
+
"betaHint": "Preview release. Good for trying upcoming features before general release.",
|
|
151
|
+
"alphaLabel": "alpha",
|
|
152
|
+
"alphaHint": "Development release. Includes the newest changes, but may be incomplete or unstable.",
|
|
153
|
+
"otherLabel": "Other",
|
|
154
|
+
"otherHint": "Enter another package version, Docker tag, or Git ref manually, such as a branch name."
|
|
155
|
+
},
|
|
156
|
+
"otherVersion": {
|
|
157
|
+
"message": "Enter the version, Docker tag, or Git ref you want to use.",
|
|
158
|
+
"placeholder": "For example: fix/cli-v2"
|
|
108
159
|
},
|
|
109
160
|
"dockerRegistry": {
|
|
110
161
|
"message": "Which Docker registry would you like to use? The image tag is set separately in Version.",
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -95,20 +95,71 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"download": {
|
|
98
|
+
"failures": {
|
|
99
|
+
"dependencyInstall": {
|
|
100
|
+
"title": "本地 NocoBase 应用还没有准备完成。",
|
|
101
|
+
"body": "下载已经完成,但依赖安装没有成功结束。",
|
|
102
|
+
"hint": "请使用相同命令加上 `--verbose` 重试,以查看完整安装日志。"
|
|
103
|
+
},
|
|
104
|
+
"gitClone": {
|
|
105
|
+
"title": "无法通过 Git 下载 NocoBase。",
|
|
106
|
+
"body": "CLI 没有成功克隆你选择的 NocoBase 仓库。",
|
|
107
|
+
"hint": "请使用相同命令加上 `--verbose` 重试,以查看完整克隆日志。"
|
|
108
|
+
},
|
|
109
|
+
"dockerPull": {
|
|
110
|
+
"title": "无法下载 Docker 镜像。",
|
|
111
|
+
"body": "CLI 没有成功拉取你选择的 NocoBase 镜像。",
|
|
112
|
+
"hint": "请使用相同命令加上 `--verbose` 重试,以查看完整 Docker pull 日志。"
|
|
113
|
+
},
|
|
114
|
+
"dockerSave": {
|
|
115
|
+
"title": "Docker 镜像已经拉取完成,但导出 tar 文件失败了。",
|
|
116
|
+
"body": "CLI 没有成功将镜像导出到目标 tar 包路径。",
|
|
117
|
+
"hint": "请使用相同命令加上 `--verbose` 重试,以查看完整 Docker save 日志。"
|
|
118
|
+
},
|
|
119
|
+
"scaffold": {
|
|
120
|
+
"title": "无法创建本地 NocoBase 应用骨架。",
|
|
121
|
+
"body": "CLI 没有成功生成初始应用文件。",
|
|
122
|
+
"hint": "请使用相同命令加上 `--verbose` 重试,以查看完整 scaffold 日志。"
|
|
123
|
+
},
|
|
124
|
+
"build": {
|
|
125
|
+
"title": "本地 NocoBase 应用已经下载完成,但构建步骤失败了。",
|
|
126
|
+
"body": "CLI 没有成功完成已下载源码的构建。",
|
|
127
|
+
"hint": "请使用相同命令加上 `--verbose` 重试,以查看完整构建日志。"
|
|
128
|
+
},
|
|
129
|
+
"generic": {
|
|
130
|
+
"title": "无法完成 NocoBase 下载。",
|
|
131
|
+
"body": "CLI 在准备下载内容时遇到了未预期的命令失败。",
|
|
132
|
+
"hint": "请使用相同命令加上 `--verbose` 重试,以查看完整命令日志。"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
98
135
|
"prompts": {
|
|
99
136
|
"source": {
|
|
100
137
|
"message": "你想通过哪种方式获取 NocoBase?",
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
138
|
+
"dockerLabel": "Docker 安装(推荐)",
|
|
139
|
+
"dockerHint": "适合无代码或低维护成本场景。后续升级时,拉取新镜像并重启应用即可。",
|
|
140
|
+
"npmLabel": "create-nocobase-app 安装",
|
|
141
|
+
"npmHint": "适合希望将业务代码与 NocoBase 框架保持独立的场景,同时仍然支持低代码开发。",
|
|
142
|
+
"gitLabel": "Git 源码安装",
|
|
143
|
+
"gitHint": "适合体验最新未发布版本、参与贡献,或直接修改和调试 NocoBase 源码。这个方式更偏向开发者使用。"
|
|
104
144
|
},
|
|
105
145
|
"version": {
|
|
106
|
-
"message": "
|
|
107
|
-
"
|
|
146
|
+
"message": "你想使用哪个版本?",
|
|
147
|
+
"latestLabel": "latest",
|
|
148
|
+
"latestHint": "稳定版。适合生产环境和希望获得稳定体验的场景。当前暂不可用。",
|
|
149
|
+
"betaLabel": "beta",
|
|
150
|
+
"betaHint": "测试版。包含即将发布的新功能,适合提前体验和反馈。",
|
|
151
|
+
"alphaLabel": "alpha",
|
|
152
|
+
"alphaHint": "开发版。功能更新最快,但可能不完整或不稳定。",
|
|
153
|
+
"otherLabel": "其他",
|
|
154
|
+
"otherHint": "手动填写其他版本号、Docker tag 或 Git ref,例如分支名。"
|
|
155
|
+
},
|
|
156
|
+
"otherVersion": {
|
|
157
|
+
"message": "请输入你想使用的版本号、Docker tag 或 Git ref。",
|
|
158
|
+
"placeholder": "例如:fix/cli-v2"
|
|
108
159
|
},
|
|
109
160
|
"dockerRegistry": {
|
|
110
161
|
"message": "你想使用哪个 Docker registry?镜像 tag 请单独在 Version 中填写。",
|
|
111
|
-
"placeholder": "nocobase/nocobase"
|
|
162
|
+
"placeholder": "registry.cn-shanghai.aliyuncs.com/nocobase/nocobase"
|
|
112
163
|
},
|
|
113
164
|
"dockerPlatform": {
|
|
114
165
|
"message": "要使用哪个 Docker 镜像平台?",
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/cli",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.19",
|
|
4
4
|
"description": "NocoBase Command Line Tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/generated/command-registry.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"clean": "
|
|
9
|
-
"build": "
|
|
8
|
+
"clean": "node ./scripts/clean.mjs",
|
|
9
|
+
"build": "node ./scripts/build.mjs",
|
|
10
10
|
"test": "TEST_ENV=server-side yarn --cwd ../../.. vitest run packages/core/cli"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [],
|
|
@@ -39,6 +39,12 @@
|
|
|
39
39
|
"env": {
|
|
40
40
|
"description": "Manage NocoBase project environments and update command runtimes."
|
|
41
41
|
},
|
|
42
|
+
"self": {
|
|
43
|
+
"description": "Inspect or update the NocoBase CLI itself."
|
|
44
|
+
},
|
|
45
|
+
"skills": {
|
|
46
|
+
"description": "Inspect or synchronize NocoBase AI coding skills for the current workspace."
|
|
47
|
+
},
|
|
42
48
|
"api": {
|
|
43
49
|
"description": "Work with NocoBase API."
|
|
44
50
|
}
|
|
@@ -47,6 +53,7 @@
|
|
|
47
53
|
"dependencies": {
|
|
48
54
|
"@clack/prompts": "^0.9.1",
|
|
49
55
|
"@oclif/core": "^4.10.4",
|
|
56
|
+
"cross-spawn": "^7.0.6",
|
|
50
57
|
"lodash": "^4.17.21",
|
|
51
58
|
"openapi-types": "^12.1.3",
|
|
52
59
|
"ora": "^8.2.0",
|
|
@@ -61,5 +68,5 @@
|
|
|
61
68
|
"type": "git",
|
|
62
69
|
"url": "git+https://github.com/nocobase/nocobase.git"
|
|
63
70
|
},
|
|
64
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "d89ab08dbcb25877de69827d5bad6823c27b2cbb"
|
|
65
72
|
}
|