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
@@ -4352,6 +4352,322 @@
4352
4352
  }
4353
4353
  ]
4354
4354
  },
4355
+ {
4356
+ "allOf": [
4357
+ {
4358
+ "type": "object",
4359
+ "dynamicDefaults": {
4360
+ "stepId": "uuid"
4361
+ },
4362
+ "properties": {
4363
+ "$schema": {
4364
+ "description": "JSON Schema for this object.",
4365
+ "type": "string",
4366
+ "enum": [
4367
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
4368
+ ]
4369
+ },
4370
+ "stepId": {
4371
+ "type": "string",
4372
+ "description": "ID of the step."
4373
+ },
4374
+ "description": {
4375
+ "type": "string",
4376
+ "description": "Description of the step."
4377
+ },
4378
+ "unsafe": {
4379
+ "type": "boolean",
4380
+ "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.",
4381
+ "default": false
4382
+ },
4383
+ "outputs": {
4384
+ "type": "object",
4385
+ "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.",
4386
+ "default": {},
4387
+ "patternProperties": {
4388
+ "^[A-Za-z0-9_]+$": {
4389
+ "type": "string",
4390
+ "description": "Runtime expression for a user-defined output value."
4391
+ }
4392
+ },
4393
+ "title": "Outputs (step)"
4394
+ },
4395
+ "variables": {
4396
+ "type": "object",
4397
+ "description": "Environment variables to set from user-defined expressions.",
4398
+ "default": {},
4399
+ "patternProperties": {
4400
+ "^[A-Za-z0-9_]+$": {
4401
+ "type": "string",
4402
+ "description": "Runtime expression for a user-defined output value."
4403
+ }
4404
+ },
4405
+ "title": "Variables (step)"
4406
+ },
4407
+ "breakpoint": {
4408
+ "type": "boolean",
4409
+ "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.",
4410
+ "default": false
4411
+ }
4412
+ },
4413
+ "title": "Common"
4414
+ },
4415
+ {
4416
+ "type": "object",
4417
+ "required": [
4418
+ "saveCookie"
4419
+ ],
4420
+ "properties": {
4421
+ "saveCookie": {
4422
+ "$schema": "http://json-schema.org/draft-07/schema#",
4423
+ "title": "saveCookie",
4424
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
4425
+ "anyOf": [
4426
+ {
4427
+ "type": "string",
4428
+ "title": "Cookie name",
4429
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
4430
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
4431
+ "transform": [
4432
+ "trim"
4433
+ ]
4434
+ },
4435
+ {
4436
+ "type": "object",
4437
+ "additionalProperties": false,
4438
+ "properties": {
4439
+ "$schema": {
4440
+ "description": "Optional self-describing schema URI for linters",
4441
+ "type": "string",
4442
+ "format": "uri-reference"
4443
+ },
4444
+ "name": {
4445
+ "type": "string",
4446
+ "title": "Cookie name",
4447
+ "description": "Name of the specific cookie to save.",
4448
+ "pattern": "^[A-Za-z0-9_.-]+$",
4449
+ "transform": [
4450
+ "trim"
4451
+ ]
4452
+ },
4453
+ "variable": {
4454
+ "type": "string",
4455
+ "title": "Environment variable name",
4456
+ "description": "Environment variable name to store the cookie as JSON string.",
4457
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
4458
+ "transform": [
4459
+ "trim"
4460
+ ]
4461
+ },
4462
+ "path": {
4463
+ "type": "string",
4464
+ "title": "Cookie file path",
4465
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
4466
+ "transform": [
4467
+ "trim"
4468
+ ]
4469
+ },
4470
+ "directory": {
4471
+ "type": "string",
4472
+ "title": "Directory path",
4473
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
4474
+ "transform": [
4475
+ "trim"
4476
+ ]
4477
+ },
4478
+ "overwrite": {
4479
+ "type": "boolean",
4480
+ "title": "Overwrite existing file",
4481
+ "description": "Whether to overwrite existing cookie file.",
4482
+ "default": false
4483
+ },
4484
+ "domain": {
4485
+ "type": "string",
4486
+ "title": "Cookie domain",
4487
+ "description": "Specific domain to filter the cookie by (optional).",
4488
+ "transform": [
4489
+ "trim"
4490
+ ]
4491
+ }
4492
+ },
4493
+ "required": [
4494
+ "name"
4495
+ ],
4496
+ "anyOf": [
4497
+ {
4498
+ "required": [
4499
+ "path"
4500
+ ],
4501
+ "not": {
4502
+ "required": [
4503
+ "variable"
4504
+ ]
4505
+ }
4506
+ },
4507
+ {
4508
+ "required": [
4509
+ "variable"
4510
+ ],
4511
+ "not": {
4512
+ "anyOf": [
4513
+ {
4514
+ "required": [
4515
+ "path"
4516
+ ]
4517
+ },
4518
+ {
4519
+ "required": [
4520
+ "directory"
4521
+ ]
4522
+ }
4523
+ ]
4524
+ }
4525
+ }
4526
+ ],
4527
+ "title": "Save cookie (detailed)"
4528
+ }
4529
+ ],
4530
+ "components": {
4531
+ "schemas": {
4532
+ "string": {
4533
+ "type": "string",
4534
+ "title": "Cookie name",
4535
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
4536
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
4537
+ "transform": [
4538
+ "trim"
4539
+ ]
4540
+ },
4541
+ "object": {
4542
+ "type": "object",
4543
+ "additionalProperties": false,
4544
+ "properties": {
4545
+ "$schema": {
4546
+ "description": "Optional self-describing schema URI for linters",
4547
+ "type": "string",
4548
+ "format": "uri-reference"
4549
+ },
4550
+ "name": {
4551
+ "type": "string",
4552
+ "title": "Cookie name",
4553
+ "description": "Name of the specific cookie to save.",
4554
+ "pattern": "^[A-Za-z0-9_.-]+$",
4555
+ "transform": [
4556
+ "trim"
4557
+ ]
4558
+ },
4559
+ "variable": {
4560
+ "type": "string",
4561
+ "title": "Environment variable name",
4562
+ "description": "Environment variable name to store the cookie as JSON string.",
4563
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
4564
+ "transform": [
4565
+ "trim"
4566
+ ]
4567
+ },
4568
+ "path": {
4569
+ "type": "string",
4570
+ "title": "Cookie file path",
4571
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
4572
+ "transform": [
4573
+ "trim"
4574
+ ]
4575
+ },
4576
+ "directory": {
4577
+ "type": "string",
4578
+ "title": "Directory path",
4579
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
4580
+ "transform": [
4581
+ "trim"
4582
+ ]
4583
+ },
4584
+ "overwrite": {
4585
+ "type": "boolean",
4586
+ "title": "Overwrite existing file",
4587
+ "description": "Whether to overwrite existing cookie file.",
4588
+ "default": false
4589
+ },
4590
+ "domain": {
4591
+ "type": "string",
4592
+ "title": "Cookie domain",
4593
+ "description": "Specific domain to filter the cookie by (optional).",
4594
+ "transform": [
4595
+ "trim"
4596
+ ]
4597
+ }
4598
+ },
4599
+ "required": [
4600
+ "name"
4601
+ ],
4602
+ "anyOf": [
4603
+ {
4604
+ "required": [
4605
+ "path"
4606
+ ],
4607
+ "not": {
4608
+ "required": [
4609
+ "variable"
4610
+ ]
4611
+ }
4612
+ },
4613
+ {
4614
+ "required": [
4615
+ "variable"
4616
+ ],
4617
+ "not": {
4618
+ "anyOf": [
4619
+ {
4620
+ "required": [
4621
+ "path"
4622
+ ]
4623
+ },
4624
+ {
4625
+ "required": [
4626
+ "directory"
4627
+ ]
4628
+ }
4629
+ ]
4630
+ }
4631
+ }
4632
+ ],
4633
+ "title": "Save cookie (detailed)"
4634
+ }
4635
+ }
4636
+ },
4637
+ "examples": [
4638
+ "session_token",
4639
+ "test_env_cookie",
4640
+ {
4641
+ "name": "auth_cookie",
4642
+ "path": "auth-cookie.txt"
4643
+ },
4644
+ {
4645
+ "name": "session_token",
4646
+ "variable": "SESSION_TOKEN"
4647
+ },
4648
+ {
4649
+ "name": "test_cookie",
4650
+ "path": "test-cookie.txt",
4651
+ "overwrite": true
4652
+ },
4653
+ {
4654
+ "name": "user_session",
4655
+ "path": "user-session.txt",
4656
+ "directory": "./test-data",
4657
+ "overwrite": true
4658
+ },
4659
+ {
4660
+ "name": "login_token",
4661
+ "path": "login-token.txt",
4662
+ "domain": "app.example.com"
4663
+ }
4664
+ ]
4665
+ }
4666
+ },
4667
+ "title": "saveCookie"
4668
+ }
4669
+ ]
4670
+ },
4355
4671
  {
4356
4672
  "allOf": [
4357
4673
  {
@@ -4689,6 +5005,305 @@
4689
5005
  }
4690
5006
  ]
4691
5007
  },
