@regressionbot/sdk 2.4.0 → 2.5.1
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 +16 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/types.d.ts +12 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,6 +74,22 @@ the builder, intent-aware verdicts, environment gates, baseline policies, and
|
|
|
74
74
|
scheduling. `scheduleHourUtc` needs API 2.7.0 or later — on an older API the
|
|
75
75
|
field is accepted and ignored, and the schedule stays anchored to its first run.
|
|
76
76
|
|
|
77
|
+
### 2.5.1
|
|
78
|
+
|
|
79
|
+
- **`ProjectConfig.aiPromptInstructions` and `aiSummaryThreshold` are now marked
|
|
80
|
+
`@deprecated`.** The API itself has deprecated both — DOM-engine results (2026-09-28 on)
|
|
81
|
+
never read `aiPromptInstructions`, and are summarised whenever they changed regardless of
|
|
82
|
+
`aiSummaryThreshold`. Both are still typed and still round-trip; only the doc comments
|
|
83
|
+
changed.
|
|
84
|
+
|
|
85
|
+
### 2.5.0
|
|
86
|
+
|
|
87
|
+
- **`updateProject()` now returns `baselinesInvalidated`.** The API has always sent it
|
|
88
|
+
back alongside the updated project; the 2.0 unwrap kept the project and dropped it, so
|
|
89
|
+
a caller had to re-derive whether a patch invalidated baselines from which fields they
|
|
90
|
+
sent. Read it directly instead — true only when this patch discarded baselines that
|
|
91
|
+
existed, never on a create.
|
|
92
|
+
|
|
77
93
|
### 2.4.0
|
|
78
94
|
|
|
79
95
|
Needs API 2.9.0 or later. On an older API the new fields are simply absent.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VRConfig, Viewport, Viewports, JobStatus, JobSummary, JobProgress, PageResult, ProjectConfig, ProjectPath, ProjectScan, JobAiSummary, RegionVerdict, ResultVerdict, VerdictDecision, RegressionbotSummaryItem, RunContext, IntentAssessment, BaselinePolicy, ProjectSchedule, ProjectConfigUpdate, EnvGate, SummaryStatus, ApproveResult, ApproveWhere, Change, ChangeType, StyleDelta, ChangeBox } from './types';
|
|
1
|
+
import { VRConfig, Viewport, Viewports, JobStatus, JobSummary, JobProgress, PageResult, ProjectConfig, ProjectPath, ProjectScan, JobAiSummary, RegionVerdict, ResultVerdict, VerdictDecision, RegressionbotSummaryItem, RunContext, IntentAssessment, BaselinePolicy, ProjectSchedule, ProjectConfigUpdate, ProjectUpdateResult, EnvGate, SummaryStatus, ApproveResult, ApproveWhere, Change, ChangeType, StyleDelta, ChangeBox } from './types';
|
|
2
2
|
import { sanitizeFilename, sanitizeUrlToPath } from './security';
|
|
3
3
|
export { sanitizeFilename, sanitizeUrlToPath, Viewports };
|
|
4
|
-
export type { PageResult, JobProgress, JobStatus, JobSummary, Viewport, VRConfig, ProjectConfig, ProjectPath, ProjectScan, JobAiSummary, RegionVerdict, ResultVerdict, VerdictDecision, RegressionbotSummaryItem, RunContext, IntentAssessment, BaselinePolicy, ProjectSchedule, ProjectConfigUpdate, EnvGate, SummaryStatus, ApproveResult, ApproveWhere, Change, ChangeType, StyleDelta, ChangeBox };
|
|
4
|
+
export type { PageResult, JobProgress, JobStatus, JobSummary, Viewport, VRConfig, ProjectConfig, ProjectPath, ProjectScan, JobAiSummary, RegionVerdict, ResultVerdict, VerdictDecision, RegressionbotSummaryItem, RunContext, IntentAssessment, BaselinePolicy, ProjectSchedule, ProjectConfigUpdate, ProjectUpdateResult, EnvGate, SummaryStatus, ApproveResult, ApproveWhere, Change, ChangeType, StyleDelta, ChangeBox };
|
|
5
5
|
export declare class RegressionBot {
|
|
6
6
|
private apiKey;
|
|
7
7
|
private apiUrl;
|
|
@@ -57,7 +57,7 @@ export declare class RegressionBot {
|
|
|
57
57
|
* Changing anything that decides what a capture looks like invalidates the
|
|
58
58
|
* stored baselines — see {@link ProjectConfigUpdate}.
|
|
59
59
|
*/
|
|
60
|
-
updateProject(projectName: string, config: ProjectConfigUpdate): Promise<
|
|
60
|
+
updateProject(projectName: string, config: ProjectConfigUpdate): Promise<ProjectUpdateResult>;
|
|
61
61
|
_request<T>(path: string, method?: string, body?: any): Promise<T>;
|
|
62
62
|
}
|
|
63
63
|
export declare class JobBuilder {
|
package/dist/index.js
CHANGED
|
@@ -64,9 +64,9 @@ class RegressionBot {
|
|
|
64
64
|
* stored baselines — see {@link ProjectConfigUpdate}.
|
|
65
65
|
*/
|
|
66
66
|
async updateProject(projectName, config) {
|
|
67
|
-
// The API wraps the updated project in { message, project }.
|
|
67
|
+
// The API wraps the updated project in { message, baselinesInvalidated, project }.
|
|
68
68
|
const res = await this._request(`/project/${encodeURIComponent(projectName)}`, 'PUT', config);
|
|
69
|
-
return res.project;
|
|
69
|
+
return { ...res.project, baselinesInvalidated: res.baselinesInvalidated };
|
|
70
70
|
}
|
|
71
71
|
// Internal fetch wrapper
|
|
72
72
|
async _request(path, method = 'GET', body) {
|
package/dist/types.d.ts
CHANGED
|
@@ -57,9 +57,9 @@ export interface ProjectConfig {
|
|
|
57
57
|
};
|
|
58
58
|
/** Pages captured in parallel, 1–20. Absent means the API's default of 4. */
|
|
59
59
|
concurrency?: number;
|
|
60
|
-
/**
|
|
60
|
+
/** @deprecated Fed only the screenshot-reading AI, which DOM-engine results (2026-09-28 on) never reach. No longer in the dashboard. */
|
|
61
61
|
aiPromptInstructions?: string;
|
|
62
|
-
/**
|
|
62
|
+
/** @deprecated DOM-engine results (2026-09-28 on) are summarised whenever they changed, so this floor only affects older results. */
|
|
63
63
|
aiSummaryThreshold?: number;
|
|
64
64
|
/**
|
|
65
65
|
* `approved` (default): a person accepts a run and its captures become the baseline.
|
|
@@ -98,6 +98,14 @@ export interface ProjectConfig {
|
|
|
98
98
|
baselineVersion?: string;
|
|
99
99
|
baselineInvalidatedAt?: string;
|
|
100
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* What updateProject() returns: the saved config plus whether this patch
|
|
103
|
+
* discarded the stored baselines, so a caller does not have to re-derive that
|
|
104
|
+
* from which fields they sent. Never true on a create.
|
|
105
|
+
*/
|
|
106
|
+
export interface ProjectUpdateResult extends ProjectConfig {
|
|
107
|
+
baselinesInvalidated: boolean;
|
|
108
|
+
}
|
|
101
109
|
/**
|
|
102
110
|
* The fields updateProject() accepts.
|
|
103
111
|
*
|
|
@@ -126,8 +134,9 @@ export interface ProjectConfigUpdate {
|
|
|
126
134
|
* take the API's default of 4 — the load lands on the site being captured.
|
|
127
135
|
*/
|
|
128
136
|
concurrency?: number;
|
|
129
|
-
/** Max 1000 characters. */
|
|
137
|
+
/** @deprecated Fed only the screenshot-reading AI, which DOM-engine results (2026-09-28 on) never reach. No longer in the dashboard. Max 1000 characters. */
|
|
130
138
|
aiPromptInstructions?: string;
|
|
139
|
+
/** @deprecated DOM-engine results (2026-09-28 on) are summarised whenever they changed, so this floor only affects older results. */
|
|
131
140
|
aiSummaryThreshold?: number;
|
|
132
141
|
baselinePolicy?: BaselinePolicy;
|
|
133
142
|
/**
|
package/package.json
CHANGED