doc-detective-common 4.0.0-beta.0-dev.4 → 4.0.0-beta.0-dev.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.
Files changed (200) hide show
  1. package/package.json +1 -1
  2. package/.c8rc.json +0 -8
  3. package/.mocharc.yml +0 -1
  4. package/icon.png +0 -0
  5. package/scripts/check-coverage-ratchet.cjs +0 -123
  6. package/scripts/createCjsWrapper.js +0 -25
  7. package/scripts/generateTypes.cjs +0 -54
  8. package/src/detectTests.ts +0 -660
  9. package/src/index.ts +0 -3
  10. package/src/schemas/build/checkLink_v2.schema.json +0 -81
  11. package/src/schemas/build/checkLink_v3.schema.json +0 -92
  12. package/src/schemas/build/click_v3.schema.json +0 -145
  13. package/src/schemas/build/config_v2.schema.json +0 -1079
  14. package/src/schemas/build/config_v3.schema.json +0 -696
  15. package/src/schemas/build/context_v2.schema.json +0 -135
  16. package/src/schemas/build/context_v3.schema.json +0 -229
  17. package/src/schemas/build/dragAndDrop_v3.schema.json +0 -189
  18. package/src/schemas/build/find_v2.schema.json +0 -168
  19. package/src/schemas/build/find_v3.schema.json +0 -214
  20. package/src/schemas/build/goTo_v2.schema.json +0 -63
  21. package/src/schemas/build/goTo_v3.schema.json +0 -257
  22. package/src/schemas/build/httpRequest_v2.schema.json +0 -321
  23. package/src/schemas/build/httpRequest_v3.schema.json +0 -439
  24. package/src/schemas/build/loadCookie_v3.schema.json +0 -138
  25. package/src/schemas/build/loadVariables_v3.schema.json +0 -10
  26. package/src/schemas/build/moveTo_v2.schema.json +0 -99
  27. package/src/schemas/build/openApi_v2.schema.json +0 -76
  28. package/src/schemas/build/openApi_v3.schema.json +0 -161
  29. package/src/schemas/build/record_v3.schema.json +0 -70
  30. package/src/schemas/build/report_v3.schema.json +0 -53
  31. package/src/schemas/build/resolvedTests_v3.schema.json +0 -238
  32. package/src/schemas/build/runCode_v2.schema.json +0 -201
  33. package/src/schemas/build/runCode_v3.schema.json +0 -138
  34. package/src/schemas/build/runShell_v2.schema.json +0 -189
  35. package/src/schemas/build/runShell_v3.schema.json +0 -156
  36. package/src/schemas/build/saveCookie_v3.schema.json +0 -149
  37. package/src/schemas/build/saveScreenshot_v2.schema.json +0 -150
  38. package/src/schemas/build/screenshot_v3.schema.json +0 -250
  39. package/src/schemas/build/setVariables_v2.schema.json +0 -39
  40. package/src/schemas/build/sourceIntegration_v3.schema.json +0 -51
  41. package/src/schemas/build/spec_v2.schema.json +0 -199
  42. package/src/schemas/build/spec_v3.schema.json +0 -213
  43. package/src/schemas/build/startRecording_v2.schema.json +0 -57
  44. package/src/schemas/build/step_v3.schema.json +0 -669
  45. package/src/schemas/build/stopRecord_v3.schema.json +0 -13
  46. package/src/schemas/build/stopRecording_v2.schema.json +0 -33
  47. package/src/schemas/build/test_v2.schema.json +0 -244
  48. package/src/schemas/build/test_v3.schema.json +0 -292
  49. package/src/schemas/build/typeKeys_v2.schema.json +0 -72
  50. package/src/schemas/build/type_v3.schema.json +0 -131
  51. package/src/schemas/build/wait_v2.schema.json +0 -42
  52. package/src/schemas/build/wait_v3.schema.json +0 -37
  53. package/src/schemas/dereferenceSchemas.cjs +0 -208
  54. package/src/schemas/index.ts +0 -6
  55. package/src/schemas/output_schemas/analytics_v1.schema.json +0 -585
  56. package/src/schemas/output_schemas/checkLink_v1.schema.json +0 -42
  57. package/src/schemas/output_schemas/checkLink_v2.schema.json +0 -80
  58. package/src/schemas/output_schemas/checkLink_v3.schema.json +0 -145
  59. package/src/schemas/output_schemas/click_v1.schema.json +0 -60
  60. package/src/schemas/output_schemas/click_v3.schema.json +0 -252
  61. package/src/schemas/output_schemas/config_v2.schema.json +0 -2628
  62. package/src/schemas/output_schemas/config_v3.schema.json +0 -16470
  63. package/src/schemas/output_schemas/context_v2.schema.json +0 -134
  64. package/src/schemas/output_schemas/context_v3.schema.json +0 -374
  65. package/src/schemas/output_schemas/dragAndDrop_v3.schema.json +0 -496
  66. package/src/schemas/output_schemas/endRecord_v3.schema.json +0 -12
  67. package/src/schemas/output_schemas/find_v1.schema.json +0 -171
  68. package/src/schemas/output_schemas/find_v2.schema.json +0 -184
  69. package/src/schemas/output_schemas/find_v3.schema.json +0 -1349
  70. package/src/schemas/output_schemas/goTo_v1.schema.json +0 -30
  71. package/src/schemas/output_schemas/goTo_v2.schema.json +0 -62
  72. package/src/schemas/output_schemas/goTo_v3.schema.json +0 -419
  73. package/src/schemas/output_schemas/httpRequest_v1.schema.json +0 -115
  74. package/src/schemas/output_schemas/httpRequest_v2.schema.json +0 -392
  75. package/src/schemas/output_schemas/httpRequest_v3.schema.json +0 -994
  76. package/src/schemas/output_schemas/loadCookie_v3.schema.json +0 -228
  77. package/src/schemas/output_schemas/loadVariables_v3.schema.json +0 -9
  78. package/src/schemas/output_schemas/matchText_v1.schema.json +0 -32
  79. package/src/schemas/output_schemas/moveMouse_v1.schema.json +0 -60
  80. package/src/schemas/output_schemas/moveTo_v2.schema.json +0 -98
  81. package/src/schemas/output_schemas/openApi_v2.schema.json +0 -75
  82. package/src/schemas/output_schemas/openApi_v3.schema.json +0 -162
  83. package/src/schemas/output_schemas/record_v3.schema.json +0 -101
  84. package/src/schemas/output_schemas/report_v3.schema.json +0 -16826
  85. package/src/schemas/output_schemas/resolvedTests_v3.schema.json +0 -33331
  86. package/src/schemas/output_schemas/runCode_v2.schema.json +0 -200
  87. package/src/schemas/output_schemas/runCode_v3.schema.json +0 -222
  88. package/src/schemas/output_schemas/runShell_v1.schema.json +0 -35
  89. package/src/schemas/output_schemas/runShell_v2.schema.json +0 -188
  90. package/src/schemas/output_schemas/runShell_v3.schema.json +0 -236
  91. package/src/schemas/output_schemas/saveCookie_v3.schema.json +0 -245
  92. package/src/schemas/output_schemas/saveScreenshot_v2.schema.json +0 -149
  93. package/src/schemas/output_schemas/screenshot_v1.schema.json +0 -48
  94. package/src/schemas/output_schemas/screenshot_v3.schema.json +0 -681
  95. package/src/schemas/output_schemas/scroll_v1.schema.json +0 -50
  96. package/src/schemas/output_schemas/setVariables_v2.schema.json +0 -38
  97. package/src/schemas/output_schemas/sourceIntegration_v3.schema.json +0 -50
  98. package/src/schemas/output_schemas/spec_v2.schema.json +0 -2301
  99. package/src/schemas/output_schemas/spec_v3.schema.json +0 -16630
  100. package/src/schemas/output_schemas/startRecording_v1.schema.json +0 -55
  101. package/src/schemas/output_schemas/startRecording_v2.schema.json +0 -56
  102. package/src/schemas/output_schemas/step_v3.schema.json +0 -7317
  103. package/src/schemas/output_schemas/stopRecord_v3.schema.json +0 -12
  104. package/src/schemas/output_schemas/stopRecording_v1.schema.json +0 -20
  105. package/src/schemas/output_schemas/stopRecording_v2.schema.json +0 -32
  106. package/src/schemas/output_schemas/test_v2.schema.json +0 -1903
  107. package/src/schemas/output_schemas/test_v3.schema.json +0 -15863
  108. package/src/schemas/output_schemas/typeKeys_v2.schema.json +0 -71
  109. package/src/schemas/output_schemas/type_v1.schema.json +0 -62
  110. package/src/schemas/output_schemas/type_v3.schema.json +0 -244
  111. package/src/schemas/output_schemas/wait_v1.schema.json +0 -42
  112. package/src/schemas/output_schemas/wait_v2.schema.json +0 -41
  113. package/src/schemas/output_schemas/wait_v3.schema.json +0 -41
  114. package/src/schemas/schemas.json +0 -121331
  115. package/src/schemas/src_schemas/analytics_v1.schema.json +0 -585
  116. package/src/schemas/src_schemas/checkLink_v1.schema.json +0 -42
  117. package/src/schemas/src_schemas/checkLink_v2.schema.json +0 -65
  118. package/src/schemas/src_schemas/checkLink_v3.schema.json +0 -91
  119. package/src/schemas/src_schemas/click_v1.schema.json +0 -60
  120. package/src/schemas/src_schemas/click_v3.schema.json +0 -144
  121. package/src/schemas/src_schemas/config_v2.schema.json +0 -929
  122. package/src/schemas/src_schemas/config_v3.schema.json +0 -633
  123. package/src/schemas/src_schemas/context_v2.schema.json +0 -108
  124. package/src/schemas/src_schemas/context_v3.schema.json +0 -202
  125. package/src/schemas/src_schemas/dragAndDrop_v3.schema.json +0 -185
  126. package/src/schemas/src_schemas/find_v1.schema.json +0 -137
  127. package/src/schemas/src_schemas/find_v2.schema.json +0 -155
  128. package/src/schemas/src_schemas/find_v3.schema.json +0 -210
  129. package/src/schemas/src_schemas/goTo_v1.schema.json +0 -30
  130. package/src/schemas/src_schemas/goTo_v2.schema.json +0 -58
  131. package/src/schemas/src_schemas/goTo_v3.schema.json +0 -232
  132. package/src/schemas/src_schemas/httpRequest_v1.schema.json +0 -115
  133. package/src/schemas/src_schemas/httpRequest_v2.schema.json +0 -284
  134. package/src/schemas/src_schemas/httpRequest_v3.schema.json +0 -402
  135. package/src/schemas/src_schemas/loadCookie_v3.schema.json +0 -113
  136. package/src/schemas/src_schemas/loadVariables_v3.schema.json +0 -9
  137. package/src/schemas/src_schemas/matchText_v1.schema.json +0 -32
  138. package/src/schemas/src_schemas/moveMouse_v1.schema.json +0 -60
  139. package/src/schemas/src_schemas/moveTo_v2.schema.json +0 -89
  140. package/src/schemas/src_schemas/openApi_v2.schema.json +0 -64
  141. package/src/schemas/src_schemas/openApi_v3.schema.json +0 -161
  142. package/src/schemas/src_schemas/record_v3.schema.json +0 -69
  143. package/src/schemas/src_schemas/report_v3.schema.json +0 -52
  144. package/src/schemas/src_schemas/resolvedTests_v3.schema.json +0 -237
  145. package/src/schemas/src_schemas/runCode_v2.schema.json +0 -181
  146. package/src/schemas/src_schemas/runCode_v3.schema.json +0 -137
  147. package/src/schemas/src_schemas/runShell_v1.schema.json +0 -35
  148. package/src/schemas/src_schemas/runShell_v2.schema.json +0 -166
  149. package/src/schemas/src_schemas/runShell_v3.schema.json +0 -155
  150. package/src/schemas/src_schemas/saveCookie_v3.schema.json +0 -124
  151. package/src/schemas/src_schemas/saveScreenshot_v2.schema.json +0 -129
  152. package/src/schemas/src_schemas/screenshot_v1.schema.json +0 -48
  153. package/src/schemas/src_schemas/screenshot_v3.schema.json +0 -249
  154. package/src/schemas/src_schemas/scroll_v1.schema.json +0 -50
  155. package/src/schemas/src_schemas/setVariables_v2.schema.json +0 -38
  156. package/src/schemas/src_schemas/sourceIntegration_v3.schema.json +0 -45
  157. package/src/schemas/src_schemas/spec_v2.schema.json +0 -175
  158. package/src/schemas/src_schemas/spec_v3.schema.json +0 -212
  159. package/src/schemas/src_schemas/startRecording_v1.schema.json +0 -55
  160. package/src/schemas/src_schemas/startRecording_v2.schema.json +0 -54
  161. package/src/schemas/src_schemas/step_v3.schema.json +0 -632
  162. package/src/schemas/src_schemas/stopRecord_v3.schema.json +0 -9
  163. package/src/schemas/src_schemas/stopRecording_v1.schema.json +0 -20
  164. package/src/schemas/src_schemas/stopRecording_v2.schema.json +0 -32
  165. package/src/schemas/src_schemas/test_v2.schema.json +0 -200
  166. package/src/schemas/src_schemas/test_v3.schema.json +0 -268
  167. package/src/schemas/src_schemas/typeKeys_v2.schema.json +0 -63
  168. package/src/schemas/src_schemas/type_v1.schema.json +0 -62
  169. package/src/schemas/src_schemas/type_v3.schema.json +0 -118
  170. package/src/schemas/src_schemas/wait_v1.schema.json +0 -42
  171. package/src/schemas/src_schemas/wait_v2.schema.json +0 -41
  172. package/src/schemas/src_schemas/wait_v3.schema.json +0 -36
  173. package/src/types/generated/checkLink_v3.ts +0 -29
  174. package/src/types/generated/click_v3.ts +0 -17
  175. package/src/types/generated/config_v3.ts +0 -405
  176. package/src/types/generated/context_v3.ts +0 -112
  177. package/src/types/generated/dragAndDrop_v3.ts +0 -39
  178. package/src/types/generated/endRecord_v3.ts +0 -10
  179. package/src/types/generated/find_v3.ts +0 -17
  180. package/src/types/generated/goTo_v3.ts +0 -48
  181. package/src/types/generated/httpRequest_v3.ts +0 -17
  182. package/src/types/generated/loadCookie_v3.ts +0 -17
  183. package/src/types/generated/loadVariables_v3.ts +0 -10
  184. package/src/types/generated/openApi_v3.ts +0 -64
  185. package/src/types/generated/record_v3.ts +0 -34
  186. package/src/types/generated/report_v3.ts +0 -183
  187. package/src/types/generated/resolvedTests_v3.ts +0 -585
  188. package/src/types/generated/runCode_v3.ts +0 -59
  189. package/src/types/generated/runShell_v3.ts +0 -58
  190. package/src/types/generated/saveCookie_v3.ts +0 -17
  191. package/src/types/generated/screenshot_v3.ts +0 -76
  192. package/src/types/generated/sourceIntegration_v3.ts +0 -31
  193. package/src/types/generated/spec_v3.ts +0 -166
  194. package/src/types/generated/step_v3.ts +0 -1288
  195. package/src/types/generated/stopRecord_v3.ts +0 -10
  196. package/src/types/generated/test_v3.ts +0 -3048
  197. package/src/types/generated/type_v3.ts +0 -56
  198. package/src/types/generated/wait_v3.ts +0 -13
  199. package/src/validate.ts +0 -627
  200. package/tsconfig.json +0 -22
