doc-detective-common 4.0.0-beta.0-dev.7 → 4.0.0-beta.0-dev.8

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 (45) hide show
  1. package/dist/detectTests.d.ts +17 -22
  2. package/dist/detectTests.d.ts.map +1 -1
  3. package/dist/detectTests.js +81 -4
  4. package/dist/detectTests.js.map +1 -1
  5. package/dist/fileTypes.d.ts +35 -0
  6. package/dist/fileTypes.d.ts.map +1 -0
  7. package/dist/fileTypes.js +293 -0
  8. package/dist/fileTypes.js.map +1 -0
  9. package/dist/index.cjs +7288 -162
  10. package/dist/index.d.cts +2 -1
  11. package/dist/index.d.ts +2 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/schemas/schemas.json +6786 -0
  16. package/dist/types/generated/step_v3.d.ts +288 -0
  17. package/dist/types/generated/step_v3.d.ts.map +1 -1
  18. package/dist/types/generated/test_v3.d.ts +576 -0
  19. package/dist/types/generated/test_v3.d.ts.map +1 -1
  20. package/package.json +4 -3
  21. package/dist/schemas/checkLink_v3.schema.json +0 -145
  22. package/dist/schemas/click_v3.schema.json +0 -252
  23. package/dist/schemas/config_v3.schema.json +0 -16470
  24. package/dist/schemas/context_v3.schema.json +0 -374
  25. package/dist/schemas/dragAndDrop_v3.schema.json +0 -496
  26. package/dist/schemas/find_v3.schema.json +0 -1349
  27. package/dist/schemas/goTo_v3.schema.json +0 -419
  28. package/dist/schemas/httpRequest_v3.schema.json +0 -994
  29. package/dist/schemas/loadCookie_v3.schema.json +0 -228
  30. package/dist/schemas/loadVariables_v3.schema.json +0 -9
  31. package/dist/schemas/openApi_v3.schema.json +0 -162
  32. package/dist/schemas/record_v3.schema.json +0 -101
  33. package/dist/schemas/report_v3.schema.json +0 -16826
  34. package/dist/schemas/resolvedTests_v3.schema.json +0 -33331
  35. package/dist/schemas/runCode_v3.schema.json +0 -222
  36. package/dist/schemas/runShell_v3.schema.json +0 -236
  37. package/dist/schemas/saveCookie_v3.schema.json +0 -245
  38. package/dist/schemas/screenshot_v3.schema.json +0 -681
  39. package/dist/schemas/sourceIntegration_v3.schema.json +0 -50
  40. package/dist/schemas/spec_v3.schema.json +0 -16630
  41. package/dist/schemas/step_v3.schema.json +0 -7317
  42. package/dist/schemas/stopRecord_v3.schema.json +0 -12
  43. package/dist/schemas/test_v3.schema.json +0 -15863
  44. package/dist/schemas/type_v3.schema.json +0 -244
  45. package/dist/schemas/wait_v3.schema.json +0 -41
