bostrat-node 0.2.0 → 0.2.2
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/dist/cli.js +41 -39
- package/dist/index.js +112 -97
- package/fix-pty.js +22 -0
- package/package.json +4 -1
package/fix-pty.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// bostrat-node postinstall. node-pty@1.1.0's registry tarball ships the darwin
|
|
3
|
+
// prebuilt `spawn-helper` WITHOUT the exec bit and its own post-install never
|
|
4
|
+
// chmods it → every prebuilt-path macOS install dies with "posix_spawnp
|
|
5
|
+
// failed" (found by the first laptop dogfood, 2026-07-21). Best-effort: doctor's
|
|
6
|
+
// node-pty load-and-spawn check is the authority, and it prints the manual
|
|
7
|
+
// chmod when this didn't run (--ignore-scripts).
|
|
8
|
+
import { createRequire } from "node:module";
|
|
9
|
+
import fs from "node:fs";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
// argv[2] (tests): an explicit node-pty root; default: resolve our dependency.
|
|
14
|
+
const root = process.argv[2] || path.dirname(createRequire(import.meta.url).resolve("node-pty/package.json"));
|
|
15
|
+
const prebuilds = path.join(root, "prebuilds");
|
|
16
|
+
for (const dir of fs.readdirSync(prebuilds)) {
|
|
17
|
+
const helper = path.join(prebuilds, dir, "spawn-helper");
|
|
18
|
+
if (fs.existsSync(helper)) fs.chmodSync(helper, 0o755);
|
|
19
|
+
}
|
|
20
|
+
} catch {
|
|
21
|
+
// no prebuilds dir (Linux source build) or node-pty not installed yet — fine
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bostrat-node",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Bostrat node — the box runtime that dials out to your Bostrat coordination plane. https://bostrat.ai",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"bostrat-node": "bin/bostrat-node.js"
|
|
9
9
|
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"postinstall": "node fix-pty.js"
|
|
12
|
+
},
|
|
10
13
|
"dependencies": {
|
|
11
14
|
"express": "4.22.2",
|
|
12
15
|
"node-pty": "1.1.0",
|