doc-detective-common 1.2.3 → 1.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doc-detective-common",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Shared components for Doc Detective projects.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/schema.js CHANGED
@@ -24,7 +24,7 @@ function loadSchemas() {
24
24
  // Load schema from file
25
25
  let schema = require(`./schemas/${file}`);
26
26
  // Add dynamic ID based on file path
27
- schema.$id = `file://${__dirname}/schemas/${file}`;
27
+ schema.$id = `${__dirname}/schemas/${file}`;
28
28
  // Recursively update relative references with app root path
29
29
  schema = updateRefPaths(schema);
30
30
  // Load into `schema` object
@@ -39,7 +39,7 @@ function updateRefPaths(schema) {
39
39
  updateRefPaths(value);
40
40
  }
41
41
  if (key === "$ref") {
42
- schema[key] = `file://${__dirname}/schemas/${value}`;
42
+ schema[key] = `${__dirname}/schemas/${value}`;
43
43
  }
44
44
  }
45
45
  return schema;
@@ -24,6 +24,7 @@
24
24
  "transform": ["trim"]
25
25
  },
26
26
  "statusCodes": {
27
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
27
28
  "type": "array",
28
29
  "items": {
29
30
  "oneOf": [
@@ -38,7 +38,7 @@
38
38
  "description": "Click the element."
39
39
  },
40
40
  "typeKeys": {
41
- "description": "Type keys after finding the element. If you want to type in the element, make the element active with the `click` parameter.",
41
+ "description": "Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`typeKeys`](/reference/schemas/typeKeys).<br><br>To type in the element, make the element active with the `click` parameter.",
42
42
  "oneOf": [
43
43
  {
44
44
  "type": "string"
@@ -24,6 +24,7 @@
24
24
  "transform": ["trim"]
25
25
  },
26
26
  "statusCodes": {
27
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
27
28
  "type": "array",
28
29
  "items": {
29
30
  "oneOf": [
@@ -101,7 +102,8 @@
101
102
  "description": "jq filter to apply to the response data. If the filter doesn't return a value, the environment variable isn't set.",
102
103
  "type": "string"
103
104
  }
104
- }
105
+ },
106
+ "required": ["name", "jqFilter"]
105
107
  }
106
108
  ]
107
109
  }
@@ -138,10 +140,7 @@
138
140
  "name": "morpheus",
139
141
  "job": "leader"
140
142
  },
141
- "statusCodes": [
142
- 200,
143
- 201
144
- ]
143
+ "statusCodes": [200, 201]
145
144
  },
146
145
  {
147
146
  "action": "httpRequest",
@@ -13,7 +13,8 @@
13
13
  },
14
14
  "action": {
15
15
  "type": "string",
16
- "const": "runShell"
16
+ "const": "runShell",
17
+ "description": "The action to perform."
17
18
  },
18
19
  "command": {
19
20
  "type": "string",
@@ -22,6 +22,7 @@
22
22
  }
23
23
  },
24
24
  "tests": {
25
+ "description": "[Tests](/reference/schemas/test) to perform.",
25
26
  "type": "array",
26
27
  "minItems": 1,
27
28
  "items": {
@@ -23,6 +23,7 @@
23
23
  }
24
24
  },
25
25
  "steps": {
26
+ "description": "Actions to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails.",
26
27
  "type": "array",
27
28
  "minItems": 1,
28
29
  "items": {