5008
+ {
5009
+ "allOf": [
5010
+ {
5011
+ "type": "object",
5012
+ "dynamicDefaults": {
5013
+ "stepId": "uuid"
5014
+ },
5015
+ "properties": {
5016
+ "$schema": {
5017
+ "description": "JSON Schema for this object.",
5018
+ "type": "string",
5019
+ "enum": [
5020
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
5021
+ ]
5022
+ },
5023
+ "stepId": {
5024
+ "type": "string",
5025
+ "description": "ID of the step."
5026
+ },
5027
+ "description": {
5028
+ "type": "string",
5029
+ "description": "Description of the step."
5030
+ },
5031
+ "unsafe": {
5032
+ "type": "boolean",
5033
+ "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.",
5034
+ "default": false
5035
+ },
5036
+ "outputs": {
5037
+ "type": "object",
5038
+ "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.",
5039
+ "default": {},
5040
+ "patternProperties": {
5041
+ "^[A-Za-z0-9_]+$": {
5042
+ "type": "string",
5043
+ "description": "Runtime expression for a user-defined output value."
5044
+ }
5045
+ },
5046
+ "title": "Outputs (step)"
5047
+ },
5048
+ "variables": {
5049
+ "type": "object",
5050
+ "description": "Environment variables to set from user-defined expressions.",
5051
+ "default": {},
5052
+ "patternProperties": {
5053
+ "^[A-Za-z0-9_]+$": {
5054
+ "type": "string",
5055
+ "description": "Runtime expression for a user-defined output value."
5056
+ }
5057
+ },
5058
+ "title": "Variables (step)"
5059
+ },
5060
+ "breakpoint": {
5061
+ "type": "boolean",
5062
+ "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.",
5063
+ "default": false
5064
+ }
5065
+ },
5066
+ "title": "Common"
5067
+ },
5068
+ {
5069
+ "title": "loadCookie",
5070
+ "type": "object",
5071
+ "required": [
5072
+ "loadCookie"
5073
+ ],
5074
+ "properties": {
5075
+ "loadCookie": {
5076
+ "$schema": "http://json-schema.org/draft-07/schema#",
5077
+ "title": "loadCookie",
5078
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
5079
+ "anyOf": [
5080
+ {
5081
+ "type": "string",
5082
+ "title": "Cookie name or file path",
5083
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5084
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5085
+ "transform": [
5086
+ "trim"
5087
+ ]
5088
+ },
5089
+ {
5090
+ "type": "object",
5091
+ "additionalProperties": false,
5092
+ "required": [
5093
+ "name"
5094
+ ],
5095
+ "anyOf": [
5096
+ {
5097
+ "required": [
5098
+ "path"
5099
+ ],
5100
+ "not": {
5101
+ "required": [
5102
+ "variable"
5103
+ ]
5104
+ }
5105
+ },
5106
+ {
5107
+ "required": [
5108
+ "variable"
5109
+ ],
5110
+ "not": {
5111
+ "anyOf": [
5112
+ {
5113
+ "required": [
5114
+ "path"
5115
+ ]
5116
+ },
5117
+ {
5118
+ "required": [
5119
+ "directory"
5120
+ ]
5121
+ }
5122
+ ]
5123
+ }
5124
+ }
5125
+ ],
5126
+ "properties": {
5127
+ "$schema": {
5128
+ "description": "Optional self-describing schema URI for linters",
5129
+ "type": "string",
5130
+ "format": "uri-reference"
5131
+ },
5132
+ "name": {
5133
+ "type": "string",
5134
+ "title": "Cookie name",
5135
+ "description": "Name of the specific cookie to load.",
5136
+ "pattern": "^[A-Za-z0-9_.-]+$",
5137
+ "transform": [
5138
+ "trim"
5139
+ ]
5140
+ },
5141
+ "variable": {
5142
+ "type": "string",
5143
+ "title": "Environment variable name",
5144
+ "description": "Environment variable name containing the cookie as JSON string.",
5145
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5146
+ "transform": [
5147
+ "trim"
5148
+ ]
5149
+ },
5150
+ "path": {
5151
+ "type": "string",
5152
+ "title": "Cookie file path",
5153
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5154
+ "transform": [
5155
+ "trim"
5156
+ ]
5157
+ },
5158
+ "directory": {
5159
+ "type": "string",
5160
+ "title": "Directory path",
5161
+ "description": "Directory containing the cookie file.",
5162
+ "transform": [
5163
+ "trim"
5164
+ ]
5165
+ },
5166
+ "domain": {
5167
+ "type": "string",
5168
+ "title": "Cookie domain",
5169
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5170
+ "transform": [
5171
+ "trim"
5172
+ ]
5173
+ }
5174
+ },
5175
+ "title": "Load cookie (detailed)"
5176
+ }
5177
+ ],
5178
+ "components": {
5179
+ "schemas": {
5180
+ "string": {
5181
+ "type": "string",
5182
+ "title": "Cookie name or file path",
5183
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5184
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5185
+ "transform": [
5186
+ "trim"
5187
+ ]
5188
+ },
5189
+ "object": {
5190
+ "type": "object",
5191
+ "additionalProperties": false,
5192
+ "required": [
5193
+ "name"
5194
+ ],
5195
+ "anyOf": [
5196
+ {
5197
+ "required": [
5198
+ "path"
5199
+ ],
5200
+ "not": {
5201
+ "required": [
5202
+ "variable"
5203
+ ]
5204
+ }
5205
+ },
5206
+ {
5207
+ "required": [
5208
+ "variable"
5209
+ ],
5210
+ "not": {
5211
+ "anyOf": [
5212
+ {
5213
+ "required": [
5214
+ "path"
5215
+ ]
5216
+ },
5217
+ {
5218
+ "required": [
5219
+ "directory"
5220
+ ]
5221
+ }
5222
+ ]
5223
+ }
5224
+ }
5225
+ ],
5226
+ "properties": {
5227
+ "$schema": {
5228
+ "description": "Optional self-describing schema URI for linters",
5229
+ "type": "string",
5230
+ "format": "uri-reference"
5231
+ },
5232
+ "name": {
5233
+ "type": "string",
5234
+ "title": "Cookie name",
5235
+ "description": "Name of the specific cookie to load.",
5236
+ "pattern": "^[A-Za-z0-9_.-]+$",
5237
+ "transform": [
5238
+ "trim"
5239
+ ]
5240
+ },
5241
+ "variable": {
5242
+ "type": "string",
5243
+ "title": "Environment variable name",
5244
+ "description": "Environment variable name containing the cookie as JSON string.",
5245
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5246
+ "transform": [
5247
+ "trim"
5248
+ ]
5249
+ },
5250
+ "path": {
5251
+ "type": "string",
5252
+ "title": "Cookie file path",
5253
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5254
+ "transform": [
5255
+ "trim"
5256
+ ]
5257
+ },
5258
+ "directory": {
5259
+ "type": "string",
5260
+ "title": "Directory path",
5261
+ "description": "Directory containing the cookie file.",
5262
+ "transform": [
5263
+ "trim"
5264
+ ]
5265
+ },
5266
+ "domain": {
5267
+ "type": "string",
5268
+ "title": "Cookie domain",
5269
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5270
+ "transform": [
5271
+ "trim"
5272
+ ]
5273
+ }
5274
+ },
5275
+ "title": "Load cookie (detailed)"
5276
+ }
5277
+ }
5278
+ },
5279
+ "examples": [
5280
+ "session_token",
5281
+ "./test-data/auth-session.txt",
5282
+ "test_env_cookie",
5283
+ {
5284
+ "name": "auth_cookie",
5285
+ "variable": "AUTH_COOKIE"
5286
+ },
5287
+ {
5288
+ "name": "test_cookie",
5289
+ "path": "test-cookie.txt"
5290
+ },
5291
+ {
5292
+ "name": "session_token",
5293
+ "path": "session-token.txt",
5294
+ "directory": "./test-data"
5295
+ },
5296
+ {
5297
+ "name": "user_session",
5298
+ "path": "saved-cookies.txt",
5299
+ "domain": "app.example.com"
5300
+ }
5301
+ ]
5302
+ }
5303
+ }
5304
+ }
5305
+ ]
5306
+ },
4692
5307
  {
4693
5308
  "allOf": [
4694
5309
  {
@@ -4916,17 +5531,38 @@
4916
5531
  "record": "static/media/video.mp4"
4917
5532
  },
4918
5533
  {
4919
- "record": "/User/manny/projects/doc-detective/static/media/video.mp4"
5534
+ "record": "/User/manny/projects/doc-detective/static/media/video.mp4"
5535
+ },
5536
+ {
5537
+ "record": {
5538
+ "path": "video.mp4",
5539
+ "directory": "static/media",
5540
+ "overwrite": true
5541
+ }
5542
+ },
5543
+ {
5544
+ "loadVariables": "variables.env"
5545
+ },
5546
+ {
5547
+ "saveCookie": "session_token"
4920
5548
  },
4921
5549
  {
4922
- "record": {
4923
- "path": "video.mp4",
4924
- "directory": "static/media",
5550
+ "saveCookie": {
5551
+ "name": "auth_cookie",
5552
+ "path": "auth-session.txt",
5553
+ "directory": "./test-data",
4925
5554
  "overwrite": true
4926
5555
  }
4927
5556
  },
4928
5557
  {
4929
- "loadVariables": "variables.env"
5558
+ "loadCookie": "session_token"
5559
+ },
5560
+ {
5561
+ "loadCookie": {
5562
+ "name": "auth_cookie",
5563
+ "path": "auth-session.txt",
5564
+ "directory": "./test-data"
5565
+ }
4930
5566
  },
4931
5567
  {
4932
5568
  "find": "Find me!"
@@ -9145,31 +9781,347 @@
9145
9781
  "crop": "#elementToScreenshot"
9146
9782
  },
9147
9783
  {
9148
- "path": "image.png",
9149
- "directory": "static/images",
9150
- "maxVariation": 0.1,
9151
- "overwrite": "aboveVariation"
9784
+ "path": "image.png",
9785
+ "directory": "static/images",
9786
+ "maxVariation": 0.1,
9787
+ "overwrite": "aboveVariation"
9788
+ },
9789
+ {
9790
+ "path": "image.png",
9791
+ "directory": "static/images",
9792
+ "maxVariation": 0.1,
9793
+ "overwrite": "aboveVariation",
9794
+ "crop": {
9795
+ "selector": "#elementToScreenshot",
9796
+ "elementText": "Element text",
9797
+ "padding": {
9798
+ "top": 0,
9799
+ "right": 0,
9800
+ "bottom": 0,
9801
+ "left": 0
9802
+ }
9803
+ }
9804
+ }
9805
+ ]
9806
+ }
9807
+ },
9808
+ "title": "screenshot"
9809
+ }
9810
+ ]
9811
+ },
9812
+ {
9813
+ "allOf": [
9814
+ {
9815
+ "type": "object",
9816
+ "dynamicDefaults": {
9817
+ "stepId": "uuid"
9818
+ },
9819
+ "properties": {
9820
+ "$schema": {
9821
+ "description": "JSON Schema for this object.",
9822
+ "type": "string",
9823
+ "enum": [
9824
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
9825
+ ]
9826
+ },
9827
+ "stepId": {
9828
+ "type": "string",
9829
+ "description": "ID of the step."
9830
+ },
9831
+ "description": {
9832
+ "type": "string",
9833
+ "description": "Description of the step."
9834
+ },
9835
+ "unsafe": {
9836
+ "type": "boolean",
9837
+ "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.",
9838
+ "default": false
9839
+ },
9840
+ "outputs": {
9841
+ "type": "object",
9842
+ "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.",
9843
+ "default": {},
9844
+ "patternProperties": {
9845
+ "^[A-Za-z0-9_]+$": {
9846
+ "type": "string",
9847
+ "description": "Runtime expression for a user-defined output value."
9848
+ }
9849
+ },
9850
+ "title": "Outputs (step)"
9851
+ },
9852
+ "variables": {
9853
+ "type": "object",
9854
+ "description": "Environment variables to set from user-defined expressions.",
9855
+ "default": {},
9856
+ "patternProperties": {
9857
+ "^[A-Za-z0-9_]+$": {
9858
+ "type": "string",
9859
+ "description": "Runtime expression for a user-defined output value."
9860
+ }
9861
+ },
9862
+ "title": "Variables (step)"
9863
+ },
9864
+ "breakpoint": {
9865
+ "type": "boolean",
9866
+ "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.",
9867
+ "default": false
9868
+ }
9869
+ },
9870
+ "title": "Common"
9871
+ },
9872
+ {
9873
+ "type": "object",
9874
+ "required": [
9875
+ "saveCookie"
9876
+ ],
9877
+ "properties": {
9878
+ "saveCookie": {
9879
+ "$schema": "http://json-schema.org/draft-07/schema#",
9880
+ "title": "saveCookie",
9881
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
9882
+ "anyOf": [
9883
+ {
9884
+ "type": "string",
9885
+ "title": "Cookie name",
9886
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
9887
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
9888
+ "transform": [
9889
+ "trim"
9890
+ ]
9891
+ },
9892
+ {
9893
+ "type": "object",
9894
+ "additionalProperties": false,
9895
+ "properties": {
9896
+ "$schema": {
9897
+ "description": "Optional self-describing schema URI for linters",
9898
+ "type": "string",
9899
+ "format": "uri-reference"
9900
+ },
9901
+ "name": {
9902
+ "type": "string",
9903
+ "title": "Cookie name",
9904
+ "description": "Name of the specific cookie to save.",
9905
+ "pattern": "^[A-Za-z0-9_.-]+$",
9906
+ "transform": [
9907
+ "trim"
9908
+ ]
9909
+ },
9910
+ "variable": {
9911
+ "type": "string",
9912
+ "title": "Environment variable name",
9913
+ "description": "Environment variable name to store the cookie as JSON string.",
9914
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
9915
+ "transform": [
9916
+ "trim"
9917
+ ]
9918
+ },
9919
+ "path": {
9920
+ "type": "string",
9921
+ "title": "Cookie file path",
9922
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
9923
+ "transform": [
9924
+ "trim"
9925
+ ]
9926
+ },
9927
+ "directory": {
9928
+ "type": "string",
9929
+ "title": "Directory path",
9930
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
9931
+ "transform": [
9932
+ "trim"
9933
+ ]
9934
+ },
9935
+ "overwrite": {
9936
+ "type": "boolean",
9937
+ "title": "Overwrite existing file",
9938
+ "description": "Whether to overwrite existing cookie file.",
9939
+ "default": false
9940
+ },
9941
+ "domain": {
9942
+ "type": "string",
9943
+ "title": "Cookie domain",
9944
+ "description": "Specific domain to filter the cookie by (optional).",
9945
+ "transform": [
9946
+ "trim"
9947
+ ]
9948
+ }
9949
+ },
9950
+ "required": [
9951
+ "name"
9952
+ ],
9953
+ "anyOf": [
9954
+ {
9955
+ "required": [
9956
+ "path"
9957
+ ],
9958
+ "not": {
9959
+ "required": [
9960
+ "variable"
9961
+ ]
9962
+ }
9963
+ },
9964
+ {
9965
+ "required": [
9966
+ "variable"
9967
+ ],
9968
+ "not": {
9969
+ "anyOf": [
9970
+ {
9971
+ "required": [
9972
+ "path"
9973
+ ]
9974
+ },
9975
+ {
9976
+ "required": [
9977
+ "directory"
9978
+ ]
9979
+ }
9980
+ ]
9981
+ }
9982
+ }
9983
+ ],
9984
+ "title": "Save cookie (detailed)"
9985
+ }
9986
+ ],
9987
+ "components": {
9988
+ "schemas": {
9989
+ "string": {
9990
+ "type": "string",
9991
+ "title": "Cookie name",
9992
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
9993
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
9994
+ "transform": [
9995
+ "trim"
9996
+ ]
9997
+ },
9998
+ "object": {
9999
+ "type": "object",
10000
+ "additionalProperties": false,
10001
+ "properties": {
10002
+ "$schema": {
10003
+ "description": "Optional self-describing schema URI for linters",
10004
+ "type": "string",
10005
+ "format": "uri-reference"
10006
+ },
10007
+ "name": {
10008
+ "type": "string",
10009
+ "title": "Cookie name",
10010
+ "description": "Name of the specific cookie to save.",
10011
+ "pattern": "^[A-Za-z0-9_.-]+$",
10012
+ "transform": [
10013
+ "trim"
10014
+ ]
10015
+ },
10016
+ "variable": {
10017
+ "type": "string",
10018
+ "title": "Environment variable name",
10019
+ "description": "Environment variable name to store the cookie as JSON string.",
10020
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10021
+ "transform": [
10022
+ "trim"
10023
+ ]
10024
+ },
10025
+ "path": {
10026
+ "type": "string",
10027
+ "title": "Cookie file path",
10028
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10029
+ "transform": [
10030
+ "trim"
10031
+ ]
10032
+ },
10033
+ "directory": {
10034
+ "type": "string",
10035
+ "title": "Directory path",
10036
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10037
+ "transform": [
10038
+ "trim"
10039
+ ]
10040
+ },
10041
+ "overwrite": {
10042
+ "type": "boolean",
10043
+ "title": "Overwrite existing file",
10044
+ "description": "Whether to overwrite existing cookie file.",
10045
+ "default": false
10046
+ },
10047
+ "domain": {
10048
+ "type": "string",
10049
+ "title": "Cookie domain",
10050
+ "description": "Specific domain to filter the cookie by (optional).",
10051
+ "transform": [
10052
+ "trim"
10053
+ ]
10054
+ }
10055
+ },
10056
+ "required": [
10057
+ "name"
10058
+ ],
10059
+ "anyOf": [
10060
+ {
10061
+ "required": [
10062
+ "path"
10063
+ ],
10064
+ "not": {
10065
+ "required": [
10066
+ "variable"
10067
+ ]
10068
+ }
10069
+ },
10070
+ {
10071
+ "required": [
10072
+ "variable"
10073
+ ],
10074
+ "not": {
10075
+ "anyOf": [
10076
+ {
10077
+ "required": [
10078
+ "path"
10079
+ ]
10080
+ },
10081
+ {
10082
+ "required": [
10083
+ "directory"
10084
+ ]
10085
+ }
10086
+ ]
10087
+ }
10088
+ }
10089
+ ],
10090
+ "title": "Save cookie (detailed)"
10091
+ }
10092
+ }
10093
+ },
10094
+ "examples": [
10095
+ "session_token",
10096
+ "test_env_cookie",
10097
+ {
10098
+ "name": "auth_cookie",
10099
+ "path": "auth-cookie.txt"
10100
+ },
10101
+ {
10102
+ "name": "session_token",
10103
+ "variable": "SESSION_TOKEN"
10104
+ },
10105
+ {
10106
+ "name": "test_cookie",
10107
+ "path": "test-cookie.txt",
10108
+ "overwrite": true
9152
10109
  },
9153
10110
  {
9154
- "path": "image.png",
9155
- "directory": "static/images",
9156
- "maxVariation": 0.1,
9157
- "overwrite": "aboveVariation",
9158
- "crop": {
9159
- "selector": "#elementToScreenshot",
9160
- "elementText": "Element text",
9161
- "padding": {
9162
- "top": 0,
9163
- "right": 0,
9164
- "bottom": 0,
9165
- "left": 0
9166
- }
9167
- }
10111
+ "name": "user_session",
10112
+ "path": "user-session.txt",
10113
+ "directory": "./test-data",
10114
+ "overwrite": true
10115
+ },
10116
+ {
10117
+ "name": "login_token",
10118
+ "path": "login-token.txt",
10119
+ "domain": "app.example.com"
9168
10120
  }
9169
10121
  ]
9170
10122
  }
9171
10123
  },
9172
- "title": "screenshot"
10124
+ "title": "saveCookie"
9173
10125
  }
9174
10126
  ]
9175
10127
  },
