pakstr 0.11.0 → 0.12.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/dist/cli.js +2 -1
- package/dist/commands/run.js +20 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -51,6 +51,7 @@ async function runCLI(argv) {
|
|
|
51
51
|
await (0, run_1.runCommand)(configFlag ?? undefined, {
|
|
52
52
|
verifyPublish: args.includes("--verify-publish"),
|
|
53
53
|
publishOutJson: extractFlag(args, "--publish-out-json"),
|
|
54
|
+
dryRun: args.includes("--dry-run"),
|
|
54
55
|
});
|
|
55
56
|
return;
|
|
56
57
|
default:
|
|
@@ -75,7 +76,7 @@ Usage:
|
|
|
75
76
|
pakstr build [--config <path>]
|
|
76
77
|
pakstr sign [--config <path>]
|
|
77
78
|
pakstr publish [--config <path>] [--dry-run] [--verify] [--out-json <path>]
|
|
78
|
-
pakstr run [--config <path>] [--verify-publish] [--publish-out-json <path>]
|
|
79
|
+
pakstr run [--config <path>] [--dry-run] [--verify-publish] [--publish-out-json <path>]
|
|
79
80
|
|
|
80
81
|
pakstr --version
|
|
81
82
|
pakstr --help
|
package/dist/commands/run.js
CHANGED
|
@@ -17,6 +17,10 @@ const publish_1 = require("./publish");
|
|
|
17
17
|
* Each step is atomic and fail-fast (§7). The signed APK at build.out is
|
|
18
18
|
* preserved on a publish failure; only ephemeral/derived material is cleaned
|
|
19
19
|
* up. `init` is NOT part of `run`.
|
|
20
|
+
*
|
|
21
|
+
* `--dry-run` skips build + sign (no Docker, no APK) and only runs a dry-run
|
|
22
|
+
* publish with stub values and a mock relay — a safe offline smoke test of
|
|
23
|
+
* the Nostr event-signing path.
|
|
20
24
|
*/
|
|
21
25
|
async function runCommand(configPath, options = {}) {
|
|
22
26
|
// Step 1: load & validate config, pre-validate nsecs.
|
|
@@ -41,6 +45,22 @@ async function runCommand(configPath, options = {}) {
|
|
|
41
45
|
console.log("Web:", config.build.web);
|
|
42
46
|
console.log("Out:", path_1.default.resolve(config.build.out));
|
|
43
47
|
console.log("Publish:", config.publish.zapstoreEnabled ? "enabled" : "disabled");
|
|
48
|
+
if (options.dryRun) {
|
|
49
|
+
// Skip build + sign — no Docker, no APK. Only exercise the publish
|
|
50
|
+
// event-signing path with stub values and a mock relay.
|
|
51
|
+
if (config.publish.zapstoreEnabled) {
|
|
52
|
+
console.log("\n— Dry run: skipping build + sign, publish only —");
|
|
53
|
+
await (0, publish_1.publishCommand)(config.configPath || undefined, {
|
|
54
|
+
dryRun: true,
|
|
55
|
+
outJson: options.publishOutJson,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
console.log("\nDry run: publish disabled (publish.zapstore.enabled: false). Nothing to do.");
|
|
60
|
+
}
|
|
61
|
+
console.log("\n✅ pakstr run complete (dry-run)");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
44
64
|
// Step 3: build the unsigned APK.
|
|
45
65
|
console.log("\n— Step 1/3: build —");
|
|
46
66
|
await (0, build_1.buildCommand)(config.configPath || undefined);
|