cmux 0.7.3 → 0.7.5
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/cmux +23 -80
- package/lib/cmux +0 -0
- package/package.json +7 -7
package/bin/cmux
CHANGED
|
@@ -1,80 +1,23 @@
|
|
|
1
|
-
#!/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function findBinary(packageName) {
|
|
27
|
-
const binName = process.platform === 'win32' ? 'cmux.exe' : 'cmux';
|
|
28
|
-
|
|
29
|
-
// Try require.resolve first
|
|
30
|
-
try {
|
|
31
|
-
const pkgPath = require.resolve(`${packageName}/package.json`);
|
|
32
|
-
const binPath = path.join(path.dirname(pkgPath), 'bin', binName);
|
|
33
|
-
if (fs.existsSync(binPath)) {
|
|
34
|
-
return binPath;
|
|
35
|
-
}
|
|
36
|
-
} catch (e) {
|
|
37
|
-
// Continue to other methods
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Try common paths
|
|
41
|
-
const possiblePaths = [
|
|
42
|
-
path.join(__dirname, '..', '..', packageName, 'bin'),
|
|
43
|
-
path.join(__dirname, '..', 'node_modules', packageName, 'bin'),
|
|
44
|
-
path.join(__dirname, '..', '..', '..', packageName, 'bin'),
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
for (const p of possiblePaths) {
|
|
48
|
-
const binPath = path.join(p, binName);
|
|
49
|
-
if (fs.existsSync(binPath)) {
|
|
50
|
-
return binPath;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const platformPackage = getPlatformPackage();
|
|
58
|
-
|
|
59
|
-
if (!platformPackage) {
|
|
60
|
-
console.error(`Unsupported platform: ${process.platform}-${process.arch}`);
|
|
61
|
-
console.error('Supported platforms: darwin-arm64, darwin-x64, linux-arm64, linux-x64, win32-x64');
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const binary = findBinary(platformPackage);
|
|
66
|
-
|
|
67
|
-
if (!binary) {
|
|
68
|
-
console.error(`cmux: Could not find binary for ${platformPackage}`);
|
|
69
|
-
console.error(`Try reinstalling: npm install -g cmux`);
|
|
70
|
-
console.error(`Or install platform package directly: npm install -g ${platformPackage}`);
|
|
71
|
-
process.exit(1);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Execute the binary with all arguments
|
|
75
|
-
const result = spawnSync(binary, process.argv.slice(2), {
|
|
76
|
-
stdio: 'inherit',
|
|
77
|
-
env: process.env,
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
process.exit(result.status || 0);
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Wrapper script - actual binary is copied by postinstall
|
|
3
|
+
# Resolve symlinks to find the real script location
|
|
4
|
+
SCRIPT="$0"
|
|
5
|
+
while [ -L "$SCRIPT" ]; do
|
|
6
|
+
DIR="$(dirname "$SCRIPT")"
|
|
7
|
+
SCRIPT="$(readlink "$SCRIPT")"
|
|
8
|
+
# Handle relative symlinks
|
|
9
|
+
case "$SCRIPT" in
|
|
10
|
+
/*) ;;
|
|
11
|
+
*) SCRIPT="$DIR/$SCRIPT" ;;
|
|
12
|
+
esac
|
|
13
|
+
done
|
|
14
|
+
DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
|
15
|
+
|
|
16
|
+
if [ -f "$DIR/cmux.bin" ]; then
|
|
17
|
+
exec "$DIR/cmux.bin" "$@"
|
|
18
|
+
elif [ -f "$DIR/../lib/cmux" ]; then
|
|
19
|
+
exec "$DIR/../lib/cmux" "$@"
|
|
20
|
+
else
|
|
21
|
+
echo "cmux: Binary not found. Try reinstalling: npm install -g cmux"
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
package/lib/cmux
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cmux",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.7.5",
|
|
4
|
+
"description": "CLI tool to instantly spin up cloud VMs preloaded with Chrome, VNC, SSH, and rsync",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
7
7
|
"devbox",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"postinstall": "node lib/postinstall.js"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"cmux-darwin-arm64": "0.7.
|
|
35
|
-
"cmux-darwin-x64": "0.7.
|
|
36
|
-
"cmux-linux-arm64": "0.7.
|
|
37
|
-
"cmux-linux-x64": "0.7.
|
|
38
|
-
"cmux-win32-x64": "0.7.
|
|
34
|
+
"cmux-darwin-arm64": "0.7.5",
|
|
35
|
+
"cmux-darwin-x64": "0.7.5",
|
|
36
|
+
"cmux-linux-arm64": "0.7.5",
|
|
37
|
+
"cmux-linux-x64": "0.7.5",
|
|
38
|
+
"cmux-win32-x64": "0.7.5"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=16"
|