@nocobase/cli 2.3.0-alpha.1 → 3.0.0-alpha.1

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.
Files changed (43) hide show
  1. package/assets/env-proxy/nginx/snippets/uploads-location.conf +4 -1
  2. package/dist/commands/config/set.js +1 -0
  3. package/dist/commands/init.js +13 -5
  4. package/dist/commands/install.js +104 -3
  5. package/dist/commands/portal/config.js +88 -0
  6. package/dist/commands/portal/create.js +105 -0
  7. package/dist/commands/portal/deploy.js +81 -0
  8. package/dist/commands/portal/destroy.js +104 -0
  9. package/dist/commands/portal/dev.js +71 -0
  10. package/dist/commands/portal/index.js +20 -0
  11. package/dist/commands/portal/info.js +82 -0
  12. package/dist/commands/portal/list.js +98 -0
  13. package/dist/commands/portal/pull.js +84 -0
  14. package/dist/commands/portal/push.js +79 -0
  15. package/dist/commands/source/dev.js +1 -1
  16. package/dist/lib/api-client.js +7 -0
  17. package/dist/lib/auth-store.js +3 -1
  18. package/dist/lib/cli-config.js +20 -1
  19. package/dist/lib/env-auth.js +2 -2
  20. package/dist/lib/env-config.js +3 -0
  21. package/dist/lib/env-proxy.js +141 -8
  22. package/dist/lib/managed-env-file.js +58 -2
  23. package/dist/lib/managed-init-env.js +6 -1
  24. package/dist/lib/naming.js +9 -0
  25. package/dist/lib/portal-command-env.js +31 -0
  26. package/dist/lib/portal-config.js +133 -0
  27. package/dist/lib/portal-configure.js +117 -0
  28. package/dist/lib/portal-create.js +433 -0
  29. package/dist/lib/portal-deploy.js +283 -0
  30. package/dist/lib/portal-destroy.js +100 -0
  31. package/dist/lib/portal-dev.js +79 -0
  32. package/dist/lib/portal-env-files.js +53 -0
  33. package/dist/lib/portal-info.js +31 -0
  34. package/dist/lib/portal-list.js +211 -0
  35. package/dist/lib/portal-source.js +523 -0
  36. package/dist/lib/proxy-caddy.js +2 -0
  37. package/dist/lib/proxy-nginx.js +1 -0
  38. package/dist/lib/run-npm.js +17 -16
  39. package/dist/lib/ui.js +28 -1
  40. package/dist/locale/en-US.json +178 -0
  41. package/dist/locale/zh-CN.json +178 -0
  42. package/nocobase-ctl.config.json +111 -0
  43. package/package.json +5 -2
@@ -168,6 +168,150 @@
168
168
  "refusal": "Refusing to run against env \"{{requestedEnv}}\" because the current env is \"{{currentEnv}}\" and interactive confirmation is unavailable in the current agent session.\n\nFor safety, the agent will not switch envs automatically and will not add --yes on your behalf.\n\nTo continue:\n- run `nb env use {{requestedEnv}}` yourself and then re-run the command, or\n- re-run the same command with `--env {{requestedEnv}} --yes` to confirm this one-off cross-env operation."
169
169
  }
170
170
  },
