px2cc 2.1.1 → 2.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.
- package/bin.js +7 -17
- package/cli.js +6 -7
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Px2CC 启动器 -
|
|
5
|
-
* 直接调用主函数,确保跨平台兼容
|
|
4
|
+
* Px2CC 启动器 - Windows兼容版本
|
|
6
5
|
*/
|
|
7
6
|
|
|
8
7
|
// 设置环境变量来抑制PromptX内部日志
|
|
9
8
|
process.env.LOG_LEVEL = 'silent';
|
|
10
9
|
|
|
11
|
-
//
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} else {
|
|
18
|
-
// 如果没有导出main函数,直接导入模块(会自动执行)
|
|
19
|
-
await import('./cli.js');
|
|
20
|
-
}
|
|
21
|
-
} catch (error) {
|
|
22
|
-
console.error('启动失败:', error.message);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
})();
|
|
10
|
+
// 简单直接的导入方式 - Windows兼容
|
|
11
|
+
import('./cli.js').catch(error => {
|
|
12
|
+
console.error('启动失败:', error.message);
|
|
13
|
+
console.error('请检查Node.js版本是否 >= 18.0.0');
|
|
14
|
+
process.exit(1);
|
|
15
|
+
});
|
package/cli.js
CHANGED
|
@@ -373,10 +373,9 @@ export async function main() {
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
// 运行主程序 -
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
376
|
+
// 运行主程序 - Windows兼容版本
|
|
377
|
+
// 通过bin.js调用时直接执行,通过import调用时也执行
|
|
378
|
+
main().catch(error => {
|
|
379
|
+
console.error(chalk.red('❌ 程序异常:'), error.message);
|
|
380
|
+
process.exit(1);
|
|
381
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "px2cc",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "CLI tool that implements complete PromptX Action flow in Claude Code - role activation, dependency loading, cognition networks & memory systems",
|
|
5
5
|
"main": "cli.js",
|
|
6
6
|
"type": "module",
|