@reportforge/playwright-pdf 0.22.1 → 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 +46 -2
- package/SECURITY.md +11 -0
- package/dist/cli/index.js +228 -118
- package/dist/index.d.mts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +296 -117
- package/dist/index.mjs +290 -111
- package/package.json +2 -1
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
|
/**
|
|
@@ -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
|
|
@@ -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
|
/**
|
|
@@ -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
|
|
@@ -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;
|