@manaflow-ai/cloudrouter 0.9.6 → 0.9.8
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/cloudrouter +16 -50
- package/lib/cloudrouter +0 -0
- package/package.json +6 -6
package/bin/cloudrouter
CHANGED
|
@@ -1,61 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* The postinstall script will overwrite this file with the platform-specific
|
|
7
|
-
* native binary. If postinstall hasn't run yet, this wrapper finds and
|
|
8
|
-
* executes the binary from lib/ or the platform package.
|
|
3
|
+
* Launcher stub for cloudrouter CLI.
|
|
4
|
+
* This file is replaced by the native binary during postinstall.
|
|
5
|
+
* If postinstall didn't run, this falls back to lib/cloudrouter.
|
|
9
6
|
*/
|
|
10
|
-
|
|
11
7
|
const { execFileSync } = require("child_process");
|
|
12
8
|
const path = require("path");
|
|
13
9
|
const fs = require("fs");
|
|
14
10
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
// Look for the native binary in these locations (in order)
|
|
18
|
-
const candidates = [
|
|
19
|
-
// lib/cloudrouter - copied by build process as fallback
|
|
20
|
-
path.join(__dirname, "..", "lib", binName),
|
|
21
|
-
// Platform package in node_modules (hoisted)
|
|
22
|
-
...getPlatformPaths(),
|
|
23
|
-
];
|
|
11
|
+
const libBinary = path.join(__dirname, "..", "lib", "cloudrouter");
|
|
24
12
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
path.join(__dirname, "..", "node_modules", "@manaflow-ai", `cloudrouter-${platform}-${arch}`, "bin", binName),
|
|
35
|
-
];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
let binaryPath;
|
|
39
|
-
for (const candidate of candidates) {
|
|
40
|
-
if (fs.existsSync(candidate)) {
|
|
41
|
-
binaryPath = candidate;
|
|
42
|
-
break;
|
|
13
|
+
if (fs.existsSync(libBinary)) {
|
|
14
|
+
try {
|
|
15
|
+
const result = execFileSync(libBinary, process.argv.slice(2), {
|
|
16
|
+
stdio: "inherit",
|
|
17
|
+
env: process.env,
|
|
18
|
+
});
|
|
19
|
+
process.exit(0);
|
|
20
|
+
} catch (e) {
|
|
21
|
+
process.exit(e.status || 1);
|
|
43
22
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
console.error("cloudrouter: Could not find native binary. Try reinstalling: npm install -g @manaflow-ai/cloudrouter");
|
|
23
|
+
} else {
|
|
24
|
+
console.error("cloudrouter: binary not found. Try reinstalling:");
|
|
25
|
+
console.error(" npm install -g @manaflow-ai/cloudrouter");
|
|
48
26
|
process.exit(1);
|
|
49
27
|
}
|
|
50
|
-
|
|
51
|
-
try {
|
|
52
|
-
const result = execFileSync(binaryPath, process.argv.slice(2), {
|
|
53
|
-
stdio: "inherit",
|
|
54
|
-
env: process.env,
|
|
55
|
-
});
|
|
56
|
-
} catch (err) {
|
|
57
|
-
if (err.status !== null) {
|
|
58
|
-
process.exit(err.status);
|
|
59
|
-
}
|
|
60
|
-
throw err;
|
|
61
|
-
}
|
package/lib/cloudrouter
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manaflow-ai/cloudrouter",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "CLI tool to instantly spin up cloud VMs preloaded with Chrome, VNC, SSH, and rsync",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"postinstall": "node lib/postinstall.js"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@manaflow-ai/cloudrouter-darwin-arm64": "0.9.
|
|
35
|
-
"@manaflow-ai/cloudrouter-darwin-x64": "0.9.
|
|
36
|
-
"@manaflow-ai/cloudrouter-linux-arm64": "0.9.
|
|
37
|
-
"@manaflow-ai/cloudrouter-linux-x64": "0.9.
|
|
38
|
-
"@manaflow-ai/cloudrouter-win32-x64": "0.9.
|
|
34
|
+
"@manaflow-ai/cloudrouter-darwin-arm64": "0.9.8",
|
|
35
|
+
"@manaflow-ai/cloudrouter-darwin-x64": "0.9.8",
|
|
36
|
+
"@manaflow-ai/cloudrouter-linux-arm64": "0.9.8",
|
|
37
|
+
"@manaflow-ai/cloudrouter-linux-x64": "0.9.8",
|
|
38
|
+
"@manaflow-ai/cloudrouter-win32-x64": "0.9.8"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=16"
|