doc-detective-common 3.1.2-dev.1 → 3.1.2-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/schemas/config_v3.schema.json +1333 -45
  2. package/dist/schemas/loadCookie_v3.schema.json +225 -0
  3. package/dist/schemas/report_v3.schema.json +1321 -43
  4. package/dist/schemas/resolvedTests_v3.schema.json +2642 -76
  5. package/dist/schemas/saveCookie_v3.schema.json +251 -0
  6. package/dist/schemas/spec_v3.schema.json +1321 -43
  7. package/dist/schemas/step_v3.schema.json +639 -0
  8. package/dist/schemas/test_v3.schema.json +1321 -43
  9. package/package.json +5 -5
  10. package/src/schemas/build/config_v3.schema.json +2 -0
  11. package/src/schemas/build/loadCookie_v3.schema.json +134 -0
  12. package/src/schemas/build/saveCookie_v3.schema.json +149 -0
  13. package/src/schemas/build/step_v3.schema.json +59 -0
  14. package/src/schemas/dereferenceSchemas.js +2 -0
  15. package/src/schemas/output_schemas/config_v3.schema.json +1333 -45
  16. package/src/schemas/output_schemas/loadCookie_v3.schema.json +225 -0
  17. package/src/schemas/output_schemas/report_v3.schema.json +1321 -43
  18. package/src/schemas/output_schemas/resolvedTests_v3.schema.json +2642 -76
  19. package/src/schemas/output_schemas/saveCookie_v3.schema.json +251 -0
  20. package/src/schemas/output_schemas/spec_v3.schema.json +1321 -43
  21. package/src/schemas/output_schemas/step_v3.schema.json +639 -0
  22. package/src/schemas/output_schemas/test_v3.schema.json +1321 -43
  23. package/src/schemas/schemas.json +8810 -7
  24. package/src/schemas/src_schemas/config_v3.schema.json +2 -0
  25. package/src/schemas/src_schemas/loadCookie_v3.schema.json +109 -0
  26. package/src/schemas/src_schemas/saveCookie_v3.schema.json +122 -0
  27. package/src/schemas/src_schemas/step_v3.schema.json +55 -0
@@ -4953,6 +4953,328 @@
4953
4953
  }
4954
4954
  ]
4955
4955
  },
