@percy/client 1.28.3-alpha.1 → 1.28.3-beta.1
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 +1 -10
- package/package.json +5 -6
package/dist/client.js
CHANGED
|
@@ -2,16 +2,12 @@ import fs from 'fs';
|
|
|
2
2
|
import PercyEnv from '@percy/env';
|
|
3
3
|
import { git } from '@percy/env/utils';
|
|
4
4
|
import logger from '@percy/logger';
|
|
5
|
-
import Pako from 'pako';
|
|
6
5
|
import { pool, request, formatBytes, sha256hash, base64encode, getPackageJSON, waitForTimeout, validateTiles } from './utils.js';
|
|
7
6
|
|
|
8
7
|
// Default client API URL can be set with an env var for API development
|
|
9
8
|
const {
|
|
10
9
|
PERCY_CLIENT_API_URL = 'https://percy.io/api/v1'
|
|
11
10
|
} = process.env;
|
|
12
|
-
const {
|
|
13
|
-
PERCY_GZIP = false
|
|
14
|
-
} = process.env;
|
|
15
11
|
const pkg = getPackageJSON(import.meta.url);
|
|
16
12
|
// minimum polling interval milliseconds
|
|
17
13
|
const MIN_POLLING_INTERVAL = 1_000;
|
|
@@ -319,12 +315,7 @@ export class PercyClient {
|
|
|
319
315
|
content
|
|
320
316
|
} = {}) {
|
|
321
317
|
validateId('build', buildId);
|
|
322
|
-
if (filepath)
|
|
323
|
-
content = await fs.promises.readFile(filepath);
|
|
324
|
-
if (PERCY_GZIP) {
|
|
325
|
-
content = Pako.gzip(content);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
318
|
+
if (filepath) content = await fs.promises.readFile(filepath);
|
|
328
319
|
let encodedContent = base64encode(content);
|
|
329
320
|
this.log.debug(`Uploading ${formatBytes(encodedContent.length)} resource: ${url}...`);
|
|
330
321
|
this.mayBeLogUploadSize(encodedContent.length);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/client",
|
|
3
|
-
"version": "1.28.3-
|
|
3
|
+
"version": "1.28.3-beta.1",
|
|
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": "beta"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=14"
|
|
@@ -32,9 +32,8 @@
|
|
|
32
32
|
"test:coverage": "yarn test --coverage"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@percy/env": "1.28.3-
|
|
36
|
-
"@percy/logger": "1.28.3-
|
|
37
|
-
"pako": "^2.1.0"
|
|
35
|
+
"@percy/env": "1.28.3-beta.1",
|
|
36
|
+
"@percy/logger": "1.28.3-beta.1"
|
|
38
37
|
},
|
|
39
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "3a838eedd0f07f57c6c61cd0cba1c7e20cc95af3"
|
|
40
39
|
}
|