@regressionbot/sdk 2.6.0 → 2.8.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 +23 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +11 -1
- package/dist/types.d.ts +32 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,6 +38,29 @@ npm install @regressionbot/sdk
|
|
|
38
38
|
|
|
39
39
|
## Migration from 1.x
|
|
40
40
|
|
|
41
|
+
### 2.8.0
|
|
42
|
+
|
|
43
|
+
- **`JobSummary.runSummaryPoints`** (`string[] | null`) — the run summary as a list, one
|
|
44
|
+
short sentence per change, at most four, the change on the most pages first. This is what
|
|
45
|
+
the scheduled-run email and the dashboard's run view show. Null exactly when `runSummary`
|
|
46
|
+
is. A run summarized before this field existed has one point, its paragraph.
|
|
47
|
+
- **`JobSummary.runSummary`** is now one paragraph rather than two or three sentences; its
|
|
48
|
+
doc comment is updated to match. No type change.
|
|
49
|
+
|
|
50
|
+
### 2.7.0
|
|
51
|
+
|
|
52
|
+
Needs API 2.10.0 or later for `fidelity`/`scopeNote` to be populated. On an older API these
|
|
53
|
+
fields are simply absent.
|
|
54
|
+
|
|
55
|
+
- **`fidelity`**, on a project (`ProjectConfig`, `ProjectConfigUpdate`), a run's options
|
|
56
|
+
(`runProject()`, `JobBuilder.fidelity()`) and a result (`PageResult`, `JobStatus`,
|
|
57
|
+
`JobSummary`). `'low'` is a fast content-only check against another live site — no
|
|
58
|
+
screenshot, no stored baseline — [about 3-7s a page instead of up to 50s](https://regressionbot.com/docs/workflows/quick-check).
|
|
59
|
+
`'high'` (the default) is today's full capture. Omitted on a run, the project's own
|
|
60
|
+
fidelity is used.
|
|
61
|
+
- **`scopeNote`**, on `JobStatus` and `JobSummary`: on a low-fidelity run, what it compared
|
|
62
|
+
and what it did not look at. Quote it with a quiet result.
|
|
63
|
+
|
|
41
64
|
### 2.6.0
|
|
42
65
|
|
|
43
66
|
- **`ProjectConfig.startFailureAlertedAt`** — when the owners were last told a scheduled run
|
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,12 @@ export declare class RegressionBot {
|
|
|
50
50
|
autoApprove?: boolean;
|
|
51
51
|
/** What this run is testing, used to judge whether changes were intended. */
|
|
52
52
|
runContext?: RunContext;
|
|
53
|
+
/**
|
|
54
|
+
* `high` (default): today's capture, with screenshots. `low`: a fast content
|
|
55
|
+
* check — no screenshot, only content changes count, needs `baseOrigin`, and
|
|
56
|
+
* stores no baseline. Omitted, the project's fidelity is used.
|
|
57
|
+
*/
|
|
58
|
+
fidelity?: 'low' | 'high';
|
|
53
59
|
}): Promise<JobHandle>;
|
|
54
60
|
/**
|
|
55
61
|
* Update the configuration settings for a named project.
|
|
@@ -101,6 +107,12 @@ export declare class JobBuilder {
|
|
|
101
107
|
* Merges with anything set by an earlier call.
|
|
102
108
|
*/
|
|
103
109
|
withContext(context: RunContext): this;
|
|
110
|
+
/**
|
|
111
|
+
* `high` (default): today's capture, with screenshots. `low`: a fast content check —
|
|
112
|
+
* no screenshot, only content changes count, needs `.against()`, and stores no
|
|
113
|
+
* baseline. Left unset, the project's fidelity is used.
|
|
114
|
+
*/
|
|
115
|
+
fidelity(value: 'low' | 'high'): this;
|
|
104
116
|
/**
|
|
105
117
|
* Compiles the manifest and triggers the API.
|
|
106
118
|
*/
|
package/dist/index.js
CHANGED
|
@@ -170,6 +170,15 @@ class JobBuilder {
|
|
|
170
170
|
this.manifest.runContext = { ...this.manifest.runContext, ...context };
|
|
171
171
|
return this;
|
|
172
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* `high` (default): today's capture, with screenshots. `low`: a fast content check —
|
|
175
|
+
* no screenshot, only content changes count, needs `.against()`, and stores no
|
|
176
|
+
* baseline. Left unset, the project's fidelity is used.
|
|
177
|
+
*/
|
|
178
|
+
fidelity(value) {
|
|
179
|
+
this.manifest.fidelity = value;
|
|
180
|
+
return this;
|
|
181
|
+
}
|
|
173
182
|
/**
|
|
174
183
|
* Compiles the manifest and triggers the API.
|
|
175
184
|
*/
|
|
@@ -193,7 +202,8 @@ class JobBuilder {
|
|
|
193
202
|
autoApprove: this.manifest.autoApprove,
|
|
194
203
|
masks: this.manifest.masks,
|
|
195
204
|
customCss: this.manifest.customCss,
|
|
196
|
-
runContext: this.manifest.runContext
|
|
205
|
+
runContext: this.manifest.runContext,
|
|
206
|
+
fidelity: this.manifest.fidelity
|
|
197
207
|
};
|
|
198
208
|
const res = await this.sdk._request('/crawl', 'POST', payload);
|
|
199
209
|
return new JobHandle(this.sdk, res.jobId);
|
package/dist/types.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export interface ProjectConfig {
|
|
|
47
47
|
masks?: string[];
|
|
48
48
|
/** CSS injected before screenshotting, to hide dynamic widgets. Max 4096 characters. */
|
|
49
49
|
customCss?: string;
|
|
50
|
+
/** `low` when the project captures in low fidelity by default. Absent means high. */
|
|
51
|
+
fidelity?: 'low';
|
|
50
52
|
/** Presence flag only — the stored credential is never returned. */
|
|
51
53
|
testAuth?: {
|
|
52
54
|
configured: true;
|
|
@@ -130,6 +132,12 @@ export interface ProjectConfigUpdate {
|
|
|
130
132
|
masks?: string[];
|
|
131
133
|
/** Max 4096 characters. */
|
|
132
134
|
customCss?: string;
|
|
135
|
+
/**
|
|
136
|
+
* The fidelity this project's runs capture at unless a run says otherwise. `high`
|
|
137
|
+
* (default) clears it. `low` needs the project's `baseOrigin`. Low fidelity stores no
|
|
138
|
+
* baseline, so changing it invalidates nothing.
|
|
139
|
+
*/
|
|
140
|
+
fidelity?: 'low' | 'high';
|
|
133
141
|
/** Credentials for the test origin's environment gate. Pass null to clear. */
|
|
134
142
|
testAuth?: EnvGate | null;
|
|
135
143
|
/** Credentials for the base origin's environment gate. Pass null to clear. */
|
|
@@ -382,6 +390,12 @@ export interface PageResult {
|
|
|
382
390
|
url: string;
|
|
383
391
|
/** Whether the capture and comparison succeeded. */
|
|
384
392
|
status: 'SUCCESS' | 'ERROR';
|
|
393
|
+
/**
|
|
394
|
+
* `low` on a low-fidelity result: no screenshot was taken, and only content changes
|
|
395
|
+
* count. `currentUrl` and `baselineUrl` are pictures drawn from the page copies on a
|
|
396
|
+
* changed page, and null otherwise. Absent means high.
|
|
397
|
+
*/
|
|
398
|
+
fidelity?: 'low';
|
|
385
399
|
/** Device variant tested (e.g. "Desktop Chrome", "iPhone 12"). */
|
|
386
400
|
variantName: string;
|
|
387
401
|
/**
|
|
@@ -517,6 +531,10 @@ export interface JobStatus {
|
|
|
517
531
|
intentProvided: boolean;
|
|
518
532
|
/** Whether this run compared two live origins or one origin against a stored baseline. */
|
|
519
533
|
comparisonMode?: 'live-vs-live' | 'managed';
|
|
534
|
+
/** `low` on a low-fidelity run. Absent means high. */
|
|
535
|
+
fidelity?: 'low';
|
|
536
|
+
/** On a low-fidelity run: what it compared and what it did not look at. Quote it with a quiet result. */
|
|
537
|
+
scopeNote?: string;
|
|
520
538
|
/** Page-checks the run made, and how many finished. Mirrors `progress`. */
|
|
521
539
|
totalUrls?: number;
|
|
522
540
|
completedCount?: number;
|
|
@@ -529,6 +547,10 @@ export interface JobSummary {
|
|
|
529
547
|
environment?: string;
|
|
530
548
|
/** Live-vs-live runs only: the environment of the base origin. Absent otherwise. */
|
|
531
549
|
baseEnvironment?: string;
|
|
550
|
+
/** `low` on a low-fidelity run. Absent means high. */
|
|
551
|
+
fidelity?: 'low';
|
|
552
|
+
/** On a low-fidelity run: what it compared and what it did not look at. Quote it with a quiet result. */
|
|
553
|
+
scopeNote?: string;
|
|
532
554
|
/** getSummary() throws until the job reaches one of these. */
|
|
533
555
|
status: 'COMPLETED' | 'APPROVED' | 'RESOLVED' | 'FAILED';
|
|
534
556
|
summaryStatus: SummaryStatus;
|
|
@@ -562,12 +584,18 @@ export interface JobSummary {
|
|
|
562
584
|
errorMessage: string;
|
|
563
585
|
}>;
|
|
564
586
|
/**
|
|
565
|
-
* An AI summary of the whole run
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
* record; this is a reading of them.
|
|
587
|
+
* An AI summary of the whole run as one paragraph, written once when the run finished
|
|
588
|
+
* from the exact edits in `regressions`. Null when nothing changed or none could be
|
|
589
|
+
* written. The changes are the record; this is a reading of them.
|
|
569
590
|
*/
|
|
570
591
|
runSummary: string | null;
|
|
592
|
+
/**
|
|
593
|
+
* The same summary as a list: one short sentence per change, at most four, the change
|
|
594
|
+
* on the most pages first. This is what opens the scheduled-run email and the
|
|
595
|
+
* dashboard's run view. Null exactly when `runSummary` is. A run summarized before this
|
|
596
|
+
* field existed has one point, its paragraph.
|
|
597
|
+
*/
|
|
598
|
+
runSummaryPoints: string[] | null;
|
|
571
599
|
/** Whole-job roll-up of how the changes line up with the run's stated intent. */
|
|
572
600
|
intentAssessment: IntentAssessment;
|
|
573
601
|
/** The intent this run was given, echoed back. */
|
package/package.json
CHANGED