@percy/client 1.0.0-beta.68 → 1.0.0-beta.71

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.js CHANGED
@@ -39,7 +39,7 @@ function validateProjectPath(path) {
39
39
  if (!path) throw new Error('Missing project path');
40
40
 
41
41
  if (!/^[^/]+?\/.+/.test(path)) {
42
- throw new Error(`Invalid project path. Expected "org/project" but recieved "${path}"`);
42
+ throw new Error(`Invalid project path. Expected "org/project" but received "${path}"`);
43
43
  }
44
44
  } // PercyClient is used to communicate with the Percy API to create and finalize
45
45
  // builds and snapshot. Uses @percy/env to collect environment information used
@@ -228,7 +228,7 @@ class PercyClient {
228
228
  let data = await fetchData();
229
229
  let state = data === null || data === void 0 ? void 0 : data.attributes.state;
230
230
  let pending = !state || state === 'pending' || state === 'processing';
231
- let updated = JSON.stringify(data) !== JSON.stringify(last); // new data recieved
231
+ let updated = JSON.stringify(data) !== JSON.stringify(last); // new data received
232
232
 
233
233
  if (updated) {
234
234
  t = Date.now(); // no new data within the timeout
package/dist/request.js CHANGED
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.port = port;
7
- exports.href = href;
6
+ exports.ProxyHttpsAgent = exports.ProxyHttpAgent = void 0;
7
+ exports.default = request;
8
8
  exports.getProxy = getProxy;
9
+ exports.href = href;
10
+ exports.port = port;
9
11
  exports.proxyAgentFor = proxyAgentFor;
10
- exports.default = request;
11
- exports.ProxyHttpsAgent = exports.ProxyHttpAgent = void 0;
12
12
 
13
13
  var _net = _interopRequireDefault(require("net"));
14
14
 
@@ -242,7 +242,8 @@ function request(url, options = {}, callback) {
242
242
  if (handleError.handled) return;
243
243
  handleError.handled = true;
244
244
  let shouldRetry = error.response // maybe retry 404s and always retry 500s
245
- ? retryNotFound && error.response.status === 404 || error.response.status >= 500 && error.response.status < 600 : !!error.code && RETRY_ERROR_CODES.includes(error.code);
245
+ ? retryNotFound && error.response.status === 404 || error.response.status >= 500 && error.response.status < 600 // retry specific error codes
246
+ : !!error.code && RETRY_ERROR_CODES.includes(error.code);
246
247
  return shouldRetry ? retry(error) : reject(error);
247
248
  };
248
249
 
package/dist/utils.js CHANGED
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.sha256hash = sha256hash;
7
6
  exports.base64encode = base64encode;
7
+ exports.hostnameMatches = hostnameMatches;
8
8
  exports.pool = pool;
9
9
  exports.retry = retry;
10
- exports.hostnameMatches = hostnameMatches;
10
+ exports.sha256hash = sha256hash;
11
11
 
12
12
  var _crypto = _interopRequireDefault(require("crypto"));
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/client",
3
- "version": "1.0.0-beta.68",
3
+ "version": "1.0.0-beta.71",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -23,13 +23,13 @@
23
23
  "mock-require": "^3.0.3"
24
24
  },
25
25
  "dependencies": {
26
- "@percy/env": "1.0.0-beta.68",
27
- "@percy/logger": "1.0.0-beta.68"
26
+ "@percy/env": "1.0.0-beta.71",
27
+ "@percy/logger": "1.0.0-beta.71"
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",
31
31
  "url": "https://github.com/percy/cli",
32
32
  "directory": "packages/client"
33
33
  },
34
- "gitHead": "32ffd12d1db407b7c2b4ca8364f99f90b2cfa862"
34
+ "gitHead": "364d1df717fb19a26ccb024458df6e78a9c11f99"
35
35
  }