@@ -1,118 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "typeKeys",
4
- "description": "Type keys. To type special keys, begin and end the string with `$` and use the special key's keyword. For example, to type the Escape key, enter `$ESCAPE$`.",
5
- "anyOf": [
6
- {
7
- "$ref": "#/components/schemas/keys"
8
- },
9
- {
10
- "$ref": "#/components/schemas/object"
11
- }
12
- ],
13
- "components": {
14
- "schemas": {
15
- "keys": {
16
- "title": "Type keys (simple)",
17
- "description": "Sequence of keys to enter.",
18
- "anyOf": [
19
- {
20
- "type": "string"
21
- },
22
- {
23
- "type": "array",
24
- "items": {
25
- "anyOf": [
26
- {
27
- "type": "string"
28
- }
29
- ]
30
- }
31
- }
32
- ]
33
- },
34
- "object": {
35
- "title": "Type keys (detailed)",
36
- "type": "object",
37
- "properties": {
38
- "keys": {
39
- "$ref": "#/components/schemas/keys"
40
- },
41
- "inputDelay": {
42
- "type": "number",
43
- "description": "Delay in milliseconds between each key press during a recording",
44
- "default": 100
45
- },
46
- "selector": {
47
- "type": "string",
48
- "description": "Selector for the element to type into. If not specified, the typing occurs in the active element."
49
- },
50
- "elementText": {
51
- "type": "string",
52
- "description": "Display text of the element to type into. If combined with other element finding fields, the element must match all specified criteria."
53
- },
54
- "elementId": {
55
- "type": "string",
56
- "description": "ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
57
- },
58
- "elementTestId": {
59
- "type": "string",
60
- "description": "data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
61
- },
62
- "elementClass": {
63
- "anyOf": [
64
- {
65
- "type": "string"
66
- },
67
- {
68
- "type": "array",
69
- "items": {
70
- "type": "string"
71
- }
72
- }
73
- ],
74
- "description": "Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes."
75
- },
76
- "elementAttribute": {
77
- "type": "object",
78
- "description": "Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence.",
79
- "additionalProperties": {
80
- "anyOf": [
81
- {
82
- "type": "string"
83
- },
84
- {
85
- "type": "number"
86
- },
87
- {
88
- "type": "boolean"
89
- }
90
- ]
91
- }
92
- },
93
- "elementAria": {
94
- "type": "string",
95
- "description": "Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax."
96
- }
97
- },
98
- "required": ["keys"],
99
- "additionalProperties": false
100
- }
101
- }
102
- },
103
- "examples": [
104
- "kittens",
105
- ["$ENTER$"],
106
- ["kittens", "$ENTER$"],
107
- {
108
- "keys": "kittens"
109
- },
110
- {
111
- "keys": ["$ENTER$"]
112
- },
113
- {
114
- "keys": ["kittens", "$ENTER$"],
115
- "inputDelay": 500
116
- }
117
- ]
118
- }
@@ -1,42 +0,0 @@
1
- {
2
- "title": "wait",
3
- "type": "object",
4
- "description": "Pause before performing the next action.",
5
- "properties": {
6
- "action": {
7
- "type": "string",
8
- "const": "wait"
9
- },
10
- "css": {
11
- "type": "string",
12
- "description": "CSS selector that uniquely identified the element to find."
13
- },
14
- "duration": {
15
- "type": "number",
16
- "description": "Seconds to wait. If `css` is set, the maximum duration to wait for the element to become available.",
17
- "default": 10000
18
- }
19
- },
20
- "required": [
21
- "action"
22
- ],
23
- "additionalProperties": false,
24
- "examples": [
25
- {
26
- "action": "wait"
27
- },
28
- {
29
- "action": "wait",
30
- "css": "[title=Search]"
31
- },
32
- {
33
- "action": "wait",
34
- "duration": 5000
35
- },
36
- {
37
- "action": "wait",
38
- "css": "[title=Search]",
39
- "duration": 5000
40
- }
41
- ]
42
- }
@@ -1,41 +0,0 @@
1
- {
2
- "title": "wait",
3
- "type": "object",
4
- "description": "Pause before performing the next action.",
5
- "properties": {
6
- "id": {
7
- "type": "string",
8
- "description": "ID of the step."
9
- },
10
- "description": {
11
- "type": "string",
12
- "description": "Description of the step."
13
- },
14
- "action": {
15
- "type": "string",
16
- "const": "wait",
17
- "description": "The action to perform."
18
- },
19
- "duration": {
20
- "type": "number",
21
- "description": "Milliseconds to wait.",
22
- "default": 5000
23
- }
24
- },
25
- "dynamicDefaults": {
26
- "id": "uuid"
27
- },
28
- "required": [
29
- "action"
30
- ],
31
- "additionalProperties": false,
32
- "examples": [
33
- {
34
- "action": "wait"
35
- },
36
- {
37
- "action": "wait",
38
- "duration": 5000
39
- }
40
- ]
41
- }
@@ -1,36 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "wait",
4
- "description": "Pause (in milliseconds) before performing the next action.",
5
- "default": 5000,
6
- "anyOf": [
7
- {
8
- "type": "number",
9
- "title": "Wait (simple)"
10
- },
11
- {
12
- "$ref": "#/components/schemas/string"
13
- },
14
- {
15
- "type": "boolean",
16
- "title": "Wait (boolean)"
17
- }
18
- ],
19
- "components": {
20
- "schemas": {
21
- "string": {
22
- "title": "Wait (environment variable)",
23
- "type": "string",
24
- "pattern": "^\\$[A-Za-z0-9_]+$",
25
- "transform": [
26
- "trim"
27
- ]
28
- }
29
- }
30
- },
31
- "examples": [
32
- 5000,
33
- "$WAIT_DURATION",
34
- true
35
- ]
36
- }
@@ -1,29 +0,0 @@
1
- /* eslint-disable */
2
- /**
3
- * Auto-generated from checkLink_v3.schema.json
4
- * Do not edit manually
5
- */
6
-
7
- export type CheckLink = CheckLinkDetailed | CheckLinkDetailed1;
8
- /**
9
- * Check if an HTTP or HTTPS URL returns an acceptable status code from a GET request.
10
- */
11
- export type CheckLinkDetailed = string;
12
-
13
- /**
14
- * Check if an HTTP or HTTPS URL returns an acceptable status code from a GET request.
15
- */
16
- export interface CheckLinkDetailed1 {
17
- /**
18
- * URL to check. Can be a full URL or a path. If a path is provided, `origin` must be specified.
19
- */
20
- url: string;
21
- /**
22
- * Protocol and domain to navigate to. Prepended to `url`.
23
- */
24
- origin?: string;
25
- /**
26
- * Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.
27
- */
28
- statusCodes?: number | number[];
29
- }
@@ -1,17 +0,0 @@
1
- /* eslint-disable */
2
- /**
3
- * Auto-generated from click_v3.schema.json
4
- * Do not edit manually
5
- */
6
-
7
- /**
8
- * Click or tap an element.
9
- */
10
- export type Click = ClickElementSimple | ClickElementDetailed | boolean;
11
- /**
12
- * Identifier for the element to click. Can be a selector, element text, ARIA name, ID, or test ID.
13
- */
14
- export type ClickElementSimple = string;
15
- export type ClickElementDetailed = {
16
- [k: string]: unknown;
17
- };
@@ -1,405 +0,0 @@
1
- /* eslint-disable */
2
- /**
3
- * Auto-generated from config_v3.schema.json
4
- * Do not edit manually
5
- */
6
-
7
- /**
8
- * Load environment variables from the specified `.env` file.
9
- */
10
- export type LoadVariables = string;
11
- export type FileTypePredefined = "markdown" | "asciidoc" | "html" | "dita";
12
- export type FileTypeCustom =
13
- | {
14
- [k: string]: unknown;
15
- }
16
- | {
17
- [k: string]: unknown;
18
- };
19
- /**
20
- * Perform a native shell command.
21
- */
22
- export type RunShell = RunShellCommandSimple | RunShellCommandDetailed;
23
- /**
24
- * Command to perform in the machine's default shell.
25
- */
26
- export type RunShellCommandSimple = string;
27
- /**
28
- * OpenAPI description and configuration.
29
- */
30
- export type OpenApi = {
31
- [k: string]: unknown;
32
- };
33
- /**
34
- * Configuration for Heretto CMS integrations. Each entry specifies a Heretto instance and a scenario to build and test.
35
- */
36
- export type HerettoCMSIntegrations = HerettoCMSIntegration[];
37
-
38
- /**
39
- * Configuration options for Doc Detective operations.
40
- */
41
- export interface Config {
42
- /**
43
- * JSON Schema for this object.
44
- */
45
- $schema?: "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/config_v3.schema.json";
46
- /**
47
- * Identifier for the configuration.
48
- */
49
- configId?: string;
50
- /**
51
- * Path to the configuration file.
52
- */
53
- configPath?: string;
54
- /**
55
- * Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.
56
- */
57
- input?: string | [string, ...string[]];
58
- /**
59
- * Path of the directory in which to store the output of Doc Detective commands. If a file path is specified, Doc Detective attempts to honor the file name specified, but file path behavior is controlled by the configured reporters.
60
- */
61
- output?: string;
62
- /**
63
- * If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specifications and source files.
64
- */
65
- recursive?: boolean;
66
- /**
67
- * Whether paths should be interpreted as relative to the current working directory (`cwd`) or to the file in which they're specified (`file`).
68
- */
69
- relativePathBase?: "cwd" | "file";
70
- loadVariables?: LoadVariables;
71
- /**
72
- * Default protocol and domain to use for relative URLs.
73
- */
74
- origin?: string;
75
- /**
76
- * Path(s) to test specifications to perform before those specified by `input`. Useful for setting up testing environments.
77
- */
78
- beforeAny?: string | string[];
79
- /**
80
- * Path(s) to test specifications to perform after those specified by `input`. Useful for cleaning up testing environments.
81
- */
82
- afterAll?: string | string[];
83
- /**
84
- * Whether or not to detect steps in input files based on defined markup.
85
- */
86
- detectSteps?: boolean;
87
- /**
88
- * Whether or not to run potentially unsafe steps, such as those that might modify files or system state.
89
- */
90
- allowUnsafeSteps?: boolean;
91
- /**
92
- * If `true`, crawls sitemap.xml files specified by URL to find additional files to test.
93
- */
94
- crawl?: boolean;
95
- /**
96
- * If `true`, processes DITA maps and includes generated files as inputs.
97
- */
98
- processDitaMaps?: boolean;
99
- /**
100
- * Amount of detail to output when performing an operation.
101
- */
102
- logLevel?: "silent" | "error" | "warning" | "info" | "debug";
103
- /**
104
- * Contexts to run the test in. Overrides contexts defined at the config and spec levels.
105
- */
106
- runOn?: Context[];
107
- /**
108
- * Configuration for file types and their markup detection.
109
- */
110
- fileTypes?: [
111
- FileTypePredefined | FileTypeCustom | FileTypeExecutable,
112
- ...(FileTypePredefined | FileTypeCustom | FileTypeExecutable)[],
113
- ];
114
- integrations?: IntegrationsOptions;
115
- telemetry?: TelemetryOptions;
116
- /**
117
- * Number of concurrent test runners. Set to true to use CPU core count (capped at 4).
118
- */
119
- concurrentRunners?: number | boolean;
120
- environment?: EnvironmentDetails;
121
- /**
122
- * Enable debugging mode. `true` allows pausing on breakpoints, waiting for user input before continuing. `stepThrough` pauses at every step, waiting for user input before continuing. `false` disables all debugging.
123
- */
124
- debug?: boolean | "stepThrough";
125
- }
126
- /**
127
- * A context in which to perform tests. If no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. For example, if a browser isn't specified but is required by steps in the test, Doc Detective will search for and use a supported browser available in the current environment.
128
- */
129
- export interface Context {
130
- /**
131
- * JSON Schema for this object.
132
- */
133
- $schema?: "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/context_v3.schema.json";
134
- /**
135
- * Unique identifier for the context.
136
- */
137
- contextId?: string;
138
- /**
139
- * Platforms to run tests on.
140
- */
141
- platforms?: ("linux" | "mac" | "windows") | ("linux" | "mac" | "windows")[];
142
- /**
143
- * Browsers to run tests on.
144
- */
145
- browsers?:
146
- | ("chrome" | "firefox" | "safari" | "webkit")
147
- | Browser
148
- | (("chrome" | "firefox" | "safari" | "webkit") | Browser1)[];
149
- }
150
- /**
151
- * Browser configuration.
152
- */
153
- export interface Browser {
154
- /**
155
- * Name of the browser.
156
- */
157
- name: "chrome" | "firefox" | "safari" | "webkit";
158
- /**
159
- * If `true`, runs the browser in headless mode.
160
- */
161
- headless?: boolean;
162
- window?: BrowserWindow;
163
- viewport?: BrowserViewport;
164
- }
165
- /**
166
- * Browser dimensions.
167
- */
168
- export interface BrowserWindow {
169
- /**
170
- * Width of the browser window in pixels.
171
- */
172
- width?: number;
173
- /**
174
- * Height of the browser window in pixels.
175
- */
176
- height?: number;
177
- }
178
- /**
179
- * Viewport dimensions.
180
- */
181
- export interface BrowserViewport {
182
- /**
183
- * Width of the viewport in pixels.
184
- */
185
- width?: number;
186
- /**
187
- * Height of the viewport in pixels.
188
- */
189
- height?: number;
190
- }
191
- /**
192
- * Browser configuration.
193
- */
194
- export interface Browser1 {
195
- /**
196
- * Name of the browser.
197
- */
198
- name: "chrome" | "firefox" | "safari" | "webkit";
199
- /**
200
- * If `true`, runs the browser in headless mode.
201
- */
202
- headless?: boolean;
203
- window?: BrowserWindow1;
204
- viewport?: BrowserViewport1;
205
- }
206
- /**
207
- * Browser dimensions.
208
- */
209
- export interface BrowserWindow1 {
210
- /**
211
- * Width of the browser window in pixels.
212
- */
213
- width?: number;
214
- /**
215
- * Height of the browser window in pixels.
216
- */
217
- height?: number;
218
- }
219
- /**
220
- * Viewport dimensions.
221
- */
222
- export interface BrowserViewport1 {
223
- /**
224
- * Width of the viewport in pixels.
225
- */
226
- width?: number;
227
- /**
228
- * Height of the viewport in pixels.
229
- */
230
- height?: number;
231
- }
232
- export interface FileTypeExecutable {
233
- /**
234
- * File extensions to use with type.
235
- */
236
- extensions: string | [string, ...string[]];
237
- /**
238
- * `runShell` step to perform for this file type. Use $1 as a placeholder for the file path.
239
- */
240
- runShell?: RunShell;
241
- [k: string]: unknown;
242
- }
243
- export interface RunShellCommandDetailed {
244
- /**
245
- * Command to perform in the machine's default shell.
246
- */
247
- command: string;
248
- /**
249
- * Arguments for the command.
250
- */
251
- args?: string[];
252
- /**
253
- * Working directory for the command.
254
- */
255
- workingDirectory?: string;
256
- /**
257
- * Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.
258
- */
259
- exitCodes?: number[];
260
- /**
261
- * Content expected in the command's stdout or stderr. If the expected content can't be found in the command's stdout or stderr, the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.* /`.
262
- */
263
- stdio?: string;
264
- /**
265
- * File path to save the command's output, relative to `directory`.
266
- */
267
- path?: string;
268
- /**
269
- * Directory to save the command's output. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory.
270
- */
271
- directory?: string;
272
- /**
273
- * Allowed variation as a fraction (0 to 1) of text different between the current output and previously saved output. For example, 0.1 means 10%. If the difference between the current output and the previous output is greater than `maxVariation`, the step fails. If output doesn't exist at `path`, this value is ignored.
274
- */
275
- maxVariation?: number;
276
- /**
277
- * If `true`, overwrites the existing output at `path` if it exists.
278
- * If `aboveVariation`, overwrites the existing output at `path` if the difference between the new output and the existing output is greater than `maxVariation`.
279
- */
280
- overwrite?: "true" | "false" | "aboveVariation";
281
- /**
282
- * Max time in milliseconds the command is allowed to run. If the command runs longer than this, the step fails.
283
- */
284
- timeout?: number;
285
- }
286
- /**
287
- * Options for connecting to external services.
288
- */
289
- export interface IntegrationsOptions {
290
- openApi?: (OpenApi & OpenAPIDescriptionTest)[];
291
- docDetectiveApi?: DocDetectiveOrchestrationAPI;
292
- heretto?: HerettoCMSIntegrations;
293
- }
294
- export interface OpenAPIDescriptionTest {
295
- [k: string]: unknown;
296
- }
297
- /**
298
- * Configuration for Doc Detective Orchestration API integration.
299
- */
300
- export interface DocDetectiveOrchestrationAPI {
301
- /**
302
- * API key for authenticating with the Doc Detective Orchestration API.
303
- */
304
- apiKey?: string;
305
- }
306
- export interface HerettoCMSIntegration {
307
- /**
308
- * Unique identifier for this Heretto integration. Used in logs and results.
309
- */
310
- name: string;
311
- /**
312
- * The organization subdomain used to access Heretto CCMS (e.g., 'thunderbird' for thunderbird.heretto.com).
313
- */
314
- organizationId: string;
315
- /**
316
- * Heretto CCMS username (email address) for API authentication.
317
- */
318
- username: string;
319
- /**
320
- * API token generated in Heretto CCMS for authentication. See https://help.heretto.com/en/heretto-ccms/api/ccms-api-authentication/basic-authentication#ariaid-title3
321
- */
322
- apiToken: string;
323
- /**
324
- * Name of the scenario to build and test.
325
- */
326
- scenarioName?: string;
327
- /**
328
- * Local path where Heretto content was downloaded. Set automatically during processing.
329
- */
330
- outputPath?: string;
331
- /**
332
- * Mapping of local file paths to Heretto file metadata. Set automatically during content loading.
333
- */
334
- fileMapping?: {
335
- [k: string]: {
336
- /**
337
- * The UUID of the file in Heretto.
338
- */
339
- fileId?: string;
340
- /**
341
- * The path of the file in Heretto.
342
- */
343
- filePath?: string;
344
- [k: string]: unknown;
345
- };
346
- };
347
- /**
348
- * If `true`, uploads changed screenshots and other media files back to Heretto CMS after test execution.
349
- */
350
- uploadOnChange?: boolean;
351
- /**
352
- * Mapping of Heretto file paths to their UUIDs and metadata. Set automatically during content loading by fetching ditamap resource dependencies.
353
- */
354
- resourceDependencies?: {
355
- [k: string]: {
356
- /**
357
- * The UUID of the file in Heretto.
358
- */
359
- uuid?: string;
360
- /**
361
- * The full xmldb path of the file in Heretto.
362
- */
363
- fullPath?: string;
364
- /**
365
- * The file name.
366
- */
367
- name?: string;
368
- /**
369
- * The UUID of the parent folder in Heretto.
370
- */
371
- parentFolderId?: string;
372
- [k: string]: unknown;
373
- };
374
- };
375
- }
376
- /**
377
- * Options around sending telemetry for Doc Detective usage.
378
- */
379
- export interface TelemetryOptions {
380
- /**
381
- * If `true`, sends Doc Detective telemetry.
382
- */
383
- send: boolean;
384
- /**
385
- * Identifier for the organization, group, or individual running Doc Detective.
386
- */
387
- userId?: string;
388
- }
389
- /**
390
- * Environment information for the system running Doc Detective.
391
- */
392
- export interface EnvironmentDetails {
393
- /**
394
- * The current working directory of the process running Doc Detective.
395
- */
396
- workingDirectory?: string;
397
- /**
398
- * The operating system type running Doc Detective.
399
- */
400
- platform: "linux" | "mac" | "windows";
401
- /**
402
- * The processor architecture of the system running Doc Detective.
403
- */
404
- arch?: "arm32" | "arm64" | "x32" | "x64";
405
- }