doc-detective-common 1.21.1-dev.1 → 1.22.0-dev.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.
- package/.coderabbit.yaml +92 -0
- package/package.json +7 -7
- package/src/schemas/dereferenceSchemas.js +1 -1
- package/src/schemas/output_schemas/config_v2.schema.json +48 -72
- package/src/schemas/output_schemas/context_v2.schema.json +133 -113
- package/src/schemas/output_schemas/find_v2.schema.json +183 -157
- package/src/schemas/output_schemas/runCode_v2.schema.json +205 -0
- package/src/schemas/output_schemas/spec_v2.schema.json +69 -68
- package/src/schemas/output_schemas/test_v2.schema.json +1702 -1656
- package/src/schemas/schemas.json +418 -184
- package/src/schemas/src_schemas/config_v2.schema.json +0 -28
- package/src/schemas/src_schemas/context_v2.schema.json +18 -0
- package/src/schemas/src_schemas/find_v2.schema.json +24 -2
- package/src/schemas/src_schemas/runCode_v2.schema.json +186 -0
- package/src/schemas/src_schemas/spec_v2.schema.json +1 -51
- package/src/schemas/output_schemas/arazzo_v2.schema.json +0 -40
- package/src/schemas/src_schemas/arazzo_v2.schema.json +0 -42
package/.coderabbit.yaml
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
language: en-US
|
|
2
|
+
tone_instructions: ''
|
|
3
|
+
early_access: false
|
|
4
|
+
enable_free_tier: true
|
|
5
|
+
reviews:
|
|
6
|
+
profile: chill
|
|
7
|
+
request_changes_workflow: false
|
|
8
|
+
high_level_summary: true
|
|
9
|
+
high_level_summary_placeholder: '@coderabbitai summary'
|
|
10
|
+
auto_title_placeholder: '@coderabbitai'
|
|
11
|
+
review_status: true
|
|
12
|
+
commit_status: true
|
|
13
|
+
poem: true
|
|
14
|
+
collapse_walkthrough: false
|
|
15
|
+
sequence_diagrams: true
|
|
16
|
+
changed_files_summary: true
|
|
17
|
+
labeling_instructions: []
|
|
18
|
+
path_filters: []
|
|
19
|
+
path_instructions: []
|
|
20
|
+
abort_on_close: true
|
|
21
|
+
auto_review:
|
|
22
|
+
enabled: true
|
|
23
|
+
auto_incremental_review: true
|
|
24
|
+
ignore_title_keywords: []
|
|
25
|
+
labels: []
|
|
26
|
+
drafts: false
|
|
27
|
+
base_branches: ["rc"]
|
|
28
|
+
tools:
|
|
29
|
+
shellcheck:
|
|
30
|
+
enabled: true
|
|
31
|
+
ruff:
|
|
32
|
+
enabled: true
|
|
33
|
+
markdownlint:
|
|
34
|
+
enabled: true
|
|
35
|
+
github-checks:
|
|
36
|
+
enabled: true
|
|
37
|
+
timeout_ms: 90000
|
|
38
|
+
languagetool:
|
|
39
|
+
enabled: true
|
|
40
|
+
enabled_only: false
|
|
41
|
+
level: default
|
|
42
|
+
biome:
|
|
43
|
+
enabled: true
|
|
44
|
+
hadolint:
|
|
45
|
+
enabled: true
|
|
46
|
+
swiftlint:
|
|
47
|
+
enabled: true
|
|
48
|
+
phpstan:
|
|
49
|
+
enabled: true
|
|
50
|
+
level: default
|
|
51
|
+
golangci-lint:
|
|
52
|
+
enabled: true
|
|
53
|
+
yamllint:
|
|
54
|
+
enabled: true
|
|
55
|
+
gitleaks:
|
|
56
|
+
enabled: true
|
|
57
|
+
checkov:
|
|
58
|
+
enabled: true
|
|
59
|
+
detekt:
|
|
60
|
+
enabled: true
|
|
61
|
+
eslint:
|
|
62
|
+
enabled: true
|
|
63
|
+
rubocop:
|
|
64
|
+
enabled: true
|
|
65
|
+
buf:
|
|
66
|
+
enabled: true
|
|
67
|
+
regal:
|
|
68
|
+
enabled: true
|
|
69
|
+
actionlint:
|
|
70
|
+
enabled: true
|
|
71
|
+
pmd:
|
|
72
|
+
enabled: true
|
|
73
|
+
cppcheck:
|
|
74
|
+
enabled: true
|
|
75
|
+
semgrep:
|
|
76
|
+
enabled: true
|
|
77
|
+
circleci:
|
|
78
|
+
enabled: true
|
|
79
|
+
chat:
|
|
80
|
+
auto_reply: true
|
|
81
|
+
knowledge_base:
|
|
82
|
+
opt_out: false
|
|
83
|
+
learnings:
|
|
84
|
+
scope: auto
|
|
85
|
+
issues:
|
|
86
|
+
scope: auto
|
|
87
|
+
jira:
|
|
88
|
+
project_keys: []
|
|
89
|
+
linear:
|
|
90
|
+
team_keys: []
|
|
91
|
+
pull_requests:
|
|
92
|
+
scope: auto
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-detective-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0-dev.0",
|
|
4
4
|
"description": "Shared components for Doc Detective projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"homepage": "https://github.com/doc-detective/doc-detective-common#readme",
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"chai": "^5.1.2",
|
|
23
|
-
"mocha": "^
|
|
23
|
+
"mocha": "^11.1.0",
|
|
24
24
|
"sinon": "^19.0.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@apidevtools/json-schema-ref-parser": "^11.7.
|
|
28
|
-
"ajv": "
|
|
27
|
+
"@apidevtools/json-schema-ref-parser": "^11.7.3",
|
|
28
|
+
"ajv": "8.16.0",
|
|
29
29
|
"ajv-errors": "^3.0.0",
|
|
30
30
|
"ajv-formats": "^3.0.1",
|
|
31
31
|
"ajv-keywords": "^5.1.0",
|
|
32
|
-
"axios": "^1.7.
|
|
33
|
-
"uuid": "^11.0.
|
|
34
|
-
"yaml": "^2.
|
|
32
|
+
"axios": "^1.7.9",
|
|
33
|
+
"uuid": "^11.0.5",
|
|
34
|
+
"yaml": "^2.7.0"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -18,7 +18,6 @@ async function dereferenceSchemas() {
|
|
|
18
18
|
});
|
|
19
19
|
const outputDir = path.resolve(`${__dirname}/output_schemas`);
|
|
20
20
|
var files = [
|
|
21
|
-
"arazzo_v2.schema.json",
|
|
22
21
|
"checkLink_v2.schema.json",
|
|
23
22
|
"config_v2.schema.json",
|
|
24
23
|
"context_v2.schema.json",
|
|
@@ -28,6 +27,7 @@ async function dereferenceSchemas() {
|
|
|
28
27
|
"moveTo_v2.schema.json",
|
|
29
28
|
"openApi_v2.schema.json",
|
|
30
29
|
"runShell_v2.schema.json",
|
|
30
|
+
"runCode_v2.schema.json",
|
|
31
31
|
"saveScreenshot_v2.schema.json",
|
|
32
32
|
"setVariables_v2.schema.json",
|
|
33
33
|
"startRecording_v2.schema.json",
|
|
@@ -182,6 +182,14 @@
|
|
|
182
182
|
"type": "integer",
|
|
183
183
|
"description": "Height of the window in pixels."
|
|
184
184
|
},
|
|
185
|
+
"viewport_height": {
|
|
186
|
+
"type": "integer",
|
|
187
|
+
"description": "Height of the viewport in pixels. Overrides `height`."
|
|
188
|
+
},
|
|
189
|
+
"viewport_width": {
|
|
190
|
+
"type": "integer",
|
|
191
|
+
"description": "Width of the viewport in pixels. Overrides `width`."
|
|
192
|
+
},
|
|
185
193
|
"headless": {
|
|
186
194
|
"type": "boolean",
|
|
187
195
|
"description": "If `true`, runs the browser in headless mode. Not supported by Safari."
|
|
@@ -221,6 +229,18 @@
|
|
|
221
229
|
"linux"
|
|
222
230
|
]
|
|
223
231
|
},
|
|
232
|
+
{
|
|
233
|
+
"app": {
|
|
234
|
+
"name": "chrome",
|
|
235
|
+
"options": {
|
|
236
|
+
"viewport_width": 800,
|
|
237
|
+
"viewport_height": 600
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"platforms": [
|
|
241
|
+
"linux"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
224
244
|
{
|
|
225
245
|
"app": {
|
|
226
246
|
"name": "firefox",
|
|
@@ -632,9 +652,28 @@
|
|
|
632
652
|
"default": false
|
|
633
653
|
},
|
|
634
654
|
"click": {
|
|
635
|
-
"type": "boolean",
|
|
636
655
|
"description": "Click the element.",
|
|
637
|
-
"
|
|
656
|
+
"oneOf": [
|
|
657
|
+
{
|
|
658
|
+
"type": "boolean",
|
|
659
|
+
"default": false
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"type": "object",
|
|
663
|
+
"additionalProperties": false,
|
|
664
|
+
"properties": {
|
|
665
|
+
"button": {
|
|
666
|
+
"description": "Kind of click to perform.",
|
|
667
|
+
"type": "string",
|
|
668
|
+
"enum": [
|
|
669
|
+
"left",
|
|
670
|
+
"right",
|
|
671
|
+
"middle"
|
|
672
|
+
]
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
]
|
|
638
677
|
},
|
|
639
678
|
"typeKeys": {
|
|
640
679
|
"description": "Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`typeKeys`](typeKeys). To type in the element, make the element active with the `click` parameter.",
|
|
@@ -723,6 +762,13 @@
|
|
|
723
762
|
"click": true,
|
|
724
763
|
"typeKeys": "shorthair cat"
|
|
725
764
|
},
|
|
765
|
+
{
|
|
766
|
+
"action": "find",
|
|
767
|
+
"selector": "[title=Search]",
|
|
768
|
+
"click": {
|
|
769
|
+
"button": "right"
|
|
770
|
+
}
|
|
771
|
+
},
|
|
726
772
|
{
|
|
727
773
|
"action": "find",
|
|
728
774
|
"selector": "[title=Search]",
|
|
@@ -2062,70 +2108,6 @@
|
|
|
2062
2108
|
}
|
|
2063
2109
|
]
|
|
2064
2110
|
}
|
|
2065
|
-
},
|
|
2066
|
-
"arazzo": {
|
|
2067
|
-
"type": "array",
|
|
2068
|
-
"items": {
|
|
2069
|
-
"allOf": [
|
|
2070
|
-
{
|
|
2071
|
-
"version": "1.0.0",
|
|
2072
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
2073
|
-
"title": "arazzo",
|
|
2074
|
-
"type": "object",
|
|
2075
|
-
"description": "Arazzo description and configuration.",
|
|
2076
|
-
"additionalProperties": false,
|
|
2077
|
-
"properties": {
|
|
2078
|
-
"name": {
|
|
2079
|
-
"type": "string",
|
|
2080
|
-
"description": "Name of the Arazzo description, as defined in your configuration."
|
|
2081
|
-
},
|
|
2082
|
-
"descriptionPath": {
|
|
2083
|
-
"type": "string",
|
|
2084
|
-
"description": "URL or local path to the Arazzo description."
|
|
2085
|
-
},
|
|
2086
|
-
"workflowId": {
|
|
2087
|
-
"type": "string",
|
|
2088
|
-
"description": "Unique identifier for the workflow to run. If not specified, runs the first workflow in the Arazzo description."
|
|
2089
|
-
},
|
|
2090
|
-
"inputs": {
|
|
2091
|
-
"type": "object",
|
|
2092
|
-
"description": "Input parameters for the Arazzo description.",
|
|
2093
|
-
"additionalProperties": true
|
|
2094
|
-
}
|
|
2095
|
-
},
|
|
2096
|
-
"examples": [
|
|
2097
|
-
{
|
|
2098
|
-
"descriptionPath": "https://example.com/arazzo.json"
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
"name": "CreateUser",
|
|
2102
|
-
"descriptionPath": "https://www.acme.com/create-user.arazzo.json",
|
|
2103
|
-
"inputs": {
|
|
2104
|
-
"name": "John Doe",
|
|
2105
|
-
"email": "johndoe@acme.com"
|
|
2106
|
-
}
|
|
2107
|
-
}
|
|
2108
|
-
]
|
|
2109
|
-
},
|
|
2110
|
-
{
|
|
2111
|
-
"type": "object",
|
|
2112
|
-
"properties": {
|
|
2113
|
-
"workflowId": {
|
|
2114
|
-
"type": "null",
|
|
2115
|
-
"$commment": "Only allow workflowId at the spec level."
|
|
2116
|
-
},
|
|
2117
|
-
"inputs": {
|
|
2118
|
-
"type": "null",
|
|
2119
|
-
"$commment": "Only allow inputs at the spec level."
|
|
2120
|
-
}
|
|
2121
|
-
},
|
|
2122
|
-
"required": [
|
|
2123
|
-
"name",
|
|
2124
|
-
"descriptionPath"
|
|
2125
|
-
]
|
|
2126
|
-
}
|
|
2127
|
-
]
|
|
2128
|
-
}
|
|
2129
2111
|
}
|
|
2130
2112
|
}
|
|
2131
2113
|
},
|
|
@@ -2248,12 +2230,6 @@
|
|
|
2248
2230
|
"server": "https://api.acme.com",
|
|
2249
2231
|
"mockResponse": true
|
|
2250
2232
|
}
|
|
2251
|
-
],
|
|
2252
|
-
"arazzo": [
|
|
2253
|
-
{
|
|
2254
|
-
"name": "CreateUser",
|
|
2255
|
-
"descriptionPath": "https://www.acme.com/create-user.arazzo.json"
|
|
2256
|
-
}
|
|
2257
2233
|
]
|
|
2258
2234
|
}
|
|
2259
2235
|
},
|
|
@@ -1,114 +1,134 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "context",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"description": "An application and supported platforms.\n\nIf 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 browsers, context priority is Firefox > Chrome > Chromium.",
|
|
5
|
-
"properties": {
|
|
6
|
-
"app": {
|
|
7
|
-
"type": "object",
|
|
8
|
-
"description": "The application to run.",
|
|
9
|
-
"additionalProperties": false,
|
|
10
|
-
"required": [
|
|
11
|
-
"name"
|
|
12
|
-
],
|
|
13
|
-
"properties": {
|
|
14
|
-
"name": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Name of the application.",
|
|
17
|
-
"enum": [
|
|
18
|
-
"chrome",
|
|
19
|
-
"firefox",
|
|
20
|
-
"safari",
|
|
21
|
-
"edge"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
"path": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"description": "Absolute path or command for the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
|
|
27
|
-
},
|
|
28
|
-
"options": {
|
|
29
|
-
"type": "object",
|
|
30
|
-
"description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
|
|
31
|
-
"additionalProperties": false,
|
|
32
|
-
"properties": {
|
|
33
|
-
"width": {
|
|
34
|
-
"type": "integer",
|
|
35
|
-
"description": "Width of the window in pixels."
|
|
36
|
-
},
|
|
37
|
-
"height": {
|
|
38
|
-
"type": "integer",
|
|
39
|
-
"description": "Height of the window in pixels."
|
|
40
|
-
},
|
|
41
|
-
"
|
|
42
|
-
"type": "
|
|
43
|
-
"description": "
|
|
44
|
-
},
|
|
45
|
-
"
|
|
46
|
-
"type": "
|
|
47
|
-
"description": "
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
"app": {
|
|
82
|
-
"name": "
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
{
|
|
2
|
+
"title": "context",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"description": "An application and supported platforms.\n\nIf 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 browsers, context priority is Firefox > Chrome > Chromium.",
|
|
5
|
+
"properties": {
|
|
6
|
+
"app": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"description": "The application to run.",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"required": [
|
|
11
|
+
"name"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"name": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Name of the application.",
|
|
17
|
+
"enum": [
|
|
18
|
+
"chrome",
|
|
19
|
+
"firefox",
|
|
20
|
+
"safari",
|
|
21
|
+
"edge"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"path": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Absolute path or command for the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
|
|
27
|
+
},
|
|
28
|
+
"options": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"width": {
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"description": "Width of the window in pixels."
|
|
36
|
+
},
|
|
37
|
+
"height": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"description": "Height of the window in pixels."
|
|
40
|
+
},
|
|
41
|
+
"viewport_height": {
|
|
42
|
+
"type": "integer",
|
|
43
|
+
"description": "Height of the viewport in pixels. Overrides `height`."
|
|
44
|
+
},
|
|
45
|
+
"viewport_width": {
|
|
46
|
+
"type": "integer",
|
|
47
|
+
"description": "Width of the viewport in pixels. Overrides `width`."
|
|
48
|
+
},
|
|
49
|
+
"headless": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"description": "If `true`, runs the browser in headless mode. Not supported by Safari."
|
|
52
|
+
},
|
|
53
|
+
"driverPath": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Path to the browser driver. If not specified, defaults to internally managed dependencies."
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"platforms": {
|
|
62
|
+
"description": "Supported platforms for the application.",
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": [
|
|
67
|
+
"linux",
|
|
68
|
+
"mac",
|
|
69
|
+
"windows"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": [
|
|
75
|
+
"app",
|
|
76
|
+
"platforms"
|
|
77
|
+
],
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"examples": [
|
|
80
|
+
{
|
|
81
|
+
"app": {
|
|
82
|
+
"name": "chrome"
|
|
83
|
+
},
|
|
84
|
+
"platforms": [
|
|
85
|
+
"linux"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"app": {
|
|
90
|
+
"name": "chrome",
|
|
91
|
+
"options": {
|
|
92
|
+
"viewport_width": 800,
|
|
93
|
+
"viewport_height": 600
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"platforms": [
|
|
97
|
+
"linux"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"app": {
|
|
102
|
+
"name": "firefox",
|
|
103
|
+
"options": {
|
|
104
|
+
"width": 800,
|
|
105
|
+
"height": 600,
|
|
106
|
+
"headless": false,
|
|
107
|
+
"driverPath": "/usr/bin/geckodriver"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"platforms": [
|
|
111
|
+
"linux",
|
|
112
|
+
"windows",
|
|
113
|
+
"mac"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"app": {
|
|
118
|
+
"name": "safari"
|
|
119
|
+
},
|
|
120
|
+
"platforms": [
|
|
121
|
+
"mac"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"app": {
|
|
126
|
+
"name": "firefox",
|
|
127
|
+
"path": "/usr/bin/firefox"
|
|
128
|
+
},
|
|
129
|
+
"platforms": [
|
|
130
|
+
"linux"
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
]
|
|
114
134
|
}
|