@void.01/advanced-logger 0.0.0-stage → 0.4.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/ARCHITECTURE.md +342 -0
- package/CHANGELOG.md +108 -0
- package/README.md +304 -2
- package/dist/actions.d.ts +79 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +337 -0
- package/dist/actions.js.map +1 -0
- package/dist/ansi.d.ts +144 -0
- package/dist/ansi.d.ts.map +1 -0
- package/dist/ansi.js +219 -0
- package/dist/ansi.js.map +1 -0
- package/dist/caller.d.ts +21 -0
- package/dist/caller.d.ts.map +1 -0
- package/dist/caller.js +129 -0
- package/dist/caller.js.map +1 -0
- package/dist/config.d.ts +152 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +398 -0
- package/dist/config.js.map +1 -0
- package/dist/configFile.d.ts +31 -0
- package/dist/configFile.d.ts.map +1 -0
- package/dist/configFile.js +211 -0
- package/dist/configFile.js.map +1 -0
- package/dist/core.d.ts +17 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +89 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +7 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +10 -0
- package/dist/logger.js.map +1 -0
- package/dist/playwright.d.ts +15 -0
- package/dist/playwright.d.ts.map +1 -0
- package/dist/playwright.js +47 -0
- package/dist/playwright.js.map +1 -0
- package/dist/redact.d.ts +8 -0
- package/dist/redact.d.ts.map +1 -0
- package/dist/redact.js +36 -0
- package/dist/redact.js.map +1 -0
- package/dist/sinks.d.ts +80 -0
- package/dist/sinks.d.ts.map +1 -0
- package/dist/sinks.js +461 -0
- package/dist/sinks.js.map +1 -0
- package/dist/theme.d.ts +71 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +115 -0
- package/dist/theme.js.map +1 -0
- package/package.json +50 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configFile.js","sourceRoot":"","sources":["../src/configFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,8CAcC;AAMD,wCA4BC;AAQD,4CASC;AAqED,gCA8BC;AA9KD,4CAA8B;AAC9B,gDAAkC;AAGlC,mFAAmF;AACtE,QAAA,iBAAiB,GAAG,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,oBAAoB,CAAU,CAAC;AAI9H,8GAA8G;AAC9G,SAAgB,iBAAiB,CAAC,GAAsB,EAAE,GAAW;IACnE,MAAM,QAAQ,GAAG,GAAG,CAAC,eAAe,CAAC;IACrC,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,2EAA2E,IAAI,EAAE,CAAC,CAAC;QACrG,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,yBAAiB,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IACvC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,GAAsB,EAAE,GAAW;IAChE,MAAM,IAAI,GAAG,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACzC,MAAM,GAAG,IAAI,CAAC;IAEd,IAAI,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AAC,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1E,CAAC"}
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TableData } from './sinks';
|
|
2
|
+
import { type LevelName, type LogAction, LogIntent } from './theme';
|
|
3
|
+
/**
|
|
4
|
+
* Tag subsequent events with the running test: `test` (the full path) goes to jsonl records, `title` (default: `test`)
|
|
5
|
+
* to the consoleTest prefix. Set by the Playwright fixture.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setTestContext(test: string | undefined, title?: string): void;
|
|
8
|
+
export declare const getTestContext: () => string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Single funnel for every log call. Sinks are asked first so no stack is captured
|
|
11
|
+
* when nothing would write the event.
|
|
12
|
+
*/
|
|
13
|
+
export declare function dispatch(level: LevelName, intent: LogIntent | null, color: string, label: string, message: string | null | undefined,
|
|
14
|
+
/** A rendered table's rows as data (sinks may write it out, e.g. the CSV/JSON attachments). */
|
|
15
|
+
table?: TableData): void;
|
|
16
|
+
export declare function themed(level: LevelName, intent: LogIntent, action?: LogAction): string;
|
|
17
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,SAAS,EAAe,MAAM,SAAS,CAAC;AAErE,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,SAAS,EAAgB,MAAM,SAAS,CAAC;AAKlF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAG7E;AACD,eAAO,MAAM,cAAc,QAAO,MAAM,GAAG,SAAwB,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,SAAS,GAAG,IAAI,EACxB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;AAClC,+FAA+F;AAC/F,KAAK,CAAC,EAAE,SAAS,GAChB,IAAI,CA8BN;AAyCD,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAEtF"}
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTestContext = void 0;
|
|
4
|
+
exports.setTestContext = setTestContext;
|
|
5
|
+
exports.dispatch = dispatch;
|
|
6
|
+
exports.themed = themed;
|
|
7
|
+
const caller_1 = require("./caller");
|
|
8
|
+
const config_1 = require("./config");
|
|
9
|
+
const sinks_1 = require("./sinks");
|
|
10
|
+
const redact_1 = require("./redact");
|
|
11
|
+
const theme_1 = require("./theme");
|
|
12
|
+
let currentTest;
|
|
13
|
+
let currentTitle;
|
|
14
|
+
/**
|
|
15
|
+
* Tag subsequent events with the running test: `test` (the full path) goes to jsonl records, `title` (default: `test`)
|
|
16
|
+
* to the consoleTest prefix. Set by the Playwright fixture.
|
|
17
|
+
*/
|
|
18
|
+
function setTestContext(test, title) {
|
|
19
|
+
currentTest = test;
|
|
20
|
+
currentTitle = test === undefined ? undefined : (title ?? test);
|
|
21
|
+
}
|
|
22
|
+
const getTestContext = () => currentTest;
|
|
23
|
+
exports.getTestContext = getTestContext;
|
|
24
|
+
/**
|
|
25
|
+
* Single funnel for every log call. Sinks are asked first so no stack is captured
|
|
26
|
+
* when nothing would write the event.
|
|
27
|
+
*/
|
|
28
|
+
function dispatch(level, intent, color, label, message,
|
|
29
|
+
/** A rendered table's rows as data (sinks may write it out, e.g. the CSV/JSON attachments). */
|
|
30
|
+
table) {
|
|
31
|
+
const cfg = (0, config_1.config)();
|
|
32
|
+
// Before truncation and every sink, so no output (console, files, jsonl, report attachment) holds the secret.
|
|
33
|
+
if (cfg.redactText && message != null)
|
|
34
|
+
message = (0, redact_1.maskText)(message, cfg.redactKeys);
|
|
35
|
+
const limit = cfg.infoLogsCharLimit;
|
|
36
|
+
// Only INFO lines that the console would show, and never pre-colored blocks (tables, which have tableCellLimit).
|
|
37
|
+
if (level === 'INFO' &&
|
|
38
|
+
intent !== null &&
|
|
39
|
+
limit != null &&
|
|
40
|
+
limit > 0 &&
|
|
41
|
+
message != null &&
|
|
42
|
+
message.length > limit &&
|
|
43
|
+
(0, config_1.levelEnabled)(cfg.level, 'INFO')) {
|
|
44
|
+
const total = message.length;
|
|
45
|
+
emit(level, intent, color, label, `${message.slice(0, limit)}... (${total} chars)`);
|
|
46
|
+
emit('WARN', theme_1.LogIntent.BASE, themed('WARN', theme_1.LogIntent.BASE), 'WARN', `INFO log exceeded the ${limit} char threshold (${total} chars). Refer to the debug logs to see the full text. ${(0, config_1.infoLimitHint)()}`);
|
|
47
|
+
// A plain log() line is labelled with its own level; the full-text copy is a DEBUG line, so relabel it.
|
|
48
|
+
// BASE lines take the level's color, so the copy turns DEBUG grey; an action line keeps its own color.
|
|
49
|
+
emit('DEBUG', intent, intent === theme_1.LogIntent.BASE ? themed('DEBUG', intent) : color, label === level ? 'DEBUG' : label, message);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
emit(level, intent, color, label, message, table);
|
|
53
|
+
}
|
|
54
|
+
function emit(level, intent, color, label, message, table) {
|
|
55
|
+
const cfg = (0, config_1.config)();
|
|
56
|
+
const sinks = (0, sinks_1.activeSinks)().filter((s) => s.accepts(level, cfg));
|
|
57
|
+
if (sinks.length === 0)
|
|
58
|
+
return;
|
|
59
|
+
const time = new Date();
|
|
60
|
+
const { caller, chain } = (0, caller_1.resolveCaller)(cfg);
|
|
61
|
+
const ev = {
|
|
62
|
+
time,
|
|
63
|
+
ts: (0, config_1.formatTs)(cfg, time),
|
|
64
|
+
level,
|
|
65
|
+
intent,
|
|
66
|
+
label,
|
|
67
|
+
message: message ?? 'null',
|
|
68
|
+
color,
|
|
69
|
+
caller,
|
|
70
|
+
chain,
|
|
71
|
+
worker: (0, config_1.workerLabel)(),
|
|
72
|
+
test: currentTest,
|
|
73
|
+
testTitle: currentTitle,
|
|
74
|
+
table,
|
|
75
|
+
};
|
|
76
|
+
for (const s of sinks) {
|
|
77
|
+
try {
|
|
78
|
+
s.write(ev, cfg);
|
|
79
|
+
}
|
|
80
|
+
catch (err) {
|
|
81
|
+
// A logger must never fail a test. Report once to stderr and carry on.
|
|
82
|
+
process.stderr.write(`[advanced-logger] sink failed: ${err.message}\n`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function themed(level, intent, action) {
|
|
87
|
+
return (0, config_1.config)().ansi ? (0, theme_1.resolveStyle)(level, intent, action) : '';
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;AAaA,wCAGC;AAOD,4BAsCC;AAyCD,wBAEC;AAxGD,qCAAyC;AACzC,qCAAsF;AACtF,mCAAqE;AACrE,qCAAoC;AACpC,mCAAkF;AAElF,IAAI,WAA+B,CAAC;AACpC,IAAI,YAAgC,CAAC;AAErC;;;GAGG;AACH,SAAgB,cAAc,CAAC,IAAwB,EAAE,KAAc;IACrE,WAAW,GAAG,IAAI,CAAC;IACnB,YAAY,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;AAClE,CAAC;AACM,MAAM,cAAc,GAAG,GAAuB,EAAE,CAAC,WAAW,CAAC;AAAvD,QAAA,cAAc,kBAA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AAI,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,MAAM,CAAC,KAAgB,EAAE,MAAiB,EAAE,MAAkB;IAC5E,OAAO,IAAA,eAAM,GAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,oBAAY,EAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAClE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { debug, info, warn, error } from './logger';
|
|
2
|
+
export { LogActions, fields, formatValue } from './actions';
|
|
3
|
+
export type { Fields, Row } from './actions';
|
|
4
|
+
export { config, configure, defineConfig, resetConfig, initRun, getRun, workerLabel, runIdMissing, enableAnsi, disableAnsi, isAnsiEnabled, enableFg, disableFg, isFgEnabled, enableBg, disableBg, isBgEnabled, enableCallerColor, disableCallerColor, isCallerColorEnabled, isDebugEnabled, includeOnlyPackages, suppressClassContains, suppressMethodPrefix, clearIncludes, setTableCellLimit, disableTableCellLimit, detectAnsiSupport, } from './config';
|
|
5
|
+
export type { LogConfig, LogConfigPatch, RootLevel, AttachPolicy, FileToggles } from './config';
|
|
6
|
+
export { LogIntent, ACTION_FG, TABLE_TITLE_FG, TABLE_COLUMNS_FG } from './theme';
|
|
7
|
+
export type { LevelName, LogAction } from './theme';
|
|
8
|
+
export { stripAnsi, fgFromStyle } from './ansi';
|
|
9
|
+
export { setTestContext, getTestContext } from './core';
|
|
10
|
+
export { addSink, removeSink, captureLogs, closeAllFiles, traceFilePath, tableFilePath } from './sinks';
|
|
11
|
+
export type { Sink, LogEvent, Capture, TableData } from './sinks';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC5D,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EACL,MAAM,EACN,SAAS,EACT,YAAY,EACZ,WAAW,EACX,OAAO,EACP,MAAM,EACN,WAAW,EACX,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACjF,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxG,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tableFilePath = exports.traceFilePath = exports.closeAllFiles = exports.captureLogs = exports.removeSink = exports.addSink = exports.getTestContext = exports.setTestContext = exports.fgFromStyle = exports.stripAnsi = exports.TABLE_COLUMNS_FG = exports.TABLE_TITLE_FG = exports.ACTION_FG = exports.LogIntent = exports.detectAnsiSupport = exports.disableTableCellLimit = exports.setTableCellLimit = exports.clearIncludes = exports.suppressMethodPrefix = exports.suppressClassContains = exports.includeOnlyPackages = exports.isDebugEnabled = exports.isCallerColorEnabled = exports.disableCallerColor = exports.enableCallerColor = exports.isBgEnabled = exports.disableBg = exports.enableBg = exports.isFgEnabled = exports.disableFg = exports.enableFg = exports.isAnsiEnabled = exports.disableAnsi = exports.enableAnsi = exports.runIdMissing = exports.workerLabel = exports.getRun = exports.initRun = exports.resetConfig = exports.defineConfig = exports.configure = exports.config = exports.formatValue = exports.fields = exports.LogActions = exports.error = exports.warn = exports.info = exports.debug = void 0;
|
|
4
|
+
var logger_1 = require("./logger");
|
|
5
|
+
Object.defineProperty(exports, "debug", { enumerable: true, get: function () { return logger_1.debug; } });
|
|
6
|
+
Object.defineProperty(exports, "info", { enumerable: true, get: function () { return logger_1.info; } });
|
|
7
|
+
Object.defineProperty(exports, "warn", { enumerable: true, get: function () { return logger_1.warn; } });
|
|
8
|
+
Object.defineProperty(exports, "error", { enumerable: true, get: function () { return logger_1.error; } });
|
|
9
|
+
var actions_1 = require("./actions");
|
|
10
|
+
Object.defineProperty(exports, "LogActions", { enumerable: true, get: function () { return actions_1.LogActions; } });
|
|
11
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return actions_1.fields; } });
|
|
12
|
+
Object.defineProperty(exports, "formatValue", { enumerable: true, get: function () { return actions_1.formatValue; } });
|
|
13
|
+
var config_1 = require("./config");
|
|
14
|
+
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_1.config; } });
|
|
15
|
+
Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return config_1.configure; } });
|
|
16
|
+
Object.defineProperty(exports, "defineConfig", { enumerable: true, get: function () { return config_1.defineConfig; } });
|
|
17
|
+
Object.defineProperty(exports, "resetConfig", { enumerable: true, get: function () { return config_1.resetConfig; } });
|
|
18
|
+
Object.defineProperty(exports, "initRun", { enumerable: true, get: function () { return config_1.initRun; } });
|
|
19
|
+
Object.defineProperty(exports, "getRun", { enumerable: true, get: function () { return config_1.getRun; } });
|
|
20
|
+
Object.defineProperty(exports, "workerLabel", { enumerable: true, get: function () { return config_1.workerLabel; } });
|
|
21
|
+
Object.defineProperty(exports, "runIdMissing", { enumerable: true, get: function () { return config_1.runIdMissing; } });
|
|
22
|
+
Object.defineProperty(exports, "enableAnsi", { enumerable: true, get: function () { return config_1.enableAnsi; } });
|
|
23
|
+
Object.defineProperty(exports, "disableAnsi", { enumerable: true, get: function () { return config_1.disableAnsi; } });
|
|
24
|
+
Object.defineProperty(exports, "isAnsiEnabled", { enumerable: true, get: function () { return config_1.isAnsiEnabled; } });
|
|
25
|
+
Object.defineProperty(exports, "enableFg", { enumerable: true, get: function () { return config_1.enableFg; } });
|
|
26
|
+
Object.defineProperty(exports, "disableFg", { enumerable: true, get: function () { return config_1.disableFg; } });
|
|
27
|
+
Object.defineProperty(exports, "isFgEnabled", { enumerable: true, get: function () { return config_1.isFgEnabled; } });
|
|
28
|
+
Object.defineProperty(exports, "enableBg", { enumerable: true, get: function () { return config_1.enableBg; } });
|
|
29
|
+
Object.defineProperty(exports, "disableBg", { enumerable: true, get: function () { return config_1.disableBg; } });
|
|
30
|
+
Object.defineProperty(exports, "isBgEnabled", { enumerable: true, get: function () { return config_1.isBgEnabled; } });
|
|
31
|
+
Object.defineProperty(exports, "enableCallerColor", { enumerable: true, get: function () { return config_1.enableCallerColor; } });
|
|
32
|
+
Object.defineProperty(exports, "disableCallerColor", { enumerable: true, get: function () { return config_1.disableCallerColor; } });
|
|
33
|
+
Object.defineProperty(exports, "isCallerColorEnabled", { enumerable: true, get: function () { return config_1.isCallerColorEnabled; } });
|
|
34
|
+
Object.defineProperty(exports, "isDebugEnabled", { enumerable: true, get: function () { return config_1.isDebugEnabled; } });
|
|
35
|
+
Object.defineProperty(exports, "includeOnlyPackages", { enumerable: true, get: function () { return config_1.includeOnlyPackages; } });
|
|
36
|
+
Object.defineProperty(exports, "suppressClassContains", { enumerable: true, get: function () { return config_1.suppressClassContains; } });
|
|
37
|
+
Object.defineProperty(exports, "suppressMethodPrefix", { enumerable: true, get: function () { return config_1.suppressMethodPrefix; } });
|
|
38
|
+
Object.defineProperty(exports, "clearIncludes", { enumerable: true, get: function () { return config_1.clearIncludes; } });
|
|
39
|
+
Object.defineProperty(exports, "setTableCellLimit", { enumerable: true, get: function () { return config_1.setTableCellLimit; } });
|
|
40
|
+
Object.defineProperty(exports, "disableTableCellLimit", { enumerable: true, get: function () { return config_1.disableTableCellLimit; } });
|
|
41
|
+
Object.defineProperty(exports, "detectAnsiSupport", { enumerable: true, get: function () { return config_1.detectAnsiSupport; } });
|
|
42
|
+
var theme_1 = require("./theme");
|
|
43
|
+
Object.defineProperty(exports, "LogIntent", { enumerable: true, get: function () { return theme_1.LogIntent; } });
|
|
44
|
+
Object.defineProperty(exports, "ACTION_FG", { enumerable: true, get: function () { return theme_1.ACTION_FG; } });
|
|
45
|
+
Object.defineProperty(exports, "TABLE_TITLE_FG", { enumerable: true, get: function () { return theme_1.TABLE_TITLE_FG; } });
|
|
46
|
+
Object.defineProperty(exports, "TABLE_COLUMNS_FG", { enumerable: true, get: function () { return theme_1.TABLE_COLUMNS_FG; } });
|
|
47
|
+
var ansi_1 = require("./ansi");
|
|
48
|
+
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
49
|
+
Object.defineProperty(exports, "fgFromStyle", { enumerable: true, get: function () { return ansi_1.fgFromStyle; } });
|
|
50
|
+
var core_1 = require("./core");
|
|
51
|
+
Object.defineProperty(exports, "setTestContext", { enumerable: true, get: function () { return core_1.setTestContext; } });
|
|
52
|
+
Object.defineProperty(exports, "getTestContext", { enumerable: true, get: function () { return core_1.getTestContext; } });
|
|
53
|
+
var sinks_1 = require("./sinks");
|
|
54
|
+
Object.defineProperty(exports, "addSink", { enumerable: true, get: function () { return sinks_1.addSink; } });
|
|
55
|
+
Object.defineProperty(exports, "removeSink", { enumerable: true, get: function () { return sinks_1.removeSink; } });
|
|
56
|
+
Object.defineProperty(exports, "captureLogs", { enumerable: true, get: function () { return sinks_1.captureLogs; } });
|
|
57
|
+
Object.defineProperty(exports, "closeAllFiles", { enumerable: true, get: function () { return sinks_1.closeAllFiles; } });
|
|
58
|
+
Object.defineProperty(exports, "traceFilePath", { enumerable: true, get: function () { return sinks_1.traceFilePath; } });
|
|
59
|
+
Object.defineProperty(exports, "tableFilePath", { enumerable: true, get: function () { return sinks_1.tableFilePath; } });
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAAoD;AAA3C,+FAAA,KAAK,OAAA;AAAE,8FAAA,IAAI,OAAA;AAAE,8FAAA,IAAI,OAAA;AAAE,+FAAA,KAAK,OAAA;AACjC,qCAA4D;AAAnD,qGAAA,UAAU,OAAA;AAAE,iGAAA,MAAM,OAAA;AAAE,sGAAA,WAAW,OAAA;AAExC,mCA6BkB;AA5BhB,gGAAA,MAAM,OAAA;AACN,mGAAA,SAAS,OAAA;AACT,sGAAA,YAAY,OAAA;AACZ,qGAAA,WAAW,OAAA;AACX,iGAAA,OAAO,OAAA;AACP,gGAAA,MAAM,OAAA;AACN,qGAAA,WAAW,OAAA;AACX,sGAAA,YAAY,OAAA;AACZ,oGAAA,UAAU,OAAA;AACV,qGAAA,WAAW,OAAA;AACX,uGAAA,aAAa,OAAA;AACb,kGAAA,QAAQ,OAAA;AACR,mGAAA,SAAS,OAAA;AACT,qGAAA,WAAW,OAAA;AACX,kGAAA,QAAQ,OAAA;AACR,mGAAA,SAAS,OAAA;AACT,qGAAA,WAAW,OAAA;AACX,2GAAA,iBAAiB,OAAA;AACjB,4GAAA,kBAAkB,OAAA;AAClB,8GAAA,oBAAoB,OAAA;AACpB,wGAAA,cAAc,OAAA;AACd,6GAAA,mBAAmB,OAAA;AACnB,+GAAA,qBAAqB,OAAA;AACrB,8GAAA,oBAAoB,OAAA;AACpB,uGAAA,aAAa,OAAA;AACb,2GAAA,iBAAiB,OAAA;AACjB,+GAAA,qBAAqB,OAAA;AACrB,2GAAA,iBAAiB,OAAA;AAGnB,iCAAiF;AAAxE,kGAAA,SAAS,OAAA;AAAE,kGAAA,SAAS,OAAA;AAAE,uGAAA,cAAc,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAE/D,+BAAgD;AAAvC,iGAAA,SAAS,OAAA;AAAE,mGAAA,WAAW,OAAA;AAC/B,+BAAwD;AAA/C,sGAAA,cAAc,OAAA;AAAE,sGAAA,cAAc,OAAA;AACvC,iCAAwG;AAA/F,gGAAA,OAAO,OAAA;AAAE,mGAAA,UAAU,OAAA;AAAE,oGAAA,WAAW,OAAA;AAAE,sGAAA,aAAa,OAAA;AAAE,sGAAA,aAAa,OAAA;AAAE,sGAAA,aAAa,OAAA"}
|
package/dist/logger.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LogActions } from './actions';
|
|
2
|
+
/** Level instances. `info.click("...")`, `warn.log("...")`, `error.failed("...")`. */
|
|
3
|
+
export declare const debug: LogActions;
|
|
4
|
+
export declare const info: LogActions;
|
|
5
|
+
export declare const warn: LogActions;
|
|
6
|
+
export declare const error: LogActions;
|
|
7
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,sFAAsF;AACtF,eAAO,MAAM,KAAK,YAA0B,CAAC;AAC7C,eAAO,MAAM,IAAI,YAAyB,CAAC;AAC3C,eAAO,MAAM,IAAI,YAAyB,CAAC;AAC3C,eAAO,MAAM,KAAK,YAA0B,CAAC"}
|
package/dist/logger.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.error = exports.warn = exports.info = exports.debug = void 0;
|
|
4
|
+
const actions_1 = require("./actions");
|
|
5
|
+
/** Level instances. `info.click("...")`, `warn.log("...")`, `error.failed("...")`. */
|
|
6
|
+
exports.debug = new actions_1.LogActions('DEBUG');
|
|
7
|
+
exports.info = new actions_1.LogActions('INFO');
|
|
8
|
+
exports.warn = new actions_1.LogActions('WARN');
|
|
9
|
+
exports.error = new actions_1.LogActions('ERROR');
|
|
10
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAEvC,sFAAsF;AACzE,QAAA,KAAK,GAAG,IAAI,oBAAU,CAAC,OAAO,CAAC,CAAC;AAChC,QAAA,IAAI,GAAG,IAAI,oBAAU,CAAC,MAAM,CAAC,CAAC;AAC9B,QAAA,IAAI,GAAG,IAAI,oBAAU,CAAC,MAAM,CAAC,CAAC;AAC9B,QAAA,KAAK,GAAG,IAAI,oBAAU,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
/**
|
|
3
|
+
* Drop-in replacement for Playwright's `test`. An auto fixture, active for every test, that:
|
|
4
|
+
* - tags log records with the test title,
|
|
5
|
+
* - logs a start/end banner,
|
|
6
|
+
* - attaches the test's log lines to the report (policy: config().attach, default on-failure).
|
|
7
|
+
*
|
|
8
|
+
* Import `test` and `expect` from here instead of '@playwright/test'.
|
|
9
|
+
*/
|
|
10
|
+
export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & {
|
|
11
|
+
voidLog: void;
|
|
12
|
+
}, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
|
|
13
|
+
export { expect };
|
|
14
|
+
export { initRun } from './config';
|
|
15
|
+
//# sourceMappingURL=playwright.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playwright.d.ts","sourceRoot":"","sources":["../src/playwright.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAMxD;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI;aAA0B,IAAI;wGAwB7C,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initRun = exports.expect = exports.test = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
Object.defineProperty(exports, "expect", { enumerable: true, get: function () { return test_1.expect; } });
|
|
6
|
+
const config_1 = require("./config");
|
|
7
|
+
const core_1 = require("./core");
|
|
8
|
+
const sinks_1 = require("./sinks");
|
|
9
|
+
const logger_1 = require("./logger");
|
|
10
|
+
/**
|
|
11
|
+
* Drop-in replacement for Playwright's `test`. An auto fixture, active for every test, that:
|
|
12
|
+
* - tags log records with the test title,
|
|
13
|
+
* - logs a start/end banner,
|
|
14
|
+
* - attaches the test's log lines to the report (policy: config().attach, default on-failure).
|
|
15
|
+
*
|
|
16
|
+
* Import `test` and `expect` from here instead of '@playwright/test'.
|
|
17
|
+
*/
|
|
18
|
+
exports.test = test_1.test.extend({
|
|
19
|
+
voidLog: [
|
|
20
|
+
async ({}, use, testInfo) => {
|
|
21
|
+
(0, core_1.setTestContext)(testInfo.titlePath.join(' > '), testInfo.title);
|
|
22
|
+
const capture = (0, sinks_1.captureLogs)();
|
|
23
|
+
logger_1.info.log(`TEST START | ${testInfo.titlePath.join(' > ')}`);
|
|
24
|
+
try {
|
|
25
|
+
await use();
|
|
26
|
+
}
|
|
27
|
+
finally {
|
|
28
|
+
const failed = testInfo.status !== testInfo.expectedStatus;
|
|
29
|
+
const line = `TEST END | ${testInfo.status} | ${testInfo.duration}ms`;
|
|
30
|
+
if (failed)
|
|
31
|
+
logger_1.error.failed(line);
|
|
32
|
+
else
|
|
33
|
+
logger_1.info.success(line);
|
|
34
|
+
const text = capture.stop();
|
|
35
|
+
const policy = (0, config_1.config)().attach;
|
|
36
|
+
if (text && (policy === 'always' || (policy === 'on-failure' && failed))) {
|
|
37
|
+
await testInfo.attach('void-log', { body: text, contentType: 'text/plain' });
|
|
38
|
+
}
|
|
39
|
+
(0, core_1.setTestContext)(undefined);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{ auto: true },
|
|
43
|
+
],
|
|
44
|
+
});
|
|
45
|
+
var config_2 = require("./config");
|
|
46
|
+
Object.defineProperty(exports, "initRun", { enumerable: true, get: function () { return config_2.initRun; } });
|
|
47
|
+
//# sourceMappingURL=playwright.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playwright.js","sourceRoot":"","sources":["../src/playwright.ts"],"names":[],"mappings":";;;AAAA,2CAAwD;AAwC/C,uFAxCc,aAAM,OAwCd;AAvCf,qCAAkC;AAClC,iCAAwC;AACxC,mCAAsC;AACtC,qCAAuC;AAEvC;;;;;;;GAOG;AACU,QAAA,IAAI,GAAG,WAAI,CAAC,MAAM,CAAoB;IACjD,OAAO,EAAE;QACP,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;YAC1B,IAAA,qBAAc,EAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC/D,MAAM,OAAO,GAAG,IAAA,mBAAW,GAAE,CAAC;YAC9B,aAAI,CAAC,GAAG,CAAC,gBAAgB,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3D,IAAI,CAAC;gBACH,MAAM,GAAG,EAAE,CAAC;YACd,CAAC;oBAAS,CAAC;gBACT,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,cAAc,CAAC;gBAC3D,MAAM,IAAI,GAAG,cAAc,QAAQ,CAAC,MAAM,MAAM,QAAQ,CAAC,QAAQ,IAAI,CAAC;gBACtE,IAAI,MAAM;oBAAE,cAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;oBAC1B,aAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBAExB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;gBAC5B,MAAM,MAAM,GAAG,IAAA,eAAM,GAAE,CAAC,MAAM,CAAC;gBAC/B,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,KAAK,YAAY,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC;oBACzE,MAAM,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;gBAC/E,CAAC;gBACD,IAAA,qBAAc,EAAC,SAAS,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;QACD,EAAE,IAAI,EAAE,IAAI,EAAE;KACf;CACF,CAAC,CAAC;AAGH,mCAAmC;AAA1B,iGAAA,OAAO,OAAA"}
|
package/dist/redact.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free-text secret masking (redactText). Structured values are masked by key in actions.ts; this catches secrets
|
|
3
|
+
* written into a message as text: `key=value`, `key: value`, `"key":"value"` (key containing one of redactKeys,
|
|
4
|
+
* case-insensitive), and `Bearer <token>` / `Basic <credentials>`.
|
|
5
|
+
*/
|
|
6
|
+
/** `text` with sensitive values replaced by '***'. Returns the input unchanged when nothing matches. */
|
|
7
|
+
export declare function maskText(text: string, keys: readonly string[]): string;
|
|
8
|
+
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAuBH,wGAAwG;AACxG,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAMtE"}
|
package/dist/redact.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Free-text secret masking (redactText). Structured values are masked by key in actions.ts; this catches secrets
|
|
4
|
+
* written into a message as text: `key=value`, `key: value`, `"key":"value"` (key containing one of redactKeys,
|
|
5
|
+
* case-insensitive), and `Bearer <token>` / `Basic <credentials>`.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.maskText = maskText;
|
|
9
|
+
const MASK = '***';
|
|
10
|
+
const CACHE = new Map();
|
|
11
|
+
const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
12
|
+
function pairPattern(keys) {
|
|
13
|
+
const usable = keys.filter((k) => k.trim() !== '');
|
|
14
|
+
if (usable.length === 0)
|
|
15
|
+
return undefined;
|
|
16
|
+
const cacheKey = usable.join('\u0000');
|
|
17
|
+
let re = CACHE.get(cacheKey);
|
|
18
|
+
if (!re) {
|
|
19
|
+
// <key containing a sensitive word><optional quote><: or => <optional quote><value up to a delimiter>
|
|
20
|
+
const words = usable.map(escapeRe).join('|');
|
|
21
|
+
re = new RegExp(`([\\w.-]*(?:${words})[\\w.-]*)(["']?[ \\t]*[:=][ \\t]*["']?)([^\\s"',;&}\\]]+)`, 'gi');
|
|
22
|
+
CACHE.set(cacheKey, re);
|
|
23
|
+
}
|
|
24
|
+
return re;
|
|
25
|
+
}
|
|
26
|
+
const AUTH_SCHEME = /\b(Bearer|Basic)[ \t]+[\w.~+/-]+=*/gi;
|
|
27
|
+
/** `text` with sensitive values replaced by '***'. Returns the input unchanged when nothing matches. */
|
|
28
|
+
function maskText(text, keys) {
|
|
29
|
+
let out = text.replace(AUTH_SCHEME, `$1 ${MASK}`);
|
|
30
|
+
const re = pairPattern(keys);
|
|
31
|
+
// A value that is already masked, or is the auth scheme masked above ("Authorization: Bearer ***"), stays as is.
|
|
32
|
+
if (re)
|
|
33
|
+
out = out.replace(re, (m, key, sep, value) => (value === MASK || /^(bearer|basic)$/i.test(value) ? m : key + sep + MASK));
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=redact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAwBH,4BAMC;AA5BD,MAAM,IAAI,GAAG,KAAK,CAAC;AACnB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;AAExC,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAEjF,SAAS,WAAW,CAAC,IAAuB;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACnD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,sGAAsG;QACtG,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7C,EAAE,GAAG,IAAI,MAAM,CAAC,eAAe,KAAK,4DAA4D,EAAE,IAAI,CAAC,CAAC;QACxG,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,WAAW,GAAG,sCAAsC,CAAC;AAE3D,wGAAwG;AACxG,SAAgB,QAAQ,CAAC,IAAY,EAAE,IAAuB;IAC5D,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;IAClD,MAAM,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC7B,iHAAiH;IACjH,IAAI,EAAE;QAAE,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAW,EAAE,GAAW,EAAE,KAAa,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;IAC1J,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/sinks.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type LogConfig } from './config';
|
|
2
|
+
import { type LevelName, type LogIntent } from './theme';
|
|
3
|
+
/** One log call. Sinks render it however they need. */
|
|
4
|
+
export interface LogEvent {
|
|
5
|
+
time: Date;
|
|
6
|
+
/** Pre-formatted timestamp. */
|
|
7
|
+
ts: string;
|
|
8
|
+
level: LevelName;
|
|
9
|
+
/** null for pre-colored calls such as table(). */
|
|
10
|
+
intent: LogIntent | null;
|
|
11
|
+
label: string;
|
|
12
|
+
/** Full message, may be multi-line. */
|
|
13
|
+
message: string;
|
|
14
|
+
/** Resolved theme style (intentFg + levelBg, per the fg/bg toggles; '' when none). Ignored when ANSI is off. */
|
|
15
|
+
color: string;
|
|
16
|
+
/** Plain "Callee <- Caller" text, empty when unresolved. */
|
|
17
|
+
caller: string;
|
|
18
|
+
/** Plain in-project chain, empty when unresolved. */
|
|
19
|
+
chain: string;
|
|
20
|
+
worker: string;
|
|
21
|
+
/** Full test path ("file > describe > title"), as recorded in jsonl. */
|
|
22
|
+
test?: string;
|
|
23
|
+
/** Short test label for the console (the test's own title). */
|
|
24
|
+
testTitle?: string;
|
|
25
|
+
/** Set on a rendered table's event: its rows as data, for the CSV/JSON attachment sink and custom sinks. */
|
|
26
|
+
table?: TableData;
|
|
27
|
+
}
|
|
28
|
+
/** A rendered table as data. Values are already redacted by key (at any depth); never truncated. */
|
|
29
|
+
export interface TableData {
|
|
30
|
+
title?: string;
|
|
31
|
+
/** Column order, as rendered. */
|
|
32
|
+
headers: string[];
|
|
33
|
+
rows: Array<Record<string, unknown>>;
|
|
34
|
+
/** Attachment path under attachments/<csv|json>/, without extension: `<runId>-<worker>/<NNN>-<heading>`. Undefined when files.tables is off. */
|
|
35
|
+
file?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface Sink {
|
|
38
|
+
/** Cheap check run before any stack capture; return false to skip the event entirely. */
|
|
39
|
+
accepts(level: LevelName, cfg: LogConfig): boolean;
|
|
40
|
+
write(ev: LogEvent, cfg: LogConfig): void;
|
|
41
|
+
}
|
|
42
|
+
export declare const splitLines: (m: string) => string[];
|
|
43
|
+
export declare const TEST_TAG_MAX = 40;
|
|
44
|
+
export declare const consoleSink: Sink;
|
|
45
|
+
type FileKind = 'debug-trace' | 'partial-trace' | 'full-trace';
|
|
46
|
+
export declare function closeAllFiles(): void;
|
|
47
|
+
export declare function traceFilePath(cfg: LogConfig, kind: FileKind | 'jsonl', ext?: string): string;
|
|
48
|
+
/** A heading as a file-name part: lowercase letters and digits (any script) joined by '-', at most 40 chars. */
|
|
49
|
+
export declare function headingSlug(heading: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* The next table's attachment name, `<runId>-<worker>/<NNN>-<heading>`, or undefined when files.tables is off.
|
|
52
|
+
* The folder `<runId>-<worker>` is the part every trace file of this worker shares (`<kind>-<runId>-<worker>.log`),
|
|
53
|
+
* so each parent log has its own folder. NNN counts tables in this process; a number whose file already exists
|
|
54
|
+
* (another process with the same run id and worker label) is skipped rather than overwritten.
|
|
55
|
+
*/
|
|
56
|
+
export declare function nextTableFile(cfg: LogConfig, heading: string): string | undefined;
|
|
57
|
+
/** <logDir>/<runDate>/attachments/<csv|json>/<runId>-<worker>/<NNN>-<heading>.<csv|json> */
|
|
58
|
+
export declare function tableFilePath(cfg: LogConfig, ext: 'csv' | 'json', file: string): string;
|
|
59
|
+
/** UTF-8 BOM (so Excel reads non-ASCII correctly), header row, then one row per table row; CRLF line ends. */
|
|
60
|
+
export declare function tableToCsv(t: Pick<TableData, 'headers' | 'rows'>): string;
|
|
61
|
+
/** The JSON attachment: where the table came from, then its rows. */
|
|
62
|
+
export declare function tableToJson(ev: Pick<LogEvent, 'time' | 'level' | 'worker' | 'test'>, t: TableData): string;
|
|
63
|
+
/** Writes each table's CSV and JSON attachment. All levels, like debug-trace; non-table events are ignored. */
|
|
64
|
+
export declare const tableFilesSink: Sink;
|
|
65
|
+
export declare const partialTraceSink: Sink;
|
|
66
|
+
export declare const debugTraceSink: Sink;
|
|
67
|
+
export declare const fullTraceSink: Sink;
|
|
68
|
+
export declare const jsonlSink: Sink;
|
|
69
|
+
export interface Capture {
|
|
70
|
+
/** Plain-text lines as they would appear in partial-trace. */
|
|
71
|
+
text(): string;
|
|
72
|
+
stop(): string;
|
|
73
|
+
}
|
|
74
|
+
export declare const captureSink: Sink;
|
|
75
|
+
export declare function captureLogs(): Capture;
|
|
76
|
+
export declare const addSink: (s: Sink) => void;
|
|
77
|
+
export declare const removeSink: (s: Sink) => void;
|
|
78
|
+
export declare function activeSinks(): Sink[];
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=sinks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sinks.d.ts","sourceRoot":"","sources":["../src/sinks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAkF,MAAM,UAAU,CAAC;AAC1H,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,SAAS,EAAe,MAAM,SAAS,CAAC;AAEjF,uDAAuD;AACvD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,kDAAkD;IAClD,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,gHAAgH;IAChH,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,oGAAoG;AACpG,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACrC,gJAAgJ;IAChJ,IAAI,C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