capix-code 2.2.5 → 2.3.0
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/scripts/postinstall.cjs +9 -1
package/package.json
CHANGED
package/scripts/postinstall.cjs
CHANGED
|
@@ -39,13 +39,21 @@ if (!fs.existsSync(src)) {
|
|
|
39
39
|
console.error('Missing customer/');
|
|
40
40
|
process.exit(1);
|
|
41
41
|
}
|
|
42
|
+
// Remove the runtime-provider symlink before copying to avoid EISDIR conflicts.
|
|
43
|
+
// The tarball contains a symlink at runtime/node_modules/@capix/runtime-provider
|
|
44
|
+
// pointing to runtime/packages/runtime-provider; cpSync copies the symlink first,
|
|
45
|
+
// then the directory copy conflicts.
|
|
46
|
+
const badLink = path.join(src, 'runtime', 'node_modules', '@capix', 'runtime-provider');
|
|
47
|
+
if (fs.existsSync(badLink) && fs.lstatSync(badLink).isSymbolicLink()) {
|
|
48
|
+
fs.rmSync(badLink, { force: true });
|
|
49
|
+
}
|
|
42
50
|
const backup = ROOT + '.bak';
|
|
43
51
|
const next = `${ROOT}.next-${process.pid}`;
|
|
44
52
|
fs.rmSync(next, { recursive: true, force: true });
|
|
45
53
|
fs.mkdirSync(next, { recursive: true });
|
|
46
54
|
for (const dir of ['bin', 'engine', 'runtime', 'config', 'mcp', 'commands']) {
|
|
47
55
|
const s = path.join(src, dir);
|
|
48
|
-
if (fs.existsSync(s)) fs.cpSync(s, path.join(next, dir), { recursive: true });
|
|
56
|
+
if (fs.existsSync(s)) fs.cpSync(s, path.join(next, dir), { recursive: true, dereference: true });
|
|
49
57
|
}
|
|
50
58
|
const executableSuffix = process.platform === 'win32' ? '.exe' : '';
|
|
51
59
|
const nextLauncher = path.join(next, 'bin', `capix-code${executableSuffix}`);
|