@browserless.io/browserless 2.19.0 → 2.20.0-beta-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.md CHANGED
@@ -74,7 +74,7 @@ You still execute the script itself which gives you total control over what libr
74
74
  ### Docker
75
75
 
76
76
  > [!TIP]
77
- > See more options on our [full documentation site](https://docs.browserless.io/Docker/docker-quickstart).
77
+ > See more options on our [full documentation site](https://docs.browserless.io/docker/quickstart).
78
78
 
79
79
  1. `docker run -p 3000:3000 ghcr.io/browserless/chromium`
80
80
  2. Visit `http://localhost:3000/docs` to see the documentation site.
@@ -180,7 +180,7 @@ You will then see the debugger url during the startup process.
180
180
 
181
181
  Most libraries allow you to specify a remote instance of Chrome to interact with. They are either looking for a websocket endpoint, a host and port, or some address. Browserless supports these by default, however if you're having issues please make an issue in this project and we'll try and work with the library authors to get them integrated with browserless. Please note that in V2 we no longer support selenium or webdriver integrations.
182
182
 
183
- You can find a much larger list of supported libraries [on our documentation site](https://docs.browserless.io/Libraries/puppeteer-library).
183
+ You can find a much larger list of supported libraries [on our documentation site](https://docs.browserless.io/libraries/puppeteer).
184
184
 
185
185
  ## Motivations
186
186
 
@@ -8,6 +8,7 @@ import {
8
8
  getArgSwitches,
9
9
  getSourceFiles,
10
10
  installDependencies,
11
+ normalizeFileProtocol,
11
12
  prompt,
12
13
  } from '@browserless.io/browserless';
13
14
  import { readFile, writeFile } from 'fs/promises';
@@ -27,7 +28,6 @@ if (typeof process.env.DEBUG === 'undefined') {
27
28
  }
28
29
 
29
30
  const log = debug('browserless.io:sdk:log');
30
-
31
31
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
32
32
  const cmd = process.argv[2] ?? 'help';
33
33
  const subCMD = process.argv[3];
@@ -90,7 +90,7 @@ const importDefault = async (files, fileName) => {
90
90
  return;
91
91
  }
92
92
 
93
- const fullFilePath = path.join(compiledDir, classModuleFile);
93
+ const fullFilePath = normalizeFileProtocol(path.join(compiledDir, classModuleFile));
94
94
 
95
95
  if (!classModuleFile) {
96
96
  return;
@@ -1,6 +1,6 @@
1
1
  import * as fs from 'fs/promises';
2
2
  import * as path from 'path';
3
- import { Logger as BlessLogger, BrowserManager, ChromeCDP, ChromiumCDP, ChromiumPlaywright, Config, FileSystem, FirefoxPlaywright, HTTPServer, Hooks, Limiter, Metrics, Monitoring, Router, Token, WebHooks, WebKitPlaywright, availableBrowsers, getRouteFiles, makeExternalURL, printLogo, safeParse, } from '@browserless.io/browserless';
3
+ import { Logger as BlessLogger, BrowserManager, ChromeCDP, ChromiumCDP, ChromiumPlaywright, Config, FileSystem, FirefoxPlaywright, HTTPServer, Hooks, Limiter, Metrics, Monitoring, Router, Token, WebHooks, WebKitPlaywright, availableBrowsers, dedent, getRouteFiles, makeExternalURL, normalizeFileProtocol, printLogo, safeParse, } from '@browserless.io/browserless';
4
4
  import { EventEmitter } from 'events';
5
5
  import { readFile } from 'fs/promises';
6
6
  import { userInfo } from 'os';
@@ -177,7 +177,7 @@ export class Browserless extends EventEmitter {
177
177
  schemaPath.base = `${schemaPath.name}.${schemaType}.json`;
178
178
  return await readFile(path.format(schemaPath), 'utf-8').catch(() => '');
179
179
  }));
180
- const wsImport = `${this.config.getIsWin() ? 'file:///' : ''}${wsRoute}`;
180
+ const wsImport = normalizeFileProtocol(wsRoute);
181
181
  const { default: Route, } = await import(wsImport + `?cb=${Date.now()}`);
182
182
  const route = new Route(this.browserManager, this.config, this.fileSystem, this.metrics, this.monitoring, this.staticSDKDir, this.limiter);
183
183
  if (!this.routeIsDisabled(route)) {
@@ -199,7 +199,8 @@ export class Browserless extends EventEmitter {
199
199
  route.browser &&
200
200
  internalBrowsers.includes(route.browser) &&
201
201
  !installedBrowsers.some((b) => b.name === route.browser?.name)) {
202
- throw new Error(`Couldn't load route "${route.path}" due to missing browser binary for "${route.browser?.name}"`);
202
+ throw new Error(dedent(`Couldn't load route "${route.path}" due to missing browser binary for "${route.browser?.name}".
203
+ Installed Browsers: ${installedBrowsers.join(', ')}`));
203
204
  }
204
205
  });
205
206
  const duplicateNamedRoutes = allRoutes
package/build/config.d.ts CHANGED
@@ -3,8 +3,8 @@ import playwright from 'playwright-core';
3
3
  export declare class Config extends EventEmitter {
4
4
  protected readonly debug: string;
5
5
  protected readonly host: string;
6
- protected external: string | undefined;
7
6
  protected readonly isWin: boolean;
7
+ protected external: string | undefined;
8
8
  protected port: number;
9
9
  protected downloadsDir: string;
10
10
  protected dataDir: string;
package/build/config.js CHANGED
@@ -1,4 +1,4 @@
1
- import { exists, keyLength, untildify } from '@browserless.io/browserless';
1
+ import { exists, isWin as isWindows, keyLength, untildify } from '@browserless.io/browserless';
2
2
  import { EventEmitter } from 'events';
3
3
  import debug from 'debug';
4
4
  import { fileURLToPath } from 'url';
@@ -99,8 +99,8 @@ const getDebug = () => {
99
99
  export class Config extends EventEmitter {
100
100
  debug = getDebug();
101
101
  host = process.env.HOST ?? 'localhost';
102
+ isWin = isWindows;
102
103
  external = process.env.PROXY_URL ?? process.env.EXTERNAL;
103
- isWin = process.platform === 'win32';
104
104
  port = +(process.env.PORT ?? '3000');
105
105
  downloadsDir = process.env.DOWNLOAD_DIR
106
106
  ? untildify(process.env.DOWNLOAD_DIR)
@@ -438,14 +438,14 @@
438
438
  "length": {
439
439
  "type": "number"
440
440
  },
441
- "__@toStringTag@14083": {
441
+ "__@toStringTag@14124": {
442
442
  "type": "string",
443
443
  "const": "Uint8Array"
444
444
  }
445
445
  },
446
446
  "required": [
447
447
  "BYTES_PER_ELEMENT",
448
- "__@toStringTag@14083",
448
+ "__@toStringTag@14124",
449
449
  "buffer",
450
450
  "byteLength",
451
451
  "byteOffset",
@@ -480,13 +480,13 @@
480
480
  "byteLength": {
481
481
  "type": "number"
482
482
  },
483
- "__@toStringTag@14083": {
483
+ "__@toStringTag@14124": {
484
484
  "type": "string"
485
485
  }
486
486
  },
487
487
  "additionalProperties": false,
488
488
  "required": [
489
- "__@toStringTag@14083",
489
+ "__@toStringTag@14124",
490
490
  "byteLength"
491
491
  ]
492
492
  },
@@ -496,18 +496,18 @@
496
496
  "byteLength": {
497
497
  "type": "number"
498
498
  },
499
- "__@species@14121": {
499
+ "__@species@14162": {
500
500
  "$ref": "#/definitions/SharedArrayBuffer"
501
501
  },
502
- "__@toStringTag@14083": {
502
+ "__@toStringTag@14124": {
503
503
  "type": "string",
504
504
  "const": "SharedArrayBuffer"
505
505
  }
506
506
  },
507
507
  "additionalProperties": false,
508
508
  "required": [
509
- "__@species@14121",
510
- "__@toStringTag@14083",
509
+ "__@species@14162",
510
+ "__@toStringTag@14124",
511
511
  "byteLength"
512
512
  ]
513
513
  },
@@ -583,14 +583,14 @@
583
583
  "length": {
584
584
  "type": "number"
585
585
  },
586
- "__@toStringTag@111971": {
586
+ "__@toStringTag@112307": {
587
587
  "type": "string",
588
588
  "const": "Uint8Array"
589
589
  }
590
590
  },
591
591
  "required": [
592
592
  "BYTES_PER_ELEMENT",
593
- "__@toStringTag@111971",
593
+ "__@toStringTag@112307",
594
594
  "buffer",
595
595
  "byteLength",
596
596
  "byteOffset",
@@ -625,13 +625,13 @@
625
625
  "byteLength": {
626
626
  "type": "number"
627
627
  },
628
- "__@toStringTag@111971": {
628
+ "__@toStringTag@112307": {
629
629
  "type": "string"
630
630
  }
631
631
  },
632
632
  "additionalProperties": false,
633
633
  "required": [
634
- "__@toStringTag@111971",
634
+ "__@toStringTag@112307",
635
635
  "byteLength"
636
636
  ]
637
637
  },
@@ -641,18 +641,18 @@
641
641
  "byteLength": {
642
642
  "type": "number"
643
643
  },
644
- "__@species@112009": {
644
+ "__@species@112345": {
645
645
  "$ref": "#/definitions/SharedArrayBuffer"
646
646
  },
647
- "__@toStringTag@111971": {
647
+ "__@toStringTag@112307": {
648
648
  "type": "string",
649
649
  "const": "SharedArrayBuffer"
650
650
  }
651
651
  },
652
652
  "additionalProperties": false,
653
653
  "required": [
654
- "__@species@112009",
655
- "__@toStringTag@111971",
654
+ "__@species@112345",
655
+ "__@toStringTag@112307",
656
656
  "byteLength"
657
657
  ]
658
658
  },
@@ -485,14 +485,14 @@
485
485
  "length": {
486
486
  "type": "number"
487
487
  },
488
- "__@toStringTag@154304": {
488
+ "__@toStringTag@140529": {
489
489
  "type": "string",
490
490
  "const": "Uint8Array"
491
491
  }
492
492
  },
493
493
  "required": [
494
494
  "BYTES_PER_ELEMENT",
495
- "__@toStringTag@154304",
495
+ "__@toStringTag@140529",
496
496
  "buffer",
497
497
  "byteLength",
498
498
  "byteOffset",
@@ -527,13 +527,13 @@
527
527
  "byteLength": {
528
528
  "type": "number"
529
529
  },
530
- "__@toStringTag@154304": {
530
+ "__@toStringTag@140529": {
531
531
  "type": "string"
532
532
  }
533
533
  },
534
534
  "additionalProperties": false,
535
535
  "required": [
536
- "__@toStringTag@154304",
536
+ "__@toStringTag@140529",
537
537
  "byteLength"
538
538
  ]
539
539
  },
@@ -543,18 +543,18 @@
543
543
  "byteLength": {
544
544
  "type": "number"
545
545
  },
546
- "__@species@154342": {
546
+ "__@species@140567": {
547
547
  "$ref": "#/definitions/SharedArrayBuffer"
548
548
  },
549
- "__@toStringTag@154304": {
549
+ "__@toStringTag@140529": {
550
550
  "type": "string",
551
551
  "const": "SharedArrayBuffer"
552
552
  }
553
553
  },
554
554
  "additionalProperties": false,
555
555
  "required": [
556
- "__@species@154342",
557
- "__@toStringTag@154304",
556
+ "__@species@140567",
557
+ "__@toStringTag@140529",
558
558
  "byteLength"
559
559
  ]
560
560
  },
@@ -528,14 +528,14 @@
528
528
  "length": {
529
529
  "type": "number"
530
530
  },
531
- "__@toStringTag@140130": {
531
+ "__@toStringTag@168834": {
532
532
  "type": "string",
533
533
  "const": "Uint8Array"
534
534
  }
535
535
  },
536
536
  "required": [
537
537
  "BYTES_PER_ELEMENT",
538
- "__@toStringTag@140130",
538
+ "__@toStringTag@168834",
539
539
  "buffer",
540
540
  "byteLength",
541
541
  "byteOffset",
@@ -570,13 +570,13 @@
570
570
  "byteLength": {
571
571
  "type": "number"
572
572
  },
573
- "__@toStringTag@140130": {
573
+ "__@toStringTag@168834": {
574
574
  "type": "string"
575
575
  }
576
576
  },
577
577
  "additionalProperties": false,
578
578
  "required": [
579
- "__@toStringTag@140130",
579
+ "__@toStringTag@168834",
580
580
  "byteLength"
581
581
  ]
582
582
  },
@@ -586,18 +586,18 @@
586
586
  "byteLength": {
587
587
  "type": "number"
588
588
  },
589
- "__@species@140168": {
589
+ "__@species@168872": {
590
590
  "$ref": "#/definitions/SharedArrayBuffer"
591
591
  },
592
- "__@toStringTag@140130": {
592
+ "__@toStringTag@168834": {
593
593
  "type": "string",
594
594
  "const": "SharedArrayBuffer"
595
595
  }
596
596
  },
597
597
  "additionalProperties": false,
598
598
  "required": [
599
- "__@species@140168",
600
- "__@toStringTag@140130",
599
+ "__@species@168872",
600
+ "__@toStringTag@168834",
601
601
  "byteLength"
602
602
  ]
603
603
  },
@@ -438,14 +438,14 @@
438
438
  "length": {
439
439
  "type": "number"
440
440
  },
441
- "__@toStringTag@168531": {
441
+ "__@toStringTag@183036": {
442
442
  "type": "string",
443
443
  "const": "Uint8Array"
444
444
  }
445
445
  },
446
446
  "required": [
447
447
  "BYTES_PER_ELEMENT",
448
- "__@toStringTag@168531",
448
+ "__@toStringTag@183036",
449
449
  "buffer",
450
450
  "byteLength",
451
451
  "byteOffset",
@@ -480,13 +480,13 @@
480
480
  "byteLength": {
481
481
  "type": "number"
482
482
  },
483
- "__@toStringTag@168531": {
483
+ "__@toStringTag@183036": {
484
484
  "type": "string"
485
485
  }
486
486
  },
487
487
  "additionalProperties": false,
488
488
  "required": [
489
- "__@toStringTag@168531",
489
+ "__@toStringTag@183036",
490
490
  "byteLength"
491
491
  ]
492
492
  },
@@ -496,18 +496,18 @@
496
496
  "byteLength": {
497
497
  "type": "number"
498
498
  },
499
- "__@species@168569": {
499
+ "__@species@183074": {
500
500
  "$ref": "#/definitions/SharedArrayBuffer"
501
501
  },
502
- "__@toStringTag@168531": {
502
+ "__@toStringTag@183036": {
503
503
  "type": "string",
504
504
  "const": "SharedArrayBuffer"
505
505
  }
506
506
  },
507
507
  "additionalProperties": false,
508
508
  "required": [
509
- "__@species@168569",
510
- "__@toStringTag@168531",
509
+ "__@species@183074",
510
+ "__@toStringTag@183036",
511
511
  "byteLength"
512
512
  ]
513
513
  },
@@ -583,14 +583,14 @@
583
583
  "length": {
584
584
  "type": "number"
585
585
  },
586
- "__@toStringTag@252426": {
586
+ "__@toStringTag@267177": {
587
587
  "type": "string",
588
588
  "const": "Uint8Array"
589
589
  }
590
590
  },
591
591
  "required": [
592
592
  "BYTES_PER_ELEMENT",
593
- "__@toStringTag@252426",
593
+ "__@toStringTag@267177",
594
594
  "buffer",
595
595
  "byteLength",
596
596
  "byteOffset",
@@ -625,13 +625,13 @@
625
625
  "byteLength": {
626
626
  "type": "number"
627
627
  },
628
- "__@toStringTag@252426": {
628
+ "__@toStringTag@267177": {
629
629
  "type": "string"
630
630
  }
631
631
  },
632
632
  "additionalProperties": false,
633
633
  "required": [
634
- "__@toStringTag@252426",
634
+ "__@toStringTag@267177",
635
635
  "byteLength"
636
636
  ]
637
637
  },
@@ -641,18 +641,18 @@
641
641
  "byteLength": {
642
642
  "type": "number"
643
643
  },
644
- "__@species@252464": {
644
+ "__@species@267215": {
645
645
  "$ref": "#/definitions/SharedArrayBuffer"
646
646
  },
647
- "__@toStringTag@252426": {
647
+ "__@toStringTag@267177": {
648
648
  "type": "string",
649
649
  "const": "SharedArrayBuffer"
650
650
  }
651
651
  },
652
652
  "additionalProperties": false,
653
653
  "required": [
654
- "__@species@252464",
655
- "__@toStringTag@252426",
654
+ "__@species@267215",
655
+ "__@toStringTag@267177",
656
656
  "byteLength"
657
657
  ]
658
658
  },
@@ -485,14 +485,14 @@
485
485
  "length": {
486
486
  "type": "number"
487
487
  },
488
- "__@toStringTag@294540": {
488
+ "__@toStringTag@295401": {
489
489
  "type": "string",
490
490
  "const": "Uint8Array"
491
491
  }
492
492
  },
493
493
  "required": [
494
494
  "BYTES_PER_ELEMENT",
495
- "__@toStringTag@294540",
495
+ "__@toStringTag@295401",
496
496
  "buffer",
497
497
  "byteLength",
498
498
  "byteOffset",
@@ -527,13 +527,13 @@
527
527
  "byteLength": {
528
528
  "type": "number"
529
529
  },
530
- "__@toStringTag@294540": {
530
+ "__@toStringTag@295401": {
531
531
  "type": "string"
532
532
  }
533
533
  },
534
534
  "additionalProperties": false,
535
535
  "required": [
536
- "__@toStringTag@294540",
536
+ "__@toStringTag@295401",
537
537
  "byteLength"
538
538
  ]
539
539
  },
@@ -543,18 +543,18 @@
543
543
  "byteLength": {
544
544
  "type": "number"
545
545
  },
546
- "__@species@294578": {
546
+ "__@species@295439": {
547
547
  "$ref": "#/definitions/SharedArrayBuffer"
548
548
  },
549
- "__@toStringTag@294540": {
549
+ "__@toStringTag@295401": {
550
550
  "type": "string",
551
551
  "const": "SharedArrayBuffer"
552
552
  }
553
553
  },
554
554
  "additionalProperties": false,
555
555
  "required": [
556
- "__@species@294578",
557
- "__@toStringTag@294540",
556
+ "__@species@295439",
557
+ "__@toStringTag@295401",
558
558
  "byteLength"
559
559
  ]
560
560
  },
@@ -528,14 +528,14 @@
528
528
  "length": {
529
529
  "type": "number"
530
530
  },
531
- "__@toStringTag@308788": {
531
+ "__@toStringTag@323656": {
532
532
  "type": "string",
533
533
  "const": "Uint8Array"
534
534
  }
535
535
  },
536
536
  "required": [
537
537
  "BYTES_PER_ELEMENT",
538
- "__@toStringTag@308788",
538
+ "__@toStringTag@323656",
539
539
  "buffer",
540
540
  "byteLength",
541
541
  "byteOffset",
@@ -570,13 +570,13 @@
570
570
  "byteLength": {
571
571
  "type": "number"
572
572
  },
573
- "__@toStringTag@308788": {
573
+ "__@toStringTag@323656": {
574
574
  "type": "string"
575
575
  }
576
576
  },
577
577
  "additionalProperties": false,
578
578
  "required": [
579
- "__@toStringTag@308788",
579
+ "__@toStringTag@323656",
580
580
  "byteLength"
581
581
  ]
582
582
  },
@@ -586,18 +586,18 @@
586
586
  "byteLength": {
587
587
  "type": "number"
588
588
  },
589
- "__@species@308826": {
589
+ "__@species@323694": {
590
590
  "$ref": "#/definitions/SharedArrayBuffer"
591
591
  },
592
- "__@toStringTag@308788": {
592
+ "__@toStringTag@323656": {
593
593
  "type": "string",
594
594
  "const": "SharedArrayBuffer"
595
595
  }
596
596
  },
597
597
  "additionalProperties": false,
598
598
  "required": [
599
- "__@species@308826",
600
- "__@toStringTag@308788",
599
+ "__@species@323694",
600
+ "__@toStringTag@323656",
601
601
  "byteLength"
602
602
  ]
603
603
  },
@@ -2,7 +2,15 @@ import { createInterface } from 'readline';
2
2
  import debug from 'debug';
3
3
  import fs from 'fs/promises';
4
4
  import path from 'path';
5
- import { spawn } from 'child_process';
5
+ import { promisify } from 'util';
6
+ import { exec } from 'child_process';
7
+ const execAsync = promisify(exec);
8
+ const waitForCommand = async (cmd, workingDirectory) => new Promise((resolve, reject) => execAsync(cmd, { cwd: workingDirectory }).then(({ stderr }) => {
9
+ if (stderr) {
10
+ return reject(`Error running ${cmd}. See output for more details: \n${stderr}`);
11
+ }
12
+ return resolve();
13
+ }));
6
14
  export const getArgSwitches = () => {
7
15
  return process.argv.reduce((accum, arg, idx) => {
8
16
  if (!arg.startsWith('--')) {
@@ -28,7 +36,11 @@ export const getSourceFiles = async (cwd) => {
28
36
  const buildDir = path.join(cwd, 'build');
29
37
  const files = await fs.readdir(buildDir, { recursive: true });
30
38
  const [httpRoutes, webSocketRoutes] = files.reduce(([httpRoutes, webSocketRoutes], file) => {
39
+ const isInRootDir = !file.includes(path.sep);
31
40
  const parsed = path.parse(file);
41
+ if (isInRootDir) {
42
+ return [httpRoutes, webSocketRoutes];
43
+ }
32
44
  if (parsed.name.endsWith('http')) {
33
45
  httpRoutes.push(path.join(buildDir, file));
34
46
  }
@@ -58,50 +70,10 @@ export const prompt = async (question) => {
58
70
  });
59
71
  });
60
72
  };
73
+ // Exceptions are not caught, since any error would result in a crash regardless
61
74
  export const installDependencies = async (workingDirectory) => {
62
- await new Promise((resolve, reject) => {
63
- spawn('npm', ['i'], {
64
- cwd: workingDirectory,
65
- stdio: 'inherit',
66
- }).once('close', (code) => {
67
- if (code === 0) {
68
- return resolve();
69
- }
70
- return reject(`Error when installing dependencies, see output for more details`);
71
- });
72
- });
73
- await new Promise((resolve, reject) => {
74
- spawn('npx', 'playwright-core install --with-deps chromium firefox webkit'.split(' '), {
75
- cwd: workingDirectory,
76
- stdio: 'inherit',
77
- }).once('close', (code) => {
78
- if (code === 0) {
79
- return resolve();
80
- }
81
- return reject(`Error when installing dependencies, see output for more details`);
82
- });
83
- });
75
+ await waitForCommand('npm install', workingDirectory);
76
+ await waitForCommand('npx playwright-core install --with-deps chromium firefox webkit', workingDirectory);
84
77
  };
85
- export const buildDockerImage = async (cmd, projectDir) => new Promise((resolve, reject) => {
86
- const [docker, ...args] = cmd.split(' ');
87
- spawn(docker, args, {
88
- cwd: projectDir,
89
- stdio: 'inherit',
90
- }).once('close', (code) => {
91
- if (code === 0) {
92
- return resolve();
93
- }
94
- return reject(`Error when building Docker image, see output for more details`);
95
- });
96
- });
97
- export const buildTypeScript = async (buildDir, projectDir) => new Promise((resolve, reject) => {
98
- spawn('npx', ['tsc', '--outDir', buildDir], {
99
- cwd: projectDir,
100
- stdio: 'inherit',
101
- }).once('close', (code) => {
102
- if (code === 0) {
103
- return resolve();
104
- }
105
- return reject(`Error in building TypeScript, see output for more details`);
106
- });
107
- });
78
+ export const buildDockerImage = async (cmd, projectDir) => waitForCommand(cmd, projectDir);
79
+ export const buildTypeScript = async (buildDir, projectDir) => waitForCommand(`npx tsc --outDir ${buildDir}`, projectDir);
package/build/utils.d.ts CHANGED
@@ -17,7 +17,15 @@ export declare const buildDir: string;
17
17
  export declare const tsExtension = ".d.ts";
18
18
  export declare const jsonExtension = ".json";
19
19
  export declare const jsExtension = ".js";
20
+ export declare const isWin: boolean;
20
21
  export declare const id: () => string;
22
+ /**
23
+ * Normalizes a full-path by adding the `file://` protocol if needed.
24
+ *
25
+ * @param filepath - The file path to normalize.
26
+ * @returns The normalized file path.
27
+ */
28
+ export declare const normalizeFileProtocol: (filepath: string) => string;
21
29
  /**
22
30
  * Generates a random, Chromium-compliant page ID with "BLESS"
23
31
  * prepended. This prepended text signals to other parts of the