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.
Files changed (27) hide show
  1. package/dist/schemas/config_v3.schema.json +1333 -45
  2. package/dist/schemas/loadCookie_v3.schema.json +225 -0
  3. package/dist/schemas/report_v3.schema.json +1321 -43
  4. package/dist/schemas/resolvedTests_v3.schema.json +2642 -76
  5. package/dist/schemas/saveCookie_v3.schema.json +251 -0
  6. package/dist/schemas/spec_v3.schema.json +1321 -43
  7. package/dist/schemas/step_v3.schema.json +639 -0
  8. package/dist/schemas/test_v3.schema.json +1321 -43
  9. package/package.json +5 -5
  10. package/src/schemas/build/config_v3.schema.json +2 -0
  11. package/src/schemas/build/loadCookie_v3.schema.json +134 -0
  12. package/src/schemas/build/saveCookie_v3.schema.json +149 -0
  13. package/src/schemas/build/step_v3.schema.json +59 -0
  14. package/src/schemas/dereferenceSchemas.js +2 -0
  15. package/src/schemas/output_schemas/config_v3.schema.json +1333 -45
  16. package/src/schemas/output_schemas/loadCookie_v3.schema.json +225 -0
  17. package/src/schemas/output_schemas/report_v3.schema.json +1321 -43
  18. package/src/schemas/output_schemas/resolvedTests_v3.schema.json +2642 -76
  19. package/src/schemas/output_schemas/saveCookie_v3.schema.json +251 -0
  20. package/src/schemas/output_schemas/spec_v3.schema.json +1321 -43
  21. package/src/schemas/output_schemas/step_v3.schema.json +639 -0
  22. package/src/schemas/output_schemas/test_v3.schema.json +1321 -43
  23. package/src/schemas/schemas.json +8810 -7
  24. package/src/schemas/src_schemas/config_v3.schema.json +2 -0
  25. package/src/schemas/src_schemas/loadCookie_v3.schema.json +109 -0
  26. package/src/schemas/src_schemas/saveCookie_v3.schema.json +122 -0
  27. package/src/schemas/src_schemas/step_v3.schema.json +55 -0
@@ -329,10 +329,12 @@
329
329
  "find",
330
330
  "goTo",
331
331
  "httpRequest",
332
+ "loadCookie",
332
333
  "loadVariables",
333
334
  "record",
334
335
  "runCode",
335
336
  "runShell",
337
+ "saveCookie",
336
338
  "screenshot",
337
339
  "stopRecord",
338
340
  "type",
