@vizzly-testing/cli 0.13.3 → 0.13.4

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.
@@ -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 default buildId if none provided
359
- const effectiveBuildId = buildId || 'default';
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
- this.httpServer = createHttpServer(port, this.handler, this.services);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly-testing/cli",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "description": "Visual review platform for UI developers and designers",
5
5
  "keywords": [
6
6
  "visual-testing",