@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.
- package/package.json +1 -1
- package/src/index.ts +2 -9
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -40,14 +40,7 @@ async function initializeCLI(): Promise<void> {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// 启动 CLI 应用
|
|
43
|
-
//
|
|
44
|
-
|
|
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 };
|