poe-code 3.0.220 → 3.0.221

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.
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ import { existsSync } from "node:fs";
3
+ import { spawnSync } from "node:child_process";
4
+ import { dirname, join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ const root = dirname(dirname(fileURLToPath(import.meta.url)));
8
+
9
+ if (process.env.CI === "1" || process.env.SKIP_SYNC_SKILLS === "1") {
10
+ process.exit(0);
11
+ }
12
+
13
+ if (!existsSync(join(root, "scripts/sync-skills.ts"))) {
14
+ process.exit(0);
15
+ }
16
+
17
+ const npmExecPath = process.env.npm_execpath;
18
+ const command = npmExecPath ? process.execPath : process.platform === "win32" ? "npm.cmd" : "npm";
19
+ const args = npmExecPath ? [npmExecPath, "run", "sync-skills"] : ["run", "sync-skills"];
20
+
21
+ const result = spawnSync(command, args, {
22
+ cwd: root,
23
+ env: { ...process.env, SYNC_SKILLS_SCOPE: "global" },
24
+ stdio: "inherit",
25
+ shell: false
26
+ });
27
+
28
+ if (result.error || result.status !== 0) {
29
+ const reason = result.error?.message ?? `exit code ${result.status}`;
30
+ console.error(`Warning: skill sync failed during postinstall (${reason}).`);
31
+ }