@browserflow-ai/core 0.0.6

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 (57) hide show
  1. package/dist/config-schema.d.ts +354 -0
  2. package/dist/config-schema.d.ts.map +1 -0
  3. package/dist/config-schema.js +83 -0
  4. package/dist/config-schema.js.map +1 -0
  5. package/dist/config.d.ts +107 -0
  6. package/dist/config.d.ts.map +1 -0
  7. package/dist/config.js +5 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/duration.d.ts +39 -0
  10. package/dist/duration.d.ts.map +1 -0
  11. package/dist/duration.js +111 -0
  12. package/dist/duration.js.map +1 -0
  13. package/dist/index.d.ts +12 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +20 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/locator-object.d.ts +556 -0
  18. package/dist/locator-object.d.ts.map +1 -0
  19. package/dist/locator-object.js +114 -0
  20. package/dist/locator-object.js.map +1 -0
  21. package/dist/lockfile.d.ts +1501 -0
  22. package/dist/lockfile.d.ts.map +1 -0
  23. package/dist/lockfile.js +86 -0
  24. package/dist/lockfile.js.map +1 -0
  25. package/dist/run-store.d.ts +81 -0
  26. package/dist/run-store.d.ts.map +1 -0
  27. package/dist/run-store.js +181 -0
  28. package/dist/run-store.js.map +1 -0
  29. package/dist/spec-loader.d.ts +17 -0
  30. package/dist/spec-loader.d.ts.map +1 -0
  31. package/dist/spec-loader.js +37 -0
  32. package/dist/spec-loader.js.map +1 -0
  33. package/dist/spec-schema.d.ts +1411 -0
  34. package/dist/spec-schema.d.ts.map +1 -0
  35. package/dist/spec-schema.js +239 -0
  36. package/dist/spec-schema.js.map +1 -0
  37. package/package.json +45 -0
  38. package/schemas/browserflow.schema.json +220 -0
  39. package/schemas/lockfile.schema.json +568 -0
  40. package/schemas/spec-v2.schema.json +413 -0
  41. package/src/config-schema.test.ts +190 -0
  42. package/src/config-schema.ts +111 -0
  43. package/src/config.ts +112 -0
  44. package/src/duration.test.ts +175 -0
  45. package/src/duration.ts +128 -0
  46. package/src/index.ts +136 -0
  47. package/src/json-schemas.test.ts +374 -0
  48. package/src/locator-object.test.ts +323 -0
  49. package/src/locator-object.ts +250 -0
  50. package/src/lockfile.test.ts +345 -0
  51. package/src/lockfile.ts +209 -0
  52. package/src/run-store.test.ts +232 -0
  53. package/src/run-store.ts +240 -0
  54. package/src/spec-loader.test.ts +181 -0
  55. package/src/spec-loader.ts +47 -0
  56. package/src/spec-schema.test.ts +360 -0
  57. package/src/spec-schema.ts +347 -0