171
+ "portalCreate": {
172
+ "errors": {
173
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
174
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
175
+ "templateInvalidDirectory": "Portal template \"{{source}}\" is invalid: expected a directory.",
176
+ "localTemplateMissing": "Portal template directory does not exist: {{source}}",
177
+ "templateUnresolved": "Portal template \"{{source}}\" could not be resolved. {{details}}",
178
+ "templateDownloadFailed": "Failed to download portal template \"{{source}}\" with npm pack. {{details}}",
179
+ "templateExtractFailed": "Failed to extract portal template \"{{source}}\": {{details}}",
180
+ "templateMissingPackageJson": "Portal template \"{{source}}\" is invalid: package.json is missing.",
181
+ "npmPackNoTarball": "npm pack did not produce a local tarball for {{source}}.",
182
+ "npmPackMultipleTarballs": "npm pack produced multiple tarballs for {{source}}.",
183
+ "invalidPortalName": "Invalid portal name \"{{value}}\". Use lowercase letters, numbers, underscores, or hyphens, and start with a lowercase letter or number.",
184
+ "invalidPortalAppName": "Invalid portal app name \"{{value}}\" from apiBaseUrl. Use letters, numbers, underscores, or hyphens, and start with a letter or number.",
185
+ "missingApiBaseUrl": "Cannot create a portal because the selected env has no apiBaseUrl.",
186
+ "outsideParent": "Refusing to modify a portal outside {{parentDir}}: {{portalDir}}",
187
+ "sshUnsupported": "Cannot create a portal for ssh envs in the first version.",
188
+ "workspaceExists": "Portal already exists: {{portalDir}}\nPass --force to delete it and create a new portal."
189
+ },
190
+ "messages": {
191
+ "skipInstall": "Skipped pnpm install because package.json was not found in {{portalDir}}.",
192
+ "created": "Portal \"{{portal}}\" created at {{portalDir}}.",
193
+ "app": "App: {{app}}",
194
+ "base": "Base: {{base}}",
195
+ "sourceStorage": "Source storage: {{sourceStorage}}"
196
+ }
197
+ },
198
+ "portalConfig": {
199
+ "errors": {
200
+ "invalidSourceStorage": "Invalid source storage \"{{value}}\". Use \"nocobase\" or \"git\".",
201
+ "invalidGitPath": "--git-path must be a relative path inside the Git repository.",
202
+ "gitOptionsForNocobaseStorage": "--git-repo, --git-branch, and --git-path can only be used with --source-storage git.",
203
+ "gitRepoRequired": "--git-repo is required when --source-storage is git.",
204
+ "gitRepoInvalid": "--git-repo must be a full Git remote URL.",
205
+ "updateFailed": "Portal config update failed with status {{status}}\n{{details}}"
206
+ }
207
+ },
208
+ "portalConfigure": {
209
+ "errors": {
210
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
211
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
212
+ "noChanges": "No portal configuration changes were provided. Pass --source-storage or a --git-* flag.",
213
+ "workspaceMissing": "Portal does not exist: {{portalDir}}\nRun `nb portal create {{portal}}` or `nb portal pull {{portal}}` first."
214
+ },
215
+ "messages": {
216
+ "updated": "Portal \"{{portal}}\" configuration updated at {{portalDir}}/portal.config.json.",
217
+ "remoteSynced": "Remote portal record: synced",
218
+ "remoteSkipped": "Remote portal record: not found; local config only"
219
+ }
220
+ },
221
+ "portalDeploy": {
222
+ "errors": {
223
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
224
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
225
+ "workspaceMissing": "Portal does not exist: {{portalDir}}\nRun `nb portal create {{portal}}` first.",
226
+ "packageJsonMissing": "Portal is invalid: package.json is missing in {{portalDir}}.",
227
+ "distMissing": "Portal build did not produce {{distDir}}/index.html.",
228
+ "unsupportedEnvKind": "Cannot deploy a portal for {{kind}} envs in the first version.",
229
+ "uploadFailed": "Portal dist upload failed with status {{status}}\n{{details}}",
230
+ "recordSyncFailed": "Portal record sync failed with status {{status}}\n{{details}}"
231
+ },
232
+ "messages": {
233
+ "deployed": "Portal \"{{portal}}\" deployed.",
234
+ "mode": "Mode: {{mode}}",
235
+ "app": "App: {{app}}",
236
+ "base": "Base: {{base}}",
237
+ "record": "Record: synced",
238
+ "dist": "Dist: {{dist}}",
239
+ "localDist": "Local dist: {{dist}}",
240
+ "serverDist": "Server dist: {{dist}}"
241
+ }
242
+ },
243
+ "portalList": {
244
+ "errors": {
245
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
246
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
247
+ "unsupportedEnvKind": "Cannot list portals for {{kind}} envs in the first version.",
248
+ "listFailed": "Portal list failed with status {{status}}\n{{details}}"
249
+ },
250
+ "messages": {
251
+ "empty": "No portal records found."
252
+ },
253
+ "table": {
254
+ "name": "Name",
255
+ "url": "URL",
256
+ "portalType": "Portal type",
257
+ "path": "Local path",
258
+ "enabled": "Enabled",
259
+ "localSynced": "Local synced"
260
+ }
261
+ },
262
+ "portalInfo": {
263
+ "errors": {
264
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
265
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
266
+ "notFound": "Portal \"{{portal}}\" was not found."
267
+ },
268
+ "fields": {
269
+ "name": "Name",
270
+ "url": "URL",
271
+ "portalType": "Portal type",
272
+ "path": "Local path",
273
+ "enabled": "Enabled",
274
+ "localSynced": "Local synced"
275
+ }
276
+ },
277
+ "portalDestroy": {
278
+ "errors": {
279
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
280
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
281
+ "confirmationRequired": "Refusing to destroy a portal in non-interactive mode without --yes.",
282
+ "outsideParent": "Refusing to delete a portal outside {{parentDir}}: {{portalDir}}",
283
+ "workspaceMissing": "Portal does not exist: {{portalDir}}\nPass --force to ignore missing local files.",
284
+ "unsupportedEnvKind": "Cannot destroy a portal for {{kind}} envs in the first version.",
285
+ "recordDestroyFailed": "Portal record destroy failed with status {{status}}\n{{details}}"
286
+ },
287
+ "prompts": {
288
+ "confirm": "Destroy portal \"{{portal}}\" and delete its storage directory?"
289
+ },
290
+ "messages": {
291
+ "destroyed": "Portal \"{{portal}}\" destroyed.",
292
+ "mode": "Mode: {{mode}}",
293
+ "app": "App: {{app}}",
294
+ "base": "Base: {{base}}",
295
+ "record": "Record: {{status}}",
296
+ "workspace": "Portal files: {{status}} ({{dir}})"
297
+ }
298
+ },
299
+ "portalDev": {
300
+ "errors": {
301
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
302
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
303
+ "workspaceMissing": "Portal does not exist: {{portalDir}}\nRun `nb portal create {{portal}}` first.",
304
+ "packageJsonMissing": "Portal is invalid: package.json is missing in {{portalDir}}.",
305
+ "sshUnsupported": "Cannot start a portal in dev mode for ssh envs in the first version."
306
+ },
307
+ "messages": {
308
+ "starting": "Starting portal \"{{portal}}\"...",
309
+ "mode": "Mode: {{mode}}",
310
+ "app": "App: {{app}}",
311
+ "base": "Base: {{base}}",
312
+ "dir": "Dir: {{dir}}"
313
+ }
314
+ },
171
315
  "license": {
172
316
  "activate": {
173
317
  "interactive": {
@@ -341,6 +485,21 @@
341
485
  "message": "App subpath (for example, /nocobase/)",
342
486
  "placeholder": "/ or /nocobase/"
343
487
  },
488
+ "portalType": {
489
+ "message": "Portal type",
490
+ "noCodeLabel": "No-code portal",
491
+ "noCodeHint": "Create with visual configuration. AI can help adjust the configuration. Path: /v/<name>",
492
+ "aiLabel": "AI portal",
493
+ "aiHint": "Create with AI Agent and code. Users can request changes in natural language. Path: /x/<name>"
494
+ },
495
+ "portalName": {
496
+ "message": "Portal name",
497
+ "placeholder": "admin"
498
+ },
499
+ "portalTemplate": {
500
+ "message": "Starter template (copied to ./storage/portals/)",
501
+ "placeholder": "git@github.com:nocobase/admin-starter.git"
502
+ },
344
503
  "storagePath": {
345
504
  "message": "Uploads and local files directory",
346
505
  "placeholder": "./<env>/storage/"
@@ -440,6 +599,21 @@
440
599
  },
441
600
  "skipDownload": {
442
601
  "message": "Skip downloading NocoBase and reuse existing local app files or Docker images"
602
+ },
603
+ "portalType": {
604
+ "message": "Portal type",
605
+ "noCodeLabel": "No-code portal",
606
+ "noCodeHint": "Create with visual configuration. AI can help adjust the configuration. Path: /v/<name>",
607
+ "aiLabel": "AI portal",
608
+ "aiHint": "Create with AI Agent and code. Users can request changes in natural language. Path: /x/<name>"
609
+ },
610
+ "portalName": {
611
+ "message": "Portal name",
612
+ "placeholder": "admin"
613
+ },
614
+ "portalTemplate": {
615
+ "message": "Starter template (copied to ./storage/portals/)",
616
+ "placeholder": "git@github.com:nocobase/admin-starter.git"
443
617
  }
444
618
  },
445
619
  "webUi": {
@@ -462,6 +636,10 @@
462
636
  "title": "App source and version",
463
637
  "description": "Choose how to get the app and which source and version to use."
464
638
  },
639
+ "portalType": {
640
+ "title": "Configure portal",
641
+ "description": "Set the default portal name and type."
642
+ },
465
643
  "configureDatabase": {
466
644
  "title": "Configure the database",
467
645
  "description": "Use built-in or custom."
@@ -168,6 +168,150 @@
168
168
  "refusal": "拒绝对 env \"{{requestedEnv}}\" 执行该命令,因为当前 env 是 \"{{currentEnv}}\",且当前 agent 会话无法进行交互确认。\n\n出于安全考虑,agent 不会自动切换 env,也不会替你自动补上 --yes。\n\n如果要继续:\n- 请先自行执行 `nb env use {{requestedEnv}}`,然后重新运行该命令,或\n- 使用相同命令并追加 `--env {{requestedEnv}} --yes`,以确认这是一次性的跨 env 操作。"
169
169
  }
170
170
  },
