@nocobase/cli 2.1.0-beta.35 → 2.1.0-beta.37
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 +1 -1
- package/README.zh-CN.md +1 -1
- package/bin/run.js +3 -2
- package/dist/commands/app/upgrade.js +38 -16
- package/dist/commands/backup/create.js +147 -0
- package/dist/commands/backup/index.js +20 -0
- package/dist/commands/backup/restore.js +105 -0
- package/dist/commands/config/delete.js +4 -0
- package/dist/commands/config/get.js +4 -0
- package/dist/commands/config/set.js +5 -1
- package/dist/commands/env/add.js +129 -15
- package/dist/commands/env/auth.js +145 -12
- package/dist/commands/env/info.js +52 -8
- package/dist/commands/env/list.js +2 -2
- package/dist/commands/env/shared.js +41 -3
- package/dist/commands/init.js +254 -136
- package/dist/commands/install.js +447 -272
- package/dist/commands/license/activate.js +6 -4
- package/dist/commands/source/publish.js +17 -0
- package/dist/commands/v1.js +210 -0
- package/dist/lib/app-managed-resources.js +20 -1
- package/dist/lib/app-runtime.js +13 -4
- package/dist/lib/auth-store.js +69 -18
- package/dist/lib/backup.js +171 -0
- package/dist/lib/bootstrap.js +23 -13
- package/dist/lib/cli-config.js +99 -4
- package/dist/lib/cli-locale.js +19 -7
- package/dist/lib/db-connection-check.js +61 -0
- package/dist/lib/env-auth.js +79 -0
- package/dist/lib/env-config.js +8 -1
- package/dist/lib/prompt-validators.js +23 -5
- package/dist/lib/prompt-web-ui.js +143 -19
- package/dist/lib/run-npm.js +166 -30
- package/dist/lib/skills-manager.js +74 -4
- package/dist/lib/source-publish.js +20 -1
- package/dist/lib/source-registry.js +2 -2
- package/dist/locale/en-US.json +36 -5
- package/dist/locale/zh-CN.json +36 -5
- package/package.json +6 -3
package/dist/locale/zh-CN.json
CHANGED
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
"back": "上一步",
|
|
35
35
|
"next": "下一步",
|
|
36
36
|
"submit": "提交并回到终端继续",
|
|
37
|
+
"showPassword": "显示密码",
|
|
38
|
+
"hidePassword": "隐藏密码",
|
|
37
39
|
"checking": "检查中...",
|
|
38
40
|
"sending": "提交中...",
|
|
39
41
|
"successTitle": "成功",
|
|
@@ -73,7 +75,8 @@
|
|
|
73
75
|
"timeout": "连接数据库 {{host}}:{{port}} 超时,约 {{seconds}} 秒内未成功建立连接。",
|
|
74
76
|
"authenticationFailed": "无法使用用户 \"{{user}}\" 登录数据库 \"{{database}}\"。请检查用户名和密码。",
|
|
75
77
|
"databaseNotFound": "数据库 \"{{database}}\" 不存在,或当前连接配置无权访问该数据库。",
|
|
76
|
-
"connectionFailed": "数据库连接检查失败。详情:{{details}}"
|
|
78
|
+
"connectionFailed": "数据库连接检查失败。详情:{{details}}",
|
|
79
|
+
"lowerCaseTableNamesRequiresUnderscored": "当 MySQL 的 lower_case_table_names=1 时,必须设置 DB_UNDERSCORED=true。"
|
|
77
80
|
}
|
|
78
81
|
},
|
|
79
82
|
"commands": {
|
|
@@ -94,16 +97,28 @@
|
|
|
94
97
|
},
|
|
95
98
|
"authType": {
|
|
96
99
|
"message": "你想使用哪种登录方式?",
|
|
100
|
+
"basicLabel": "Basic 登录(用户名 + 密码)",
|
|
101
|
+
"basicHint": "保存后会用用户名和密码换取 Token",
|
|
97
102
|
"oauthLabel": "OAuth(浏览器登录)",
|
|
98
103
|
"oauthHint": "保存后会自动执行 nb env auth",
|
|
99
104
|
"tokenLabel": "API Token / API Key"
|
|
100
105
|
},
|
|
106
|
+
"username": {
|
|
107
|
+
"message": "请输入 Basic 登录用户名",
|
|
108
|
+
"placeholder": "admin"
|
|
109
|
+
},
|
|
110
|
+
"password": {
|
|
111
|
+
"message": "请输入 Basic 登录密码"
|
|
112
|
+
},
|
|
101
113
|
"accessToken": {
|
|
102
114
|
"message": "请输入 API Token 或 API Key",
|
|
103
115
|
"placeholder": "请输入你的 API Token / API Key"
|
|
104
116
|
}
|
|
105
117
|
}
|
|
106
118
|
},
|
|
119
|
+
"shared": {
|
|
120
|
+
"missingCommand": "无法执行 `{{action}}`,因为找不到 {{displayName}} 可执行文件。请先安装 {{displayName}},或更新 `nb config set {{configKey}} <path>` 后重试。"
|
|
121
|
+
},
|
|
107
122
|
"download": {
|
|
108
123
|
"failures": {
|
|
109
124
|
"dependencyInstall": {
|
|
@@ -206,6 +221,10 @@
|
|
|
206
221
|
}
|
|
207
222
|
},
|
|
208
223
|
"install": {
|
|
224
|
+
"messages": {
|
|
225
|
+
"skipDownloadDockerImageMissing": "无法继续执行 `--skip-download`,因为本地不存在 Docker 镜像 \"{{imageRef}}\"。请先手动加载或拉取这个镜像,或者去掉 `--skip-download` 后重试。",
|
|
226
|
+
"skipDownloadLocalAppMissing": "无法继续执行 `--skip-download`,因为 \"{{projectRoot}}\" 不存在,或者其中缺少 package.json。请把 `--app-root-path` 指向一个现有的 NocoBase 应用目录,或者去掉 `--skip-download` 后重试。"
|
|
227
|
+
},
|
|
209
228
|
"validation": {
|
|
210
229
|
"builtinDbUnsupported": "内置数据库暂不支持 \"{{dialect}}\"。请选择 PostgreSQL、MySQL 或 MariaDB,或者关闭内置数据库。"
|
|
211
230
|
},
|
|
@@ -229,9 +248,6 @@
|
|
|
229
248
|
"message": "上传文件和本地存储目录要放到哪里?",
|
|
230
249
|
"placeholder": "./<env>/storage/"
|
|
231
250
|
},
|
|
232
|
-
"fetchSource": {
|
|
233
|
-
"message": "如果应用目录为空,是否自动下载 NocoBase?"
|
|
234
|
-
},
|
|
235
251
|
"dbDialect": {
|
|
236
252
|
"message": "你想使用哪种数据库?"
|
|
237
253
|
},
|
|
@@ -259,6 +275,17 @@
|
|
|
259
275
|
"dbPassword": {
|
|
260
276
|
"message": "数据库密码是什么?"
|
|
261
277
|
},
|
|
278
|
+
"dbSchema": {
|
|
279
|
+
"message": "数据库 schema 是什么?(仅 PostgreSQL,可选)",
|
|
280
|
+
"placeholder": "留空则使用默认 schema"
|
|
281
|
+
},
|
|
282
|
+
"dbTablePrefix": {
|
|
283
|
+
"message": "要使用什么数据表前缀?(可选)",
|
|
284
|
+
"placeholder": "例如:nb_"
|
|
285
|
+
},
|
|
286
|
+
"dbUnderscored": {
|
|
287
|
+
"message": "数据库表名和字段名是否使用下划线风格?"
|
|
288
|
+
},
|
|
262
289
|
"rootUsername": {
|
|
263
290
|
"message": "设置初始管理员用户名",
|
|
264
291
|
"placeholder": "nocobase"
|
|
@@ -290,7 +317,8 @@
|
|
|
290
317
|
"uiOpening": "本地 setup 表单即将在浏览器中打开。这个表单需要等待人工填写。如果你正在使用 AI agent,请不要停止当前进程,CLI 会继续等待表单提交结果。",
|
|
291
318
|
"uiReady": "本地 setup 表单已就绪。",
|
|
292
319
|
"uiReadyHelp": "如果没有自动打开浏览器,请复制下面的地址到浏览器中继续。CLI 会继续等待表单提交,请保持当前终端会话继续运行。",
|
|
293
|
-
"uiOpenBrowserFallback": "无法自动打开浏览器。请复制上面的地址到浏览器中继续 setup,并保持当前终端会话继续运行。如果你正在使用 AI agent,请不要停止当前进程。"
|
|
320
|
+
"uiOpenBrowserFallback": "无法自动打开浏览器。请复制上面的地址到浏览器中继续 setup,并保持当前终端会话继续运行。如果你正在使用 AI agent,请不要停止当前进程。",
|
|
321
|
+
"skillsSyncRegistryUnavailable": "无法访问 npm registry 来同步 NocoBase AI coding skills。将跳过 skills 安装并继续执行 init。等 registry 可访问后,再运行 `nb skills install` 即可。"
|
|
294
322
|
},
|
|
295
323
|
"prompts": {
|
|
296
324
|
"appName": {
|
|
@@ -308,6 +336,9 @@
|
|
|
308
336
|
"apiBaseUrl": {
|
|
309
337
|
"message": "API 基础地址",
|
|
310
338
|
"placeholder": "https://demo.example.com/api 或 https://demo.example.com/api/__app/<subapp>"
|
|
339
|
+
},
|
|
340
|
+
"skipDownload": {
|
|
341
|
+
"message": "是否跳过下载 NocoBase,直接复用已有的本地应用文件或 Docker 镜像?"
|
|
311
342
|
}
|
|
312
343
|
},
|
|
313
344
|
"webUi": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/cli",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.37",
|
|
4
4
|
"description": "NocoBase Command Line Tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/generated/command-registry.js",
|
|
@@ -67,6 +67,9 @@
|
|
|
67
67
|
"self": {
|
|
68
68
|
"description": "Inspect or update the NocoBase CLI itself."
|
|
69
69
|
},
|
|
70
|
+
"backup": {
|
|
71
|
+
"description": "Create and restore NocoBase backups."
|
|
72
|
+
},
|
|
70
73
|
"skills": {
|
|
71
74
|
"description": "Inspect or synchronize NocoBase AI coding skills for the current workspace."
|
|
72
75
|
},
|
|
@@ -93,7 +96,7 @@
|
|
|
93
96
|
"ora": "^8.2.0",
|
|
94
97
|
"pg": "^8.14.1",
|
|
95
98
|
"picocolors": "^1.1.1",
|
|
96
|
-
"tar": "^7.
|
|
99
|
+
"tar": "^7.5.15"
|
|
97
100
|
},
|
|
98
101
|
"devDependencies": {
|
|
99
102
|
"@types/node": "^18.19.130",
|
|
@@ -105,5 +108,5 @@
|
|
|
105
108
|
"type": "git",
|
|
106
109
|
"url": "git+https://github.com/nocobase/nocobase.git"
|
|
107
110
|
},
|
|
108
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "7132e5b83ecc0e42b54715eaf1429c72bcef34ae"
|
|
109
112
|
}
|