@icyfenix-dmla/cli 2026.4.18-2209 → 2026.4.19-39
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/package.json +3 -2
- package/src/commands/manage.js +2 -2
- package/src/index.js +5 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icyfenix-dmla/cli",
|
|
3
|
-
"version": "2026.4.
|
|
3
|
+
"version": "2026.4.19-39",
|
|
4
4
|
"description": "DMLA 沙箱服务命令行工具",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"enquirer": "^2.4.1",
|
|
18
18
|
"dockerode": "^4.0.2",
|
|
19
19
|
"express": "^4.21.2",
|
|
20
|
-
"cors": "^2.8.5"
|
|
20
|
+
"cors": "^2.8.5",
|
|
21
|
+
"@icyfenix-dmla/install": "*"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"jest": "^29.7.0"
|
package/src/commands/manage.js
CHANGED
|
@@ -19,7 +19,7 @@ const CONFIG = {
|
|
|
19
19
|
imageCpu: 'dmla-sandbox:cpu',
|
|
20
20
|
imageGpu: 'dmla-sandbox:gpu',
|
|
21
21
|
dockerhubRegistry: 'icyfenix',
|
|
22
|
-
acrRegistry: 'crpi-aani1ibpows293b8.cn-hangzhou.personal.cr.aliyuncs.com/
|
|
22
|
+
acrRegistry: 'crpi-aani1ibpows293b8.cn-hangzhou.personal.cr.aliyuncs.com/fenixsoft',
|
|
23
23
|
imageName: 'dmla-sandbox',
|
|
24
24
|
defaultPort: 3001
|
|
25
25
|
}
|
|
@@ -292,7 +292,7 @@ export async function runDoctor() {
|
|
|
292
292
|
// 测试 ACR
|
|
293
293
|
console.log(chalk.gray(' 测试阿里云 ACR 连接...'))
|
|
294
294
|
try {
|
|
295
|
-
execSync('docker pull crpi-aani1ibpows293b8.cn-hangzhou.personal.cr.aliyuncs.com/
|
|
295
|
+
execSync('docker pull crpi-aani1ibpows293b8.cn-hangzhou.personal.cr.aliyuncs.com/fenixsoft/dmla-sandbox:cpu --quiet', { timeout: 10000 })
|
|
296
296
|
console.log(chalk.green(' ✅ ACR 连接正常'))
|
|
297
297
|
} catch {
|
|
298
298
|
console.log(chalk.yellow(' ⚠️ ACR 连接超时或受限'))
|
package/src/index.js
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import { program } from 'commander'
|
|
6
6
|
import chalk from 'chalk'
|
|
7
7
|
import { startServer, stopServer, getStatus } from './commands/server.js'
|
|
8
|
-
import {
|
|
8
|
+
import { updateAll, runDoctor } from './commands/manage.js'
|
|
9
|
+
import { runInstallTUI } from '@icyfenix-dmla/install'
|
|
9
10
|
|
|
10
11
|
const VERSION = '0.0.0' // 将在发布时由 workflow 更新
|
|
11
12
|
|
|
@@ -58,24 +59,9 @@ program
|
|
|
58
59
|
// ─────────────────────────────────────────────────────────────
|
|
59
60
|
program
|
|
60
61
|
.command('install')
|
|
61
|
-
.description('
|
|
62
|
-
.
|
|
63
|
-
|
|
64
|
-
.option('--all', '安装所有镜像(默认)')
|
|
65
|
-
.option('-r, --registry <type>', '镜像仓库 (dockerhub/acr)', 'dockerhub')
|
|
66
|
-
.action(async (options) => {
|
|
67
|
-
const registry = options.registry
|
|
68
|
-
let types = []
|
|
69
|
-
|
|
70
|
-
if (options.cpu) types.push('cpu')
|
|
71
|
-
if (options.gpu) types.push('gpu')
|
|
72
|
-
if (types.length === 0 || options.all) types = ['cpu', 'gpu']
|
|
73
|
-
|
|
74
|
-
console.log(chalk.blue('📦 安装 DMLA Docker 镜像...'))
|
|
75
|
-
console.log(chalk.gray(` 仓库: ${registry}`))
|
|
76
|
-
console.log(chalk.gray(` 类型: ${types.join(', ')}`))
|
|
77
|
-
|
|
78
|
-
await installImages(types, registry)
|
|
62
|
+
.description('启动安装向导')
|
|
63
|
+
.action(async () => {
|
|
64
|
+
await runInstallTUI()
|
|
79
65
|
})
|
|
80
66
|
|
|
81
67
|
// ─────────────────────────────────────────────────────────────
|