171
+ "portalCreate": {
172
+ "errors": {
173
+ "envNotConfigured": "env \"{{envName}}\" 尚未配置。请先运行 `nb env add {{envName}} --api-base-url <url>`。",
174
+ "noEnvConfigured": "还没有配置 NocoBase env。请先运行 `nb init --ui` 创建一个。",
175
+ "templateInvalidDirectory": "Portal 模板 \"{{source}}\" 无效:需要是一个目录。",
176
+ "localTemplateMissing": "Portal 模板目录不存在:{{source}}",
177
+ "templateUnresolved": "无法解析 Portal 模板 \"{{source}}\"。{{details}}",
178
+ "templateDownloadFailed": "无法通过 npm pack 下载 Portal 模板 \"{{source}}\"。{{details}}",
179
+ "templateExtractFailed": "解压 Portal 模板 \"{{source}}\" 失败:{{details}}",
180
+ "templateMissingPackageJson": "Portal 模板 \"{{source}}\" 无效:缺少 package.json。",
181
+ "npmPackNoTarball": "npm pack 没有为 {{source}} 生成本地 tarball。",
182
+ "npmPackMultipleTarballs": "npm pack 为 {{source}} 生成了多个 tarball。",
183
+ "invalidPortalName": "Portal 名称 \"{{value}}\" 无效。请使用小写字母、数字、下划线或连字符,并以小写字母或数字开头。",
184
+ "invalidPortalAppName": "从 apiBaseUrl 解析出的 Portal app 名称 \"{{value}}\" 无效。请使用字母、数字、下划线或连字符,并以字母或数字开头。",
185
+ "missingApiBaseUrl": "无法创建 Portal,因为当前 env 没有 apiBaseUrl。",
186
+ "outsideParent": "拒绝修改 {{parentDir}} 之外的 Portal:{{portalDir}}",
187
+ "sshUnsupported": "第一版暂不支持为 ssh env 创建 Portal。",
188
+ "workspaceExists": "Portal 已存在:{{portalDir}}\n如需删除并重新创建,请追加 --force。"
189
+ },
190
+ "messages": {
191
+ "skipInstall": "未找到 {{portalDir}}/package.json,已跳过 pnpm install。",
192
+ "created": "Portal \"{{portal}}\" 已创建:{{portalDir}}。",
193
+ "app": "App:{{app}}",
194
+ "base": "Base:{{base}}",
195
+ "sourceStorage": "源码存储:{{sourceStorage}}"
196
+ }
197
+ },
198
+ "portalConfig": {
199
+ "errors": {
200
+ "invalidSourceStorage": "源码存储 \"{{value}}\" 无效。请使用 \"nocobase\" 或 \"git\"。",
201
+ "invalidGitPath": "--git-path 必须是 Git 仓库内的相对路径。",
202
+ "gitOptionsForNocobaseStorage": "--git-repo、--git-branch 和 --git-path 只能与 --source-storage git 一起使用。",
203
+ "gitRepoRequired": "--source-storage 为 git 时必须提供 --git-repo。",
204
+ "gitRepoInvalid": "--git-repo 必须是完整的 Git remote URL。",
205
+ "updateFailed": "Portal 配置更新失败,状态码 {{status}}\n{{details}}"
206
+ }
207
+ },
208
+ "portalConfigure": {
209
+ "errors": {
210
+ "envNotConfigured": "env \"{{envName}}\" 尚未配置。请先运行 `nb env add {{envName}} --api-base-url <url>`。",
211
+ "noEnvConfigured": "还没有配置 NocoBase env。请先运行 `nb init --ui` 创建一个。",
212
+ "noChanges": "没有提供 Portal 配置变更。请传入 --source-storage 或 --git-* 参数。",
213
+ "workspaceMissing": "Portal 不存在:{{portalDir}}\n请先运行 `nb portal create {{portal}}` 或 `nb portal pull {{portal}}`。"
214
+ },
215
+ "messages": {
216
+ "updated": "Portal \"{{portal}}\" 配置已更新:{{portalDir}}/portal.config.json。",
217
+ "remoteSynced": "远端 Portal 记录:已同步",
218
+ "remoteSkipped": "远端 Portal 记录:未找到,仅更新本地配置"
219
+ }
220
+ },
221
+ "portalDeploy": {
222
+ "errors": {
223
+ "envNotConfigured": "env \"{{envName}}\" 尚未配置。请先运行 `nb env add {{envName}} --api-base-url <url>`。",
224
+ "noEnvConfigured": "还没有配置 NocoBase env。请先运行 `nb init --ui` 创建一个。",
225
+ "workspaceMissing": "Portal 不存在:{{portalDir}}\n请先运行 `nb portal create {{portal}}`。",
226
+ "packageJsonMissing": "Portal 无效:{{portalDir}} 中缺少 package.json。",
227
+ "distMissing": "Portal build 没有生成 {{distDir}}/index.html。",
228
+ "unsupportedEnvKind": "第一版暂不支持为 {{kind}} env 部署 Portal。",
229
+ "uploadFailed": "Portal dist 上传失败,状态码 {{status}}\n{{details}}",
230
+ "recordSyncFailed": "Portal 记录同步失败,状态码 {{status}}\n{{details}}"
231
+ },
232
+ "messages": {
233
+ "deployed": "Portal \"{{portal}}\" 已部署。",
234
+ "mode": "Mode:{{mode}}",
235
+ "app": "App:{{app}}",
236
+ "base": "Base:{{base}}",
237
+ "record": "记录:已同步",
238
+ "dist": "Dist:{{dist}}",
239
+ "localDist": "本地 dist:{{dist}}",
240
+ "serverDist": "服务端 dist:{{dist}}"
241
+ }
242
+ },
243
+ "portalList": {
244
+ "errors": {
245
+ "envNotConfigured": "env \"{{envName}}\" 尚未配置。请先运行 `nb env add {{envName}} --api-base-url <url>`。",
246
+ "noEnvConfigured": "还没有配置 NocoBase env。请先运行 `nb init --ui` 创建一个。",
247
+ "unsupportedEnvKind": "第一版暂不支持为 {{kind}} env 列出 Portal。",
248
+ "listFailed": "Portal 列表获取失败,状态码 {{status}}\n{{details}}"
249
+ },
250
+ "messages": {
251
+ "empty": "没有找到 Portal 记录。"
252
+ },
253
+ "table": {
254
+ "name": "名称",
255
+ "url": "访问 URL",
256
+ "portalType": "Portal 类型",
257
+ "path": "本地路径",
258
+ "enabled": "启用",
259
+ "localSynced": "本地已同步"
260
+ }
261
+ },
262
+ "portalInfo": {
263
+ "errors": {
264
+ "envNotConfigured": "env \"{{envName}}\" 尚未配置。请先运行 `nb env add {{envName}} --api-base-url <url>`。",
265
+ "noEnvConfigured": "还没有配置 NocoBase env。请先运行 `nb init --ui` 创建一个。",
266
+ "notFound": "Portal \"{{portal}}\" 不存在。"
267
+ },
268
+ "fields": {
269
+ "name": "名称",
270
+ "url": "访问 URL",
271
+ "portalType": "Portal 类型",
272
+ "path": "本地路径",
273
+ "enabled": "启用",
274
+ "localSynced": "本地已同步"
275
+ }
276
+ },
277
+ "portalDestroy": {
278
+ "errors": {
279
+ "envNotConfigured": "env \"{{envName}}\" 尚未配置。请先运行 `nb env add {{envName}} --api-base-url <url>`。",
280
+ "noEnvConfigured": "还没有配置 NocoBase env。请先运行 `nb init --ui` 创建一个。",
281
+ "confirmationRequired": "非交互模式下拒绝删除 Portal。请追加 --yes 后重试。",
282
+ "outsideParent": "拒绝删除 {{parentDir}} 之外的 Portal:{{portalDir}}",
283
+ "workspaceMissing": "Portal 不存在:{{portalDir}}\n如需忽略本地文件缺失,请追加 --force。",
284
+ "unsupportedEnvKind": "第一版暂不支持为 {{kind}} env 删除 Portal。",
285
+ "recordDestroyFailed": "Portal 记录删除失败,状态码 {{status}}\n{{details}}"
286
+ },
287
+ "prompts": {
288
+ "confirm": "删除 Portal \"{{portal}}\" 并移除它的 storage 目录?"
289
+ },
290
+ "messages": {
291
+ "destroyed": "Portal \"{{portal}}\" 已删除。",
292
+ "mode": "Mode:{{mode}}",
293
+ "app": "App:{{app}}",
294
+ "base": "Base:{{base}}",
295
+ "record": "记录:{{status}}",
296
+ "workspace": "Portal:{{status}}({{dir}})"
297
+ }
298
+ },
299
+ "portalDev": {
300
+ "errors": {
301
+ "envNotConfigured": "env \"{{envName}}\" 尚未配置。请先运行 `nb env add {{envName}} --api-base-url <url>`。",
302
+ "noEnvConfigured": "还没有配置 NocoBase env。请先运行 `nb init --ui` 创建一个。",
303
+ "workspaceMissing": "Portal 不存在:{{portalDir}}\n请先运行 `nb portal create {{portal}}`。",
304
+ "packageJsonMissing": "Portal 无效:{{portalDir}} 中缺少 package.json。",
305
+ "sshUnsupported": "第一版暂不支持为 ssh env 启动 Portal 开发服务。"
306
+ },
307
+ "messages": {
308
+ "starting": "正在启动 Portal \"{{portal}}\"...",
309
+ "mode": "Mode:{{mode}}",
310
+ "app": "App:{{app}}",
311
+ "base": "Base:{{base}}",
312
+ "dir": "目录:{{dir}}"
313
+ }
314
+ },
171
315
  "license": {
172
316
  "activate": {
173
317
  "interactive": {
@@ -341,6 +485,21 @@
341
485
  "message": "应用子路径(例如 /nocobase/)",
342
486
  "placeholder": "/ 或 /nocobase/"
343
487
  },
488
+ "portalType": {
489
+ "message": "Portal 类型",
490
+ "noCodeLabel": "无代码 Portal",
491
+ "noCodeHint": "通过可视化配置创建,AI 可以协助调整配置。访问路径:/v/<name>",
492
+ "aiLabel": "AI Portal",
493
+ "aiHint": "通过 AI Agent 和代码创建,可用自然语言提出修改要求。访问路径:/x/<name>"
494
+ },
495
+ "portalName": {
496
+ "message": "Portal 名称",
497
+ "placeholder": "admin"
498
+ },
499
+ "portalTemplate": {
500
+ "message": "起始模板(将复制到 ./storage/portals/)",
501
+ "placeholder": "git@github.com:nocobase/admin-starter.git"
502
+ },
344
503
  "storagePath": {
345
504
  "message": "上传文件和本地存储目录",
346
505
  "placeholder": "./<env>/storage/"
@@ -440,6 +599,21 @@
440
599
  },
441
600
  "skipDownload": {
442
601
  "message": "跳过下载 NocoBase,直接复用已有的本地应用文件或 Docker 镜像"
602
+ },
603
+ "portalType": {
604
+ "message": "Portal 类型",
605
+ "noCodeLabel": "无代码 Portal",
606
+ "noCodeHint": "通过可视化配置创建,AI 可以协助调整配置。访问路径:/v/<name>",
607
+ "aiLabel": "AI Portal",
608
+ "aiHint": "通过 AI Agent 和代码创建,可用自然语言提出修改要求。访问路径:/x/<name>"
609
+ },
610
+ "portalName": {
611
+ "message": "Portal 名称",
612
+ "placeholder": "admin"
613
+ },
614
+ "portalTemplate": {
615
+ "message": "起始模板(将复制到 ./storage/portals/)",
616
+ "placeholder": "git@github.com:nocobase/admin-starter.git"
443
617
  }
444
618
  },
445
619
  "webUi": {
@@ -462,6 +636,10 @@
462
636
  "title": "应用来源和版本",
463
637
  "description": "选择应用的获取方式,以及要使用的来源和版本。"
464
638
  },
639
+ "portalType": {
640
+ "title": "配置 Portal",
641
+ "description": "设置默认 Portal 的标识和类型。"
642
+ },
465
643
  "configureDatabase": {
466
644
  "title": "配置数据库",
467
645
  "description": "选择内置数据库或自定义数据库。"
@@ -202,6 +202,117 @@
202
202
  }
203
203
  }
