@dzhechkov/harness-cli 0.8.18 → 0.8.19
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/.dz-manifest.json +7 -7
- package/README.md +5 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +19 -2
- package/dist/cli.js.map +1 -1
- package/package.json +7 -7
- package/sbom.json +6 -6
- package/src/cli.ts +28 -2
package/.dz-manifest.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "README.md",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "45af5a47278e24f2049789ac96bba2c18597e29e26f3a9df3ac95fc5b52719c2"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "dist/bin.d.ts",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"path": "dist/cli.d.ts.map",
|
|
52
|
-
"sha256": "
|
|
52
|
+
"sha256": "22cddd1ff809cea9301af0905195bc1f2ff29730ce1b8a257c99c518457cff34"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"path": "dist/cli.js",
|
|
56
|
-
"sha256": "
|
|
56
|
+
"sha256": "724695fafaa2a68b6c279ea1f55f14732888ee7ba6919f991ace14fa54620b08"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"path": "dist/cli.js.map",
|
|
60
|
-
"sha256": "
|
|
60
|
+
"sha256": "2935abfc89e4a704d9615b0417ff19279487c05a8a97347b2de6c88908276d33"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"path": "dist/command-inventory.d.ts",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"path": "package.json",
|
|
152
|
-
"sha256": "
|
|
152
|
+
"sha256": "5f0c597e704b7b515d40f4a95b784b26d4fe2a5adf1f1309a350541506eb14d4"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"path": "src/bin.ts",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
"path": "src/cli.ts",
|
|
164
|
-
"sha256": "
|
|
164
|
+
"sha256": "f0bc9f52737064a3d5b26fb2ef07c0aa79e003dfca5e1277cd0988a65cdeeb8e"
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
"path": "src/command-inventory.ts",
|
|
@@ -185,5 +185,5 @@
|
|
|
185
185
|
}
|
|
186
186
|
]
|
|
187
187
|
},
|
|
188
|
-
"signature": "
|
|
188
|
+
"signature": "1vbOCeL1oGfDCIQdlI/7HuS4wzM4sFzFyBzMNB4bd6qBYqL9o7Ai1OrNFupbWJ0Sr09N7pl+xMUmaxLD+7yxDA=="
|
|
189
189
|
}
|
package/README.md
CHANGED
|
@@ -3088,6 +3088,10 @@ pauses between misses; an unconfirmed version is an error and its local bump is
|
|
|
3088
3088
|
When the receipt never arrives, the CLI adds one line telling you what to check: `npm view <pkg>@<version>` —
|
|
3089
3089
|
if the registry answers, the publish DID land and only the local bump was rolled back; re-apply it by hand.
|
|
3090
3090
|
Registry probes run `npm view … --prefer-online`, because the publisher itself warms the packument cache before publishing (measured 2026-09-10: 30 misses on a landed package).
|
|
3091
|
+
On an error, `dz publish` prints the last three probe records (attempt, exit code, elapsed milliseconds,
|
|
3092
|
+
and the first captured stderr/stdout line); `--json` returns the complete, untruncated `probeLog`.
|
|
3093
|
+
In a multi-package batch, a dependent is not bumped or published after one of its workspace dependencies
|
|
3094
|
+
has failed in that batch; its error names the dependency and preserves the dependency's failure reason.
|
|
3091
3095
|
|
|
3092
3096
|
```bash
|
|
3093
3097
|
dz publish --dry-run # preview what would publish
|
|
@@ -4693,7 +4697,7 @@ refusal as the honest answer.
|
|
|
4693
4697
|
|
|
4694
4698
|
## Status
|
|
4695
4699
|
|
|
4696
|
-
`harness-core v0.8.
|
|
4700
|
+
`harness-core v0.8.26` · `harness-cli v0.8.19` — **this release: the instruments stopped lying in
|
|
4697
4701
|
four measured ways.** (1) A test run's exit code no longer conflates "a test failed" with "the runner
|
|
4698
4702
|
choked": `classifyRunFailure` names `runner-infrastructure` with the closed reason
|
|
4699
4703
|
`worker-rpc-timeout` when zero tests failed AND the runner's own worker-RPC pattern is present — an
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAoC,KAAK,EAAa,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAK3G,OAAO,EAAyF,KAAK,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGhJ,OAAO,EAgDL,iBAAiB,EAmBjB,KAAK,oBAAoB,EA6ZzB,KAAK,YAAY,EA6ElB,MAAM,yBAAyB,CAAC;AAcjC,OAAO,KAAK,EAAgE,qBAAqB,EAAE,gBAAgB,EAAc,kBAAkB,EAA0J,MAAM,yBAAyB,CAAC;AA6B7U,4FAA4F;AAC5F,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAexC,CAAC;AA2JF,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAC/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAC1D,6BAA6B,CAAC;AAEnC,2EAA2E;AAC3E,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,C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AAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE;IACJ,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAChC,kGAAkG;IAClG,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B,GACA,OAAO,CAAC,eAAe,CAAC,CA8D1B;AA8/FD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,KAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAwT5E"}
|
package/dist/cli.js
CHANGED
|
@@ -6140,10 +6140,15 @@ function cmdSbom(options, flags, cwd, write) {
|
|
|
6140
6140
|
write(out);
|
|
6141
6141
|
return 0;
|
|
6142
6142
|
}
|
|
6143
|
-
function cmdPublish(options, flags, cwd,
|
|
6143
|
+
function cmdPublish(options, flags, cwd, writeOutput) {
|
|
6144
|
+
const json = flags.has('json');
|
|
6145
|
+
// Under --json stdout carries exactly one JSON document, so every human line — guard notes, refusals,
|
|
6146
|
+
// progress — goes to stderr instead of being dropped: a refusal that prints nothing is the silent
|
|
6147
|
+
// failure this repo forbids (QE P2 2026-09-10).
|
|
6148
|
+
const write = json ? (line) => { process.stderr.write(`${line}\n`); } : writeOutput;
|
|
6144
6149
|
// Reject unknown flags/options so a typo (e.g. `--dry-rum`) can NEVER be
|
|
6145
6150
|
// silently swallowed and flip the command into live-publish mode.
|
|
6146
|
-
const allowedFlags = new Set(['dry-run', 'no-dry-run', 'yes', 'confirm', 'bump-only', 'help', 'require-signing', 'provenance', 'no-provenance']);
|
|
6151
|
+
const allowedFlags = new Set(['dry-run', 'no-dry-run', 'yes', 'confirm', 'bump-only', 'help', 'require-signing', 'provenance', 'no-provenance', 'json']);
|
|
6147
6152
|
const allowedOptions = new Set(['filter', 'claim-check', 'no-guard', 'sign-key']);
|
|
6148
6153
|
const allowedHelp = ' allowed: --dry-run (default), --yes/--confirm/--no-dry-run (go live), --bump-only, --filter <substr>, --claim-check <off|warn|error>, --no-guard "<reason>" (skip the guard pre-flight; logged)';
|
|
6149
6154
|
for (const flag of flags) {
|
|
@@ -6409,6 +6414,10 @@ function cmdPublish(options, flags, cwd, write) {
|
|
|
6409
6414
|
}
|
|
6410
6415
|
},
|
|
6411
6416
|
});
|
|
6417
|
+
if (json) {
|
|
6418
|
+
writeOutput(JSON.stringify(report));
|
|
6419
|
+
return report.errors > 0 ? 1 : 0;
|
|
6420
|
+
}
|
|
6412
6421
|
write(`\ndz publish${dryRun ? ' --dry-run' : ''}${bumpOnly ? ' --bump-only' : ''}${claimCheckOpt !== 'warn' ? ` --claim-check ${claimCheckOpt}` : ''}`);
|
|
6413
6422
|
write(` Published: ${report.published} Skipped: ${report.skipped} Errors: ${report.errors}\n`);
|
|
6414
6423
|
for (const pkg of report.packages) {
|
|
@@ -6424,6 +6433,14 @@ function cmdPublish(options, flags, cwd, write) {
|
|
|
6424
6433
|
for (const line of pkg.error.split('\n'))
|
|
6425
6434
|
write(` ${line}`);
|
|
6426
6435
|
}
|
|
6436
|
+
const probeLog = pkg.probeLog;
|
|
6437
|
+
if (pkg.status === 'error' && probeLog && probeLog.length > 0) {
|
|
6438
|
+
for (const probe of probeLog.slice(-3)) {
|
|
6439
|
+
const output = probe.stderr || probe.stdout;
|
|
6440
|
+
const firstLine = output.split(/\r?\n/, 1)[0]?.trim() || '(empty)';
|
|
6441
|
+
write(` probe ${probe.attempt}: code ${String(probe.code)}, ${probe.ms}ms — ${firstLine}`);
|
|
6442
|
+
}
|
|
6443
|
+
}
|
|
6427
6444
|
// The rollback branch cannot tell "publish failed" from "publish landed, registry never answered":
|
|
6428
6445
|
// both restore package.json. The operator can — one registry query — so say what to check.
|
|
6429
6446
|
if (pkg.status === 'error' && pkg.error?.startsWith('registry did not confirm')) {
|