prooflane 0.0.1 → 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/bin/cli.mjs +66 -11
- package/package.json +5 -2
package/bin/cli.mjs
CHANGED
|
@@ -1,12 +1,67 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
// prooflane — the front door for the harness that installs the verify lane.
|
|
3
|
+
//
|
|
4
|
+
// IT WAS A PLACEHOLDER, AND THE PLACEHOLDER BECAME FALSE. This package shipped
|
|
5
|
+
// as a name reservation whose whole output was "prooflane is not released yet",
|
|
6
|
+
// pointing readers at create-cmp-cli. That was true and useful right up until
|
|
7
|
+
// `prooflane-harness` grew a binary called `prooflane` (Stage 1, 2026-09-08).
|
|
8
|
+
// From that moment the registry held a contradiction about our own product:
|
|
9
|
+
// `npx prooflane init` — the exact command the harness README documents —
|
|
10
|
+
// resolved to a package insisting the thing did not exist.
|
|
11
|
+
//
|
|
12
|
+
// So this delegates, in the pattern create-kmp already uses for the CLI: no
|
|
13
|
+
// logic of its own, resolve the installed harness's bin, re-execute it,
|
|
14
|
+
// forward argv, inherit stdio, propagate the exit code.
|
|
15
|
+
//
|
|
16
|
+
// NOT A SILENT REDIRECT, and the distinction is the one `create-mobile`'s fit
|
|
17
|
+
// check exists to protect. That rule guards FRAMEWORK-NEUTRAL names — a generic
|
|
18
|
+
// name must be earned by asking, never by assuming. `prooflane` is this
|
|
19
|
+
// project's own product name, and pointing it at this project's own harness is
|
|
20
|
+
// the front door rather than a redirect. Nothing is being claimed on anyone
|
|
21
|
+
// else's behalf, so nothing is owed an interview.
|
|
22
|
+
|
|
23
|
+
import { createRequire } from "node:module";
|
|
24
|
+
import { dirname, join } from "node:path";
|
|
25
|
+
import { spawnSync } from "node:child_process";
|
|
26
|
+
|
|
27
|
+
const require = createRequire(import.meta.url);
|
|
28
|
+
|
|
29
|
+
let pkgJsonPath;
|
|
30
|
+
try {
|
|
31
|
+
pkgJsonPath = require.resolve("prooflane-harness/package.json");
|
|
32
|
+
} catch {
|
|
33
|
+
process.stderr.write(
|
|
34
|
+
"prooflane: could not find its dependency prooflane-harness.\n" +
|
|
35
|
+
"Your install may be broken — reinstall, or run the harness directly:\n\n" +
|
|
36
|
+
" npm i -D prooflane-harness && npx prooflane init\n"
|
|
37
|
+
);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const pkg = require(pkgJsonPath);
|
|
42
|
+
const bin = pkg.bin;
|
|
43
|
+
const relBinPath = typeof bin === "string" ? bin : bin.prooflane ?? Object.values(bin ?? {})[0];
|
|
44
|
+
|
|
45
|
+
if (!relBinPath) {
|
|
46
|
+
process.stderr.write(
|
|
47
|
+
"prooflane: prooflane-harness declares no bin entry.\n" +
|
|
48
|
+
"Install it directly instead: npm i -D prooflane-harness\n"
|
|
49
|
+
);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const cliPath = join(dirname(pkgJsonPath), relBinPath);
|
|
54
|
+
|
|
55
|
+
// spawnSync, like the other aliases: blocks until the command finishes,
|
|
56
|
+
// inherits stdio so anything interactive keeps working, and gives one
|
|
57
|
+
// deterministic exit path.
|
|
58
|
+
const result = spawnSync(process.execPath, [cliPath, ...process.argv.slice(2)], { stdio: "inherit" });
|
|
59
|
+
|
|
60
|
+
if (result.error) {
|
|
61
|
+
process.stderr.write(`prooflane: failed to launch prooflane-harness: ${result.error.message}\n`);
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
if (result.signal) {
|
|
65
|
+
process.kill(process.pid, result.signal);
|
|
66
|
+
}
|
|
67
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prooflane",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "The verify lane
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The verify lane, for a repo of any stack: installs the prooflane harness and its evidence receipts. Thin front door for prooflane-harness.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -29,5 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"bin": {
|
|
31
31
|
"prooflane": "bin/cli.mjs"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"prooflane-harness": ">=0.21.0"
|
|
32
35
|
}
|
|
33
36
|
}
|