doc-detective-common 3.1.2-dev.2 → 3.1.2-dev.3
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/dist/schemas/config_v3.schema.json +1333 -45
- package/dist/schemas/loadCookie_v3.schema.json +225 -0
- package/dist/schemas/report_v3.schema.json +1321 -43
- package/dist/schemas/resolvedTests_v3.schema.json +2642 -76
- package/dist/schemas/saveCookie_v3.schema.json +251 -0
- package/dist/schemas/spec_v3.schema.json +1321 -43
- package/dist/schemas/step_v3.schema.json +639 -0
- package/dist/schemas/test_v3.schema.json +1321 -43
- package/package.json +5 -5
- package/src/schemas/build/config_v3.schema.json +2 -0
- package/src/schemas/build/loadCookie_v3.schema.json +134 -0
- package/src/schemas/build/saveCookie_v3.schema.json +149 -0
- package/src/schemas/build/step_v3.schema.json +59 -0
- package/src/schemas/dereferenceSchemas.js +2 -0
- package/src/schemas/output_schemas/config_v3.schema.json +1333 -45
- package/src/schemas/output_schemas/loadCookie_v3.schema.json +225 -0
- package/src/schemas/output_schemas/report_v3.schema.json +1321 -43
- package/src/schemas/output_schemas/resolvedTests_v3.schema.json +2642 -76
- package/src/schemas/output_schemas/saveCookie_v3.schema.json +251 -0
- package/src/schemas/output_schemas/spec_v3.schema.json +1321 -43
- package/src/schemas/output_schemas/step_v3.schema.json +639 -0
- package/src/schemas/output_schemas/test_v3.schema.json +1321 -43
- package/src/schemas/schemas.json +8810 -7
- package/src/schemas/src_schemas/config_v3.schema.json +2 -0
- package/src/schemas/src_schemas/loadCookie_v3.schema.json +109 -0
- package/src/schemas/src_schemas/saveCookie_v3.schema.json +122 -0
- package/src/schemas/src_schemas/step_v3.schema.json +55 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-detective-common",
|
|
3
|
-
"version": "3.1.2-dev.
|
|
3
|
+
"version": "3.1.2-dev.3",
|
|
4
4
|
"description": "Shared components for Doc Detective projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/doc-detective/doc-detective-common#readme",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"chai": "^5.2.
|
|
23
|
+
"chai": "^5.2.1",
|
|
24
24
|
"mocha": "^11.7.1",
|
|
25
25
|
"sinon": "^21.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@apidevtools/json-schema-ref-parser": "^14.
|
|
28
|
+
"@apidevtools/json-schema-ref-parser": "^14.1.1",
|
|
29
29
|
"ajv": "^8.17.1",
|
|
30
30
|
"ajv-errors": "^3.0.0",
|
|
31
31
|
"ajv-formats": "^3.0.1",
|
|
32
32
|
"ajv-keywords": "^5.1.0",
|
|
33
|
-
"axios": "^1.
|
|
33
|
+
"axios": "^1.11.0",
|
|
34
34
|
"uuid": "^11.1.0",
|
|
35
|
-
"yaml": "^2.8.
|
|
35
|
+
"yaml": "^2.8.1"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "loadCookie",
|
|
4
|
+
"description": "Load a specific cookie from a file or environment variable into the browser.",
|
|
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 or file path",
|
|
18
|
+
"description": "Name of the specific cookie to load from default location, or file path to cookie file.",
|
|
19
|
+
"pattern": "^[A-Za-z0-9_./\\-]+$",
|
|
20
|
+
"transform": [
|
|
21
|
+
"trim"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"object": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": [
|
|
28
|
+
"name"
|
|
29
|
+
],
|
|
30
|
+
"anyOf": [
|
|
31
|
+
{
|
|
32
|
+
"required": [
|
|
33
|
+
"path"
|
|
34
|
+
],
|
|
35
|
+
"not": {
|
|
36
|
+
"required": [
|
|
37
|
+
"variable"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"required": [
|
|
43
|
+
"variable"
|
|
44
|
+
],
|
|
45
|
+
"not": {
|
|
46
|
+
"anyOf": [
|
|
47
|
+
{
|
|
48
|
+
"required": [
|
|
49
|
+
"path"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"required": [
|
|
54
|
+
"directory"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"properties": {
|
|
62
|
+
"$schema": {
|
|
63
|
+
"description": "Optional self-describing schema URI for linters",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "uri-reference"
|
|
66
|
+
},
|
|
67
|
+
"name": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"title": "Cookie name",
|
|
70
|
+
"description": "Name of the specific cookie to load.",
|
|
71
|
+
"pattern": "^[A-Za-z0-9_.-]+$",
|
|
72
|
+
"transform": [
|
|
73
|
+
"trim"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"variable": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"title": "Environment variable name",
|
|
79
|
+
"description": "Environment variable name containing the cookie as JSON string.",
|
|
80
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
81
|
+
"transform": [
|
|
82
|
+
"trim"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"path": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"title": "Cookie file path",
|
|
88
|
+
"description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
|
|
89
|
+
"pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
|
|
90
|
+
"transform": [
|
|
91
|
+
"trim"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"directory": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"title": "Directory path",
|
|
97
|
+
"description": "Directory containing the cookie file.",
|
|
98
|
+
"transform": [
|
|
99
|
+
"trim"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"domain": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"title": "Cookie domain",
|
|
105
|
+
"description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
|
|
106
|
+
"transform": [
|
|
107
|
+
"trim"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"title": "Load cookie (detailed)"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"examples": [
|
|
116
|
+
"session_token",
|
|
117
|
+
"./test-data/auth-session.txt",
|
|
118
|
+
{
|
|
119
|
+
"name": "auth_cookie",
|
|
120
|
+
"variable": "AUTH_COOKIE"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "session_token",
|
|
124
|
+
"path": "session-token.txt",
|
|
125
|
+
"directory": "./test-data"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "user_session",
|
|
129
|
+
"path": "saved-cookies.txt",
|
|
130
|
+
"domain": "app.example.com"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"$id": "/home/runner/work/common/common/src/schemas/src_schemas/loadCookie_v3.schema.json"
|
|
134
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
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
|
+
"pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
|
|
56
|
+
"transform": [
|
|
57
|
+
"trim"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"directory": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"title": "Directory path",
|
|
63
|
+
"description": "Directory to save the cookie file. If not specified, uses output directory.",
|
|
64
|
+
"transform": [
|
|
65
|
+
"trim"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"overwrite": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"title": "Overwrite existing file",
|
|
71
|
+
"description": "Whether to overwrite existing cookie file.",
|
|
72
|
+
"default": false
|
|
73
|
+
},
|
|
74
|
+
"domain": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"title": "Cookie domain",
|
|
77
|
+
"description": "Specific domain to filter the cookie by (optional).",
|
|
78
|
+
"transform": [
|
|
79
|
+
"trim"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"name"
|
|
85
|
+
],
|
|
86
|
+
"anyOf": [
|
|
87
|
+
{
|
|
88
|
+
"required": [
|
|
89
|
+
"path"
|
|
90
|
+
],
|
|
91
|
+
"not": {
|
|
92
|
+
"required": [
|
|
93
|
+
"variable"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"required": [
|
|
99
|
+
"variable"
|
|
100
|
+
],
|
|
101
|
+
"not": {
|
|
102
|
+
"anyOf": [
|
|
103
|
+
{
|
|
104
|
+
"required": [
|
|
105
|
+
"path"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"required": [
|
|
110
|
+
"directory"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"required": [
|
|
115
|
+
"overwrite"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"title": "Save cookie (detailed)"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"examples": [
|
|
127
|
+
"session_token",
|
|
128
|
+
{
|
|
129
|
+
"name": "auth_cookie",
|
|
130
|
+
"path": "auth-cookie.txt"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "session_token",
|
|
134
|
+
"variable": "SESSION_TOKEN"
|
|
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/common/common/src/schemas/src_schemas/saveCookie_v3.schema.json"
|
|
149
|
+
}
|
|
@@ -258,6 +258,25 @@
|
|
|
258
258
|
}
|
|
259
259
|
]
|
|
260
260
|
},
|
|
261
|
+
{
|
|
262
|
+
"allOf": [
|
|
263
|
+
{
|
|
264
|
+
"$ref": "#/components/schemas/common"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "object",
|
|
268
|
+
"required": [
|
|
269
|
+
"saveCookie"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"saveCookie": {
|
|
273
|
+
"$ref": "/home/runner/work/common/common/src/schemas/build/saveCookie_v3.schema.json#"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"title": "saveCookie"
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
},
|
|
261
280
|
{
|
|
262
281
|
"allOf": [
|
|
263
282
|
{
|
|
@@ -315,6 +334,25 @@
|
|
|
315
334
|
}
|
|
316
335
|
]
|
|
317
336
|
},
|
|
337
|
+
{
|
|
338
|
+
"allOf": [
|
|
339
|
+
{
|
|
340
|
+
"$ref": "#/components/schemas/common"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"title": "loadCookie",
|
|
344
|
+
"type": "object",
|
|
345
|
+
"required": [
|
|
346
|
+
"loadCookie"
|
|
347
|
+
],
|
|
348
|
+
"properties": {
|
|
349
|
+
"loadCookie": {
|
|
350
|
+
"$ref": "/home/runner/work/common/common/src/schemas/build/loadCookie_v3.schema.json#"
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
318
356
|
{
|
|
319
357
|
"allOf": [
|
|
320
358
|
{
|
|
@@ -461,6 +499,27 @@
|
|
|
461
499
|
{
|
|
462
500
|
"loadVariables": "variables.env"
|
|
463
501
|
},
|
|
502
|
+
{
|
|
503
|
+
"saveCookie": "session_token"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"saveCookie": {
|
|
507
|
+
"name": "auth_cookie",
|
|
508
|
+
"path": "auth-session.txt",
|
|
509
|
+
"directory": "./test-data",
|
|
510
|
+
"overwrite": true
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"loadCookie": "session_token"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"loadCookie": {
|
|
518
|
+
"name": "auth_cookie",
|
|
519
|
+
"path": "auth-session.txt",
|
|
520
|
+
"directory": "./test-data"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
464
523
|
{
|
|
465
524
|
"find": {
|
|
466
525
|
"$ref": "/home/runner/work/common/common/src/schemas/build/find_v3.schema.json#/examples/0"
|
|
@@ -32,6 +32,7 @@ async function dereferenceSchemas() {
|
|
|
32
32
|
"context_v3.schema.json",
|
|
33
33
|
"find_v3.schema.json",
|
|
34
34
|
"goTo_v3.schema.json",
|
|
35
|
+
"loadCookie_v3.schema.json",
|
|
35
36
|
"loadVariables_v3.schema.json",
|
|
36
37
|
"httpRequest_v3.schema.json",
|
|
37
38
|
"openApi_v3.schema.json",
|
|
@@ -40,6 +41,7 @@ async function dereferenceSchemas() {
|
|
|
40
41
|
"report_v3.schema.json",
|
|
41
42
|
"runCode_v3.schema.json",
|
|
42
43
|
"runShell_v3.schema.json",
|
|
44
|
+
"saveCookie_v3.schema.json",
|
|
43
45
|
"screenshot_v3.schema.json",
|
|
44
46
|
"spec_v3.schema.json",
|
|
45
47
|
"step_v3.schema.json",
|