@percy/config 1.27.1 → 1.27.3-beta.0

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.
Files changed (2) hide show
  1. package/dist/validate.js +12 -0
  2. package/package.json +4 -4
package/dist/validate.js CHANGED
@@ -15,6 +15,18 @@ const ajv = new AJV({
15
15
  allErrors: true,
16
16
  schemas: [getDefaultSchema()],
17
17
  keywords: [{
18
+ keyword: 'onlyAutomate',
19
+ error: {
20
+ message: 'property only valid with Automate integration.'
21
+ },
22
+ code: cxt => {
23
+ let isAutomateProjectToken = (process.env.PERCY_TOKEN || '').split('_')[0] === 'auto';
24
+ // we do validation only when token is passed
25
+ if (!!process.env.PERCY_TOKEN && !isAutomateProjectToken) {
26
+ cxt.error();
27
+ }
28
+ }
29
+ }, {
18
30
  // custom instanceof schema validation
19
31
  keyword: 'instanceof',
20
32
  metaSchema: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/config",
3
- "version": "1.27.1",
3
+ "version": "1.27.3-beta.0",
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": "latest"
12
+ "tag": "beta"
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.27.1",
41
+ "@percy/logger": "1.27.3-beta.0",
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": "a6f6441483b9c092ee1de1832f53c9a774968202"
49
+ "gitHead": "a9b7ebc7005ee50761373f49ce3454449f38f227"
50
50
  }