doc-detective-common 3.1.2-dev.2 → 3.1.2-dev.4

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 +1307 -25
  2. package/dist/schemas/loadCookie_v3.schema.json +228 -0
  3. package/dist/schemas/report_v3.schema.json +1296 -24
  4. package/dist/schemas/resolvedTests_v3.schema.json +2622 -68
  5. package/dist/schemas/saveCookie_v3.schema.json +245 -0
  6. package/dist/schemas/spec_v3.schema.json +1296 -24
  7. package/dist/schemas/step_v3.schema.json +636 -0
  8. package/dist/schemas/test_v3.schema.json +1296 -24
  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 +138 -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 +1307 -25
  16. package/src/schemas/output_schemas/loadCookie_v3.schema.json +228 -0
  17. package/src/schemas/output_schemas/report_v3.schema.json +1296 -24
  18. package/src/schemas/output_schemas/resolvedTests_v3.schema.json +2622 -68
  19. package/src/schemas/output_schemas/saveCookie_v3.schema.json +245 -0
  20. package/src/schemas/output_schemas/spec_v3.schema.json +1296 -24
  21. package/src/schemas/output_schemas/step_v3.schema.json +636 -0
  22. package/src/schemas/output_schemas/test_v3.schema.json +1296 -24
  23. package/src/schemas/schemas.json +8835 -74
  24. package/src/schemas/src_schemas/config_v3.schema.json +2 -0
  25. package/src/schemas/src_schemas/loadCookie_v3.schema.json +113 -0
  26. package/src/schemas/src_schemas/saveCookie_v3.schema.json +124 -0
  27. package/src/schemas/src_schemas/step_v3.schema.json +55 -0
@@ -735,10 +735,12 @@
735
735
  "find",
736
736
  "goTo",
737
737
  "httpRequest",
738
+ "loadCookie",
738
739
  "loadVariables",
739
740
  "record",
740
741
  "runCode",
741
742
  "runShell",
743
+ "saveCookie",
742
744
  "screenshot",
743
745
  "stopRecord",
744
746
  "type",
@@ -757,10 +759,12 @@
757
759
  "find",
758
760
  "goTo",
759
761
  "httpRequest",
762
+ "loadCookie",
760
763
  "loadVariables",
761
764
  "record",
762
765
  "runCode",
763
766
  "runShell",
767
+ "saveCookie",
764
768
  "screenshot",
765
769
  "stopRecord",
766
770
  "type",
@@ -4522,6 +4526,322 @@
4522
4526
  }
4523
4527
  ]
4524
4528
  },
