@nocobase/cli 2.2.0-beta.1 → 2.2.0-beta.10

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 (53) hide show
  1. package/assets/env-proxy/nginx/snippets/proxy-location.conf +1 -0
  2. package/bin/early-locale.js +89 -0
  3. package/bin/node-version.js +35 -0
  4. package/bin/run.js +9 -0
  5. package/bin/windows-admin.js +60 -0
  6. package/dist/commands/app/destroy.js +4 -3
  7. package/dist/commands/app/restart.js +38 -0
  8. package/dist/commands/app/shared.js +49 -3
  9. package/dist/commands/app/start.js +95 -0
  10. package/dist/commands/app/upgrade.js +11 -0
  11. package/dist/commands/env/info.js +11 -1
  12. package/dist/commands/examples/prompts-stages.js +2 -2
  13. package/dist/commands/examples/prompts-test.js +2 -2
  14. package/dist/commands/init.js +33 -11
  15. package/dist/commands/install.js +159 -107
  16. package/dist/commands/license/activate.js +4 -1
  17. package/dist/commands/license/shared.js +24 -15
  18. package/dist/commands/proxy/caddy/generate.js +93 -7
  19. package/dist/commands/proxy/nginx/generate.js +98 -7
  20. package/dist/commands/revision/create.js +1 -1
  21. package/dist/commands/self/check.js +1 -1
  22. package/dist/commands/self/update.js +4 -4
  23. package/dist/commands/skills/check.js +4 -5
  24. package/dist/commands/skills/install.js +18 -1
  25. package/dist/commands/skills/update.js +19 -4
  26. package/dist/commands/source/dev.js +9 -5
  27. package/dist/commands/source/download.js +85 -16
  28. package/dist/lib/api-command-compat.js +51 -8
  29. package/dist/lib/app-managed-resources.js +104 -5
  30. package/dist/lib/auth-store.js +102 -12
  31. package/dist/lib/cli-config.js +73 -1
  32. package/dist/lib/docker-image.js +94 -6
  33. package/dist/lib/env-auth.js +291 -45
  34. package/dist/lib/env-config.js +11 -0
  35. package/dist/lib/env-proxy-config.js +48 -0
  36. package/dist/lib/env-proxy.js +164 -58
  37. package/dist/lib/hook-script.js +160 -0
  38. package/dist/lib/prompt-catalog-terminal.js +32 -19
  39. package/dist/lib/prompt-validators.js +1 -1
  40. package/dist/lib/prompt-web-ui.js +20 -13
  41. package/dist/lib/proxy-caddy.js +77 -9
  42. package/dist/lib/proxy-nginx.js +71 -11
  43. package/dist/lib/run-npm.js +4 -0
  44. package/dist/lib/self-manager.js +254 -46
  45. package/dist/lib/skills-manager.js +116 -23
  46. package/dist/lib/source-publish.js +2 -2
  47. package/dist/lib/startup-update.js +1 -1
  48. package/dist/locale/en-US.json +49 -43
  49. package/dist/locale/zh-CN.json +49 -43
  50. package/package.json +8 -2
  51. package/scripts/build.mjs +0 -34
  52. package/scripts/clean.mjs +0 -9
  53. package/tsconfig.json +0 -19
@@ -232,7 +232,7 @@ export async function publishSourceSnapshot(params) {
232
232
  version,
233
233
  stdio,
234
234
  });
