@bobfrankston/msger 0.1.193 → 0.1.195
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.
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* msger-native postinstall —
|
|
3
|
+
* msger-native postinstall — set binary permissions on Linux/Mac.
|
|
4
|
+
* Uses @bobfrankston/rust-builder if available, falls back to direct chmod.
|
|
4
5
|
*/
|
|
5
|
-
import { runPostinstall } from "@bobfrankston/rust-builder/postinstall";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
8
8
|
|
|
9
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const binDir = path.join(__dirname, "..", "bin");
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
});
|
|
12
|
+
const binaries = {
|
|
13
|
+
win32: "msgernative.exe",
|
|
14
|
+
darwin: "msgernative",
|
|
15
|
+
darwinArm64: "msgernative-arm64",
|
|
16
|
+
linux: "msgernative",
|
|
17
|
+
linuxArm64: "msgernative-linux-aarch64",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
const { runPostinstall } = await import("@bobfrankston/rust-builder/postinstall");
|
|
22
|
+
runPostinstall({ binaryName: "msgernative", binDir, binaries });
|
|
23
|
+
} catch {
|
|
24
|
+
// rust-builder not available (npm consumer install) — do chmod directly
|
|
25
|
+
if (process.platform !== "win32") {
|
|
26
|
+
const fs = await import("fs");
|
|
27
|
+
const arch = process.arch;
|
|
28
|
+
const name = process.platform === "darwin"
|
|
29
|
+
? (arch === "arm64" ? binaries.darwinArm64 : binaries.darwin)
|
|
30
|
+
: (arch === "arm64" ? binaries.linuxArm64 : binaries.linux);
|
|
31
|
+
const bin = path.join(binDir, name);
|
|
32
|
+
try { fs.chmodSync(bin, 0o755); } catch { /* binary may not exist yet */ }
|
|
33
|
+
}
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/msger",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.195",
|
|
4
4
|
"description": "Fast, lightweight, cross-platform message box - Rust-powered alternative to msgview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@bobfrankston/msgcommon": "^0.1.23",
|
|
54
|
-
"@bobfrankston/rust-builder": "file:../../rust-builder",
|
|
55
54
|
"ansi-to-html": "^0.7.2",
|
|
56
55
|
"json5": "^2.2.3"
|
|
57
56
|
},
|