@percy/core 1.30.2-alpha.1 → 1.30.3-alpha.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.
Files changed (2) hide show
  1. package/dist/percy.js +8 -3
  2. package/package.json +7 -7
package/dist/percy.js CHANGED
@@ -120,6 +120,9 @@ export class Percy {
120
120
  var _this$server;
121
121
  return (_this$server = this.server) === null || _this$server === void 0 ? void 0 : _this$server.address();
122
122
  }
123
+ renderingTypeProject() {
124
+ return this.projectType === 'web' || this.projectType === 'visual_scanner';
125
+ }
123
126
 
124
127
  // Set client & environment info, and override loaded config options
125
128
  set({
@@ -181,13 +184,13 @@ export class Percy {
181
184
  if (!this.skipDiscovery) yield _classPrivateFieldGet(_discovery, this).start();
182
185
  // start a local API server for SDK communication
183
186
  if (this.server) yield this.server.listen();
184
- if (this.projectType === 'web') {
187
+ if (this.renderingTypeProject()) {
185
188
  if (!process.env.PERCY_DO_NOT_CAPTURE_RESPONSIVE_ASSETS || process.env.PERCY_DO_NOT_CAPTURE_RESPONSIVE_ASSETS !== 'true') {
186
189
  var _this$build;
187
190
  this.deviceDetails = yield this.client.getDeviceDetails((_this$build = this.build) === null || _this$build === void 0 ? void 0 : _this$build.id);
188
191
  }
189
192
  }
190
- const snapshotType = this.projectType === 'web' ? 'snapshot' : 'comparison';
193
+ const snapshotType = this.renderingTypeProject() ? 'snapshot' : 'comparison';
191
194
  this.syncQueue = new WaitForJob(snapshotType, this);
192
195
  // log and mark this instance as started
193
196
  this.log.info('Percy has started!');
@@ -407,6 +410,7 @@ export class Percy {
407
410
  let {
408
411
  clientInfo,
409
412
  environmentInfo,
413
+ labels,
410
414
  ...comparison
411
415
  } = options;
412
416
  let errors = PercyConfig.validate(comparison, '/comparison');
@@ -453,7 +457,8 @@ export class Percy {
453
457
  if (this.testing && JSON.stringify(this.testing) === JSON.stringify({})) {
454
458
  return true;
455
459
  }
456
- return tokenType !== 'web';
460
+ const assetDiscoverySupportedTypes = ['web', 'visual_scanner'];
461
+ return !assetDiscoverySupportedTypes.includes(tokenType);
457
462
  }
458
463
  syncMode(options) {
459
464
  var _this$config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/core",
3
- "version": "1.30.2-alpha.1",
3
+ "version": "1.30.3-alpha.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,11 +43,11 @@
43
43
  "test:types": "tsd"
44
44
  },
45
45
  "dependencies": {
46
- "@percy/client": "1.30.2-alpha.1",
47
- "@percy/config": "1.30.2-alpha.1",
48
- "@percy/dom": "1.30.2-alpha.1",
49
- "@percy/logger": "1.30.2-alpha.1",
50
- "@percy/webdriver-utils": "1.30.2-alpha.1",
46
+ "@percy/client": "1.30.3-alpha.0",
47
+ "@percy/config": "1.30.3-alpha.0",
48
+ "@percy/dom": "1.30.3-alpha.0",
49
+ "@percy/logger": "1.30.3-alpha.0",
50
+ "@percy/webdriver-utils": "1.30.3-alpha.0",
51
51
  "content-disposition": "^0.5.4",
52
52
  "cross-spawn": "^7.0.3",
53
53
  "extract-zip": "^2.0.1",
@@ -60,5 +60,5 @@
60
60
  "ws": "^8.17.1",
61
61
  "yaml": "^2.4.1"
62
62
  },
63
- "gitHead": "49e55e3851ae4b0fd489327cd980e352a440aa19"
63
+ "gitHead": "3d149589bee147703e4e884d4cac689eaaad805d"
64
64
  }