235
- await run('yarn', ['lerna', 'publish', 'from-package', '--registry', npmRegistry, '--dist-tag', 'local', '--yes', '--no-verify-access', '--git-head', gitSha], {
235
+ await run('yarn', ['lerna', 'publish', 'from-package', '--registry', npmRegistry, '--dist-tag', 'local', '--yes', '--no-verify-access', '--no-git-reset', '--git-head', gitSha], {
236
236
  cwd: projectRoot,
237
237
  errorName: 'lerna publish',
238
238
  stdio,
@@ -319,7 +319,7 @@ export function buildSuggestedInitCommand(result) {
319
319
  const normalizedRegistry = result.npmRegistry || `http://${host}:${port || DEFAULT_SOURCE_REGISTRY_PORT}`;
320
320
  const suggestedEnv = ['snapshot', sanitizeEnvSegment(result.gitSha)].filter(Boolean).join('');
321
321
  return [
322
- `nb init --ui --env ${suggestedEnv} --yes --source npm`,
322
+ `nb init --env ${suggestedEnv} --yes --source npm`,
323
323
  `--version ${result.version}`,
324
324
  `--npm-registry=${normalizedRegistry}`,
325
325
  ].join(' ');
@@ -151,7 +151,7 @@ export async function shouldRunStartupUpdateCheck(argv, now = new Date()) {
151
151
  return readCurrentInstallLastCheckedDate(state) !== todayStamp(now);
152
152
  }
153
153
  export function shouldEnableStartupUpdateForInstallMethod(installMethod) {
154
- return installMethod === 'npm-global';
154
+ return installMethod === 'npm-global' || installMethod === 'pnpm-global' || installMethod === 'yarn-global';
155
155
  }
156
156
  function hasPendingUpdates(selfStatus, skillsStatus) {
157
157
  return Boolean(selfStatus.updateAvailable || skillsStatus.updateAvailable === true);
@@ -1,4 +1,10 @@
1
1
  {
2
+ "entry": {
3
+ "windowsAdministratorRequired": {
4
+ "message": "NocoBase CLI must be run as Administrator on Windows.",
5
+ "hint": "Open your terminal as Administrator, then run the command again."
6
+ }
7
+ },
2
8
  "promptCatalog": {
3
9
  "common": {
4
10
  "cancelled": "Cancelled.",
@@ -62,7 +68,7 @@
62
68
  "unreachable": "Unable to connect to the API base URL. Check the address and make sure the server is reachable. Details: {{details}}"
63
69
  },
64
70
  "envKey": {
65
- "invalid": "Use letters and numbers only."
71
+ "invalid": "Use letters, numbers, hyphens, and underscores only."
66
72
  },
67
73
  "appPublicPath": {
68
74
  "invalid": "Use / or a slash-separated path like /nocobase/ or /foo-bar/baz_2/. Each path segment may contain letters, numbers, hyphens, and underscores only."
@@ -87,20 +93,20 @@
87
93
  "envAdd": {
88
94
  "prompts": {
89
95
  "name": {
90
- "message": "What would you like to call this environment?",
96
+ "message": "App environment identifier",
91
97
  "placeholder": "default"
92
98
  },
93
99
  "scope": {
94
- "message": "Where should this connection be saved?",
100
+ "message": "Connection save location",
95
101
  "globalLabel": "Global",
96
102
  "globalHint": "user-level config"
97
103
  },
98
104
  "apiBaseUrl": {
99
- "message": "What is the API base URL?",
105
+ "message": "API base URL",
100
106
  "placeholder": "https://demo.example.com/api or https://demo.example.com/api/__app/<subapp>"
101
107
  },
102
108
  "authType": {
103
- "message": "Which authentication method would you like to use?",
109
+ "message": "Authentication method",
104
110
  "basicLabel": "Basic authentication (username + password)",
105
111
  "basicHint": "uses your credentials to fetch a token after save",
106
112
  "oauthLabel": "OAuth (browser authentication)",
@@ -108,14 +114,14 @@
108
114
  "tokenLabel": "API token / API key"
109
115
  },
110
116
  "username": {
111
- "message": "Enter the username for basic login",
117
+ "message": "Basic login username",
112
118
  "placeholder": "admin"
113
119
  },
114
120
  "password": {
115
- "message": "Enter the password for basic login"
121
+ "message": "Basic login password"
116
122
  },
117
123
  "accessToken": {
118
- "message": "Enter an API token or API key",
124
+ "message": "API token or API key",
119
125
  "placeholder": "Enter your API token / API key"
120
126
  }
121
127
  }
@@ -173,7 +179,7 @@
173
179
  },
174
180
  "prompts": {
175
181
  "provideMethod": {
176
- "message": "How do you want to provide the license key?",
182
+ "message": "License key input method",
177
183
  "keyOption": "Paste the license key",
178
184
  "fileOption": "Read the key from a file"
179
185
  },
@@ -246,7 +252,7 @@
246
252
  },
247
253
  "prompts": {
248
254
  "source": {
249
- "message": "How would you like to get NocoBase?",
255
+ "message": "NocoBase install source",
250
256
  "dockerLabel": "Docker install (Recommended)",
251
257
  "dockerHint": "Best for no-code and low-maintenance setups. You can upgrade later by pulling a newer image and restarting the app.",
252
258
  "npmLabel": "create-nocobase-app install",
@@ -255,9 +261,9 @@
255
261
  "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."
256
262
  },
257
263
  "version": {
258
- "message": "Which version would you like to use?",
264
+ "message": "NocoBase version",
259
265
  "latestLabel": "latest",
260
- "latestHint": "Stable release. Best for production use and the most predictable experience. Currently unavailable.",
266
+ "latestHint": "Stable release. Best for production use and the most predictable experience.",
261
267
  "betaLabel": "beta",
262
268
  "betaHint": "Preview release. Good for trying upcoming features before general release.",
263
269
  "alphaLabel": "alpha",
@@ -266,15 +272,15 @@
266
272
  "otherHint": "Enter another package version, Docker tag, or Git ref manually, such as a branch name."
267
273
  },
268
274
  "otherVersion": {
269
- "message": "Enter the version, Docker tag, or Git ref you want to use.",
275
+ "message": "Custom version, Docker tag, or Git ref",
270
276
  "placeholder": "For example: fix/cli-v2"
271
277
  },
272
278
  "dockerRegistry": {
273
- "message": "Which Docker registry would you like to use? The image tag is set separately in Version.",
279
+ "message": "Docker registry (image tag is set in Version)",
274
280
  "placeholder": "nocobase/nocobase"
275
281
  },
276
282
  "dockerPlatform": {
277
- "message": "Which Docker image platform should be used?",
283
+ "message": "Architecture",
278
284
  "autoLabel": "Auto",
279
285
  "autoHint": "Use Docker default for this machine"
280
286
  },
@@ -317,79 +323,79 @@
317
323
  },
318
324
  "prompts": {
319
325
  "env": {
320
- "message": "What would you like to call this app?",
326
+ "message": "App environment identifier",
321
327
  "placeholder": "local"
322
328
  },
323
329
  "lang": {
324
- "message": "Which language would you like to use for the app?"
330
+ "message": "App language"
325
331
  },
326
332
  "appPath": {
327
- "message": "Where should this app be stored? (relative to {{root}})",
333
+ "message": "App directory (relative to {{root}})",
328
334
  "placeholder": "./<env>/"
329
335
  },
330
336
  "appPort": {
331
- "message": "Which port should this app use?",
337
+ "message": "App port",
332
338
  "placeholder": "13000"
333
339
  },
334
340
  "appPublicPath": {
335
- "message": "What is the app subpath? (for example, /nocobase/)",
341
+ "message": "App subpath (for example, /nocobase/)",
336
342
  "placeholder": "/ or /nocobase/"
337
343
  },
338
344
  "storagePath": {
339
- "message": "Where should uploads and local files be stored?",
345
+ "message": "Uploads and local files directory",
340
346
  "placeholder": "./<env>/storage/"
341
347
  },
342
348
  "dbDialect": {
343
- "message": "Which database would you like to use?"
349
+ "message": "Database type"
344
350
  },
345
351
  "builtinDb": {
346
- "message": "Would you like to use the built-in database?"
352
+ "message": "Use built-in database"
347
353
  },
348
354
  "builtinDbImage": {
349
- "message": "Which Docker image should be used for the built-in database?",
355
+ "message": "Built-in database Docker image",
350
356
  "placeholder": "postgres:16"
351
357
  },
352
358
  "dbHost": {
353
- "message": "What is the database host?",
359
+ "message": "Database host",
354
360
  "placeholder": "127.0.0.1"
355
361
  },
356
362
  "dbPort": {
357
- "message": "What is the database port?",
363
+ "message": "Database port",
358
364
  "placeholder": "5432"
359
365
  },
360
366
  "dbDatabase": {
361
- "message": "What is the database name?"
367
+ "message": "Database name"
362
368
  },
363
369
  "dbUser": {
364
- "message": "What is the database username?"
370
+ "message": "Database username"
365
371
  },
366
372
  "dbPassword": {
367
- "message": "What is the database password?"
373
+ "message": "Database password"
368
374
  },
369
375
  "dbSchema": {
370
- "message": "What is the database schema? (PostgreSQL only, optional)",
376
+ "message": "Database schema (PostgreSQL/KingbaseES only, optional)",
371
377
  "placeholder": "Leave empty to use the default schema"
372
378
  },
373
379
  "dbTablePrefix": {
374
- "message": "What table prefix should be used? (optional)",
380
+ "message": "Database table prefix (optional)",
375
381
  "placeholder": "For example: nb_"
376
382
  },
377
383
  "dbUnderscored": {
378
- "message": "Use underscored names for database tables and columns?"
384
+ "message": "Use underscored names for database tables and columns"
379
385
  },
380
386
  "rootUsername": {
381
- "message": "Choose the initial admin username",
387
+ "message": "Initial admin username",
382
388
  "placeholder": "nocobase"
383
389
  },
384
390
  "rootEmail": {
385
- "message": "What is the initial admin email?",
391
+ "message": "Initial admin email",
386
392
  "placeholder": "admin@nocobase.com"
387
393
  },
388
394
  "rootPassword": {
389
- "message": "Choose the initial admin password"
395
+ "message": "Initial admin password"
390
396
  },
391
397
  "rootNickname": {
392
- "message": "What display name should the initial admin use?",
398
+ "message": "Initial admin display name",
393
399
  "placeholder": "Super Admin"
394
400
  }
395
401
  }
@@ -399,7 +405,7 @@
399
405
  "envExists": "Env \"{{envName}}\" already exists. Choose another env name."
400
406
  },
401
407
  "messages": {
402
- "title": "Set up NocoBase for coding agents",
408
+ "title": "Set up NocoBase",
403
409
  "appNameRequiredWhenSkipped": "Env name is required when prompts are skipped.",
404
410
  "appNameEnvHelp": "Use `nb init --yes --env <envName>` to continue.",
405
411
  "resumeEnvRequired": "Env name is required when resuming setup.",
@@ -413,11 +419,11 @@
413
419
  },
414
420
  "prompts": {
415
421
  "appName": {
416
- "message": "What should this environment use for `--env`?",
422
+ "message": "Unique app environment identifier (used by the CLI to locate and manage this environment)",
417
423
  "placeholder": "local"
418
424
  },
419
425
  "setupMode": {
420
- "message": "How would you like to set up this environment?",
426
+ "message": "App environment setup method",
421
427
  "installNewLabel": "Install a new app",
422
428
  "installNewHint": "Install a brand-new app from scratch. Best for first-time setup, evaluation, or a fresh local environment.",
423
429
  "manageLocalLabel": "Manage an app already on this machine",
@@ -426,7 +432,7 @@
426
432
  "connectRemoteHint": "Save only the remote app connection. Nothing will be installed or taken over on this machine."
427
433
  },
428
434
  "installSkills": {
429
- "message": "Install NocoBase AI coding skills (nocobase/skills)?"
435
+ "message": "Install NocoBase AI coding skills (nocobase/skills)"
430
436
  },
431
437
  "apiBaseUrl": {
432
438
  "message": "API base URL",
@@ -437,9 +443,9 @@
437
443
  }
438
444
  },
439
445
  "webUi": {
440
- "pageTitle": "Set up NocoBase for coding agents",
441
- "documentHeading": "Set up NocoBase for coding agents",
442
- "documentHint": "Install a new app, manage one that already exists on this machine, or connect a remote app so coding agents can access and work with NocoBase.",
446
+ "pageTitle": "Set up NocoBase",
447
+ "documentHeading": "Set up NocoBase",
448
+ "documentHint": "Install a new app, manage an existing one, or connect a remote app. You can use it directly or let a coding agent access it later.",
443
449
  "gettingStarted": {
444
450
  "title": "Getting started",
445
451
  "description": "Choose whether to install a new app, manage a local app, or connect a remote app."
@@ -1,4 +1,10 @@
1
1
  {
2
+ "entry": {
3
+ "windowsAdministratorRequired": {
4
+ "message": "Windows 上运行 NocoBase CLI 必须使用管理员模式。",
5
+ "hint": "请以管理员身份打开终端,然后重新执行命令。"
6
+ }
7
+ },
2
8
  "promptCatalog": {
3
9
  "common": {
4
10
  "cancelled": "已取消。",
@@ -62,7 +68,7 @@
62
68
  "unreachable": "无法连接到该 API 地址,请检查地址是否正确,并确认服务可访问。详情:{{details}}"
63
69
  },
64
70
  "envKey": {
65
- "invalid": "仅支持字母和数字。"
71
+ "invalid": "仅支持字母、数字、中划线和下划线。"
66
72
  },
67
73
  "appPublicPath": {
68
74
  "invalid": "请输入 /,或类似 /nocobase/、/foo-bar/baz_2/ 这样的路径。每个路径段仅支持字母、数字、中划线和下划线。"
@@ -87,20 +93,20 @@
87
93
  "envAdd": {
88
94
  "prompts": {
89
95
  "name": {
90
- "message": "你想如何命名这个环境?",
96
+ "message": "应用环境标识",
91
97
  "placeholder": "default"
92
98
  },
93
99
  "scope": {
94
- "message": "这个连接要保存到哪里?",
100
+ "message": "连接保存位置",
95
101
  "globalLabel": "全局",
96
102
  "globalHint": "保存在用户级配置中"
97
103
  },
98
104
  "apiBaseUrl": {
99
- "message": "API 基础地址是什么?",
105
+ "message": "API 基础地址",
100
106
  "placeholder": "https://demo.example.com/api 或 https://demo.example.com/api/__app/<subapp>"
101
107
  },
102
108
  "authType": {
103
- "message": "你想使用哪种认证方式?",
109
+ "message": "认证方式",
104
110
  "basicLabel": "Basic 认证(用户名 + 密码)",
105
111
  "basicHint": "保存后会用用户名和密码换取 Token",
106
112
  "oauthLabel": "OAuth(浏览器认证)",
@@ -108,14 +114,14 @@
108
114
  "tokenLabel": "API Token / API Key"
109
115
  },
110
116
  "username": {
111
- "message": "请输入 Basic 登录用户名",
117
+ "message": "Basic 登录用户名",
112
118
  "placeholder": "admin"
113
119
  },
114
120
  "password": {
115
- "message": "请输入 Basic 登录密码"
121
+ "message": "Basic 登录密码"
116
122
  },
117
123
  "accessToken": {
118
- "message": "请输入 API Token 或 API Key",
124
+ "message": "API Token 或 API Key",
119
125
  "placeholder": "请输入你的 API Token / API Key"
120
126
  }
121
127
  }
@@ -173,7 +179,7 @@
173
179
  },
174
180
  "prompts": {
175
181
  "provideMethod": {
176
- "message": "你想通过哪种方式提供 license key?",
182
+ "message": "License key 提供方式",
177
183
  "keyOption": "直接粘贴 license key",
178
184
  "fileOption": "从文件读取 key"
179
185
  },
@@ -246,7 +252,7 @@
246
252
  },
247
253
  "prompts": {
248
254
  "source": {
249
- "message": "你想通过哪种方式获取 NocoBase?",
255
+ "message": "NocoBase 获取方式",
250
256
  "dockerLabel": "Docker 安装(推荐)",
251
257
  "dockerHint": "适合无代码或低维护成本场景。后续升级时,拉取新镜像并重启应用即可。",
252
258
  "npmLabel": "create-nocobase-app 安装",
@@ -255,9 +261,9 @@
255
261
  "gitHint": "适合体验最新未发布版本、参与贡献,或直接修改和调试 NocoBase 源码。这个方式更偏向开发者使用。"
256
262
  },
257
263
  "version": {
258
- "message": "你想使用哪个版本?",
264
+ "message": "NocoBase 版本",
259
265
  "latestLabel": "latest",
260
- "latestHint": "稳定版。适合生产环境和希望获得稳定体验的场景。当前暂不可用。",
266
+ "latestHint": "稳定版。适合生产环境和希望获得稳定体验的场景。",
261
267
  "betaLabel": "beta",
262
268
  "betaHint": "测试版。包含即将发布的新功能,适合提前体验和反馈。",
263
269
  "alphaLabel": "alpha",
@@ -266,15 +272,15 @@
266
272
  "otherHint": "手动填写其他版本号、Docker tag 或 Git ref,例如分支名。"
267
273
  },
268
274
  "otherVersion": {
269
- "message": "请输入你想使用的版本号、Docker tag 或 Git ref",
275
+ "message": "自定义版本号、Docker tag 或 Git ref",
270
276
  "placeholder": "例如:fix/cli-v2"
271
277
  },
272
278
  "dockerRegistry": {
273
- "message": "你想使用哪个 Docker registry?镜像 tag 请单独在 Version 中填写。",
279
+ "message": "Docker registry(镜像 tag 在版本中单独设置)",
274
280
  "placeholder": "registry.cn-shanghai.aliyuncs.com/nocobase/nocobase"
275
281
  },
276
282
  "dockerPlatform": {
277
- "message": "要使用哪个 Docker 镜像平台?",
283
+ "message": "架构",
278
284
  "autoLabel": "自动",
279
285
  "autoHint": "由 Docker 根据当前机器自动选择"
280
286
  },
@@ -317,79 +323,79 @@
317
323
  },
318
324
  "prompts": {
319
325
  "env": {
320
- "message": "你想如何命名这个应用?",
326
+ "message": "应用环境标识",
321
327
  "placeholder": "local"
322
328
  },
323
329
  "lang": {
324
- "message": "你希望应用使用哪种语言?"
330
+ "message": "应用语言"
325
331
  },
326
332
  "appPath": {
327
- "message": "应用要放到哪里?(相对路径基于 {{root}})",
333
+ "message": "应用目录(相对路径基于 {{root}})",
328
334
  "placeholder": "./<env>/"
329
335
  },
330
336
  "appPort": {
331
- "message": "应用要使用哪个端口?",
337
+ "message": "应用端口",
332
338
  "placeholder": "13000"
333
339
  },
334
340
  "appPublicPath": {
335
- "message": "应用的子路径是什么?(例如 /nocobase/)",
341
+ "message": "应用子路径(例如 /nocobase/)",
336
342
  "placeholder": "/ 或 /nocobase/"
337
343
  },
338
344
  "storagePath": {
339
- "message": "上传文件和本地存储目录要放到哪里?",
345
+ "message": "上传文件和本地存储目录",
340
346
  "placeholder": "./<env>/storage/"
341
347
  },
342
348
  "dbDialect": {
343
- "message": "你想使用哪种数据库?"
349
+ "message": "数据库类型"
344
350
  },
345
351
  "builtinDb": {
346
- "message": "是否使用内置数据库?"
352
+ "message": "使用内置数据库"
347
353
  },
348
354
  "builtinDbImage": {
349
- "message": "内置数据库要使用哪个 Docker 镜像?",
355
+ "message": "内置数据库 Docker 镜像",
350
356
  "placeholder": "postgres:16"
351
357
  },
352
358
  "dbHost": {
353
- "message": "数据库主机地址是什么?",
359
+ "message": "数据库主机地址",
354
360
  "placeholder": "127.0.0.1"
355
361
  },
356
362
  "dbPort": {
357
- "message": "数据库端口是什么?",
363
+ "message": "数据库端口",
358
364
  "placeholder": "5432"
359
365
  },
360
366
  "dbDatabase": {
361
- "message": "数据库名称是什么?"
367
+ "message": "数据库名称"
362
368
  },
363
369
  "dbUser": {
364
- "message": "数据库用户名是什么?"
370
+ "message": "数据库用户名"
365
371
  },
366
372
  "dbPassword": {
367
- "message": "数据库密码是什么?"
373
+ "message": "数据库密码"
368
374
  },
369
375
  "dbSchema": {
370
- "message": "数据库 schema 是什么?(仅 PostgreSQL,可选)",
376
+ "message": "数据库 schema(仅 PostgreSQL/KingbaseES,可选)",
371
377
  "placeholder": "留空则使用默认 schema"
372
378
  },
373
379
  "dbTablePrefix": {
374
- "message": "要使用什么数据表前缀?(可选)",
380
+ "message": "数据表前缀(可选)",
375
381
  "placeholder": "例如:nb_"
376
382
  },
377
383
  "dbUnderscored": {
378
- "message": "数据库表名和字段名是否使用下划线风格?"
384
+ "message": "数据库表名和字段名使用下划线风格"
379
385
  },
380
386
  "rootUsername": {
381
- "message": "设置初始管理员用户名",
387
+ "message": "初始管理员用户名",
382
388
  "placeholder": "nocobase"
383
389
  },
384
390
  "rootEmail": {
385
- "message": "初始管理员邮箱是什么?",
391
+ "message": "初始管理员邮箱",
386
392
  "placeholder": "admin@nocobase.com"
387
393
  },
388
394
  "rootPassword": {
389
- "message": "设置初始管理员密码"
395
+ "message": "初始管理员密码"
390
396
  },
391
397
  "rootNickname": {
392
- "message": "初始管理员显示名称是什么?",
398
+ "message": "初始管理员显示名称",
393
399
  "placeholder": "Super Admin"
394
400
  }
395
401
  }
@@ -399,7 +405,7 @@
399
405
  "envExists": "Env \"{{envName}}\" 已存在,请换一个 env name。"
400
406
  },
401
407
  "messages": {
402
- "title": "配置供 Coding Agents 使用的 NocoBase",
408
+ "title": "配置 NocoBase",
403
409
  "appNameRequiredWhenSkipped": "跳过 prompts 时必须提供 Env name。",
404
410
  "appNameEnvHelp": "请使用 `nb init --yes --env <envName>` 继续。",
405
411
  "resumeEnvRequired": "恢复安装时必须提供 Env name。",
@@ -413,11 +419,11 @@
413
419
  },
414
420
  "prompts": {
415
421
  "appName": {
416
- "message": "这个环境要使用什么 `--env` 标识?",
422
+ "message": "应用环境唯一标识(CLI 将通过该标识定位并操作对应环境)",
417
423
  "placeholder": "local"
418
424
  },
419
425
  "setupMode": {
420
- "message": "你想用哪种方式配置这个环境?",
426
+ "message": "应用环境配置方式",
421
427
  "installNewLabel": "新安装",
422
428
  "installNewHint": "从零安装一个新的应用,适合首次部署、试用或新建本地开发环境。",
423
429
  "manageLocalLabel": "本机接管",
@@ -426,7 +432,7 @@
426
432
  "connectRemoteHint": "只保存远程应用的连接信息,不在本机安装或接管应用。"
427
433
  },
428
434
  "installSkills": {
429
- "message": "是否安装 NocoBase AI coding skills(nocobase/skills)?"
435
+ "message": "安装 NocoBase AI coding skills(nocobase/skills"
430
436
  },
431
437
  "apiBaseUrl": {
432
438
  "message": "API 基础地址",
@@ -437,9 +443,9 @@
437
443
  }
438
444
  },
439
445
  "webUi": {
440
- "pageTitle": "配置供 Coding Agents 使用的 NocoBase",
441
- "documentHeading": "配置供 Coding Agents 使用的 NocoBase",
442
- "documentHint": "安装一个新的应用、接管本机已有应用,或连接远程应用,让 Coding Agents 可以在当前工作区中访问和操作 NocoBase。",
446
+ "pageTitle": "配置 NocoBase",
447
+ "documentHeading": "配置 NocoBase",
448
+ "documentHint": "安装一个新的应用、管理已有应用,或连接远程应用。你可以直接使用它,也可以稍后让 coding agent 访问它。",
443
449
  "gettingStarted": {
444
450
  "title": "开始设置",
445
451
  "description": "选择新安装、本机接管,或远程连接。"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cli",
3
- "version": "2.2.0-beta.1",
3
+ "version": "2.2.0-beta.10",
4
4
  "description": "NocoBase Command Line Tool",
5
5
  "type": "module",
6
6
  "main": "dist/generated/command-registry.js",
@@ -12,6 +12,12 @@
12
12
  "keywords": [],
13
13
  "author": "",
14
14
  "license": "Apache-2.0",
15
+ "files": [
16
+ "assets",
17
+ "bin",
18
+ "dist",
19
+ "nocobase-ctl.config.json"
20
+ ],
15
21
  "bin": {
16
22
  "nb": "./bin/run.js"
17
23
  },
@@ -138,5 +144,5 @@
138
144
  "type": "git",
139
145
  "url": "git+https://github.com/nocobase/nocobase.git"
140
146
  },
141
- "gitHead": "f82fa9d0c3aa8e00e53dd94e404a312483b4866b"
147
+ "gitHead": "d572beec24de46df948f28db72b25303a63bf62d"
142
148
  }
package/scripts/build.mjs DELETED
@@ -1,34 +0,0 @@
1
- import { copyFileSync, mkdirSync, readdirSync, rmSync } from 'node:fs';
2
- import { createRequire } from 'node:module';
3
- import path from 'node:path';
4
- import { spawnSync } from 'node:child_process';
5
- import { fileURLToPath } from 'node:url';
6
-
7
- const require = createRequire(import.meta.url);
8
- const scriptsDir = path.dirname(fileURLToPath(import.meta.url));
9
- const packageRoot = path.resolve(scriptsDir, '..');
10
- const distDir = path.join(packageRoot, 'dist');
11
- const srcLocaleDir = path.join(packageRoot, 'src', 'locale');
12
- const distLocaleDir = path.join(distDir, 'locale');
13
- const tscBin = require.resolve('typescript/bin/tsc');
14
-
15
- rmSync(distDir, { recursive: true, force: true });
16
-
17
- const compile = spawnSync(process.execPath, [tscBin, '-p', path.join(packageRoot, 'tsconfig.json')], {
18
- cwd: packageRoot,
19
- stdio: 'inherit',
20
- });
21
-
22
- if (compile.status !== 0) {
23
- process.exit(compile.status ?? 1);
24
- }
25
-
26
- mkdirSync(distLocaleDir, { recursive: true });
27
-
28
- for (const entry of readdirSync(srcLocaleDir, { withFileTypes: true })) {
29
- if (!entry.isFile() || !entry.name.endsWith('.json')) {
30
- continue;
31
- }
32
-
33
- copyFileSync(path.join(srcLocaleDir, entry.name), path.join(distLocaleDir, entry.name));
34
- }
package/scripts/clean.mjs DELETED
@@ -1,9 +0,0 @@
1
- import { rmSync } from 'node:fs';
2
- import path from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
-
5
- const scriptsDir = path.dirname(fileURLToPath(import.meta.url));
6
- const packageRoot = path.resolve(scriptsDir, '..');
7
- const distDir = path.join(packageRoot, 'dist');
8
-
9
- rmSync(distDir, { recursive: true, force: true });
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "NodeNext",
5
- "moduleResolution": "NodeNext",
6
- "rewriteRelativeImportExtensions": true,
7
- "rootDir": "src",
8
- "outDir": "dist",
9
- "declaration": false,
10
- "resolveJsonModule": true,
11
- "esModuleInterop": true,
12
- "allowSyntheticDefaultImports": true,
13
- "types": ["node"],
14
- "skipLibCheck": true,
15
- "strict": false
16
- },
17
- "include": ["src/**/*.ts"],
18
- "exclude": ["src/**/__tests__/**"]
19
- }