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,149 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "saveCookie",
4
- "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
5
- "anyOf": [
6
- {
7
- "$ref": "#/components/schemas/string"
8
- },
9
- {
10
- "$ref": "#/components/schemas/object"
11
- }
12
- ],
13
- "components": {
14
- "schemas": {
15
- "string": {
16
- "type": "string",
17
- "title": "Cookie name",
18
- "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
19
- "pattern": "^[A-Za-z0-9_./\\-]+$",
20
- "transform": [
21
- "trim"
22
- ]
23
- },
24
- "object": {
25
- "type": "object",
26
- "additionalProperties": false,
27
- "properties": {
28
- "$schema": {
29
- "description": "Optional self-describing schema URI for linters",
30
- "type": "string",
31
- "format": "uri-reference"
32
- },
33
- "name": {
34
- "type": "string",
35
- "title": "Cookie name",
36
- "description": "Name of the specific cookie to save.",
37
- "pattern": "^[A-Za-z0-9_.-]+$",
38
- "transform": [
39
- "trim"
40
- ]
41
- },
42
- "variable": {
43
- "type": "string",
44
- "title": "Environment variable name",
45
- "description": "Environment variable name to store the cookie as JSON string.",
46
- "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
47
- "transform": [
48
- "trim"
49
- ]
50
- },
51
- "path": {
52
- "type": "string",
53
- "title": "Cookie file path",
54
- "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
55
- "transform": [
56
- "trim"
57
- ]
58
- },
59
- "directory": {
60
- "type": "string",
61
- "title": "Directory path",
62
- "description": "Directory to save the cookie file. If not specified, uses output directory.",
63
- "transform": [
64
- "trim"
65
- ]
66
- },
67
- "overwrite": {
68
- "type": "boolean",
69
- "title": "Overwrite existing file",
70
- "description": "Whether to overwrite existing cookie file.",
71
- "default": false
72
- },
73
- "domain": {
74
- "type": "string",
75
- "title": "Cookie domain",
76
- "description": "Specific domain to filter the cookie by (optional).",
77
- "transform": [
78
- "trim"
79
- ]
80
- }
81
- },
82
- "required": [
83
- "name"
84
- ],
85
- "anyOf": [
86
- {
87
- "required": [
88
- "path"
89
- ],
90
- "not": {
91
- "required": [
92
- "variable"
93
- ]
94
- }
95
- },
96
- {
97
- "required": [
98
- "variable"
99
- ],
100
- "not": {
101
- "anyOf": [
102
- {
103
- "required": [
104
- "path"
105
- ]
106
- },
107
- {
108
- "required": [
109
- "directory"
110
- ]
111
- }
112
- ]
113
- }
114
- }
115
- ],
116
- "title": "Save cookie (detailed)"
117
- }
118
- }
119
- },
120
- "examples": [
121
- "session_token",
122
- "test_env_cookie",
123
- {
124
- "name": "auth_cookie",
125
- "path": "auth-cookie.txt"
126
- },
127
- {
128
- "name": "session_token",
129
- "variable": "SESSION_TOKEN"
130
- },
131
- {
132
- "name": "test_cookie",
133
- "path": "test-cookie.txt",
134
- "overwrite": true
135
- },
136
- {
137
- "name": "user_session",
138
- "path": "user-session.txt",
139
- "directory": "./test-data",
140
- "overwrite": true
141
- },
142
- {
143
- "name": "login_token",
144
- "path": "login-token.txt",
145
- "domain": "app.example.com"
146
- }
147
- ],
148
- "$id": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/src_schemas/saveCookie_v3.schema.json"
149
- }
@@ -1,150 +0,0 @@
1
- {
2
- "title": "saveScreenshot",
3
- "type": "object",
4
- "description": "Takes a screenshot in PNG format.",
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": "saveScreenshot",
17
- "description": "The action to perform."
18
- },
19
- "path": {
20
- "type": "string",
21
- "description": "File path of the PNG file, relative to `directory`. If not specified, the file name is the ID of the step.",
22
- "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
23
- },
24
- "directory": {
25
- "type": "string",
26
- "description": "Directory of the PNG file. If the directory doesn't exist, creates the directory."
27
- },
28
- "maxVariation": {
29
- "type": "number",
30
- "description": "Allowed variation in percentage of pixels between the new screenshot and the existing screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
31
- "default": 5,
32
- "minimum": 0,
33
- "maximum": 100
34
- },
35
- "overwrite": {
36
- "type": "string",
37
- "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
38
- "enum": [
39
- "true",
40
- "false",
41
- "byVariation"
42
- ],
43
- "default": "false"
44
- },
45
- "crop": {
46
- "type": "object",
47
- "description": "Crops the screenshot.",
48
- "properties": {
49
- "selector": {
50
- "type": "string",
51
- "description": "Selector of the element to crop the image to."
52
- },
53
- "padding": {
54
- "oneOf": [
55
- {
56
- "type": "number",
57
- "description": "Padding in pixels to add to the bounds of the element.",
58
- "minimum": 0
59
- },
60
- {
61
- "type": "object",
62
- "properties": {
63
- "top": {
64
- "type": "number",
65
- "minimum": 0
66
- },
67
- "right": {
68
- "type": "number",
69
- "minimum": 0
70
- },
71
- "bottom": {
72
- "type": "number",
73
- "minimum": 0
74
- },
75
- "left": {
76
- "type": "number",
77
- "minimum": 0
78
- }
79
- }
80
- }
81
- ]
82
- }
83
- },
84
- "required": [
85
- "selector"
86
- ],
87
- "additionalProperties": false
88
- }
89
- },
90
- "dynamicDefaults": {
91
- "id": "uuid"
92
- },
93
- "required": [
94
- "action"
95
- ],
96
- "additionalProperties": false,
97
- "examples": [
98
- {
99
- "action": "saveScreenshot"
100
- },
101
- {
102
- "action": "saveScreenshot",
103
- "path": "results.png"
104
- },
105
- {
106
- "action": "saveScreenshot",
107
- "path": "results.png",
108
- "directory": "static/images"
109
- },
110
- {
111
- "action": "saveScreenshot",
112
- "path": "results.png",
113
- "directory": "static/images",
114
- "maxVariation": 10,
115
- "overwrite": "byVariation"
116
- },
117
- {
118
- "action": "saveScreenshot",
119
- "path": "results.png",
120
- "directory": "static/images",
121
- "crop": {
122
- "selector": "#element"
123
- }
124
- },
125
- {
126
- "action": "saveScreenshot",
127
- "path": "results.png",
128
- "directory": "static/images",
129
- "crop": {
130
- "selector": "#element",
131
- "padding": 10
132
- }
133
- },
134
- {
135
- "action": "saveScreenshot",
136
- "path": "results.png",
137
- "directory": "static/images",
138
- "crop": {
139
- "selector": "#element",
140
- "padding": {
141
- "top": 10,
142
- "right": 20,
143
- "bottom": 30,
144
- "left": 40
145
- }
146
- }
147
- }
148
- ],
149
- "$id": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/src_schemas/saveScreenshot_v2.schema.json"
150
- }
@@ -1,250 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "screenshot",
4
- "description": "Takes a screenshot in PNG format.",
5
- "anyOf": [
6
- {
7
- "$ref": "#/components/schemas/path"
8
- },
9
- {
10
- "$ref": "#/components/schemas/object"
11
- },
12
- {
13
- "type": "boolean",
14
- "title": "Capture screenshot",
15
- "description": "If `true`, captures a screenshot. If `false`, doesn't capture a screenshot."
16
- }
17
- ],
18
- "components": {
19
- "schemas": {
20
- "path": {
21
- "title": "Screenshot (simple)",
22
- "description": "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
23
- "type": "string",
24
- "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
25
- "transform": [
26
- "trim"
27
- ]
28
- },
29
- "object": {
30
- "type": "object",
31
- "additionalProperties": false,
32
- "properties": {
33
- "path": {
34
- "$ref": "#/components/schemas/path"
35
- },
36
- "directory": {
37
- "type": "string",
38
- "description": "Directory of the PNG file. If the directory doesn't exist, creates the directory.",
39
- "transform": [
40
- "trim"
41
- ]
42
- },
43
- "maxVariation": {
44
- "type": "number",
45
- "description": "Allowed variation in percentage of pixels between the new screenshot and the existing screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
46
- "default": 0.05,
47
- "minimum": 0,
48
- "maximum": 1
49
- },
50
- "overwrite": {
51
- "type": "string",
52
- "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `aboveVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
53
- "enum": [
54
- "true",
55
- "false",
56
- "aboveVariation"
57
- ],
58
- "default": "aboveVariation"
59
- },
60
- "crop": {
61
- "anyOf": [
62
- {
63
- "title": "Crop by element (simple)",
64
- "type": "string",
65
- "description": "Display text or selector of the element to screenshot."
66
- },
67
- {
68
- "$ref": "#/components/schemas/crop_element"
69
- }
70
- ]
71
- },
72
- "sourceIntegration": {
73
- "description": "Information about the source integration for this screenshot, enabling upload of changed files back to the source CMS. Set automatically during test resolution for files from integrations.",
74
- "$ref": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/build/sourceIntegration_v3.schema.json#"
75
- }
76
- },
77
- "title": "Capture screenshot (detailed)"
78
- },
79
- "crop_element": {
80
- "title": "Crop by element (detailed)",
81
- "type": "object",
82
- "description": "Crop the screenshot to a specific element.",
83
- "additionalProperties": false,
84
- "anyOf": [
85
- {
86
- "required": [
87
- "selector"
88
- ]
89
- },
90
- {
91
- "required": [
92
- "elementText"
93
- ]
94
- },
95
- {
96
- "required": [
97
- "elementId"
98
- ]
99
- },
100
- {
101
- "required": [
102
- "elementTestId"
103
- ]
104
- },
105
- {
106
- "required": [
107
- "elementClass"
108
- ]
109
- },
110
- {
111
- "required": [
112
- "elementAttribute"
113
- ]
114
- },
115
- {
116
- "required": [
117
- "elementAria"
118
- ]
119
- }
120
- ],
121
- "properties": {
122
- "elementText": {
123
- "type": "string",
124
- "description": "Display text of the element to screenshot."
125
- },
126
- "selector": {
127
- "type": "string",
128
- "description": "Selector of the element to screenshot."
129
- },
130
- "elementId": {
131
- "type": "string",
132
- "description": "ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
133
- },
134
- "elementTestId": {
135
- "type": "string",
136
- "description": "data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
137
- },
138
- "elementClass": {
139
- "anyOf": [
140
- {
141
- "type": "string"
142
- },
143
- {
144
- "type": "array",
145
- "items": {
146
- "type": "string"
147
- }
148
- }
149
- ],
150
- "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."
151
- },
152
- "elementAttribute": {
153
- "type": "object",
154
- "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.",
155
- "additionalProperties": {
156
- "anyOf": [
157
- {
158
- "type": "string"
159
- },
160
- {
161
- "type": "number"
162
- },
163
- {
164
- "type": "boolean"
165
- }
166
- ]
167
- }
168
- },
169
- "elementAria": {
170
- "type": "string",
171
- "description": "Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax."
172
- },
173
- "padding": {
174
- "anyOf": [
175
- {
176
- "title": "Padding (simple)",
177
- "type": "number",
178
- "description": "Padding in pixels to add to the bounds of the element.",
179
- "minimum": 0
180
- },
181
- {
182
- "$ref": "#/components/schemas/padding"
183
- }
184
- ]
185
- }
186
- }
187
- },
188
- "padding": {
189
- "type": "object",
190
- "additionalProperties": false,
191
- "properties": {
192
- "top": {
193
- "type": "number",
194
- "minimum": 0
195
- },
196
- "right": {
197
- "type": "number",
198
- "minimum": 0
199
- },
200
- "bottom": {
201
- "type": "number",
202
- "minimum": 0
203
- },
204
- "left": {
205
- "type": "number",
206
- "minimum": 0
207
- }
208
- },
209
- "title": "Padding (detailed)",
210
- "description": "Padding in pixels to add to the bounds of the element."
211
- }
212
- }
213
- },
214
- "examples": [
215
- true,
216
- "image.png",
217
- "static/images/image.png",
218
- "/User/manny/projects/doc-detective/static/images/image.png",
219
- {
220
- "path": "image.png",
221
- "directory": "static/images",
222
- "maxVariation": 0.1,
223
- "overwrite": "aboveVariation",
224
- "crop": "#elementToScreenshot"
225
- },
226
- {
227
- "path": "image.png",
228
- "directory": "static/images",
229
- "maxVariation": 0.1,
230
- "overwrite": "aboveVariation"
231
- },
232
- {
233
- "path": "image.png",
234
- "directory": "static/images",
235
- "maxVariation": 0.1,
236
- "overwrite": "aboveVariation",
237
- "crop": {
238
- "selector": "#elementToScreenshot",
239
- "elementText": "Element text",
240
- "padding": {
241
- "top": 0,
242
- "right": 0,
243
- "bottom": 0,
244
- "left": 0
245
- }
246
- }
247
- }
248
- ],
249
- "$id": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/src_schemas/screenshot_v3.schema.json"
250
- }
@@ -1,39 +0,0 @@
1
- {
2
- "title": "setVariables",
3
- "type": "object",
4
- "description": "Load environment variables from a `.env` file.",
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": "setVariables",
17
- "description": "Action to perform."
18
- },
19
- "path": {
20
- "type": "string",
21
- "description": "Path to the `.env` file."
22
- }
23
- },
24
- "dynamicDefaults": {
25
- "id": "uuid"
26
- },
27
- "required": [
28
- "action",
29
- "path"
30
- ],
31
- "additionalProperties": false,
32
- "examples": [
33
- {
34
- "action": "setVariables",
35
- "path": ".env"
36
- }
37
- ],
38
- "$id": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/src_schemas/setVariables_v2.schema.json"
39
- }
@@ -1,51 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "sourceIntegration",
4
- "description": "Information about the source integration for a file, enabling upload of changed files back to the source CMS.",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": [
8
- "type",
9
- "integrationName"
10
- ],
11
- "properties": {
12
- "type": {
13
- "type": "string",
14
- "description": "The type of integration. Currently supported: 'heretto'. Additional types may be added in the future.",
15
- "enum": [
16
- "heretto"
17
- ]
18
- },
19
- "integrationName": {
20
- "type": "string",
21
- "description": "The name of the integration configuration in the config file. Used to look up authentication credentials."
22
- },
23
- "fileId": {
24
- "type": "string",
25
- "description": "The unique identifier (UUID) of the file in the source CMS. If not provided, the file will be looked up by path."
26
- },
27
- "filePath": {
28
- "type": "string",
29
- "description": "The path of the file in the source CMS. Used for lookup if fileId is not available."
30
- },
31
- "contentPath": {
32
- "type": "string",
33
- "description": "The local path to the file that references this source. Used for resolving relative paths."
34
- }
35
- },
36
- "examples": [
37
- {
38
- "type": "heretto",
39
- "integrationName": "my-heretto",
40
- "fileId": "8f3ed200-cbba-11e1-ac51-c82a1446d15c",
41
- "filePath": "/db/organizations/example/repositories/docs/images/screenshot.png"
42
- },
43
- {
44
- "type": "heretto",
45
- "integrationName": "my-heretto",
46
- "filePath": "images/screenshot.png",
47
- "contentPath": "/tmp/doc-detective/heretto_abc123/topic.dita"
48
- }
49
- ],
50
- "$id": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/src_schemas/sourceIntegration_v3.schema.json"
51
- }