4529
+ {
4530
+ "allOf": [
4531
+ {
4532
+ "type": "object",
4533
+ "dynamicDefaults": {
4534
+ "stepId": "uuid"
4535
+ },
4536
+ "properties": {
4537
+ "$schema": {
4538
+ "description": "JSON Schema for this object.",
4539
+ "type": "string",
4540
+ "enum": [
4541
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
4542
+ ]
4543
+ },
4544
+ "stepId": {
4545
+ "type": "string",
4546
+ "description": "ID of the step."
4547
+ },
4548
+ "description": {
4549
+ "type": "string",
4550
+ "description": "Description of the step."
4551
+ },
4552
+ "unsafe": {
4553
+ "type": "boolean",
4554
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
4555
+ "default": false
4556
+ },
4557
+ "outputs": {
4558
+ "type": "object",
4559
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
4560
+ "default": {},
4561
+ "patternProperties": {
4562
+ "^[A-Za-z0-9_]+$": {
4563
+ "type": "string",
4564
+ "description": "Runtime expression for a user-defined output value."
4565
+ }
4566
+ },
4567
+ "title": "Outputs (step)"
4568
+ },
4569
+ "variables": {
4570
+ "type": "object",
4571
+ "description": "Environment variables to set from user-defined expressions.",
4572
+ "default": {},
4573
+ "patternProperties": {
4574
+ "^[A-Za-z0-9_]+$": {
4575
+ "type": "string",
4576
+ "description": "Runtime expression for a user-defined output value."
4577
+ }
4578
+ },
4579
+ "title": "Variables (step)"
4580
+ },
4581
+ "breakpoint": {
4582
+ "type": "boolean",
4583
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
4584
+ "default": false
4585
+ }
4586
+ },
4587
+ "title": "Common"
4588
+ },
4589
+ {
4590
+ "type": "object",
4591
+ "required": [
4592
+ "saveCookie"
4593
+ ],
4594
+ "properties": {
4595
+ "saveCookie": {
4596
+ "$schema": "http://json-schema.org/draft-07/schema#",
4597
+ "title": "saveCookie",
4598
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
4599
+ "anyOf": [
4600
+ {
4601
+ "type": "string",
4602
+ "title": "Cookie name",
4603
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
4604
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
4605
+ "transform": [
4606
+ "trim"
4607
+ ]
4608
+ },
4609
+ {
4610
+ "type": "object",
4611
+ "additionalProperties": false,
4612
+ "properties": {
4613
+ "$schema": {
4614
+ "description": "Optional self-describing schema URI for linters",
4615
+ "type": "string",
4616
+ "format": "uri-reference"
4617
+ },
4618
+ "name": {
4619
+ "type": "string",
4620
+ "title": "Cookie name",
4621
+ "description": "Name of the specific cookie to save.",
4622
+ "pattern": "^[A-Za-z0-9_.-]+$",
4623
+ "transform": [
4624
+ "trim"
4625
+ ]
4626
+ },
4627
+ "variable": {
4628
+ "type": "string",
4629
+ "title": "Environment variable name",
4630
+ "description": "Environment variable name to store the cookie as JSON string.",
4631
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
4632
+ "transform": [
4633
+ "trim"
4634
+ ]
4635
+ },
4636
+ "path": {
4637
+ "type": "string",
4638
+ "title": "Cookie file path",
4639
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
4640
+ "transform": [
4641
+ "trim"
4642
+ ]
4643
+ },
4644
+ "directory": {
4645
+ "type": "string",
4646
+ "title": "Directory path",
4647
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
4648
+ "transform": [
4649
+ "trim"
4650
+ ]
4651
+ },
4652
+ "overwrite": {
4653
+ "type": "boolean",
4654
+ "title": "Overwrite existing file",
4655
+ "description": "Whether to overwrite existing cookie file.",
4656
+ "default": false
4657
+ },
4658
+ "domain": {
4659
+ "type": "string",
4660
+ "title": "Cookie domain",
4661
+ "description": "Specific domain to filter the cookie by (optional).",
4662
+ "transform": [
4663
+ "trim"
4664
+ ]
4665
+ }
4666
+ },
4667
+ "required": [
4668
+ "name"
4669
+ ],
4670
+ "anyOf": [
4671
+ {
4672
+ "required": [
4673
+ "path"
4674
+ ],
4675
+ "not": {
4676
+ "required": [
4677
+ "variable"
4678
+ ]
4679
+ }
4680
+ },
4681
+ {
4682
+ "required": [
4683
+ "variable"
4684
+ ],
4685
+ "not": {
4686
+ "anyOf": [
4687
+ {
4688
+ "required": [
4689
+ "path"
4690
+ ]
4691
+ },
4692
+ {
4693
+ "required": [
4694
+ "directory"
4695
+ ]
4696
+ }
4697
+ ]
4698
+ }
4699
+ }
4700
+ ],
4701
+ "title": "Save cookie (detailed)"
4702
+ }
4703
+ ],
4704
+ "components": {
4705
+ "schemas": {
4706
+ "string": {
4707
+ "type": "string",
4708
+ "title": "Cookie name",
4709
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
4710
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
4711
+ "transform": [
4712
+ "trim"
4713
+ ]
4714
+ },
4715
+ "object": {
4716
+ "type": "object",
4717
+ "additionalProperties": false,
4718
+ "properties": {
4719
+ "$schema": {
4720
+ "description": "Optional self-describing schema URI for linters",
4721
+ "type": "string",
4722
+ "format": "uri-reference"
4723
+ },
4724
+ "name": {
4725
+ "type": "string",
4726
+ "title": "Cookie name",
4727
+ "description": "Name of the specific cookie to save.",
4728
+ "pattern": "^[A-Za-z0-9_.-]+$",
4729
+ "transform": [
4730
+ "trim"
4731
+ ]
4732
+ },
4733
+ "variable": {
4734
+ "type": "string",
4735
+ "title": "Environment variable name",
4736
+ "description": "Environment variable name to store the cookie as JSON string.",
4737
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
4738
+ "transform": [
4739
+ "trim"
4740
+ ]
4741
+ },
4742
+ "path": {
4743
+ "type": "string",
4744
+ "title": "Cookie file path",
4745
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
4746
+ "transform": [
4747
+ "trim"
4748
+ ]
4749
+ },
4750
+ "directory": {
4751
+ "type": "string",
4752
+ "title": "Directory path",
4753
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
4754
+ "transform": [
4755
+ "trim"
4756
+ ]
4757
+ },
4758
+ "overwrite": {
4759
+ "type": "boolean",
4760
+ "title": "Overwrite existing file",
4761
+ "description": "Whether to overwrite existing cookie file.",
4762
+ "default": false
4763
+ },
4764
+ "domain": {
4765
+ "type": "string",
4766
+ "title": "Cookie domain",
4767
+ "description": "Specific domain to filter the cookie by (optional).",
4768
+ "transform": [
4769
+ "trim"
4770
+ ]
4771
+ }
4772
+ },
4773
+ "required": [
4774
+ "name"
4775
+ ],
4776
+ "anyOf": [
4777
+ {
4778
+ "required": [
4779
+ "path"
4780
+ ],
4781
+ "not": {
4782
+ "required": [
4783
+ "variable"
4784
+ ]
4785
+ }
4786
+ },
4787
+ {
4788
+ "required": [
4789
+ "variable"
4790
+ ],
4791
+ "not": {
4792
+ "anyOf": [
4793
+ {
4794
+ "required": [
4795
+ "path"
4796
+ ]
4797
+ },
4798
+ {
4799
+ "required": [
4800
+ "directory"
4801
+ ]
4802
+ }
4803
+ ]
4804
+ }
4805
+ }
4806
+ ],
4807
+ "title": "Save cookie (detailed)"
4808
+ }
4809
+ }
4810
+ },
4811
+ "examples": [
4812
+ "session_token",
4813
+ "test_env_cookie",
4814
+ {
4815
+ "name": "auth_cookie",
4816
+ "path": "auth-cookie.txt"
4817
+ },
4818
+ {
4819
+ "name": "session_token",
4820
+ "variable": "SESSION_TOKEN"
4821
+ },
4822
+ {
4823
+ "name": "test_cookie",
4824
+ "path": "test-cookie.txt",
4825
+ "overwrite": true
4826
+ },
4827
+ {
4828
+ "name": "user_session",
4829
+ "path": "user-session.txt",
4830
+ "directory": "./test-data",
4831
+ "overwrite": true
4832
+ },
4833
+ {
4834
+ "name": "login_token",
4835
+ "path": "login-token.txt",
4836
+ "domain": "app.example.com"
4837
+ }
4838
+ ]
4839
+ }
4840
+ },
4841
+ "title": "saveCookie"
4842
+ }
4843
+ ]
4844
+ },
4525
4845
  {
4526
4846
  "allOf": [
4527
4847
  {
@@ -4859,6 +5179,305 @@
4859
5179
  }
4860
5180
  ]
4861
5181
  },
