@autono/pinbox 0.1.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.
- package/README.md +10 -0
- package/bin/pinbox.js +55 -0
- package/package.json +25 -0
package/README.md
ADDED
package/bin/pinbox.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// GENERATED by tools/release/manifests.ts — do not edit; edit the generator.
|
|
3
|
+
//
|
|
4
|
+
// AGENTS.md guest rule, sanctioned exception: this shim is packaging glue, not pinbox. npm
|
|
5
|
+
// links it as `pinbox` and npm's bin machinery assumes a node shebang, so on nearly every
|
|
6
|
+
// machine — Bun-first ones included — this file executes under Node. It therefore uses the
|
|
7
|
+
// Node/Bun shared subset only. It declares no `engines` either: the binary it spawns embeds
|
|
8
|
+
// its own Bun runtime, and an engines field would block the machines that binary serves.
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
const { spawnSync } = require("node:child_process");
|
|
12
|
+
const { dirname, join } = require("node:path");
|
|
13
|
+
|
|
14
|
+
const PLATFORMS = {
|
|
15
|
+
"darwin-arm64": "@autono/pinbox-darwin-arm64",
|
|
16
|
+
"darwin-x64": "@autono/pinbox-darwin-x64",
|
|
17
|
+
"linux-arm64": "@autono/pinbox-linux-arm64",
|
|
18
|
+
"linux-x64": "@autono/pinbox-linux-x64",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const key = process.platform + "-" + process.arch;
|
|
22
|
+
const pkg = PLATFORMS[key];
|
|
23
|
+
|
|
24
|
+
let binary;
|
|
25
|
+
try {
|
|
26
|
+
if (!pkg) throw new Error("unsupported platform " + key);
|
|
27
|
+
// Resolve the MANIFEST, then join to the binary. Package managers disagree about
|
|
28
|
+
// resolving non-JS files (pnpm, yarn PnP, npm workspaces all differ); every one of
|
|
29
|
+
// them resolves a package.json.
|
|
30
|
+
binary = join(dirname(require.resolve(pkg + "/package.json")), "bin", "pinbox");
|
|
31
|
+
} catch {
|
|
32
|
+
console.error(
|
|
33
|
+
"pinbox: no binary found for " + key + ".\n" +
|
|
34
|
+
"Supported platforms: " + Object.keys(PLATFORMS).join(", ") + ".\n" +
|
|
35
|
+
"If yours is listed, the optional dependency was skipped at install time — almost\n" +
|
|
36
|
+
"always --no-optional (or a lockfile/cache produced with it). Reinstall without it:\n" +
|
|
37
|
+
" npm install @autono/pinbox\n" +
|
|
38
|
+
"Or grab the standalone binary: https://github.com/autonoco/pinbox/releases",
|
|
39
|
+
);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// stdio inherit so the TTY survives: pinbox is interactive and its output is a contract.
|
|
44
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
45
|
+
|
|
46
|
+
if (result.error) {
|
|
47
|
+
console.error("pinbox: failed to execute " + binary + ": " + result.error.message);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
// Re-raise the child's signal instead of exiting 0: Ctrl-C must still be 130.
|
|
51
|
+
if (result.signal) {
|
|
52
|
+
process.kill(process.pid, result.signal);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autono/pinbox",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CLI-first feedback loop: pins dropped on a live app, fixed by agents.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"homepage": "https://github.com/autonoco/pinbox",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/autonoco/pinbox.git",
|
|
11
|
+
"directory": "packages/cli"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"pinbox": "bin/pinbox.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"bin"
|
|
18
|
+
],
|
|
19
|
+
"optionalDependencies": {
|
|
20
|
+
"@autono/pinbox-darwin-arm64": "0.1.0",
|
|
21
|
+
"@autono/pinbox-darwin-x64": "0.1.0",
|
|
22
|
+
"@autono/pinbox-linux-arm64": "0.1.0",
|
|
23
|
+
"@autono/pinbox-linux-x64": "0.1.0"
|
|
24
|
+
}
|
|
25
|
+
}
|