ms-vite-plugin 1.1.0 → 1.1.2

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 (2) hide show
  1. package/dist/cli.js +14 -9
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -352,7 +352,12 @@ function renderDetailedCommandHelp() {
352
352
  continue;
353
353
  }
354
354
  for (const opt of cmd.options) {
355
- const desc = opt.description ? ` ${opt.description}` : "";
355
+ const defaultText = opt.defaultValue !== undefined && opt.defaultValue !== null
356
+ ? ` (默认: ${String(opt.defaultValue)})`
357
+ : "";
358
+ const desc = opt.description
359
+ ? ` ${opt.description}${defaultText}`
360
+ : defaultText;
356
361
  lines.push(` ${opt.flags}${desc}`);
357
362
  }
358
363
  }
@@ -360,7 +365,7 @@ function renderDetailedCommandHelp() {
360
365
  return lines.join("\n");
361
366
  }
362
367
  // 配置 CLI 程序
363
- commander_1.program.name("ms-cli").description("快点JS 构建工具").version("1.0.4");
368
+ commander_1.program.name("ms-cli").description("快点JS 构建工具").version("1.1.2");
364
369
  commander_1.program.addHelpText("after", renderDetailedCommandHelp);
365
370
  // 构建命令
366
371
  commander_1.program
@@ -378,9 +383,9 @@ commander_1.program
378
383
  .command("run")
379
384
  .description("在设备上运行项目")
380
385
  .option("-i, --ip <ip>", "设备 IP 地址(transport=http 时必填)")
381
- .option("--port <port>", "设备端口 (默认: 9800)", "9800")
386
+ .option("--port <port>", "设备端口", "9800")
382
387
  .option("-t, --transport <transport>", "传输方式: http|ws", "http")
383
- .option("--ws-port <wsPort>", "WS 服务端口 (默认: 31111)", "31111")
388
+ .option("--ws-port <wsPort>", "WS 服务端口", "31111")
384
389
  .option("--ws-wait-ms <wsWaitMs>", "WS 等待设备连接时间(毫秒)", "30000")
385
390
  .action(runCommand);
386
391
  // UI 预览命令
@@ -388,9 +393,9 @@ commander_1.program
388
393
  .command("run-ui")
389
394
  .description("在设备上预览 UI")
390
395
  .option("-i, --ip <ip>", "设备 IP 地址(transport=http 时必填)")
391
- .option("--port <port>", "设备端口 (默认: 9800)", "9800")
396
+ .option("--port <port>", "设备端口", "9800")
392
397
  .option("-t, --transport <transport>", "传输方式: http|ws", "http")
393
- .option("--ws-port <wsPort>", "WS 服务端口 (默认: 31111)", "31111")
398
+ .option("--ws-port <wsPort>", "WS 服务端口", "31111")
394
399
  .option("--ws-wait-ms <wsWaitMs>", "WS 等待设备连接时间(毫秒)", "30000")
395
400
  .action(runUICommand);
396
401
  // 停止命令
@@ -398,16 +403,16 @@ commander_1.program
398
403
  .command("stop")
399
404
  .description("停止设备上的项目")
400
405
  .option("-i, --ip <ip>", "设备 IP 地址(transport=http 时必填)")
401
- .option("--port <port>", "设备端口 (默认: 9800)", "9800")
406
+ .option("--port <port>", "设备端口", "9800")
402
407
  .option("-t, --transport <transport>", "传输方式: http|ws", "http")
403
- .option("--ws-port <wsPort>", "WS 服务端口 (默认: 31111)", "31111")
408
+ .option("--ws-port <wsPort>", "WS 服务端口", "31111")
404
409
  .option("--ws-wait-ms <wsWaitMs>", "WS 等待设备连接时间(毫秒)", "30000")
405
410
  .action(stopCommand);
406
411
  // WS 服务启动命令
407
412
  commander_1.program
408
413
  .command("ws-start")
409
414
  .description("启动 CLI 内置 WS 服务")
410
- .option("--ws-port <wsPort>", "WS 服务端口 (默认: 31111)", "31111")
415
+ .option("--ws-port <wsPort>", "WS 服务端口", "31111")
411
416
  .action(wsStartCommand);
412
417
  // WS 服务停止命令
413
418
  commander_1.program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-vite-plugin",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "publishConfig": {