204
204
  },
205
+ "ai": {
206
+ "name": "ai",
207
+ "description": "Discover LLM providers and manage LLM services and AI employees.",
208
+ "include": true,
209
+ "resources": {
210
+ "includes": ["ai", "llmServices", "aiEmployees"],
211
+ "excludes": [],
212
+ "overrides": {
213
+ "ai": {
214
+ "name": "llm-providers",
215
+ "description": "Discover providers and models and test unsaved LLM settings.",
216
+ "topLevel": false,
217
+ "operations": {
218
+ "includes": [
219
+ "ai:listLLMProviders",
220
+ "ai:listProviderModels",
221
+ "ai:testFlight",
222
+ "ai:listModels",
223
+ "ai:listLLMServices"
224
+ ]
225
+ }
226
+ },
227
+ "llmServices": {
228
+ "name": "llm-services",
229
+ "description": "Manage saved LLM service configurations.",
230
+ "topLevel": false,
231
+ "operations": {
232
+ "includes": [
233
+ "llmServices:list",
234
+ "llmServices:get",
235
+ "llmServices:create",
236
+ "llmServices:update",
237
+ "llmServices:destroy"
238
+ ]
239
+ }
240
+ },
241
+ "aiEmployees": {
242
+ "name": "employees",
243
+ "description": "Manage AI employees.",
244
+ "topLevel": false,
245
+ "operations": {
246
+ "includes": [
247
+ "aiEmployees:list",
248
+ "aiEmployees:get",
249
+ "aiEmployees:create",
250
+ "aiEmployees:update",
251
+ "aiEmployees:destroy"
252
+ ]
253
+ }
254
+ }
255
+ }
256
+ }
257
+ },
258
+ "kb": {
259
+ "name": "kb",
260
+ "description": "Manage vector databases, knowledge bases, documents, vectorization, and retrieval tests.",
261
+ "include": true,
262
+ "resources": {
263
+ "includes": ["aiVectorDatabases", "aiKnowledgeBase", "aiKnowledgeBaseDocs"],
264
+ "excludes": [],
265
+ "overrides": {
266
+ "aiVectorDatabases": {
267
+ "name": "vector-databases",
268
+ "description": "Manage vector database connections.",
269
+ "topLevel": false,
270
+ "operations": {
271
+ "includes": [
272
+ "aiVectorDatabases:listProviders",
273
+ "aiVectorDatabases:testConnection",
274
+ "aiVectorDatabases:list",
275
+ "aiVectorDatabases:get",
276
+ "aiVectorDatabases:create",
277
+ "aiVectorDatabases:update",
278
+ "aiVectorDatabases:destroy"
279
+ ]
280
+ }
281
+ },
282
+ "aiKnowledgeBase": {
283
+ "name": "kb",
284
+ "segments": ["kb"],
285
+ "description": "Manage knowledge bases and retrieval tests.",
286
+ "topLevel": true,
287
+ "operations": {
288
+ "includes": [
289
+ "aiKnowledgeBase:list",
290
+ "aiKnowledgeBase:get",
291
+ "aiKnowledgeBase:create",
292
+ "aiKnowledgeBase:update",
293
+ "aiKnowledgeBase:destroy",
294
+ "aiKnowledgeBase:runHitTest",
295
+ "aiKnowledgeBase:listExternalVectorStoreProviders"
296
+ ]
297
+ }
298
+ },
299
+ "aiKnowledgeBaseDocs": {
300
+ "name": "documents",
301
+ "description": "Manage knowledge base documents and vectorization.",
302
+ "topLevel": false,
303
+ "operations": {
304
+ "includes": [
305
+ "aiKnowledgeBaseDocs:list",
306
+ "aiKnowledgeBaseDocs:get",
307
+ "aiKnowledgeBaseDocs:upload",
308
+ "aiKnowledgeBaseDocs:vectorization",
309
+ "aiKnowledgeBaseDocs:destroy"
310
+ ]
311
+ }
312
+ }
313
+ }
314
+ }
315
+ },
205
316
  "flow-engine": {
206
317
  "name": "flow-engine",
207
318
  "description": "Manage flow surface composition, configuration, layout, and mutation APIs.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cli",
3
- "version": "2.3.0-alpha.1",
3
+ "version": "3.0.0-alpha.1",
4
4
  "description": "NocoBase Command Line Tool",
5
5
  "type": "module",
6
6
  "main": "dist/generated/command-registry.js",
@@ -71,6 +71,9 @@
71
71
  "backup": {
72
72
  "description": "Create and restore NocoBase backups."
73
73
  },
74
+ "portal": {
75
+ "description": "Manage portals."
76
+ },
74
77
  "skills": {
75
78
  "description": "Inspect or synchronize NocoBase AI coding skills for the current workspace."
76
79
  },
@@ -144,5 +147,5 @@
144
147
  "type": "git",
145
148
  "url": "git+https://github.com/nocobase/nocobase.git"
146
149
  },
147
- "gitHead": "2377df8ceb12549149017f7f14a61207bf6e49a2"
150
+ "gitHead": "22d8be8ece179cfa5c8a4ebb2c896c92bd418e03"
148
151
  }