px2cc 2.0.3 → 2.0.4

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/bin.js +11 -1
  2. package/package.json +1 -1
package/bin.js CHANGED
@@ -9,7 +9,17 @@
9
9
  process.env.PROMPTX_QUIET = 'true';
10
10
 
11
11
  // 直接导入并执行cli.js
12
- import('./cli.js').catch(error => {
12
+ import { fileURLToPath } from 'url';
13
+ import { dirname } from 'path';
14
+ import { pathToFileURL } from 'url';
15
+
16
+ const __filename = fileURLToPath(import.meta.url);
17
+ const __dirname = dirname(__filename);
18
+
19
+ // 构建cli.js的文件URL(兼容Windows)
20
+ const cliPath = new URL('cli.js', import.meta.url).href;
21
+
22
+ import(cliPath).catch(error => {
13
23
  console.error('启动失败:', error.message);
14
24
  process.exit(1);
15
25
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "px2cc",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
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",