@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.
- package/assets/env-proxy/nginx/snippets/proxy-location.conf +1 -0
- package/bin/early-locale.js +89 -0
- package/bin/node-version.js +35 -0
- package/bin/run.js +9 -0
- package/bin/windows-admin.js +60 -0
- package/dist/commands/app/destroy.js +4 -3
- package/dist/commands/app/restart.js +38 -0
- package/dist/commands/app/shared.js +49 -3
- package/dist/commands/app/start.js +95 -0
- package/dist/commands/app/upgrade.js +11 -0
- package/dist/commands/env/info.js +11 -1
- package/dist/commands/examples/prompts-stages.js +2 -2
- package/dist/commands/examples/prompts-test.js +2 -2
- package/dist/commands/init.js +33 -11
- package/dist/commands/install.js +159 -107
- package/dist/commands/license/activate.js +4 -1
- package/dist/commands/license/shared.js +24 -15
- package/dist/commands/proxy/caddy/generate.js +93 -7
- package/dist/commands/proxy/nginx/generate.js +98 -7
- package/dist/commands/revision/create.js +1 -1
- package/dist/commands/self/check.js +1 -1
- package/dist/commands/self/update.js +4 -4
- package/dist/commands/skills/check.js +4 -5
- package/dist/commands/skills/install.js +18 -1
- package/dist/commands/skills/update.js +19 -4
- package/dist/commands/source/dev.js +9 -5
- package/dist/commands/source/download.js +85 -16
- package/dist/lib/api-command-compat.js +51 -8
- package/dist/lib/app-managed-resources.js +104 -5
- package/dist/lib/auth-store.js +102 -12
- package/dist/lib/cli-config.js +73 -1
- package/dist/lib/docker-image.js +94 -6
- package/dist/lib/env-auth.js +291 -45
- package/dist/lib/env-config.js +11 -0
- package/dist/lib/env-proxy-config.js +48 -0
- package/dist/lib/env-proxy.js +164 -58
- package/dist/lib/hook-script.js +160 -0
- package/dist/lib/prompt-catalog-terminal.js +32 -19
- package/dist/lib/prompt-validators.js +1 -1
- package/dist/lib/prompt-web-ui.js +20 -13
- package/dist/lib/proxy-caddy.js +77 -9
- package/dist/lib/proxy-nginx.js +71 -11
- package/dist/lib/run-npm.js +4 -0
- package/dist/lib/self-manager.js +254 -46
- package/dist/lib/skills-manager.js +116 -23
- package/dist/lib/source-publish.js +2 -2
- package/dist/lib/startup-update.js +1 -1
- package/dist/locale/en-US.json +49 -43
- package/dist/locale/zh-CN.json +49 -43
- package/package.json +8 -2
- package/scripts/build.mjs +0 -34
- package/scripts/clean.mjs +0 -9
- 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 --
|
|
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);
|
package/dist/locale/en-US.json
CHANGED
|
@@ -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
|
|
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": "
|
|
96
|
+
"message": "App environment identifier",
|
|
91
97
|
"placeholder": "default"
|
|
92
98
|
},
|
|
93
99
|
"scope": {
|
|
94
|
-
"message": "
|
|
100
|
+
"message": "Connection save location",
|
|
95
101
|
"globalLabel": "Global",
|
|
96
102
|
"globalHint": "user-level config"
|
|
97
103
|
},
|
|
98
104
|
"apiBaseUrl": {
|
|
99
|
-
"message": "
|
|
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": "
|
|
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": "
|
|
117
|
+
"message": "Basic login username",
|
|
112
118
|
"placeholder": "admin"
|
|
113
119
|
},
|
|
114
120
|
"password": {
|
|
115
|
-
"message": "
|
|
121
|
+
"message": "Basic login password"
|
|
116
122
|
},
|
|
117
123
|
"accessToken": {
|
|
118
|
-
"message": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
264
|
+
"message": "NocoBase version",
|
|
259
265
|
"latestLabel": "latest",
|
|
260
|
-
"latestHint": "Stable release. Best for production use and the most predictable experience.
|
|
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": "
|
|
275
|
+
"message": "Custom version, Docker tag, or Git ref",
|
|
270
276
|
"placeholder": "For example: fix/cli-v2"
|
|
271
277
|
},
|
|
272
278
|
"dockerRegistry": {
|
|
273
|
-
"message": "
|
|
279
|
+
"message": "Docker registry (image tag is set in Version)",
|
|
274
280
|
"placeholder": "nocobase/nocobase"
|
|
275
281
|
},
|
|
276
282
|
"dockerPlatform": {
|
|
277
|
-
"message": "
|
|
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": "
|
|
326
|
+
"message": "App environment identifier",
|
|
321
327
|
"placeholder": "local"
|
|
322
328
|
},
|
|
323
329
|
"lang": {
|
|
324
|
-
"message": "
|
|
330
|
+
"message": "App language"
|
|
325
331
|
},
|
|
326
332
|
"appPath": {
|
|
327
|
-
"message": "
|
|
333
|
+
"message": "App directory (relative to {{root}})",
|
|
328
334
|
"placeholder": "./<env>/"
|
|
329
335
|
},
|
|
330
336
|
"appPort": {
|
|
331
|
-
"message": "
|
|
337
|
+
"message": "App port",
|
|
332
338
|
"placeholder": "13000"
|
|
333
339
|
},
|
|
334
340
|
"appPublicPath": {
|
|
335
|
-
"message": "
|
|
341
|
+
"message": "App subpath (for example, /nocobase/)",
|
|
336
342
|
"placeholder": "/ or /nocobase/"
|
|
337
343
|
},
|
|
338
344
|
"storagePath": {
|
|
339
|
-
"message": "
|
|
345
|
+
"message": "Uploads and local files directory",
|
|
340
346
|
"placeholder": "./<env>/storage/"
|
|
341
347
|
},
|
|
342
348
|
"dbDialect": {
|
|
343
|
-
"message": "
|
|
349
|
+
"message": "Database type"
|
|
344
350
|
},
|
|
345
351
|
"builtinDb": {
|
|
346
|
-
"message": "
|
|
352
|
+
"message": "Use built-in database"
|
|
347
353
|
},
|
|
348
354
|
"builtinDbImage": {
|
|
349
|
-
"message": "
|
|
355
|
+
"message": "Built-in database Docker image",
|
|
350
356
|
"placeholder": "postgres:16"
|
|
351
357
|
},
|
|
352
358
|
"dbHost": {
|
|
353
|
-
"message": "
|
|
359
|
+
"message": "Database host",
|
|
354
360
|
"placeholder": "127.0.0.1"
|
|
355
361
|
},
|
|
356
362
|
"dbPort": {
|
|
357
|
-
"message": "
|
|
363
|
+
"message": "Database port",
|
|
358
364
|
"placeholder": "5432"
|
|
359
365
|
},
|
|
360
366
|
"dbDatabase": {
|
|
361
|
-
"message": "
|
|
367
|
+
"message": "Database name"
|
|
362
368
|
},
|
|
363
369
|
"dbUser": {
|
|
364
|
-
"message": "
|
|
370
|
+
"message": "Database username"
|
|
365
371
|
},
|
|
366
372
|
"dbPassword": {
|
|
367
|
-
"message": "
|
|
373
|
+
"message": "Database password"
|
|
368
374
|
},
|
|
369
375
|
"dbSchema": {
|
|
370
|
-
"message": "
|
|
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": "
|
|
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": "
|
|
387
|
+
"message": "Initial admin username",
|
|
382
388
|
"placeholder": "nocobase"
|
|
383
389
|
},
|
|
384
390
|
"rootEmail": {
|
|
385
|
-
"message": "
|
|
391
|
+
"message": "Initial admin email",
|
|
386
392
|
"placeholder": "admin@nocobase.com"
|
|
387
393
|
},
|
|
388
394
|
"rootPassword": {
|
|
389
|
-
"message": "
|
|
395
|
+
"message": "Initial admin password"
|
|
390
396
|
},
|
|
391
397
|
"rootNickname": {
|
|
392
|
-
"message": "
|
|
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
|
|
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": "
|
|
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": "
|
|
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
|
|
441
|
-
"documentHeading": "Set up NocoBase
|
|
442
|
-
"documentHint": "Install a new app, manage
|
|
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."
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -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": "
|
|
117
|
+
"message": "Basic 登录用户名",
|
|
112
118
|
"placeholder": "admin"
|
|
113
119
|
},
|
|
114
120
|
"password": {
|
|
115
|
-
"message": "
|
|
121
|
+
"message": "Basic 登录密码"
|
|
116
122
|
},
|
|
117
123
|
"accessToken": {
|
|
118
|
-
"message": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
275
|
+
"message": "自定义版本号、Docker tag 或 Git ref",
|
|
270
276
|
"placeholder": "例如:fix/cli-v2"
|
|
271
277
|
},
|
|
272
278
|
"dockerRegistry": {
|
|
273
|
-
"message": "
|
|
279
|
+
"message": "Docker registry(镜像 tag 在版本中单独设置)",
|
|
274
280
|
"placeholder": "registry.cn-shanghai.aliyuncs.com/nocobase/nocobase"
|
|
275
281
|
},
|
|
276
282
|
"dockerPlatform": {
|
|
277
|
-
"message": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
441
|
-
"documentHeading": "
|
|
442
|
-
"documentHint": "
|
|
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.
|
|
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": "
|
|
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
|
-
}
|