claudia-orchestrator 0.1.3 → 0.1.6
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.js +28 -3
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { chmodSync } from 'fs';
|
|
3
|
+
import { chmodSync, existsSync } from 'fs';
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { dirname } from 'path';
|
|
@@ -10,8 +10,16 @@ const __dirname = dirname(__filename);
|
|
|
10
10
|
|
|
11
11
|
// List of files that need executable permissions
|
|
12
12
|
const executableFiles = [
|
|
13
|
+
'dist/server.js',
|
|
13
14
|
'dist/mcp-server/index.js',
|
|
14
|
-
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
// node-pty spawn-helper paths vary by package manager
|
|
18
|
+
// Try multiple possible locations
|
|
19
|
+
const spawnHelperPaths = [
|
|
20
|
+
// npm flat structure
|
|
21
|
+
'node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper',
|
|
22
|
+
// pnpm nested structure
|
|
15
23
|
'node_modules/.pnpm/node-pty@1.1.0/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper',
|
|
16
24
|
];
|
|
17
25
|
|
|
@@ -23,8 +31,25 @@ executableFiles.forEach(file => {
|
|
|
23
31
|
chmodSync(filePath, '755');
|
|
24
32
|
console.log(`✓ Made ${file} executable`);
|
|
25
33
|
} catch (error) {
|
|
26
|
-
|
|
34
|
+
// Don't warn for missing files - they may not exist in all installs
|
|
35
|
+
if (error.code !== 'ENOENT') {
|
|
36
|
+
console.error(`✗ Failed to make ${file} executable:`, error.message);
|
|
37
|
+
}
|
|
27
38
|
}
|
|
28
39
|
});
|
|
29
40
|
|
|
41
|
+
// Fix spawn-helper on macOS (try all possible paths)
|
|
42
|
+
for (const spawnHelper of spawnHelperPaths) {
|
|
43
|
+
const filePath = join(__dirname, '..', spawnHelper);
|
|
44
|
+
if (existsSync(filePath)) {
|
|
45
|
+
try {
|
|
46
|
+
chmodSync(filePath, '755');
|
|
47
|
+
console.log(`✓ Made spawn-helper executable`);
|
|
48
|
+
break; // Only need to fix one
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(`✗ Failed to make spawn-helper executable:`, error.message);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
30
55
|
console.log('Postinstall complete.');
|