@reportforge/playwright-pdf 0.22.0 → 0.23.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/README.md +68 -21
- package/SECURITY.md +13 -2
- package/dist/cli/index.js +228 -118
- package/dist/index.d.mts +31 -10
- package/dist/index.d.ts +31 -10
- package/dist/index.js +296 -117
- package/dist/index.mjs +290 -111
- package/package.json +2 -2
- package/CHANGELOG.md +0 -602
package/dist/index.d.mts
CHANGED
|
@@ -73,8 +73,10 @@ interface ReporterOptions {
|
|
|
73
73
|
*/
|
|
74
74
|
watermark?: string;
|
|
75
75
|
/**
|
|
76
|
-
* Password to protect the generated PDF (
|
|
77
|
-
*
|
|
76
|
+
* Password to protect the generated PDF (AES-256). Applied in-process — no
|
|
77
|
+
* external tools required. Also encrypts the failure-overflow sidecar JSON
|
|
78
|
+
* when one is written. Recommended: source from an env var rather than
|
|
79
|
+
* committing it — `pdfPassword: process.env.RF_PDF_PASSWORD`.
|
|
78
80
|
*/
|
|
79
81
|
pdfPassword?: string;
|
|
80
82
|
/**
|
|
@@ -202,7 +204,7 @@ interface ReporterOptions {
|
|
|
202
204
|
};
|
|
203
205
|
/**
|
|
204
206
|
* Offline failure root-cause analysis. Classifies failures into categories
|
|
205
|
-
* using an embedded
|
|
207
|
+
* using an embedded classifier model and renders a clustered breakdown in
|
|
206
208
|
* the `detailed` PDF (one-liner in `executive`). No network calls at runtime.
|
|
207
209
|
* Optionally personalizes on YOUR machine: label collected failures
|
|
208
210
|
* (`label-feedback`), then `train-model` trains + evaluates a local layer that
|
|
@@ -230,9 +232,9 @@ interface ReporterOptions {
|
|
|
230
232
|
*/
|
|
231
233
|
collectScope?: 'blind-spots' | 'all';
|
|
232
234
|
/**
|
|
233
|
-
* Auto-update the BASE classifier model
|
|
234
|
-
*
|
|
235
|
-
*
|
|
235
|
+
* Auto-update the BASE classifier model (offline-tolerant; the bundled
|
|
236
|
+
* model is always the floor; delivered models are signature-verified).
|
|
237
|
+
* Set false to pin the bundled model for reproducibility.
|
|
236
238
|
* Default: true
|
|
237
239
|
*/
|
|
238
240
|
autoUpdateModel?: boolean;
|
|
@@ -279,6 +281,24 @@ interface ReporterOptions {
|
|
|
279
281
|
/** Max console lines retained per stream. Default: 50 */
|
|
280
282
|
maxConsoleLines?: number;
|
|
281
283
|
};
|
|
284
|
+
/**
|
|
285
|
+
* Opt-in redaction of likely-sensitive values (credentials, tokens, emails)
|
|
286
|
+
* in report content — error messages, stacks, step titles, console output,
|
|
287
|
+
* test titles — and in the live watch stream. Off by default.
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* redact: { enabled: true, patterns: ['MYCO_[A-Z0-9]+'] }
|
|
291
|
+
*/
|
|
292
|
+
redact?: {
|
|
293
|
+
/** Enable redaction. Default: false */
|
|
294
|
+
enabled?: boolean;
|
|
295
|
+
/** Apply the built-in credential/PII patterns. Default: true */
|
|
296
|
+
builtins?: boolean;
|
|
297
|
+
/** Additional regexes (compiled with the `g` flag); matches are fully masked. Default: [] */
|
|
298
|
+
patterns?: string[];
|
|
299
|
+
/** Replacement text for masked values. Default: '[REDACTED]' */
|
|
300
|
+
mask?: string;
|
|
301
|
+
};
|
|
282
302
|
/**
|
|
283
303
|
* Live test-execution streaming (opt-in, off by default). When enabled the
|
|
284
304
|
* reporter mints an unguessable watch link, prints it to the CI logs at run
|
|
@@ -335,10 +355,10 @@ interface ReporterOptions {
|
|
|
335
355
|
/**
|
|
336
356
|
* Store the pass-rate trend on the ReportForge server so it survives
|
|
337
357
|
* ephemeral CI runners (where the local history file is wiped every run).
|
|
338
|
-
* One request per run
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
358
|
+
* One small authenticated request per run, carrying AGGREGATE NUMBERS ONLY —
|
|
359
|
+
* pass rate, counts, duration, verdict. No test titles, no error text; even
|
|
360
|
+
* the branch name never travels in plaintext. Falls back to the local
|
|
361
|
+
* history file on any failure.
|
|
342
362
|
* @default false
|
|
343
363
|
*/
|
|
344
364
|
remoteHistory?: boolean;
|
|
@@ -483,6 +503,7 @@ declare class PdfReporter implements Reporter {
|
|
|
483
503
|
private readonly licenseClient;
|
|
484
504
|
private readonly dataCollector;
|
|
485
505
|
private readonly pdfGenerator;
|
|
506
|
+
private readonly redactor?;
|
|
486
507
|
private licensePromise?;
|
|
487
508
|
private liveStreamer?;
|
|
488
509
|
private liveShardKey;
|
package/dist/index.d.ts
CHANGED
|
@@ -73,8 +73,10 @@ interface ReporterOptions {
|
|
|
73
73
|
*/
|
|
74
74
|
watermark?: string;
|
|
75
75
|
/**
|
|
76
|
-
* Password to protect the generated PDF (
|
|
77
|
-
*
|
|
76
|
+
* Password to protect the generated PDF (AES-256). Applied in-process — no
|
|
77
|
+
* external tools required. Also encrypts the failure-overflow sidecar JSON
|
|
78
|
+
* when one is written. Recommended: source from an env var rather than
|
|
79
|
+
* committing it — `pdfPassword: process.env.RF_PDF_PASSWORD`.
|
|
78
80
|
*/
|
|
79
81
|
pdfPassword?: string;
|
|
80
82
|
/**
|
|
@@ -202,7 +204,7 @@ interface ReporterOptions {
|
|
|
202
204
|
};
|
|
203
205
|
/**
|
|
204
206
|
* Offline failure root-cause analysis. Classifies failures into categories
|
|
205
|
-
* using an embedded
|
|
207
|
+
* using an embedded classifier model and renders a clustered breakdown in
|
|
206
208
|
* the `detailed` PDF (one-liner in `executive`). No network calls at runtime.
|
|
207
209
|
* Optionally personalizes on YOUR machine: label collected failures
|
|
208
210
|
* (`label-feedback`), then `train-model` trains + evaluates a local layer that
|
|
@@ -230,9 +232,9 @@ interface ReporterOptions {
|
|
|
230
232
|
*/
|
|
231
233
|
collectScope?: 'blind-spots' | 'all';
|
|
232
234
|
/**
|
|
233
|
-
* Auto-update the BASE classifier model
|
|
234
|
-
*
|
|
235
|
-
*
|
|
235
|
+
* Auto-update the BASE classifier model (offline-tolerant; the bundled
|
|
236
|
+
* model is always the floor; delivered models are signature-verified).
|
|
237
|
+
* Set false to pin the bundled model for reproducibility.
|
|
236
238
|
* Default: true
|
|
237
239
|
*/
|
|
238
240
|
autoUpdateModel?: boolean;
|
|
@@ -279,6 +281,24 @@ interface ReporterOptions {
|
|
|
279
281
|
/** Max console lines retained per stream. Default: 50 */
|
|
280
282
|
maxConsoleLines?: number;
|
|
281
283
|
};
|
|
284
|
+
/**
|
|
285
|
+
* Opt-in redaction of likely-sensitive values (credentials, tokens, emails)
|
|
286
|
+
* in report content — error messages, stacks, step titles, console output,
|
|
287
|
+
* test titles — and in the live watch stream. Off by default.
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* redact: { enabled: true, patterns: ['MYCO_[A-Z0-9]+'] }
|
|
291
|
+
*/
|
|
292
|
+
redact?: {
|
|
293
|
+
/** Enable redaction. Default: false */
|
|
294
|
+
enabled?: boolean;
|
|
295
|
+
/** Apply the built-in credential/PII patterns. Default: true */
|
|
296
|
+
builtins?: boolean;
|
|
297
|
+
/** Additional regexes (compiled with the `g` flag); matches are fully masked. Default: [] */
|
|
298
|
+
patterns?: string[];
|
|
299
|
+
/** Replacement text for masked values. Default: '[REDACTED]' */
|
|
300
|
+
mask?: string;
|
|
301
|
+
};
|
|
282
302
|
/**
|
|
283
303
|
* Live test-execution streaming (opt-in, off by default). When enabled the
|
|
284
304
|
* reporter mints an unguessable watch link, prints it to the CI logs at run
|
|
@@ -335,10 +355,10 @@ interface ReporterOptions {
|
|
|
335
355
|
/**
|
|
336
356
|
* Store the pass-rate trend on the ReportForge server so it survives
|
|
337
357
|
* ephemeral CI runners (where the local history file is wiped every run).
|
|
338
|
-
* One request per run
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
358
|
+
* One small authenticated request per run, carrying AGGREGATE NUMBERS ONLY —
|
|
359
|
+
* pass rate, counts, duration, verdict. No test titles, no error text; even
|
|
360
|
+
* the branch name never travels in plaintext. Falls back to the local
|
|
361
|
+
* history file on any failure.
|
|
342
362
|
* @default false
|
|
343
363
|
*/
|
|
344
364
|
remoteHistory?: boolean;
|
|
@@ -483,6 +503,7 @@ declare class PdfReporter implements Reporter {
|
|
|
483
503
|
private readonly licenseClient;
|
|
484
504
|
private readonly dataCollector;
|
|
485
505
|
private readonly pdfGenerator;
|
|
506
|
+
private readonly redactor?;
|
|
486
507
|
private licensePromise?;
|
|
487
508
|
private liveStreamer?;
|
|
488
509
|
private liveShardKey;
|