@vizzly-testing/cli 0.16.0 → 0.16.2
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/client/index.js +21 -4
- package/dist/reporter/reporter-bundle.css +1 -1
- package/dist/reporter/reporter-bundle.iife.js +14 -14
- package/dist/sdk/index.js +6 -6
- package/dist/server/handlers/tdd-handler.js +13 -6
- package/dist/services/test-runner.js +0 -8
- package/dist/services/uploader.js +1 -1
- package/dist/types/client.d.ts +88 -0
- package/dist/types/config.d.ts +29 -0
- package/dist/types/index.d.ts +426 -9
- package/dist/types/sdk.d.ts +146 -0
- package/dist/utils/config-helpers.js +2 -2
- package/package.json +24 -7
- package/dist/types/cli.d.ts +0 -2
- package/dist/types/client/index.d.ts +0 -80
- package/dist/types/commands/doctor.d.ts +0 -11
- package/dist/types/commands/finalize.d.ts +0 -13
- package/dist/types/commands/init.d.ts +0 -32
- package/dist/types/commands/login.d.ts +0 -11
- package/dist/types/commands/logout.d.ts +0 -11
- package/dist/types/commands/project.d.ts +0 -28
- package/dist/types/commands/run.d.ts +0 -16
- package/dist/types/commands/status.d.ts +0 -13
- package/dist/types/commands/tdd-daemon.d.ts +0 -24
- package/dist/types/commands/tdd.d.ts +0 -17
- package/dist/types/commands/upload.d.ts +0 -13
- package/dist/types/commands/whoami.d.ts +0 -11
- package/dist/types/errors/vizzly-error.d.ts +0 -75
- package/dist/types/plugin-loader.d.ts +0 -7
- package/dist/types/reporter/src/api/client.d.ts +0 -178
- package/dist/types/reporter/src/components/app-router.d.ts +0 -1
- package/dist/types/reporter/src/components/code-block.d.ts +0 -4
- package/dist/types/reporter/src/components/comparison/comparison-actions.d.ts +0 -5
- package/dist/types/reporter/src/components/comparison/comparison-card.d.ts +0 -7
- package/dist/types/reporter/src/components/comparison/comparison-group.d.ts +0 -10
- package/dist/types/reporter/src/components/comparison/comparison-list.d.ts +0 -6
- package/dist/types/reporter/src/components/comparison/comparison-modes/onion-skin-mode.d.ts +0 -10
- package/dist/types/reporter/src/components/comparison/comparison-modes/overlay-mode.d.ts +0 -11
- package/dist/types/reporter/src/components/comparison/comparison-modes/shared/base-comparison-mode.d.ts +0 -14
- package/dist/types/reporter/src/components/comparison/comparison-modes/shared/image-renderer.d.ts +0 -30
- package/dist/types/reporter/src/components/comparison/comparison-modes/toggle-view.d.ts +0 -8
- package/dist/types/reporter/src/components/comparison/comparison-viewer.d.ts +0 -8
- package/dist/types/reporter/src/components/comparison/fullscreen-viewer.d.ts +0 -13
- package/dist/types/reporter/src/components/comparison/screenshot-display.d.ts +0 -16
- package/dist/types/reporter/src/components/comparison/screenshot-list.d.ts +0 -9
- package/dist/types/reporter/src/components/comparison/variant-selector.d.ts +0 -9
- package/dist/types/reporter/src/components/comparison/view-mode-selector.d.ts +0 -4
- package/dist/types/reporter/src/components/dashboard/dashboard-filters.d.ts +0 -16
- package/dist/types/reporter/src/components/design-system/alert.d.ts +0 -9
- package/dist/types/reporter/src/components/design-system/badge.d.ts +0 -17
- package/dist/types/reporter/src/components/design-system/button.d.ts +0 -19
- package/dist/types/reporter/src/components/design-system/card.d.ts +0 -31
- package/dist/types/reporter/src/components/design-system/empty-state.d.ts +0 -13
- package/dist/types/reporter/src/components/design-system/form-controls.d.ts +0 -44
- package/dist/types/reporter/src/components/design-system/health-ring.d.ts +0 -7
- package/dist/types/reporter/src/components/design-system/index.d.ts +0 -11
- package/dist/types/reporter/src/components/design-system/modal.d.ts +0 -10
- package/dist/types/reporter/src/components/design-system/skeleton.d.ts +0 -19
- package/dist/types/reporter/src/components/design-system/spinner.d.ts +0 -10
- package/dist/types/reporter/src/components/design-system/tabs.d.ts +0 -13
- package/dist/types/reporter/src/components/layout/header.d.ts +0 -5
- package/dist/types/reporter/src/components/layout/index.d.ts +0 -2
- package/dist/types/reporter/src/components/layout/layout.d.ts +0 -6
- package/dist/types/reporter/src/components/ui/smart-image.d.ts +0 -7
- package/dist/types/reporter/src/components/ui/toast.d.ts +0 -4
- package/dist/types/reporter/src/components/views/builds-view.d.ts +0 -1
- package/dist/types/reporter/src/components/views/comparison-detail-view.d.ts +0 -5
- package/dist/types/reporter/src/components/views/comparisons-view.d.ts +0 -5
- package/dist/types/reporter/src/components/views/projects-view.d.ts +0 -1
- package/dist/types/reporter/src/components/views/settings-view.d.ts +0 -1
- package/dist/types/reporter/src/components/views/stats-view.d.ts +0 -1
- package/dist/types/reporter/src/components/waiting-for-screenshots.d.ts +0 -1
- package/dist/types/reporter/src/hooks/queries/use-auth-queries.d.ts +0 -15
- package/dist/types/reporter/src/hooks/queries/use-cloud-queries.d.ts +0 -6
- package/dist/types/reporter/src/hooks/queries/use-config-queries.d.ts +0 -6
- package/dist/types/reporter/src/hooks/queries/use-tdd-queries.d.ts +0 -9
- package/dist/types/reporter/src/hooks/use-comparison-filters.d.ts +0 -20
- package/dist/types/reporter/src/hooks/use-image-loader.d.ts +0 -1
- package/dist/types/reporter/src/lib/query-client.d.ts +0 -2
- package/dist/types/reporter/src/lib/query-keys.d.ts +0 -13
- package/dist/types/reporter/src/main.d.ts +0 -1
- package/dist/types/reporter/src/services/api-client.d.ts +0 -11
- package/dist/types/reporter/src/utils/comparison-helpers.d.ts +0 -16
- package/dist/types/reporter/src/utils/constants.d.ts +0 -37
- package/dist/types/reporter/vite.config.d.ts +0 -2
- package/dist/types/reporter/vite.dev.config.d.ts +0 -2
- package/dist/types/sdk/index.d.ts +0 -110
- package/dist/types/server/handlers/api-handler.d.ts +0 -88
- package/dist/types/server/handlers/tdd-handler.d.ts +0 -162
- package/dist/types/server/http-server.d.ts +0 -6
- package/dist/types/server/middleware/cors.d.ts +0 -11
- package/dist/types/server/middleware/json-parser.d.ts +0 -10
- package/dist/types/server/middleware/response.d.ts +0 -50
- package/dist/types/server/routers/assets.d.ts +0 -6
- package/dist/types/server/routers/auth.d.ts +0 -9
- package/dist/types/server/routers/baseline.d.ts +0 -13
- package/dist/types/server/routers/cloud-proxy.d.ts +0 -11
- package/dist/types/server/routers/config.d.ts +0 -9
- package/dist/types/server/routers/dashboard.d.ts +0 -6
- package/dist/types/server/routers/health.d.ts +0 -11
- package/dist/types/server/routers/projects.d.ts +0 -9
- package/dist/types/server/routers/screenshot.d.ts +0 -11
- package/dist/types/services/api-service.d.ts +0 -121
- package/dist/types/services/auth-service.d.ts +0 -59
- package/dist/types/services/build-manager.d.ts +0 -69
- package/dist/types/services/config-service.d.ts +0 -97
- package/dist/types/services/html-report-generator.d.ts +0 -52
- package/dist/types/services/index.d.ts +0 -7
- package/dist/types/services/project-service.d.ts +0 -105
- package/dist/types/services/report-generator/viewer.d.ts +0 -0
- package/dist/types/services/screenshot-server.d.ts +0 -10
- package/dist/types/services/server-manager.d.ts +0 -269
- package/dist/types/services/static-report-generator.d.ts +0 -25
- package/dist/types/services/tdd-service.d.ts +0 -122
- package/dist/types/services/test-runner.d.ts +0 -31
- package/dist/types/services/uploader.d.ts +0 -36
- package/dist/types/utils/browser.d.ts +0 -6
- package/dist/types/utils/build-history.d.ts +0 -16
- package/dist/types/utils/ci-env.d.ts +0 -55
- package/dist/types/utils/colors.d.ts +0 -12
- package/dist/types/utils/config-helpers.d.ts +0 -6
- package/dist/types/utils/config-loader.d.ts +0 -25
- package/dist/types/utils/config-schema.d.ts +0 -51
- package/dist/types/utils/environment-config.d.ts +0 -59
- package/dist/types/utils/environment.d.ts +0 -36
- package/dist/types/utils/fetch-utils.d.ts +0 -1
- package/dist/types/utils/file-helpers.d.ts +0 -18
- package/dist/types/utils/git.d.ts +0 -56
- package/dist/types/utils/global-config.d.ts +0 -84
- package/dist/types/utils/image-input-detector.d.ts +0 -71
- package/dist/types/utils/output.d.ts +0 -84
- package/dist/types/utils/package-info.d.ts +0 -15
- package/dist/types/utils/security.d.ts +0 -30
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
export class ServerManager {
|
|
2
|
-
constructor(config: any, options?: {});
|
|
3
|
-
config: any;
|
|
4
|
-
httpServer: {
|
|
5
|
-
start: () => Promise<any>;
|
|
6
|
-
stop: () => Promise<any>;
|
|
7
|
-
finishBuild: (_buildId: any) => Promise<any>;
|
|
8
|
-
getServer: () => any;
|
|
9
|
-
};
|
|
10
|
-
handler: {
|
|
11
|
-
initialize: () => Promise<void>;
|
|
12
|
-
handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
|
|
13
|
-
statusCode: number;
|
|
14
|
-
body: {
|
|
15
|
-
error: string;
|
|
16
|
-
details: any;
|
|
17
|
-
tddMode: boolean;
|
|
18
|
-
originalPath?: undefined;
|
|
19
|
-
filePath?: undefined;
|
|
20
|
-
receivedType?: undefined;
|
|
21
|
-
comparison?: undefined;
|
|
22
|
-
status?: undefined;
|
|
23
|
-
message?: undefined;
|
|
24
|
-
success?: undefined;
|
|
25
|
-
};
|
|
26
|
-
} | {
|
|
27
|
-
statusCode: number;
|
|
28
|
-
body: {
|
|
29
|
-
error: string;
|
|
30
|
-
originalPath: any;
|
|
31
|
-
tddMode: boolean;
|
|
32
|
-
details?: undefined;
|
|
33
|
-
filePath?: undefined;
|
|
34
|
-
receivedType?: undefined;
|
|
35
|
-
comparison?: undefined;
|
|
36
|
-
status?: undefined;
|
|
37
|
-
message?: undefined;
|
|
38
|
-
success?: undefined;
|
|
39
|
-
};
|
|
40
|
-
} | {
|
|
41
|
-
statusCode: number;
|
|
42
|
-
body: {
|
|
43
|
-
error: string;
|
|
44
|
-
filePath: any;
|
|
45
|
-
tddMode: boolean;
|
|
46
|
-
details?: undefined;
|
|
47
|
-
originalPath?: undefined;
|
|
48
|
-
receivedType?: undefined;
|
|
49
|
-
comparison?: undefined;
|
|
50
|
-
status?: undefined;
|
|
51
|
-
message?: undefined;
|
|
52
|
-
success?: undefined;
|
|
53
|
-
};
|
|
54
|
-
} | {
|
|
55
|
-
statusCode: number;
|
|
56
|
-
body: {
|
|
57
|
-
error: string;
|
|
58
|
-
tddMode: boolean;
|
|
59
|
-
details?: undefined;
|
|
60
|
-
originalPath?: undefined;
|
|
61
|
-
filePath?: undefined;
|
|
62
|
-
receivedType?: undefined;
|
|
63
|
-
comparison?: undefined;
|
|
64
|
-
status?: undefined;
|
|
65
|
-
message?: undefined;
|
|
66
|
-
success?: undefined;
|
|
67
|
-
};
|
|
68
|
-
} | {
|
|
69
|
-
statusCode: number;
|
|
70
|
-
body: {
|
|
71
|
-
error: string;
|
|
72
|
-
receivedType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
73
|
-
tddMode: boolean;
|
|
74
|
-
details?: undefined;
|
|
75
|
-
originalPath?: undefined;
|
|
76
|
-
filePath?: undefined;
|
|
77
|
-
comparison?: undefined;
|
|
78
|
-
status?: undefined;
|
|
79
|
-
message?: undefined;
|
|
80
|
-
success?: undefined;
|
|
81
|
-
};
|
|
82
|
-
} | {
|
|
83
|
-
statusCode: number;
|
|
84
|
-
body: {
|
|
85
|
-
error: string;
|
|
86
|
-
details: string;
|
|
87
|
-
comparison: {
|
|
88
|
-
name: any;
|
|
89
|
-
status: string;
|
|
90
|
-
baseline: any;
|
|
91
|
-
current: any;
|
|
92
|
-
diff: any;
|
|
93
|
-
diffPercentage: any;
|
|
94
|
-
threshold: any;
|
|
95
|
-
};
|
|
96
|
-
tddMode: boolean;
|
|
97
|
-
originalPath?: undefined;
|
|
98
|
-
filePath?: undefined;
|
|
99
|
-
receivedType?: undefined;
|
|
100
|
-
status?: undefined;
|
|
101
|
-
message?: undefined;
|
|
102
|
-
success?: undefined;
|
|
103
|
-
};
|
|
104
|
-
} | {
|
|
105
|
-
statusCode: number;
|
|
106
|
-
body: {
|
|
107
|
-
status: string;
|
|
108
|
-
message: string;
|
|
109
|
-
comparison: {
|
|
110
|
-
name: any;
|
|
111
|
-
status: string;
|
|
112
|
-
baseline: any;
|
|
113
|
-
current: any;
|
|
114
|
-
diff?: undefined;
|
|
115
|
-
diffPercentage?: undefined;
|
|
116
|
-
threshold?: undefined;
|
|
117
|
-
};
|
|
118
|
-
tddMode: boolean;
|
|
119
|
-
error?: undefined;
|
|
120
|
-
details?: undefined;
|
|
121
|
-
originalPath?: undefined;
|
|
122
|
-
filePath?: undefined;
|
|
123
|
-
receivedType?: undefined;
|
|
124
|
-
success?: undefined;
|
|
125
|
-
};
|
|
126
|
-
} | {
|
|
127
|
-
statusCode: number;
|
|
128
|
-
body: {
|
|
129
|
-
success: boolean;
|
|
130
|
-
comparison: {
|
|
131
|
-
name: any;
|
|
132
|
-
status: string;
|
|
133
|
-
baseline?: undefined;
|
|
134
|
-
current?: undefined;
|
|
135
|
-
diff?: undefined;
|
|
136
|
-
diffPercentage?: undefined;
|
|
137
|
-
threshold?: undefined;
|
|
138
|
-
};
|
|
139
|
-
tddMode: boolean;
|
|
140
|
-
error?: undefined;
|
|
141
|
-
details?: undefined;
|
|
142
|
-
originalPath?: undefined;
|
|
143
|
-
filePath?: undefined;
|
|
144
|
-
receivedType?: undefined;
|
|
145
|
-
status?: undefined;
|
|
146
|
-
message?: undefined;
|
|
147
|
-
};
|
|
148
|
-
}>;
|
|
149
|
-
getResults: () => Promise<{
|
|
150
|
-
total: number;
|
|
151
|
-
passed: number;
|
|
152
|
-
failed: number;
|
|
153
|
-
new: number;
|
|
154
|
-
errors: number;
|
|
155
|
-
comparisons: any[];
|
|
156
|
-
baseline: any;
|
|
157
|
-
}>;
|
|
158
|
-
acceptBaseline: (comparisonId: any) => Promise<any>;
|
|
159
|
-
acceptAllBaselines: () => Promise<{
|
|
160
|
-
count: number;
|
|
161
|
-
}>;
|
|
162
|
-
resetBaselines: () => Promise<{
|
|
163
|
-
success: boolean;
|
|
164
|
-
deletedBaselines: number;
|
|
165
|
-
deletedCurrents: number;
|
|
166
|
-
deletedDiffs: number;
|
|
167
|
-
}>;
|
|
168
|
-
cleanup: () => void;
|
|
169
|
-
tddService: import("./tdd-service.js").TddService;
|
|
170
|
-
} | {
|
|
171
|
-
handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
|
|
172
|
-
statusCode: number;
|
|
173
|
-
body: {
|
|
174
|
-
success: boolean;
|
|
175
|
-
disabled: boolean;
|
|
176
|
-
count: number;
|
|
177
|
-
message: string;
|
|
178
|
-
error?: undefined;
|
|
179
|
-
originalPath?: undefined;
|
|
180
|
-
filePath?: undefined;
|
|
181
|
-
receivedType?: undefined;
|
|
182
|
-
name?: undefined;
|
|
183
|
-
};
|
|
184
|
-
} | {
|
|
185
|
-
statusCode: number;
|
|
186
|
-
body: {
|
|
187
|
-
error: string;
|
|
188
|
-
success?: undefined;
|
|
189
|
-
disabled?: undefined;
|
|
190
|
-
count?: undefined;
|
|
191
|
-
message?: undefined;
|
|
192
|
-
originalPath?: undefined;
|
|
193
|
-
filePath?: undefined;
|
|
194
|
-
receivedType?: undefined;
|
|
195
|
-
name?: undefined;
|
|
196
|
-
};
|
|
197
|
-
} | {
|
|
198
|
-
statusCode: number;
|
|
199
|
-
body: {
|
|
200
|
-
error: string;
|
|
201
|
-
originalPath: any;
|
|
202
|
-
success?: undefined;
|
|
203
|
-
disabled?: undefined;
|
|
204
|
-
count?: undefined;
|
|
205
|
-
message?: undefined;
|
|
206
|
-
filePath?: undefined;
|
|
207
|
-
receivedType?: undefined;
|
|
208
|
-
name?: undefined;
|
|
209
|
-
};
|
|
210
|
-
} | {
|
|
211
|
-
statusCode: number;
|
|
212
|
-
body: {
|
|
213
|
-
error: string;
|
|
214
|
-
filePath: any;
|
|
215
|
-
success?: undefined;
|
|
216
|
-
disabled?: undefined;
|
|
217
|
-
count?: undefined;
|
|
218
|
-
message?: undefined;
|
|
219
|
-
originalPath?: undefined;
|
|
220
|
-
receivedType?: undefined;
|
|
221
|
-
name?: undefined;
|
|
222
|
-
};
|
|
223
|
-
} | {
|
|
224
|
-
statusCode: number;
|
|
225
|
-
body: {
|
|
226
|
-
error: string;
|
|
227
|
-
receivedType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
228
|
-
success?: undefined;
|
|
229
|
-
disabled?: undefined;
|
|
230
|
-
count?: undefined;
|
|
231
|
-
message?: undefined;
|
|
232
|
-
originalPath?: undefined;
|
|
233
|
-
filePath?: undefined;
|
|
234
|
-
name?: undefined;
|
|
235
|
-
};
|
|
236
|
-
} | {
|
|
237
|
-
statusCode: number;
|
|
238
|
-
body: {
|
|
239
|
-
success: boolean;
|
|
240
|
-
name: any;
|
|
241
|
-
count: number;
|
|
242
|
-
disabled?: undefined;
|
|
243
|
-
message?: undefined;
|
|
244
|
-
error?: undefined;
|
|
245
|
-
originalPath?: undefined;
|
|
246
|
-
filePath?: undefined;
|
|
247
|
-
receivedType?: undefined;
|
|
248
|
-
};
|
|
249
|
-
}>;
|
|
250
|
-
getScreenshotCount: () => number;
|
|
251
|
-
flush: () => Promise<{
|
|
252
|
-
uploaded: number;
|
|
253
|
-
failed: number;
|
|
254
|
-
total: number;
|
|
255
|
-
}>;
|
|
256
|
-
cleanup: () => void;
|
|
257
|
-
};
|
|
258
|
-
services: any;
|
|
259
|
-
start(buildId?: any, tddMode?: boolean, setBaseline?: boolean): Promise<void>;
|
|
260
|
-
buildId: any;
|
|
261
|
-
tddMode: boolean;
|
|
262
|
-
setBaseline: boolean;
|
|
263
|
-
createApiService(): Promise<import("./api-service.js").ApiService>;
|
|
264
|
-
stop(): Promise<void>;
|
|
265
|
-
get server(): {
|
|
266
|
-
getScreenshotCount: (buildId: any) => any;
|
|
267
|
-
finishBuild: (buildId: any) => Promise<any>;
|
|
268
|
-
};
|
|
269
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export class StaticReportGenerator {
|
|
2
|
-
constructor(workingDir: any, config: any);
|
|
3
|
-
workingDir: any;
|
|
4
|
-
config: any;
|
|
5
|
-
reportDir: any;
|
|
6
|
-
reportPath: any;
|
|
7
|
-
/**
|
|
8
|
-
* Generate static HTML report with React reporter bundle
|
|
9
|
-
* @param {Object} reportData - Complete report data (same format as live dashboard)
|
|
10
|
-
* @returns {Promise<string>} Path to generated report
|
|
11
|
-
*/
|
|
12
|
-
generateReport(reportData: any): Promise<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Generate HTML template with embedded React app
|
|
15
|
-
* @param {Object} reportData - Report data to embed
|
|
16
|
-
* @returns {string} HTML content
|
|
17
|
-
*/
|
|
18
|
-
generateHtmlTemplate(reportData: any): string;
|
|
19
|
-
/**
|
|
20
|
-
* Generate a minimal HTML report when bundles are missing (fallback)
|
|
21
|
-
* @param {Object} reportData - Report data
|
|
22
|
-
* @returns {string} Minimal HTML content
|
|
23
|
-
*/
|
|
24
|
-
generateFallbackHtml(reportData: any): string;
|
|
25
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a new TDD service instance
|
|
3
|
-
*/
|
|
4
|
-
export function createTDDService(config: any, options?: {}): TddService;
|
|
5
|
-
export class TddService {
|
|
6
|
-
constructor(config: any, workingDir?: any, setBaseline?: boolean, authService?: any);
|
|
7
|
-
config: any;
|
|
8
|
-
setBaseline: boolean;
|
|
9
|
-
authService: any;
|
|
10
|
-
api: ApiService;
|
|
11
|
-
workingDir: string;
|
|
12
|
-
baselinePath: string;
|
|
13
|
-
currentPath: string;
|
|
14
|
-
diffPath: string;
|
|
15
|
-
baselineData: any;
|
|
16
|
-
comparisons: any[];
|
|
17
|
-
threshold: any;
|
|
18
|
-
downloadBaselines(environment?: string, branch?: any, buildId?: any, comparisonId?: any): Promise<any>;
|
|
19
|
-
/**
|
|
20
|
-
* Download hotspot data for screenshots from the cloud
|
|
21
|
-
* Hotspots identify regions that frequently change (timestamps, IDs, etc.)
|
|
22
|
-
* Used to filter out known dynamic content during comparisons
|
|
23
|
-
* @param {Array} screenshots - Array of screenshot objects with name property
|
|
24
|
-
*/
|
|
25
|
-
downloadHotspots(screenshots: any[]): Promise<void>;
|
|
26
|
-
hotspotData: any;
|
|
27
|
-
/**
|
|
28
|
-
* Load hotspot data from disk
|
|
29
|
-
* @returns {Object|null} Hotspot data keyed by screenshot name, or null if not available
|
|
30
|
-
*/
|
|
31
|
-
loadHotspots(): any | null;
|
|
32
|
-
/**
|
|
33
|
-
* Get hotspot analysis for a specific screenshot
|
|
34
|
-
* @param {string} screenshotName - Name of the screenshot
|
|
35
|
-
* @returns {Object|null} Hotspot analysis or null if not available
|
|
36
|
-
*/
|
|
37
|
-
getHotspotForScreenshot(screenshotName: string): any | null;
|
|
38
|
-
/**
|
|
39
|
-
* Calculate what percentage of diff falls within hotspot regions
|
|
40
|
-
* Uses 1D Y-coordinate matching (same algorithm as cloud)
|
|
41
|
-
* @param {Array} diffClusters - Array of diff clusters from honeydiff
|
|
42
|
-
* @param {Object} hotspotAnalysis - Hotspot data with regions array
|
|
43
|
-
* @returns {Object} Coverage info { coverage, linesInHotspots, totalLines }
|
|
44
|
-
*/
|
|
45
|
-
calculateHotspotCoverage(diffClusters: any[], hotspotAnalysis: any): any;
|
|
46
|
-
/**
|
|
47
|
-
* Download baselines using OAuth authentication
|
|
48
|
-
* Used when user is logged in via device flow but no API token is configured
|
|
49
|
-
* @param {string} buildId - Build ID to download from
|
|
50
|
-
* @param {string} organizationSlug - Organization slug
|
|
51
|
-
* @param {string} projectSlug - Project slug
|
|
52
|
-
* @param {Object} authService - Auth service for OAuth requests
|
|
53
|
-
* @returns {Promise<Object>} Download result
|
|
54
|
-
*/
|
|
55
|
-
downloadBaselinesWithAuth(buildId: string, organizationSlug: string, projectSlug: string, authService: any): Promise<any>;
|
|
56
|
-
/**
|
|
57
|
-
* Handle local baseline logic (either load existing or prepare for new baselines)
|
|
58
|
-
* @returns {Promise<Object|null>} Baseline data or null if no local baselines exist
|
|
59
|
-
*/
|
|
60
|
-
handleLocalBaselines(): Promise<any | null>;
|
|
61
|
-
loadBaseline(): Promise<any>;
|
|
62
|
-
compareScreenshot(name: any, imageBuffer: any, properties?: {}): Promise<{
|
|
63
|
-
id: any;
|
|
64
|
-
name: any;
|
|
65
|
-
status: string;
|
|
66
|
-
baseline: any;
|
|
67
|
-
current: any;
|
|
68
|
-
diff: any;
|
|
69
|
-
properties: any;
|
|
70
|
-
signature: string;
|
|
71
|
-
}>;
|
|
72
|
-
getResults(): {
|
|
73
|
-
total: number;
|
|
74
|
-
passed: number;
|
|
75
|
-
failed: number;
|
|
76
|
-
new: number;
|
|
77
|
-
errors: number;
|
|
78
|
-
comparisons: any[];
|
|
79
|
-
baseline: any;
|
|
80
|
-
};
|
|
81
|
-
printResults(): Promise<{
|
|
82
|
-
total: number;
|
|
83
|
-
passed: number;
|
|
84
|
-
failed: number;
|
|
85
|
-
new: number;
|
|
86
|
-
errors: number;
|
|
87
|
-
comparisons: any[];
|
|
88
|
-
baseline: any;
|
|
89
|
-
}>;
|
|
90
|
-
/**
|
|
91
|
-
* Generate HTML report for TDD results
|
|
92
|
-
* @param {Object} results - TDD comparison results
|
|
93
|
-
*/
|
|
94
|
-
generateHtmlReport(results: any): Promise<string>;
|
|
95
|
-
/**
|
|
96
|
-
* Open HTML report in default browser
|
|
97
|
-
* @param {string} reportPath - Path to HTML report
|
|
98
|
-
*/
|
|
99
|
-
openReport(reportPath: string): Promise<void>;
|
|
100
|
-
/**
|
|
101
|
-
* Update baselines with current screenshots (accept changes)
|
|
102
|
-
* @returns {number} Number of baselines updated
|
|
103
|
-
*/
|
|
104
|
-
updateBaselines(): number;
|
|
105
|
-
/**
|
|
106
|
-
* Create a new baseline (used during --set-baseline mode)
|
|
107
|
-
* @private
|
|
108
|
-
*/
|
|
109
|
-
private createNewBaseline;
|
|
110
|
-
/**
|
|
111
|
-
* Update a single baseline with current screenshot
|
|
112
|
-
* @private
|
|
113
|
-
*/
|
|
114
|
-
private updateSingleBaseline;
|
|
115
|
-
/**
|
|
116
|
-
* Accept a current screenshot as the new baseline
|
|
117
|
-
* @param {string|Object} idOrComparison - Comparison ID or comparison object
|
|
118
|
-
* @returns {Object} Result object
|
|
119
|
-
*/
|
|
120
|
-
acceptBaseline(idOrComparison: string | any): any;
|
|
121
|
-
}
|
|
122
|
-
import { ApiService } from '../services/api-service.js';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export class TestRunner {
|
|
2
|
-
constructor(config: any, buildManager: any, serverManager: any, tddService: any);
|
|
3
|
-
config: any;
|
|
4
|
-
buildManager: any;
|
|
5
|
-
serverManager: any;
|
|
6
|
-
tddService: any;
|
|
7
|
-
testProcess: any;
|
|
8
|
-
/**
|
|
9
|
-
* Initialize server for daemon mode (no test execution)
|
|
10
|
-
* @param {Object} options - Options for server initialization
|
|
11
|
-
*/
|
|
12
|
-
initialize(options: any): Promise<void>;
|
|
13
|
-
run(options: any): Promise<{
|
|
14
|
-
testsPassed: number;
|
|
15
|
-
testsFailed: number;
|
|
16
|
-
screenshotsCaptured: number;
|
|
17
|
-
buildId?: undefined;
|
|
18
|
-
url?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
buildId: any;
|
|
21
|
-
url: any;
|
|
22
|
-
testsPassed: number;
|
|
23
|
-
testsFailed: number;
|
|
24
|
-
screenshotsCaptured: number;
|
|
25
|
-
}>;
|
|
26
|
-
createBuild(options: any, tdd: any): Promise<any>;
|
|
27
|
-
createApiService(): Promise<import("./api-service.js").ApiService>;
|
|
28
|
-
finalizeBuild(buildId: any, isTddMode: any, success: any, executionTime: any): Promise<void>;
|
|
29
|
-
executeTestCommand(testCommand: any, env: any): Promise<any>;
|
|
30
|
-
cancel(): Promise<void>;
|
|
31
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a new uploader instance
|
|
3
|
-
*/
|
|
4
|
-
export function createUploader({ apiKey, apiUrl, userAgent, command, upload: uploadConfig }: {
|
|
5
|
-
apiKey: any;
|
|
6
|
-
apiUrl: any;
|
|
7
|
-
userAgent: any;
|
|
8
|
-
command: any;
|
|
9
|
-
upload?: {};
|
|
10
|
-
}, options?: {}): {
|
|
11
|
-
upload: ({ screenshotsDir, buildName, branch, commit, message, environment, threshold, pullRequestNumber, parallelId, onProgress, }: {
|
|
12
|
-
screenshotsDir: any;
|
|
13
|
-
buildName: any;
|
|
14
|
-
branch: any;
|
|
15
|
-
commit: any;
|
|
16
|
-
message: any;
|
|
17
|
-
environment?: string;
|
|
18
|
-
threshold: any;
|
|
19
|
-
pullRequestNumber: any;
|
|
20
|
-
parallelId: any;
|
|
21
|
-
onProgress?: () => void;
|
|
22
|
-
}) => Promise<{
|
|
23
|
-
success: boolean;
|
|
24
|
-
buildId: any;
|
|
25
|
-
url: any;
|
|
26
|
-
stats: {
|
|
27
|
-
total: number;
|
|
28
|
-
uploaded: any;
|
|
29
|
-
skipped: any;
|
|
30
|
-
};
|
|
31
|
-
}>;
|
|
32
|
-
waitForBuild: (buildId: any, timeout?: number) => Promise<{
|
|
33
|
-
status: string;
|
|
34
|
-
build: any;
|
|
35
|
-
}>;
|
|
36
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Archive a build to history directory
|
|
3
|
-
* @param {string} workingDir - Working directory
|
|
4
|
-
* @param {string} buildId - Build ID to archive
|
|
5
|
-
* @param {Array} builds - Build data
|
|
6
|
-
* @param {Array} comparisons - Comparison data
|
|
7
|
-
* @param {Object} summary - Summary stats
|
|
8
|
-
* @param {number} maxHistory - Maximum number of builds to keep (default: 3)
|
|
9
|
-
*/
|
|
10
|
-
export function archiveBuild(workingDir: string, buildId: string, builds: any[], comparisons: any[], summary: any, maxHistory?: number): void;
|
|
11
|
-
/**
|
|
12
|
-
* Get list of archived builds
|
|
13
|
-
* @param {string} workingDir - Working directory
|
|
14
|
-
* @returns {Array} Array of build metadata
|
|
15
|
-
*/
|
|
16
|
-
export function getArchivedBuilds(workingDir: string): any[];
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CI Environment Detection
|
|
3
|
-
*
|
|
4
|
-
* Generic functions to extract git and PR information from any CI provider
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Get the branch name from CI environment variables
|
|
8
|
-
* @returns {string|null} Branch name or null if not available
|
|
9
|
-
*/
|
|
10
|
-
export function getBranch(): string | null;
|
|
11
|
-
/**
|
|
12
|
-
* Get the commit SHA from CI environment variables
|
|
13
|
-
* @returns {string|null} Commit SHA or null if not available
|
|
14
|
-
*/
|
|
15
|
-
export function getCommit(): string | null;
|
|
16
|
-
/**
|
|
17
|
-
* Get the commit message from CI environment variables
|
|
18
|
-
* @returns {string|null} Commit message or null if not available
|
|
19
|
-
*/
|
|
20
|
-
export function getCommitMessage(): string | null;
|
|
21
|
-
/**
|
|
22
|
-
* Get the pull request number from CI environment variables
|
|
23
|
-
* @returns {number|null} PR number or null if not available/not a PR
|
|
24
|
-
*/
|
|
25
|
-
export function getPullRequestNumber(): number | null;
|
|
26
|
-
/**
|
|
27
|
-
* Get the PR head SHA from CI environment variables
|
|
28
|
-
* @returns {string|null} PR head SHA or null if not available
|
|
29
|
-
*/
|
|
30
|
-
export function getPullRequestHeadSha(): string | null;
|
|
31
|
-
/**
|
|
32
|
-
* Get the PR base SHA from CI environment variables
|
|
33
|
-
* @returns {string|null} PR base SHA or null if not available
|
|
34
|
-
*/
|
|
35
|
-
export function getPullRequestBaseSha(): string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Get the PR head ref (branch) from CI environment variables
|
|
38
|
-
* @returns {string|null} PR head ref or null if not available
|
|
39
|
-
*/
|
|
40
|
-
export function getPullRequestHeadRef(): string | null;
|
|
41
|
-
/**
|
|
42
|
-
* Get the PR base ref (target branch) from CI environment variables
|
|
43
|
-
* @returns {string|null} PR base ref or null if not available
|
|
44
|
-
*/
|
|
45
|
-
export function getPullRequestBaseRef(): string | null;
|
|
46
|
-
/**
|
|
47
|
-
* Check if we're currently in a pull request context
|
|
48
|
-
* @returns {boolean} True if in a PR context
|
|
49
|
-
*/
|
|
50
|
-
export function isPullRequest(): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Get the CI provider name
|
|
53
|
-
* @returns {string} CI provider name or 'unknown'
|
|
54
|
-
*/
|
|
55
|
-
export function getCIProvider(): string;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export function loadConfig(configPath?: any, cliOverrides?: {}): Promise<{
|
|
2
|
-
server: {
|
|
3
|
-
port: number;
|
|
4
|
-
timeout: number;
|
|
5
|
-
};
|
|
6
|
-
build: {
|
|
7
|
-
name: string;
|
|
8
|
-
environment: string;
|
|
9
|
-
};
|
|
10
|
-
upload: {
|
|
11
|
-
screenshotsDir: string;
|
|
12
|
-
batchSize: number;
|
|
13
|
-
timeout: number;
|
|
14
|
-
};
|
|
15
|
-
comparison: {
|
|
16
|
-
threshold: number;
|
|
17
|
-
};
|
|
18
|
-
tdd: {
|
|
19
|
-
openReport: boolean;
|
|
20
|
-
};
|
|
21
|
-
plugins: any[];
|
|
22
|
-
apiKey: any;
|
|
23
|
-
apiUrl: string;
|
|
24
|
-
}>;
|
|
25
|
-
export function getScreenshotPaths(config: any): any[];
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validate Vizzly configuration
|
|
3
|
-
* @param {unknown} config - Configuration to validate
|
|
4
|
-
* @returns {Object} Validated configuration
|
|
5
|
-
* @throws {ZodError} If validation fails
|
|
6
|
-
*/
|
|
7
|
-
export function validateVizzlyConfig(config: unknown): any;
|
|
8
|
-
/**
|
|
9
|
-
* Safely validate with defaults if config is missing
|
|
10
|
-
* @param {unknown} config - Configuration to validate (can be undefined)
|
|
11
|
-
* @returns {Object} Validated configuration with defaults
|
|
12
|
-
*/
|
|
13
|
-
export function validateVizzlyConfigWithDefaults(config: unknown): any;
|
|
14
|
-
/**
|
|
15
|
-
* Core Vizzly configuration schema
|
|
16
|
-
* Allows plugin-specific keys with passthrough for extensibility
|
|
17
|
-
*/
|
|
18
|
-
export let vizzlyConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
19
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
|
20
|
-
apiUrl: z.ZodOptional<z.ZodString>;
|
|
21
|
-
server: z.ZodDefault<z.ZodObject<{
|
|
22
|
-
port: z.ZodDefault<z.ZodNumber>;
|
|
23
|
-
timeout: z.ZodDefault<z.ZodNumber>;
|
|
24
|
-
}, z.core.$strip>>;
|
|
25
|
-
build: z.ZodDefault<z.ZodObject<{
|
|
26
|
-
name: z.ZodDefault<z.ZodString>;
|
|
27
|
-
environment: z.ZodDefault<z.ZodString>;
|
|
28
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
29
|
-
commit: z.ZodOptional<z.ZodString>;
|
|
30
|
-
message: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$strip>>;
|
|
32
|
-
upload: z.ZodDefault<z.ZodObject<{
|
|
33
|
-
screenshotsDir: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
34
|
-
batchSize: z.ZodDefault<z.ZodNumber>;
|
|
35
|
-
timeout: z.ZodDefault<z.ZodNumber>;
|
|
36
|
-
}, z.core.$strip>>;
|
|
37
|
-
comparison: z.ZodDefault<z.ZodObject<{
|
|
38
|
-
threshold: z.ZodDefault<z.ZodNumber>;
|
|
39
|
-
}, z.core.$strip>>;
|
|
40
|
-
tdd: z.ZodDefault<z.ZodObject<{
|
|
41
|
-
openReport: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
-
}, z.core.$strip>>;
|
|
43
|
-
plugins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
44
|
-
parallelId: z.ZodOptional<z.ZodString>;
|
|
45
|
-
baselineBuildId: z.ZodOptional<z.ZodString>;
|
|
46
|
-
baselineComparisonId: z.ZodOptional<z.ZodString>;
|
|
47
|
-
eager: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
-
wait: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
-
allowNoToken: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
}, z.core.$loose>>;
|
|
51
|
-
import { z } from 'zod';
|