@reportforge/playwright-pdf 0.2.2 → 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/dist/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Reporter, FullConfig, Suite, TestCase, TestResult, FullResult } from '@playwright/test/reporter';
2
2
 
3
- type TemplateId = 'minimal' | 'detailed' | 'executive';
3
+ declare const TEMPLATE_IDS: readonly ["minimal", "detailed", "executive"];
4
+ type TemplateId = (typeof TEMPLATE_IDS)[number];
4
5
  /**
5
6
  * License plan. Subscription is the only product — every active license is the
6
7
  * same plan. The "no license" case is represented by the absence of a
@@ -166,6 +167,32 @@ interface ReporterOptions {
166
167
  attachPdf?: boolean;
167
168
  };
168
169
  };
170
+ /**
171
+ * Offline failure root-cause analysis. Classifies failures into categories
172
+ * using an embedded Naive Bayes model and renders a clustered breakdown in
173
+ * the `detailed` PDF (one-liner in `executive`). No network calls at runtime.
174
+ * @example
175
+ * failureAnalysis: { enabled: true, maxClusters: 5 }
176
+ */
177
+ failureAnalysis?: {
178
+ /** Enable/disable. Default: true */
179
+ enabled?: boolean;
180
+ /** Max clusters shown in the PDF. Default: 10 */
181
+ maxClusters?: number;
182
+ /** Hide clusters below this match strength. Default: 'weak' (show all). */
183
+ minStrength?: 'weak' | 'moderate' | 'strong';
184
+ /** Max failures fed to the classifier; excess skipped, PDF notes it. Default: 500 */
185
+ maxFailuresToAnalyse?: number;
186
+ /** Collect unknown/low-confidence failures to a local per-project CSV (Plan 3). Default: true */
187
+ collectUnclassified?: boolean;
188
+ /**
189
+ * Auto-update the classifier model from the signed license-refresh channel
190
+ * (offline-tolerant; the bundled model is always the floor; the delivered model
191
+ * is Ed25519-verified). Set false to pin the bundled model for reproducibility.
192
+ * Default: true
193
+ */
194
+ autoUpdateModel?: boolean;
195
+ };
169
196
  /**
170
197
  * Path to the history JSON file. Defaults to
171
198
  * `~/.reportforge/{projectKey}/history.json` where `projectKey` is derived
@@ -219,9 +246,11 @@ interface ReporterOptions {
219
246
  */
220
247
  interface LicenseInfo {
221
248
  plan: LicensePlan;
222
- source: 'jwt-online' | 'jwt-cache';
249
+ source: 'jwt-online' | 'jwt-cache' | 'demo';
223
250
  expiry: Date;
224
251
  key: string;
252
+ /** Raw Ed25519-signed JWT from the server. Absent only in demo mode. */
253
+ jwt?: string;
225
254
  machinesUsed?: number;
226
255
  machineLimit?: number;
227
256
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Reporter, FullConfig, Suite, TestCase, TestResult, FullResult } from '@playwright/test/reporter';
2
2
 
3
- type TemplateId = 'minimal' | 'detailed' | 'executive';
3
+ declare const TEMPLATE_IDS: readonly ["minimal", "detailed", "executive"];
4
+ type TemplateId = (typeof TEMPLATE_IDS)[number];
4
5
  /**
5
6
  * License plan. Subscription is the only product — every active license is the
6
7
  * same plan. The "no license" case is represented by the absence of a
@@ -166,6 +167,32 @@ interface ReporterOptions {
166
167
  attachPdf?: boolean;
167
168
  };
168
169
  };
170
+ /**
171
+ * Offline failure root-cause analysis. Classifies failures into categories
172
+ * using an embedded Naive Bayes model and renders a clustered breakdown in
173
+ * the `detailed` PDF (one-liner in `executive`). No network calls at runtime.
174
+ * @example
175
+ * failureAnalysis: { enabled: true, maxClusters: 5 }
176
+ */
177
+ failureAnalysis?: {
178
+ /** Enable/disable. Default: true */
179
+ enabled?: boolean;
180
+ /** Max clusters shown in the PDF. Default: 10 */
181
+ maxClusters?: number;
182
+ /** Hide clusters below this match strength. Default: 'weak' (show all). */
183
+ minStrength?: 'weak' | 'moderate' | 'strong';
184
+ /** Max failures fed to the classifier; excess skipped, PDF notes it. Default: 500 */
185
+ maxFailuresToAnalyse?: number;
186
+ /** Collect unknown/low-confidence failures to a local per-project CSV (Plan 3). Default: true */
187
+ collectUnclassified?: boolean;
188
+ /**
189
+ * Auto-update the classifier model from the signed license-refresh channel
190
+ * (offline-tolerant; the bundled model is always the floor; the delivered model
191
+ * is Ed25519-verified). Set false to pin the bundled model for reproducibility.
192
+ * Default: true
193
+ */
194
+ autoUpdateModel?: boolean;
195
+ };
169
196
  /**
170
197
  * Path to the history JSON file. Defaults to
171
198
  * `~/.reportforge/{projectKey}/history.json` where `projectKey` is derived
@@ -219,9 +246,11 @@ interface ReporterOptions {
219
246
  */
220
247
  interface LicenseInfo {
221
248
  plan: LicensePlan;
222
- source: 'jwt-online' | 'jwt-cache';
249
+ source: 'jwt-online' | 'jwt-cache' | 'demo';
223
250
  expiry: Date;
224
251
  key: string;
252
+ /** Raw Ed25519-signed JWT from the server. Absent only in demo mode. */
253
+ jwt?: string;
225
254
  machinesUsed?: number;
226
255
  machineLimit?: number;
227
256
  }