@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/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
  /**
@@ -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 Naive Bayes model and renders a clustered breakdown in
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 from the signed license-refresh channel
234
- * (offline-tolerant; the bundled model is always the floor; the delivered model
235
- * is Ed25519-verified). Set false to pin the bundled model for reproducibility.
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 over the existing license connection, carrying
339
- * AGGREGATE NUMBERS ONLY — pass rate, counts, duration, verdict. No test
340
- * titles, no error text; even the branch name is sent as a hash. Falls back
341
- * to the local history file on any failure.
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 (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
  /**
@@ -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 Naive Bayes model and renders a clustered breakdown in
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 from the signed license-refresh channel
234
- * (offline-tolerant; the bundled model is always the floor; the delivered model
235
- * is Ed25519-verified). Set false to pin the bundled model for reproducibility.
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 over the existing license connection, carrying
339
- * AGGREGATE NUMBERS ONLY — pass rate, counts, duration, verdict. No test
340
- * titles, no error text; even the branch name is sent as a hash. Falls back
341
- * to the local history file on any failure.
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;