@@ -0,0 +1,109 @@
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": ["trim"]
21
+ },
22
+ "object": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["name"],
26
+ "anyOf": [
27
+ {
28
+ "required": ["path"],
29
+ "not": {
30
+ "required": ["variable"]
31
+ }
32
+ },
33
+ {
34
+ "required": ["variable"],
35
+ "not": {
36
+ "anyOf": [
37
+ {
38
+ "required": ["path"]
39
+ },
40
+ {
41
+ "required": ["directory"]
42
+ }
43
+ ]
44
+ }
45
+ }
46
+ ],
47
+ "properties": {
48
+ "$schema": {
49
+ "description": "Optional self-describing schema URI for linters",
50
+ "type": "string",
51
+ "format": "uri-reference"
52
+ },
53
+ "name": {
54
+ "type": "string",
55
+ "title": "Cookie name",
56
+ "description": "Name of the specific cookie to load.",
57
+ "pattern": "^[A-Za-z0-9_.-]+$",
58
+ "transform": ["trim"]
59
+ },
60
+ "variable": {
61
+ "type": "string",
62
+ "title": "Environment variable name",
63
+ "description": "Environment variable name containing the cookie as JSON string.",
64
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
65
+ "transform": ["trim"]
66
+ },
67
+ "path": {
68
+ "type": "string",
69
+ "title": "Cookie file path",
70
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
71
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
72
+ "transform": ["trim"]
73
+ },
74
+ "directory": {
75
+ "type": "string",
76
+ "title": "Directory path",
77
+ "description": "Directory containing the cookie file.",
78
+ "transform": ["trim"]
79
+ },
80
+ "domain": {
81
+ "type": "string",
82
+ "title": "Cookie domain",
83
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
84
+ "transform": ["trim"]
85
+ }
86
+ },
87
+ "title": "Load cookie (detailed)"
88
+ }
89
+ }
90
+ },
91
+ "examples": [
92
+ "session_token",
93
+ "./test-data/auth-session.txt",
94
+ {
95
+ "name": "auth_cookie",
96
+ "variable": "AUTH_COOKIE"
97
+ },
98
+ {
99
+ "name": "session_token",
100
+ "path": "session-token.txt",
101
+ "directory": "./test-data"
102
+ },
103
+ {
104
+ "name": "user_session",
105
+ "path": "saved-cookies.txt",
106
+ "domain": "app.example.com"
107
+ }
108
+ ]
109
+ }
@@ -0,0 +1,122 @@
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": ["trim"]
21
+ },
22
+ "object": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "$schema": {
27
+ "description": "Optional self-describing schema URI for linters",
28
+ "type": "string",
29
+ "format": "uri-reference"
30
+ },
31
+ "name": {
32
+ "type": "string",
33
+ "title": "Cookie name",
34
+ "description": "Name of the specific cookie to save.",
35
+ "pattern": "^[A-Za-z0-9_.-]+$",
36
+ "transform": ["trim"]
37
+ },
38
+ "variable": {
39
+ "type": "string",
40
+ "title": "Environment variable name",
41
+ "description": "Environment variable name to store the cookie as JSON string.",
42
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
43
+ "transform": ["trim"]
44
+ },
45
+ "path": {
46
+ "type": "string",
47
+ "title": "Cookie file path",
48
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
49
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
50
+ "transform": ["trim"]
51
+ },
52
+ "directory": {
53
+ "type": "string",
54
+ "title": "Directory path",
55
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
56
+ "transform": ["trim"]
57
+ },
58
+ "overwrite": {
59
+ "type": "boolean",
60
+ "title": "Overwrite existing file",
61
+ "description": "Whether to overwrite existing cookie file.",
62
+ "default": false
63
+ },
64
+ "domain": {
65
+ "type": "string",
66
+ "title": "Cookie domain",
67
+ "description": "Specific domain to filter the cookie by (optional).",
68
+ "transform": ["trim"]
69
+ }
70
+ },
71
+ "required": ["name"],
72
+ "anyOf": [
73
+ {
74
+ "required": ["path"],
75
+ "not": {
76
+ "required": ["variable"]
77
+ }
78
+ },
79
+ {
80
+ "required": ["variable"],
81
+ "not": {
82
+ "anyOf": [
83
+ {
84
+ "required": ["path"]
85
+ },
86
+ {
87
+ "required": ["directory"]
88
+ },
89
+ {
90
+ "required": ["overwrite"]
91
+ }
92
+ ]
93
+ }
94
+ }
95
+ ],
96
+ "title": "Save cookie (detailed)"
97
+ }
98
+ }
99
+ },
100
+ "examples": [
101
+ "session_token",
102
+ {
103
+ "name": "auth_cookie",
104
+ "path": "auth-cookie.txt"
105
+ },
106
+ {
107
+ "name": "session_token",
108
+ "variable": "SESSION_TOKEN"
109
+ },
110
+ {
111
+ "name": "user_session",
112
+ "path": "user-session.txt",
113
+ "directory": "./test-data",
114
+ "overwrite": true
115
+ },
116
+ {
117
+ "name": "login_token",
118
+ "path": "login-token.txt",
119
+ "domain": "app.example.com"
120
+ }
121
+ ]
122
+ }
@@ -240,6 +240,23 @@
240
240
  }
241
241
  ]
242
242
  },
243
+ {
244
+ "allOf": [
245
+ {
246
+ "$ref": "#/components/schemas/common"
247
+ },
248
+ {
249
+ "type": "object",
250
+ "required": ["saveCookie"],
251
+ "properties": {
252
+ "saveCookie": {
253
+ "$ref": "saveCookie_v3.schema.json#"
254
+ }
255
+ },
256
+ "title": "saveCookie"
257
+ }
258
+ ]
259
+ },
243
260
  {
244
261
  "allOf": [
245
262
  {
@@ -291,6 +308,23 @@
291
308
  }
292
309
  ]
293
310
  },
311
+ {
312
+ "allOf": [
313
+ {
314
+ "$ref": "#/components/schemas/common"
315
+ },
316
+ {
317
+ "title": "loadCookie",
318
+ "type": "object",
319
+ "required": ["loadCookie"],
320
+ "properties": {
321
+ "loadCookie": {
322
+ "$ref": "loadCookie_v3.schema.json#"
323
+ }
324
+ }
325
+ }
326
+ ]
327
+ },
294
328
  {
295
329
  "allOf": [
296
330
  {
@@ -431,6 +465,27 @@
431
465
  {
432
466
  "loadVariables": "variables.env"
433
467
  },
468
+ {
469
+ "saveCookie": "session_token"
470
+ },
471
+ {
472
+ "saveCookie": {
473
+ "name": "auth_cookie",
474
+ "path": "auth-session.txt",
475
+ "directory": "./test-data",
476
+ "overwrite": true
477
+ }
478
+ },
479
+ {
480
+ "loadCookie": "session_token"
481
+ },
482
+ {
483
+ "loadCookie": {
484
+ "name": "auth_cookie",
485
+ "path": "auth-session.txt",
486
+ "directory": "./test-data"
487
+ }
488
+ },
434
489
  {
435
490
  "find": {
436
491
  "$ref": "find_v3.schema.json#/examples/0"