@browserless.io/browserless 2.20.2 → 2.21.0
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/CHANGELOG.md +10 -1
- package/bin/browserless.js +2 -1
- package/build/browserless.js +3 -2
- package/build/browsers/index.d.ts +3 -2
- package/build/browsers/index.js +3 -1
- 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/chrome/tests/pdf.spec.js +24 -12
- 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/build/routes/chromium/tests/pdf.spec.js +24 -12
- package/build/shared/pdf.http.js +10 -5
- package/extensions/ublock/_locales/ar/messages.json +5 -1
- package/extensions/ublock/_locales/az/messages.json +4 -0
- package/extensions/ublock/_locales/be/messages.json +4 -0
- package/extensions/ublock/_locales/bg/messages.json +4 -0
- package/extensions/ublock/_locales/bn/messages.json +4 -0
- package/extensions/ublock/_locales/br_FR/messages.json +9 -5
- package/extensions/ublock/_locales/bs/messages.json +4 -0
- package/extensions/ublock/_locales/ca/messages.json +5 -1
- package/extensions/ublock/_locales/cs/messages.json +4 -0
- package/extensions/ublock/_locales/cv/messages.json +4 -0
- package/extensions/ublock/_locales/cy/messages.json +4 -0
- package/extensions/ublock/_locales/da/messages.json +4 -0
- package/extensions/ublock/_locales/de/messages.json +4 -0
- package/extensions/ublock/_locales/el/messages.json +8 -4
- package/extensions/ublock/_locales/en/messages.json +4 -0
- package/extensions/ublock/_locales/en_GB/messages.json +4 -0
- package/extensions/ublock/_locales/eo/messages.json +9 -5
- package/extensions/ublock/_locales/es/messages.json +4 -0
- package/extensions/ublock/_locales/et/messages.json +4 -0
- package/extensions/ublock/_locales/eu/messages.json +4 -0
- package/extensions/ublock/_locales/fa/messages.json +4 -0
- package/extensions/ublock/_locales/fi/messages.json +6 -2
- package/extensions/ublock/_locales/fil/messages.json +4 -0
- package/extensions/ublock/_locales/fr/messages.json +4 -0
- package/extensions/ublock/_locales/fy/messages.json +4 -0
- package/extensions/ublock/_locales/gl/messages.json +12 -8
- package/extensions/ublock/_locales/gu/messages.json +4 -0
- package/extensions/ublock/_locales/he/messages.json +4 -0
- package/extensions/ublock/_locales/hi/messages.json +4 -0
- package/extensions/ublock/_locales/hr/messages.json +4 -0
- package/extensions/ublock/_locales/hu/messages.json +68 -64
- package/extensions/ublock/_locales/hy/messages.json +4 -0
- package/extensions/ublock/_locales/id/messages.json +6 -2
- package/extensions/ublock/_locales/it/messages.json +4 -0
- package/extensions/ublock/_locales/ja/messages.json +4 -0
- package/extensions/ublock/_locales/ka/messages.json +4 -0
- package/extensions/ublock/_locales/kk/messages.json +4 -0
- package/extensions/ublock/_locales/kn/messages.json +4 -0
- package/extensions/ublock/_locales/ko/messages.json +4 -0
- package/extensions/ublock/_locales/lt/messages.json +4 -0
- package/extensions/ublock/_locales/lv/messages.json +4 -0
- package/extensions/ublock/_locales/mk/messages.json +4 -0
- package/extensions/ublock/_locales/ml/messages.json +4 -0
- package/extensions/ublock/_locales/mr/messages.json +4 -0
- package/extensions/ublock/_locales/ms/messages.json +4 -0
- package/extensions/ublock/_locales/nb/messages.json +4 -0
- package/extensions/ublock/_locales/nl/messages.json +4 -0
- package/extensions/ublock/_locales/no/messages.json +4 -0
- package/extensions/ublock/_locales/oc/messages.json +4 -0
- package/extensions/ublock/_locales/pa/messages.json +8 -4
- package/extensions/ublock/_locales/pl/messages.json +4 -0
- package/extensions/ublock/_locales/pt_BR/messages.json +4 -0
- package/extensions/ublock/_locales/pt_PT/messages.json +4 -0
- package/extensions/ublock/_locales/ro/messages.json +4 -0
- package/extensions/ublock/_locales/ru/messages.json +4 -0
- package/extensions/ublock/_locales/si/messages.json +4 -0
- package/extensions/ublock/_locales/sk/messages.json +4 -0
- package/extensions/ublock/_locales/sl/messages.json +4 -0
- package/extensions/ublock/_locales/so/messages.json +4 -0
- package/extensions/ublock/_locales/sq/messages.json +4 -0
- package/extensions/ublock/_locales/sr/messages.json +6 -2
- package/extensions/ublock/_locales/sv/messages.json +4 -0
- package/extensions/ublock/_locales/sw/messages.json +4 -0
- package/extensions/ublock/_locales/ta/messages.json +4 -0
- package/extensions/ublock/_locales/te/messages.json +4 -0
- package/extensions/ublock/_locales/th/messages.json +4 -0
- package/extensions/ublock/_locales/tr/messages.json +4 -0
- package/extensions/ublock/_locales/uk/messages.json +4 -0
- package/extensions/ublock/_locales/ur/messages.json +4 -0
- package/extensions/ublock/_locales/vi/messages.json +4 -0
- package/extensions/ublock/_locales/zh_CN/messages.json +4 -0
- package/extensions/ublock/_locales/zh_TW/messages.json +5 -1
- package/extensions/ublock/assets/assets.json +8 -6
- package/extensions/ublock/assets/resources/scriptlets.js +455 -301
- package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +4441 -6643
- package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +401 -307
- package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +34 -29
- package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +682 -709
- package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +2439 -1999
- package/extensions/ublock/assets/ublock/badlists.txt +7 -0
- package/extensions/ublock/assets/ublock/badware.min.txt +992 -552
- package/extensions/ublock/assets/ublock/filters.min.txt +1253 -864
- package/extensions/ublock/assets/ublock/privacy.min.txt +58 -31
- package/extensions/ublock/assets/ublock/quick-fixes.min.txt +118 -126
- package/extensions/ublock/assets/ublock/unbreak.min.txt +129 -109
- package/extensions/ublock/js/background.js +4 -3
- package/extensions/ublock/js/benchmarks.js +29 -29
- package/extensions/ublock/js/codemirror/ubo-static-filtering.js +1 -0
- package/extensions/ublock/js/contextmenu.js +20 -21
- package/extensions/ublock/js/devtools.js +137 -3
- package/extensions/ublock/js/filtering-context.js +98 -43
- package/extensions/ublock/js/logger-ui.js +1 -1
- package/extensions/ublock/js/messaging.js +57 -135
- package/extensions/ublock/js/pagestore.js +44 -31
- package/extensions/ublock/js/redirect-resources.js +14 -4
- package/extensions/ublock/js/scriptlet-filtering.js +4 -1
- package/extensions/ublock/js/static-filtering-parser.js +107 -37
- package/extensions/ublock/js/static-net-filtering.js +514 -250
- package/extensions/ublock/js/storage.js +2 -1
- package/extensions/ublock/js/traffic.js +8 -4
- package/extensions/ublock/js/vapi-background.js +1 -0
- package/extensions/ublock/js/vapi-common.js +1 -0
- package/extensions/ublock/logger-ui.html +2 -3
- package/extensions/ublock/manifest.json +2 -2
- package/extensions/ublock/support.html +1 -0
- package/extensions/ublock/web_accessible_resources/noop-vast2.xml +1 -0
- package/extensions/ublock/web_accessible_resources/noop-vast3.xml +1 -0
- package/extensions/ublock/web_accessible_resources/noop-vast4.xml +1 -0
- package/package.json +16 -16
- package/src/browserless.ts +3 -2
- package/src/browsers/index.ts +2 -0
- package/src/routes/chrome/tests/pdf.spec.ts +24 -12
- package/src/routes/chromium/tests/pdf.spec.ts +24 -12
- package/src/shared/pdf.http.ts +10 -6
- package/static/docs/swagger.json +10 -10
- package/static/docs/swagger.min.json +9 -9
- package/static/function/client.js +9 -9
- package/static/function/index.html +9 -9
- /package/extensions/ublock/web_accessible_resources/{noop-vmap1.0.xml → noop-vmap1.xml} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
# [Latest](https://github.com/browserless/chrome/compare/v2.
|
|
1
|
+
# [Latest](https://github.com/browserless/chrome/compare/v2.21.0...main)
|
|
2
2
|
|
|
3
3
|
- Dependency updates.
|
|
4
4
|
|
|
5
|
+
# [v2.21.0](https://github.com/browserless/chrome/compare/v2.20.2...v2.21.0)
|
|
6
|
+
|
|
7
|
+
- Dependency updates.
|
|
8
|
+
- Supports:
|
|
9
|
+
- puppeteer-core: 23.4.1
|
|
10
|
+
- playwright-core: 1.47.2, 1.46.1, 1.45.3, 1.44, and 1.43.
|
|
11
|
+
- Stream PDF using createPDFStream() in the PDF APIs.
|
|
12
|
+
- Inject file-system managers in browser-manager.
|
|
13
|
+
|
|
5
14
|
# [v2.20.2](https://github.com/browserless/chrome/compare/v2.20.1...v2.20.2)
|
|
6
15
|
|
|
7
16
|
- Dependency updates.
|
package/bin/browserless.js
CHANGED
|
@@ -299,6 +299,7 @@ const start = async (dev = false) => {
|
|
|
299
299
|
};
|
|
300
300
|
|
|
301
301
|
const buildDocker = async () => {
|
|
302
|
+
const { version } = await browserlessPackageJSON;
|
|
302
303
|
const finalDockerPath = path.join(compiledDir, 'Dockerfile');
|
|
303
304
|
const argSwitches = getArgSwitches();
|
|
304
305
|
|
|
@@ -317,7 +318,7 @@ const buildDocker = async () => {
|
|
|
317
318
|
(await prompt(
|
|
318
319
|
'Which docker image do you want to use (defaults to: ghcr.io/browserless/multi)?',
|
|
319
320
|
)) ||
|
|
320
|
-
|
|
321
|
+
`ghcr.io/browserless/multi:v${version}`;
|
|
321
322
|
|
|
322
323
|
const action =
|
|
323
324
|
argSwitches.action ||
|
package/build/browserless.js
CHANGED
|
@@ -34,10 +34,11 @@ export class Browserless extends EventEmitter {
|
|
|
34
34
|
this.token = token || new Token(this.config);
|
|
35
35
|
this.hooks = hooks || new Hooks();
|
|
36
36
|
this.webhooks = webhooks || new WebHooks(this.config);
|
|
37
|
-
this.browserManager =
|
|
38
|
-
browserManager || new BrowserManager(this.config, this.hooks);
|
|
39
37
|
this.monitoring = monitoring || new Monitoring(this.config);
|
|
40
38
|
this.fileSystem = fileSystem || new FileSystem(this.config);
|
|
39
|
+
this.browserManager =
|
|
40
|
+
browserManager ||
|
|
41
|
+
new BrowserManager(this.config, this.hooks, this.fileSystem);
|
|
41
42
|
this.limiter =
|
|
42
43
|
limiter ||
|
|
43
44
|
new Limiter(this.config, this.metrics, this.monitoring, this.webhooks, this.hooks);
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { BrowserHTTPRoute, BrowserInstance, BrowserServerOptions, BrowserWebsocketRoute, BrowserlessSession, BrowserlessSessionJSON, CDPJSONPayload, CDPLaunchOptions, ChromiumCDP, Config, Hooks, Logger, Request } from '@browserless.io/browserless';
|
|
1
|
+
import { BrowserHTTPRoute, BrowserInstance, BrowserServerOptions, BrowserWebsocketRoute, BrowserlessSession, BrowserlessSessionJSON, CDPJSONPayload, CDPLaunchOptions, ChromiumCDP, Config, FileSystem, Hooks, Logger, Request } from '@browserless.io/browserless';
|
|
2
2
|
import { Page } from 'puppeteer-core';
|
|
3
3
|
export declare class BrowserManager {
|
|
4
4
|
protected config: Config;
|
|
5
5
|
protected hooks: Hooks;
|
|
6
|
+
protected fileSystem: FileSystem;
|
|
6
7
|
protected browsers: Map<BrowserInstance, BrowserlessSession>;
|
|
7
8
|
protected timers: Map<string, NodeJS.Timeout>;
|
|
8
9
|
protected log: Logger;
|
|
9
10
|
protected chromeBrowsers: (typeof ChromiumCDP)[];
|
|
10
11
|
protected playwrightBrowserNames: string[];
|
|
11
|
-
constructor(config: Config, hooks: Hooks);
|
|
12
|
+
constructor(config: Config, hooks: Hooks, fileSystem: FileSystem);
|
|
12
13
|
protected browserIsChrome(b: BrowserInstance): boolean;
|
|
13
14
|
protected removeUserDataDir(userDataDir: string | null): Promise<void>;
|
|
14
15
|
protected onNewPage(req: Request, page: Page): Promise<unknown>;
|
package/build/browsers/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import path from 'path';
|
|
|
4
4
|
export class BrowserManager {
|
|
5
5
|
config;
|
|
6
6
|
hooks;
|
|
7
|
+
fileSystem;
|
|
7
8
|
browsers = new Map();
|
|
8
9
|
timers = new Map();
|
|
9
10
|
log = new Logger('browser-manager');
|
|
@@ -14,9 +15,10 @@ export class BrowserManager {
|
|
|
14
15
|
FirefoxPlaywright.name,
|
|
15
16
|
WebKitPlaywright.name,
|
|
16
17
|
];
|
|
17
|
-
constructor(config, hooks) {
|
|
18
|
+
constructor(config, hooks, fileSystem) {
|
|
18
19
|
this.config = config;
|
|
19
20
|
this.hooks = hooks;
|
|
21
|
+
this.fileSystem = fileSystem;
|
|
20
22
|
}
|
|
21
23
|
browserIsChrome(b) {
|
|
22
24
|
return this.chromeBrowsers.some((chromeBrowser) => b instanceof chromeBrowser);
|
|
@@ -438,14 +438,14 @@
|
|
|
438
438
|
"length": {
|
|
439
439
|
"type": "number"
|
|
440
440
|
},
|
|
441
|
-
"__@toStringTag@
|
|
441
|
+
"__@toStringTag@14355": {
|
|
442
442
|
"type": "string",
|
|
443
443
|
"const": "Uint8Array"
|
|
444
444
|
}
|
|
445
445
|
},
|
|
446
446
|
"required": [
|
|
447
447
|
"BYTES_PER_ELEMENT",
|
|
448
|
-
"__@toStringTag@
|
|
448
|
+
"__@toStringTag@14355",
|
|
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@14355": {
|
|
484
484
|
"type": "string"
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
"additionalProperties": false,
|
|
488
488
|
"required": [
|
|
489
|
-
"__@toStringTag@
|
|
489
|
+
"__@toStringTag@14355",
|
|
490
490
|
"byteLength"
|
|
491
491
|
]
|
|
492
492
|
},
|
|
@@ -496,18 +496,18 @@
|
|
|
496
496
|
"byteLength": {
|
|
497
497
|
"type": "number"
|
|
498
498
|
},
|
|
499
|
-
"__@species@
|
|
499
|
+
"__@species@14393": {
|
|
500
500
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
501
501
|
},
|
|
502
|
-
"__@toStringTag@
|
|
502
|
+
"__@toStringTag@14355": {
|
|
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@14393",
|
|
510
|
+
"__@toStringTag@14355",
|
|
511
511
|
"byteLength"
|
|
512
512
|
]
|
|
513
513
|
},
|
|
@@ -583,14 +583,14 @@
|
|
|
583
583
|
"length": {
|
|
584
584
|
"type": "number"
|
|
585
585
|
},
|
|
586
|
-
"__@toStringTag@
|
|
586
|
+
"__@toStringTag@99976": {
|
|
587
587
|
"type": "string",
|
|
588
588
|
"const": "Uint8Array"
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
"required": [
|
|
592
592
|
"BYTES_PER_ELEMENT",
|
|
593
|
-
"__@toStringTag@
|
|
593
|
+
"__@toStringTag@99976",
|
|
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@99976": {
|
|
629
629
|
"type": "string"
|
|
630
630
|
}
|
|
631
631
|
},
|
|
632
632
|
"additionalProperties": false,
|
|
633
633
|
"required": [
|
|
634
|
-
"__@toStringTag@
|
|
634
|
+
"__@toStringTag@99976",
|
|
635
635
|
"byteLength"
|
|
636
636
|
]
|
|
637
637
|
},
|
|
@@ -641,18 +641,18 @@
|
|
|
641
641
|
"byteLength": {
|
|
642
642
|
"type": "number"
|
|
643
643
|
},
|
|
644
|
-
"__@species@
|
|
644
|
+
"__@species@100014": {
|
|
645
645
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
646
646
|
},
|
|
647
|
-
"__@toStringTag@
|
|
647
|
+
"__@toStringTag@99976": {
|
|
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@100014",
|
|
655
|
+
"__@toStringTag@99976",
|
|
656
656
|
"byteLength"
|
|
657
657
|
]
|
|
658
658
|
},
|
|
@@ -485,14 +485,14 @@
|
|
|
485
485
|
"length": {
|
|
486
486
|
"type": "number"
|
|
487
487
|
},
|
|
488
|
-
"__@toStringTag@
|
|
488
|
+
"__@toStringTag@142840": {
|
|
489
489
|
"type": "string",
|
|
490
490
|
"const": "Uint8Array"
|
|
491
491
|
}
|
|
492
492
|
},
|
|
493
493
|
"required": [
|
|
494
494
|
"BYTES_PER_ELEMENT",
|
|
495
|
-
"__@toStringTag@
|
|
495
|
+
"__@toStringTag@142840",
|
|
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@142840": {
|
|
531
531
|
"type": "string"
|
|
532
532
|
}
|
|
533
533
|
},
|
|
534
534
|
"additionalProperties": false,
|
|
535
535
|
"required": [
|
|
536
|
-
"__@toStringTag@
|
|
536
|
+
"__@toStringTag@142840",
|
|
537
537
|
"byteLength"
|
|
538
538
|
]
|
|
539
539
|
},
|
|
@@ -543,18 +543,18 @@
|
|
|
543
543
|
"byteLength": {
|
|
544
544
|
"type": "number"
|
|
545
545
|
},
|
|
546
|
-
"__@species@
|
|
546
|
+
"__@species@142878": {
|
|
547
547
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
548
548
|
},
|
|
549
|
-
"__@toStringTag@
|
|
549
|
+
"__@toStringTag@142840": {
|
|
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@142878",
|
|
557
|
+
"__@toStringTag@142840",
|
|
558
558
|
"byteLength"
|
|
559
559
|
]
|
|
560
560
|
},
|
|
@@ -528,14 +528,14 @@
|
|
|
528
528
|
"length": {
|
|
529
529
|
"type": "number"
|
|
530
530
|
},
|
|
531
|
-
"__@toStringTag@
|
|
531
|
+
"__@toStringTag@157363": {
|
|
532
532
|
"type": "string",
|
|
533
533
|
"const": "Uint8Array"
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
536
|
"required": [
|
|
537
537
|
"BYTES_PER_ELEMENT",
|
|
538
|
-
"__@toStringTag@
|
|
538
|
+
"__@toStringTag@157363",
|
|
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@157363": {
|
|
574
574
|
"type": "string"
|
|
575
575
|
}
|
|
576
576
|
},
|
|
577
577
|
"additionalProperties": false,
|
|
578
578
|
"required": [
|
|
579
|
-
"__@toStringTag@
|
|
579
|
+
"__@toStringTag@157363",
|
|
580
580
|
"byteLength"
|
|
581
581
|
]
|
|
582
582
|
},
|
|
@@ -586,18 +586,18 @@
|
|
|
586
586
|
"byteLength": {
|
|
587
587
|
"type": "number"
|
|
588
588
|
},
|
|
589
|
-
"__@species@
|
|
589
|
+
"__@species@157401": {
|
|
590
590
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
591
591
|
},
|
|
592
|
-
"__@toStringTag@
|
|
592
|
+
"__@toStringTag@157363": {
|
|
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@157401",
|
|
600
|
+
"__@toStringTag@157363",
|
|
601
601
|
"byteLength"
|
|
602
602
|
]
|
|
603
603
|
},
|
|
@@ -23,7 +23,8 @@ describe('/chrome/pdf API', function () {
|
|
|
23
23
|
'content-type': 'application/json',
|
|
24
24
|
},
|
|
25
25
|
method: 'POST',
|
|
26
|
-
}).then((res) => {
|
|
26
|
+
}).then(async (res) => {
|
|
27
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
27
28
|
expect(res.headers.get('x-response-code')).to.not.be.undefined;
|
|
28
29
|
expect(res.headers.get('x-response-url')).to.not.be.undefined;
|
|
29
30
|
expect(res.headers.get('x-response-ip')).to.not.be.undefined;
|
|
@@ -59,7 +60,8 @@ describe('/chrome/pdf API', function () {
|
|
|
59
60
|
'content-type': 'application/json',
|
|
60
61
|
},
|
|
61
62
|
method: 'POST',
|
|
62
|
-
}).then((res) => {
|
|
63
|
+
}).then(async (res) => {
|
|
64
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
63
65
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
64
66
|
expect(res.status).to.equal(200);
|
|
65
67
|
});
|
|
@@ -81,7 +83,8 @@ describe('/chrome/pdf API', function () {
|
|
|
81
83
|
'content-type': 'application/json',
|
|
82
84
|
},
|
|
83
85
|
method: 'POST',
|
|
84
|
-
}).then((res) => {
|
|
86
|
+
}).then(async (res) => {
|
|
87
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
85
88
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
86
89
|
expect(res.status).to.equal(200);
|
|
87
90
|
});
|
|
@@ -103,7 +106,8 @@ describe('/chrome/pdf API', function () {
|
|
|
103
106
|
'content-type': 'application/json',
|
|
104
107
|
},
|
|
105
108
|
method: 'POST',
|
|
106
|
-
}).then((res) => {
|
|
109
|
+
}).then(async (res) => {
|
|
110
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
107
111
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
108
112
|
expect(res.status).to.equal(200);
|
|
109
113
|
});
|
|
@@ -128,7 +132,8 @@ describe('/chrome/pdf API', function () {
|
|
|
128
132
|
'content-type': 'application/json',
|
|
129
133
|
},
|
|
130
134
|
method: 'POST',
|
|
131
|
-
}).then((res) => {
|
|
135
|
+
}).then(async (res) => {
|
|
136
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
132
137
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
133
138
|
expect(res.status).to.equal(200);
|
|
134
139
|
});
|
|
@@ -148,7 +153,8 @@ describe('/chrome/pdf API', function () {
|
|
|
148
153
|
'content-type': 'application/json',
|
|
149
154
|
},
|
|
150
155
|
method: 'POST',
|
|
151
|
-
}).then((res) => {
|
|
156
|
+
}).then(async (res) => {
|
|
157
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
152
158
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
153
159
|
expect(res.status).to.equal(200);
|
|
154
160
|
});
|
|
@@ -218,7 +224,8 @@ describe('/chrome/pdf API', function () {
|
|
|
218
224
|
'content-type': 'application/json',
|
|
219
225
|
},
|
|
220
226
|
method: 'POST',
|
|
221
|
-
}).then((res) => {
|
|
227
|
+
}).then(async (res) => {
|
|
228
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
222
229
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
223
230
|
expect(res.status).to.equal(200);
|
|
224
231
|
});
|
|
@@ -240,7 +247,8 @@ describe('/chrome/pdf API', function () {
|
|
|
240
247
|
'content-type': 'application/json',
|
|
241
248
|
},
|
|
242
249
|
method: 'POST',
|
|
243
|
-
}).then((res) => {
|
|
250
|
+
}).then(async (res) => {
|
|
251
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
244
252
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
245
253
|
expect(res.status).to.equal(200);
|
|
246
254
|
});
|
|
@@ -259,7 +267,8 @@ describe('/chrome/pdf API', function () {
|
|
|
259
267
|
'content-type': 'application/json',
|
|
260
268
|
},
|
|
261
269
|
method: 'POST',
|
|
262
|
-
}).then((res) => {
|
|
270
|
+
}).then(async (res) => {
|
|
271
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
263
272
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
264
273
|
expect(res.status).to.equal(200);
|
|
265
274
|
});
|
|
@@ -281,7 +290,8 @@ describe('/chrome/pdf API', function () {
|
|
|
281
290
|
'content-type': 'application/json',
|
|
282
291
|
},
|
|
283
292
|
method: 'POST',
|
|
284
|
-
}).then((res) => {
|
|
293
|
+
}).then(async (res) => {
|
|
294
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
285
295
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
286
296
|
expect(res.status).to.equal(200);
|
|
287
297
|
});
|
|
@@ -305,7 +315,8 @@ describe('/chrome/pdf API', function () {
|
|
|
305
315
|
'content-type': 'application/json',
|
|
306
316
|
},
|
|
307
317
|
method: 'POST',
|
|
308
|
-
}).then((res) => {
|
|
318
|
+
}).then(async (res) => {
|
|
319
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
309
320
|
expect(res.headers.get('content-type')).to.equal('application/pdf');
|
|
310
321
|
expect(res.status).to.equal(200);
|
|
311
322
|
});
|
|
@@ -321,7 +332,8 @@ describe('/chrome/pdf API', function () {
|
|
|
321
332
|
'content-type': 'application/json',
|
|
322
333
|
},
|
|
323
334
|
method: 'POST',
|
|
324
|
-
}).then((res) => {
|
|
335
|
+
}).then(async (res) => {
|
|
336
|
+
await res.body?.pipeTo(new WritableStream({}));
|
|
325
337
|
expect(res.headers.get('x-response-code')).to.not.be.undefined;
|
|
326
338
|
expect(res.headers.get('x-response-url')).to.not.be.undefined;
|
|
327
339
|
expect(res.headers.get('x-response-ip')).to.not.be.undefined;
|
|
@@ -438,14 +438,14 @@
|
|
|
438
438
|
"length": {
|
|
439
439
|
"type": "number"
|
|
440
440
|
},
|
|
441
|
-
"__@toStringTag@
|
|
441
|
+
"__@toStringTag@171796": {
|
|
442
442
|
"type": "string",
|
|
443
443
|
"const": "Uint8Array"
|
|
444
444
|
}
|
|
445
445
|
},
|
|
446
446
|
"required": [
|
|
447
447
|
"BYTES_PER_ELEMENT",
|
|
448
|
-
"__@toStringTag@
|
|
448
|
+
"__@toStringTag@171796",
|
|
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@171796": {
|
|
484
484
|
"type": "string"
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
"additionalProperties": false,
|
|
488
488
|
"required": [
|
|
489
|
-
"__@toStringTag@
|
|
489
|
+
"__@toStringTag@171796",
|
|
490
490
|
"byteLength"
|
|
491
491
|
]
|
|
492
492
|
},
|
|
@@ -496,18 +496,18 @@
|
|
|
496
496
|
"byteLength": {
|
|
497
497
|
"type": "number"
|
|
498
498
|
},
|
|
499
|
-
"__@species@
|
|
499
|
+
"__@species@171834": {
|
|
500
500
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
501
501
|
},
|
|
502
|
-
"__@toStringTag@
|
|
502
|
+
"__@toStringTag@171796": {
|
|
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@171834",
|
|
510
|
+
"__@toStringTag@171796",
|
|
511
511
|
"byteLength"
|
|
512
512
|
]
|
|
513
513
|
},
|
|
@@ -583,14 +583,14 @@
|
|
|
583
583
|
"length": {
|
|
584
584
|
"type": "number"
|
|
585
585
|
},
|
|
586
|
-
"__@toStringTag@
|
|
586
|
+
"__@toStringTag@257332": {
|
|
587
587
|
"type": "string",
|
|
588
588
|
"const": "Uint8Array"
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
"required": [
|
|
592
592
|
"BYTES_PER_ELEMENT",
|
|
593
|
-
"__@toStringTag@
|
|
593
|
+
"__@toStringTag@257332",
|
|
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@257332": {
|
|
629
629
|
"type": "string"
|
|
630
630
|
}
|
|
631
631
|
},
|
|
632
632
|
"additionalProperties": false,
|
|
633
633
|
"required": [
|
|
634
|
-
"__@toStringTag@
|
|
634
|
+
"__@toStringTag@257332",
|
|
635
635
|
"byteLength"
|
|
636
636
|
]
|
|
637
637
|
},
|
|
@@ -641,18 +641,18 @@
|
|
|
641
641
|
"byteLength": {
|
|
642
642
|
"type": "number"
|
|
643
643
|
},
|
|
644
|
-
"__@species@
|
|
644
|
+
"__@species@257370": {
|
|
645
645
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
646
646
|
},
|
|
647
|
-
"__@toStringTag@
|
|
647
|
+
"__@toStringTag@257332": {
|
|
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@257370",
|
|
655
|
+
"__@toStringTag@257332",
|
|
656
656
|
"byteLength"
|
|
657
657
|
]
|
|
658
658
|
},
|
|
@@ -485,14 +485,14 @@
|
|
|
485
485
|
"length": {
|
|
486
486
|
"type": "number"
|
|
487
487
|
},
|
|
488
|
-
"__@toStringTag@
|
|
488
|
+
"__@toStringTag@300254": {
|
|
489
489
|
"type": "string",
|
|
490
490
|
"const": "Uint8Array"
|
|
491
491
|
}
|
|
492
492
|
},
|
|
493
493
|
"required": [
|
|
494
494
|
"BYTES_PER_ELEMENT",
|
|
495
|
-
"__@toStringTag@
|
|
495
|
+
"__@toStringTag@300254",
|
|
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@300254": {
|
|
531
531
|
"type": "string"
|
|
532
532
|
}
|
|
533
533
|
},
|
|
534
534
|
"additionalProperties": false,
|
|
535
535
|
"required": [
|
|
536
|
-
"__@toStringTag@
|
|
536
|
+
"__@toStringTag@300254",
|
|
537
537
|
"byteLength"
|
|
538
538
|
]
|
|
539
539
|
},
|
|
@@ -543,18 +543,18 @@
|
|
|
543
543
|
"byteLength": {
|
|
544
544
|
"type": "number"
|
|
545
545
|
},
|
|
546
|
-
"__@species@
|
|
546
|
+
"__@species@300292": {
|
|
547
547
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
548
548
|
},
|
|
549
|
-
"__@toStringTag@
|
|
549
|
+
"__@toStringTag@300254": {
|
|
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@300292",
|
|
557
|
+
"__@toStringTag@300254",
|
|
558
558
|
"byteLength"
|
|
559
559
|
]
|
|
560
560
|
},
|
|
@@ -528,14 +528,14 @@
|
|
|
528
528
|
"length": {
|
|
529
529
|
"type": "number"
|
|
530
530
|
},
|
|
531
|
-
"__@toStringTag@
|
|
531
|
+
"__@toStringTag@314774": {
|
|
532
532
|
"type": "string",
|
|
533
533
|
"const": "Uint8Array"
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
536
|
"required": [
|
|
537
537
|
"BYTES_PER_ELEMENT",
|
|
538
|
-
"__@toStringTag@
|
|
538
|
+
"__@toStringTag@314774",
|
|
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@314774": {
|
|
574
574
|
"type": "string"
|
|
575
575
|
}
|
|
576
576
|
},
|
|
577
577
|
"additionalProperties": false,
|
|
578
578
|
"required": [
|
|
579
|
-
"__@toStringTag@
|
|
579
|
+
"__@toStringTag@314774",
|
|
580
580
|
"byteLength"
|
|
581
581
|
]
|
|
582
582
|
},
|
|
@@ -586,18 +586,18 @@
|
|
|
586
586
|
"byteLength": {
|
|
587
587
|
"type": "number"
|
|
588
588
|
},
|
|
589
|
-
"__@species@
|
|
589
|
+
"__@species@314812": {
|
|
590
590
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
591
591
|
},
|
|
592
|
-
"__@toStringTag@
|
|
592
|
+
"__@toStringTag@314774": {
|
|
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@314812",
|
|
600
|
+
"__@toStringTag@314774",
|
|
601
601
|
"byteLength"
|
|
602
602
|
]
|
|
603
603
|
},
|