@vizzly-testing/cli 0.13.3 → 0.14.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/reporter/reporter-bundle.css +1 -1
- package/dist/reporter/reporter-bundle.iife.js +35 -22
- package/dist/server/http-server.js +4 -2
- package/dist/services/server-manager.js +7 -1
- package/dist/types/reporter/src/components/comparison/fullscreen-viewer.d.ts +13 -0
- package/dist/types/reporter/src/components/comparison/screenshot-list.d.ts +9 -0
- package/dist/types/reporter/src/components/comparison/variant-selector.d.ts +1 -1
- package/dist/types/reporter/src/components/views/comparison-detail-view.d.ts +8 -0
- package/dist/types/reporter/src/components/views/comparisons-view.d.ts +4 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ const PROJECT_ROOT = join(__dirname, '..', '..');
|
|
|
9
9
|
const logger = createServiceLogger('HTTP-SERVER');
|
|
10
10
|
export const createHttpServer = (port, screenshotHandler, services = {}) => {
|
|
11
11
|
let server = null;
|
|
12
|
+
let defaultBuildId = services.buildId || null;
|
|
12
13
|
|
|
13
14
|
// Extract services for config/auth/project management
|
|
14
15
|
let configService = services.configService;
|
|
@@ -355,8 +356,9 @@ export const createHttpServer = (port, screenshotHandler, services = {}) => {
|
|
|
355
356
|
return;
|
|
356
357
|
}
|
|
357
358
|
|
|
358
|
-
// Use
|
|
359
|
-
|
|
359
|
+
// Use buildId from request body, or fall back to server's buildId (set during server creation)
|
|
360
|
+
// If neither is available, this is an error - buildId is required for cloud uploads
|
|
361
|
+
const effectiveBuildId = buildId || defaultBuildId;
|
|
360
362
|
const result = await screenshotHandler.handleScreenshot(effectiveBuildId, name, image, properties);
|
|
361
363
|
res.statusCode = result.statusCode;
|
|
362
364
|
res.end(JSON.stringify(result.body));
|
|
@@ -31,7 +31,13 @@ export class ServerManager extends BaseService {
|
|
|
31
31
|
const apiService = await this.createApiService();
|
|
32
32
|
this.handler = createApiHandler(apiService);
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
// Pass buildId in services so http-server can use it as default
|
|
36
|
+
const servicesWithBuildId = {
|
|
37
|
+
...this.services,
|
|
38
|
+
buildId: this.buildId
|
|
39
|
+
};
|
|
40
|
+
this.httpServer = createHttpServer(port, this.handler, servicesWithBuildId);
|
|
35
41
|
if (this.httpServer) {
|
|
36
42
|
await this.httpServer.start();
|
|
37
43
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fullscreen comparison viewer - mirrors the Vizzly cloud product UI exactly
|
|
3
|
+
* Displays a single comparison with navigation between screenshots
|
|
4
|
+
*/
|
|
5
|
+
export default function FullscreenViewer({ comparison, comparisons, onClose, onAccept, onReject, onNavigate, userAction, }: {
|
|
6
|
+
comparison: any;
|
|
7
|
+
comparisons?: any[];
|
|
8
|
+
onClose: any;
|
|
9
|
+
onAccept: any;
|
|
10
|
+
onReject: any;
|
|
11
|
+
onNavigate: any;
|
|
12
|
+
userAction: any;
|
|
13
|
+
}): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screenshot list component - simple scannable list
|
|
3
|
+
* Click any row to open the fullscreen comparison viewer
|
|
4
|
+
*/
|
|
5
|
+
export default function ScreenshotList({ comparisons, onSelectComparison, loadingStates, }: {
|
|
6
|
+
comparisons: any;
|
|
7
|
+
onSelectComparison: any;
|
|
8
|
+
loadingStates?: {};
|
|
9
|
+
}): any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Variant selector for toggling between different viewport sizes and browsers
|
|
3
|
-
*
|
|
3
|
+
* Mobile-first with horizontal scroll
|
|
4
4
|
*/
|
|
5
5
|
export default function VariantSelector({ group, selectedIndex, onSelect }: {
|
|
6
6
|
group: any;
|