@percy/client 1.28.1 → 1.28.2-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 +14 -0
- package/package.json +5 -5
- package/test/helpers.js +6 -0
package/dist/client.js
CHANGED
|
@@ -212,6 +212,20 @@ export class PercyClient {
|
|
|
212
212
|
return this.get(`job_status?sync=true&type=${type}&id=${ids.join()}`);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
// Returns device details enabled on project associated with given token
|
|
216
|
+
async getDeviceDetails(buildId) {
|
|
217
|
+
try {
|
|
218
|
+
let url = 'discovery/device-details';
|
|
219
|
+
if (buildId) url += `?build_id=${buildId}`;
|
|
220
|
+
const {
|
|
221
|
+
data
|
|
222
|
+
} = await this.get(url);
|
|
223
|
+
return data;
|
|
224
|
+
} catch (e) {
|
|
225
|
+
return [];
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
215
229
|
// Retrieves project builds optionally filtered. Requires a read access token.
|
|
216
230
|
async getBuilds(project, filters = {}) {
|
|
217
231
|
validateProjectPath(project);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/client",
|
|
3
|
-
"version": "1.28.1",
|
|
3
|
+
"version": "1.28.2-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,8 +32,8 @@
|
|
|
32
32
|
"test:coverage": "yarn test --coverage"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@percy/env": "1.28.1",
|
|
36
|
-
"@percy/logger": "1.28.1"
|
|
35
|
+
"@percy/env": "1.28.2-beta.1",
|
|
36
|
+
"@percy/logger": "1.28.2-beta.1"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "c4d0637366dbc28eeda234f93d44424d9c565f49"
|
|
39
39
|
}
|
package/test/helpers.js
CHANGED
|
@@ -139,6 +139,12 @@ export const api = {
|
|
|
139
139
|
'/snapshots/4567?sync=true&response_format=sync-cli': () => [201, {
|
|
140
140
|
name: 'test snapshot',
|
|
141
141
|
diff_ratio: 0
|
|
142
|
+
}],
|
|
143
|
+
'/discovery/device-details?build_id=123': () => [201, {
|
|
144
|
+
data: []
|
|
145
|
+
}],
|
|
146
|
+
'/discovery/device-details': () => [201, {
|
|
147
|
+
data: []
|
|
142
148
|
}]
|
|
143
149
|
},
|
|
144
150
|
|