@@ -1,681 +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
- "title": "Screenshot (simple)",
8
- "description": "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
9
- "type": "string",
10
- "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
11
- "transform": [
12
- "trim"
13
- ]
14
- },
15
- {
16
- "type": "object",
17
- "additionalProperties": false,
18
- "properties": {
19
- "path": {
20
- "title": "Screenshot (simple)",
21
- "description": "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
22
- "type": "string",
23
- "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
24
- "transform": [
25
- "trim"
26
- ]
27
- },
28
- "directory": {
29
- "type": "string",
30
- "description": "Directory of the PNG file. If the directory doesn't exist, creates the directory.",
31
- "transform": [
32
- "trim"
33
- ]
34
- },
35
- "maxVariation": {
36
- "type": "number",
37
- "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.",
38
- "default": 0.05,
39
- "minimum": 0,
40
- "maximum": 1
41
- },
42
- "overwrite": {
43
- "type": "string",
44
- "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`.",
45
- "enum": [
46
- "true",
47
- "false",
48
- "aboveVariation"
49
- ],
50
- "default": "aboveVariation"
51
- },
52
- "crop": {
53
- "anyOf": [
54
- {
55
- "title": "Crop by element (simple)",
56
- "type": "string",
57
- "description": "Display text or selector of the element to screenshot."
58
- },
59
- {
60
- "title": "Crop by element (detailed)",
61
- "type": "object",
62
- "description": "Crop the screenshot to a specific element.",
63
- "additionalProperties": false,
64
- "anyOf": [
65
- {
66
- "required": [
67
- "selector"
68
- ]
69
- },
70
- {
71
- "required": [
72
- "elementText"
73
- ]
74
- },
75
- {
76
- "required": [
77
- "elementId"
78
- ]
79
- },
80
- {
81
- "required": [
82
- "elementTestId"
83
- ]
84
- },
85
- {
86
- "required": [
87
- "elementClass"
88
- ]
89
- },
90
- {
91
- "required": [
92
- "elementAttribute"
93
- ]
94
- },
95
- {
96
- "required": [
97
- "elementAria"
98
- ]
99
- }
100
- ],
101
- "properties": {
102
- "elementText": {
103
- "type": "string",
104
- "description": "Display text of the element to screenshot."
105
- },
106
- "selector": {
107
- "type": "string",
108
- "description": "Selector of the element to screenshot."
109
- },
110
- "elementId": {
111
- "type": "string",
112
- "description": "ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
113
- },
114
- "elementTestId": {
115
- "type": "string",
116
- "description": "data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
117
- },
118
- "elementClass": {
119
- "anyOf": [
120
- {
121
- "type": "string"
122
- },
123
- {
124
- "type": "array",
125
- "items": {
126
- "type": "string"
127
- }
128
- }
129
- ],
130
- "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."
131
- },
132
- "elementAttribute": {
133
- "type": "object",
134
- "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.",
135
- "additionalProperties": {
136
- "anyOf": [
137
- {
138
- "type": "string"
139
- },
140
- {
141
- "type": "number"
142
- },
143
- {
144
- "type": "boolean"
145
- }
146
- ]
147
- }
148
- },
149
- "elementAria": {
150
- "type": "string",
151
- "description": "Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax."
152
- },
153
- "padding": {
154
- "anyOf": [
155
- {
156
- "title": "Padding (simple)",
157
- "type": "number",
158
- "description": "Padding in pixels to add to the bounds of the element.",
159
- "minimum": 0
160
- },
161
- {
162
- "type": "object",
163
- "additionalProperties": false,
164
- "properties": {
165
- "top": {
166
- "type": "number",
167
- "minimum": 0
168
- },
169
- "right": {
170
- "type": "number",
171
- "minimum": 0
172
- },
173
- "bottom": {
174
- "type": "number",
175
- "minimum": 0
176
- },
177
- "left": {
178
- "type": "number",
179
- "minimum": 0
180
- }
181
- },
182
- "title": "Padding (detailed)",
183
- "description": "Padding in pixels to add to the bounds of the element."
184
- }
185
- ]
186
- }
187
- }
188
- }
189
- ]
190
- },
191
- "sourceIntegration": {
192
- "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.",
193
- "$schema": "http://json-schema.org/draft-07/schema#",
194
- "title": "sourceIntegration",
195
- "type": "object",
196
- "additionalProperties": false,
197
- "required": [
198
- "type",
199
- "integrationName"
200
- ],
201
- "properties": {
202
- "type": {
203
- "type": "string",
204
- "description": "The type of integration. Currently supported: 'heretto'. Additional types may be added in the future.",
205
- "enum": [
206
- "heretto"
207
- ]
208
- },
209
- "integrationName": {
210
- "type": "string",
211
- "description": "The name of the integration configuration in the config file. Used to look up authentication credentials."
212
- },
213
- "fileId": {
214
- "type": "string",
215
- "description": "The unique identifier (UUID) of the file in the source CMS. If not provided, the file will be looked up by path."
216
- },
217
- "filePath": {
218
- "type": "string",
219
- "description": "The path of the file in the source CMS. Used for lookup if fileId is not available."
220
- },
221
- "contentPath": {
222
- "type": "string",
223
- "description": "The local path to the file that references this source. Used for resolving relative paths."
224
- }
225
- },
226
- "examples": [
227
- {
228
- "type": "heretto",
229
- "integrationName": "my-heretto",
230
- "fileId": "8f3ed200-cbba-11e1-ac51-c82a1446d15c",
231
- "filePath": "/db/organizations/example/repositories/docs/images/screenshot.png"
232
- },
233
- {
234
- "type": "heretto",
235
- "integrationName": "my-heretto",
236
- "filePath": "images/screenshot.png",
237
- "contentPath": "/tmp/doc-detective/heretto_abc123/topic.dita"
238
- }
239
- ]
240
- }
241
- },
242
- "title": "Capture screenshot (detailed)"
243
- },
244
- {
245
- "type": "boolean",
246
- "title": "Capture screenshot",
247
- "description": "If `true`, captures a screenshot. If `false`, doesn't capture a screenshot."
248
- }
249
- ],
250
- "components": {
251
- "schemas": {
252
- "path": {
253
- "title": "Screenshot (simple)",
254
- "description": "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
255
- "type": "string",
256
- "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
257
- "transform": [
258
- "trim"
259
- ]
260
- },
261
- "object": {
262
- "type": "object",
263
- "additionalProperties": false,
264
- "properties": {
265
- "path": {
266
- "title": "Screenshot (simple)",
267
- "description": "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
268
- "type": "string",
269
- "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
270
- "transform": [
271
- "trim"
272
- ]
273
- },
274
- "directory": {
275
- "type": "string",
276
- "description": "Directory of the PNG file. If the directory doesn't exist, creates the directory.",
277
- "transform": [
278
- "trim"
279
- ]
280
- },
281
- "maxVariation": {
282
- "type": "number",
283
- "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.",
284
- "default": 0.05,
285
- "minimum": 0,
286
- "maximum": 1
287
- },
288
- "overwrite": {
289
- "type": "string",
290
- "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`.",
291
- "enum": [
292
- "true",
293
- "false",
294
- "aboveVariation"
295
- ],
296
- "default": "aboveVariation"
297
- },
298
- "crop": {
299
- "anyOf": [
300
- {
301
- "title": "Crop by element (simple)",
302
- "type": "string",
303
- "description": "Display text or selector of the element to screenshot."
304
- },
305
- {
306
- "title": "Crop by element (detailed)",
307
- "type": "object",
308
- "description": "Crop the screenshot to a specific element.",
309
- "additionalProperties": false,
310
- "anyOf": [
311
- {
312
- "required": [
313
- "selector"
314
- ]
315
- },
316
- {
317
- "required": [
318
- "elementText"
319
- ]
320
- },
321
- {
322
- "required": [
323
- "elementId"
324
- ]
325
- },
326
- {
327
- "required": [
328
- "elementTestId"
329
- ]
330
- },
331
- {
332
- "required": [
333
- "elementClass"
334
- ]
335
- },
336
- {
337
- "required": [
338
- "elementAttribute"
339
- ]
340
- },
341
- {
342
- "required": [
343
- "elementAria"
344
- ]
345
- }
346
- ],
347
- "properties": {
348
- "elementText": {
349
- "type": "string",
350
- "description": "Display text of the element to screenshot."
351
- },
352
- "selector": {
353
- "type": "string",
354
- "description": "Selector of the element to screenshot."
355
- },
356
- "elementId": {
357
- "type": "string",
358
- "description": "ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
359
- },
360
- "elementTestId": {
361
- "type": "string",
362
- "description": "data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
363
- },
364
- "elementClass": {
365
- "anyOf": [
366
- {
367
- "type": "string"
368
- },
369
- {
370
- "type": "array",
371
- "items": {
372
- "type": "string"
373
- }
374
- }
375
- ],
376
- "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."
377
- },
378
- "elementAttribute": {
379
- "type": "object",
380
- "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.",
381
- "additionalProperties": {
382
- "anyOf": [
383
- {
384
- "type": "string"
385
- },
386
- {
387
- "type": "number"
388
- },
389
- {
390
- "type": "boolean"
391
- }
392
- ]
393
- }
394
- },
395
- "elementAria": {
396
- "type": "string",
397
- "description": "Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax."
398
- },
399
- "padding": {
400
- "anyOf": [
401
- {
402
- "title": "Padding (simple)",
403
- "type": "number",
404
- "description": "Padding in pixels to add to the bounds of the element.",
405
- "minimum": 0
406
- },
407
- {
408
- "type": "object",
409
- "additionalProperties": false,
410
- "properties": {
411
- "top": {
412
- "type": "number",
413
- "minimum": 0
414
- },
415
- "right": {
416
- "type": "number",
417
- "minimum": 0
418
- },
419
- "bottom": {
420
- "type": "number",
421
- "minimum": 0
422
- },
423
- "left": {
424
- "type": "number",
425
- "minimum": 0
426
- }
427
- },
428
- "title": "Padding (detailed)",
429
- "description": "Padding in pixels to add to the bounds of the element."
430
- }
431
- ]
432
- }
433
- }
434
- }
435
- ]
436
- },
437
- "sourceIntegration": {
438
- "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.",
439
- "$schema": "http://json-schema.org/draft-07/schema#",
440
- "title": "sourceIntegration",
441
- "type": "object",
442
- "additionalProperties": false,
443
- "required": [
444
- "type",
445
- "integrationName"
446
- ],
447
- "properties": {
448
- "type": {
449
- "type": "string",
450
- "description": "The type of integration. Currently supported: 'heretto'. Additional types may be added in the future.",
451
- "enum": [
452
- "heretto"
453
- ]
454
- },
455
- "integrationName": {
456
- "type": "string",
457
- "description": "The name of the integration configuration in the config file. Used to look up authentication credentials."
458
- },
459
- "fileId": {
460
- "type": "string",
461
- "description": "The unique identifier (UUID) of the file in the source CMS. If not provided, the file will be looked up by path."
462
- },
463
- "filePath": {
464
- "type": "string",
465
- "description": "The path of the file in the source CMS. Used for lookup if fileId is not available."
466
- },
467
- "contentPath": {
468
- "type": "string",
469
- "description": "The local path to the file that references this source. Used for resolving relative paths."
470
- }
471
- },
472
- "examples": [
473
- {
474
- "type": "heretto",
475
- "integrationName": "my-heretto",
476
- "fileId": "8f3ed200-cbba-11e1-ac51-c82a1446d15c",
477
- "filePath": "/db/organizations/example/repositories/docs/images/screenshot.png"
478
- },
479
- {
480
- "type": "heretto",
481
- "integrationName": "my-heretto",
482
- "filePath": "images/screenshot.png",
483
- "contentPath": "/tmp/doc-detective/heretto_abc123/topic.dita"
484
- }
485
- ]
486
- }
487
- },
488
- "title": "Capture screenshot (detailed)"
489
- },
490
- "crop_element": {
491
- "title": "Crop by element (detailed)",
492
- "type": "object",
493
- "description": "Crop the screenshot to a specific element.",
494
- "additionalProperties": false,
495
- "anyOf": [
496
- {
497
- "required": [
498
- "selector"
499
- ]
500
- },
501
- {
502
- "required": [
503
- "elementText"
504
- ]
505
- },
506
- {
507
- "required": [
508
- "elementId"
509
- ]
510
- },
511
- {
512
- "required": [
513
- "elementTestId"
514
- ]
515
- },
516
- {
517
- "required": [
518
- "elementClass"
519
- ]
520
- },
521
- {
522
- "required": [
523
- "elementAttribute"
524
- ]
525
- },
526
- {
527
- "required": [
528
- "elementAria"
529
- ]
530
- }
531
- ],
532
- "properties": {
533
- "elementText": {
534
- "type": "string",
535
- "description": "Display text of the element to screenshot."
536
- },
537
- "selector": {
538
- "type": "string",
539
- "description": "Selector of the element to screenshot."
540
- },
541
- "elementId": {
542
- "type": "string",
543
- "description": "ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
544
- },
545
- "elementTestId": {
546
- "type": "string",
547
- "description": "data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
548
- },
549
- "elementClass": {
550
- "anyOf": [
551
- {
552
- "type": "string"
553
- },
554
- {
555
- "type": "array",
556
- "items": {
557
- "type": "string"
558
- }
559
- }
560
- ],
561
- "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."
562
- },
563
- "elementAttribute": {
564
- "type": "object",
565
- "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.",
566
- "additionalProperties": {
567
- "anyOf": [
568
- {
569
- "type": "string"
570
- },
571
- {
572
- "type": "number"
573
- },
574
- {
575
- "type": "boolean"
576
- }
577
- ]
578
- }
579
- },
580
- "elementAria": {
581
- "type": "string",
582
- "description": "Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax."
583
- },
584
- "padding": {
585
- "anyOf": [
586
- {
587
- "title": "Padding (simple)",
588
- "type": "number",
589
- "description": "Padding in pixels to add to the bounds of the element.",
590
- "minimum": 0
591
- },
592
- {
593
- "type": "object",
594
- "additionalProperties": false,
595
- "properties": {
596
- "top": {
597
- "type": "number",
598
- "minimum": 0
599
- },
600
- "right": {
601
- "type": "number",
602
- "minimum": 0
603
- },
604
- "bottom": {
605
- "type": "number",
606
- "minimum": 0
607
- },
608
- "left": {
609
- "type": "number",
610
- "minimum": 0
611
- }
612
- },
613
- "title": "Padding (detailed)",
614
- "description": "Padding in pixels to add to the bounds of the element."
615
- }
616
- ]
617
- }
618
- }
619
- },
620
- "padding": {
621
- "type": "object",
622
- "additionalProperties": false,
623
- "properties": {
624
- "top": {
625
- "type": "number",
626
- "minimum": 0
627
- },
628
- "right": {
629
- "type": "number",
630
- "minimum": 0
631
- },
632
- "bottom": {
633
- "type": "number",
634
- "minimum": 0
635
- },
636
- "left": {
637
- "type": "number",
638
- "minimum": 0
639
- }
640
- },
641
- "title": "Padding (detailed)",
642
- "description": "Padding in pixels to add to the bounds of the element."
643
- }
644
- }
645
- },
646
- "examples": [
647
- true,
648
- "image.png",
649
- "static/images/image.png",
650
- "/User/manny/projects/doc-detective/static/images/image.png",
651
- {
652
- "path": "image.png",
653
- "directory": "static/images",
654
- "maxVariation": 0.1,
655
- "overwrite": "aboveVariation",
656
- "crop": "#elementToScreenshot"
657
- },
658
- {
659
- "path": "image.png",
660
- "directory": "static/images",
661
- "maxVariation": 0.1,
662
- "overwrite": "aboveVariation"
663
- },
664
- {
665
- "path": "image.png",
666
- "directory": "static/images",
667
- "maxVariation": 0.1,
668
- "overwrite": "aboveVariation",
669
- "crop": {
670
- "selector": "#elementToScreenshot",
671
- "elementText": "Element text",
672
- "padding": {
673
- "top": 0,
674
- "right": 0,
675
- "bottom": 0,
676
- "left": 0
677
- }
678
- }
679
- }
680
- ]
681
- }