@reportforge/playwright-pdf 0.22.1 → 0.24.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/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 (Enterprise tier).
77
- * Requires qpdf to be installed on the system.
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;
@@ -531,9 +552,12 @@ declare class PdfReporter implements Reporter {
531
552
  * Announces the watch link once the run is confirmed live-entitled. Gating on
532
553
  * the SAME resolved entitlement the streamer requires (`jwt` + the `'live'`
533
554
  * feature) guarantees the link is never printed or posted for a run that will
534
- * never stream — no dead links. The chat ping fires from the primary shard only
535
- * (unsharded, or `shard.current === 1`) so an N-way matrix posts one message,
536
- * not N. The banner still prints from every shard's own log.
555
+ * never stream — no dead links. The link's token is the server-ISSUED one from
556
+ * the announce handshake (random, key-independent a key rotation can never
557
+ * kill the link); the key-derived HMAC is minted only as a fallback when the
558
+ * handshake fails (network blip, older server). The chat ping fires from the
559
+ * primary shard only (unsharded, or `shard.current === 1`) so an N-way matrix
560
+ * posts one message, not N. The banner still prints from every shard's own log.
537
561
  */
538
562
  private announceLive;
539
563
  private resolveProjectName;
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 (Enterprise tier).
77
- * Requires qpdf to be installed on the system.
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;
@@ -531,9 +552,12 @@ declare class PdfReporter implements Reporter {
531
552
  * Announces the watch link once the run is confirmed live-entitled. Gating on
532
553
  * the SAME resolved entitlement the streamer requires (`jwt` + the `'live'`
533
554
  * feature) guarantees the link is never printed or posted for a run that will
534
- * never stream — no dead links. The chat ping fires from the primary shard only
535
- * (unsharded, or `shard.current === 1`) so an N-way matrix posts one message,
536
- * not N. The banner still prints from every shard's own log.
555
+ * never stream — no dead links. The link's token is the server-ISSUED one from
556
+ * the announce handshake (random, key-independent a key rotation can never
557
+ * kill the link); the key-derived HMAC is minted only as a fallback when the
558
+ * handshake fails (network blip, older server). The chat ping fires from the
559
+ * primary shard only (unsharded, or `shard.current === 1`) so an N-way matrix
560
+ * posts one message, not N. The banner still prints from every shard's own log.
537
561
  */
538
562
  private announceLive;
539
563
  private resolveProjectName;