clipwise 0.1.2 → 0.2.1
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/README.ko.md +51 -9
- package/README.md +49 -9
- package/dist/cli/index.js +110 -19
- package/dist/index.d.ts +413 -0
- package/dist/index.js +109 -18
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -16,44 +16,53 @@ declare const StepActionSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
|
|
|
16
16
|
action: z.ZodLiteral<"click">;
|
|
17
17
|
selector: z.ZodString;
|
|
18
18
|
delay: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
19
20
|
}, "strip", z.ZodTypeAny, {
|
|
20
21
|
action: "click";
|
|
21
22
|
selector: string;
|
|
22
23
|
delay?: number | undefined;
|
|
24
|
+
timeout?: number | undefined;
|
|
23
25
|
}, {
|
|
24
26
|
action: "click";
|
|
25
27
|
selector: string;
|
|
26
28
|
delay?: number | undefined;
|
|
29
|
+
timeout?: number | undefined;
|
|
27
30
|
}>, z.ZodObject<{
|
|
28
31
|
action: z.ZodLiteral<"type">;
|
|
29
32
|
selector: z.ZodString;
|
|
30
33
|
text: z.ZodString;
|
|
31
34
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
35
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
32
36
|
}, "strip", z.ZodTypeAny, {
|
|
33
37
|
action: "type";
|
|
34
38
|
selector: string;
|
|
35
39
|
delay: number;
|
|
36
40
|
text: string;
|
|
41
|
+
timeout?: number | undefined;
|
|
37
42
|
}, {
|
|
38
43
|
action: "type";
|
|
39
44
|
selector: string;
|
|
40
45
|
text: string;
|
|
41
46
|
delay?: number | undefined;
|
|
47
|
+
timeout?: number | undefined;
|
|
42
48
|
}>, z.ZodObject<{
|
|
43
49
|
action: z.ZodLiteral<"scroll">;
|
|
44
50
|
selector: z.ZodOptional<z.ZodString>;
|
|
45
51
|
y: z.ZodDefault<z.ZodNumber>;
|
|
46
52
|
x: z.ZodDefault<z.ZodNumber>;
|
|
47
53
|
smooth: z.ZodDefault<z.ZodBoolean>;
|
|
54
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
48
55
|
}, "strip", z.ZodTypeAny, {
|
|
49
56
|
action: "scroll";
|
|
50
57
|
y: number;
|
|
51
58
|
x: number;
|
|
52
59
|
smooth: boolean;
|
|
53
60
|
selector?: string | undefined;
|
|
61
|
+
timeout?: number | undefined;
|
|
54
62
|
}, {
|
|
55
63
|
action: "scroll";
|
|
56
64
|
selector?: string | undefined;
|
|
65
|
+
timeout?: number | undefined;
|
|
57
66
|
y?: number | undefined;
|
|
58
67
|
x?: number | undefined;
|
|
59
68
|
smooth?: boolean | undefined;
|
|
@@ -69,12 +78,15 @@ declare const StepActionSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
|
|
|
69
78
|
}>, z.ZodObject<{
|
|
70
79
|
action: z.ZodLiteral<"hover">;
|
|
71
80
|
selector: z.ZodString;
|
|
81
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
72
82
|
}, "strip", z.ZodTypeAny, {
|
|
73
83
|
action: "hover";
|
|
74
84
|
selector: string;
|
|
85
|
+
timeout?: number | undefined;
|
|
75
86
|
}, {
|
|
76
87
|
action: "hover";
|
|
77
88
|
selector: string;
|
|
89
|
+
timeout?: number | undefined;
|
|
78
90
|
}>, z.ZodObject<{
|
|
79
91
|
action: z.ZodLiteral<"screenshot">;
|
|
80
92
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -87,6 +99,75 @@ declare const StepActionSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
|
|
|
87
99
|
action: "screenshot";
|
|
88
100
|
name?: string | undefined;
|
|
89
101
|
fullPage?: boolean | undefined;
|
|
102
|
+
}>, z.ZodObject<{
|
|
103
|
+
action: z.ZodLiteral<"waitForSelector">;
|
|
104
|
+
selector: z.ZodString;
|
|
105
|
+
state: z.ZodDefault<z.ZodEnum<["visible", "attached", "hidden"]>>;
|
|
106
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
action: "waitForSelector";
|
|
109
|
+
selector: string;
|
|
110
|
+
timeout: number;
|
|
111
|
+
state: "visible" | "attached" | "hidden";
|
|
112
|
+
}, {
|
|
113
|
+
action: "waitForSelector";
|
|
114
|
+
selector: string;
|
|
115
|
+
timeout?: number | undefined;
|
|
116
|
+
state?: "visible" | "attached" | "hidden" | undefined;
|
|
117
|
+
}>, z.ZodObject<{
|
|
118
|
+
action: z.ZodLiteral<"waitForNavigation">;
|
|
119
|
+
waitUntil: z.ZodDefault<z.ZodEnum<["load", "domcontentloaded", "networkidle"]>>;
|
|
120
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
action: "waitForNavigation";
|
|
123
|
+
waitUntil: "load" | "domcontentloaded" | "networkidle";
|
|
124
|
+
timeout: number;
|
|
125
|
+
}, {
|
|
126
|
+
action: "waitForNavigation";
|
|
127
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle" | undefined;
|
|
128
|
+
timeout?: number | undefined;
|
|
129
|
+
}>, z.ZodObject<{
|
|
130
|
+
action: z.ZodLiteral<"waitForURL">;
|
|
131
|
+
url: z.ZodString;
|
|
132
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
action: "waitForURL";
|
|
135
|
+
url: string;
|
|
136
|
+
timeout: number;
|
|
137
|
+
}, {
|
|
138
|
+
action: "waitForURL";
|
|
139
|
+
url: string;
|
|
140
|
+
timeout?: number | undefined;
|
|
141
|
+
}>, z.ZodObject<{
|
|
142
|
+
action: z.ZodLiteral<"waitForFunction">;
|
|
143
|
+
expression: z.ZodString;
|
|
144
|
+
polling: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"raf">, z.ZodNumber]>>;
|
|
145
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
action: "waitForFunction";
|
|
148
|
+
timeout: number;
|
|
149
|
+
expression: string;
|
|
150
|
+
polling: number | "raf";
|
|
151
|
+
}, {
|
|
152
|
+
action: "waitForFunction";
|
|
153
|
+
expression: string;
|
|
154
|
+
timeout?: number | undefined;
|
|
155
|
+
polling?: number | "raf" | undefined;
|
|
156
|
+
}>, z.ZodObject<{
|
|
157
|
+
action: z.ZodLiteral<"waitForResponse">;
|
|
158
|
+
url: z.ZodString;
|
|
159
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
action: "waitForResponse";
|
|
163
|
+
url: string;
|
|
164
|
+
timeout: number;
|
|
165
|
+
status?: number | undefined;
|
|
166
|
+
}, {
|
|
167
|
+
action: "waitForResponse";
|
|
168
|
+
url: string;
|
|
169
|
+
status?: number | undefined;
|
|
170
|
+
timeout?: number | undefined;
|
|
90
171
|
}>]>;
|
|
91
172
|
type StepAction = z.infer<typeof StepActionSchema>;
|
|
92
173
|
declare const EffectsConfigSchema: z.ZodObject<{
|
|
@@ -449,44 +530,53 @@ declare const StepSchema: z.ZodObject<{
|
|
|
449
530
|
action: z.ZodLiteral<"click">;
|
|
450
531
|
selector: z.ZodString;
|
|
451
532
|
delay: z.ZodOptional<z.ZodNumber>;
|
|
533
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
452
534
|
}, "strip", z.ZodTypeAny, {
|
|
453
535
|
action: "click";
|
|
454
536
|
selector: string;
|
|
455
537
|
delay?: number | undefined;
|
|
538
|
+
timeout?: number | undefined;
|
|
456
539
|
}, {
|
|
457
540
|
action: "click";
|
|
458
541
|
selector: string;
|
|
459
542
|
delay?: number | undefined;
|
|
543
|
+
timeout?: number | undefined;
|
|
460
544
|
}>, z.ZodObject<{
|
|
461
545
|
action: z.ZodLiteral<"type">;
|
|
462
546
|
selector: z.ZodString;
|
|
463
547
|
text: z.ZodString;
|
|
464
548
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
549
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
465
550
|
}, "strip", z.ZodTypeAny, {
|
|
466
551
|
action: "type";
|
|
467
552
|
selector: string;
|
|
468
553
|
delay: number;
|
|
469
554
|
text: string;
|
|
555
|
+
timeout?: number | undefined;
|
|
470
556
|
}, {
|
|
471
557
|
action: "type";
|
|
472
558
|
selector: string;
|
|
473
559
|
text: string;
|
|
474
560
|
delay?: number | undefined;
|
|
561
|
+
timeout?: number | undefined;
|
|
475
562
|
}>, z.ZodObject<{
|
|
476
563
|
action: z.ZodLiteral<"scroll">;
|
|
477
564
|
selector: z.ZodOptional<z.ZodString>;
|
|
478
565
|
y: z.ZodDefault<z.ZodNumber>;
|
|
479
566
|
x: z.ZodDefault<z.ZodNumber>;
|
|
480
567
|
smooth: z.ZodDefault<z.ZodBoolean>;
|
|
568
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
481
569
|
}, "strip", z.ZodTypeAny, {
|
|
482
570
|
action: "scroll";
|
|
483
571
|
y: number;
|
|
484
572
|
x: number;
|
|
485
573
|
smooth: boolean;
|
|
486
574
|
selector?: string | undefined;
|
|
575
|
+
timeout?: number | undefined;
|
|
487
576
|
}, {
|
|
488
577
|
action: "scroll";
|
|
489
578
|
selector?: string | undefined;
|
|
579
|
+
timeout?: number | undefined;
|
|
490
580
|
y?: number | undefined;
|
|
491
581
|
x?: number | undefined;
|
|
492
582
|
smooth?: boolean | undefined;
|
|
@@ -502,12 +592,15 @@ declare const StepSchema: z.ZodObject<{
|
|
|
502
592
|
}>, z.ZodObject<{
|
|
503
593
|
action: z.ZodLiteral<"hover">;
|
|
504
594
|
selector: z.ZodString;
|
|
595
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
505
596
|
}, "strip", z.ZodTypeAny, {
|
|
506
597
|
action: "hover";
|
|
507
598
|
selector: string;
|
|
599
|
+
timeout?: number | undefined;
|
|
508
600
|
}, {
|
|
509
601
|
action: "hover";
|
|
510
602
|
selector: string;
|
|
603
|
+
timeout?: number | undefined;
|
|
511
604
|
}>, z.ZodObject<{
|
|
512
605
|
action: z.ZodLiteral<"screenshot">;
|
|
513
606
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -520,6 +613,75 @@ declare const StepSchema: z.ZodObject<{
|
|
|
520
613
|
action: "screenshot";
|
|
521
614
|
name?: string | undefined;
|
|
522
615
|
fullPage?: boolean | undefined;
|
|
616
|
+
}>, z.ZodObject<{
|
|
617
|
+
action: z.ZodLiteral<"waitForSelector">;
|
|
618
|
+
selector: z.ZodString;
|
|
619
|
+
state: z.ZodDefault<z.ZodEnum<["visible", "attached", "hidden"]>>;
|
|
620
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
621
|
+
}, "strip", z.ZodTypeAny, {
|
|
622
|
+
action: "waitForSelector";
|
|
623
|
+
selector: string;
|
|
624
|
+
timeout: number;
|
|
625
|
+
state: "visible" | "attached" | "hidden";
|
|
626
|
+
}, {
|
|
627
|
+
action: "waitForSelector";
|
|
628
|
+
selector: string;
|
|
629
|
+
timeout?: number | undefined;
|
|
630
|
+
state?: "visible" | "attached" | "hidden" | undefined;
|
|
631
|
+
}>, z.ZodObject<{
|
|
632
|
+
action: z.ZodLiteral<"waitForNavigation">;
|
|
633
|
+
waitUntil: z.ZodDefault<z.ZodEnum<["load", "domcontentloaded", "networkidle"]>>;
|
|
634
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
635
|
+
}, "strip", z.ZodTypeAny, {
|
|
636
|
+
action: "waitForNavigation";
|
|
637
|
+
waitUntil: "load" | "domcontentloaded" | "networkidle";
|
|
638
|
+
timeout: number;
|
|
639
|
+
}, {
|
|
640
|
+
action: "waitForNavigation";
|
|
641
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle" | undefined;
|
|
642
|
+
timeout?: number | undefined;
|
|
643
|
+
}>, z.ZodObject<{
|
|
644
|
+
action: z.ZodLiteral<"waitForURL">;
|
|
645
|
+
url: z.ZodString;
|
|
646
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
647
|
+
}, "strip", z.ZodTypeAny, {
|
|
648
|
+
action: "waitForURL";
|
|
649
|
+
url: string;
|
|
650
|
+
timeout: number;
|
|
651
|
+
}, {
|
|
652
|
+
action: "waitForURL";
|
|
653
|
+
url: string;
|
|
654
|
+
timeout?: number | undefined;
|
|
655
|
+
}>, z.ZodObject<{
|
|
656
|
+
action: z.ZodLiteral<"waitForFunction">;
|
|
657
|
+
expression: z.ZodString;
|
|
658
|
+
polling: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"raf">, z.ZodNumber]>>;
|
|
659
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
660
|
+
}, "strip", z.ZodTypeAny, {
|
|
661
|
+
action: "waitForFunction";
|
|
662
|
+
timeout: number;
|
|
663
|
+
expression: string;
|
|
664
|
+
polling: number | "raf";
|
|
665
|
+
}, {
|
|
666
|
+
action: "waitForFunction";
|
|
667
|
+
expression: string;
|
|
668
|
+
timeout?: number | undefined;
|
|
669
|
+
polling?: number | "raf" | undefined;
|
|
670
|
+
}>, z.ZodObject<{
|
|
671
|
+
action: z.ZodLiteral<"waitForResponse">;
|
|
672
|
+
url: z.ZodString;
|
|
673
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
674
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
675
|
+
}, "strip", z.ZodTypeAny, {
|
|
676
|
+
action: "waitForResponse";
|
|
677
|
+
url: string;
|
|
678
|
+
timeout: number;
|
|
679
|
+
status?: number | undefined;
|
|
680
|
+
}, {
|
|
681
|
+
action: "waitForResponse";
|
|
682
|
+
url: string;
|
|
683
|
+
status?: number | undefined;
|
|
684
|
+
timeout?: number | undefined;
|
|
523
685
|
}>]>, "many">;
|
|
524
686
|
captureDelay: z.ZodDefault<z.ZodNumber>;
|
|
525
687
|
holdDuration: z.ZodDefault<z.ZodNumber>;
|
|
@@ -533,27 +695,54 @@ declare const StepSchema: z.ZodObject<{
|
|
|
533
695
|
action: "click";
|
|
534
696
|
selector: string;
|
|
535
697
|
delay?: number | undefined;
|
|
698
|
+
timeout?: number | undefined;
|
|
536
699
|
} | {
|
|
537
700
|
action: "type";
|
|
538
701
|
selector: string;
|
|
539
702
|
delay: number;
|
|
540
703
|
text: string;
|
|
704
|
+
timeout?: number | undefined;
|
|
541
705
|
} | {
|
|
542
706
|
action: "scroll";
|
|
543
707
|
y: number;
|
|
544
708
|
x: number;
|
|
545
709
|
smooth: boolean;
|
|
546
710
|
selector?: string | undefined;
|
|
711
|
+
timeout?: number | undefined;
|
|
547
712
|
} | {
|
|
548
713
|
action: "wait";
|
|
549
714
|
duration: number;
|
|
550
715
|
} | {
|
|
551
716
|
action: "hover";
|
|
552
717
|
selector: string;
|
|
718
|
+
timeout?: number | undefined;
|
|
553
719
|
} | {
|
|
554
720
|
action: "screenshot";
|
|
555
721
|
fullPage: boolean;
|
|
556
722
|
name?: string | undefined;
|
|
723
|
+
} | {
|
|
724
|
+
action: "waitForSelector";
|
|
725
|
+
selector: string;
|
|
726
|
+
timeout: number;
|
|
727
|
+
state: "visible" | "attached" | "hidden";
|
|
728
|
+
} | {
|
|
729
|
+
action: "waitForNavigation";
|
|
730
|
+
waitUntil: "load" | "domcontentloaded" | "networkidle";
|
|
731
|
+
timeout: number;
|
|
732
|
+
} | {
|
|
733
|
+
action: "waitForURL";
|
|
734
|
+
url: string;
|
|
735
|
+
timeout: number;
|
|
736
|
+
} | {
|
|
737
|
+
action: "waitForFunction";
|
|
738
|
+
timeout: number;
|
|
739
|
+
expression: string;
|
|
740
|
+
polling: number | "raf";
|
|
741
|
+
} | {
|
|
742
|
+
action: "waitForResponse";
|
|
743
|
+
url: string;
|
|
744
|
+
timeout: number;
|
|
745
|
+
status?: number | undefined;
|
|
557
746
|
})[];
|
|
558
747
|
captureDelay: number;
|
|
559
748
|
holdDuration: number;
|
|
@@ -568,14 +757,17 @@ declare const StepSchema: z.ZodObject<{
|
|
|
568
757
|
action: "click";
|
|
569
758
|
selector: string;
|
|
570
759
|
delay?: number | undefined;
|
|
760
|
+
timeout?: number | undefined;
|
|
571
761
|
} | {
|
|
572
762
|
action: "type";
|
|
573
763
|
selector: string;
|
|
574
764
|
text: string;
|
|
575
765
|
delay?: number | undefined;
|
|
766
|
+
timeout?: number | undefined;
|
|
576
767
|
} | {
|
|
577
768
|
action: "scroll";
|
|
578
769
|
selector?: string | undefined;
|
|
770
|
+
timeout?: number | undefined;
|
|
579
771
|
y?: number | undefined;
|
|
580
772
|
x?: number | undefined;
|
|
581
773
|
smooth?: boolean | undefined;
|
|
@@ -585,10 +777,34 @@ declare const StepSchema: z.ZodObject<{
|
|
|
585
777
|
} | {
|
|
586
778
|
action: "hover";
|
|
587
779
|
selector: string;
|
|
780
|
+
timeout?: number | undefined;
|
|
588
781
|
} | {
|
|
589
782
|
action: "screenshot";
|
|
590
783
|
name?: string | undefined;
|
|
591
784
|
fullPage?: boolean | undefined;
|
|
785
|
+
} | {
|
|
786
|
+
action: "waitForSelector";
|
|
787
|
+
selector: string;
|
|
788
|
+
timeout?: number | undefined;
|
|
789
|
+
state?: "visible" | "attached" | "hidden" | undefined;
|
|
790
|
+
} | {
|
|
791
|
+
action: "waitForNavigation";
|
|
792
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle" | undefined;
|
|
793
|
+
timeout?: number | undefined;
|
|
794
|
+
} | {
|
|
795
|
+
action: "waitForURL";
|
|
796
|
+
url: string;
|
|
797
|
+
timeout?: number | undefined;
|
|
798
|
+
} | {
|
|
799
|
+
action: "waitForFunction";
|
|
800
|
+
expression: string;
|
|
801
|
+
timeout?: number | undefined;
|
|
802
|
+
polling?: number | "raf" | undefined;
|
|
803
|
+
} | {
|
|
804
|
+
action: "waitForResponse";
|
|
805
|
+
url: string;
|
|
806
|
+
status?: number | undefined;
|
|
807
|
+
timeout?: number | undefined;
|
|
592
808
|
})[];
|
|
593
809
|
name?: string | undefined;
|
|
594
810
|
captureDelay?: number | undefined;
|
|
@@ -967,44 +1183,53 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
967
1183
|
action: z.ZodLiteral<"click">;
|
|
968
1184
|
selector: z.ZodString;
|
|
969
1185
|
delay: z.ZodOptional<z.ZodNumber>;
|
|
1186
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
970
1187
|
}, "strip", z.ZodTypeAny, {
|
|
971
1188
|
action: "click";
|
|
972
1189
|
selector: string;
|
|
973
1190
|
delay?: number | undefined;
|
|
1191
|
+
timeout?: number | undefined;
|
|
974
1192
|
}, {
|
|
975
1193
|
action: "click";
|
|
976
1194
|
selector: string;
|
|
977
1195
|
delay?: number | undefined;
|
|
1196
|
+
timeout?: number | undefined;
|
|
978
1197
|
}>, z.ZodObject<{
|
|
979
1198
|
action: z.ZodLiteral<"type">;
|
|
980
1199
|
selector: z.ZodString;
|
|
981
1200
|
text: z.ZodString;
|
|
982
1201
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
1202
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
983
1203
|
}, "strip", z.ZodTypeAny, {
|
|
984
1204
|
action: "type";
|
|
985
1205
|
selector: string;
|
|
986
1206
|
delay: number;
|
|
987
1207
|
text: string;
|
|
1208
|
+
timeout?: number | undefined;
|
|
988
1209
|
}, {
|
|
989
1210
|
action: "type";
|
|
990
1211
|
selector: string;
|
|
991
1212
|
text: string;
|
|
992
1213
|
delay?: number | undefined;
|
|
1214
|
+
timeout?: number | undefined;
|
|
993
1215
|
}>, z.ZodObject<{
|
|
994
1216
|
action: z.ZodLiteral<"scroll">;
|
|
995
1217
|
selector: z.ZodOptional<z.ZodString>;
|
|
996
1218
|
y: z.ZodDefault<z.ZodNumber>;
|
|
997
1219
|
x: z.ZodDefault<z.ZodNumber>;
|
|
998
1220
|
smooth: z.ZodDefault<z.ZodBoolean>;
|
|
1221
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
999
1222
|
}, "strip", z.ZodTypeAny, {
|
|
1000
1223
|
action: "scroll";
|
|
1001
1224
|
y: number;
|
|
1002
1225
|
x: number;
|
|
1003
1226
|
smooth: boolean;
|
|
1004
1227
|
selector?: string | undefined;
|
|
1228
|
+
timeout?: number | undefined;
|
|
1005
1229
|
}, {
|
|
1006
1230
|
action: "scroll";
|
|
1007
1231
|
selector?: string | undefined;
|
|
1232
|
+
timeout?: number | undefined;
|
|
1008
1233
|
y?: number | undefined;
|
|
1009
1234
|
x?: number | undefined;
|
|
1010
1235
|
smooth?: boolean | undefined;
|
|
@@ -1020,12 +1245,15 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
1020
1245
|
}>, z.ZodObject<{
|
|
1021
1246
|
action: z.ZodLiteral<"hover">;
|
|
1022
1247
|
selector: z.ZodString;
|
|
1248
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1023
1249
|
}, "strip", z.ZodTypeAny, {
|
|
1024
1250
|
action: "hover";
|
|
1025
1251
|
selector: string;
|
|
1252
|
+
timeout?: number | undefined;
|
|
1026
1253
|
}, {
|
|
1027
1254
|
action: "hover";
|
|
1028
1255
|
selector: string;
|
|
1256
|
+
timeout?: number | undefined;
|
|
1029
1257
|
}>, z.ZodObject<{
|
|
1030
1258
|
action: z.ZodLiteral<"screenshot">;
|
|
1031
1259
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1038,6 +1266,75 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
1038
1266
|
action: "screenshot";
|
|
1039
1267
|
name?: string | undefined;
|
|
1040
1268
|
fullPage?: boolean | undefined;
|
|
1269
|
+
}>, z.ZodObject<{
|
|
1270
|
+
action: z.ZodLiteral<"waitForSelector">;
|
|
1271
|
+
selector: z.ZodString;
|
|
1272
|
+
state: z.ZodDefault<z.ZodEnum<["visible", "attached", "hidden"]>>;
|
|
1273
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
1274
|
+
}, "strip", z.ZodTypeAny, {
|
|
1275
|
+
action: "waitForSelector";
|
|
1276
|
+
selector: string;
|
|
1277
|
+
timeout: number;
|
|
1278
|
+
state: "visible" | "attached" | "hidden";
|
|
1279
|
+
}, {
|
|
1280
|
+
action: "waitForSelector";
|
|
1281
|
+
selector: string;
|
|
1282
|
+
timeout?: number | undefined;
|
|
1283
|
+
state?: "visible" | "attached" | "hidden" | undefined;
|
|
1284
|
+
}>, z.ZodObject<{
|
|
1285
|
+
action: z.ZodLiteral<"waitForNavigation">;
|
|
1286
|
+
waitUntil: z.ZodDefault<z.ZodEnum<["load", "domcontentloaded", "networkidle"]>>;
|
|
1287
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
1288
|
+
}, "strip", z.ZodTypeAny, {
|
|
1289
|
+
action: "waitForNavigation";
|
|
1290
|
+
waitUntil: "load" | "domcontentloaded" | "networkidle";
|
|
1291
|
+
timeout: number;
|
|
1292
|
+
}, {
|
|
1293
|
+
action: "waitForNavigation";
|
|
1294
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle" | undefined;
|
|
1295
|
+
timeout?: number | undefined;
|
|
1296
|
+
}>, z.ZodObject<{
|
|
1297
|
+
action: z.ZodLiteral<"waitForURL">;
|
|
1298
|
+
url: z.ZodString;
|
|
1299
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
1300
|
+
}, "strip", z.ZodTypeAny, {
|
|
1301
|
+
action: "waitForURL";
|
|
1302
|
+
url: string;
|
|
1303
|
+
timeout: number;
|
|
1304
|
+
}, {
|
|
1305
|
+
action: "waitForURL";
|
|
1306
|
+
url: string;
|
|
1307
|
+
timeout?: number | undefined;
|
|
1308
|
+
}>, z.ZodObject<{
|
|
1309
|
+
action: z.ZodLiteral<"waitForFunction">;
|
|
1310
|
+
expression: z.ZodString;
|
|
1311
|
+
polling: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"raf">, z.ZodNumber]>>;
|
|
1312
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
1313
|
+
}, "strip", z.ZodTypeAny, {
|
|
1314
|
+
action: "waitForFunction";
|
|
1315
|
+
timeout: number;
|
|
1316
|
+
expression: string;
|
|
1317
|
+
polling: number | "raf";
|
|
1318
|
+
}, {
|
|
1319
|
+
action: "waitForFunction";
|
|
1320
|
+
expression: string;
|
|
1321
|
+
timeout?: number | undefined;
|
|
1322
|
+
polling?: number | "raf" | undefined;
|
|
1323
|
+
}>, z.ZodObject<{
|
|
1324
|
+
action: z.ZodLiteral<"waitForResponse">;
|
|
1325
|
+
url: z.ZodString;
|
|
1326
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
1327
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
1328
|
+
}, "strip", z.ZodTypeAny, {
|
|
1329
|
+
action: "waitForResponse";
|
|
1330
|
+
url: string;
|
|
1331
|
+
timeout: number;
|
|
1332
|
+
status?: number | undefined;
|
|
1333
|
+
}, {
|
|
1334
|
+
action: "waitForResponse";
|
|
1335
|
+
url: string;
|
|
1336
|
+
status?: number | undefined;
|
|
1337
|
+
timeout?: number | undefined;
|
|
1041
1338
|
}>]>, "many">;
|
|
1042
1339
|
captureDelay: z.ZodDefault<z.ZodNumber>;
|
|
1043
1340
|
holdDuration: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1051,27 +1348,54 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
1051
1348
|
action: "click";
|
|
1052
1349
|
selector: string;
|
|
1053
1350
|
delay?: number | undefined;
|
|
1351
|
+
timeout?: number | undefined;
|
|
1054
1352
|
} | {
|
|
1055
1353
|
action: "type";
|
|
1056
1354
|
selector: string;
|
|
1057
1355
|
delay: number;
|
|
1058
1356
|
text: string;
|
|
1357
|
+
timeout?: number | undefined;
|
|
1059
1358
|
} | {
|
|
1060
1359
|
action: "scroll";
|
|
1061
1360
|
y: number;
|
|
1062
1361
|
x: number;
|
|
1063
1362
|
smooth: boolean;
|
|
1064
1363
|
selector?: string | undefined;
|
|
1364
|
+
timeout?: number | undefined;
|
|
1065
1365
|
} | {
|
|
1066
1366
|
action: "wait";
|
|
1067
1367
|
duration: number;
|
|
1068
1368
|
} | {
|
|
1069
1369
|
action: "hover";
|
|
1070
1370
|
selector: string;
|
|
1371
|
+
timeout?: number | undefined;
|
|
1071
1372
|
} | {
|
|
1072
1373
|
action: "screenshot";
|
|
1073
1374
|
fullPage: boolean;
|
|
1074
1375
|
name?: string | undefined;
|
|
1376
|
+
} | {
|
|
1377
|
+
action: "waitForSelector";
|
|
1378
|
+
selector: string;
|
|
1379
|
+
timeout: number;
|
|
1380
|
+
state: "visible" | "attached" | "hidden";
|
|
1381
|
+
} | {
|
|
1382
|
+
action: "waitForNavigation";
|
|
1383
|
+
waitUntil: "load" | "domcontentloaded" | "networkidle";
|
|
1384
|
+
timeout: number;
|
|
1385
|
+
} | {
|
|
1386
|
+
action: "waitForURL";
|
|
1387
|
+
url: string;
|
|
1388
|
+
timeout: number;
|
|
1389
|
+
} | {
|
|
1390
|
+
action: "waitForFunction";
|
|
1391
|
+
timeout: number;
|
|
1392
|
+
expression: string;
|
|
1393
|
+
polling: number | "raf";
|
|
1394
|
+
} | {
|
|
1395
|
+
action: "waitForResponse";
|
|
1396
|
+
url: string;
|
|
1397
|
+
timeout: number;
|
|
1398
|
+
status?: number | undefined;
|
|
1075
1399
|
})[];
|
|
1076
1400
|
captureDelay: number;
|
|
1077
1401
|
holdDuration: number;
|
|
@@ -1086,14 +1410,17 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
1086
1410
|
action: "click";
|
|
1087
1411
|
selector: string;
|
|
1088
1412
|
delay?: number | undefined;
|
|
1413
|
+
timeout?: number | undefined;
|
|
1089
1414
|
} | {
|
|
1090
1415
|
action: "type";
|
|
1091
1416
|
selector: string;
|
|
1092
1417
|
text: string;
|
|
1093
1418
|
delay?: number | undefined;
|
|
1419
|
+
timeout?: number | undefined;
|
|
1094
1420
|
} | {
|
|
1095
1421
|
action: "scroll";
|
|
1096
1422
|
selector?: string | undefined;
|
|
1423
|
+
timeout?: number | undefined;
|
|
1097
1424
|
y?: number | undefined;
|
|
1098
1425
|
x?: number | undefined;
|
|
1099
1426
|
smooth?: boolean | undefined;
|
|
@@ -1103,10 +1430,34 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
1103
1430
|
} | {
|
|
1104
1431
|
action: "hover";
|
|
1105
1432
|
selector: string;
|
|
1433
|
+
timeout?: number | undefined;
|
|
1106
1434
|
} | {
|
|
1107
1435
|
action: "screenshot";
|
|
1108
1436
|
name?: string | undefined;
|
|
1109
1437
|
fullPage?: boolean | undefined;
|
|
1438
|
+
} | {
|
|
1439
|
+
action: "waitForSelector";
|
|
1440
|
+
selector: string;
|
|
1441
|
+
timeout?: number | undefined;
|
|
1442
|
+
state?: "visible" | "attached" | "hidden" | undefined;
|
|
1443
|
+
} | {
|
|
1444
|
+
action: "waitForNavigation";
|
|
1445
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle" | undefined;
|
|
1446
|
+
timeout?: number | undefined;
|
|
1447
|
+
} | {
|
|
1448
|
+
action: "waitForURL";
|
|
1449
|
+
url: string;
|
|
1450
|
+
timeout?: number | undefined;
|
|
1451
|
+
} | {
|
|
1452
|
+
action: "waitForFunction";
|
|
1453
|
+
expression: string;
|
|
1454
|
+
timeout?: number | undefined;
|
|
1455
|
+
polling?: number | "raf" | undefined;
|
|
1456
|
+
} | {
|
|
1457
|
+
action: "waitForResponse";
|
|
1458
|
+
url: string;
|
|
1459
|
+
status?: number | undefined;
|
|
1460
|
+
timeout?: number | undefined;
|
|
1110
1461
|
})[];
|
|
1111
1462
|
name?: string | undefined;
|
|
1112
1463
|
captureDelay?: number | undefined;
|
|
@@ -1202,27 +1553,54 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
1202
1553
|
action: "click";
|
|
1203
1554
|
selector: string;
|
|
1204
1555
|
delay?: number | undefined;
|
|
1556
|
+
timeout?: number | undefined;
|
|
1205
1557
|
} | {
|
|
1206
1558
|
action: "type";
|
|
1207
1559
|
selector: string;
|
|
1208
1560
|
delay: number;
|
|
1209
1561
|
text: string;
|
|
1562
|
+
timeout?: number | undefined;
|
|
1210
1563
|
} | {
|
|
1211
1564
|
action: "scroll";
|
|
1212
1565
|
y: number;
|
|
1213
1566
|
x: number;
|
|
1214
1567
|
smooth: boolean;
|
|
1215
1568
|
selector?: string | undefined;
|
|
1569
|
+
timeout?: number | undefined;
|
|
1216
1570
|
} | {
|
|
1217
1571
|
action: "wait";
|
|
1218
1572
|
duration: number;
|
|
1219
1573
|
} | {
|
|
1220
1574
|
action: "hover";
|
|
1221
1575
|
selector: string;
|
|
1576
|
+
timeout?: number | undefined;
|
|
1222
1577
|
} | {
|
|
1223
1578
|
action: "screenshot";
|
|
1224
1579
|
fullPage: boolean;
|
|
1225
1580
|
name?: string | undefined;
|
|
1581
|
+
} | {
|
|
1582
|
+
action: "waitForSelector";
|
|
1583
|
+
selector: string;
|
|
1584
|
+
timeout: number;
|
|
1585
|
+
state: "visible" | "attached" | "hidden";
|
|
1586
|
+
} | {
|
|
1587
|
+
action: "waitForNavigation";
|
|
1588
|
+
waitUntil: "load" | "domcontentloaded" | "networkidle";
|
|
1589
|
+
timeout: number;
|
|
1590
|
+
} | {
|
|
1591
|
+
action: "waitForURL";
|
|
1592
|
+
url: string;
|
|
1593
|
+
timeout: number;
|
|
1594
|
+
} | {
|
|
1595
|
+
action: "waitForFunction";
|
|
1596
|
+
timeout: number;
|
|
1597
|
+
expression: string;
|
|
1598
|
+
polling: number | "raf";
|
|
1599
|
+
} | {
|
|
1600
|
+
action: "waitForResponse";
|
|
1601
|
+
url: string;
|
|
1602
|
+
timeout: number;
|
|
1603
|
+
status?: number | undefined;
|
|
1226
1604
|
})[];
|
|
1227
1605
|
captureDelay: number;
|
|
1228
1606
|
holdDuration: number;
|
|
@@ -1241,14 +1619,17 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
1241
1619
|
action: "click";
|
|
1242
1620
|
selector: string;
|
|
1243
1621
|
delay?: number | undefined;
|
|
1622
|
+
timeout?: number | undefined;
|
|
1244
1623
|
} | {
|
|
1245
1624
|
action: "type";
|
|
1246
1625
|
selector: string;
|
|
1247
1626
|
text: string;
|
|
1248
1627
|
delay?: number | undefined;
|
|
1628
|
+
timeout?: number | undefined;
|
|
1249
1629
|
} | {
|
|
1250
1630
|
action: "scroll";
|
|
1251
1631
|
selector?: string | undefined;
|
|
1632
|
+
timeout?: number | undefined;
|
|
1252
1633
|
y?: number | undefined;
|
|
1253
1634
|
x?: number | undefined;
|
|
1254
1635
|
smooth?: boolean | undefined;
|
|
@@ -1258,10 +1639,34 @@ declare const ScenarioSchema: z.ZodObject<{
|
|
|
1258
1639
|
} | {
|
|
1259
1640
|
action: "hover";
|
|
1260
1641
|
selector: string;
|
|
1642
|
+
timeout?: number | undefined;
|
|
1261
1643
|
} | {
|
|
1262
1644
|
action: "screenshot";
|
|
1263
1645
|
name?: string | undefined;
|
|
1264
1646
|
fullPage?: boolean | undefined;
|
|
1647
|
+
} | {
|
|
1648
|
+
action: "waitForSelector";
|
|
1649
|
+
selector: string;
|
|
1650
|
+
timeout?: number | undefined;
|
|
1651
|
+
state?: "visible" | "attached" | "hidden" | undefined;
|
|
1652
|
+
} | {
|
|
1653
|
+
action: "waitForNavigation";
|
|
1654
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle" | undefined;
|
|
1655
|
+
timeout?: number | undefined;
|
|
1656
|
+
} | {
|
|
1657
|
+
action: "waitForURL";
|
|
1658
|
+
url: string;
|
|
1659
|
+
timeout?: number | undefined;
|
|
1660
|
+
} | {
|
|
1661
|
+
action: "waitForFunction";
|
|
1662
|
+
expression: string;
|
|
1663
|
+
timeout?: number | undefined;
|
|
1664
|
+
polling?: number | "raf" | undefined;
|
|
1665
|
+
} | {
|
|
1666
|
+
action: "waitForResponse";
|
|
1667
|
+
url: string;
|
|
1668
|
+
status?: number | undefined;
|
|
1669
|
+
timeout?: number | undefined;
|
|
1265
1670
|
})[];
|
|
1266
1671
|
name?: string | undefined;
|
|
1267
1672
|
captureDelay?: number | undefined;
|
|
@@ -1403,6 +1808,7 @@ declare class ClipwiseRecorder {
|
|
|
1403
1808
|
private targetFps;
|
|
1404
1809
|
private cursorSpeed;
|
|
1405
1810
|
private firstContentTimestamp;
|
|
1811
|
+
private pendingResponsePromises;
|
|
1406
1812
|
/**
|
|
1407
1813
|
* Launch the browser and create a page with the scenario viewport.
|
|
1408
1814
|
*/
|
|
@@ -1425,6 +1831,13 @@ declare class ClipwiseRecorder {
|
|
|
1425
1831
|
* so CDP screencast keeps sending frames even on static pages.
|
|
1426
1832
|
*/
|
|
1427
1833
|
private waitWithRepaints;
|
|
1834
|
+
/**
|
|
1835
|
+
* Pre-register waitForResponse listeners at the start of each step.
|
|
1836
|
+
* This ensures the listener is active before any preceding action
|
|
1837
|
+
* (e.g. click) triggers the request, preventing race conditions
|
|
1838
|
+
* where the response arrives before the listener is set up.
|
|
1839
|
+
*/
|
|
1840
|
+
private preRegisterResponseListeners;
|
|
1428
1841
|
/**
|
|
1429
1842
|
* Execute a single action. CDP screencast captures frames continuously
|
|
1430
1843
|
* in the background while actions are performed.
|