headlamp 0.1.16 → 0.1.17
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 +5 -5
- package/dist/cli.cjs +22 -24
- package/dist/cli.cjs.map +2 -2
- package/dist/index.js +22 -24
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,7 +53,7 @@ var init_args = __esm({
|
|
|
53
53
|
coverageUi: (value) => ({ type: "coverageUi", value }),
|
|
54
54
|
coverageAbortOnFailure: (value) => ({ type: "coverageAbortOnFailure", value }),
|
|
55
55
|
onlyFailures: (value) => ({ type: "onlyFailures", value }),
|
|
56
|
-
|
|
56
|
+
showLogs: (value) => ({ type: "showLogs", value }),
|
|
57
57
|
jestArg: (value) => ({ type: "jestArg", value }),
|
|
58
58
|
jestArgs: (values) => ({ type: "jestArgs", values }),
|
|
59
59
|
vitestArg: (value) => ({ type: "vitestArg", value }),
|
|
@@ -220,17 +220,15 @@ var init_args = __esm({
|
|
|
220
220
|
"--onlyFailures",
|
|
221
221
|
(_flag, lookahead) => step([ActionBuilders.onlyFailures(isTruthy(String(lookahead)))], true)
|
|
222
222
|
),
|
|
223
|
-
// --
|
|
224
|
-
rule.eq("--
|
|
223
|
+
// --showLogs flag (boolean)
|
|
224
|
+
rule.eq("--showLogs", () => step([ActionBuilders.showLogs(true)])),
|
|
225
225
|
rule.startsWith(
|
|
226
|
-
"--
|
|
227
|
-
(value) => step([
|
|
228
|
-
ActionBuilders.showConsole(isTruthy((value.split("=")[1] ?? "").trim().toLowerCase()))
|
|
229
|
-
])
|
|
226
|
+
"--showLogs=",
|
|
227
|
+
(value) => step([ActionBuilders.showLogs(isTruthy((value.split("=")[1] ?? "").trim().toLowerCase()))])
|
|
230
228
|
),
|
|
231
229
|
rule.withLookahead(
|
|
232
|
-
"--
|
|
233
|
-
(_flag, lookahead) => step([ActionBuilders.
|
|
230
|
+
"--showLogs",
|
|
231
|
+
(_flag, lookahead) => step([ActionBuilders.showLogs(isTruthy(String(lookahead)))], true)
|
|
234
232
|
),
|
|
235
233
|
rule.withLookahead(
|
|
236
234
|
"--testPathPattern",
|
|
@@ -390,8 +388,8 @@ var init_args = __esm({
|
|
|
390
388
|
return { vitest: [], jest: [], coverage: false, coverageAbortOnFailure: action.value };
|
|
391
389
|
case "onlyFailures":
|
|
392
390
|
return { vitest: [], jest: [], coverage: false, onlyFailures: action.value };
|
|
393
|
-
case "
|
|
394
|
-
return { vitest: [], jest: [], coverage: false,
|
|
391
|
+
case "showLogs":
|
|
392
|
+
return { vitest: [], jest: [], coverage: false, showLogs: action.value };
|
|
395
393
|
case "jestArgs":
|
|
396
394
|
return { vitest: [], jest: action.values, coverage: false };
|
|
397
395
|
case "selectionHint":
|
|
@@ -467,7 +465,7 @@ var init_args = __esm({
|
|
|
467
465
|
...right.changedDepth !== void 0 || left.changedDepth !== void 0 ? { changedDepth: right.changedDepth ?? left.changedDepth } : {},
|
|
468
466
|
...right.coverageAbortOnFailure !== void 0 || left.coverageAbortOnFailure !== void 0 ? { coverageAbortOnFailure: right.coverageAbortOnFailure ?? left.coverageAbortOnFailure } : {},
|
|
469
467
|
...right.onlyFailures !== void 0 || left.onlyFailures !== void 0 ? { onlyFailures: right.onlyFailures ?? left.onlyFailures } : {},
|
|
470
|
-
...right.
|
|
468
|
+
...right.showLogs !== void 0 || left.showLogs !== void 0 ? { showLogs: right.showLogs ?? left.showLogs } : {},
|
|
471
469
|
...right.coverageDetail !== void 0 || left.coverageDetail !== void 0 ? { coverageDetail: right.coverageDetail ?? left.coverageDetail } : {},
|
|
472
470
|
...right.coverageShowCode !== void 0 || left.coverageShowCode !== void 0 ? { coverageShowCode: right.coverageShowCode ?? left.coverageShowCode } : {},
|
|
473
471
|
...right.coverageMode !== void 0 || left.coverageMode !== void 0 ? { coverageMode: right.coverageMode ?? left.coverageMode } : {},
|
|
@@ -492,7 +490,7 @@ var init_args = __esm({
|
|
|
492
490
|
let coverageUi = "both";
|
|
493
491
|
let coverageAbortOnFailure = false;
|
|
494
492
|
let onlyFailures = false;
|
|
495
|
-
let
|
|
493
|
+
let showLogs = false;
|
|
496
494
|
let coverageShowCode = Boolean(process.stdout.isTTY);
|
|
497
495
|
let coverageMode = "auto";
|
|
498
496
|
const coverageMaxFilesLocalInit = void 0;
|
|
@@ -511,7 +509,7 @@ var init_args = __esm({
|
|
|
511
509
|
coverageUi = contrib.coverageUi ?? coverageUi;
|
|
512
510
|
coverageAbortOnFailure = contrib.coverageAbortOnFailure ?? coverageAbortOnFailure;
|
|
513
511
|
onlyFailures = contrib.onlyFailures ?? onlyFailures;
|
|
514
|
-
|
|
512
|
+
showLogs = contrib.showLogs ?? showLogs;
|
|
515
513
|
coverageShowCode = contrib.coverageShowCode ?? coverageShowCode;
|
|
516
514
|
const coverageDetailComputed = contrib.coverageDetail ?? (contrib.selection ? "auto" : void 0);
|
|
517
515
|
coverageMode = contrib.coverageMode ?? (contrib.selection ? "compact" : "auto");
|
|
@@ -546,7 +544,7 @@ var init_args = __esm({
|
|
|
546
544
|
coverageUi,
|
|
547
545
|
coverageAbortOnFailure,
|
|
548
546
|
onlyFailures,
|
|
549
|
-
|
|
547
|
+
showLogs,
|
|
550
548
|
selectionSpecified: Boolean(contrib.selection),
|
|
551
549
|
selectionPaths: [...contrib.selectionPaths ?? []],
|
|
552
550
|
includeGlobs,
|
|
@@ -6618,7 +6616,7 @@ var renderChunks = (chunks, ctx, fns, opts) => {
|
|
|
6618
6616
|
|
|
6619
6617
|
// src/lib/formatter/context.ts
|
|
6620
6618
|
import * as fs5 from "node:fs";
|
|
6621
|
-
var makeCtx = (opts, showStacks = false,
|
|
6619
|
+
var makeCtx = (opts, showStacks = false, showLogs = false) => {
|
|
6622
6620
|
const cwd = (opts?.cwd ?? process.cwd()).replace(/\\/g, "/");
|
|
6623
6621
|
const width = Math.max(
|
|
6624
6622
|
40,
|
|
@@ -6638,7 +6636,7 @@ var makeCtx = (opts, showStacks = false, showConsole = false) => {
|
|
|
6638
6636
|
cwd,
|
|
6639
6637
|
width,
|
|
6640
6638
|
showStacks,
|
|
6641
|
-
|
|
6639
|
+
showLogs,
|
|
6642
6640
|
projectHint,
|
|
6643
6641
|
editorCmd: opts?.editorCmd,
|
|
6644
6642
|
readSource: readSource2
|
|
@@ -6965,7 +6963,7 @@ var renderFileLevelFailure = (file, ctx) => {
|
|
|
6965
6963
|
stackPreview
|
|
6966
6964
|
});
|
|
6967
6965
|
const consoleBlock = buildConsoleSection(stripBridgeEventsFromConsole(file.console ?? null), {
|
|
6968
|
-
full: Boolean(ctx.
|
|
6966
|
+
full: Boolean(ctx.showLogs)
|
|
6969
6967
|
});
|
|
6970
6968
|
const stackTail = ctx.showStacks && stackPreview.length === 0 ? (() => {
|
|
6971
6969
|
const tail = mergedForStack.filter((ln) => isStackLine(stripAnsiSimple(ln))).slice(-4).map((ln) => ` ${colorStackLine(String(ln), ctx.projectHint)}`);
|
|
@@ -7282,7 +7280,7 @@ var renderFailedAssertion = (args) => {
|
|
|
7282
7280
|
}
|
|
7283
7281
|
})() : empty;
|
|
7284
7282
|
const consoleBlock = buildConsoleSection(stripBridgeEventsFromConsole(file.console ?? null), {
|
|
7285
|
-
full: Boolean(ctx.
|
|
7283
|
+
full: Boolean(ctx.showLogs)
|
|
7286
7284
|
});
|
|
7287
7285
|
const stackTail = ctx.showStacks && stackPreview.length === 0 ? (() => {
|
|
7288
7286
|
const merged = collapseStacks([...msgLines, ...details.stacks]);
|
|
@@ -7383,7 +7381,7 @@ var formatJestOutputVitest = (raw, opts) => pipe(
|
|
|
7383
7381
|
ctx: makeCtx(
|
|
7384
7382
|
state.opts,
|
|
7385
7383
|
/\bFAIL\b/.test(stripAnsiSimple(state.raw)),
|
|
7386
|
-
Boolean(state.opts?.
|
|
7384
|
+
Boolean(state.opts?.showLogs)
|
|
7387
7385
|
)
|
|
7388
7386
|
}),
|
|
7389
7387
|
(state) => ({ ...state, chunks: parseChunks(state.raw) }),
|
|
@@ -8089,7 +8087,7 @@ var program = async () => {
|
|
|
8089
8087
|
coverageUi,
|
|
8090
8088
|
coverageAbortOnFailure,
|
|
8091
8089
|
onlyFailures,
|
|
8092
|
-
|
|
8090
|
+
showLogs,
|
|
8093
8091
|
selectionSpecified,
|
|
8094
8092
|
selectionPaths,
|
|
8095
8093
|
includeGlobs,
|
|
@@ -8793,7 +8791,7 @@ var program = async () => {
|
|
|
8793
8791
|
makeCtx(
|
|
8794
8792
|
{ cwd: repoRootForDiscovery, ...editorCmd !== void 0 ? { editorCmd } : {} },
|
|
8795
8793
|
/\bFAIL\b/.test(stripAnsiSimple(output)),
|
|
8796
|
-
Boolean(
|
|
8794
|
+
Boolean(showLogs)
|
|
8797
8795
|
),
|
|
8798
8796
|
{ onlyFailures }
|
|
8799
8797
|
);
|
|
@@ -8803,7 +8801,7 @@ var program = async () => {
|
|
|
8803
8801
|
makeCtx(
|
|
8804
8802
|
{ cwd: repoRootForDiscovery, ...editorCmd !== void 0 ? { editorCmd } : {} },
|
|
8805
8803
|
/\bFAIL\b/.test(stripAnsiSimple(output)),
|
|
8806
|
-
Boolean(
|
|
8804
|
+
Boolean(showLogs)
|
|
8807
8805
|
),
|
|
8808
8806
|
{ onlyFailures }
|
|
8809
8807
|
);
|
|
@@ -8906,7 +8904,7 @@ ${stripFooter(rawAlso)}`.trimEnd();
|
|
|
8906
8904
|
makeCtx(
|
|
8907
8905
|
{ cwd: repoRootForDiscovery, ...editorCmd !== void 0 ? { editorCmd } : {} },
|
|
8908
8906
|
showStacks,
|
|
8909
|
-
Boolean(
|
|
8907
|
+
Boolean(showLogs)
|
|
8910
8908
|
),
|
|
8911
8909
|
{ onlyFailures }
|
|
8912
8910
|
);
|