@xiaozhi-client/cli 1.9.4-beta.11 → 1.9.4-beta.12

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/package.json +1 -1
  2. package/src/index.ts +2 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaozhi-client/cli",
3
- "version": "1.9.4-beta.11",
3
+ "version": "1.9.4-beta.12",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -40,14 +40,7 @@ async function initializeCLI(): Promise<void> {
40
40
  }
41
41
 
42
42
  // 启动 CLI 应用
43
- // 使用更可靠的检测方法,兼容 Windows 路径
44
- // 将路径转换为 URL 格式进行比较
45
- const scriptPath = process.argv[1].replace(/\\/g, "/");
46
- const isMainModule =
47
- import.meta.url === `file:///${scriptPath}` ||
48
- import.meta.url === `file://${scriptPath}`;
49
- if (isMainModule) {
50
- initializeCLI();
51
- }
43
+ // CLI 入口文件直接执行初始化(无需模块检测,兼容 npm 全局安装的符号链接)
44
+ initializeCLI();
52
45
 
53
46
  export { initializeCLI };