doc-detective 4.0.2-dev.10 → 4.0.2-dev.12

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.
package/dist/index.cjs CHANGED
@@ -6258,9 +6258,9 @@ var schemas_default = {
6258
6258
  anyOf: [
6259
6259
  {
6260
6260
  title: "Screenshot (simple)",
6261
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
6261
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
6262
6262
  type: "string",
6263
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
6263
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
6264
6264
  transform: [
6265
6265
  "trim"
6266
6266
  ]
@@ -6271,9 +6271,9 @@ var schemas_default = {
6271
6271
  properties: {
6272
6272
  path: {
6273
6273
  title: "Screenshot (simple)",
6274
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
6274
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
6275
6275
  type: "string",
6276
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
6276
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
6277
6277
  transform: [
6278
6278
  "trim"
6279
6279
  ]
@@ -6504,9 +6504,9 @@ var schemas_default = {
6504
6504
  schemas: {
6505
6505
  path: {
6506
6506
  title: "Screenshot (simple)",
6507
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
6507
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
6508
6508
  type: "string",
6509
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
6509
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
6510
6510
  transform: [
6511
6511
  "trim"
6512
6512
  ]
@@ -6517,9 +6517,9 @@ var schemas_default = {
6517
6517
  properties: {
6518
6518
  path: {
6519
6519
  title: "Screenshot (simple)",
6520
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
6520
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
6521
6521
  type: "string",
6522
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
6522
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
6523
6523
  transform: [
6524
6524
  "trim"
6525
6525
  ]
@@ -6901,6 +6901,12 @@ var schemas_default = {
6901
6901
  "image.png",
6902
6902
  "static/images/image.png",
6903
6903
  "/User/manny/projects/doc-detective/static/images/image.png",
6904
+ "https://example.com/static/images/image.png",
6905
+ {
6906
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
6907
+ maxVariation: 0.05,
6908
+ overwrite: "aboveVariation"
6909
+ },
6904
6910
  {
6905
6911
  path: "image.png",
6906
6912
  directory: "static/images",
@@ -14921,9 +14927,9 @@ var schemas_default = {
14921
14927
  anyOf: [
14922
14928
  {
14923
14929
  title: "Screenshot (simple)",
14924
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
14930
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
14925
14931
  type: "string",
14926
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
14932
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
14927
14933
  transform: [
14928
14934
  "trim"
14929
14935
  ]
@@ -14934,9 +14940,9 @@ var schemas_default = {
14934
14940
  properties: {
14935
14941
  path: {
14936
14942
  title: "Screenshot (simple)",
14937
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
14943
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
14938
14944
  type: "string",
14939
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
14945
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
14940
14946
  transform: [
14941
14947
  "trim"
14942
14948
  ]
@@ -15167,9 +15173,9 @@ var schemas_default = {
15167
15173
  schemas: {
15168
15174
  path: {
15169
15175
  title: "Screenshot (simple)",
15170
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
15176
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
15171
15177
  type: "string",
15172
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
15178
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
15173
15179
  transform: [
15174
15180
  "trim"
15175
15181
  ]
@@ -15180,9 +15186,9 @@ var schemas_default = {
15180
15186
  properties: {
15181
15187
  path: {
15182
15188
  title: "Screenshot (simple)",
15183
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
15189
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
15184
15190
  type: "string",
15185
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
15191
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
15186
15192
  transform: [
15187
15193
  "trim"
15188
15194
  ]
@@ -15564,6 +15570,12 @@ var schemas_default = {
15564
15570
  "image.png",
15565
15571
  "static/images/image.png",
15566
15572
  "/User/manny/projects/doc-detective/static/images/image.png",
15573
+ "https://example.com/static/images/image.png",
15574
+ {
15575
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
15576
+ maxVariation: 0.05,
15577
+ overwrite: "aboveVariation"
15578
+ },
15567
15579
  {
15568
15580
  path: "image.png",
15569
15581
  directory: "static/images",
@@ -28014,9 +28026,9 @@ var schemas_default = {
28014
28026
  anyOf: [
28015
28027
  {
28016
28028
  title: "Screenshot (simple)",
28017
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
28029
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
28018
28030
  type: "string",
28019
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
28031
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
28020
28032
  transform: [
28021
28033
  "trim"
28022
28034
  ]
@@ -28027,9 +28039,9 @@ var schemas_default = {
28027
28039
  properties: {
28028
28040
  path: {
28029
28041
  title: "Screenshot (simple)",
28030
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
28042
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
28031
28043
  type: "string",
28032
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
28044
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
28033
28045
  transform: [
28034
28046
  "trim"
28035
28047
  ]
@@ -28260,9 +28272,9 @@ var schemas_default = {
28260
28272
  schemas: {
28261
28273
  path: {
28262
28274
  title: "Screenshot (simple)",
28263
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
28275
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
28264
28276
  type: "string",
28265
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
28277
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
28266
28278
  transform: [
28267
28279
  "trim"
28268
28280
  ]
@@ -28273,9 +28285,9 @@ var schemas_default = {
28273
28285
  properties: {
28274
28286
  path: {
28275
28287
  title: "Screenshot (simple)",
28276
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
28288
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
28277
28289
  type: "string",
28278
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
28290
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
28279
28291
  transform: [
28280
28292
  "trim"
28281
28293
  ]
@@ -28657,6 +28669,12 @@ var schemas_default = {
28657
28669
  "image.png",
28658
28670
  "static/images/image.png",
28659
28671
  "/User/manny/projects/doc-detective/static/images/image.png",
28672
+ "https://example.com/static/images/image.png",
28673
+ {
28674
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
28675
+ maxVariation: 0.05,
28676
+ overwrite: "aboveVariation"
28677
+ },
28660
28678
  {
28661
28679
  path: "image.png",
28662
28680
  directory: "static/images",
@@ -36677,9 +36695,9 @@ var schemas_default = {
36677
36695
  anyOf: [
36678
36696
  {
36679
36697
  title: "Screenshot (simple)",
36680
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
36698
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
36681
36699
  type: "string",
36682
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
36700
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
36683
36701
  transform: [
36684
36702
  "trim"
36685
36703
  ]
@@ -36690,9 +36708,9 @@ var schemas_default = {
36690
36708
  properties: {
36691
36709
  path: {
36692
36710
  title: "Screenshot (simple)",
36693
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
36711
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
36694
36712
  type: "string",
36695
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
36713
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
36696
36714
  transform: [
36697
36715
  "trim"
36698
36716
  ]
@@ -36923,9 +36941,9 @@ var schemas_default = {
36923
36941
  schemas: {
36924
36942
  path: {
36925
36943
  title: "Screenshot (simple)",
36926
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
36944
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
36927
36945
  type: "string",
36928
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
36946
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
36929
36947
  transform: [
36930
36948
  "trim"
36931
36949
  ]
@@ -36936,9 +36954,9 @@ var schemas_default = {
36936
36954
  properties: {
36937
36955
  path: {
36938
36956
  title: "Screenshot (simple)",
36939
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
36957
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
36940
36958
  type: "string",
36941
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
36959
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
36942
36960
  transform: [
36943
36961
  "trim"
36944
36962
  ]
@@ -37320,6 +37338,12 @@ var schemas_default = {
37320
37338
  "image.png",
37321
37339
  "static/images/image.png",
37322
37340
  "/User/manny/projects/doc-detective/static/images/image.png",
37341
+ "https://example.com/static/images/image.png",
37342
+ {
37343
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
37344
+ maxVariation: 0.05,
37345
+ overwrite: "aboveVariation"
37346
+ },
37323
37347
  {
37324
37348
  path: "image.png",
37325
37349
  directory: "static/images",
@@ -46034,9 +46058,9 @@ var schemas_default = {
46034
46058
  anyOf: [
46035
46059
  {
46036
46060
  title: "Screenshot (simple)",
46037
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
46061
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
46038
46062
  type: "string",
46039
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
46063
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
46040
46064
  transform: [
46041
46065
  "trim"
46042
46066
  ]
@@ -46047,9 +46071,9 @@ var schemas_default = {
46047
46071
  properties: {
46048
46072
  path: {
46049
46073
  title: "Screenshot (simple)",
46050
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
46074
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
46051
46075
  type: "string",
46052
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
46076
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
46053
46077
  transform: [
46054
46078
  "trim"
46055
46079
  ]
@@ -46280,9 +46304,9 @@ var schemas_default = {
46280
46304
  schemas: {
46281
46305
  path: {
46282
46306
  title: "Screenshot (simple)",
46283
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
46307
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
46284
46308
  type: "string",
46285
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
46309
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
46286
46310
  transform: [
46287
46311
  "trim"
46288
46312
  ]
@@ -46293,9 +46317,9 @@ var schemas_default = {
46293
46317
  properties: {
46294
46318
  path: {
46295
46319
  title: "Screenshot (simple)",
46296
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
46320
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
46297
46321
  type: "string",
46298
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
46322
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
46299
46323
  transform: [
46300
46324
  "trim"
46301
46325
  ]
@@ -46677,6 +46701,12 @@ var schemas_default = {
46677
46701
  "image.png",
46678
46702
  "static/images/image.png",
46679
46703
  "/User/manny/projects/doc-detective/static/images/image.png",
46704
+ "https://example.com/static/images/image.png",
46705
+ {
46706
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
46707
+ maxVariation: 0.05,
46708
+ overwrite: "aboveVariation"
46709
+ },
46680
46710
  {
46681
46711
  path: "image.png",
46682
46712
  directory: "static/images",
@@ -54171,9 +54201,9 @@ var schemas_default = {
54171
54201
  anyOf: [
54172
54202
  {
54173
54203
  title: "Screenshot (simple)",
54174
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
54204
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
54175
54205
  type: "string",
54176
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
54206
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
54177
54207
  transform: [
54178
54208
  "trim"
54179
54209
  ]
@@ -54184,9 +54214,9 @@ var schemas_default = {
54184
54214
  properties: {
54185
54215
  path: {
54186
54216
  title: "Screenshot (simple)",
54187
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
54217
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
54188
54218
  type: "string",
54189
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
54219
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
54190
54220
  transform: [
54191
54221
  "trim"
54192
54222
  ]
@@ -54417,9 +54447,9 @@ var schemas_default = {
54417
54447
  schemas: {
54418
54448
  path: {
54419
54449
  title: "Screenshot (simple)",
54420
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
54450
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
54421
54451
  type: "string",
54422
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
54452
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
54423
54453
  transform: [
54424
54454
  "trim"
54425
54455
  ]
@@ -54430,9 +54460,9 @@ var schemas_default = {
54430
54460
  properties: {
54431
54461
  path: {
54432
54462
  title: "Screenshot (simple)",
54433
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
54463
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
54434
54464
  type: "string",
54435
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
54465
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
54436
54466
  transform: [
54437
54467
  "trim"
54438
54468
  ]
@@ -54814,6 +54844,12 @@ var schemas_default = {
54814
54844
  "image.png",
54815
54845
  "static/images/image.png",
54816
54846
  "/User/manny/projects/doc-detective/static/images/image.png",
54847
+ "https://example.com/static/images/image.png",
54848
+ {
54849
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
54850
+ maxVariation: 0.05,
54851
+ overwrite: "aboveVariation"
54852
+ },
54817
54853
  {
54818
54854
  path: "image.png",
54819
54855
  directory: "static/images",
@@ -64018,9 +64054,9 @@ var schemas_default = {
64018
64054
  anyOf: [
64019
64055
  {
64020
64056
  title: "Screenshot (simple)",
64021
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
64057
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
64022
64058
  type: "string",
64023
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
64059
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
64024
64060
  transform: [
64025
64061
  "trim"
64026
64062
  ]
@@ -64031,9 +64067,9 @@ var schemas_default = {
64031
64067
  properties: {
64032
64068
  path: {
64033
64069
  title: "Screenshot (simple)",
64034
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
64070
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
64035
64071
  type: "string",
64036
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
64072
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
64037
64073
  transform: [
64038
64074
  "trim"
64039
64075
  ]
@@ -64264,9 +64300,9 @@ var schemas_default = {
64264
64300
  schemas: {
64265
64301
  path: {
64266
64302
  title: "Screenshot (simple)",
64267
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
64303
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
64268
64304
  type: "string",
64269
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
64305
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
64270
64306
  transform: [
64271
64307
  "trim"
64272
64308
  ]
@@ -64277,9 +64313,9 @@ var schemas_default = {
64277
64313
  properties: {
64278
64314
  path: {
64279
64315
  title: "Screenshot (simple)",
64280
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
64316
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
64281
64317
  type: "string",
64282
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
64318
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
64283
64319
  transform: [
64284
64320
  "trim"
64285
64321
  ]
@@ -64661,6 +64697,12 @@ var schemas_default = {
64661
64697
  "image.png",
64662
64698
  "static/images/image.png",
64663
64699
  "/User/manny/projects/doc-detective/static/images/image.png",
64700
+ "https://example.com/static/images/image.png",
64701
+ {
64702
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
64703
+ maxVariation: 0.05,
64704
+ overwrite: "aboveVariation"
64705
+ },
64664
64706
  {
64665
64707
  path: "image.png",
64666
64708
  directory: "static/images",
@@ -72155,9 +72197,9 @@ var schemas_default = {
72155
72197
  anyOf: [
72156
72198
  {
72157
72199
  title: "Screenshot (simple)",
72158
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
72200
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
72159
72201
  type: "string",
72160
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
72202
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
72161
72203
  transform: [
72162
72204
  "trim"
72163
72205
  ]
@@ -72168,9 +72210,9 @@ var schemas_default = {
72168
72210
  properties: {
72169
72211
  path: {
72170
72212
  title: "Screenshot (simple)",
72171
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
72213
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
72172
72214
  type: "string",
72173
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
72215
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
72174
72216
  transform: [
72175
72217
  "trim"
72176
72218
  ]
@@ -72401,9 +72443,9 @@ var schemas_default = {
72401
72443
  schemas: {
72402
72444
  path: {
72403
72445
  title: "Screenshot (simple)",
72404
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
72446
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
72405
72447
  type: "string",
72406
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
72448
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
72407
72449
  transform: [
72408
72450
  "trim"
72409
72451
  ]
@@ -72414,9 +72456,9 @@ var schemas_default = {
72414
72456
  properties: {
72415
72457
  path: {
72416
72458
  title: "Screenshot (simple)",
72417
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
72459
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
72418
72460
  type: "string",
72419
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
72461
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
72420
72462
  transform: [
72421
72463
  "trim"
72422
72464
  ]
@@ -72798,6 +72840,12 @@ var schemas_default = {
72798
72840
  "image.png",
72799
72841
  "static/images/image.png",
72800
72842
  "/User/manny/projects/doc-detective/static/images/image.png",
72843
+ "https://example.com/static/images/image.png",
72844
+ {
72845
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
72846
+ maxVariation: 0.05,
72847
+ overwrite: "aboveVariation"
72848
+ },
72801
72849
  {
72802
72850
  path: "image.png",
72803
72851
  directory: "static/images",
@@ -76482,9 +76530,9 @@ var schemas_default = {
76482
76530
  anyOf: [
76483
76531
  {
76484
76532
  title: "Screenshot (simple)",
76485
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
76533
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
76486
76534
  type: "string",
76487
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
76535
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
76488
76536
  transform: [
76489
76537
  "trim"
76490
76538
  ]
@@ -76495,9 +76543,9 @@ var schemas_default = {
76495
76543
  properties: {
76496
76544
  path: {
76497
76545
  title: "Screenshot (simple)",
76498
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
76546
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
76499
76547
  type: "string",
76500
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
76548
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
76501
76549
  transform: [
76502
76550
  "trim"
76503
76551
  ]
@@ -76728,9 +76776,9 @@ var schemas_default = {
76728
76776
  schemas: {
76729
76777
  path: {
76730
76778
  title: "Screenshot (simple)",
76731
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
76779
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
76732
76780
  type: "string",
76733
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
76781
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
76734
76782
  transform: [
76735
76783
  "trim"
76736
76784
  ]
@@ -76741,9 +76789,9 @@ var schemas_default = {
76741
76789
  properties: {
76742
76790
  path: {
76743
76791
  title: "Screenshot (simple)",
76744
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
76792
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
76745
76793
  type: "string",
76746
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
76794
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
76747
76795
  transform: [
76748
76796
  "trim"
76749
76797
  ]
@@ -77125,6 +77173,12 @@ var schemas_default = {
77125
77173
  "image.png",
77126
77174
  "static/images/image.png",
77127
77175
  "/User/manny/projects/doc-detective/static/images/image.png",
77176
+ "https://example.com/static/images/image.png",
77177
+ {
77178
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
77179
+ maxVariation: 0.05,
77180
+ overwrite: "aboveVariation"
77181
+ },
77128
77182
  {
77129
77183
  path: "image.png",
77130
77184
  directory: "static/images",
@@ -83384,9 +83438,9 @@ var schemas_default = {
83384
83438
  anyOf: [
83385
83439
  {
83386
83440
  title: "Screenshot (simple)",
83387
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
83441
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
83388
83442
  type: "string",
83389
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
83443
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
83390
83444
  transform: [
83391
83445
  "trim"
83392
83446
  ]
@@ -83397,9 +83451,9 @@ var schemas_default = {
83397
83451
  properties: {
83398
83452
  path: {
83399
83453
  title: "Screenshot (simple)",
83400
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
83454
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
83401
83455
  type: "string",
83402
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
83456
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
83403
83457
  transform: [
83404
83458
  "trim"
83405
83459
  ]
@@ -83630,9 +83684,9 @@ var schemas_default = {
83630
83684
  schemas: {
83631
83685
  path: {
83632
83686
  title: "Screenshot (simple)",
83633
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
83687
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
83634
83688
  type: "string",
83635
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
83689
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
83636
83690
  transform: [
83637
83691
  "trim"
83638
83692
  ]
@@ -83643,9 +83697,9 @@ var schemas_default = {
83643
83697
  properties: {
83644
83698
  path: {
83645
83699
  title: "Screenshot (simple)",
83646
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
83700
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
83647
83701
  type: "string",
83648
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
83702
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
83649
83703
  transform: [
83650
83704
  "trim"
83651
83705
  ]
@@ -84027,6 +84081,12 @@ var schemas_default = {
84027
84081
  "image.png",
84028
84082
  "static/images/image.png",
84029
84083
  "/User/manny/projects/doc-detective/static/images/image.png",
84084
+ "https://example.com/static/images/image.png",
84085
+ {
84086
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
84087
+ maxVariation: 0.05,
84088
+ overwrite: "aboveVariation"
84089
+ },
84030
84090
  {
84031
84091
  path: "image.png",
84032
84092
  directory: "static/images",
@@ -91521,9 +91581,9 @@ var schemas_default = {
91521
91581
  anyOf: [
91522
91582
  {
91523
91583
  title: "Screenshot (simple)",
91524
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
91584
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
91525
91585
  type: "string",
91526
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
91586
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
91527
91587
  transform: [
91528
91588
  "trim"
91529
91589
  ]
@@ -91534,9 +91594,9 @@ var schemas_default = {
91534
91594
  properties: {
91535
91595
  path: {
91536
91596
  title: "Screenshot (simple)",
91537
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
91597
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
91538
91598
  type: "string",
91539
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
91599
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
91540
91600
  transform: [
91541
91601
  "trim"
91542
91602
  ]
@@ -91767,9 +91827,9 @@ var schemas_default = {
91767
91827
  schemas: {
91768
91828
  path: {
91769
91829
  title: "Screenshot (simple)",
91770
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
91830
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
91771
91831
  type: "string",
91772
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
91832
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
91773
91833
  transform: [
91774
91834
  "trim"
91775
91835
  ]
@@ -91780,9 +91840,9 @@ var schemas_default = {
91780
91840
  properties: {
91781
91841
  path: {
91782
91842
  title: "Screenshot (simple)",
91783
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
91843
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
91784
91844
  type: "string",
91785
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
91845
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
91786
91846
  transform: [
91787
91847
  "trim"
91788
91848
  ]
@@ -92164,6 +92224,12 @@ var schemas_default = {
92164
92224
  "image.png",
92165
92225
  "static/images/image.png",
92166
92226
  "/User/manny/projects/doc-detective/static/images/image.png",
92227
+ "https://example.com/static/images/image.png",
92228
+ {
92229
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
92230
+ maxVariation: 0.05,
92231
+ overwrite: "aboveVariation"
92232
+ },
92167
92233
  {
92168
92234
  path: "image.png",
92169
92235
  directory: "static/images",
@@ -99938,9 +100004,9 @@ var schemas_default = {
99938
100004
  anyOf: [
99939
100005
  {
99940
100006
  title: "Screenshot (simple)",
99941
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
100007
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
99942
100008
  type: "string",
99943
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
100009
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
99944
100010
  transform: [
99945
100011
  "trim"
99946
100012
  ]
@@ -99951,9 +100017,9 @@ var schemas_default = {
99951
100017
  properties: {
99952
100018
  path: {
99953
100019
  title: "Screenshot (simple)",
99954
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
100020
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
99955
100021
  type: "string",
99956
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
100022
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
99957
100023
  transform: [
99958
100024
  "trim"
99959
100025
  ]
@@ -100184,9 +100250,9 @@ var schemas_default = {
100184
100250
  schemas: {
100185
100251
  path: {
100186
100252
  title: "Screenshot (simple)",
100187
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
100253
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
100188
100254
  type: "string",
100189
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
100255
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
100190
100256
  transform: [
100191
100257
  "trim"
100192
100258
  ]
@@ -100197,9 +100263,9 @@ var schemas_default = {
100197
100263
  properties: {
100198
100264
  path: {
100199
100265
  title: "Screenshot (simple)",
100200
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
100266
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
100201
100267
  type: "string",
100202
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
100268
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
100203
100269
  transform: [
100204
100270
  "trim"
100205
100271
  ]
@@ -100581,6 +100647,12 @@ var schemas_default = {
100581
100647
  "image.png",
100582
100648
  "static/images/image.png",
100583
100649
  "/User/manny/projects/doc-detective/static/images/image.png",
100650
+ "https://example.com/static/images/image.png",
100651
+ {
100652
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
100653
+ maxVariation: 0.05,
100654
+ overwrite: "aboveVariation"
100655
+ },
100584
100656
  {
100585
100657
  path: "image.png",
100586
100658
  directory: "static/images",
@@ -108428,9 +108500,9 @@ var schemas_default = {
108428
108500
  anyOf: [
108429
108501
  {
108430
108502
  title: "Screenshot (simple)",
108431
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
108503
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
108432
108504
  type: "string",
108433
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
108505
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
108434
108506
  transform: [
108435
108507
  "trim"
108436
108508
  ]
@@ -108441,9 +108513,9 @@ var schemas_default = {
108441
108513
  properties: {
108442
108514
  path: {
108443
108515
  title: "Screenshot (simple)",
108444
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
108516
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
108445
108517
  type: "string",
108446
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
108518
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
108447
108519
  transform: [
108448
108520
  "trim"
108449
108521
  ]
@@ -108674,9 +108746,9 @@ var schemas_default = {
108674
108746
  schemas: {
108675
108747
  path: {
108676
108748
  title: "Screenshot (simple)",
108677
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
108749
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
108678
108750
  type: "string",
108679
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
108751
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
108680
108752
  transform: [
108681
108753
  "trim"
108682
108754
  ]
@@ -108687,9 +108759,9 @@ var schemas_default = {
108687
108759
  properties: {
108688
108760
  path: {
108689
108761
  title: "Screenshot (simple)",
108690
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
108762
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
108691
108763
  type: "string",
108692
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
108764
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
108693
108765
  transform: [
108694
108766
  "trim"
108695
108767
  ]
@@ -109071,6 +109143,12 @@ var schemas_default = {
109071
109143
  "image.png",
109072
109144
  "static/images/image.png",
109073
109145
  "/User/manny/projects/doc-detective/static/images/image.png",
109146
+ "https://example.com/static/images/image.png",
109147
+ {
109148
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
109149
+ maxVariation: 0.05,
109150
+ overwrite: "aboveVariation"
109151
+ },
109074
109152
  {
109075
109153
  path: "image.png",
109076
109154
  directory: "static/images",
@@ -116565,9 +116643,9 @@ var schemas_default = {
116565
116643
  anyOf: [
116566
116644
  {
116567
116645
  title: "Screenshot (simple)",
116568
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
116646
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
116569
116647
  type: "string",
116570
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
116648
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
116571
116649
  transform: [
116572
116650
  "trim"
116573
116651
  ]
@@ -116578,9 +116656,9 @@ var schemas_default = {
116578
116656
  properties: {
116579
116657
  path: {
116580
116658
  title: "Screenshot (simple)",
116581
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
116659
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
116582
116660
  type: "string",
116583
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
116661
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
116584
116662
  transform: [
116585
116663
  "trim"
116586
116664
  ]
@@ -116811,9 +116889,9 @@ var schemas_default = {
116811
116889
  schemas: {
116812
116890
  path: {
116813
116891
  title: "Screenshot (simple)",
116814
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
116892
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
116815
116893
  type: "string",
116816
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
116894
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
116817
116895
  transform: [
116818
116896
  "trim"
116819
116897
  ]
@@ -116824,9 +116902,9 @@ var schemas_default = {
116824
116902
  properties: {
116825
116903
  path: {
116826
116904
  title: "Screenshot (simple)",
116827
- description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.",
116905
+ description: "File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step. If an `http(s)` URL is supplied, the remote image is downloaded and used as a read-only reference for comparison; the new capture is written to a local run-specific folder instead of being uploaded back to the URL.",
116828
116906
  type: "string",
116829
- pattern: "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)",
116907
+ pattern: "^(?:https?:\\/\\/.+\\.(?:png|PNG)(?:\\?.*)?|[A-Za-z]:[\\/\\\\].*\\.(?:png|PNG)|[\\/\\\\]?[A-Za-z0-9_.\\/\\\\-]*\\.(?:png|PNG)|\\$[A-Za-z0-9_]+)$",
116830
116908
  transform: [
116831
116909
  "trim"
116832
116910
  ]
@@ -117208,6 +117286,12 @@ var schemas_default = {
117208
117286
  "image.png",
117209
117287
  "static/images/image.png",
117210
117288
  "/User/manny/projects/doc-detective/static/images/image.png",
117289
+ "https://example.com/static/images/image.png",
117290
+ {
117291
+ path: "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
117292
+ maxVariation: 0.05,
117293
+ overwrite: "aboveVariation"
117294
+ },
117211
117295
  {
117212
117296
  path: "image.png",
117213
117297
  directory: "static/images",
@@ -129219,6 +129303,8 @@ var import_node_fs = __toESM(require("node:fs"), 1);
129219
129303
  var import_node_os = __toESM(require("node:os"), 1);
129220
129304
  var import_node_path = __toESM(require("node:path"), 1);
129221
129305
  var import_node_crypto = __toESM(require("node:crypto"), 1);
129306
+ var import_promises = __toESM(require("node:dns/promises"), 1);
129307
+ var import_node_net = __toESM(require("node:net"), 1);
129222
129308
  var import_axios = __toESM(require("axios"), 1);
129223
129309
  var import_node_child_process = require("node:child_process");
129224
129310
  function isRelativeUrl(url) {
@@ -129243,23 +129329,146 @@ function cleanTemp() {
129243
129329
  });
129244
129330
  }
129245
129331
  }
129246
- async function fetchFile(fileURL) {
129332
+ var FETCH_BINARY_DEFAULTS = {
129333
+ responseType: "arraybuffer",
129334
+ timeout: 3e4,
129335
+ maxContentLength: 50 * 1024 * 1024,
129336
+ maxBodyLength: 50 * 1024 * 1024,
129337
+ maxRedirects: 5
129338
+ };
129339
+ function sanitizeFilesystemName(name, fallback) {
129340
+ if (!name || name === "." || name === "..")
129341
+ return fallback;
129342
+ const cleaned = name.replace(/[\x00-\x1f<>:"/\\|?*]/g, "_");
129343
+ if (!cleaned || /^\.+$/.test(cleaned))
129344
+ return fallback;
129345
+ return cleaned;
129346
+ }
129347
+ function safeFilenameFromUrl(fileURL, fallback) {
129348
+ let raw;
129247
129349
  try {
129248
- const response = await import_axios.default.get(fileURL);
129249
- if (typeof response.data === "object") {
129250
- response.data = JSON.stringify(response.data, null, 2);
129350
+ raw = new URL(fileURL).pathname;
129351
+ } catch {
129352
+ raw = fileURL;
129353
+ }
129354
+ raw = raw.split("?")[0].split("#")[0];
129355
+ const base = import_node_path.default.basename(raw.replace(/\\/g, "/"));
129356
+ return sanitizeFilesystemName(base, fallback);
129357
+ }
129358
+ function redactUrlForOutput(value) {
129359
+ try {
129360
+ const url = new URL(value);
129361
+ url.search = "";
129362
+ url.hash = "";
129363
+ return url.toString();
129364
+ } catch {
129365
+ return value.split("?")[0].split("#")[0];
129366
+ }
129367
+ }
129368
+ function isPrivateOrLoopbackAddress(ip) {
129369
+ if (!ip)
129370
+ return false;
129371
+ if (import_node_net.default.isIPv4(ip)) {
129372
+ const [a, b] = ip.split(".").map(Number);
129373
+ if (a === 10)
129374
+ return true;
129375
+ if (a === 127)
129376
+ return true;
129377
+ if (a === 0)
129378
+ return true;
129379
+ if (a === 169 && b === 254)
129380
+ return true;
129381
+ if (a === 172 && b >= 16 && b <= 31)
129382
+ return true;
129383
+ if (a === 192 && b === 168)
129384
+ return true;
129385
+ if (a === 100 && b >= 64 && b <= 127)
129386
+ return true;
129387
+ return false;
129388
+ }
129389
+ if (import_node_net.default.isIPv6(ip)) {
129390
+ const normalized = ip.toLowerCase();
129391
+ if (normalized === "::1")
129392
+ return true;
129393
+ if (normalized === "::")
129394
+ return true;
129395
+ if (normalized.startsWith("fc") || normalized.startsWith("fd"))
129396
+ return true;
129397
+ if (normalized.startsWith("fe80:"))
129398
+ return true;
129399
+ if (normalized.startsWith("::ffff:")) {
129400
+ return isPrivateOrLoopbackAddress(normalized.replace("::ffff:", ""));
129401
+ }
129402
+ return false;
129403
+ }
129404
+ return false;
129405
+ }
129406
+ async function assertUrlHostIsPublic(fileURL) {
129407
+ if (process.env.DOC_DETECTIVE_ALLOW_LOCAL_URLS === "true")
129408
+ return;
129409
+ let parsed;
129410
+ try {
129411
+ parsed = new URL(fileURL);
129412
+ } catch {
129413
+ throw new Error(`Invalid URL: ${redactUrlForOutput(fileURL)}`);
129414
+ }
129415
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
129416
+ throw new Error(`Unsupported URL scheme (${parsed.protocol}) for ${redactUrlForOutput(fileURL)}`);
129417
+ }
129418
+ const host = parsed.hostname.replace(/^\[|\]$/g, "");
129419
+ if (import_node_net.default.isIP(host)) {
129420
+ if (isPrivateOrLoopbackAddress(host)) {
129421
+ throw new Error(`Refusing to fetch private/loopback address (${host}). Set DOC_DETECTIVE_ALLOW_LOCAL_URLS=true to allow.`);
129422
+ }
129423
+ return;
129424
+ }
129425
+ const lower = host.toLowerCase();
129426
+ if (lower === "localhost" || lower.endsWith(".localhost")) {
129427
+ throw new Error(`Refusing to fetch localhost (${host}). Set DOC_DETECTIVE_ALLOW_LOCAL_URLS=true to allow.`);
129428
+ }
129429
+ let addresses;
129430
+ try {
129431
+ addresses = await import_promises.default.lookup(host, { all: true });
129432
+ } catch (error) {
129433
+ throw new Error(`Couldn't resolve host ${host} for SSRF check: ${error.message}`);
129434
+ }
129435
+ for (const { address } of addresses) {
129436
+ if (isPrivateOrLoopbackAddress(address)) {
129437
+ throw new Error(`Host ${host} resolves to a private/loopback address (${address}); refusing to fetch. Set DOC_DETECTIVE_ALLOW_LOCAL_URLS=true to allow.`);
129438
+ }
129439
+ }
129440
+ }
129441
+ async function fetchFile(fileURL, opts = {}) {
129442
+ try {
129443
+ if (opts.binary) {
129444
+ await assertUrlHostIsPublic(fileURL);
129445
+ }
129446
+ const response = await import_axios.default.get(fileURL, opts.binary ? FETCH_BINARY_DEFAULTS : void 0);
129447
+ let data;
129448
+ if (opts.binary) {
129449
+ data = Buffer.from(response.data);
129450
+ } else if (typeof response.data === "object") {
129451
+ data = JSON.stringify(response.data, null, 2);
129251
129452
  } else {
129252
- response.data = response.data.toString();
129453
+ data = response.data.toString();
129253
129454
  }
129254
- const fileName = fileURL.split("/").pop() || "fetched_file";
129255
- const hash = import_node_crypto.default.createHash("md5").update(response.data).digest("hex");
129455
+ const fileName = safeFilenameFromUrl(fileURL, "fetched_file");
129456
+ const hash = import_node_crypto.default.createHash("md5").update(data).digest("hex");
129256
129457
  const ddTempDir = import_node_path.default.join(import_node_os.default.tmpdir(), "doc-detective");
129257
129458
  const filePath = import_node_path.default.join(ddTempDir, `${hash}_${fileName}`);
129459
+ const resolvedDir = import_node_path.default.resolve(ddTempDir);
129460
+ const resolvedFile = import_node_path.default.resolve(filePath);
129461
+ if (!resolvedFile.startsWith(resolvedDir + import_node_path.default.sep)) {
129462
+ return {
129463
+ result: "error",
129464
+ message: new Error(`Refusing to write outside temp dir: ${resolvedFile}`)
129465
+ };
129466
+ }
129258
129467
  if (!import_node_fs.default.existsSync(ddTempDir)) {
129259
129468
  import_node_fs.default.mkdirSync(ddTempDir, { recursive: true });
129260
129469
  }
129261
129470
  if (!import_node_fs.default.existsSync(filePath)) {
129262
- import_node_fs.default.writeFileSync(filePath, response.data);
129471
+ import_node_fs.default.writeFileSync(filePath, data);
129263
129472
  }
129264
129473
  return { result: "success", path: filePath };
129265
129474
  } catch (error) {
@@ -129336,6 +129545,18 @@ function replaceEnvs(stringOrObject) {
129336
129545
  }
129337
129546
  return stringOrObject;
129338
129547
  }
129548
+ function timestamp() {
129549
+ let timestamp2 = /* @__PURE__ */ new Date();
129550
+ return `${timestamp2.getFullYear()}${("0" + (timestamp2.getMonth() + 1)).slice(-2)}${("0" + timestamp2.getDate()).slice(-2)}-${("0" + timestamp2.getHours()).slice(-2)}${("0" + timestamp2.getMinutes()).slice(-2)}${("0" + timestamp2.getSeconds()).slice(-2)}`;
129551
+ }
129552
+ function getOrInitRunTimestamp(config) {
129553
+ if (!config)
129554
+ return timestamp();
129555
+ if (!config.__runTimestamp) {
129556
+ config.__runTimestamp = timestamp();
129557
+ }
129558
+ return config.__runTimestamp;
129559
+ }
129339
129560
  async function spawnCommand(cmd, args = [], options = {}) {
129340
129561
  const spawnOptions = {
129341
129562
  shell: true
@@ -134406,6 +134627,33 @@ async function getPixelmatch() {
134406
134627
  }
134407
134628
  return pixelmatch;
134408
134629
  }
134630
+ function clampCropRect(rect, imgW, imgH) {
134631
+ let { x, y, width, height } = rect;
134632
+ if (width > imgW) {
134633
+ x = 0;
134634
+ width = imgW;
134635
+ } else {
134636
+ if (x < 0)
134637
+ x = 0;
134638
+ if (x + width > imgW)
134639
+ x = imgW - width;
134640
+ }
134641
+ if (height > imgH) {
134642
+ y = 0;
134643
+ height = imgH;
134644
+ } else {
134645
+ if (y < 0)
134646
+ y = 0;
134647
+ if (y + height > imgH)
134648
+ y = imgH - height;
134649
+ }
134650
+ return { x, y, width, height };
134651
+ }
134652
+ function aspectRatiosMatch(a, b) {
134653
+ const ra = a.width / a.height;
134654
+ const rb = b.width / b.height;
134655
+ return Math.abs(ra - rb) / Math.max(ra, rb) <= 0.05;
134656
+ }
134409
134657
  async function saveScreenshot({ config, step, driver }) {
134410
134658
  let result = {
134411
134659
  status: "PASS",
@@ -134449,19 +134697,57 @@ async function saveScreenshot({ config, step, driver }) {
134449
134697
  };
134450
134698
  }
134451
134699
  let filePath = step.screenshot.path;
134452
- const dir = import_node_path8.default.dirname(step.screenshot.path);
134453
- if (!import_node_fs7.default.existsSync(dir)) {
134454
- import_node_fs7.default.mkdirSync(dir, { recursive: true });
134455
- }
134456
134700
  let existFilePath;
134457
- if (import_node_fs7.default.existsSync(filePath)) {
134458
- if (step.screenshot.overwrite == "false") {
134459
- result.status = "SKIPPED";
134460
- result.description = `File already exists: ${filePath}`;
134701
+ let dir;
134702
+ const isUrlPath = /^https?:\/\//i.test(filePath);
134703
+ const originalUrlPath = isUrlPath ? filePath : void 0;
134704
+ const redactedUrl = isUrlPath ? redactUrlForOutput(filePath) : void 0;
134705
+ if (isUrlPath) {
134706
+ const fetched = await fetchFile(originalUrlPath, { binary: true });
134707
+ if (fetched.result !== "success") {
134708
+ result.status = "FAIL";
134709
+ result.description = `Couldn't fetch remote reference image (${redactedUrl}): ${fetched.message}`;
134710
+ return result;
134711
+ }
134712
+ existFilePath = fetched.path;
134713
+ let urlPathname;
134714
+ try {
134715
+ urlPathname = new URL(originalUrlPath).pathname;
134716
+ } catch {
134717
+ urlPathname = originalUrlPath;
134718
+ }
134719
+ const rawBase = import_node_path8.default.basename(urlPathname.split("?")[0].split("#")[0].replace(/\\/g, "/"));
134720
+ const safeBase = sanitizeFilesystemName(rawBase, `${step.stepId}.png`);
134721
+ dir = import_node_path8.default.join(process.cwd(), "doc-detective-runs", getOrInitRunTimestamp(config));
134722
+ if (!import_node_fs7.default.existsSync(dir)) {
134723
+ import_node_fs7.default.mkdirSync(dir, { recursive: true });
134724
+ }
134725
+ const captureId = `${step.stepId || "screenshot"}_${Date.now()}`;
134726
+ filePath = import_node_path8.default.join(dir, `${captureId}_${safeBase}`);
134727
+ const resolvedDir = import_node_path8.default.resolve(dir);
134728
+ const resolvedFile = import_node_path8.default.resolve(filePath);
134729
+ if (!resolvedFile.startsWith(resolvedDir + import_node_path8.default.sep)) {
134730
+ result.status = "FAIL";
134731
+ result.description = `Refusing to write screenshot outside run folder: ${resolvedFile}`;
134461
134732
  return result;
134462
- } else {
134463
- existFilePath = filePath;
134464
- filePath = import_node_path8.default.join(dir, `${step.stepId}_${Date.now()}.png`);
134733
+ }
134734
+ if (step.screenshot.overwrite !== "false") {
134735
+ log(config, "debug", `Screenshot path is a URL (${redactedUrl}); overwrite is ignored, running comparison only.`);
134736
+ }
134737
+ } else {
134738
+ dir = import_node_path8.default.dirname(step.screenshot.path);
134739
+ if (!import_node_fs7.default.existsSync(dir)) {
134740
+ import_node_fs7.default.mkdirSync(dir, { recursive: true });
134741
+ }
134742
+ if (import_node_fs7.default.existsSync(filePath)) {
134743
+ if (step.screenshot.overwrite == "false") {
134744
+ result.status = "SKIPPED";
134745
+ result.description = `File already exists: ${filePath}`;
134746
+ return result;
134747
+ } else {
134748
+ existFilePath = filePath;
134749
+ filePath = import_node_path8.default.join(dir, `${step.stepId}_${Date.now()}.png`);
134750
+ }
134465
134751
  }
134466
134752
  }
134467
134753
  if (step.screenshot.crop) {
@@ -134588,20 +134874,11 @@ async function saveScreenshot({ config, step, driver }) {
134588
134874
  rect.width = Math.round(rect.width);
134589
134875
  rect.height = Math.round(rect.height);
134590
134876
  const imgMeta = await (0, import_sharp.default)(filePath).metadata();
134591
- if (rect.x < 0) {
134592
- rect.width += rect.x;
134593
- rect.x = 0;
134594
- }
134595
- if (rect.y < 0) {
134596
- rect.height += rect.y;
134597
- rect.y = 0;
134598
- }
134599
- if (rect.x + rect.width > imgMeta.width) {
134600
- rect.width = imgMeta.width - rect.x;
134601
- }
134602
- if (rect.y + rect.height > imgMeta.height) {
134603
- rect.height = imgMeta.height - rect.y;
134604
- }
134877
+ const clamped = clampCropRect(rect, imgMeta.width, imgMeta.height);
134878
+ rect.x = clamped.x;
134879
+ rect.y = clamped.y;
134880
+ rect.width = clamped.width;
134881
+ rect.height = clamped.height;
134605
134882
  log(config, "debug", { padded_rect: rect });
134606
134883
  const croppedPath = import_node_path8.default.join(dir, `cropped_${step.stepId || Date.now()}.png`);
134607
134884
  try {
@@ -134622,7 +134899,7 @@ async function saveScreenshot({ config, step, driver }) {
134622
134899
  }
134623
134900
  }
134624
134901
  if (existFilePath) {
134625
- if (step.screenshot.overwrite == "true") {
134902
+ if (step.screenshot.overwrite == "true" && !isUrlPath) {
134626
134903
  result.description += ` Overwrote existing file.`;
134627
134904
  import_node_fs7.default.renameSync(filePath, existFilePath);
134628
134905
  result.outputs.screenshotPath = existFilePath;
@@ -134634,12 +134911,23 @@ async function saveScreenshot({ config, step, driver }) {
134634
134911
  }
134635
134912
  let fractionalDiff;
134636
134913
  if (step.screenshot.maxVariation != null) {
134637
- const img1 = import_pngjs.PNG.sync.read(import_node_fs7.default.readFileSync(existFilePath));
134638
- const img2 = import_pngjs.PNG.sync.read(import_node_fs7.default.readFileSync(filePath));
134639
- if (Math.round(img1.width / img1.height * 100) / 100 !== Math.round(img2.width / img2.height * 100) / 100) {
134914
+ let img1;
134915
+ let img2;
134916
+ try {
134917
+ img1 = import_pngjs.PNG.sync.read(import_node_fs7.default.readFileSync(existFilePath));
134918
+ img2 = import_pngjs.PNG.sync.read(import_node_fs7.default.readFileSync(filePath));
134919
+ } catch (error) {
134920
+ result.status = "FAIL";
134921
+ result.description = isUrlPath ? `Couldn't decode PNG for comparison. The URL reference (${redactedUrl}) may not be a valid PNG. ${error}` : `Couldn't decode PNG for comparison. ${error}`;
134922
+ if (!isUrlPath && filePath !== existFilePath && import_node_fs7.default.existsSync(filePath)) {
134923
+ import_node_fs7.default.unlinkSync(filePath);
134924
+ }
134925
+ return result;
134926
+ }
134927
+ if (!aspectRatiosMatch(img1, img2)) {
134640
134928
  result.status = "FAIL";
134641
134929
  result.description = `Couldn't compare images. Images have different aspect ratios.`;
134642
- if (existFilePath && filePath !== existFilePath && import_node_fs7.default.existsSync(filePath)) {
134930
+ if (!isUrlPath && filePath !== existFilePath && import_node_fs7.default.existsSync(filePath)) {
134643
134931
  import_node_fs7.default.unlinkSync(filePath);
134644
134932
  }
134645
134933
  return result;
@@ -134670,25 +134958,35 @@ async function saveScreenshot({ config, step, driver }) {
134670
134958
  fractionalDiff
134671
134959
  });
134672
134960
  if (fractionalDiff > step.screenshot.maxVariation) {
134673
- if (step.screenshot.overwrite == "aboveVariation") {
134961
+ if (step.screenshot.overwrite == "aboveVariation" && !isUrlPath) {
134674
134962
  import_node_fs7.default.renameSync(filePath, existFilePath);
134675
134963
  }
134676
134964
  result.status = "WARNING";
134677
134965
  result.description += ` The difference between the existing screenshot and new screenshot (${fractionalDiff.toFixed(2)}) is greater than the max accepted variation (${step.screenshot.maxVariation}).`;
134678
- result.outputs.changed = true;
134679
- result.outputs.screenshotPath = existFilePath;
134680
- if (step.screenshot.sourceIntegration) {
134681
- result.outputs.sourceIntegration = step.screenshot.sourceIntegration;
134966
+ if (isUrlPath) {
134967
+ result.outputs.screenshotPath = filePath;
134968
+ result.outputs.referenceUrl = redactedUrl;
134969
+ } else {
134970
+ result.outputs.changed = true;
134971
+ result.outputs.screenshotPath = existFilePath;
134972
+ if (step.screenshot.sourceIntegration) {
134973
+ result.outputs.sourceIntegration = step.screenshot.sourceIntegration;
134974
+ }
134682
134975
  }
134683
134976
  return result;
134684
134977
  } else {
134685
134978
  result.description += ` Screenshots are within maximum accepted variation: ${fractionalDiff.toFixed(2)}.`;
134686
- result.outputs.screenshotPath = existFilePath;
134687
- if (step.screenshot.sourceIntegration) {
134688
- result.outputs.sourceIntegration = step.screenshot.sourceIntegration;
134689
- }
134690
- if (step.screenshot.overwrite != "true") {
134691
- import_node_fs7.default.unlinkSync(filePath);
134979
+ if (isUrlPath) {
134980
+ result.outputs.screenshotPath = filePath;
134981
+ result.outputs.referenceUrl = redactedUrl;
134982
+ } else {
134983
+ result.outputs.screenshotPath = existFilePath;
134984
+ if (step.screenshot.sourceIntegration) {
134985
+ result.outputs.sourceIntegration = step.screenshot.sourceIntegration;
134986
+ }
134987
+ if (step.screenshot.overwrite != "true") {
134988
+ import_node_fs7.default.unlinkSync(filePath);
134989
+ }
134692
134990
  }
134693
134991
  }
134694
134992
  }