@percy/config 1.30.11-beta.1 → 1.30.11
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/validate.js +14 -0
- package/package.json +4 -4
package/dist/validate.js
CHANGED
|
@@ -65,6 +65,20 @@ const ajv = new AJV({
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
}, {
|
|
69
|
+
keyword: 'onlyWeb',
|
|
70
|
+
error: {
|
|
71
|
+
message: 'property only valid with Web integration.'
|
|
72
|
+
},
|
|
73
|
+
code: cxt => {
|
|
74
|
+
const tokenPrefix = (process.env.PERCY_TOKEN || '').split('_')[0];
|
|
75
|
+
const isNotWebProjectToken = tokenPrefix === 'auto' || tokenPrefix === 'app';
|
|
76
|
+
|
|
77
|
+
// we do validation only when token is passed
|
|
78
|
+
if (!!process.env.PERCY_TOKEN && isNotWebProjectToken) {
|
|
79
|
+
cxt.error();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
68
82
|
}]
|
|
69
83
|
});
|
|
70
84
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/config",
|
|
3
|
-
"version": "1.30.11
|
|
3
|
+
"version": "1.30.11",
|
|
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"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"test:types": "tsd"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@percy/logger": "1.30.11
|
|
41
|
+
"@percy/logger": "1.30.11",
|
|
42
42
|
"ajv": "^8.6.2",
|
|
43
43
|
"cosmiconfig": "^8.0.0",
|
|
44
44
|
"yaml": "^2.0.0"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"json-schema-typed": "^7.0.3"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "b2fe707b51d1fb1ad6d098070ce017864d6b2f11"
|
|
50
50
|
}
|