rapidlynk 0.1.0 → 0.2.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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/install.js
CHANGED
|
@@ -1,13 +1,51 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
const os = require("os");
|
|
3
4
|
const fs = require("fs");
|
|
4
5
|
const path = require("path");
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const platform = os.platform(); // win32, linux, darwin
|
|
8
|
+
const arch = os.arch(); // x64, arm64
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
let binaryName;
|
|
11
|
+
console.log(
|
|
12
|
+
"▶ install.js running on",
|
|
13
|
+
process.platform,
|
|
14
|
+
process.arch
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
if (platform === "win32" && arch === "x64") {
|
|
19
|
+
binaryName = "rapidlynk-win-x64.exe";
|
|
20
|
+
} else if (platform === "linux" && arch === "x64") {
|
|
21
|
+
binaryName = "rapidlynk-linux-x64";
|
|
22
|
+
} else if (platform === "darwin" && arch === "x64") {
|
|
23
|
+
binaryName = "rapidlynk-darwin-x64";
|
|
24
|
+
} else if (platform === "darwin" && arch === "arm64") {
|
|
25
|
+
binaryName = "rapidlynk-darwin-arm64";
|
|
26
|
+
} else {
|
|
27
|
+
console.error(`❌ RapidLynk not supported on ${platform} (${arch})`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const src = path.join(__dirname, "bin", binaryName);
|
|
32
|
+
|
|
33
|
+
// ✅ Correct npm global bin directory
|
|
34
|
+
const prefix = process.env.npm_config_prefix;
|
|
35
|
+
if (!prefix) {
|
|
36
|
+
console.error("❌ npm prefix not found");
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const binDir =
|
|
41
|
+
platform === "win32"
|
|
42
|
+
? prefix
|
|
43
|
+
: path.join(prefix, "bin");
|
|
44
|
+
|
|
45
|
+
const dest = path.join(
|
|
46
|
+
binDir,
|
|
47
|
+
platform === "win32" ? "rapidlynk.exe" : "rapidlynk"
|
|
48
|
+
);
|
|
11
49
|
|
|
12
50
|
if (!fs.existsSync(src)) {
|
|
13
51
|
console.error("❌ Binary not found:", src);
|
|
@@ -17,4 +55,4 @@ if (!fs.existsSync(src)) {
|
|
|
17
55
|
fs.copyFileSync(src, dest);
|
|
18
56
|
fs.chmodSync(dest, 0o755);
|
|
19
57
|
|
|
20
|
-
console.log(
|
|
58
|
+
console.log(`✅ RapidLynk installed (${platform}-${arch})`);
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rapidlynk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Private, one-command project sharing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
7
|
-
"rapidlynk": "
|
|
7
|
+
"rapidlynk": "rapidlynk"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"postinstall": "node install.js"
|
|
8
11
|
}
|
|
9
12
|
}
|
|
Binary file
|