5182
+ {
5183
+ "allOf": [
5184
+ {
5185
+ "type": "object",
5186
+ "dynamicDefaults": {
5187
+ "stepId": "uuid"
5188
+ },
5189
+ "properties": {
5190
+ "$schema": {
5191
+ "description": "JSON Schema for this object.",
5192
+ "type": "string",
5193
+ "enum": [
5194
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
5195
+ ]
5196
+ },
5197
+ "stepId": {
5198
+ "type": "string",
5199
+ "description": "ID of the step."
5200
+ },
5201
+ "description": {
5202
+ "type": "string",
5203
+ "description": "Description of the step."
5204
+ },
5205
+ "unsafe": {
5206
+ "type": "boolean",
5207
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
5208
+ "default": false
5209
+ },
5210
+ "outputs": {
5211
+ "type": "object",
5212
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
5213
+ "default": {},
5214
+ "patternProperties": {
5215
+ "^[A-Za-z0-9_]+$": {
5216
+ "type": "string",
5217
+ "description": "Runtime expression for a user-defined output value."
5218
+ }
5219
+ },
5220
+ "title": "Outputs (step)"
5221
+ },
5222
+ "variables": {
5223
+ "type": "object",
5224
+ "description": "Environment variables to set from user-defined expressions.",
5225
+ "default": {},
5226
+ "patternProperties": {
5227
+ "^[A-Za-z0-9_]+$": {
5228
+ "type": "string",
5229
+ "description": "Runtime expression for a user-defined output value."
5230
+ }
5231
+ },
5232
+ "title": "Variables (step)"
5233
+ },
5234
+ "breakpoint": {
5235
+ "type": "boolean",
5236
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
5237
+ "default": false
5238
+ }
5239
+ },
5240
+ "title": "Common"
5241
+ },
5242
+ {
5243
+ "title": "loadCookie",
5244
+ "type": "object",
5245
+ "required": [
5246
+ "loadCookie"
5247
+ ],
5248
+ "properties": {
5249
+ "loadCookie": {
5250
+ "$schema": "http://json-schema.org/draft-07/schema#",
5251
+ "title": "loadCookie",
5252
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
5253
+ "anyOf": [
5254
+ {
5255
+ "type": "string",
5256
+ "title": "Cookie name or file path",
5257
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5258
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5259
+ "transform": [
5260
+ "trim"
5261
+ ]
5262
+ },
5263
+ {
5264
+ "type": "object",
5265
+ "additionalProperties": false,
5266
+ "required": [
5267
+ "name"
5268
+ ],
5269
+ "anyOf": [
5270
+ {
5271
+ "required": [
5272
+ "path"
5273
+ ],
5274
+ "not": {
5275
+ "required": [
5276
+ "variable"
5277
+ ]
5278
+ }
5279
+ },
5280
+ {
5281
+ "required": [
5282
+ "variable"
5283
+ ],
5284
+ "not": {
5285
+ "anyOf": [
5286
+ {
5287
+ "required": [
5288
+ "path"
5289
+ ]
5290
+ },
5291
+ {
5292
+ "required": [
5293
+ "directory"
5294
+ ]
5295
+ }
5296
+ ]
5297
+ }
5298
+ }
5299
+ ],
5300
+ "properties": {
5301
+ "$schema": {
5302
+ "description": "Optional self-describing schema URI for linters",
5303
+ "type": "string",
5304
+ "format": "uri-reference"
5305
+ },
5306
+ "name": {
5307
+ "type": "string",
5308
+ "title": "Cookie name",
5309
+ "description": "Name of the specific cookie to load.",
5310
+ "pattern": "^[A-Za-z0-9_.-]+$",
5311
+ "transform": [
5312
+ "trim"
5313
+ ]
5314
+ },
5315
+ "variable": {
5316
+ "type": "string",
5317
+ "title": "Environment variable name",
5318
+ "description": "Environment variable name containing the cookie as JSON string.",
5319
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5320
+ "transform": [
5321
+ "trim"
5322
+ ]
5323
+ },
5324
+ "path": {
5325
+ "type": "string",
5326
+ "title": "Cookie file path",
5327
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5328
+ "transform": [
5329
+ "trim"
5330
+ ]
5331
+ },
5332
+ "directory": {
5333
+ "type": "string",
5334
+ "title": "Directory path",
5335
+ "description": "Directory containing the cookie file.",
5336
+ "transform": [
5337
+ "trim"
5338
+ ]
5339
+ },
5340
+ "domain": {
5341
+ "type": "string",
5342
+ "title": "Cookie domain",
5343
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5344
+ "transform": [
5345
+ "trim"
5346
+ ]
5347
+ }
5348
+ },
5349
+ "title": "Load cookie (detailed)"
5350
+ }
5351
+ ],
5352
+ "components": {
5353
+ "schemas": {
5354
+ "string": {
5355
+ "type": "string",
5356
+ "title": "Cookie name or file path",
5357
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5358
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5359
+ "transform": [
5360
+ "trim"
5361
+ ]
5362
+ },
5363
+ "object": {
5364
+ "type": "object",
5365
+ "additionalProperties": false,
5366
+ "required": [
5367
+ "name"
5368
+ ],
5369
+ "anyOf": [
5370
+ {
5371
+ "required": [
5372
+ "path"
5373
+ ],
5374
+ "not": {
5375
+ "required": [
5376
+ "variable"
5377
+ ]
5378
+ }
5379
+ },
5380
+ {
5381
+ "required": [
5382
+ "variable"
5383
+ ],
5384
+ "not": {
5385
+ "anyOf": [
5386
+ {
5387
+ "required": [
5388
+ "path"
5389
+ ]
5390
+ },
5391
+ {
5392
+ "required": [
5393
+ "directory"
5394
+ ]
5395
+ }
5396
+ ]
5397
+ }
5398
+ }
5399
+ ],
5400
+ "properties": {
5401
+ "$schema": {
5402
+ "description": "Optional self-describing schema URI for linters",
5403
+ "type": "string",
5404
+ "format": "uri-reference"
5405
+ },
5406
+ "name": {
5407
+ "type": "string",
5408
+ "title": "Cookie name",
5409
+ "description": "Name of the specific cookie to load.",
5410
+ "pattern": "^[A-Za-z0-9_.-]+$",
5411
+ "transform": [
5412
+ "trim"
5413
+ ]
5414
+ },
5415
+ "variable": {
5416
+ "type": "string",
5417
+ "title": "Environment variable name",
5418
+ "description": "Environment variable name containing the cookie as JSON string.",
5419
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5420
+ "transform": [
5421
+ "trim"
5422
+ ]
5423
+ },
5424
+ "path": {
5425
+ "type": "string",
5426
+ "title": "Cookie file path",
5427
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5428
+ "transform": [
5429
+ "trim"
5430
+ ]
5431
+ },
5432
+ "directory": {
5433
+ "type": "string",
5434
+ "title": "Directory path",
5435
+ "description": "Directory containing the cookie file.",
5436
+ "transform": [
5437
+ "trim"
5438
+ ]
5439
+ },
5440
+ "domain": {
5441
+ "type": "string",
5442
+ "title": "Cookie domain",
5443
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5444
+ "transform": [
5445
+ "trim"
5446
+ ]
5447
+ }
5448
+ },
5449
+ "title": "Load cookie (detailed)"
5450
+ }
5451
+ }
5452
+ },
5453
+ "examples": [
5454
+ "session_token",
5455
+ "./test-data/auth-session.txt",
5456
+ "test_env_cookie",
5457
+ {
5458
+ "name": "auth_cookie",
5459
+ "variable": "AUTH_COOKIE"
5460
+ },
5461
+ {
5462
+ "name": "test_cookie",
5463
+ "path": "test-cookie.txt"
5464
+ },
5465
+ {
5466
+ "name": "session_token",
5467
+ "path": "session-token.txt",
5468
+ "directory": "./test-data"
5469
+ },
5470
+ {
5471
+ "name": "user_session",
5472
+ "path": "saved-cookies.txt",
5473
+ "domain": "app.example.com"
5474
+ }
5475
+ ]
5476
+ }
5477
+ }
5478
+ }
5479
+ ]
5480
+ },
4862
5481
  {
4863
5482
  "allOf": [
4864
5483
  {
@@ -5096,7 +5715,28 @@
5096
5715
  }
5097
5716
  },
5098
5717
  {
5099
- "loadVariables": "variables.env"
5718
+ "loadVariables": "variables.env"
5719
+ },
5720
+ {
5721
+ "saveCookie": "session_token"
5722
+ },
5723
+ {
5724
+ "saveCookie": {
5725
+ "name": "auth_cookie",
5726
+ "path": "auth-session.txt",
5727
+ "directory": "./test-data",
5728
+ "overwrite": true
5729
+ }
5730
+ },
5731
+ {
5732
+ "loadCookie": "session_token"
5733
+ },
5734
+ {
5735
+ "loadCookie": {
5736
+ "name": "auth_cookie",
5737
+ "path": "auth-session.txt",
5738
+ "directory": "./test-data"
5739
+ }
5100
5740
  },
5101
5741
  {
5102
5742
  "find": "Find me!"
@@ -5971,10 +6611,12 @@
5971
6611
  "find",
5972
6612
  "goTo",
5973
6613
  "httpRequest",
6614
+ "loadCookie",
5974
6615
  "loadVariables",
5975
6616
  "record",
5976
6617
  "runCode",
5977
6618
  "runShell",
6619
+ "saveCookie",
5978
6620
  "screenshot",
5979
6621
  "stopRecord",
5980
6622
  "type",
@@ -5993,10 +6635,12 @@
5993
6635
  "find",
5994
6636
  "goTo",
5995
6637
  "httpRequest",
6638
+ "loadCookie",
5996
6639
  "loadVariables",
5997
6640
  "record",
5998
6641
  "runCode",
5999
6642
  "runShell",
6643
+ "saveCookie",
6000
6644
  "screenshot",
6001
6645
  "stopRecord",
6002
6646
  "type",
@@ -9723,38 +10367,354 @@
9723
10367
  "static/images/image.png",
9724
10368
  "/User/manny/projects/doc-detective/static/images/image.png",
9725
10369
  {
9726
- "path": "image.png",
9727
- "directory": "static/images",
9728
- "maxVariation": 0.1,
9729
- "overwrite": "aboveVariation",
9730
- "crop": "#elementToScreenshot"
10370
+ "path": "image.png",
10371
+ "directory": "static/images",
10372
+ "maxVariation": 0.1,
10373
+ "overwrite": "aboveVariation",
10374
+ "crop": "#elementToScreenshot"
10375
+ },
10376
+ {
10377
+ "path": "image.png",
10378
+ "directory": "static/images",
10379
+ "maxVariation": 0.1,
10380
+ "overwrite": "aboveVariation"
10381
+ },
10382
+ {
10383
+ "path": "image.png",
10384
+ "directory": "static/images",
10385
+ "maxVariation": 0.1,
10386
+ "overwrite": "aboveVariation",
10387
+ "crop": {
10388
+ "selector": "#elementToScreenshot",
10389
+ "elementText": "Element text",
10390
+ "padding": {
10391
+ "top": 0,
10392
+ "right": 0,
10393
+ "bottom": 0,
10394
+ "left": 0
10395
+ }
10396
+ }
10397
+ }
10398
+ ]
10399
+ }
10400
+ },
10401
+ "title": "screenshot"
10402
+ }
10403
+ ]
10404
+ },
10405
+ {
10406
+ "allOf": [
10407
+ {
10408
+ "type": "object",
10409
+ "dynamicDefaults": {
10410
+ "stepId": "uuid"
10411
+ },
10412
+ "properties": {
10413
+ "$schema": {
10414
+ "description": "JSON Schema for this object.",
10415
+ "type": "string",
10416
+ "enum": [
10417
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
10418
+ ]
10419
+ },
10420
+ "stepId": {
10421
+ "type": "string",
10422
+ "description": "ID of the step."
10423
+ },
10424
+ "description": {
10425
+ "type": "string",
10426
+ "description": "Description of the step."
10427
+ },
10428
+ "unsafe": {
10429
+ "type": "boolean",
10430
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
10431
+ "default": false
10432
+ },
10433
+ "outputs": {
10434
+ "type": "object",
10435
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
10436
+ "default": {},
10437
+ "patternProperties": {
10438
+ "^[A-Za-z0-9_]+$": {
10439
+ "type": "string",
10440
+ "description": "Runtime expression for a user-defined output value."
10441
+ }
10442
+ },
10443
+ "title": "Outputs (step)"
10444
+ },
10445
+ "variables": {
10446
+ "type": "object",
10447
+ "description": "Environment variables to set from user-defined expressions.",
10448
+ "default": {},
10449
+ "patternProperties": {
10450
+ "^[A-Za-z0-9_]+$": {
10451
+ "type": "string",
10452
+ "description": "Runtime expression for a user-defined output value."
10453
+ }
10454
+ },
10455
+ "title": "Variables (step)"
10456
+ },
10457
+ "breakpoint": {
10458
+ "type": "boolean",
10459
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
10460
+ "default": false
10461
+ }
10462
+ },
10463
+ "title": "Common"
10464
+ },
10465
+ {
10466
+ "type": "object",
10467
+ "required": [
10468
+ "saveCookie"
10469
+ ],
10470
+ "properties": {
10471
+ "saveCookie": {
10472
+ "$schema": "http://json-schema.org/draft-07/schema#",
10473
+ "title": "saveCookie",
10474
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
10475
+ "anyOf": [
10476
+ {
10477
+ "type": "string",
10478
+ "title": "Cookie name",
10479
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
10480
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10481
+ "transform": [
10482
+ "trim"
10483
+ ]
10484
+ },
10485
+ {
10486
+ "type": "object",
10487
+ "additionalProperties": false,
10488
+ "properties": {
10489
+ "$schema": {
10490
+ "description": "Optional self-describing schema URI for linters",
10491
+ "type": "string",
10492
+ "format": "uri-reference"
10493
+ },
10494
+ "name": {
10495
+ "type": "string",
10496
+ "title": "Cookie name",
10497
+ "description": "Name of the specific cookie to save.",
10498
+ "pattern": "^[A-Za-z0-9_.-]+$",
10499
+ "transform": [
10500
+ "trim"
10501
+ ]
10502
+ },
10503
+ "variable": {
10504
+ "type": "string",
10505
+ "title": "Environment variable name",
10506
+ "description": "Environment variable name to store the cookie as JSON string.",
10507
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10508
+ "transform": [
10509
+ "trim"
10510
+ ]
10511
+ },
10512
+ "path": {
10513
+ "type": "string",
10514
+ "title": "Cookie file path",
10515
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10516
+ "transform": [
10517
+ "trim"
10518
+ ]
10519
+ },
10520
+ "directory": {
10521
+ "type": "string",
10522
+ "title": "Directory path",
10523
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10524
+ "transform": [
10525
+ "trim"
10526
+ ]
10527
+ },
10528
+ "overwrite": {
10529
+ "type": "boolean",
10530
+ "title": "Overwrite existing file",
10531
+ "description": "Whether to overwrite existing cookie file.",
10532
+ "default": false
10533
+ },
10534
+ "domain": {
10535
+ "type": "string",
10536
+ "title": "Cookie domain",
10537
+ "description": "Specific domain to filter the cookie by (optional).",
10538
+ "transform": [
10539
+ "trim"
10540
+ ]
10541
+ }
10542
+ },
10543
+ "required": [
10544
+ "name"
10545
+ ],
10546
+ "anyOf": [
10547
+ {
10548
+ "required": [
10549
+ "path"
10550
+ ],
10551
+ "not": {
10552
+ "required": [
10553
+ "variable"
10554
+ ]
10555
+ }
10556
+ },
10557
+ {
10558
+ "required": [
10559
+ "variable"
10560
+ ],
10561
+ "not": {
10562
+ "anyOf": [
10563
+ {
10564
+ "required": [
10565
+ "path"
10566
+ ]
10567
+ },
10568
+ {
10569
+ "required": [
10570
+ "directory"
10571
+ ]
10572
+ }
10573
+ ]
10574
+ }
10575
+ }
10576
+ ],
10577
+ "title": "Save cookie (detailed)"
10578
+ }
10579
+ ],
10580
+ "components": {
10581
+ "schemas": {
10582
+ "string": {
10583
+ "type": "string",
10584
+ "title": "Cookie name",
10585
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
10586
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10587
+ "transform": [
10588
+ "trim"
10589
+ ]
10590
+ },
10591
+ "object": {
10592
+ "type": "object",
10593
+ "additionalProperties": false,
10594
+ "properties": {
10595
+ "$schema": {
10596
+ "description": "Optional self-describing schema URI for linters",
10597
+ "type": "string",
10598
+ "format": "uri-reference"
10599
+ },
10600
+ "name": {
10601
+ "type": "string",
10602
+ "title": "Cookie name",
10603
+ "description": "Name of the specific cookie to save.",
10604
+ "pattern": "^[A-Za-z0-9_.-]+$",
10605
+ "transform": [
10606
+ "trim"
10607
+ ]
10608
+ },
10609
+ "variable": {
10610
+ "type": "string",
10611
+ "title": "Environment variable name",
10612
+ "description": "Environment variable name to store the cookie as JSON string.",
10613
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10614
+ "transform": [
10615
+ "trim"
10616
+ ]
10617
+ },
10618
+ "path": {
10619
+ "type": "string",
10620
+ "title": "Cookie file path",
10621
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10622
+ "transform": [
10623
+ "trim"
10624
+ ]
10625
+ },
10626
+ "directory": {
10627
+ "type": "string",
10628
+ "title": "Directory path",
10629
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10630
+ "transform": [
10631
+ "trim"
10632
+ ]
10633
+ },
10634
+ "overwrite": {
10635
+ "type": "boolean",
10636
+ "title": "Overwrite existing file",
10637
+ "description": "Whether to overwrite existing cookie file.",
10638
+ "default": false
10639
+ },
10640
+ "domain": {
10641
+ "type": "string",
10642
+ "title": "Cookie domain",
10643
+ "description": "Specific domain to filter the cookie by (optional).",
10644
+ "transform": [
10645
+ "trim"
10646
+ ]
10647
+ }
10648
+ },
10649
+ "required": [
10650
+ "name"
10651
+ ],
10652
+ "anyOf": [
10653
+ {
10654
+ "required": [
10655
+ "path"
10656
+ ],
10657
+ "not": {
10658
+ "required": [
10659
+ "variable"
10660
+ ]
10661
+ }
10662
+ },
10663
+ {
10664
+ "required": [
10665
+ "variable"
10666
+ ],
10667
+ "not": {
10668
+ "anyOf": [
10669
+ {
10670
+ "required": [
10671
+ "path"
10672
+ ]
10673
+ },
10674
+ {
10675
+ "required": [
10676
+ "directory"
10677
+ ]
10678
+ }
10679
+ ]
10680
+ }
10681
+ }
10682
+ ],
10683
+ "title": "Save cookie (detailed)"
10684
+ }
10685
+ }
10686
+ },
10687
+ "examples": [
10688
+ "session_token",
10689
+ "test_env_cookie",
10690
+ {
10691
+ "name": "auth_cookie",
10692
+ "path": "auth-cookie.txt"
10693
+ },
10694
+ {
10695
+ "name": "session_token",
10696
+ "variable": "SESSION_TOKEN"
10697
+ },
10698
+ {
10699
+ "name": "test_cookie",
10700
+ "path": "test-cookie.txt",
10701
+ "overwrite": true
9731
10702
  },
9732
10703
  {
9733
- "path": "image.png",
9734
- "directory": "static/images",
9735
- "maxVariation": 0.1,
9736
- "overwrite": "aboveVariation"
10704
+ "name": "user_session",
10705
+ "path": "user-session.txt",
10706
+ "directory": "./test-data",
10707
+ "overwrite": true
9737
10708
  },
9738
10709
  {
9739
- "path": "image.png",
9740
- "directory": "static/images",
9741
- "maxVariation": 0.1,
9742
- "overwrite": "aboveVariation",
9743
- "crop": {
9744
- "selector": "#elementToScreenshot",
9745
- "elementText": "Element text",
9746
- "padding": {
9747
- "top": 0,
9748
- "right": 0,
9749
- "bottom": 0,
9750
- "left": 0
9751
- }
9752
- }
10710
+ "name": "login_token",
10711
+ "path": "login-token.txt",
10712
+ "domain": "app.example.com"
9753
10713
  }
9754
10714
  ]
9755
10715
  }
9756
10716
  },
9757
- "title": "screenshot"
10717
+ "title": "saveCookie"
9758
10718
  }
9759
10719
  ]
9760
10720
  },
