@browserless.io/browserless 2.21.1 → 2.22.0-beta-2
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/build/routes/chrome/http/content.post.body.json +8 -8
- package/build/routes/chrome/http/pdf.post.body.json +8 -8
- package/build/routes/chrome/http/scrape.post.body.json +8 -8
- package/build/routes/chrome/http/screenshot.post.body.json +8 -8
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/pdf.post.body.json +8 -8
- package/build/routes/chromium/http/scrape.post.body.json +8 -8
- package/build/routes/chromium/http/screenshot.post.body.json +8 -8
- package/docker/sdk/Dockerfile +26 -2
- package/package.json +10 -10
- package/static/docs/swagger.json +9 -9
- package/static/docs/swagger.min.json +9 -9
- package/static/function/client.js +60 -9
- package/static/function/index.html +60 -9
|
@@ -438,14 +438,14 @@
|
|
|
438
438
|
"length": {
|
|
439
439
|
"type": "number"
|
|
440
440
|
},
|
|
441
|
-
"__@toStringTag@
|
|
441
|
+
"__@toStringTag@14427": {
|
|
442
442
|
"type": "string",
|
|
443
443
|
"const": "Uint8Array"
|
|
444
444
|
}
|
|
445
445
|
},
|
|
446
446
|
"required": [
|
|
447
447
|
"BYTES_PER_ELEMENT",
|
|
448
|
-
"__@toStringTag@
|
|
448
|
+
"__@toStringTag@14427",
|
|
449
449
|
"buffer",
|
|
450
450
|
"byteLength",
|
|
451
451
|
"byteOffset",
|
|
@@ -480,13 +480,13 @@
|
|
|
480
480
|
"byteLength": {
|
|
481
481
|
"type": "number"
|
|
482
482
|
},
|
|
483
|
-
"__@toStringTag@
|
|
483
|
+
"__@toStringTag@14427": {
|
|
484
484
|
"type": "string"
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
"additionalProperties": false,
|
|
488
488
|
"required": [
|
|
489
|
-
"__@toStringTag@
|
|
489
|
+
"__@toStringTag@14427",
|
|
490
490
|
"byteLength"
|
|
491
491
|
]
|
|
492
492
|
},
|
|
@@ -496,18 +496,18 @@
|
|
|
496
496
|
"byteLength": {
|
|
497
497
|
"type": "number"
|
|
498
498
|
},
|
|
499
|
-
"__@species@
|
|
499
|
+
"__@species@14465": {
|
|
500
500
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
501
501
|
},
|
|
502
|
-
"__@toStringTag@
|
|
502
|
+
"__@toStringTag@14427": {
|
|
503
503
|
"type": "string",
|
|
504
504
|
"const": "SharedArrayBuffer"
|
|
505
505
|
}
|
|
506
506
|
},
|
|
507
507
|
"additionalProperties": false,
|
|
508
508
|
"required": [
|
|
509
|
-
"__@species@
|
|
510
|
-
"__@toStringTag@
|
|
509
|
+
"__@species@14465",
|
|
510
|
+
"__@toStringTag@14427",
|
|
511
511
|
"byteLength"
|
|
512
512
|
]
|
|
513
513
|
},
|
|
@@ -583,14 +583,14 @@
|
|
|
583
583
|
"length": {
|
|
584
584
|
"type": "number"
|
|
585
585
|
},
|
|
586
|
-
"__@toStringTag@
|
|
586
|
+
"__@toStringTag@114724": {
|
|
587
587
|
"type": "string",
|
|
588
588
|
"const": "Uint8Array"
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
"required": [
|
|
592
592
|
"BYTES_PER_ELEMENT",
|
|
593
|
-
"__@toStringTag@
|
|
593
|
+
"__@toStringTag@114724",
|
|
594
594
|
"buffer",
|
|
595
595
|
"byteLength",
|
|
596
596
|
"byteOffset",
|
|
@@ -625,13 +625,13 @@
|
|
|
625
625
|
"byteLength": {
|
|
626
626
|
"type": "number"
|
|
627
627
|
},
|
|
628
|
-
"__@toStringTag@
|
|
628
|
+
"__@toStringTag@114724": {
|
|
629
629
|
"type": "string"
|
|
630
630
|
}
|
|
631
631
|
},
|
|
632
632
|
"additionalProperties": false,
|
|
633
633
|
"required": [
|
|
634
|
-
"__@toStringTag@
|
|
634
|
+
"__@toStringTag@114724",
|
|
635
635
|
"byteLength"
|
|
636
636
|
]
|
|
637
637
|
},
|
|
@@ -641,18 +641,18 @@
|
|
|
641
641
|
"byteLength": {
|
|
642
642
|
"type": "number"
|
|
643
643
|
},
|
|
644
|
-
"__@species@
|
|
644
|
+
"__@species@114762": {
|
|
645
645
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
646
646
|
},
|
|
647
|
-
"__@toStringTag@
|
|
647
|
+
"__@toStringTag@114724": {
|
|
648
648
|
"type": "string",
|
|
649
649
|
"const": "SharedArrayBuffer"
|
|
650
650
|
}
|
|
651
651
|
},
|
|
652
652
|
"additionalProperties": false,
|
|
653
653
|
"required": [
|
|
654
|
-
"__@species@
|
|
655
|
-
"__@toStringTag@
|
|
654
|
+
"__@species@114762",
|
|
655
|
+
"__@toStringTag@114724",
|
|
656
656
|
"byteLength"
|
|
657
657
|
]
|
|
658
658
|
},
|
|
@@ -485,14 +485,14 @@
|
|
|
485
485
|
"length": {
|
|
486
486
|
"type": "number"
|
|
487
487
|
},
|
|
488
|
-
"__@toStringTag@
|
|
488
|
+
"__@toStringTag@158089": {
|
|
489
489
|
"type": "string",
|
|
490
490
|
"const": "Uint8Array"
|
|
491
491
|
}
|
|
492
492
|
},
|
|
493
493
|
"required": [
|
|
494
494
|
"BYTES_PER_ELEMENT",
|
|
495
|
-
"__@toStringTag@
|
|
495
|
+
"__@toStringTag@158089",
|
|
496
496
|
"buffer",
|
|
497
497
|
"byteLength",
|
|
498
498
|
"byteOffset",
|
|
@@ -527,13 +527,13 @@
|
|
|
527
527
|
"byteLength": {
|
|
528
528
|
"type": "number"
|
|
529
529
|
},
|
|
530
|
-
"__@toStringTag@
|
|
530
|
+
"__@toStringTag@158089": {
|
|
531
531
|
"type": "string"
|
|
532
532
|
}
|
|
533
533
|
},
|
|
534
534
|
"additionalProperties": false,
|
|
535
535
|
"required": [
|
|
536
|
-
"__@toStringTag@
|
|
536
|
+
"__@toStringTag@158089",
|
|
537
537
|
"byteLength"
|
|
538
538
|
]
|
|
539
539
|
},
|
|
@@ -543,18 +543,18 @@
|
|
|
543
543
|
"byteLength": {
|
|
544
544
|
"type": "number"
|
|
545
545
|
},
|
|
546
|
-
"__@species@
|
|
546
|
+
"__@species@158127": {
|
|
547
547
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
548
548
|
},
|
|
549
|
-
"__@toStringTag@
|
|
549
|
+
"__@toStringTag@158089": {
|
|
550
550
|
"type": "string",
|
|
551
551
|
"const": "SharedArrayBuffer"
|
|
552
552
|
}
|
|
553
553
|
},
|
|
554
554
|
"additionalProperties": false,
|
|
555
555
|
"required": [
|
|
556
|
-
"__@species@
|
|
557
|
-
"__@toStringTag@
|
|
556
|
+
"__@species@158127",
|
|
557
|
+
"__@toStringTag@158089",
|
|
558
558
|
"byteLength"
|
|
559
559
|
]
|
|
560
560
|
},
|
|
@@ -528,14 +528,14 @@
|
|
|
528
528
|
"length": {
|
|
529
529
|
"type": "number"
|
|
530
530
|
},
|
|
531
|
-
"__@toStringTag@
|
|
531
|
+
"__@toStringTag@143571": {
|
|
532
532
|
"type": "string",
|
|
533
533
|
"const": "Uint8Array"
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
536
|
"required": [
|
|
537
537
|
"BYTES_PER_ELEMENT",
|
|
538
|
-
"__@toStringTag@
|
|
538
|
+
"__@toStringTag@143571",
|
|
539
539
|
"buffer",
|
|
540
540
|
"byteLength",
|
|
541
541
|
"byteOffset",
|
|
@@ -570,13 +570,13 @@
|
|
|
570
570
|
"byteLength": {
|
|
571
571
|
"type": "number"
|
|
572
572
|
},
|
|
573
|
-
"__@toStringTag@
|
|
573
|
+
"__@toStringTag@143571": {
|
|
574
574
|
"type": "string"
|
|
575
575
|
}
|
|
576
576
|
},
|
|
577
577
|
"additionalProperties": false,
|
|
578
578
|
"required": [
|
|
579
|
-
"__@toStringTag@
|
|
579
|
+
"__@toStringTag@143571",
|
|
580
580
|
"byteLength"
|
|
581
581
|
]
|
|
582
582
|
},
|
|
@@ -586,18 +586,18 @@
|
|
|
586
586
|
"byteLength": {
|
|
587
587
|
"type": "number"
|
|
588
588
|
},
|
|
589
|
-
"__@species@
|
|
589
|
+
"__@species@143609": {
|
|
590
590
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
591
591
|
},
|
|
592
|
-
"__@toStringTag@
|
|
592
|
+
"__@toStringTag@143571": {
|
|
593
593
|
"type": "string",
|
|
594
594
|
"const": "SharedArrayBuffer"
|
|
595
595
|
}
|
|
596
596
|
},
|
|
597
597
|
"additionalProperties": false,
|
|
598
598
|
"required": [
|
|
599
|
-
"__@species@
|
|
600
|
-
"__@toStringTag@
|
|
599
|
+
"__@species@143609",
|
|
600
|
+
"__@toStringTag@143571",
|
|
601
601
|
"byteLength"
|
|
602
602
|
]
|
|
603
603
|
},
|
|
@@ -438,14 +438,14 @@
|
|
|
438
438
|
"length": {
|
|
439
439
|
"type": "number"
|
|
440
440
|
},
|
|
441
|
-
"__@toStringTag@
|
|
441
|
+
"__@toStringTag@172660": {
|
|
442
442
|
"type": "string",
|
|
443
443
|
"const": "Uint8Array"
|
|
444
444
|
}
|
|
445
445
|
},
|
|
446
446
|
"required": [
|
|
447
447
|
"BYTES_PER_ELEMENT",
|
|
448
|
-
"__@toStringTag@
|
|
448
|
+
"__@toStringTag@172660",
|
|
449
449
|
"buffer",
|
|
450
450
|
"byteLength",
|
|
451
451
|
"byteOffset",
|
|
@@ -480,13 +480,13 @@
|
|
|
480
480
|
"byteLength": {
|
|
481
481
|
"type": "number"
|
|
482
482
|
},
|
|
483
|
-
"__@toStringTag@
|
|
483
|
+
"__@toStringTag@172660": {
|
|
484
484
|
"type": "string"
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
"additionalProperties": false,
|
|
488
488
|
"required": [
|
|
489
|
-
"__@toStringTag@
|
|
489
|
+
"__@toStringTag@172660",
|
|
490
490
|
"byteLength"
|
|
491
491
|
]
|
|
492
492
|
},
|
|
@@ -496,18 +496,18 @@
|
|
|
496
496
|
"byteLength": {
|
|
497
497
|
"type": "number"
|
|
498
498
|
},
|
|
499
|
-
"__@species@
|
|
499
|
+
"__@species@172698": {
|
|
500
500
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
501
501
|
},
|
|
502
|
-
"__@toStringTag@
|
|
502
|
+
"__@toStringTag@172660": {
|
|
503
503
|
"type": "string",
|
|
504
504
|
"const": "SharedArrayBuffer"
|
|
505
505
|
}
|
|
506
506
|
},
|
|
507
507
|
"additionalProperties": false,
|
|
508
508
|
"required": [
|
|
509
|
-
"__@species@
|
|
510
|
-
"__@toStringTag@
|
|
509
|
+
"__@species@172698",
|
|
510
|
+
"__@toStringTag@172660",
|
|
511
511
|
"byteLength"
|
|
512
512
|
]
|
|
513
513
|
},
|
|
@@ -583,14 +583,14 @@
|
|
|
583
583
|
"length": {
|
|
584
584
|
"type": "number"
|
|
585
585
|
},
|
|
586
|
-
"__@toStringTag@
|
|
586
|
+
"__@toStringTag@258628": {
|
|
587
587
|
"type": "string",
|
|
588
588
|
"const": "Uint8Array"
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
"required": [
|
|
592
592
|
"BYTES_PER_ELEMENT",
|
|
593
|
-
"__@toStringTag@
|
|
593
|
+
"__@toStringTag@258628",
|
|
594
594
|
"buffer",
|
|
595
595
|
"byteLength",
|
|
596
596
|
"byteOffset",
|
|
@@ -625,13 +625,13 @@
|
|
|
625
625
|
"byteLength": {
|
|
626
626
|
"type": "number"
|
|
627
627
|
},
|
|
628
|
-
"__@toStringTag@
|
|
628
|
+
"__@toStringTag@258628": {
|
|
629
629
|
"type": "string"
|
|
630
630
|
}
|
|
631
631
|
},
|
|
632
632
|
"additionalProperties": false,
|
|
633
633
|
"required": [
|
|
634
|
-
"__@toStringTag@
|
|
634
|
+
"__@toStringTag@258628",
|
|
635
635
|
"byteLength"
|
|
636
636
|
]
|
|
637
637
|
},
|
|
@@ -641,18 +641,18 @@
|
|
|
641
641
|
"byteLength": {
|
|
642
642
|
"type": "number"
|
|
643
643
|
},
|
|
644
|
-
"__@species@
|
|
644
|
+
"__@species@258666": {
|
|
645
645
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
646
646
|
},
|
|
647
|
-
"__@toStringTag@
|
|
647
|
+
"__@toStringTag@258628": {
|
|
648
648
|
"type": "string",
|
|
649
649
|
"const": "SharedArrayBuffer"
|
|
650
650
|
}
|
|
651
651
|
},
|
|
652
652
|
"additionalProperties": false,
|
|
653
653
|
"required": [
|
|
654
|
-
"__@species@
|
|
655
|
-
"__@toStringTag@
|
|
654
|
+
"__@species@258666",
|
|
655
|
+
"__@toStringTag@258628",
|
|
656
656
|
"byteLength"
|
|
657
657
|
]
|
|
658
658
|
},
|
|
@@ -485,14 +485,14 @@
|
|
|
485
485
|
"length": {
|
|
486
486
|
"type": "number"
|
|
487
487
|
},
|
|
488
|
-
"__@toStringTag@
|
|
488
|
+
"__@toStringTag@387827": {
|
|
489
489
|
"type": "string",
|
|
490
490
|
"const": "Uint8Array"
|
|
491
491
|
}
|
|
492
492
|
},
|
|
493
493
|
"required": [
|
|
494
494
|
"BYTES_PER_ELEMENT",
|
|
495
|
-
"__@toStringTag@
|
|
495
|
+
"__@toStringTag@387827",
|
|
496
496
|
"buffer",
|
|
497
497
|
"byteLength",
|
|
498
498
|
"byteOffset",
|
|
@@ -527,13 +527,13 @@
|
|
|
527
527
|
"byteLength": {
|
|
528
528
|
"type": "number"
|
|
529
529
|
},
|
|
530
|
-
"__@toStringTag@
|
|
530
|
+
"__@toStringTag@387827": {
|
|
531
531
|
"type": "string"
|
|
532
532
|
}
|
|
533
533
|
},
|
|
534
534
|
"additionalProperties": false,
|
|
535
535
|
"required": [
|
|
536
|
-
"__@toStringTag@
|
|
536
|
+
"__@toStringTag@387827",
|
|
537
537
|
"byteLength"
|
|
538
538
|
]
|
|
539
539
|
},
|
|
@@ -543,18 +543,18 @@
|
|
|
543
543
|
"byteLength": {
|
|
544
544
|
"type": "number"
|
|
545
545
|
},
|
|
546
|
-
"__@species@
|
|
546
|
+
"__@species@387865": {
|
|
547
547
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
548
548
|
},
|
|
549
|
-
"__@toStringTag@
|
|
549
|
+
"__@toStringTag@387827": {
|
|
550
550
|
"type": "string",
|
|
551
551
|
"const": "SharedArrayBuffer"
|
|
552
552
|
}
|
|
553
553
|
},
|
|
554
554
|
"additionalProperties": false,
|
|
555
555
|
"required": [
|
|
556
|
-
"__@species@
|
|
557
|
-
"__@toStringTag@
|
|
556
|
+
"__@species@387865",
|
|
557
|
+
"__@toStringTag@387827",
|
|
558
558
|
"byteLength"
|
|
559
559
|
]
|
|
560
560
|
},
|
|
@@ -528,14 +528,14 @@
|
|
|
528
528
|
"length": {
|
|
529
529
|
"type": "number"
|
|
530
530
|
},
|
|
531
|
-
"__@toStringTag@
|
|
531
|
+
"__@toStringTag@301731": {
|
|
532
532
|
"type": "string",
|
|
533
533
|
"const": "Uint8Array"
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
536
|
"required": [
|
|
537
537
|
"BYTES_PER_ELEMENT",
|
|
538
|
-
"__@toStringTag@
|
|
538
|
+
"__@toStringTag@301731",
|
|
539
539
|
"buffer",
|
|
540
540
|
"byteLength",
|
|
541
541
|
"byteOffset",
|
|
@@ -570,13 +570,13 @@
|
|
|
570
570
|
"byteLength": {
|
|
571
571
|
"type": "number"
|
|
572
572
|
},
|
|
573
|
-
"__@toStringTag@
|
|
573
|
+
"__@toStringTag@301731": {
|
|
574
574
|
"type": "string"
|
|
575
575
|
}
|
|
576
576
|
},
|
|
577
577
|
"additionalProperties": false,
|
|
578
578
|
"required": [
|
|
579
|
-
"__@toStringTag@
|
|
579
|
+
"__@toStringTag@301731",
|
|
580
580
|
"byteLength"
|
|
581
581
|
]
|
|
582
582
|
},
|
|
@@ -586,18 +586,18 @@
|
|
|
586
586
|
"byteLength": {
|
|
587
587
|
"type": "number"
|
|
588
588
|
},
|
|
589
|
-
"__@species@
|
|
589
|
+
"__@species@301769": {
|
|
590
590
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
591
591
|
},
|
|
592
|
-
"__@toStringTag@
|
|
592
|
+
"__@toStringTag@301731": {
|
|
593
593
|
"type": "string",
|
|
594
594
|
"const": "SharedArrayBuffer"
|
|
595
595
|
}
|
|
596
596
|
},
|
|
597
597
|
"additionalProperties": false,
|
|
598
598
|
"required": [
|
|
599
|
-
"__@species@
|
|
600
|
-
"__@toStringTag@
|
|
599
|
+
"__@species@301769",
|
|
600
|
+
"__@toStringTag@301731",
|
|
601
601
|
"byteLength"
|
|
602
602
|
]
|
|
603
603
|
},
|
package/docker/sdk/Dockerfile
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
ARG FROM=ghcr.io/browserless/multi:latest
|
|
2
|
-
ARG TARGETPLATFORM
|
|
3
|
-
|
|
4
2
|
FROM ${FROM}
|
|
5
3
|
|
|
4
|
+
ARG FROM
|
|
5
|
+
ARG TARGETPLATFORM
|
|
6
|
+
|
|
6
7
|
# Change to root for install
|
|
7
8
|
USER root
|
|
8
9
|
|
|
9
10
|
# Needed for determining if Chrome is eligible for install
|
|
10
11
|
ENV TARGETPLATFORM=${TARGETPLATFORM}
|
|
12
|
+
ENV FROM=${FROM}
|
|
11
13
|
ENV BLESS_INSTALL_NODE_MODULES=${APP_DIR}/node_modules/@browserless.io/browserless
|
|
12
14
|
ENV BLESS_ROUTES=${BLESS_INSTALL_NODE_MODULES}/build/routes
|
|
13
15
|
|
|
@@ -35,6 +37,28 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
|
|
35
37
|
rm -rf $BLESS_ROUTES/chrome;\
|
|
36
38
|
fi
|
|
37
39
|
|
|
40
|
+
# Delete unsupported routes
|
|
41
|
+
RUN if [ -z "${FROM##*chrome*}" ]; then \
|
|
42
|
+
rm -rf $BLESS_ROUTES/chromium;\
|
|
43
|
+
rm -rf $BLESS_ROUTES/firefox;\
|
|
44
|
+
rm -rf $BLESS_ROUTES/webkit;\
|
|
45
|
+
fi
|
|
46
|
+
RUN if [ -z "${FROM##*chromium*}" ]; then \
|
|
47
|
+
rm -rf $BLESS_ROUTES/chrome;\
|
|
48
|
+
rm -rf $BLESS_ROUTES/firefox;\
|
|
49
|
+
rm -rf $BLESS_ROUTES/webkit;\
|
|
50
|
+
fi
|
|
51
|
+
RUN if [ -z "${FROM##*firefox*}" ]; then \
|
|
52
|
+
rm -rf $BLESS_ROUTES/chrome;\
|
|
53
|
+
rm -rf $BLESS_ROUTES/chromium;\
|
|
54
|
+
rm -rf $BLESS_ROUTES/webkit;\
|
|
55
|
+
fi
|
|
56
|
+
RUN if [ -z "${FROM##*webkit*}" ]; then \
|
|
57
|
+
rm -rf $BLESS_ROUTES/chrome;\
|
|
58
|
+
rm -rf $BLESS_ROUTES/chromium;\
|
|
59
|
+
rm -rf $BLESS_ROUTES/firefox;\
|
|
60
|
+
fi
|
|
61
|
+
|
|
38
62
|
# Back to non-privileged user
|
|
39
63
|
USER blessuser
|
|
40
64
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browserless.io/browserless",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0-beta-2",
|
|
4
4
|
"license": "SSPL",
|
|
5
5
|
"description": "The browserless platform",
|
|
6
6
|
"author": "browserless.io",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"debug": "^4.3.7",
|
|
52
|
-
"del": "^
|
|
52
|
+
"del": "^8.0.0",
|
|
53
53
|
"enjoi": "^9.0.1",
|
|
54
54
|
"file-type": "^19.5.0",
|
|
55
55
|
"get-port": "^7.1.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"playwright-1.44": "npm:playwright-core@1.44.1",
|
|
62
62
|
"playwright-1.45": "npm:playwright-core@1.45.3",
|
|
63
63
|
"playwright-1.46": "npm:playwright-core@1.46.1",
|
|
64
|
-
"playwright-core": "^1.
|
|
65
|
-
"puppeteer-core": "^23.
|
|
64
|
+
"playwright-core": "^1.48.0",
|
|
65
|
+
"puppeteer-core": "^23.5.1",
|
|
66
66
|
"puppeteer-extra": "^3.3.6",
|
|
67
67
|
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
68
68
|
"queue": "^7.0.0",
|
|
@@ -75,18 +75,18 @@
|
|
|
75
75
|
"@types/gradient-string": "^1.1.6",
|
|
76
76
|
"@types/http-proxy": "^1.17.15",
|
|
77
77
|
"@types/micromatch": "^4.0.9",
|
|
78
|
-
"@types/mocha": "^10.0.
|
|
79
|
-
"@types/node": "^22.7.
|
|
78
|
+
"@types/mocha": "^10.0.9",
|
|
79
|
+
"@types/node": "^22.7.5",
|
|
80
80
|
"@types/sinon": "^17.0.3",
|
|
81
|
-
"@typescript-eslint/eslint-plugin": "^8.8.
|
|
82
|
-
"@typescript-eslint/parser": "^8.8.
|
|
81
|
+
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
|
82
|
+
"@typescript-eslint/parser": "^8.8.1",
|
|
83
83
|
"assert": "^2.0.0",
|
|
84
84
|
"chai": "^5.1.1",
|
|
85
85
|
"cross-env": "^7.0.3",
|
|
86
86
|
"env-cmd": "^10.1.0",
|
|
87
87
|
"esbuild": "^0.24.0",
|
|
88
88
|
"esbuild-plugin-polyfill-node": "^0.3.0",
|
|
89
|
-
"eslint": "^9.
|
|
89
|
+
"eslint": "^9.12.0",
|
|
90
90
|
"extract-zip": "^2.0.1",
|
|
91
91
|
"gunzip-maybe": "^1.4.2",
|
|
92
92
|
"marked": "^14.1.2",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"prettier": "^3.3.3",
|
|
96
96
|
"sinon": "^19.0.2",
|
|
97
97
|
"ts-node": "^10.9.2",
|
|
98
|
-
"typescript": "^5.6.
|
|
98
|
+
"typescript": "^5.6.3",
|
|
99
99
|
"typescript-json-schema": "^0.65.1"
|
|
100
100
|
},
|
|
101
101
|
"playwrightVersions": {
|
package/static/docs/swagger.json
CHANGED
|
@@ -255,14 +255,14 @@
|
|
|
255
255
|
"length": {
|
|
256
256
|
"type": "number"
|
|
257
257
|
},
|
|
258
|
-
"__@toStringTag@
|
|
258
|
+
"__@toStringTag@14427": {
|
|
259
259
|
"type": "string",
|
|
260
260
|
"const": "Uint8Array"
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
263
|
"required": [
|
|
264
264
|
"BYTES_PER_ELEMENT",
|
|
265
|
-
"__@toStringTag@
|
|
265
|
+
"__@toStringTag@14427",
|
|
266
266
|
"buffer",
|
|
267
267
|
"byteLength",
|
|
268
268
|
"byteOffset",
|
|
@@ -297,13 +297,13 @@
|
|
|
297
297
|
"byteLength": {
|
|
298
298
|
"type": "number"
|
|
299
299
|
},
|
|
300
|
-
"__@toStringTag@
|
|
300
|
+
"__@toStringTag@14427": {
|
|
301
301
|
"type": "string"
|
|
302
302
|
}
|
|
303
303
|
},
|
|
304
304
|
"additionalProperties": false,
|
|
305
305
|
"required": [
|
|
306
|
-
"__@toStringTag@
|
|
306
|
+
"__@toStringTag@14427",
|
|
307
307
|
"byteLength"
|
|
308
308
|
]
|
|
309
309
|
},
|
|
@@ -313,18 +313,18 @@
|
|
|
313
313
|
"byteLength": {
|
|
314
314
|
"type": "number"
|
|
315
315
|
},
|
|
316
|
-
"__@species@
|
|
316
|
+
"__@species@14465": {
|
|
317
317
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
318
318
|
},
|
|
319
|
-
"__@toStringTag@
|
|
319
|
+
"__@toStringTag@14427": {
|
|
320
320
|
"type": "string",
|
|
321
321
|
"const": "SharedArrayBuffer"
|
|
322
322
|
}
|
|
323
323
|
},
|
|
324
324
|
"additionalProperties": false,
|
|
325
325
|
"required": [
|
|
326
|
-
"__@species@
|
|
327
|
-
"__@toStringTag@
|
|
326
|
+
"__@species@14465",
|
|
327
|
+
"__@toStringTag@14427",
|
|
328
328
|
"byteLength"
|
|
329
329
|
]
|
|
330
330
|
},
|
|
@@ -969,7 +969,7 @@
|
|
|
969
969
|
},
|
|
970
970
|
"info": {
|
|
971
971
|
"title": "Browserless",
|
|
972
|
-
"version": "2.
|
|
972
|
+
"version": "2.22.0-beta-2",
|
|
973
973
|
"x-logo": {
|
|
974
974
|
"altText": "browserless logo",
|
|
975
975
|
"url": "./docs/browserless-logo-inline.svg"
|
|
@@ -255,14 +255,14 @@
|
|
|
255
255
|
"length": {
|
|
256
256
|
"type": "number"
|
|
257
257
|
},
|
|
258
|
-
"__@toStringTag@
|
|
258
|
+
"__@toStringTag@14427": {
|
|
259
259
|
"type": "string",
|
|
260
260
|
"const": "Uint8Array"
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
263
|
"required": [
|
|
264
264
|
"BYTES_PER_ELEMENT",
|
|
265
|
-
"__@toStringTag@
|
|
265
|
+
"__@toStringTag@14427",
|
|
266
266
|
"buffer",
|
|
267
267
|
"byteLength",
|
|
268
268
|
"byteOffset",
|
|
@@ -297,13 +297,13 @@
|
|
|
297
297
|
"byteLength": {
|
|
298
298
|
"type": "number"
|
|
299
299
|
},
|
|
300
|
-
"__@toStringTag@
|
|
300
|
+
"__@toStringTag@14427": {
|
|
301
301
|
"type": "string"
|
|
302
302
|
}
|
|
303
303
|
},
|
|
304
304
|
"additionalProperties": false,
|
|
305
305
|
"required": [
|
|
306
|
-
"__@toStringTag@
|
|
306
|
+
"__@toStringTag@14427",
|
|
307
307
|
"byteLength"
|
|
308
308
|
]
|
|
309
309
|
},
|
|
@@ -313,18 +313,18 @@
|
|
|
313
313
|
"byteLength": {
|
|
314
314
|
"type": "number"
|
|
315
315
|
},
|
|
316
|
-
"__@species@
|
|
316
|
+
"__@species@14465": {
|
|
317
317
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
318
318
|
},
|
|
319
|
-
"__@toStringTag@
|
|
319
|
+
"__@toStringTag@14427": {
|
|
320
320
|
"type": "string",
|
|
321
321
|
"const": "SharedArrayBuffer"
|
|
322
322
|
}
|
|
323
323
|
},
|
|
324
324
|
"additionalProperties": false,
|
|
325
325
|
"required": [
|
|
326
|
-
"__@species@
|
|
327
|
-
"__@toStringTag@
|
|
326
|
+
"__@species@14465",
|
|
327
|
+
"__@toStringTag@14427",
|
|
328
328
|
"byteLength"
|
|
329
329
|
]
|
|
330
330
|
},
|
|
@@ -969,7 +969,7 @@
|
|
|
969
969
|
},
|
|
970
970
|
"info": {
|
|
971
971
|
"title": "Browserless",
|
|
972
|
-
"version": "2.
|
|
972
|
+
"version": "2.22.0-beta-2",
|
|
973
973
|
"x-logo": {
|
|
974
974
|
"altText": "browserless logo",
|
|
975
975
|
"url": "./docs/browserless-logo-inline.svg"
|
|
@@ -4382,7 +4382,7 @@
|
|
|
4382
4382
|
// node_modules/puppeteer-core/lib/esm/puppeteer/generated/version.js
|
|
4383
4383
|
init_dirname();
|
|
4384
4384
|
init_buffer2();
|
|
4385
|
-
var packageVersion = "23.
|
|
4385
|
+
var packageVersion = "23.5.1";
|
|
4386
4386
|
|
|
4387
4387
|
// node_modules/puppeteer-core/lib/esm/puppeteer/util/assert.js
|
|
4388
4388
|
init_dirname();
|
|
@@ -10119,7 +10119,7 @@
|
|
|
10119
10119
|
return await frame.isolatedRealm().adoptHandle(elementOrFrame);
|
|
10120
10120
|
})(), false);
|
|
10121
10121
|
const { visible = false, hidden = false, timeout: timeout2, signal } = options;
|
|
10122
|
-
const polling =
|
|
10122
|
+
const polling = visible || hidden ? "raf" : options.polling;
|
|
10123
10123
|
try {
|
|
10124
10124
|
const env_4 = { stack: [], error: void 0, hasError: false };
|
|
10125
10125
|
try {
|
|
@@ -14480,8 +14480,9 @@ ${sourceUrlComment}
|
|
|
14480
14480
|
* Waits for the next context to be set on the isolated world.
|
|
14481
14481
|
*/
|
|
14482
14482
|
async #waitForExecutionContext() {
|
|
14483
|
+
const error = new Error("Execution context was destroyed");
|
|
14483
14484
|
const result = await firstValueFrom(fromEmitterEvent(this.#emitter, "context").pipe(raceWith(fromEmitterEvent(this.#emitter, "disposed").pipe(map(() => {
|
|
14484
|
-
throw
|
|
14485
|
+
throw error;
|
|
14485
14486
|
})), timeout(this.timeoutSettings.timeout()))));
|
|
14486
14487
|
return result;
|
|
14487
14488
|
}
|
|
@@ -15008,6 +15009,20 @@ ${sourceUrlComment}
|
|
|
15008
15009
|
exposeFunction() {
|
|
15009
15010
|
throw new UnsupportedOperation();
|
|
15010
15011
|
}
|
|
15012
|
+
async frameElement() {
|
|
15013
|
+
const isFirefox = this.page().target()._targetManager() instanceof FirefoxTargetManager;
|
|
15014
|
+
if (isFirefox) {
|
|
15015
|
+
return await super.frameElement();
|
|
15016
|
+
}
|
|
15017
|
+
const parent = this.parentFrame();
|
|
15018
|
+
if (!parent) {
|
|
15019
|
+
return null;
|
|
15020
|
+
}
|
|
15021
|
+
const { backendNodeId } = await parent.client.send("DOM.getFrameOwner", {
|
|
15022
|
+
frameId: this._id
|
|
15023
|
+
});
|
|
15024
|
+
return await parent.mainRealm().adoptBackendNode(backendNodeId);
|
|
15025
|
+
}
|
|
15011
15026
|
};
|
|
15012
15027
|
})();
|
|
15013
15028
|
|
|
@@ -15221,6 +15236,9 @@ ${sourceUrlComment}
|
|
|
15221
15236
|
return await this._continue(this.interception.requestOverrides);
|
|
15222
15237
|
}
|
|
15223
15238
|
}
|
|
15239
|
+
#canBeIntercepted() {
|
|
15240
|
+
return !this.url().startsWith("data:") && !this._fromMemoryCache;
|
|
15241
|
+
}
|
|
15224
15242
|
/**
|
|
15225
15243
|
* Continues request with optional request overrides.
|
|
15226
15244
|
*
|
|
@@ -15250,7 +15268,7 @@ ${sourceUrlComment}
|
|
|
15250
15268
|
* Exception is immediately thrown if the request interception is not enabled.
|
|
15251
15269
|
*/
|
|
15252
15270
|
async continue(overrides = {}, priority) {
|
|
15253
|
-
if (this
|
|
15271
|
+
if (!this.#canBeIntercepted()) {
|
|
15254
15272
|
return;
|
|
15255
15273
|
}
|
|
15256
15274
|
assert(this.interception.enabled, "Request Interception is not enabled!");
|
|
@@ -15307,7 +15325,7 @@ ${sourceUrlComment}
|
|
|
15307
15325
|
* Exception is immediately thrown if the request interception is not enabled.
|
|
15308
15326
|
*/
|
|
15309
15327
|
async respond(response, priority) {
|
|
15310
|
-
if (this
|
|
15328
|
+
if (!this.#canBeIntercepted()) {
|
|
15311
15329
|
return;
|
|
15312
15330
|
}
|
|
15313
15331
|
assert(this.interception.enabled, "Request Interception is not enabled!");
|
|
@@ -15345,7 +15363,7 @@ ${sourceUrlComment}
|
|
|
15345
15363
|
* throw an exception immediately.
|
|
15346
15364
|
*/
|
|
15347
15365
|
async abort(errorCode = "failed", priority) {
|
|
15348
|
-
if (this
|
|
15366
|
+
if (!this.#canBeIntercepted()) {
|
|
15349
15367
|
return;
|
|
15350
15368
|
}
|
|
15351
15369
|
const errorReason = errorReasons[errorCode];
|
|
@@ -15984,6 +16002,29 @@ ${sourceUrlComment}
|
|
|
15984
16002
|
forgetQueuedEventGroup(networkRequestId) {
|
|
15985
16003
|
this.#queuedEventGroupMap.delete(networkRequestId);
|
|
15986
16004
|
}
|
|
16005
|
+
printState() {
|
|
16006
|
+
function replacer(_key, value) {
|
|
16007
|
+
if (value instanceof Map) {
|
|
16008
|
+
return {
|
|
16009
|
+
dataType: "Map",
|
|
16010
|
+
value: Array.from(value.entries())
|
|
16011
|
+
// or with spread: value: [...value]
|
|
16012
|
+
};
|
|
16013
|
+
} else if (value instanceof CdpHTTPRequest) {
|
|
16014
|
+
return {
|
|
16015
|
+
dataType: "CdpHTTPRequest",
|
|
16016
|
+
value: `${value.id}: ${value.url()}`
|
|
16017
|
+
};
|
|
16018
|
+
}
|
|
16019
|
+
{
|
|
16020
|
+
return value;
|
|
16021
|
+
}
|
|
16022
|
+
}
|
|
16023
|
+
console.log("httpRequestsMap", JSON.stringify(this.#httpRequestsMap, replacer, 2));
|
|
16024
|
+
console.log("requestWillBeSentMap", JSON.stringify(this.#requestWillBeSentMap, replacer, 2));
|
|
16025
|
+
console.log("requestWillBeSentMap", JSON.stringify(this.#responseReceivedExtraInfoMap, replacer, 2));
|
|
16026
|
+
console.log("requestWillBeSentMap", JSON.stringify(this.#requestPausedMap, replacer, 2));
|
|
16027
|
+
}
|
|
15987
16028
|
};
|
|
15988
16029
|
|
|
15989
16030
|
// node_modules/puppeteer-core/lib/esm/puppeteer/cdp/NetworkManager.js
|
|
@@ -16246,7 +16287,7 @@ ${sourceUrlComment}
|
|
|
16246
16287
|
this.emit(NetworkManagerEvent.Request, request);
|
|
16247
16288
|
void request.finalizeInterceptions();
|
|
16248
16289
|
}
|
|
16249
|
-
#onRequest(client, event, fetchRequestId) {
|
|
16290
|
+
#onRequest(client, event, fetchRequestId, fromMemoryCache = false) {
|
|
16250
16291
|
let redirectChain = [];
|
|
16251
16292
|
if (event.redirectResponse) {
|
|
16252
16293
|
let redirectResponseExtraInfo = null;
|
|
@@ -16268,15 +16309,25 @@ ${sourceUrlComment}
|
|
|
16268
16309
|
}
|
|
16269
16310
|
const frame = event.frameId ? this.#frameManager.frame(event.frameId) : null;
|
|
16270
16311
|
const request = new CdpHTTPRequest(client, frame, fetchRequestId, this.#userRequestInterceptionEnabled, event, redirectChain);
|
|
16312
|
+
request._fromMemoryCache = fromMemoryCache;
|
|
16271
16313
|
this.#networkEventManager.storeRequest(event.requestId, request);
|
|
16272
16314
|
this.emit(NetworkManagerEvent.Request, request);
|
|
16273
16315
|
void request.finalizeInterceptions();
|
|
16274
16316
|
}
|
|
16275
|
-
#onRequestServedFromCache(
|
|
16276
|
-
const
|
|
16317
|
+
#onRequestServedFromCache(client, event) {
|
|
16318
|
+
const requestWillBeSentEvent = this.#networkEventManager.getRequestWillBeSent(event.requestId);
|
|
16319
|
+
let request = this.#networkEventManager.getRequest(event.requestId);
|
|
16277
16320
|
if (request) {
|
|
16278
16321
|
request._fromMemoryCache = true;
|
|
16279
16322
|
}
|
|
16323
|
+
if (!request && requestWillBeSentEvent) {
|
|
16324
|
+
this.#onRequest(client, requestWillBeSentEvent, void 0, true);
|
|
16325
|
+
request = this.#networkEventManager.getRequest(event.requestId);
|
|
16326
|
+
}
|
|
16327
|
+
if (!request) {
|
|
16328
|
+
debugError(new Error(`Request ${event.requestId} was served from cache but we could not find the corresponding request object`));
|
|
16329
|
+
return;
|
|
16330
|
+
}
|
|
16280
16331
|
this.emit(NetworkManagerEvent.RequestServedFromCache, request);
|
|
16281
16332
|
}
|
|
16282
16333
|
#handleRequestRedirect(client, request, responsePayload, extraInfo) {
|
|
@@ -4390,7 +4390,7 @@
|
|
|
4390
4390
|
// node_modules/puppeteer-core/lib/esm/puppeteer/generated/version.js
|
|
4391
4391
|
init_dirname();
|
|
4392
4392
|
init_buffer2();
|
|
4393
|
-
var packageVersion = "23.
|
|
4393
|
+
var packageVersion = "23.5.1";
|
|
4394
4394
|
|
|
4395
4395
|
// node_modules/puppeteer-core/lib/esm/puppeteer/util/assert.js
|
|
4396
4396
|
init_dirname();
|
|
@@ -10127,7 +10127,7 @@
|
|
|
10127
10127
|
return await frame.isolatedRealm().adoptHandle(elementOrFrame);
|
|
10128
10128
|
})(), false);
|
|
10129
10129
|
const { visible = false, hidden = false, timeout: timeout2, signal } = options;
|
|
10130
|
-
const polling =
|
|
10130
|
+
const polling = visible || hidden ? "raf" : options.polling;
|
|
10131
10131
|
try {
|
|
10132
10132
|
const env_4 = { stack: [], error: void 0, hasError: false };
|
|
10133
10133
|
try {
|
|
@@ -14488,8 +14488,9 @@ ${sourceUrlComment}
|
|
|
14488
14488
|
* Waits for the next context to be set on the isolated world.
|
|
14489
14489
|
*/
|
|
14490
14490
|
async #waitForExecutionContext() {
|
|
14491
|
+
const error = new Error("Execution context was destroyed");
|
|
14491
14492
|
const result = await firstValueFrom(fromEmitterEvent(this.#emitter, "context").pipe(raceWith(fromEmitterEvent(this.#emitter, "disposed").pipe(map(() => {
|
|
14492
|
-
throw
|
|
14493
|
+
throw error;
|
|
14493
14494
|
})), timeout(this.timeoutSettings.timeout()))));
|
|
14494
14495
|
return result;
|
|
14495
14496
|
}
|
|
@@ -15016,6 +15017,20 @@ ${sourceUrlComment}
|
|
|
15016
15017
|
exposeFunction() {
|
|
15017
15018
|
throw new UnsupportedOperation();
|
|
15018
15019
|
}
|
|
15020
|
+
async frameElement() {
|
|
15021
|
+
const isFirefox = this.page().target()._targetManager() instanceof FirefoxTargetManager;
|
|
15022
|
+
if (isFirefox) {
|
|
15023
|
+
return await super.frameElement();
|
|
15024
|
+
}
|
|
15025
|
+
const parent = this.parentFrame();
|
|
15026
|
+
if (!parent) {
|
|
15027
|
+
return null;
|
|
15028
|
+
}
|
|
15029
|
+
const { backendNodeId } = await parent.client.send("DOM.getFrameOwner", {
|
|
15030
|
+
frameId: this._id
|
|
15031
|
+
});
|
|
15032
|
+
return await parent.mainRealm().adoptBackendNode(backendNodeId);
|
|
15033
|
+
}
|
|
15019
15034
|
};
|
|
15020
15035
|
})();
|
|
15021
15036
|
|
|
@@ -15229,6 +15244,9 @@ ${sourceUrlComment}
|
|
|
15229
15244
|
return await this._continue(this.interception.requestOverrides);
|
|
15230
15245
|
}
|
|
15231
15246
|
}
|
|
15247
|
+
#canBeIntercepted() {
|
|
15248
|
+
return !this.url().startsWith("data:") && !this._fromMemoryCache;
|
|
15249
|
+
}
|
|
15232
15250
|
/**
|
|
15233
15251
|
* Continues request with optional request overrides.
|
|
15234
15252
|
*
|
|
@@ -15258,7 +15276,7 @@ ${sourceUrlComment}
|
|
|
15258
15276
|
* Exception is immediately thrown if the request interception is not enabled.
|
|
15259
15277
|
*/
|
|
15260
15278
|
async continue(overrides = {}, priority) {
|
|
15261
|
-
if (this
|
|
15279
|
+
if (!this.#canBeIntercepted()) {
|
|
15262
15280
|
return;
|
|
15263
15281
|
}
|
|
15264
15282
|
assert(this.interception.enabled, "Request Interception is not enabled!");
|
|
@@ -15315,7 +15333,7 @@ ${sourceUrlComment}
|
|
|
15315
15333
|
* Exception is immediately thrown if the request interception is not enabled.
|
|
15316
15334
|
*/
|
|
15317
15335
|
async respond(response, priority) {
|
|
15318
|
-
if (this
|
|
15336
|
+
if (!this.#canBeIntercepted()) {
|
|
15319
15337
|
return;
|
|
15320
15338
|
}
|
|
15321
15339
|
assert(this.interception.enabled, "Request Interception is not enabled!");
|
|
@@ -15353,7 +15371,7 @@ ${sourceUrlComment}
|
|
|
15353
15371
|
* throw an exception immediately.
|
|
15354
15372
|
*/
|
|
15355
15373
|
async abort(errorCode = "failed", priority) {
|
|
15356
|
-
if (this
|
|
15374
|
+
if (!this.#canBeIntercepted()) {
|
|
15357
15375
|
return;
|
|
15358
15376
|
}
|
|
15359
15377
|
const errorReason = errorReasons[errorCode];
|
|
@@ -15992,6 +16010,29 @@ ${sourceUrlComment}
|
|
|
15992
16010
|
forgetQueuedEventGroup(networkRequestId) {
|
|
15993
16011
|
this.#queuedEventGroupMap.delete(networkRequestId);
|
|
15994
16012
|
}
|
|
16013
|
+
printState() {
|
|
16014
|
+
function replacer(_key, value) {
|
|
16015
|
+
if (value instanceof Map) {
|
|
16016
|
+
return {
|
|
16017
|
+
dataType: "Map",
|
|
16018
|
+
value: Array.from(value.entries())
|
|
16019
|
+
// or with spread: value: [...value]
|
|
16020
|
+
};
|
|
16021
|
+
} else if (value instanceof CdpHTTPRequest) {
|
|
16022
|
+
return {
|
|
16023
|
+
dataType: "CdpHTTPRequest",
|
|
16024
|
+
value: `${value.id}: ${value.url()}`
|
|
16025
|
+
};
|
|
16026
|
+
}
|
|
16027
|
+
{
|
|
16028
|
+
return value;
|
|
16029
|
+
}
|
|
16030
|
+
}
|
|
16031
|
+
console.log("httpRequestsMap", JSON.stringify(this.#httpRequestsMap, replacer, 2));
|
|
16032
|
+
console.log("requestWillBeSentMap", JSON.stringify(this.#requestWillBeSentMap, replacer, 2));
|
|
16033
|
+
console.log("requestWillBeSentMap", JSON.stringify(this.#responseReceivedExtraInfoMap, replacer, 2));
|
|
16034
|
+
console.log("requestWillBeSentMap", JSON.stringify(this.#requestPausedMap, replacer, 2));
|
|
16035
|
+
}
|
|
15995
16036
|
};
|
|
15996
16037
|
|
|
15997
16038
|
// node_modules/puppeteer-core/lib/esm/puppeteer/cdp/NetworkManager.js
|
|
@@ -16254,7 +16295,7 @@ ${sourceUrlComment}
|
|
|
16254
16295
|
this.emit(NetworkManagerEvent.Request, request);
|
|
16255
16296
|
void request.finalizeInterceptions();
|
|
16256
16297
|
}
|
|
16257
|
-
#onRequest(client, event, fetchRequestId) {
|
|
16298
|
+
#onRequest(client, event, fetchRequestId, fromMemoryCache = false) {
|
|
16258
16299
|
let redirectChain = [];
|
|
16259
16300
|
if (event.redirectResponse) {
|
|
16260
16301
|
let redirectResponseExtraInfo = null;
|
|
@@ -16276,15 +16317,25 @@ ${sourceUrlComment}
|
|
|
16276
16317
|
}
|
|
16277
16318
|
const frame = event.frameId ? this.#frameManager.frame(event.frameId) : null;
|
|
16278
16319
|
const request = new CdpHTTPRequest(client, frame, fetchRequestId, this.#userRequestInterceptionEnabled, event, redirectChain);
|
|
16320
|
+
request._fromMemoryCache = fromMemoryCache;
|
|
16279
16321
|
this.#networkEventManager.storeRequest(event.requestId, request);
|
|
16280
16322
|
this.emit(NetworkManagerEvent.Request, request);
|
|
16281
16323
|
void request.finalizeInterceptions();
|
|
16282
16324
|
}
|
|
16283
|
-
#onRequestServedFromCache(
|
|
16284
|
-
const
|
|
16325
|
+
#onRequestServedFromCache(client, event) {
|
|
16326
|
+
const requestWillBeSentEvent = this.#networkEventManager.getRequestWillBeSent(event.requestId);
|
|
16327
|
+
let request = this.#networkEventManager.getRequest(event.requestId);
|
|
16285
16328
|
if (request) {
|
|
16286
16329
|
request._fromMemoryCache = true;
|
|
16287
16330
|
}
|
|
16331
|
+
if (!request && requestWillBeSentEvent) {
|
|
16332
|
+
this.#onRequest(client, requestWillBeSentEvent, void 0, true);
|
|
16333
|
+
request = this.#networkEventManager.getRequest(event.requestId);
|
|
16334
|
+
}
|
|
16335
|
+
if (!request) {
|
|
16336
|
+
debugError(new Error(`Request ${event.requestId} was served from cache but we could not find the corresponding request object`));
|
|
16337
|
+
return;
|
|
16338
|
+
}
|
|
16288
16339
|
this.emit(NetworkManagerEvent.RequestServedFromCache, request);
|
|
16289
16340
|
}
|
|
16290
16341
|
#handleRequestRedirect(client, request, responsePayload, extraInfo) {
|