@percy/client 1.30.11-beta.0 → 1.30.11-beta.2
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 +7 -3
- package/dist/utils.js +5 -0
- package/package.json +4 -4
package/dist/client.js
CHANGED
|
@@ -3,7 +3,7 @@ import PercyEnv from '@percy/env';
|
|
|
3
3
|
import { git } from '@percy/env/utils';
|
|
4
4
|
import logger from '@percy/logger';
|
|
5
5
|
import Pako from 'pako';
|
|
6
|
-
import { pool, request, formatBytes, sha256hash, base64encode, getPackageJSON, waitForTimeout, validateTiles, formatLogErrors, tagsList } from './utils.js';
|
|
6
|
+
import { pool, request, formatBytes, sha256hash, base64encode, getPackageJSON, waitForTimeout, validateTiles, formatLogErrors, tagsList, normalizeBrowsers } from './utils.js';
|
|
7
7
|
|
|
8
8
|
// Default client API URL can be set with an env var for API development
|
|
9
9
|
const {
|
|
@@ -168,7 +168,9 @@ export class PercyClient {
|
|
|
168
168
|
var _this$config$percy2;
|
|
169
169
|
this.log.debug('Creating a new build...');
|
|
170
170
|
let source = 'user_created';
|
|
171
|
-
if (process.env.
|
|
171
|
+
if (process.env.PERCY_ORIGINATED_SOURCE) {
|
|
172
|
+
source = 'bstack_sdk_created';
|
|
173
|
+
} else if (process.env.PERCY_AUTO_ENABLED_GROUP_BUILD === 'true') {
|
|
172
174
|
source = 'auto_enabled_group';
|
|
173
175
|
}
|
|
174
176
|
let tagsArr = tagsList(this.labels);
|
|
@@ -426,6 +428,7 @@ export class PercyClient {
|
|
|
426
428
|
testCase,
|
|
427
429
|
labels,
|
|
428
430
|
thTestCaseExecutionId,
|
|
431
|
+
browsers,
|
|
429
432
|
regions,
|
|
430
433
|
algorithm,
|
|
431
434
|
algorithmConfiguration,
|
|
@@ -461,7 +464,8 @@ export class PercyClient {
|
|
|
461
464
|
'minimum-height': minHeight || null,
|
|
462
465
|
'enable-javascript': enableJavaScript || null,
|
|
463
466
|
'enable-layout': enableLayout || false,
|
|
464
|
-
'th-test-case-execution-id': thTestCaseExecutionId || null
|
|
467
|
+
'th-test-case-execution-id': thTestCaseExecutionId || null,
|
|
468
|
+
browsers: normalizeBrowsers(browsers) || null
|
|
465
469
|
},
|
|
466
470
|
relationships: {
|
|
467
471
|
resources: {
|
package/dist/utils.js
CHANGED
|
@@ -4,6 +4,7 @@ import url from 'url';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import crypto from 'crypto';
|
|
6
6
|
import logger from '@percy/logger';
|
|
7
|
+
import { snakecase } from '@percy/config/utils';
|
|
7
8
|
|
|
8
9
|
// Formats a raw byte integer as a string
|
|
9
10
|
export function formatBytes(int) {
|
|
@@ -280,4 +281,8 @@ export function tagsList(tags) {
|
|
|
280
281
|
}
|
|
281
282
|
return tagsArr;
|
|
282
283
|
}
|
|
284
|
+
export function normalizeBrowsers(browserValues) {
|
|
285
|
+
if (!browserValues) return null;
|
|
286
|
+
return browserValues.map(browser => snakecase(browser));
|
|
287
|
+
}
|
|
283
288
|
export { hostnameMatches, getProxy, ProxyHttpAgent, ProxyHttpsAgent, proxyAgentFor } from './proxy.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/client",
|
|
3
|
-
"version": "1.30.11-beta.
|
|
3
|
+
"version": "1.30.11-beta.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"test:coverage": "yarn test --coverage"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@percy/env": "1.30.11-beta.
|
|
37
|
-
"@percy/logger": "1.30.11-beta.
|
|
36
|
+
"@percy/env": "1.30.11-beta.2",
|
|
37
|
+
"@percy/logger": "1.30.11-beta.2",
|
|
38
38
|
"pac-proxy-agent": "^7.0.2",
|
|
39
39
|
"pako": "^2.1.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "d02449fd160c4ac0a63134b249f3de5704fef7c0"
|
|
42
42
|
}
|