@@ -0,0 +1,568 @@
1
+ {
2
+ "$ref": "#/definitions/lockfile",
3
+ "definitions": {
4
+ "lockfile": {
5
+ "type": "object",
6
+ "properties": {
7
+ "run_id": {
8
+ "type": "string"
9
+ },
10
+ "spec_name": {
11
+ "type": "string"
12
+ },
13
+ "spec_hash": {
14
+ "type": "string"
15
+ },
16
+ "created_at": {
17
+ "type": "string"
18
+ },
19
+ "locators": {
20
+ "type": "object",
21
+ "additionalProperties": {
22
+ "type": "object",
23
+ "properties": {
24
+ "locator_id": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "preferred": {
29
+ "type": "object",
30
+ "properties": {
31
+ "type": {
32
+ "type": "string",
33
+ "enum": [
34
+ "testid",
35
+ "role",
36
+ "label",
37
+ "placeholder",
38
+ "text",
39
+ "css"
40
+ ]
41
+ },
42
+ "value": {
43
+ "type": "string"
44
+ },
45
+ "attribute": {
46
+ "type": "string"
47
+ },
48
+ "role": {
49
+ "type": "string"
50
+ },
51
+ "name": {
52
+ "type": "string"
53
+ },
54
+ "exact": {
55
+ "type": "boolean"
56
+ },
57
+ "text": {
58
+ "type": "string"
59
+ },
60
+ "selector": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "required": [
65
+ "type"
66
+ ],
67
+ "additionalProperties": false
68
+ },
69
+ "fallbacks": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "properties": {
74
+ "type": {
75
+ "type": "string",
76
+ "enum": [
77
+ "testid",
78
+ "role",
79
+ "label",
80
+ "placeholder",
81
+ "text",
82
+ "css"
83
+ ]
84
+ },
85
+ "value": {
86
+ "type": "string"
87
+ },
88
+ "attribute": {
89
+ "type": "string"
90
+ },
91
+ "role": {
92
+ "type": "string"
93
+ },
94
+ "name": {
95
+ "type": "string"
96
+ },
97
+ "exact": {
98
+ "type": "boolean"
99
+ },
100
+ "text": {
101
+ "type": "string"
102
+ },
103
+ "selector": {
104
+ "type": "string"
105
+ }
106
+ },
107
+ "required": [
108
+ "type"
109
+ ],
110
+ "additionalProperties": false
111
+ }
112
+ },
113
+ "scoping": {
114
+ "type": "object",
115
+ "properties": {
116
+ "within": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "type": {
122
+ "type": "string",
123
+ "enum": [
124
+ "testid",
125
+ "role",
126
+ "label",
127
+ "placeholder",
128
+ "text",
129
+ "css"
130
+ ]
131
+ },
132
+ "value": {
133
+ "type": "string"
134
+ },
135
+ "attribute": {
136
+ "type": "string"
137
+ },
138
+ "role": {
139
+ "type": "string"
140
+ },
141
+ "name": {
142
+ "type": "string"
143
+ },
144
+ "exact": {
145
+ "type": "boolean"
146
+ },
147
+ "text": {
148
+ "type": "string"
149
+ },
150
+ "selector": {
151
+ "type": "string"
152
+ }
153
+ },
154
+ "required": [
155
+ "type"
156
+ ],
157
+ "additionalProperties": false
158
+ }
159
+ },
160
+ "nth": {
161
+ "type": "integer"
162
+ }
163
+ },
164
+ "additionalProperties": false
165
+ },
166
+ "proof": {
167
+ "type": "object",
168
+ "properties": {
169
+ "a11y_role": {
170
+ "type": "string"
171
+ },
172
+ "a11y_name": {
173
+ "type": "string"
174
+ },
175
+ "dom_fingerprint": {
176
+ "type": "object",
177
+ "properties": {
178
+ "tag": {
179
+ "type": "string"
180
+ },
181
+ "classes": {
182
+ "type": "array",
183
+ "items": {
184
+ "type": "string"
185
+ }
186
+ },
187
+ "attributes": {
188
+ "type": "object",
189
+ "additionalProperties": {
190
+ "type": "string"
191
+ }
192
+ }
193
+ },
194
+ "required": [
195
+ "tag",
196
+ "classes"
197
+ ],
198
+ "additionalProperties": false
199
+ },
200
+ "bounding_box": {
201
+ "type": "object",
202
+ "properties": {
203
+ "x": {
204
+ "type": "number"
205
+ },
206
+ "y": {
207
+ "type": "number"
208
+ },
209
+ "width": {
210
+ "type": "number"
211
+ },
212
+ "height": {
213
+ "type": "number"
214
+ }
215
+ },
216
+ "required": [
217
+ "x",
218
+ "y",
219
+ "width",
220
+ "height"
221
+ ],
222
+ "additionalProperties": false
223
+ }
224
+ },
225
+ "additionalProperties": false
226
+ }
227
+ },
228
+ "required": [
229
+ "locator_id",
230
+ "preferred",
231
+ "fallbacks",
232
+ "proof"
233
+ ],
234
+ "additionalProperties": false
235
+ }
236
+ },
237
+ "masks": {
238
+ "type": "object",
239
+ "additionalProperties": {
240
+ "type": "array",
241
+ "items": {
242
+ "type": "object",
243
+ "properties": {
244
+ "x": {
245
+ "type": "number"
246
+ },
247
+ "y": {
248
+ "type": "number"
249
+ },
250
+ "width": {
251
+ "type": "number"
252
+ },
253
+ "height": {
254
+ "type": "number"
255
+ },
256
+ "reason": {
257
+ "type": "string"
258
+ },
259
+ "locator": {
260
+ "type": "string"
261
+ }
262
+ },
263
+ "required": [
264
+ "x",
265
+ "y",
266
+ "width",
267
+ "height",
268
+ "reason"
269
+ ],
270
+ "additionalProperties": false
271
+ }
272
+ }
273
+ },
274
+ "assertions": {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "object",
278
+ "properties": {
279
+ "id": {
280
+ "type": "string"
281
+ },
282
+ "type": {
283
+ "type": "string",
284
+ "enum": [
285
+ "visible",
286
+ "hidden",
287
+ "text_contains",
288
+ "text_equals",
289
+ "url_contains",
290
+ "url_matches",
291
+ "count",
292
+ "attribute",
293
+ "checked",
294
+ "screenshot"
295
+ ]
296
+ },
297
+ "target": {
298
+ "type": "object",
299
+ "properties": {
300
+ "locator_id": {
301
+ "type": "string",
302
+ "minLength": 1
303
+ },
304
+ "preferred": {
305
+ "type": "object",
306
+ "properties": {
307
+ "type": {
308
+ "type": "string",
309
+ "enum": [
310
+ "testid",
311
+ "role",
312
+ "label",
313
+ "placeholder",
314
+ "text",
315
+ "css"
316
+ ]
317
+ },
318
+ "value": {
319
+ "type": "string"
320
+ },
321
+ "attribute": {
322
+ "type": "string"
323
+ },
324
+ "role": {
325
+ "type": "string"
326
+ },
327
+ "name": {
328
+ "type": "string"
329
+ },
330
+ "exact": {
331
+ "type": "boolean"
332
+ },
333
+ "text": {
334
+ "type": "string"
335
+ },
336
+ "selector": {
337
+ "type": "string"
338
+ }
339
+ },
340
+ "required": [
341
+ "type"
342
+ ],
343
+ "additionalProperties": false
344
+ },
345
+ "fallbacks": {
346
+ "type": "array",
347
+ "items": {
348
+ "type": "object",
349
+ "properties": {
350
+ "type": {
351
+ "type": "string",
352
+ "enum": [
353
+ "testid",
354
+ "role",
355
+ "label",
356
+ "placeholder",
357
+ "text",
358
+ "css"
359
+ ]
360
+ },
361
+ "value": {
362
+ "type": "string"
363
+ },
364
+ "attribute": {
365
+ "type": "string"
366
+ },
367
+ "role": {
368
+ "type": "string"
369
+ },
370
+ "name": {
371
+ "type": "string"
372
+ },
373
+ "exact": {
374
+ "type": "boolean"
375
+ },
376
+ "text": {
377
+ "type": "string"
378
+ },
379
+ "selector": {
380
+ "type": "string"
381
+ }
382
+ },
383
+ "required": [
384
+ "type"
385
+ ],
386
+ "additionalProperties": false
387
+ }
388
+ },
389
+ "scoping": {
390
+ "type": "object",
391
+ "properties": {
392
+ "within": {
393
+ "type": "array",
394
+ "items": {
395
+ "type": "object",
396
+ "properties": {
397
+ "type": {
398
+ "type": "string",
399
+ "enum": [
400
+ "testid",
401
+ "role",
402
+ "label",
403
+ "placeholder",
404
+ "text",
405
+ "css"
406
+ ]
407
+ },
408
+ "value": {
409
+ "type": "string"
410
+ },
411
+ "attribute": {
412
+ "type": "string"
413
+ },
414
+ "role": {
415
+ "type": "string"
416
+ },
417
+ "name": {
418
+ "type": "string"
419
+ },
420
+ "exact": {
421
+ "type": "boolean"
422
+ },
423
+ "text": {
424
+ "type": "string"
425
+ },
426
+ "selector": {
427
+ "type": "string"
428
+ }
429
+ },
430
+ "required": [
431
+ "type"
432
+ ],
433
+ "additionalProperties": false
434
+ }
435
+ },
436
+ "nth": {
437
+ "type": "integer"
438
+ }
439
+ },
440
+ "additionalProperties": false
441
+ },
442
+ "proof": {
443
+ "type": "object",
444
+ "properties": {
445
+ "a11y_role": {
446
+ "type": "string"
447
+ },
448
+ "a11y_name": {
449
+ "type": "string"
450
+ },
451
+ "dom_fingerprint": {
452
+ "type": "object",
453
+ "properties": {
454
+ "tag": {
455
+ "type": "string"
456
+ },
457
+ "classes": {
458
+ "type": "array",
459
+ "items": {
460
+ "type": "string"
461
+ }
462
+ },
463
+ "attributes": {
464
+ "type": "object",
465
+ "additionalProperties": {
466
+ "type": "string"
467
+ }
468
+ }
469
+ },
470
+ "required": [
471
+ "tag",
472
+ "classes"
473
+ ],
474
+ "additionalProperties": false
475
+ },
476
+ "bounding_box": {
477
+ "type": "object",
478
+ "properties": {
479
+ "x": {
480
+ "type": "number"
481
+ },
482
+ "y": {
483
+ "type": "number"
484
+ },
485
+ "width": {
486
+ "type": "number"
487
+ },
488
+ "height": {
489
+ "type": "number"
490
+ }
491
+ },
492
+ "required": [
493
+ "x",
494
+ "y",
495
+ "width",
496
+ "height"
497
+ ],
498
+ "additionalProperties": false
499
+ }
500
+ },
501
+ "additionalProperties": false
502
+ }
503
+ },
504
+ "required": [
505
+ "locator_id",
506
+ "preferred",
507
+ "fallbacks",
508
+ "proof"
509
+ ],
510
+ "additionalProperties": false
511
+ },
512
+ "expected": {
513
+ "type": [
514
+ "string",
515
+ "number",
516
+ "boolean"
517
+ ]
518
+ },
519
+ "step_id": {
520
+ "type": "string"
521
+ }
522
+ },
523
+ "required": [
524
+ "id",
525
+ "type"
526
+ ],
527
+ "additionalProperties": false
528
+ }
529
+ },
530
+ "generation": {
531
+ "type": "object",
532
+ "properties": {
533
+ "format": {
534
+ "type": "string",
535
+ "const": "playwright-ts"
536
+ },
537
+ "output_path": {
538
+ "type": "string"
539
+ },
540
+ "generated_at": {
541
+ "type": "string"
542
+ }
543
+ },
544
+ "required": [
545
+ "format",
546
+ "output_path"
547
+ ],
548
+ "additionalProperties": false
549
+ }
550
+ },
551
+ "required": [
552
+ "run_id",
553
+ "spec_name",
554
+ "spec_hash",
555
+ "created_at",
556
+ "locators",
557
+ "masks",
558
+ "assertions",
559
+ "generation"
560
+ ],
561
+ "additionalProperties": false
562
+ }
563
+ },
564
+ "$schema": "http://json-schema.org/draft-07/schema#",
565
+ "$id": "https://browserflow.dev/schemas/lockfile.schema.json",
566
+ "title": "BrowserFlow Lockfile",
567
+ "description": "Schema for lockfile.json exploration result files"
568
+ }