@percy/client 1.29.4-beta.5 → 1.29.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.
- package/dist/client.js +4 -4
- package/dist/utils.js +2 -2
- package/package.json +5 -5
package/dist/client.js
CHANGED
|
@@ -298,7 +298,7 @@ export class PercyClient {
|
|
|
298
298
|
|
|
299
299
|
// call progress every update after the first update
|
|
300
300
|
if ((last || pending) && updated) {
|
|
301
|
-
onProgress === null || onProgress === void 0
|
|
301
|
+
onProgress === null || onProgress === void 0 || onProgress(data);
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
// not finished, poll again
|
|
@@ -308,7 +308,7 @@ export class PercyClient {
|
|
|
308
308
|
// build finished
|
|
309
309
|
} else {
|
|
310
310
|
// ensure progress is called at least once
|
|
311
|
-
if (!last) onProgress === null || onProgress === void 0
|
|
311
|
+
if (!last) onProgress === null || onProgress === void 0 || onProgress(data);
|
|
312
312
|
resolve({
|
|
313
313
|
data
|
|
314
314
|
});
|
|
@@ -433,9 +433,9 @@ export class PercyClient {
|
|
|
433
433
|
// Convenience method for creating a snapshot for the active build, uploading
|
|
434
434
|
// missing resources for the snapshot, and finalizing the snapshot.
|
|
435
435
|
async sendSnapshot(buildId, options) {
|
|
436
|
-
var _snapshot$data$relati
|
|
436
|
+
var _snapshot$data$relati;
|
|
437
437
|
let snapshot = await this.createSnapshot(buildId, options);
|
|
438
|
-
let missing = (_snapshot$data$relati = snapshot.data.relationships) === null || _snapshot$data$relati === void 0
|
|
438
|
+
let missing = (_snapshot$data$relati = snapshot.data.relationships) === null || _snapshot$data$relati === void 0 || (_snapshot$data$relati = _snapshot$data$relati['missing-resources']) === null || _snapshot$data$relati === void 0 ? void 0 : _snapshot$data$relati.data;
|
|
439
439
|
if (missing !== null && missing !== void 0 && missing.length) {
|
|
440
440
|
let resources = options.resources.reduce((acc, r) => Object.assign(acc, {
|
|
441
441
|
[r.sha]: r
|
package/dist/utils.js
CHANGED
|
@@ -193,8 +193,8 @@ export async function request(url, options = {}, callback) {
|
|
|
193
193
|
var _callback;
|
|
194
194
|
resolve((await ((_callback = callback) === null || _callback === void 0 ? void 0 : _callback(body, res))) ?? body);
|
|
195
195
|
} else {
|
|
196
|
-
var _body
|
|
197
|
-
let err = (_body = body) === null || _body === void 0
|
|
196
|
+
var _body;
|
|
197
|
+
let err = (_body = body) === null || _body === void 0 || (_body = _body.errors) === null || _body === void 0 || (_body = _body.find(e => e.detail)) === null || _body === void 0 ? void 0 : _body.detail;
|
|
198
198
|
let statusMessage = `${statusCode} ${res.statusMessage || ''}`;
|
|
199
199
|
let bodyText = (raw === null || raw === void 0 ? void 0 : raw.length) > 0 && res.statusMessage !== raw ? `\n${raw}` : '';
|
|
200
200
|
throw new Error(err || `${statusMessage}${bodyText}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/client",
|
|
3
|
-
"version": "1.29.4
|
|
3
|
+
"version": "1.29.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "latest"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=14"
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"test:coverage": "yarn test --coverage"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@percy/env": "1.29.4
|
|
37
|
-
"@percy/logger": "1.29.4
|
|
36
|
+
"@percy/env": "1.29.4",
|
|
37
|
+
"@percy/logger": "1.29.4",
|
|
38
38
|
"pako": "^2.1.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "17468058cf55d75557451a81e82b0d6fd5c0e26b"
|
|
41
41
|
}
|