@regressionbot/sdk 1.2.2 → 1.2.3
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 +5 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -0
- package/dist/types.d.ts +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,11 @@ The official SDK for [RegressionBot.com](https://regressionbot.com) — the simp
|
|
|
4
4
|
|
|
5
5
|
RegressionBot is a declarative visual regression testing platform that helps you catch UI changes before they reach production. This SDK provides a fluent, chainable API to define your test scope, run visual tests, and manage baselines programmatically.
|
|
6
6
|
|
|
7
|
+
[](https://regressionbot.com/docs)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
|
|
7
12
|
## Why RegressionBot?
|
|
8
13
|
|
|
9
14
|
Unlike traditional visual diffing libraries, RegressionBot is designed for modern, automated development loops and agentic pipelines:
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,10 @@ export declare class RegressionBot {
|
|
|
43
43
|
concurrency?: number;
|
|
44
44
|
autoApprove?: boolean;
|
|
45
45
|
}): Promise<JobHandle>;
|
|
46
|
+
/**
|
|
47
|
+
* Update the configuration settings for a named project.
|
|
48
|
+
*/
|
|
49
|
+
updateProject(projectName: string, config: Partial<ProjectConfig>): Promise<ProjectConfig>;
|
|
46
50
|
_request<T>(path: string, method?: string, body?: any): Promise<T>;
|
|
47
51
|
}
|
|
48
52
|
export declare class JobBuilder {
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,12 @@ class RegressionBot {
|
|
|
53
53
|
const res = await this._request(`/project/${encodeURIComponent(projectName)}/run`, 'POST', options);
|
|
54
54
|
return new JobHandle(this, res.jobId);
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Update the configuration settings for a named project.
|
|
58
|
+
*/
|
|
59
|
+
async updateProject(projectName, config) {
|
|
60
|
+
return this._request(`/project/${encodeURIComponent(projectName)}`, 'PUT', config);
|
|
61
|
+
}
|
|
56
62
|
// Internal fetch wrapper
|
|
57
63
|
async _request(path, method = 'GET', body) {
|
|
58
64
|
const headers = {
|
package/dist/types.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ export declare const Viewports: {
|
|
|
52
52
|
readonly height: 667;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
+
export interface RegressionbotSummaryItem {
|
|
56
|
+
label: string;
|
|
57
|
+
text: string;
|
|
58
|
+
}
|
|
55
59
|
/**
|
|
56
60
|
* Result for a single URL + device comparison.
|
|
57
61
|
*
|
|
@@ -70,7 +74,7 @@ export interface PageResult {
|
|
|
70
74
|
/** Perceptual similarity 0-100 (SSIM). */
|
|
71
75
|
visualMatchScore: number;
|
|
72
76
|
/** Plain-English description of what visually changed, generated by RegressionBot. */
|
|
73
|
-
regressionbotSummary?:
|
|
77
|
+
regressionbotSummary?: RegressionbotSummaryItem[];
|
|
74
78
|
/** Pre-signed URL for the stored baseline screenshot. */
|
|
75
79
|
baselineUrl?: string;
|
|
76
80
|
/** Pre-signed URL for the newly captured screenshot. */
|
|
@@ -130,6 +134,6 @@ export interface JobAiSummary {
|
|
|
130
134
|
summaries: Array<{
|
|
131
135
|
url: string;
|
|
132
136
|
variantName: string;
|
|
133
|
-
regressionbotSummary:
|
|
137
|
+
regressionbotSummary: RegressionbotSummaryItem[];
|
|
134
138
|
}>;
|
|
135
139
|
}
|
package/package.json
CHANGED