@@ -10095,6 +11055,305 @@
10095
11055
  }
10096
11056
  ]
10097
11057
  },
11058
+ {
11059
+ "allOf": [
11060
+ {
11061
+ "type": "object",
11062
+ "dynamicDefaults": {
11063
+ "stepId": "uuid"
11064
+ },
11065
+ "properties": {
11066
+ "$schema": {
11067
+ "description": "JSON Schema for this object.",
11068
+ "type": "string",
11069
+ "enum": [
11070
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
11071
+ ]
11072
+ },
11073
+ "stepId": {
11074
+ "type": "string",
11075
+ "description": "ID of the step."
11076
+ },
11077
+ "description": {
11078
+ "type": "string",
11079
+ "description": "Description of the step."
11080
+ },
11081
+ "unsafe": {
11082
+ "type": "boolean",
11083
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
11084
+ "default": false
11085
+ },
11086
+ "outputs": {
11087
+ "type": "object",
11088
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
11089
+ "default": {},
11090
+ "patternProperties": {
11091
+ "^[A-Za-z0-9_]+$": {
11092
+ "type": "string",
11093
+ "description": "Runtime expression for a user-defined output value."
11094
+ }
11095
+ },
11096
+ "title": "Outputs (step)"
11097
+ },
11098
+ "variables": {
11099
+ "type": "object",
11100
+ "description": "Environment variables to set from user-defined expressions.",
11101
+ "default": {},
11102
+ "patternProperties": {
11103
+ "^[A-Za-z0-9_]+$": {
11104
+ "type": "string",
11105
+ "description": "Runtime expression for a user-defined output value."
11106
+ }
11107
+ },
11108
+ "title": "Variables (step)"
11109
+ },
11110
+ "breakpoint": {
11111
+ "type": "boolean",
11112
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
11113
+ "default": false
11114
+ }
11115
+ },
11116
+ "title": "Common"
11117
+ },
11118
+ {
11119
+ "title": "loadCookie",
11120
+ "type": "object",
11121
+ "required": [
11122
+ "loadCookie"
11123
+ ],
11124
+ "properties": {
11125
+ "loadCookie": {
11126
+ "$schema": "http://json-schema.org/draft-07/schema#",
11127
+ "title": "loadCookie",
11128
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
11129
+ "anyOf": [
11130
+ {
11131
+ "type": "string",
11132
+ "title": "Cookie name or file path",
11133
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
11134
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
11135
+ "transform": [
11136
+ "trim"
11137
+ ]
11138
+ },
11139
+ {
11140
+ "type": "object",
11141
+ "additionalProperties": false,
11142
+ "required": [
11143
+ "name"
11144
+ ],
11145
+ "anyOf": [
11146
+ {
11147
+ "required": [
11148
+ "path"
11149
+ ],
11150
+ "not": {
11151
+ "required": [
11152
+ "variable"
11153
+ ]
11154
+ }
11155
+ },
11156
+ {
11157
+ "required": [
11158
+ "variable"
11159
+ ],
11160
+ "not": {
11161
+ "anyOf": [
11162
+ {
11163
+ "required": [
11164
+ "path"
11165
+ ]
11166
+ },
11167
+ {
11168
+ "required": [
11169
+ "directory"
11170
+ ]
11171
+ }
11172
+ ]
11173
+ }
11174
+ }
11175
+ ],
11176
+ "properties": {
11177
+ "$schema": {
11178
+ "description": "Optional self-describing schema URI for linters",
11179
+ "type": "string",
11180
+ "format": "uri-reference"
11181
+ },
11182
+ "name": {
11183
+ "type": "string",
11184
+ "title": "Cookie name",
11185
+ "description": "Name of the specific cookie to load.",
11186
+ "pattern": "^[A-Za-z0-9_.-]+$",
11187
+ "transform": [
11188
+ "trim"
11189
+ ]
11190
+ },
11191
+ "variable": {
11192
+ "type": "string",
11193
+ "title": "Environment variable name",
11194
+ "description": "Environment variable name containing the cookie as JSON string.",
11195
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
11196
+ "transform": [
11197
+ "trim"
11198
+ ]
11199
+ },
11200
+ "path": {
11201
+ "type": "string",
11202
+ "title": "Cookie file path",
11203
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
11204
+ "transform": [
11205
+ "trim"
11206
+ ]
11207
+ },
11208
+ "directory": {
11209
+ "type": "string",
11210
+ "title": "Directory path",
11211
+ "description": "Directory containing the cookie file.",
11212
+ "transform": [
11213
+ "trim"
11214
+ ]
11215
+ },
11216
+ "domain": {
11217
+ "type": "string",
11218
+ "title": "Cookie domain",
11219
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
11220
+ "transform": [
11221
+ "trim"
11222
+ ]
11223
+ }
11224
+ },
11225
+ "title": "Load cookie (detailed)"
11226
+ }
11227
+ ],
11228
+ "components": {
11229
+ "schemas": {
11230
+ "string": {
11231
+ "type": "string",
11232
+ "title": "Cookie name or file path",
11233
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
11234
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
11235
+ "transform": [
11236
+ "trim"
11237
+ ]
11238
+ },
11239
+ "object": {
11240
+ "type": "object",
11241
+ "additionalProperties": false,
11242
+ "required": [
11243
+ "name"
11244
+ ],
11245
+ "anyOf": [
11246
+ {
11247
+ "required": [
11248
+ "path"
11249
+ ],
11250
+ "not": {
11251
+ "required": [
11252
+ "variable"
11253
+ ]
11254
+ }
11255
+ },
11256
+ {
11257
+ "required": [
11258
+ "variable"
11259
+ ],
11260
+ "not": {
11261
+ "anyOf": [
11262
+ {
11263
+ "required": [
11264
+ "path"
11265
+ ]
11266
+ },
11267
+ {
11268
+ "required": [
11269
+ "directory"
11270
+ ]
11271
+ }
11272
+ ]
11273
+ }
11274
+ }
11275
+ ],
11276
+ "properties": {
11277
+ "$schema": {
11278
+ "description": "Optional self-describing schema URI for linters",
11279
+ "type": "string",
11280
+ "format": "uri-reference"
11281
+ },
11282
+ "name": {
11283
+ "type": "string",
11284
+ "title": "Cookie name",
11285
+ "description": "Name of the specific cookie to load.",
11286
+ "pattern": "^[A-Za-z0-9_.-]+$",
11287
+ "transform": [
11288
+ "trim"
11289
+ ]
11290
+ },
11291
+ "variable": {
11292
+ "type": "string",
11293
+ "title": "Environment variable name",
11294
+ "description": "Environment variable name containing the cookie as JSON string.",
11295
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
11296
+ "transform": [
11297
+ "trim"
11298
+ ]
11299
+ },
11300
+ "path": {
11301
+ "type": "string",
11302
+ "title": "Cookie file path",
11303
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
11304
+ "transform": [
11305
+ "trim"
11306
+ ]
11307
+ },
11308
+ "directory": {
11309
+ "type": "string",
11310
+ "title": "Directory path",
11311
+ "description": "Directory containing the cookie file.",
11312
+ "transform": [
11313
+ "trim"
11314
+ ]
11315
+ },
11316
+ "domain": {
11317
+ "type": "string",
11318
+ "title": "Cookie domain",
11319
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
11320
+ "transform": [
11321
+ "trim"
11322
+ ]
11323
+ }
11324
+ },
11325
+ "title": "Load cookie (detailed)"
11326
+ }
11327
+ }
11328
+ },
11329
+ "examples": [
11330
+ "session_token",
11331
+ "./test-data/auth-session.txt",
11332
+ "test_env_cookie",
11333
+ {
11334
+ "name": "auth_cookie",
11335
+ "variable": "AUTH_COOKIE"
11336
+ },
11337
+ {
11338
+ "name": "test_cookie",
11339
+ "path": "test-cookie.txt"
11340
+ },
11341
+ {
11342
+ "name": "session_token",
11343
+ "path": "session-token.txt",
11344
+ "directory": "./test-data"
11345
+ },
11346
+ {
11347
+ "name": "user_session",
11348
+ "path": "saved-cookies.txt",
11349
+ "domain": "app.example.com"
11350
+ }
11351
+ ]
11352
+ }
11353
+ }
11354
+ }
11355
+ ]
11356
+ },
10098
11357
  {
10099
11358
  "allOf": [
10100
11359
  {
@@ -10334,6 +11593,27 @@
10334
11593
  {
10335
11594
  "loadVariables": "variables.env"
10336
11595
  },
11596
+ {
11597
+ "saveCookie": "session_token"
11598
+ },
11599
+ {
11600
+ "saveCookie": {
11601
+ "name": "auth_cookie",
11602
+ "path": "auth-session.txt",
11603
+ "directory": "./test-data",
11604
+ "overwrite": true
11605
+ }
11606
+ },
11607
+ {
11608
+ "loadCookie": "session_token"
11609
+ },
11610
+ {
11611
+ "loadCookie": {
11612
+ "name": "auth_cookie",
11613
+ "path": "auth-session.txt",
11614
+ "directory": "./test-data"
11615
+ }
11616
+ },
10337
11617
  {
10338
11618
  "find": "Find me!"
10339
11619
  },
@@ -10582,10 +11862,12 @@
10582
11862
  "find",
10583
11863
  "goTo",
10584
11864
  "httpRequest",
11865
+ "loadCookie",
10585
11866
  "loadVariables",
10586
11867
  "record",
10587
11868
  "runCode",
10588
11869
  "runShell",
11870
+ "saveCookie",
10589
11871
  "screenshot",
10590
11872
  "stopRecord",
10591
11873
  "type",