4956
+ {
4957
+ "allOf": [
4958
+ {
4959
+ "type": "object",
4960
+ "dynamicDefaults": {
4961
+ "stepId": "uuid"
4962
+ },
4963
+ "properties": {
4964
+ "$schema": {
4965
+ "description": "JSON Schema for this object.",
4966
+ "type": "string",
4967
+ "enum": [
4968
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
4969
+ ]
4970
+ },
4971
+ "stepId": {
4972
+ "type": "string",
4973
+ "description": "ID of the step."
4974
+ },
4975
+ "description": {
4976
+ "type": "string",
4977
+ "description": "Description of the step."
4978
+ },
4979
+ "unsafe": {
4980
+ "type": "boolean",
4981
+ "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.",
4982
+ "default": false
4983
+ },
4984
+ "outputs": {
4985
+ "type": "object",
4986
+ "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.",
4987
+ "default": {},
4988
+ "patternProperties": {
4989
+ "^[A-Za-z0-9_]+$": {
4990
+ "type": "string",
4991
+ "description": "Runtime expression for a user-defined output value."
4992
+ }
4993
+ },
4994
+ "title": "Outputs (step)"
4995
+ },
4996
+ "variables": {
4997
+ "type": "object",
4998
+ "description": "Environment variables to set from user-defined expressions.",
4999
+ "default": {},
5000
+ "patternProperties": {
5001
+ "^[A-Za-z0-9_]+$": {
5002
+ "type": "string",
5003
+ "description": "Runtime expression for a user-defined output value."
5004
+ }
5005
+ },
5006
+ "title": "Variables (step)"
5007
+ },
5008
+ "breakpoint": {
5009
+ "type": "boolean",
5010
+ "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.",
5011
+ "default": false
5012
+ }
5013
+ },
5014
+ "title": "Common"
5015
+ },
5016
+ {
5017
+ "type": "object",
5018
+ "required": [
5019
+ "saveCookie"
5020
+ ],
5021
+ "properties": {
5022
+ "saveCookie": {
5023
+ "$schema": "http://json-schema.org/draft-07/schema#",
5024
+ "title": "saveCookie",
5025
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
5026
+ "anyOf": [
5027
+ {
5028
+ "type": "string",
5029
+ "title": "Cookie name",
5030
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
5031
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5032
+ "transform": [
5033
+ "trim"
5034
+ ]
5035
+ },
5036
+ {
5037
+ "type": "object",
5038
+ "additionalProperties": false,
5039
+ "properties": {
5040
+ "$schema": {
5041
+ "description": "Optional self-describing schema URI for linters",
5042
+ "type": "string",
5043
+ "format": "uri-reference"
5044
+ },
5045
+ "name": {
5046
+ "type": "string",
5047
+ "title": "Cookie name",
5048
+ "description": "Name of the specific cookie to save.",
5049
+ "pattern": "^[A-Za-z0-9_.-]+$",
5050
+ "transform": [
5051
+ "trim"
5052
+ ]
5053
+ },
5054
+ "variable": {
5055
+ "type": "string",
5056
+ "title": "Environment variable name",
5057
+ "description": "Environment variable name to store the cookie as JSON string.",
5058
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5059
+ "transform": [
5060
+ "trim"
5061
+ ]
5062
+ },
5063
+ "path": {
5064
+ "type": "string",
5065
+ "title": "Cookie file path",
5066
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
5067
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
5068
+ "transform": [
5069
+ "trim"
5070
+ ]
5071
+ },
5072
+ "directory": {
5073
+ "type": "string",
5074
+ "title": "Directory path",
5075
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
5076
+ "transform": [
5077
+ "trim"
5078
+ ]
5079
+ },
5080
+ "overwrite": {
5081
+ "type": "boolean",
5082
+ "title": "Overwrite existing file",
5083
+ "description": "Whether to overwrite existing cookie file.",
5084
+ "default": false
5085
+ },
5086
+ "domain": {
5087
+ "type": "string",
5088
+ "title": "Cookie domain",
5089
+ "description": "Specific domain to filter the cookie by (optional).",
5090
+ "transform": [
5091
+ "trim"
5092
+ ]
5093
+ }
5094
+ },
5095
+ "required": [
5096
+ "name"
5097
+ ],
5098
+ "anyOf": [
5099
+ {
5100
+ "required": [
5101
+ "path"
5102
+ ],
5103
+ "not": {
5104
+ "required": [
5105
+ "variable"
5106
+ ]
5107
+ }
5108
+ },
5109
+ {
5110
+ "required": [
5111
+ "variable"
5112
+ ],
5113
+ "not": {
5114
+ "anyOf": [
5115
+ {
5116
+ "required": [
5117
+ "path"
5118
+ ]
5119
+ },
5120
+ {
5121
+ "required": [
5122
+ "directory"
5123
+ ]
5124
+ },
5125
+ {
5126
+ "required": [
5127
+ "overwrite"
5128
+ ]
5129
+ }
5130
+ ]
5131
+ }
5132
+ }
5133
+ ],
5134
+ "title": "Save cookie (detailed)"
5135
+ }
5136
+ ],
5137
+ "components": {
5138
+ "schemas": {
5139
+ "string": {
5140
+ "type": "string",
5141
+ "title": "Cookie name",
5142
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
5143
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5144
+ "transform": [
5145
+ "trim"
5146
+ ]
5147
+ },
5148
+ "object": {
5149
+ "type": "object",
5150
+ "additionalProperties": false,
5151
+ "properties": {
5152
+ "$schema": {
5153
+ "description": "Optional self-describing schema URI for linters",
5154
+ "type": "string",
5155
+ "format": "uri-reference"
5156
+ },
5157
+ "name": {
5158
+ "type": "string",
5159
+ "title": "Cookie name",
5160
+ "description": "Name of the specific cookie to save.",
5161
+ "pattern": "^[A-Za-z0-9_.-]+$",
5162
+ "transform": [
5163
+ "trim"
5164
+ ]
5165
+ },
5166
+ "variable": {
5167
+ "type": "string",
5168
+ "title": "Environment variable name",
5169
+ "description": "Environment variable name to store the cookie as JSON string.",
5170
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5171
+ "transform": [
5172
+ "trim"
5173
+ ]
5174
+ },
5175
+ "path": {
5176
+ "type": "string",
5177
+ "title": "Cookie file path",
5178
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
5179
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
5180
+ "transform": [
5181
+ "trim"
5182
+ ]
5183
+ },
5184
+ "directory": {
5185
+ "type": "string",
5186
+ "title": "Directory path",
5187
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
5188
+ "transform": [
5189
+ "trim"
5190
+ ]
5191
+ },
5192
+ "overwrite": {
5193
+ "type": "boolean",
5194
+ "title": "Overwrite existing file",
5195
+ "description": "Whether to overwrite existing cookie file.",
5196
+ "default": false
5197
+ },
5198
+ "domain": {
5199
+ "type": "string",
5200
+ "title": "Cookie domain",
5201
+ "description": "Specific domain to filter the cookie by (optional).",
5202
+ "transform": [
5203
+ "trim"
5204
+ ]
5205
+ }
5206
+ },
5207
+ "required": [
5208
+ "name"
5209
+ ],
5210
+ "anyOf": [
5211
+ {
5212
+ "required": [
5213
+ "path"
5214
+ ],
5215
+ "not": {
5216
+ "required": [
5217
+ "variable"
5218
+ ]
5219
+ }
5220
+ },
5221
+ {
5222
+ "required": [
5223
+ "variable"
5224
+ ],
5225
+ "not": {
5226
+ "anyOf": [
5227
+ {
5228
+ "required": [
5229
+ "path"
5230
+ ]
5231
+ },
5232
+ {
5233
+ "required": [
5234
+ "directory"
5235
+ ]
5236
+ },
5237
+ {
5238
+ "required": [
5239
+ "overwrite"
5240
+ ]
5241
+ }
5242
+ ]
5243
+ }
5244
+ }
5245
+ ],
5246
+ "title": "Save cookie (detailed)"
5247
+ }
5248
+ }
5249
+ },
5250
+ "examples": [
5251
+ "session_token",
5252
+ {
5253
+ "name": "auth_cookie",
5254
+ "path": "auth-cookie.txt"
5255
+ },
5256
+ {
5257
+ "name": "session_token",
5258
+ "variable": "SESSION_TOKEN"
5259
+ },
5260
+ {
5261
+ "name": "user_session",
5262
+ "path": "user-session.txt",
5263
+ "directory": "./test-data",
5264
+ "overwrite": true
5265
+ },
5266
+ {
5267
+ "name": "login_token",
5268
+ "path": "login-token.txt",
5269
+ "domain": "app.example.com"
5270
+ }
5271
+ ]
5272
+ }
5273
+ },
5274
+ "title": "saveCookie"
5275
+ }
5276
+ ]
5277
+ },
4956
5278
  {
4957
5279
  "allOf": [
4958
5280
  {
@@ -5351,38 +5673,334 @@
5351
5673
  "title": "Common"
5352
5674
  },
5353
5675
  {
5354
- "title": "wait",
5676
+ "title": "loadCookie",
5355
5677
  "type": "object",
5356
5678
  "required": [
5357
- "wait"
5679
+ "loadCookie"
5358
5680
  ],
5359
5681
  "properties": {
5360
- "wait": {
5682
+ "loadCookie": {
5361
5683
  "$schema": "http://json-schema.org/draft-07/schema#",
5362
- "title": "wait",
5363
- "description": "Pause (in milliseconds) before performing the next action.",
5364
- "default": 5000,
5684
+ "title": "loadCookie",
5685
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
5365
5686
  "anyOf": [
5366
5687
  {
5367
- "type": "number",
5368
- "title": "Wait (simple)"
5369
- },
5370
- {
5371
- "title": "Wait (environment variable)",
5372
5688
  "type": "string",
5373
- "pattern": "(\\$[A-Za-z0-9_]+)",
5689
+ "title": "Cookie name or file path",
5690
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5691
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5374
5692
  "transform": [
5375
5693
  "trim"
5376
5694
  ]
5377
5695
  },
5378
5696
  {
5379
- "type": "boolean",
5380
- "title": "Wait (boolean)"
5381
- }
5382
- ],
5383
- "components": {
5384
- "schemas": {
5385
- "string": {
5697
+ "type": "object",
5698
+ "additionalProperties": false,
5699
+ "required": [
5700
+ "name"
5701
+ ],
5702
+ "anyOf": [
5703
+ {
5704
+ "required": [
5705
+ "path"
5706
+ ],
5707
+ "not": {
5708
+ "required": [
5709
+ "variable"
5710
+ ]
5711
+ }
5712
+ },
5713
+ {
5714
+ "required": [
5715
+ "variable"
5716
+ ],
5717
+ "not": {
5718
+ "anyOf": [
5719
+ {
5720
+ "required": [
5721
+ "path"
5722
+ ]
5723
+ },
5724
+ {
5725
+ "required": [
5726
+ "directory"
5727
+ ]
5728
+ }
5729
+ ]
5730
+ }
5731
+ }
5732
+ ],
5733
+ "properties": {
5734
+ "$schema": {
5735
+ "description": "Optional self-describing schema URI for linters",
5736
+ "type": "string",
5737
+ "format": "uri-reference"
5738
+ },
5739
+ "name": {
5740
+ "type": "string",
5741
+ "title": "Cookie name",
5742
+ "description": "Name of the specific cookie to load.",
5743
+ "pattern": "^[A-Za-z0-9_.-]+$",
5744
+ "transform": [
5745
+ "trim"
5746
+ ]
5747
+ },
5748
+ "variable": {
5749
+ "type": "string",
5750
+ "title": "Environment variable name",
5751
+ "description": "Environment variable name containing the cookie as JSON string.",
5752
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5753
+ "transform": [
5754
+ "trim"
5755
+ ]
5756
+ },
5757
+ "path": {
5758
+ "type": "string",
5759
+ "title": "Cookie file path",
5760
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5761
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
5762
+ "transform": [
5763
+ "trim"
5764
+ ]
5765
+ },
5766
+ "directory": {
5767
+ "type": "string",
5768
+ "title": "Directory path",
5769
+ "description": "Directory containing the cookie file.",
5770
+ "transform": [
5771
+ "trim"
5772
+ ]
5773
+ },
5774
+ "domain": {
5775
+ "type": "string",
5776
+ "title": "Cookie domain",
5777
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5778
+ "transform": [
5779
+ "trim"
5780
+ ]
5781
+ }
5782
+ },
5783
+ "title": "Load cookie (detailed)"
5784
+ }
5785
+ ],
5786
+ "components": {
5787
+ "schemas": {
5788
+ "string": {
5789
+ "type": "string",
5790
+ "title": "Cookie name or file path",
5791
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5792
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5793
+ "transform": [
5794
+ "trim"
5795
+ ]
5796
+ },
5797
+ "object": {
5798
+ "type": "object",
5799
+ "additionalProperties": false,
5800
+ "required": [
5801
+ "name"
5802
+ ],
5803
+ "anyOf": [
5804
+ {
5805
+ "required": [
5806
+ "path"
5807
+ ],
5808
+ "not": {
5809
+ "required": [
5810
+ "variable"
5811
+ ]
5812
+ }
5813
+ },
5814
+ {
5815
+ "required": [
5816
+ "variable"
5817
+ ],
5818
+ "not": {
5819
+ "anyOf": [
5820
+ {
5821
+ "required": [
5822
+ "path"
5823
+ ]
5824
+ },
5825
+ {
5826
+ "required": [
5827
+ "directory"
5828
+ ]
5829
+ }
5830
+ ]
5831
+ }
5832
+ }
5833
+ ],
5834
+ "properties": {
5835
+ "$schema": {
5836
+ "description": "Optional self-describing schema URI for linters",
5837
+ "type": "string",
5838
+ "format": "uri-reference"
5839
+ },
5840
+ "name": {
5841
+ "type": "string",
5842
+ "title": "Cookie name",
5843
+ "description": "Name of the specific cookie to load.",
5844
+ "pattern": "^[A-Za-z0-9_.-]+$",
5845
+ "transform": [
5846
+ "trim"
5847
+ ]
5848
+ },
5849
+ "variable": {
5850
+ "type": "string",
5851
+ "title": "Environment variable name",
5852
+ "description": "Environment variable name containing the cookie as JSON string.",
5853
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5854
+ "transform": [
5855
+ "trim"
5856
+ ]
5857
+ },
5858
+ "path": {
5859
+ "type": "string",
5860
+ "title": "Cookie file path",
5861
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5862
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
5863
+ "transform": [
5864
+ "trim"
5865
+ ]
5866
+ },
5867
+ "directory": {
5868
+ "type": "string",
5869
+ "title": "Directory path",
5870
+ "description": "Directory containing the cookie file.",
5871
+ "transform": [
5872
+ "trim"
5873
+ ]
5874
+ },
5875
+ "domain": {
5876
+ "type": "string",
5877
+ "title": "Cookie domain",
5878
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5879
+ "transform": [
5880
+ "trim"
5881
+ ]
5882
+ }
5883
+ },
5884
+ "title": "Load cookie (detailed)"
5885
+ }
5886
+ }
5887
+ },
5888
+ "examples": [
5889
+ "session_token",
5890
+ "./test-data/auth-session.txt",
5891
+ {
5892
+ "name": "auth_cookie",
5893
+ "variable": "AUTH_COOKIE"
5894
+ },
5895
+ {
5896
+ "name": "session_token",
5897
+ "path": "session-token.txt",
5898
+ "directory": "./test-data"
5899
+ },
5900
+ {
5901
+ "name": "user_session",
5902
+ "path": "saved-cookies.txt",
5903
+ "domain": "app.example.com"
5904
+ }
5905
+ ]
5906
+ }
5907
+ }
5908
+ }
5909
+ ]
5910
+ },
5911
+ {
5912
+ "allOf": [
5913
+ {
5914
+ "type": "object",
5915
+ "dynamicDefaults": {
5916
+ "stepId": "uuid"
5917
+ },
5918
+ "properties": {
5919
+ "$schema": {
5920
+ "description": "JSON Schema for this object.",
5921
+ "type": "string",
5922
+ "enum": [
5923
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
5924
+ ]
5925
+ },
5926
+ "stepId": {
5927
+ "type": "string",
5928
+ "description": "ID of the step."
5929
+ },
5930
+ "description": {
5931
+ "type": "string",
5932
+ "description": "Description of the step."
5933
+ },
5934
+ "unsafe": {
5935
+ "type": "boolean",
5936
+ "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.",
5937
+ "default": false
5938
+ },
5939
+ "outputs": {
5940
+ "type": "object",
5941
+ "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.",
5942
+ "default": {},
5943
+ "patternProperties": {
5944
+ "^[A-Za-z0-9_]+$": {
5945
+ "type": "string",
5946
+ "description": "Runtime expression for a user-defined output value."
5947
+ }
5948
+ },
5949
+ "title": "Outputs (step)"
5950
+ },
5951
+ "variables": {
5952
+ "type": "object",
5953
+ "description": "Environment variables to set from user-defined expressions.",
5954
+ "default": {},
5955
+ "patternProperties": {
5956
+ "^[A-Za-z0-9_]+$": {
5957
+ "type": "string",
5958
+ "description": "Runtime expression for a user-defined output value."
5959
+ }
5960
+ },
5961
+ "title": "Variables (step)"
5962
+ },
5963
+ "breakpoint": {
5964
+ "type": "boolean",
5965
+ "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.",
5966
+ "default": false
5967
+ }
5968
+ },
5969
+ "title": "Common"
5970
+ },
5971
+ {
5972
+ "title": "wait",
5973
+ "type": "object",
5974
+ "required": [
5975
+ "wait"
5976
+ ],
5977
+ "properties": {
5978
+ "wait": {
5979
+ "$schema": "http://json-schema.org/draft-07/schema#",
5980
+ "title": "wait",
5981
+ "description": "Pause (in milliseconds) before performing the next action.",
5982
+ "default": 5000,
5983
+ "anyOf": [
5984
+ {
5985
+ "type": "number",
5986
+ "title": "Wait (simple)"
5987
+ },
5988
+ {
5989
+ "title": "Wait (environment variable)",
5990
+ "type": "string",
5991
+ "pattern": "(\\$[A-Za-z0-9_]+)",
5992
+ "transform": [
5993
+ "trim"
5994
+ ]
5995
+ },
5996
+ {
5997
+ "type": "boolean",
5998
+ "title": "Wait (boolean)"
5999
+ }
6000
+ ],
6001
+ "components": {
6002
+ "schemas": {
6003
+ "string": {
5386
6004
  "title": "Wait (environment variable)",
5387
6005
  "type": "string",
5388
6006
  "pattern": "(\\$[A-Za-z0-9_]+)",
@@ -5529,6 +6147,27 @@
5529
6147
  {
5530
6148
  "loadVariables": "variables.env"
5531
6149
  },
6150
+ {
6151
+ "saveCookie": "session_token"
6152
+ },
6153
+ {
6154
+ "saveCookie": {
6155
+ "name": "auth_cookie",
6156
+ "path": "auth-session.txt",
6157
+ "directory": "./test-data",
6158
+ "overwrite": true
6159
+ }
6160
+ },
6161
+ {
6162
+ "loadCookie": "session_token"
6163
+ },
6164
+ {
6165
+ "loadCookie": {
6166
+ "name": "auth_cookie",
6167
+ "path": "auth-session.txt",
6168
+ "directory": "./test-data"
6169
+ }
6170
+ },
5532
6171
  {
5533
6172
  "find": "Find me!"
5534
6173
  },
@@ -9739,38 +10378,360 @@
9739
10378
  "static/images/image.png",
9740
10379
  "/User/manny/projects/doc-detective/static/images/image.png",
9741
10380
  {
9742
- "path": "image.png",
9743
- "directory": "static/images",
9744
- "maxVariation": 0.1,
9745
- "overwrite": "aboveVariation",
9746
- "crop": "#elementToScreenshot"
10381
+ "path": "image.png",
10382
+ "directory": "static/images",
10383
+ "maxVariation": 0.1,
10384
+ "overwrite": "aboveVariation",
10385
+ "crop": "#elementToScreenshot"
10386
+ },
10387
+ {
10388
+ "path": "image.png",
10389
+ "directory": "static/images",
10390
+ "maxVariation": 0.1,
10391
+ "overwrite": "aboveVariation"
10392
+ },
10393
+ {
10394
+ "path": "image.png",
10395
+ "directory": "static/images",
10396
+ "maxVariation": 0.1,
10397
+ "overwrite": "aboveVariation",
10398
+ "crop": {
10399
+ "selector": "#elementToScreenshot",
10400
+ "elementText": "Element text",
10401
+ "padding": {
10402
+ "top": 0,
10403
+ "right": 0,
10404
+ "bottom": 0,
10405
+ "left": 0
10406
+ }
10407
+ }
10408
+ }
10409
+ ]
10410
+ }
10411
+ },
10412
+ "title": "screenshot"
10413
+ }
10414
+ ]
10415
+ },
10416
+ {
10417
+ "allOf": [
10418
+ {
10419
+ "type": "object",
10420
+ "dynamicDefaults": {
10421
+ "stepId": "uuid"
10422
+ },
10423
+ "properties": {
10424
+ "$schema": {
10425
+ "description": "JSON Schema for this object.",
10426
+ "type": "string",
10427
+ "enum": [
10428
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
10429
+ ]
10430
+ },
10431
+ "stepId": {
10432
+ "type": "string",
10433
+ "description": "ID of the step."
10434
+ },
10435
+ "description": {
10436
+ "type": "string",
10437
+ "description": "Description of the step."
10438
+ },
10439
+ "unsafe": {
10440
+ "type": "boolean",
10441
+ "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.",
10442
+ "default": false
10443
+ },
10444
+ "outputs": {
10445
+ "type": "object",
10446
+ "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.",
10447
+ "default": {},
10448
+ "patternProperties": {
10449
+ "^[A-Za-z0-9_]+$": {
10450
+ "type": "string",
10451
+ "description": "Runtime expression for a user-defined output value."
10452
+ }
10453
+ },
10454
+ "title": "Outputs (step)"
10455
+ },
10456
+ "variables": {
10457
+ "type": "object",
10458
+ "description": "Environment variables to set from user-defined expressions.",
10459
+ "default": {},
10460
+ "patternProperties": {
10461
+ "^[A-Za-z0-9_]+$": {
10462
+ "type": "string",
10463
+ "description": "Runtime expression for a user-defined output value."
10464
+ }
10465
+ },
10466
+ "title": "Variables (step)"
10467
+ },
10468
+ "breakpoint": {
10469
+ "type": "boolean",
10470
+ "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.",
10471
+ "default": false
10472
+ }
10473
+ },
10474
+ "title": "Common"
10475
+ },
10476
+ {
10477
+ "type": "object",
10478
+ "required": [
10479
+ "saveCookie"
10480
+ ],
10481
+ "properties": {
10482
+ "saveCookie": {
10483
+ "$schema": "http://json-schema.org/draft-07/schema#",
10484
+ "title": "saveCookie",
10485
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
10486
+ "anyOf": [
10487
+ {
10488
+ "type": "string",
10489
+ "title": "Cookie name",
10490
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
10491
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10492
+ "transform": [
10493
+ "trim"
10494
+ ]
10495
+ },
10496
+ {
10497
+ "type": "object",
10498
+ "additionalProperties": false,
10499
+ "properties": {
10500
+ "$schema": {
10501
+ "description": "Optional self-describing schema URI for linters",
10502
+ "type": "string",
10503
+ "format": "uri-reference"
10504
+ },
10505
+ "name": {
10506
+ "type": "string",
10507
+ "title": "Cookie name",
10508
+ "description": "Name of the specific cookie to save.",
10509
+ "pattern": "^[A-Za-z0-9_.-]+$",
10510
+ "transform": [
10511
+ "trim"
10512
+ ]
10513
+ },
10514
+ "variable": {
10515
+ "type": "string",
10516
+ "title": "Environment variable name",
10517
+ "description": "Environment variable name to store the cookie as JSON string.",
10518
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10519
+ "transform": [
10520
+ "trim"
10521
+ ]
10522
+ },
10523
+ "path": {
10524
+ "type": "string",
10525
+ "title": "Cookie file path",
10526
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10527
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
10528
+ "transform": [
10529
+ "trim"
10530
+ ]
10531
+ },
10532
+ "directory": {
10533
+ "type": "string",
10534
+ "title": "Directory path",
10535
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10536
+ "transform": [
10537
+ "trim"
10538
+ ]
10539
+ },
10540
+ "overwrite": {
10541
+ "type": "boolean",
10542
+ "title": "Overwrite existing file",
10543
+ "description": "Whether to overwrite existing cookie file.",
10544
+ "default": false
10545
+ },
10546
+ "domain": {
10547
+ "type": "string",
10548
+ "title": "Cookie domain",
10549
+ "description": "Specific domain to filter the cookie by (optional).",
10550
+ "transform": [
10551
+ "trim"
10552
+ ]
10553
+ }
10554
+ },
10555
+ "required": [
10556
+ "name"
10557
+ ],
10558
+ "anyOf": [
10559
+ {
10560
+ "required": [
10561
+ "path"
10562
+ ],
10563
+ "not": {
10564
+ "required": [
10565
+ "variable"
10566
+ ]
10567
+ }
10568
+ },
10569
+ {
10570
+ "required": [
10571
+ "variable"
10572
+ ],
10573
+ "not": {
10574
+ "anyOf": [
10575
+ {
10576
+ "required": [
10577
+ "path"
10578
+ ]
10579
+ },
10580
+ {
10581
+ "required": [
10582
+ "directory"
10583
+ ]
10584
+ },
10585
+ {
10586
+ "required": [
10587
+ "overwrite"
10588
+ ]
10589
+ }
10590
+ ]
10591
+ }
10592
+ }
10593
+ ],
10594
+ "title": "Save cookie (detailed)"
10595
+ }
10596
+ ],
10597
+ "components": {
10598
+ "schemas": {
10599
+ "string": {
10600
+ "type": "string",
10601
+ "title": "Cookie name",
10602
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
10603
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10604
+ "transform": [
10605
+ "trim"
10606
+ ]
10607
+ },
10608
+ "object": {
10609
+ "type": "object",
10610
+ "additionalProperties": false,
10611
+ "properties": {
10612
+ "$schema": {
10613
+ "description": "Optional self-describing schema URI for linters",
10614
+ "type": "string",
10615
+ "format": "uri-reference"
10616
+ },
10617
+ "name": {
10618
+ "type": "string",
10619
+ "title": "Cookie name",
10620
+ "description": "Name of the specific cookie to save.",
10621
+ "pattern": "^[A-Za-z0-9_.-]+$",
10622
+ "transform": [
10623
+ "trim"
10624
+ ]
10625
+ },
10626
+ "variable": {
10627
+ "type": "string",
10628
+ "title": "Environment variable name",
10629
+ "description": "Environment variable name to store the cookie as JSON string.",
10630
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10631
+ "transform": [
10632
+ "trim"
10633
+ ]
10634
+ },
10635
+ "path": {
10636
+ "type": "string",
10637
+ "title": "Cookie file path",
10638
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10639
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
10640
+ "transform": [
10641
+ "trim"
10642
+ ]
10643
+ },
10644
+ "directory": {
10645
+ "type": "string",
10646
+ "title": "Directory path",
10647
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10648
+ "transform": [
10649
+ "trim"
10650
+ ]
10651
+ },
10652
+ "overwrite": {
10653
+ "type": "boolean",
10654
+ "title": "Overwrite existing file",
10655
+ "description": "Whether to overwrite existing cookie file.",
10656
+ "default": false
10657
+ },
10658
+ "domain": {
10659
+ "type": "string",
10660
+ "title": "Cookie domain",
10661
+ "description": "Specific domain to filter the cookie by (optional).",
10662
+ "transform": [
10663
+ "trim"
10664
+ ]
10665
+ }
10666
+ },
10667
+ "required": [
10668
+ "name"
10669
+ ],
10670
+ "anyOf": [
10671
+ {
10672
+ "required": [
10673
+ "path"
10674
+ ],
10675
+ "not": {
10676
+ "required": [
10677
+ "variable"
10678
+ ]
10679
+ }
10680
+ },
10681
+ {
10682
+ "required": [
10683
+ "variable"
10684
+ ],
10685
+ "not": {
10686
+ "anyOf": [
10687
+ {
10688
+ "required": [
10689
+ "path"
10690
+ ]
10691
+ },
10692
+ {
10693
+ "required": [
10694
+ "directory"
10695
+ ]
10696
+ },
10697
+ {
10698
+ "required": [
10699
+ "overwrite"
10700
+ ]
10701
+ }
10702
+ ]
10703
+ }
10704
+ }
10705
+ ],
10706
+ "title": "Save cookie (detailed)"
10707
+ }
10708
+ }
10709
+ },
10710
+ "examples": [
10711
+ "session_token",
10712
+ {
10713
+ "name": "auth_cookie",
10714
+ "path": "auth-cookie.txt"
10715
+ },
10716
+ {
10717
+ "name": "session_token",
10718
+ "variable": "SESSION_TOKEN"
9747
10719
  },
9748
10720
  {
9749
- "path": "image.png",
9750
- "directory": "static/images",
9751
- "maxVariation": 0.1,
9752
- "overwrite": "aboveVariation"
10721
+ "name": "user_session",
10722
+ "path": "user-session.txt",
10723
+ "directory": "./test-data",
10724
+ "overwrite": true
9753
10725
  },
9754
10726
  {
9755
- "path": "image.png",
9756
- "directory": "static/images",
9757
- "maxVariation": 0.1,
9758
- "overwrite": "aboveVariation",
9759
- "crop": {
9760
- "selector": "#elementToScreenshot",
9761
- "elementText": "Element text",
9762
- "padding": {
9763
- "top": 0,
9764
- "right": 0,
9765
- "bottom": 0,
9766
- "left": 0
9767
- }
9768
- }
10727
+ "name": "login_token",
10728
+ "path": "login-token.txt",
10729
+ "domain": "app.example.com"
9769
10730
  }
9770
10731
  ]
9771
10732
  }
9772
10733
  },
9773
- "title": "screenshot"
10734
+ "title": "saveCookie"
9774
10735
  }
9775
10736
  ]
9776
10737
  },
@@ -10111,6 +11072,302 @@
10111
11072
  }
10112
11073
  ]
10113
11074
  },
11075
+ {
11076
+ "allOf": [
11077
+ {
11078
+ "type": "object",
11079
+ "dynamicDefaults": {
11080
+ "stepId": "uuid"
11081
+ },
11082
+ "properties": {
11083
+ "$schema": {
11084
+ "description": "JSON Schema for this object.",
11085
+ "type": "string",
11086
+ "enum": [
11087
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
11088
+ ]
11089
+ },
11090
+ "stepId": {
11091
+ "type": "string",
11092
+ "description": "ID of the step."
11093
+ },
11094
+ "description": {
11095
+ "type": "string",
11096
+ "description": "Description of the step."
11097
+ },
11098
+ "unsafe": {
11099
+ "type": "boolean",
11100
+ "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.",
11101
+ "default": false
11102
+ },
11103
+ "outputs": {
11104
+ "type": "object",
11105
+ "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.",
11106
+ "default": {},
11107
+ "patternProperties": {
11108
+ "^[A-Za-z0-9_]+$": {
11109
+ "type": "string",
11110
+ "description": "Runtime expression for a user-defined output value."
11111
+ }
11112
+ },
11113
+ "title": "Outputs (step)"
11114
+ },
11115
+ "variables": {
11116
+ "type": "object",
11117
+ "description": "Environment variables to set from user-defined expressions.",
11118
+ "default": {},
11119
+ "patternProperties": {
11120
+ "^[A-Za-z0-9_]+$": {
11121
+ "type": "string",
11122
+ "description": "Runtime expression for a user-defined output value."
11123
+ }
11124
+ },
11125
+ "title": "Variables (step)"
11126
+ },
11127
+ "breakpoint": {
11128
+ "type": "boolean",
11129
+ "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.",
11130
+ "default": false
11131
+ }
11132
+ },
11133
+ "title": "Common"
11134
+ },
11135
+ {
11136
+ "title": "loadCookie",
11137
+ "type": "object",
11138
+ "required": [
11139
+ "loadCookie"
11140
+ ],
11141
+ "properties": {
11142
+ "loadCookie": {
11143
+ "$schema": "http://json-schema.org/draft-07/schema#",
11144
+ "title": "loadCookie",
11145
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
11146
+ "anyOf": [
11147
+ {
11148
+ "type": "string",
11149
+ "title": "Cookie name or file path",
11150
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
11151
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
11152
+ "transform": [
11153
+ "trim"
11154
+ ]
11155
+ },
11156
+ {
11157
+ "type": "object",
11158
+ "additionalProperties": false,
11159
+ "required": [
11160
+ "name"
11161
+ ],
11162
+ "anyOf": [
11163
+ {
11164
+ "required": [
11165
+ "path"
11166
+ ],
11167
+ "not": {
11168
+ "required": [
11169
+ "variable"
11170
+ ]
11171
+ }
11172
+ },
11173
+ {
11174
+ "required": [
11175
+ "variable"
11176
+ ],
11177
+ "not": {
11178
+ "anyOf": [
11179
+ {
11180
+ "required": [
11181
+ "path"
11182
+ ]
11183
+ },
11184
+ {
11185
+ "required": [
11186
+ "directory"
11187
+ ]
11188
+ }
11189
+ ]
11190
+ }
11191
+ }
11192
+ ],
11193
+ "properties": {
11194
+ "$schema": {
11195
+ "description": "Optional self-describing schema URI for linters",
11196
+ "type": "string",
11197
+ "format": "uri-reference"
11198
+ },
11199
+ "name": {
11200
+ "type": "string",
11201
+ "title": "Cookie name",
11202
+ "description": "Name of the specific cookie to load.",
11203
+ "pattern": "^[A-Za-z0-9_.-]+$",
11204
+ "transform": [
11205
+ "trim"
11206
+ ]
11207
+ },
11208
+ "variable": {
11209
+ "type": "string",
11210
+ "title": "Environment variable name",
11211
+ "description": "Environment variable name containing the cookie as JSON string.",
11212
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
11213
+ "transform": [
11214
+ "trim"
11215
+ ]
11216
+ },
11217
+ "path": {
11218
+ "type": "string",
11219
+ "title": "Cookie file path",
11220
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
11221
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
11222
+ "transform": [
11223
+ "trim"
11224
+ ]
11225
+ },
11226
+ "directory": {
11227
+ "type": "string",
11228
+ "title": "Directory path",
11229
+ "description": "Directory containing the cookie file.",
11230
+ "transform": [
11231
+ "trim"
11232
+ ]
11233
+ },
11234
+ "domain": {
11235
+ "type": "string",
11236
+ "title": "Cookie domain",
11237
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
11238
+ "transform": [
11239
+ "trim"
11240
+ ]
11241
+ }
11242
+ },
11243
+ "title": "Load cookie (detailed)"
11244
+ }
11245
+ ],
11246
+ "components": {
11247
+ "schemas": {
11248
+ "string": {
11249
+ "type": "string",
11250
+ "title": "Cookie name or file path",
11251
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
11252
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
11253
+ "transform": [
11254
+ "trim"
11255
+ ]
11256
+ },
11257
+ "object": {
11258
+ "type": "object",
11259
+ "additionalProperties": false,
11260
+ "required": [
11261
+ "name"
11262
+ ],
11263
+ "anyOf": [
11264
+ {
11265
+ "required": [
11266
+ "path"
11267
+ ],
11268
+ "not": {
11269
+ "required": [
11270
+ "variable"
11271
+ ]
11272
+ }
11273
+ },
11274
+ {
11275
+ "required": [
11276
+ "variable"
11277
+ ],
11278
+ "not": {
11279
+ "anyOf": [
11280
+ {
11281
+ "required": [
11282
+ "path"
11283
+ ]
11284
+ },
11285
+ {
11286
+ "required": [
11287
+ "directory"
11288
+ ]
11289
+ }
11290
+ ]
11291
+ }
11292
+ }
11293
+ ],
11294
+ "properties": {
11295
+ "$schema": {
11296
+ "description": "Optional self-describing schema URI for linters",
11297
+ "type": "string",
11298
+ "format": "uri-reference"
11299
+ },
11300
+ "name": {
11301
+ "type": "string",
11302
+ "title": "Cookie name",
11303
+ "description": "Name of the specific cookie to load.",
11304
+ "pattern": "^[A-Za-z0-9_.-]+$",
11305
+ "transform": [
11306
+ "trim"
11307
+ ]
11308
+ },
11309
+ "variable": {
11310
+ "type": "string",
11311
+ "title": "Environment variable name",
11312
+ "description": "Environment variable name containing the cookie as JSON string.",
11313
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
11314
+ "transform": [
11315
+ "trim"
11316
+ ]
11317
+ },
11318
+ "path": {
11319
+ "type": "string",
11320
+ "title": "Cookie file path",
11321
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
11322
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
11323
+ "transform": [
11324
+ "trim"
11325
+ ]
11326
+ },
11327
+ "directory": {
11328
+ "type": "string",
11329
+ "title": "Directory path",
11330
+ "description": "Directory containing the cookie file.",
11331
+ "transform": [
11332
+ "trim"
11333
+ ]
11334
+ },
11335
+ "domain": {
11336
+ "type": "string",
11337
+ "title": "Cookie domain",
11338
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
11339
+ "transform": [
11340
+ "trim"
11341
+ ]
11342
+ }
11343
+ },
11344
+ "title": "Load cookie (detailed)"
11345
+ }
11346
+ }
11347
+ },
11348
+ "examples": [
11349
+ "session_token",
11350
+ "./test-data/auth-session.txt",
11351
+ {
11352
+ "name": "auth_cookie",
11353
+ "variable": "AUTH_COOKIE"
11354
+ },
11355
+ {
11356
+ "name": "session_token",
11357
+ "path": "session-token.txt",
11358
+ "directory": "./test-data"
11359
+ },
11360
+ {
11361
+ "name": "user_session",
11362
+ "path": "saved-cookies.txt",
11363
+ "domain": "app.example.com"
11364
+ }
11365
+ ]
11366
+ }
11367
+ }
11368
+ }
11369
+ ]
11370
+ },
10114
11371
  {
10115
11372
  "allOf": [
10116
11373
  {
@@ -10350,6 +11607,27 @@
10350
11607
  {
10351
11608
  "loadVariables": "variables.env"
10352
11609
  },
11610
+ {
11611
+ "saveCookie": "session_token"
11612
+ },
11613
+ {
11614
+ "saveCookie": {
11615
+ "name": "auth_cookie",
11616
+ "path": "auth-session.txt",
11617
+ "directory": "./test-data",
11618
+ "overwrite": true
11619
+ }
11620
+ },
11621
+ {
11622
+ "loadCookie": "session_token"
11623
+ },
11624
+ {
11625
+ "loadCookie": {
11626
+ "name": "auth_cookie",
11627
+ "path": "auth-session.txt",
11628
+ "directory": "./test-data"
11629
+ }
11630
+ },
10353
11631
  {
10354
11632
  "find": "Find me!"
10355
11633
  },