@percy/core 1.28.8-beta.0 → 1.28.8-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/api.js +2 -2
- package/dist/percy.js +6 -2
- package/package.json +7 -7
package/dist/api.js
CHANGED
|
@@ -93,7 +93,7 @@ export function createPercyServer(percy, port) {
|
|
|
93
93
|
})
|
|
94
94
|
// legacy agent wrapper for @percy/dom
|
|
95
95
|
.route('get', '/percy-agent.js', async (req, res) => {
|
|
96
|
-
logger('core:server').deprecated(['It looks like you’re using @percy/cli with an older SDK.', 'Please upgrade to the latest version to fix this warning.', 'See these docs for more info: https
|
|
96
|
+
logger('core:server').deprecated(['It looks like you’re using @percy/cli with an older SDK.', 'Please upgrade to the latest version to fix this warning.', 'See these docs for more info: https://www.browserstack.com/docs/percy/migration/migrate-to-cli'].join(' '));
|
|
97
97
|
let content = await fs.promises.readFile(PERCY_DOM, 'utf-8');
|
|
98
98
|
let wrapper = '(window.PercyAgent = class { snapshot(n, o) { return PercyDOM.serialize(o); } });';
|
|
99
99
|
return res.send(200, 'applicaton/javascript', content.concat(wrapper));
|
|
@@ -159,7 +159,7 @@ export function createPercyServer(percy, port) {
|
|
|
159
159
|
})).route('post', '/percy/automateScreenshot', async (req, res) => {
|
|
160
160
|
let data;
|
|
161
161
|
percyAutomateRequestHandler(req, percy);
|
|
162
|
-
let comparisonData = await WebdriverUtils.
|
|
162
|
+
let comparisonData = await WebdriverUtils.captureScreenshot(req.body);
|
|
163
163
|
if (percy.syncMode(comparisonData)) {
|
|
164
164
|
const snapshotPromise = new Promise((resolve, reject) => percy.upload(comparisonData, {
|
|
165
165
|
resolve,
|
package/dist/percy.js
CHANGED
|
@@ -146,7 +146,6 @@ export class Percy {
|
|
|
146
146
|
if (this.readyState != null) return;
|
|
147
147
|
this.readyState = 0;
|
|
148
148
|
try {
|
|
149
|
-
var _this$build;
|
|
150
149
|
if (process.env.PERCY_CLIENT_ERROR_LOGS !== 'false') {
|
|
151
150
|
this.log.warn('Notice: Percy collects CI logs for service improvement, stored for 30 days. Opt-out anytime with export PERCY_CLIENT_ERROR_LOGS=false');
|
|
152
151
|
}
|
|
@@ -156,7 +155,12 @@ export class Percy {
|
|
|
156
155
|
if (!this.skipDiscovery) yield this.#discovery.start();
|
|
157
156
|
// start a local API server for SDK communication
|
|
158
157
|
if (this.server) yield this.server.listen();
|
|
159
|
-
if (this.projectType === 'web')
|
|
158
|
+
if (this.projectType === 'web') {
|
|
159
|
+
if (!process.env.PERCY_DO_NOT_CAPTURE_RESPONSIVE_ASSETS || process.env.PERCY_DO_NOT_CAPTURE_RESPONSIVE_ASSETS !== 'true') {
|
|
160
|
+
var _this$build;
|
|
161
|
+
this.deviceDetails = yield this.client.getDeviceDetails((_this$build = this.build) === null || _this$build === void 0 ? void 0 : _this$build.id);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
160
164
|
const snapshotType = this.projectType === 'web' ? 'snapshot' : 'comparison';
|
|
161
165
|
this.syncQueue = new WaitForJob(snapshotType, this);
|
|
162
166
|
// log and mark this instance as started
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/core",
|
|
3
|
-
"version": "1.28.8-beta.
|
|
3
|
+
"version": "1.28.8-beta.2",
|
|
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.28.8-beta.
|
|
47
|
-
"@percy/config": "1.28.8-beta.
|
|
48
|
-
"@percy/dom": "1.28.8-beta.
|
|
49
|
-
"@percy/logger": "1.28.8-beta.
|
|
50
|
-
"@percy/webdriver-utils": "1.28.8-beta.
|
|
46
|
+
"@percy/client": "1.28.8-beta.2",
|
|
47
|
+
"@percy/config": "1.28.8-beta.2",
|
|
48
|
+
"@percy/dom": "1.28.8-beta.2",
|
|
49
|
+
"@percy/logger": "1.28.8-beta.2",
|
|
50
|
+
"@percy/webdriver-utils": "1.28.8-beta.2",
|
|
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.0.0",
|
|
61
61
|
"yaml": "^2.4.1"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "6c954bcd0fa6a825ad636167f0a07251f124b710"
|
|
64
64
|
}
|