@@ -9510,6 +10462,305 @@
9510
10462
  }
9511
10463
  ]
9512
10464
  },
10465
+ {
10466
+ "allOf": [
10467
+ {
10468
+ "type": "object",
10469
+ "dynamicDefaults": {
10470
+ "stepId": "uuid"
10471
+ },
10472
+ "properties": {
10473
+ "$schema": {
10474
+ "description": "JSON Schema for this object.",
10475
+ "type": "string",
10476
+ "enum": [
10477
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
10478
+ ]
10479
+ },
10480
+ "stepId": {
10481
+ "type": "string",
10482
+ "description": "ID of the step."
10483
+ },
10484
+ "description": {
10485
+ "type": "string",
10486
+ "description": "Description of the step."
10487
+ },
10488
+ "unsafe": {
10489
+ "type": "boolean",
10490
+ "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.",
10491
+ "default": false
10492
+ },
10493
+ "outputs": {
10494
+ "type": "object",
10495
+ "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.",
10496
+ "default": {},
10497
+ "patternProperties": {
10498
+ "^[A-Za-z0-9_]+$": {
10499
+ "type": "string",
10500
+ "description": "Runtime expression for a user-defined output value."
10501
+ }
10502
+ },
10503
+ "title": "Outputs (step)"
10504
+ },
10505
+ "variables": {
10506
+ "type": "object",
10507
+ "description": "Environment variables to set from user-defined expressions.",
10508
+ "default": {},
10509
+ "patternProperties": {
10510
+ "^[A-Za-z0-9_]+$": {
10511
+ "type": "string",
10512
+ "description": "Runtime expression for a user-defined output value."
10513
+ }
10514
+ },
10515
+ "title": "Variables (step)"
10516
+ },
10517
+ "breakpoint": {
10518
+ "type": "boolean",
10519
+ "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.",
10520
+ "default": false
10521
+ }
10522
+ },
10523
+ "title": "Common"
10524
+ },
10525
+ {
10526
+ "title": "loadCookie",
10527
+ "type": "object",
10528
+ "required": [
10529
+ "loadCookie"
10530
+ ],
10531
+ "properties": {
10532
+ "loadCookie": {
10533
+ "$schema": "http://json-schema.org/draft-07/schema#",
10534
+ "title": "loadCookie",
10535
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
10536
+ "anyOf": [
10537
+ {
10538
+ "type": "string",
10539
+ "title": "Cookie name or file path",
10540
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
10541
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10542
+ "transform": [
10543
+ "trim"
10544
+ ]
10545
+ },
10546
+ {
10547
+ "type": "object",
10548
+ "additionalProperties": false,
10549
+ "required": [
10550
+ "name"
10551
+ ],
10552
+ "anyOf": [
10553
+ {
10554
+ "required": [
10555
+ "path"
10556
+ ],
10557
+ "not": {
10558
+ "required": [
10559
+ "variable"
10560
+ ]
10561
+ }
10562
+ },
10563
+ {
10564
+ "required": [
10565
+ "variable"
10566
+ ],
10567
+ "not": {
10568
+ "anyOf": [
10569
+ {
10570
+ "required": [
10571
+ "path"
10572
+ ]
10573
+ },
10574
+ {
10575
+ "required": [
10576
+ "directory"
10577
+ ]
10578
+ }
10579
+ ]
10580
+ }
10581
+ }
10582
+ ],
10583
+ "properties": {
10584
+ "$schema": {
10585
+ "description": "Optional self-describing schema URI for linters",
10586
+ "type": "string",
10587
+ "format": "uri-reference"
10588
+ },
10589
+ "name": {
10590
+ "type": "string",
10591
+ "title": "Cookie name",
10592
+ "description": "Name of the specific cookie to load.",
10593
+ "pattern": "^[A-Za-z0-9_.-]+$",
10594
+ "transform": [
10595
+ "trim"
10596
+ ]
10597
+ },
10598
+ "variable": {
10599
+ "type": "string",
10600
+ "title": "Environment variable name",
10601
+ "description": "Environment variable name containing the cookie as JSON string.",
10602
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10603
+ "transform": [
10604
+ "trim"
10605
+ ]
10606
+ },
10607
+ "path": {
10608
+ "type": "string",
10609
+ "title": "Cookie file path",
10610
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
10611
+ "transform": [
10612
+ "trim"
10613
+ ]
10614
+ },
10615
+ "directory": {
10616
+ "type": "string",
10617
+ "title": "Directory path",
10618
+ "description": "Directory containing the cookie file.",
10619
+ "transform": [
10620
+ "trim"
10621
+ ]
10622
+ },
10623
+ "domain": {
10624
+ "type": "string",
10625
+ "title": "Cookie domain",
10626
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
10627
+ "transform": [
10628
+ "trim"
10629
+ ]
10630
+ }
10631
+ },
10632
+ "title": "Load cookie (detailed)"
10633
+ }
10634
+ ],
10635
+ "components": {
10636
+ "schemas": {
10637
+ "string": {
10638
+ "type": "string",
10639
+ "title": "Cookie name or file path",
10640
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
10641
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10642
+ "transform": [
10643
+ "trim"
10644
+ ]
10645
+ },
10646
+ "object": {
10647
+ "type": "object",
10648
+ "additionalProperties": false,
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
+ "properties": {
10684
+ "$schema": {
10685
+ "description": "Optional self-describing schema URI for linters",
10686
+ "type": "string",
10687
+ "format": "uri-reference"
10688
+ },
10689
+ "name": {
10690
+ "type": "string",
10691
+ "title": "Cookie name",
10692
+ "description": "Name of the specific cookie to load.",
10693
+ "pattern": "^[A-Za-z0-9_.-]+$",
10694
+ "transform": [
10695
+ "trim"
10696
+ ]
10697
+ },
10698
+ "variable": {
10699
+ "type": "string",
10700
+ "title": "Environment variable name",
10701
+ "description": "Environment variable name containing the cookie as JSON string.",
10702
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10703
+ "transform": [
10704
+ "trim"
10705
+ ]
10706
+ },
10707
+ "path": {
10708
+ "type": "string",
10709
+ "title": "Cookie file path",
10710
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
10711
+ "transform": [
10712
+ "trim"
10713
+ ]
10714
+ },
10715
+ "directory": {
10716
+ "type": "string",
10717
+ "title": "Directory path",
10718
+ "description": "Directory containing the cookie file.",
10719
+ "transform": [
10720
+ "trim"
10721
+ ]
10722
+ },
10723
+ "domain": {
10724
+ "type": "string",
10725
+ "title": "Cookie domain",
10726
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
10727
+ "transform": [
10728
+ "trim"
10729
+ ]
10730
+ }
10731
+ },
10732
+ "title": "Load cookie (detailed)"
10733
+ }
10734
+ }
10735
+ },
10736
+ "examples": [
10737
+ "session_token",
10738
+ "./test-data/auth-session.txt",
10739
+ "test_env_cookie",
10740
+ {
10741
+ "name": "auth_cookie",
10742
+ "variable": "AUTH_COOKIE"
10743
+ },
10744
+ {
10745
+ "name": "test_cookie",
10746
+ "path": "test-cookie.txt"
10747
+ },
10748
+ {
10749
+ "name": "session_token",
10750
+ "path": "session-token.txt",
10751
+ "directory": "./test-data"
10752
+ },
10753
+ {
10754
+ "name": "user_session",
10755
+ "path": "saved-cookies.txt",
10756
+ "domain": "app.example.com"
10757
+ }
10758
+ ]
10759
+ }
10760
+ }
10761
+ }
10762
+ ]
10763
+ },
9513
10764
  {
9514
10765
  "allOf": [
9515
10766
  {
@@ -9749,6 +11000,27 @@
9749
11000
  {
9750
11001
  "loadVariables": "variables.env"
9751
11002
  },
11003
+ {
11004
+ "saveCookie": "session_token"
11005
+ },
11006
+ {
11007
+ "saveCookie": {
11008
+ "name": "auth_cookie",
11009
+ "path": "auth-session.txt",
11010
+ "directory": "./test-data",
11011
+ "overwrite": true
11012
+ }
11013
+ },
11014
+ {
11015
+ "loadCookie": "session_token"
11016
+ },
11017
+ {
11018
+ "loadCookie": {
11019
+ "name": "auth_cookie",
11020
+ "path": "auth-session.txt",
11021
+ "directory": "./test-data"
11022
+ }
11023
+ },
9752
11024
  {
9753
11025
  "find": "Find me!"
9754
11026
  },