[test] Update Puppeteer to v22.3.0
Drive-by: remove @puppeteer/replay that is not used in tests
Bug: none
Change-Id: I512794442c43cddd8a40b7816d3fc31f398251d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5318365
Auto-Submit: Alex Rudenko <[email protected]>
Reviewed-by: Simon Zünd <[email protected]>
Commit-Queue: Simon Zünd <[email protected]>
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts.map
index 35044cf..0a6d8fa 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAOrC,OAAO,EAEL,KAAK,OAAO,EAGb,MAAM,gCAAgC,CAAC;AAmCxC;;GAEG;AACH,qBAAa,GAAG;;gBASZ,IAAI,CAAC,EACD,MAAM,GACN;QACE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAC,CAAC;QACnD,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,cAAc,CAAC,EAAE,OAAO,CAAC;aAAE,GAAG,IAAI,OAAO,GAAG,MAAM;SAAC,CAAC,CAAC;KACtD,EACL,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS;IAwDnB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA2OzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAqBvD"}
\ No newline at end of file
+{"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAOrC,OAAO,EAEL,KAAK,OAAO,EAGb,MAAM,gCAAgC,CAAC;AAmCxC;;GAEG;AACH,qBAAa,GAAG;;gBASZ,IAAI,CAAC,EACD,MAAM,GACN;QACE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAC,CAAC;QACnD,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,cAAc,CAAC,EAAE,OAAO,CAAC;aAAE,GAAG,IAAI,OAAO,GAAG,MAAM;SAAC,CAAC,CAAC;KACtD,EACL,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS;IAwDnB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA4PzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAqBvD"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/CLI.js b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js
index 0afcf2d..e20923b 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/CLI.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js
@@ -132,6 +132,9 @@
});
yargs.example('$0 install chrome', `Install the ${latestOrPinned} available build of the Chrome browser.`);
yargs.example('$0 install chrome@latest', 'Install the latest available build for the Chrome browser.');
+ yargs.example('$0 install chrome@stable', 'Install the latest available build for the Chrome browser from the stable channel.');
+ yargs.example('$0 install chrome@beta', 'Install the latest available build for the Chrome browser from the beta channel.');
+ yargs.example('$0 install chrome@dev', 'Install the latest available build for the Chrome browser from the dev channel.');
yargs.example('$0 install chrome@canary', 'Install the latest available build for the Chrome Canary browser.');
yargs.example('$0 install chrome@115', 'Install the latest available build for Chrome 115.');
yargs.example('$0 install chromedriver@canary', 'Install the latest available build for ChromeDriver Canary.');
@@ -159,6 +162,7 @@
}
args.browser.buildId = pinnedVersion;
}
+ const originalBuildId = args.browser.buildId;
args.browser.buildId = await (0, browser_data_js_1.resolveBuildId)(args.browser.name, args.platform, args.browser.buildId);
await (0, install_js_1.install)({
browser: args.browser.name,
@@ -167,6 +171,9 @@
cacheDir: args.path ?? this.#cachePath,
downloadProgressCallback: makeProgressCallback(args.browser.name, args.browser.buildId),
baseUrl: args.baseUrl,
+ buildIdAlias: originalBuildId !== args.browser.buildId
+ ? originalBuildId
+ : undefined,
});
console.log(`${args.browser.name}@${args.browser.buildId} ${(0, launch_js_1.computeExecutablePath)({
browser: args.browser.name,
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map
index 6206e1d..4007b13 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map
@@ -1 +1 @@
-{"version":3,"file":"CLI.js","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAAyD;AACzD,mDAAqC;AAErC,wDAAmC;AAEnC,2CAAsC;AACtC,wDAAgC;AAEhC,oEAKwC;AACxC,yCAAiC;AACjC,2DAA0D;AAC1D,6CAAqC;AACrC,2CAIqB;AA2BrB;;GAEG;AACH,MAAa,GAAG;IACd,UAAU,CAAC;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OAAgB,EAChB,OAAe;IAEf,IAAI,WAAwB,CAAC;IAC7B,IAAI,mBAAmB,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,eAAuB,EAAE,UAAkB,EAAE,EAAE;QACrD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,IAAI,kBAAW,CAC3B,eAAe,OAAO,KAAK,OAAO,MAAM,WAAW,CACjD,UAAU,CACX,yBAAyB,EAC1B;gBACE,QAAQ,EAAE,GAAG;gBACb,UAAU,EAAE,GAAG;gBACf,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,UAAU;aAClB,CACF,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,GAAG,eAAe,GAAG,mBAAmB,CAAC;QACpD,mBAAmB,GAAG,eAAe,CAAC;QACtC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAxBD,oDAwBC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1C,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts
index 5049813..af18af5 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts
@@ -22,6 +22,8 @@
* {@link computeExecutablePath} to get the path to the executable binary.
*/
get path(): string;
+ readMetadata(): Metadata;
+ writeMetadata(metadata: Metadata): void;
}
/**
* @internal
@@ -43,6 +45,9 @@
*/
buildId: string;
}
+export interface Metadata {
+ aliases: Record<string, string>;
+}
/**
* The cache used by Puppeteer relies on the following structure:
*
@@ -65,6 +70,10 @@
*/
get rootDir(): string;
browserRoot(browser: Browser): string;
+ metadataFile(browser: Browser): string;
+ readMetadata(browser: Browser): Metadata;
+ writeMetadata(browser: Browser, metadata: Metadata): void;
+ resolveAlias(browser: Browser, alias: string): string | undefined;
installationDir(browser: Browser, platform: BrowserPlatform, buildId: string): string;
clear(): void;
uninstall(browser: Browser, platform: BrowserPlatform, buildId: string): void;
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts.map
index 3a1aea5..71d5ba4 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EACL,OAAO,EACP,KAAK,eAAe,EAErB,MAAM,gCAAgC,CAAC;AAGxC;;GAEG;AACH,qBAAa,gBAAgB;;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAIhC;;OAEG;gBAED,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,eAAe;IAa3B;;;OAGG;IACH,IAAI,IAAI,IAAI,MAAM,CAMjB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,KAAK;;gBAGJ,OAAO,EAAE,MAAM;IAI3B;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAEp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;;;;;GAaG;AACH,qBAAa,KAAK;;gBAGJ,OAAO,EAAE,MAAM;IAI3B;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM;IAIrC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM;IAItC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ;IAaxC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAMzD,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAUjE,eAAe,CACb,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM;IAIT,KAAK,IAAI,IAAI;IASb,SAAS,CACP,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,IAAI;IAeP,oBAAoB,IAAI,gBAAgB,EAAE;IA+B1C,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,MAAM;CA0BrE"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/Cache.js b/node_modules/@puppeteer/browsers/lib/cjs/Cache.js
index d0512c4..a5eee16 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/Cache.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/Cache.js
@@ -12,8 +12,10 @@
const fs_1 = __importDefault(require("fs"));
const os_1 = __importDefault(require("os"));
const path_1 = __importDefault(require("path"));
+const debug_1 = __importDefault(require("debug"));
const browser_data_js_1 = require("./browser-data/browser-data.js");
const detectPlatform_js_1 = require("./detectPlatform.js");
+const debugCache = (0, debug_1.default)('puppeteer:browsers:cache');
/**
* @public
*/
@@ -44,6 +46,12 @@
get path() {
return this.#cache.installationDir(this.browser, this.platform, this.buildId);
}
+ readMetadata() {
+ return this.#cache.readMetadata(this.browser);
+ }
+ writeMetadata(metadata) {
+ this.#cache.writeMetadata(this.browser, metadata);
+ }
}
exports.InstalledBrowser = InstalledBrowser;
/**
@@ -74,6 +82,35 @@
browserRoot(browser) {
return path_1.default.join(this.#rootDir, browser);
}
+ metadataFile(browser) {
+ return path_1.default.join(this.browserRoot(browser), '.metadata');
+ }
+ readMetadata(browser) {
+ const metatadaPath = this.metadataFile(browser);
+ if (!fs_1.default.existsSync(metatadaPath)) {
+ return { aliases: {} };
+ }
+ // TODO: add type-safe parsing.
+ const data = JSON.parse(fs_1.default.readFileSync(metatadaPath, 'utf8'));
+ if (typeof data !== 'object') {
+ throw new Error('.metadata is not an object');
+ }
+ return data;
+ }
+ writeMetadata(browser, metadata) {
+ const metatadaPath = this.metadataFile(browser);
+ fs_1.default.mkdirSync(path_1.default.dirname(metatadaPath), { recursive: true });
+ fs_1.default.writeFileSync(metatadaPath, JSON.stringify(metadata, null, 2));
+ }
+ resolveAlias(browser, alias) {
+ const metadata = this.readMetadata(browser);
+ if (alias === 'latest') {
+ return Object.values(metadata.aliases || {})
+ .sort((0, browser_data_js_1.getVersionComparator)(browser))
+ .at(-1);
+ }
+ return metadata.aliases[alias];
+ }
installationDir(browser, platform, buildId) {
return path_1.default.join(this.browserRoot(browser), `${platform}-${buildId}`);
}
@@ -86,6 +123,12 @@
});
}
uninstall(browser, platform, buildId) {
+ const metadata = this.readMetadata(browser);
+ for (const alias of Object.keys(metadata.aliases)) {
+ if (metadata.aliases[alias] === buildId) {
+ delete metadata.aliases[alias];
+ }
+ }
fs_1.default.rmSync(this.installationDir(browser, platform, buildId), {
force: true,
recursive: true,
@@ -121,6 +164,13 @@
if (!options.platform) {
throw new Error(`Cannot download a binary for the provided platform: ${os_1.default.platform()} (${os_1.default.arch()})`);
}
+ try {
+ options.buildId =
+ this.resolveAlias(options.browser, options.buildId) ?? options.buildId;
+ }
+ catch {
+ debugCache('could not read .metadata file for the browser');
+ }
const installationDir = this.installationDir(options.browser, options.platform, options.buildId);
return path_1.default.join(installationDir, browser_data_js_1.executablePathByBrowser[options.browser](options.platform, options.buildId));
}
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/Cache.js.map b/node_modules/@puppeteer/browsers/lib/cjs/Cache.js.map
index bd8e4e8..579a06a 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/Cache.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/Cache.js.map
@@ -1 +1 @@
-{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AAExB,oEAIwC;AACxC,2DAA0D;AAE1D;;GAEG;AACH,MAAa,gBAAgB;IAC3B,OAAO,CAAU;IACjB,OAAO,CAAS;IAChB,QAAQ,CAAkB;IACjB,cAAc,CAAS;IAEhC,MAAM,CAAQ;IAEd;;OAEG;IACH,YACE,KAAY,EACZ,OAAgB,EAChB,OAAe,EACf,QAAyB;QAEzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,qBAAqB,CAAC;YAChD,OAAO;YACP,OAAO;YACP,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAChC,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,OAAO,CACb,CAAC;IACJ,CAAC;CACF;AAvCD,4CAuCC;AAuBD;;;;;;;;;;;;;GAaG;AACH,MAAa,KAAK;IAChB,QAAQ,CAAS;IAEjB,YAAY,OAAe;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CA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ElB,MAAM,IAAI,GAAG,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO;IACT,CAAC;IACD,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACnC,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IACD,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC;AAC7B,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts
index 49f52fe..bd6b75d 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts
@@ -31,6 +31,13 @@
chromium: typeof chromium.relativeExecutablePath;
firefox: typeof firefox.relativeExecutablePath;
};
+export declare const versionComparators: {
+ chromedriver: typeof chromeHeadlessShell.compareVersions;
+ "chrome-headless-shell": typeof chromeHeadlessShell.compareVersions;
+ chrome: typeof chromeHeadlessShell.compareVersions;
+ chromium: typeof chromium.compareVersions;
+ firefox: typeof firefox.compareVersions;
+};
export { Browser, BrowserPlatform, ChromeReleaseChannel };
/**
* @public
@@ -44,4 +51,11 @@
* @public
*/
export declare function resolveSystemExecutablePath(browser: Browser, platform: BrowserPlatform, channel: ChromeReleaseChannel): string;
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+export declare function getVersionComparator(browser: Browser): (a: string, b: string) => number;
//# sourceMappingURL=browser-data.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts.map
index b1790b9..e198507 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"browser-data.d.ts","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,eAAe,EAEf,oBAAoB,EACpB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAC,cAAc,EAAC,CAAC;AAE7B,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;CAMnC,CAAC;AAEF,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAC,CAAC;AAExD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+FjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAYR"}
\ No newline at end of file
+{"version":3,"file":"browser-data.d.ts","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,eAAe,EAEf,oBAAoB,EACpB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAC,cAAc,EAAC,CAAC;AAE7B,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;CAMnC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;CAM9B,CAAC;AAEF,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAC,CAAC;AAExD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+FjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAYR;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAElC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js
index 9f02faf..28fe9f4 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js
@@ -28,7 +28,7 @@
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
-exports.resolveSystemExecutablePath = exports.createProfile = exports.resolveBuildId = exports.ChromeReleaseChannel = exports.BrowserPlatform = exports.Browser = exports.executablePathByBrowser = exports.downloadPaths = exports.downloadUrls = void 0;
+exports.getVersionComparator = exports.resolveSystemExecutablePath = exports.createProfile = exports.resolveBuildId = exports.ChromeReleaseChannel = exports.BrowserPlatform = exports.Browser = exports.versionComparators = exports.executablePathByBrowser = exports.downloadPaths = exports.downloadUrls = void 0;
const chromeHeadlessShell = __importStar(require("./chrome-headless-shell.js"));
const chrome = __importStar(require("./chrome.js"));
const chromedriver = __importStar(require("./chromedriver.js"));
@@ -59,6 +59,13 @@
[types_js_1.Browser.CHROMIUM]: chromium.relativeExecutablePath,
[types_js_1.Browser.FIREFOX]: firefox.relativeExecutablePath,
};
+exports.versionComparators = {
+ [types_js_1.Browser.CHROMEDRIVER]: chromedriver.compareVersions,
+ [types_js_1.Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.compareVersions,
+ [types_js_1.Browser.CHROME]: chrome.compareVersions,
+ [types_js_1.Browser.CHROMIUM]: chromium.compareVersions,
+ [types_js_1.Browser.FIREFOX]: firefox.compareVersions,
+};
/**
* @public
*/
@@ -175,4 +182,14 @@
}
}
exports.resolveSystemExecutablePath = resolveSystemExecutablePath;
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+function getVersionComparator(browser) {
+ return exports.versionComparators[browser];
+}
+exports.getVersionComparator = getVersionComparator;
//# sourceMappingURL=browser-data.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js.map
index 615ef64..966b681 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js.map
@@ -1 +1 @@
-{"version":3,"file":"browser-data.js","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gFAAkE;AAClE,oDAAsC;AACtC,gEAAkD;AAClD,wDAA0C;AAC1C,sDAAwC;AACxC,yCAMoB;AA4BZ,wFAjCN,kBAAO,OAiCM;AAAE,gGAhCf,0BAAe,OAgCe;AAAE,qGA9BhC,+BAAoB,OA8BgC;AAxBzC,QAAA,YAAY,GAAG;IAC1B,CAAC,kBAAO,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB;IACvD,CAAC,kBAAO,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,kBAAkB;IACrE,CAAC,kBAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,kBAAkB;IAC3C,CAAC,kBAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,kBAAkB;IAC/C,CAAC,kBAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB;CAC9C,CAAC;AAEW,QAAA,aAAa,GAAG;IAC3B,CAAC,kBAAO,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,mBAAmB;IACxD,CAAC,kBAAO,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,mBAAmB;IACtE,CAAC,kBAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,mBAAmB;IAC5C,CAAC,kBAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,mBAAmB;IAChD,CAAC,kBAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,mBAAmB;CAC/C,CAAC;AAE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aAAa,CACjC,OAAgB,EAChB,IAAoB;IAEpB,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,kBAAO,CAAC,OAAO;YAClB,OAAO,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC3C,KAAK,kBAAO,CAAC,MAAM,CAAC;QACpB,KAAK,kBAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CAAC,uCAAuC,OAAO,MAAM,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAXD,sCAWC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CACzC,OAAgB,EAChB,QAAyB,EACzB,OAA6B;IAE7B,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,kBAAO,CAAC,YAAY,CAAC;QAC1B,KAAK,kBAAO,CAAC,mBAAmB,CAAC;QACjC,KAAK,kBAAO,CAAC,OAAO,CAAC;QACrB,KAAK,kBAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,OAAO,CAChE,CAAC;QACJ,KAAK,kBAAO,CAAC,MAAM;YACjB,OAAO,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAhBD,kEAgBC"}
\ No newline at end of file
+{"version":3,"file":"browser-data.js","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gFAAkE;AAClE,oDAAsC;AACtC,gEAAkD;AAClD,wDAA0C;AAC1C,sDAAwC;AACxC,yCAMoB;AAoCZ,wFAzCN,kBAAO,OAyCM;AAAE,gGAxCf,0BAAe,OAwCe;AAAE,qGAtChC,+BAAoB,OAsCgC;AAhCzC,QAAA,YAAY,GAAG;IAC1B,CAAC,kBAAO,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB;IACvD,CAAC,kBAAO,CAAC,mBAAmB,CAAC,EAAE,m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,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAXD,sCAWC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CACzC,OAAgB,EAChB,QAAyB,EACzB,OAA6B;IAE7B,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,kBAAO,CAAC,YAAY,CAAC;QAC1B,KAAK,kBAAO,CAAC,mBAAmB,CAAC;QACjC,KAAK,kBAAO,CAAC,OAAO,CAAC;QACrB,KAAK,kBAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,OAAO,CAChE,CAAC;QACJ,KAAK,kBAAO,CAAC,MAAM;YACjB,OAAO,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAhBD,kEAgBC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,OAAgB;IAEhB,OAAO,0BAAkB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAJD,oDAIC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts
index cbd385c..d21d11b 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts
@@ -2,5 +2,5 @@
export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
-export { resolveBuildId } from './chrome.js';
+export { resolveBuildId, compareVersions } from './chrome.js';
//# sourceMappingURL=chrome-headless-shell.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts.map
index 884b093..111c511 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"chrome-headless-shell.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAAgE,GACtE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAMV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAoBR;AAED,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
+{"version":3,"file":"chrome-headless-shell.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAMV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAoBR;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js
index d6f2136..2add843 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js
@@ -3,7 +3,7 @@
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
-exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+exports.compareVersions = exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
/**
* @license
* Copyright 2023 Google Inc.
@@ -25,7 +25,7 @@
return 'win64';
}
}
-function resolveDownloadUrl(platform, buildId, baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing') {
+function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
exports.resolveDownloadUrl = resolveDownloadUrl;
@@ -52,4 +52,5 @@
exports.relativeExecutablePath = relativeExecutablePath;
var chrome_js_1 = require("./chrome.js");
Object.defineProperty(exports, "resolveBuildId", { enumerable: true, get: function () { return chrome_js_1.resolveBuildId; } });
+Object.defineProperty(exports, "compareVersions", { enumerable: true, get: function () { return chrome_js_1.compareVersions; } });
//# sourceMappingURL=chrome-headless-shell.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js.map
index a9e5c08..b238582 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js.map
@@ -1 +1 @@
-{"version":3,"file":"chrome-headless-shell.js","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,gDAAwB;AAExB,yCAA2C;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,6DAA6D;IAEvE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO;QACL,OAAO;QACP,MAAM,CAAC,QAAQ,CAAC;QAChB,yBAAyB,MAAM,CAAC,QAAQ,CAAC,MAAM;KAChD,CAAC;AACJ,CAAC;AATD,kDASC;AAED,SAAgB,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,GAAG,CAAC;QACzB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,cAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,uBAAuB,CACxB,CAAC;QACJ,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CACd,+BAA+B,EAC/B,uBAAuB,CACxB,CAAC;QACJ,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,2BAA2B,CAC5B,CAAC;IACN,CAAC;AACH,CAAC;AAvBD,wDAuBC;AAED,yCAA2C;AAAnC,2GAAA,cAAc,OAAA"}
\ No newline at end of file
+{"version":3,"file":"chrome-headless-shell.js","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,gDAAwB;AAExB,yCAA2C;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO;QACL,OAAO;QACP,MAAM,CAAC,QAAQ,CAAC;QAChB,yBAAyB,MAAM,CAAC,QAAQ,CAAC,MAAM;KAChD,CAAC;AACJ,CAAC;AATD,kDASC;AAED,SAAgB,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,GAAG,CAAC;QACzB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,cAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,uBAAuB,CACxB,CAAC;QACJ,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CACd,+BAA+B,EAC/B,uBAAuB,CACxB,CAAC;QACJ,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,2BAA2B,CAC5B,CAAC;IACN,CAAC;AACH,CAAC;AAvBD,wDAuBC;AAED,yCAA4D;AAApD,2GAAA,cAAc,OAAA;AAAE,4GAAA,eAAe,OAAA"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts
index 8cf3884..da0c1e7 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts
@@ -26,4 +26,5 @@
export declare function resolveBuildId(channel: ChromeReleaseChannel): Promise<string>;
export declare function resolveBuildId(channel: string): Promise<string | undefined>;
export declare function resolveSystemExecutablePath(platform: BrowserPlatform, channel: ChromeReleaseChannel): string;
+export declare function compareVersions(a: string, b: string): number;
//# sourceMappingURL=chrome.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts.map
index 347072f..018fee9 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAiBjE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAAgE,GACtE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AAED,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC,CAqB9C;AAED,wBAAsB,mCAAmC,CACvD,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAG,SAAS,CAAC,CAW1D;AAED,wBAAsB,+BAA+B;AACnD;;GAEG;AACH,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAG,SAAS,CAAC,CAW1D;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;AACnB,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAwB/B,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAwCR"}
\ No newline at end of file
+{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,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAc5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js
index b642a7c..30b67dd 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js
@@ -8,8 +8,9 @@
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
-exports.resolveSystemExecutablePath = exports.resolveBuildId = exports.getLastKnownGoodReleaseForBuild = exports.getLastKnownGoodReleaseForMilestone = exports.getLastKnownGoodReleaseForChannel = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+exports.compareVersions = exports.resolveSystemExecutablePath = exports.resolveBuildId = exports.getLastKnownGoodReleaseForBuild = exports.getLastKnownGoodReleaseForMilestone = exports.getLastKnownGoodReleaseForChannel = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
const path_1 = __importDefault(require("path"));
+const semver_1 = __importDefault(require("semver"));
const httpUtil_js_1 = require("../httpUtil.js");
const types_js_1 = require("./types.js");
function folder(platform) {
@@ -26,7 +27,7 @@
return 'win64';
}
}
-function resolveDownloadUrl(platform, buildId, baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing') {
+function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
exports.resolveDownloadUrl = resolveDownloadUrl;
@@ -124,4 +125,22 @@
throw new Error(`Unable to detect browser executable path for '${channel}' on ${platform}.`);
}
exports.resolveSystemExecutablePath = resolveSystemExecutablePath;
+function compareVersions(a, b) {
+ if (!semver_1.default.valid(a)) {
+ throw new Error(`Version ${a} is not a valid semver version`);
+ }
+ if (!semver_1.default.valid(b)) {
+ throw new Error(`Version ${b} is not a valid semver version`);
+ }
+ if (semver_1.default.gt(a, b)) {
+ return 1;
+ }
+ else if (semver_1.default.lt(a, b)) {
+ return -1;
+ }
+ else {
+ return 0;
+ }
+}
+exports.compareVersions = compareVersions;
//# sourceMappingURL=chrome.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js.map
index 36d1b94..f3b9156 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js.map
@@ -1 +1 @@
-{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/browser-data/chrome.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,gDAAwB;AAExB,gDAAuC;AAEvC,yCAAiE;AAEjE,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,6DAA6D;IAEvE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CACjC,QAAy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C;IACX,CAAC;AACH,CAAC;AAdD,0CAcC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts
index 32a0ed1..5a26c3f 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts
@@ -2,5 +2,5 @@
export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
-export { resolveBuildId } from './chrome.js';
+export { resolveBuildId, compareVersions } from './chrome.js';
//# sourceMappingURL=chromedriver.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts.map
index 1fd1631..6f59ef1 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAAgE,GACtE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
+{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js
index d3f2bd5..aa6fe18 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js
@@ -3,7 +3,7 @@
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
-exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+exports.compareVersions = exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
/**
* @license
* Copyright 2023 Google Inc.
@@ -25,7 +25,7 @@
return 'win64';
}
}
-function resolveDownloadUrl(platform, buildId, baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing') {
+function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
exports.resolveDownloadUrl = resolveDownloadUrl;
@@ -48,4 +48,5 @@
exports.relativeExecutablePath = relativeExecutablePath;
var chrome_js_1 = require("./chrome.js");
Object.defineProperty(exports, "resolveBuildId", { enumerable: true, get: function () { return chrome_js_1.resolveBuildId; } });
+Object.defineProperty(exports, "compareVersions", { enumerable: true, get: function () { return chrome_js_1.compareVersions; } });
//# sourceMappingURL=chromedriver.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js.map
index 0ff06d0..9a70f5c 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js.map
@@ -1 +1 @@
-{"version":3,"file":"chromedriver.js","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,gDAAwB;AAExB,yCAA2C;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,6DAA6D;IAEvE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,gBAAgB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC7E,CAAC;AALD,kDAKC;AAED,SAAgB,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,GAAG,CAAC;QACzB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,cAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;QACvE,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC;QAC3D,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC;AAdD,wDAcC;AAED,yCAA2C;AAAnC,2GAAA,cAAc,OAAA"}
\ No newline at end of file
+{"version":3,"file":"chromedriver.js","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,gDAAwB;AAExB,yCAA2C;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,gBAAgB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC7E,CAAC;AALD,kDAKC;AAED,SAAgB,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,GAAG,CAAC;QACzB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,cAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;QACvE,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC;QAC3D,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC;AAdD,wDAcC;AAED,yCAA4D;AAApD,2GAAA,cAAc,OAAA;AAAE,4GAAA,eAAe,OAAA"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts
index 4ff2699..6bcb936 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts
@@ -8,4 +8,5 @@
export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
export declare function resolveBuildId(platform: BrowserPlatform): Promise<string>;
+export declare function compareVersions(a: string, b: string): number;
//# sourceMappingURL=chromium.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts.map
index 701df7e..72e3a10 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"chromium.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AA+B3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA8D,GACpE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AACD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAQjB"}
\ No newline at end of file
+{"version":3,"file":"chromium.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AA+B3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA8D,GACpE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AACD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js
index 86b38ac..e9faeaf 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js
@@ -8,7 +8,7 @@
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
-exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+exports.compareVersions = exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
const path_1 = __importDefault(require("path"));
const httpUtil_js_1 = require("../httpUtil.js");
const types_js_1 = require("./types.js");
@@ -64,4 +64,8 @@
return await (0, httpUtil_js_1.getText)(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
}
exports.resolveBuildId = resolveBuildId;
+function compareVersions(a, b) {
+ return Number(a) - Number(b);
+}
+exports.compareVersions = compareVersions;
//# sourceMappingURL=chromium.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js.map
index 9aea700..31d55f6 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js.map
@@ -1 +1 @@
-{"version":3,"file":"chromium.js","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,gDAAwB;AAExB,gDAAuC;AAEvC,yCAA2C;AAE3C,SAAS,OAAO,CAAC,QAAyB,EAAE,OAAe;IACzD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAc,CAAC;QACxB,KAAK,0BAAe,CAAC,OAAO,CAAC;QAC7B,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,YAAY,CAAC;QACtB,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,2CAA2C;YAC3C,OAAO,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC;IAC1E,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,KAAK,CAAC;QACf,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,KAAK,CAAC;QACf,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,2DAA2D;IAErE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1E,CAAC;AALD,kDAKC;AAED,SAAgB,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,GAAG,CAAC;QACzB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,cAAI,CAAC,IAAI,CACd,YAAY,EACZ,cAAc,EACd,UAAU,EACV,OAAO,EACP,UAAU,CACX,CAAC;QACJ,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAC7C,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AApBD,wDAoBC;AACM,KAAK,UAAU,cAAc,CAClC,QAAyB;IAEzB,OAAO,MAAM,IAAA,qBAAO,EAClB,IAAI,GAAG,CACL,6DAA6D,MAAM,CACjE,QAAQ,CACT,cAAc,CAChB,CACF,CAAC;AACJ,CAAC;AAVD,wCAUC"}
\ No newline at end of file
+{"version":3,"file":"chromium.js","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,gDAAwB;AAExB,gDAAuC;AAEvC,yCAA2C;AAE3C,SAAS,OAAO,CAAC,QAAyB,EAAE,OAAe;IACzD,QAAQ,QAAQ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ACjB,KAAK,0BAAe,CAAC,GAAG,CAAC;QACzB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,cAAI,CAAC,IAAI,CACd,YAAY,EACZ,cAAc,EACd,UAAU,EACV,OAAO,EACP,UAAU,CACX,CAAC;QACJ,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAC7C,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AApBD,wDAoBC;AACM,KAAK,UAAU,cAAc,CAClC,QAAyB;IAEzB,OAAO,MAAM,IAAA,qBAAO,EAClB,IAAI,GAAG,CACL,6DAA6D,MAAM,CACjE,QAAQ,CACT,cAAc,CAChB,CACF,CAAC;AACJ,CAAC;AAVD,wCAUC;AAED,SAAgB,eAAe,CAAC,CAAS,EAAE,CAAS;IAClD,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC;AAFD,0CAEC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts
index b24eb2f..de4a922 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts
@@ -9,4 +9,5 @@
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
export declare function resolveBuildId(channel?: 'FIREFOX_NIGHTLY'): Promise<string>;
export declare function createProfile(options: ProfileOptions): Promise<void>;
+export declare function compareVersions(a: string, b: string): number;
//# sourceMappingURL=firefox.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts.map
index 93f43de..6dd32c6 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"firefox.d.ts","sourceRoot":"","sources":["../../../src/browser-data/firefox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EAAC,eAAe,EAAE,KAAK,cAAc,EAAC,MAAM,YAAY,CAAC;AAehE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA2E,GACjF,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,wBAAsB,cAAc,CAClC,OAAO,GAAE,iBAAqC,GAC7C,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E"}
\ No newline at end of file
+{"version":3,"file":"firefox.d.ts","sourceRoot":"","sources":["../../../src/browser-data/firefox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EAAC,eAAe,EAAE,KAAK,cAAc,EAAC,MAAM,YAAY,CAAC;AAehE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA2E,GACjF,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,wBAAsB,cAAc,CAClC,OAAO,GAAE,iBAAqC,GAC7C,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E;AAwPD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js
index 51202df..a8428d8 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js
@@ -8,7 +8,7 @@
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
-exports.createProfile = exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+exports.compareVersions = exports.createProfile = exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const httpUtil_js_1 = require("../httpUtil.js");
@@ -254,4 +254,9 @@
await fs_1.default.promises.copyFile(prefsPath, prefsBackupPath);
}
}
+function compareVersions(a, b) {
+ // TODO: this is a not very reliable check.
+ return parseInt(a.replace('.', ''), 16) - parseInt(b.replace('.', ''), 16);
+}
+exports.compareVersions = compareVersions;
//# sourceMappingURL=firefox.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js.map
index c96bdd6..2e61616 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js.map
+++ b/node_modules/@puppeteer/browsers/lib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644
--- a/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts
@@ -3,7 +3,7 @@
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
-import { type Browser, type BrowserPlatform } from './browser-data/browser-data.js';
+import { Browser, BrowserPlatform } from './browser-data/browser-data.js';
import { InstalledBrowser } from './Cache.js';
/**
* @public
@@ -29,6 +29,13 @@
*/
buildId: string;
/**
+ * An alias for the provided `buildId`. It will be used to maintain local
+ * metadata to support aliases in the `launch` command.
+ *
+ * @example 'canary'
+ */
+ buildIdAlias?: string;
+ /**
* Provides information about the progress of the download.
*/
downloadProgressCallback?: (downloadedBytes: number, totalBytes: number) => void;
@@ -37,7 +44,7 @@
*
* @defaultValue Either
*
- * - https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing or
+ * - https://storage.googleapis.com/chrome-for-testing-public or
* - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
*
*/
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts.map
index 8a635f0..d60705c 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,eAAe,EAErB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAQ,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAwBnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ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AAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAaxE;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAE7B;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAe3E"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.js b/node_modules/@puppeteer/browsers/lib/cjs/install.js
index 2688115..043db1f 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/install.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/install.js
@@ -41,6 +41,55 @@
throw new Error(`Cannot download a binary for the provided platform: ${os_1.default.platform()} (${os_1.default.arch()})`);
}
const url = getDownloadUrl(options.browser, options.platform, options.buildId, options.baseUrl);
+ try {
+ return await installUrl(url, options);
+ }
+ catch (err) {
+ debugInstall(`Error downloading from ${url}.`);
+ switch (options.browser) {
+ case browser_data_js_1.Browser.CHROME:
+ case browser_data_js_1.Browser.CHROMEDRIVER:
+ case browser_data_js_1.Browser.CHROMEHEADLESSSHELL: {
+ debugInstall(`Trying to find download URL via https://googlechromelabs.github.io/chrome-for-testing.`);
+ const version = (await (0, httpUtil_js_1.getJSON)(new URL(`https://googlechromelabs.github.io/chrome-for-testing/${options.buildId}.json`)));
+ let platform = '';
+ switch (options.platform) {
+ case browser_data_js_1.BrowserPlatform.LINUX:
+ platform = 'linux64';
+ break;
+ case browser_data_js_1.BrowserPlatform.MAC_ARM:
+ platform = 'mac-arm64';
+ break;
+ case browser_data_js_1.BrowserPlatform.MAC:
+ platform = 'mac-x64';
+ break;
+ case browser_data_js_1.BrowserPlatform.WIN32:
+ platform = 'win32';
+ break;
+ case browser_data_js_1.BrowserPlatform.WIN64:
+ platform = 'win64';
+ break;
+ }
+ const url = version.downloads[options.browser]?.find(link => {
+ return link['platform'] === platform;
+ })?.url;
+ if (url) {
+ debugInstall(`Falling back to downloading from ${url}.`);
+ return await installUrl(new URL(url), options);
+ }
+ throw err;
+ }
+ default:
+ throw err;
+ }
+ }
+}
+exports.install = install;
+async function installUrl(url, options) {
+ options.platform ??= (0, detectPlatform_js_1.detectBrowserPlatform)();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os_1.default.platform()} (${os_1.default.arch()})`);
+ }
const fileName = url.toString().split('/').pop();
(0, assert_1.default)(fileName, `A malformed download URL was found: ${url}.`);
const cache = new Cache_js_1.Cache(options.cacheDir);
@@ -60,10 +109,14 @@
return archivePath;
}
const outputPath = cache.installationDir(options.browser, options.platform, options.buildId);
- if ((0, fs_1.existsSync)(outputPath)) {
- return new Cache_js_1.InstalledBrowser(cache, options.browser, options.buildId, options.platform);
- }
try {
+ if ((0, fs_1.existsSync)(outputPath)) {
+ const installedBrowser = new Cache_js_1.InstalledBrowser(cache, options.browser, options.buildId, options.platform);
+ if (!(0, fs_1.existsSync)(installedBrowser.executablePath)) {
+ throw new Error(`The browser folder (${outputPath}) exists but the executable (${installedBrowser.executablePath}) is missing`);
+ }
+ return installedBrowser;
+ }
debugInstall(`Downloading binary from ${url}`);
try {
debugTime('download');
@@ -80,15 +133,20 @@
finally {
debugTimeEnd('extract');
}
+ const installedBrowser = new Cache_js_1.InstalledBrowser(cache, options.browser, options.buildId, options.platform);
+ if (options.buildIdAlias) {
+ const metadata = installedBrowser.readMetadata();
+ metadata.aliases[options.buildIdAlias] = options.buildId;
+ installedBrowser.writeMetadata(metadata);
+ }
+ return installedBrowser;
}
finally {
if ((0, fs_1.existsSync)(archivePath)) {
await (0, promises_1.unlink)(archivePath);
}
}
- return new Cache_js_1.InstalledBrowser(cache, options.browser, options.buildId, options.platform);
}
-exports.install = install;
/**
*
* @public
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.js.map b/node_modules/@puppeteer/browsers/lib/cjs/install.js.map
index 7959ec1..7dcbc51 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/install.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/install.js.map
@@ -1 +1 @@
-{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,oDAA4B;AAC5B,2BAA8B;AAC9B,0CAA0C;AAC1C,4CAAoB;AACpB,gDAAwB;AAExB,oEAIwC;AACxC,yCAAmD;AACnD,yCAAiC;AACjC,2DAA0D;AAC1D,+CAA4C;AAC5C,+CAA4D;AAE5D,MAAM,YAAY,GAAG,IAAA,gBAAK,EAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAM,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;AAClD,SAAS,SAAS,CAAC,KAAa;IAC9B,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GACZ,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,qCAAqC;IAC1G,YAAY,CAAC,gBAAgB,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC;AACvD,CAAC;AA8DM,KAAK,UAAU,OA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ACb,2CAA2C,YAAE,CAAC,QAAQ,EAAE,KAAK,YAAE,CAAC,IAAI,EAAE,GAAG,CAC1E,CAAC;IACJ,CAAC;IAED,IAAI,gBAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,SAAS,CACnC,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,CAChB,CAAC;AACJ,CAAC;AAbD,8BAaC;AAYD;;;;GAIG;AACI,KAAK,UAAU,oBAAoB,CACxC,OAAoC;IAEpC,OAAO,IAAI,gBAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,oBAAoB,EAAE,CAAC;AAC5D,CAAC;AAJD,oDAIC;AAED;;GAEG;AACI,KAAK,UAAU,WAAW,CAAC,OAAuB;IACvD,OAAO,CAAC,QAAQ,KAAK,IAAA,yCAAqB,GAAE,CAAC;IAC7C,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,uDAAuD,YAAE,CAAC,QAAQ,EAAE,KAAK,YAAE,CAAC,IAAI,EAAE,GAAG,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,IAAA,6BAAe,EAC1B,cAAc,CACZ,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,OAAO,CAChB,CACF,CAAC;AACJ,CAAC;AAfD,kCAeC;AAED,SAAS,cAAc,CACrB,OAAgB,EAChB,QAAyB,EACzB,OAAe,EACf,OAAgB;IAEhB,OAAO,IAAI,GAAG,CAAC,8BAAY,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts
index 6e4355d..9ca6ab1 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts
@@ -9,7 +9,7 @@
export { install, getInstalledBrowsers, canDownload, uninstall, } from './install.js';
export { detectBrowserPlatform } from './detectPlatform.js';
export type { ProfileOptions } from './browser-data/browser-data.js';
-export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, } from './browser-data/browser-data.js';
+export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, getVersionComparator, } from './browser-data/browser-data.js';
export { CLI, makeProgressCallback } from './CLI.js';
export { Cache, InstalledBrowser } from './Cache.js';
//# sourceMappingURL=main.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts.map
index 74ebb54..a6c0b8e 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,4BAA4B,IAAI,OAAO,EACvC,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAC,cAAc,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,GACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
+{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,4BAA4B,IAAI,OAAO,EACvC,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAC,cAAc,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main.js b/node_modules/@puppeteer/browsers/lib/cjs/main.js
index c0453ed..b4cdbb1 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/main.js
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main.js
@@ -5,7 +5,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
Object.defineProperty(exports, "__esModule", { value: true });
-exports.InstalledBrowser = exports.Cache = exports.makeProgressCallback = exports.CLI = exports.createProfile = exports.ChromeReleaseChannel = exports.BrowserPlatform = exports.Browser = exports.resolveBuildId = exports.detectBrowserPlatform = exports.uninstall = exports.canDownload = exports.getInstalledBrowsers = exports.install = exports.Process = exports.WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = exports.CDP_WEBSOCKET_ENDPOINT_REGEX = exports.TimeoutError = exports.computeSystemExecutablePath = exports.computeExecutablePath = exports.launch = void 0;
+exports.InstalledBrowser = exports.Cache = exports.makeProgressCallback = exports.CLI = exports.getVersionComparator = exports.createProfile = exports.ChromeReleaseChannel = exports.BrowserPlatform = exports.Browser = exports.resolveBuildId = exports.detectBrowserPlatform = exports.uninstall = exports.canDownload = exports.getInstalledBrowsers = exports.install = exports.Process = exports.WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = exports.CDP_WEBSOCKET_ENDPOINT_REGEX = exports.TimeoutError = exports.computeSystemExecutablePath = exports.computeExecutablePath = exports.launch = void 0;
var launch_js_1 = require("./launch.js");
Object.defineProperty(exports, "launch", { enumerable: true, get: function () { return launch_js_1.launch; } });
Object.defineProperty(exports, "computeExecutablePath", { enumerable: true, get: function () { return launch_js_1.computeExecutablePath; } });
@@ -27,6 +27,7 @@
Object.defineProperty(exports, "BrowserPlatform", { enumerable: true, get: function () { return browser_data_js_1.BrowserPlatform; } });
Object.defineProperty(exports, "ChromeReleaseChannel", { enumerable: true, get: function () { return browser_data_js_1.ChromeReleaseChannel; } });
Object.defineProperty(exports, "createProfile", { enumerable: true, get: function () { return browser_data_js_1.createProfile; } });
+Object.defineProperty(exports, "getVersionComparator", { enumerable: true, get: function () { return browser_data_js_1.getVersionComparator; } });
var CLI_js_1 = require("./CLI.js");
Object.defineProperty(exports, "CLI", { enumerable: true, get: function () { return CLI_js_1.CLI; } });
Object.defineProperty(exports, "makeProgressCallback", { enumerable: true, get: function () { return CLI_js_1.makeProgressCallback; } });
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main.js.map b/node_modules/@puppeteer/browsers/lib/cjs/main.js.map
index 9c14b38..71c1ad4 100644
--- a/node_modules/@puppeteer/browsers/lib/cjs/main.js.map
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main.js.map
@@ -1 +1 @@
-{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAOH,yCAQqB;AAPnB,mGAAA,MAAM,OAAA;AACN,kHAAA,qBAAqB,OAAA;AACrB,wHAAA,2BAA2B,OAAA;AAC3B,yGAAA,YAAY,OAAA;AACZ,yHAAA,4BAA4B,OAAA;AAC5B,oIAAA,uCAAuC,OAAA;AACvC,oGAAA,OAAO,OAAA;AAOT,2CAKsB;AAJpB,qGAAA,OAAO,OAAA;AACP,kHAAA,oBAAoB,OAAA;AACpB,yGAAA,WAAW,OAAA;AACX,uGAAA,SAAS,OAAA;AAEX,yDAA0D;AAAlD,0HAAA,qBAAqB,OAAA;AAE7B,kEAMwC;AALtC,iHAAA,cAAc,OAAA;AACd,0GAAA,OAAO,OAAA;AACP,kHAAA,eAAe,OAAA;AACf,uHAAA,oBAAoB,OAAA;AACpB,gHAAA,aAAa,OAAA;AAEf,mCAAmD;AAA3C,6FAAA,GAAG,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AACjC,uCAAmD;AAA3C,iGAAA,KAAK,OAAA;AAAE,4GAAA,gBAAgB,OAAA"}
\ No newline at end of file
+{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAOH,yCAQqB;AAPnB,mGAAA,MAAM,OAAA;AACN,kHAAA,qBAAqB,OAAA;AACrB,wHAAA,2BAA2B,OAAA;AAC3B,yGAAA,YAAY,OAAA;AACZ,yHAAA,4BAA4B,OAAA;AAC5B,oIAAA,uCAAuC,OAAA;AACvC,oGAAA,OAAO,OAAA;AAOT,2CAKsB;AAJpB,qGAAA,OAAO,OAAA;AACP,kHAAA,oBAAoB,OAAA;AACpB,yGAAA,WAAW,OAAA;AACX,uGAAA,SAAS,OAAA;AAEX,yDAA0D;AAAlD,0HAAA,qBAAqB,OAAA;AAE7B,kEAOwC;AANtC,iHAAA,cAAc,OAAA;AACd,0GAAA,OAAO,OAAA;AACP,kHAAA,eAAe,OAAA;AACf,uHAAA,oBAAoB,OAAA;AACpB,gHAAA,aAAa,OAAA;AACb,uHAAA,oBAAoB,OAAA;AAEtB,mCAAmD;AAA3C,6FAAA,GAAG,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AACjC,uCAAmD;AAA3C,iGAAA,KAAK,OAAA;AAAE,4GAAA,gBAAgB,OAAA"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts.map
index 35044cf..0a6d8fa 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAOrC,OAAO,EAEL,KAAK,OAAO,EAGb,MAAM,gCAAgC,CAAC;AAmCxC;;GAEG;AACH,qBAAa,GAAG;;gBASZ,IAAI,CAAC,EACD,MAAM,GACN;QACE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAC,CAAC;QACnD,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,cAAc,CAAC,EAAE,OAAO,CAAC;aAAE,GAAG,IAAI,OAAO,GAAG,MAAM;SAAC,CAAC,CAAC;KACtD,EACL,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS;IAwDnB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA2OzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAqBvD"}
\ No newline at end of file
+{"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAOrC,OAAO,EAEL,KAAK,OAAO,EAGb,MAAM,gCAAgC,CAAC;AAmCxC;;GAEG;AACH,qBAAa,GAAG;;gBASZ,IAAI,CAAC,EACD,MAAM,GACN;QACE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAC,CAAC;QACnD,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,cAAc,CAAC,EAAE,OAAO,CAAC;aAAE,GAAG,IAAI,OAAO,GAAG,MAAM;SAAC,CAAC,CAAC;KACtD,EACL,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS;IAwDnB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA4PzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAqBvD"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/CLI.js b/node_modules/@puppeteer/browsers/lib/esm/CLI.js
index fc2a725..cd0ce9a 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/CLI.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/CLI.js
@@ -103,6 +103,9 @@
});
yargs.example('$0 install chrome', `Install the ${latestOrPinned} available build of the Chrome browser.`);
yargs.example('$0 install chrome@latest', 'Install the latest available build for the Chrome browser.');
+ yargs.example('$0 install chrome@stable', 'Install the latest available build for the Chrome browser from the stable channel.');
+ yargs.example('$0 install chrome@beta', 'Install the latest available build for the Chrome browser from the beta channel.');
+ yargs.example('$0 install chrome@dev', 'Install the latest available build for the Chrome browser from the dev channel.');
yargs.example('$0 install chrome@canary', 'Install the latest available build for the Chrome Canary browser.');
yargs.example('$0 install chrome@115', 'Install the latest available build for Chrome 115.');
yargs.example('$0 install chromedriver@canary', 'Install the latest available build for ChromeDriver Canary.');
@@ -130,6 +133,7 @@
}
args.browser.buildId = pinnedVersion;
}
+ const originalBuildId = args.browser.buildId;
args.browser.buildId = await resolveBuildId(args.browser.name, args.platform, args.browser.buildId);
await install({
browser: args.browser.name,
@@ -138,6 +142,9 @@
cacheDir: args.path ?? this.#cachePath,
downloadProgressCallback: makeProgressCallback(args.browser.name, args.browser.buildId),
baseUrl: args.baseUrl,
+ buildIdAlias: originalBuildId !== args.browser.buildId
+ ? originalBuildId
+ : undefined,
});
console.log(`${args.browser.name}@${args.browser.buildId} ${computeExecutablePath({
browser: args.browser.name,
diff --git a/node_modules/@puppeteer/browsers/lib/esm/CLI.js.map b/node_modules/@puppeteer/browsers/lib/esm/CLI.js.map
index ab2ba8a..8f72c37 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/CLI.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/CLI.js.map
@@ -1 +1 @@
-{"version":3,"file":"CLI.js","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAC,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,Q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KAAa;IAChC,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1C,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts b/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts
index 5049813..af18af5 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts
@@ -22,6 +22,8 @@
* {@link computeExecutablePath} to get the path to the executable binary.
*/
get path(): string;
+ readMetadata(): Metadata;
+ writeMetadata(metadata: Metadata): void;
}
/**
* @internal
@@ -43,6 +45,9 @@
*/
buildId: string;
}
+export interface Metadata {
+ aliases: Record<string, string>;
+}
/**
* The cache used by Puppeteer relies on the following structure:
*
@@ -65,6 +70,10 @@
*/
get rootDir(): string;
browserRoot(browser: Browser): string;
+ metadataFile(browser: Browser): string;
+ readMetadata(browser: Browser): Metadata;
+ writeMetadata(browser: Browser, metadata: Metadata): void;
+ resolveAlias(browser: Browser, alias: string): string | undefined;
installationDir(browser: Browser, platform: BrowserPlatform, buildId: string): string;
clear(): void;
uninstall(browser: Browser, platform: BrowserPlatform, buildId: string): void;
diff --git a/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts.map
index 3a1aea5..71d5ba4 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EACL,OAAO,EACP,KAAK,eAAe,EAErB,MAAM,gCAAgC,CAAC;AAGxC;;GAEG;AACH,qBAAa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AM,GACd,IAAI;IAeP,oBAAoB,IAAI,gBAAgB,EAAE;IA+B1C,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,MAAM;CA0BrE"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/Cache.js b/node_modules/@puppeteer/browsers/lib/esm/Cache.js
index 0af8720..bacf330 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/Cache.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/Cache.js
@@ -6,8 +6,10 @@
import fs from 'fs';
import os from 'os';
import path from 'path';
-import { Browser, executablePathByBrowser, } from './browser-data/browser-data.js';
+import debug from 'debug';
+import { Browser, executablePathByBrowser, getVersionComparator, } from './browser-data/browser-data.js';
import { detectBrowserPlatform } from './detectPlatform.js';
+const debugCache = debug('puppeteer:browsers:cache');
/**
* @public
*/
@@ -38,6 +40,12 @@
get path() {
return this.#cache.installationDir(this.browser, this.platform, this.buildId);
}
+ readMetadata() {
+ return this.#cache.readMetadata(this.browser);
+ }
+ writeMetadata(metadata) {
+ this.#cache.writeMetadata(this.browser, metadata);
+ }
}
/**
* The cache used by Puppeteer relies on the following structure:
@@ -67,6 +75,35 @@
browserRoot(browser) {
return path.join(this.#rootDir, browser);
}
+ metadataFile(browser) {
+ return path.join(this.browserRoot(browser), '.metadata');
+ }
+ readMetadata(browser) {
+ const metatadaPath = this.metadataFile(browser);
+ if (!fs.existsSync(metatadaPath)) {
+ return { aliases: {} };
+ }
+ // TODO: add type-safe parsing.
+ const data = JSON.parse(fs.readFileSync(metatadaPath, 'utf8'));
+ if (typeof data !== 'object') {
+ throw new Error('.metadata is not an object');
+ }
+ return data;
+ }
+ writeMetadata(browser, metadata) {
+ const metatadaPath = this.metadataFile(browser);
+ fs.mkdirSync(path.dirname(metatadaPath), { recursive: true });
+ fs.writeFileSync(metatadaPath, JSON.stringify(metadata, null, 2));
+ }
+ resolveAlias(browser, alias) {
+ const metadata = this.readMetadata(browser);
+ if (alias === 'latest') {
+ return Object.values(metadata.aliases || {})
+ .sort(getVersionComparator(browser))
+ .at(-1);
+ }
+ return metadata.aliases[alias];
+ }
installationDir(browser, platform, buildId) {
return path.join(this.browserRoot(browser), `${platform}-${buildId}`);
}
@@ -79,6 +116,12 @@
});
}
uninstall(browser, platform, buildId) {
+ const metadata = this.readMetadata(browser);
+ for (const alias of Object.keys(metadata.aliases)) {
+ if (metadata.aliases[alias] === buildId) {
+ delete metadata.aliases[alias];
+ }
+ }
fs.rmSync(this.installationDir(browser, platform, buildId), {
force: true,
recursive: true,
@@ -114,6 +157,13 @@
if (!options.platform) {
throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
}
+ try {
+ options.buildId =
+ this.resolveAlias(options.browser, options.buildId) ?? options.buildId;
+ }
+ catch {
+ debugCache('could not read .metadata file for the browser');
+ }
const installationDir = this.installationDir(options.browser, options.platform, options.buildId);
return path.join(installationDir, executablePathByBrowser[options.browser](options.platform, options.buildId));
}
diff --git a/node_modules/@puppeteer/browsers/lib/esm/Cache.js.map b/node_modules/@puppeteer/browsers/lib/esm/Cache.js.map
index b198310..1aed348 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/Cache.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/Cache.js.map
@@ -1 +1 @@
-{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,OAAO,EAEP,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAC3B,OAAO,CAAU;IACjB,OAAO,CAAS;IAChB,QAAQ,CAAkB;IACjB,cAAc,CAAS;IAEhC,MAAM,CAAQ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ib/esm/browser-data/browser-data.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts
index 49f52fe..bd6b75d 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts
@@ -31,6 +31,13 @@
chromium: typeof chromium.relativeExecutablePath;
firefox: typeof firefox.relativeExecutablePath;
};
+export declare const versionComparators: {
+ chromedriver: typeof chromeHeadlessShell.compareVersions;
+ "chrome-headless-shell": typeof chromeHeadlessShell.compareVersions;
+ chrome: typeof chromeHeadlessShell.compareVersions;
+ chromium: typeof chromium.compareVersions;
+ firefox: typeof firefox.compareVersions;
+};
export { Browser, BrowserPlatform, ChromeReleaseChannel };
/**
* @public
@@ -44,4 +51,11 @@
* @public
*/
export declare function resolveSystemExecutablePath(browser: Browser, platform: BrowserPlatform, channel: ChromeReleaseChannel): string;
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+export declare function getVersionComparator(browser: Browser): (a: string, b: string) => number;
//# sourceMappingURL=browser-data.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts.map
index b1790b9..e198507 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"browser-data.d.ts","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,eAAe,EAEf,oBAAoB,EACpB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAC,cAAc,EAAC,CAAC;AAE7B,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;CAMnC,CAAC;AAEF,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAC,CAAC;AAExD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+FjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAYR"}
\ No newline at end of file
+{"version":3,"file":"browser-data.d.ts","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,eAAe,EAEf,oBAAoB,EACpB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAC,cAAc,EAAC,CAAC;AAE7B,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;CAMnC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;CAM9B,CAAC;AAEF,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAC,CAAC;AAExD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+FjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAYR;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAElC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js
index 1afc9c6..75a7365 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js
@@ -30,6 +30,13 @@
[Browser.CHROMIUM]: chromium.relativeExecutablePath,
[Browser.FIREFOX]: firefox.relativeExecutablePath,
};
+export const versionComparators = {
+ [Browser.CHROMEDRIVER]: chromedriver.compareVersions,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.compareVersions,
+ [Browser.CHROME]: chrome.compareVersions,
+ [Browser.CHROMIUM]: chromium.compareVersions,
+ [Browser.FIREFOX]: firefox.compareVersions,
+};
export { Browser, BrowserPlatform, ChromeReleaseChannel };
/**
* @public
@@ -144,4 +151,13 @@
return chrome.resolveSystemExecutablePath(platform, channel);
}
}
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+export function getVersionComparator(browser) {
+ return versionComparators[browser];
+}
//# sourceMappingURL=browser-data.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js.map
index 62412df..b22f1b3 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js.map
@@ -1 +1 @@
-{"version":3,"file":"browser-data.js","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,eAAe,EACf,UAAU,EACV,oBAAoB,GAErB,MAAM,YAAY,CAAC;AAIpB,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB;IACvD,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,kBAAkB;IACrE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,kBAAkB;IAC3C,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,kBAAkB;IAC/C,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB;CAC9C,CAAC;AA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,UAAU,CAAC,MAAM;oBACpB,OAAO,MAAM,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;gBACjD,KAAK,UAAU,CAAC,IAAI,CAAC;gBACrB,KAAK,UAAU,CAAC,MAAM,CAAC;gBACvB,KAAK,UAAU,CAAC,GAAG,CAAC;gBACpB,KAAK,UAAU,CAAC,MAAM;oBACpB,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,yBAAyB,OAAO,yBAAyB,CAChE,CAAC;YACN,CAAC;IACL,CAAC;IACD,oEAAoE;IACpE,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAgB,EAChB,IAAoB;IAEpB,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,OAAO,CAAC,OAAO;YAClB,OAAO,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC3C,KAAK,OAAO,CAAC,MAAM,CAAC;QACpB,KAAK,OAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CAAC,uCAAuC,OAAO,MAAM,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CACzC,OAAgB,EAChB,QAAyB,EACzB,OAA6B;IAE7B,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,OAAO,CAAC,YAAY,CAAC;QAC1B,KAAK,OAAO,CAAC,mBAAmB,CAAC;QACjC,KAAK,OAAO,CAAC,OAAO,CAAC;QACrB,KAAK,OAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,OAAO,CAChE,CAAC;QACJ,KAAK,OAAO,CAAC,MAAM;YACjB,OAAO,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;AACH,CAAC"}
\ No newline at end of file
+{"version":3,"file":"browser-data.js","sourceRoot":"","sources":["../../../src/browser-data/browser-data.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ACvB,KAAK,UAAU,CAAC,GAAG,CAAC;gBACpB,KAAK,UAAU,CAAC,MAAM;oBACpB,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,yBAAyB,OAAO,yBAAyB,CAChE,CAAC;YACN,CAAC;IACL,CAAC;IACD,oEAAoE;IACpE,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAgB,EAChB,IAAoB;IAEpB,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,OAAO,CAAC,OAAO;YAClB,OAAO,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC3C,KAAK,OAAO,CAAC,MAAM,CAAC;QACpB,KAAK,OAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CAAC,uCAAuC,OAAO,MAAM,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CACzC,OAAgB,EAChB,QAAyB,EACzB,OAA6B;IAE7B,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,OAAO,CAAC,YAAY,CAAC;QAC1B,KAAK,OAAO,CAAC,mBAAmB,CAAC;QACjC,KAAK,OAAO,CAAC,OAAO,CAAC;QACrB,KAAK,OAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,OAAO,CAChE,CAAC;QACJ,KAAK,OAAO,CAAC,MAAM;YACjB,OAAO,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAgB;IAEhB,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts
index cbd385c..d21d11b 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts
@@ -2,5 +2,5 @@
export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
-export { resolveBuildId } from './chrome.js';
+export { resolveBuildId, compareVersions } from './chrome.js';
//# sourceMappingURL=chrome-headless-shell.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts.map
index 884b093..111c511 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"chrome-headless-shell.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAAgE,GACtE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAMV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAoBR;AAED,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
+{"version":3,"file":"chrome-headless-shell.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAMV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAoBR;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js
index 870b234..4c31584 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js
@@ -19,7 +19,7 @@
return 'win64';
}
}
-export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing') {
+export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
export function resolveDownloadPath(platform, buildId) {
@@ -41,5 +41,5 @@
return path.join('chrome-headless-shell-' + folder(platform), 'chrome-headless-shell.exe');
}
}
-export { resolveBuildId } from './chrome.js';
+export { resolveBuildId, compareVersions } from './chrome.js';
//# sourceMappingURL=chrome-headless-shell.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js.map
index c246059..ccfe09d 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js.map
@@ -1 +1 @@
-{"version":3,"file":"chrome-headless-shell.js","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,6DAA6D;IAEvE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO;QACL,OAAO;QACP,MAAM,CAAC,QAAQ,CAAC;QAChB,yBAAyB,MAAM,CAAC,QAAQ,CAAC,MAAM;KAChD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,GAAG,CAAC;QACzB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,IAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,uBAAuB,CACxB,CAAC;QACJ,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CACd,+BAA+B,EAC/B,uBAAuB,CACxB,CAAC;QACJ,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,2BAA2B,CAC5B,CAAC;IACN,CAAC;AACH,CAAC;AAED,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
+{"version":3,"file":"chrome-headless-shell.js","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO;QACL,OAAO;QACP,MAAM,CAAC,QAAQ,CAAC;QAChB,yBAAyB,MAAM,CAAC,QAAQ,CAAC,MAAM;KAChD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,GAAG,CAAC;QACzB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,IAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,uBAAuB,CACxB,CAAC;QACJ,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CACd,+BAA+B,EAC/B,uBAAuB,CACxB,CAAC;QACJ,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,2BAA2B,CAC5B,CAAC;IACN,CAAC;AACH,CAAC;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts
index 8cf3884..da0c1e7 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts
@@ -26,4 +26,5 @@
export declare function resolveBuildId(channel: ChromeReleaseChannel): Promise<string>;
export declare function resolveBuildId(channel: string): Promise<string | undefined>;
export declare function resolveSystemExecutablePath(platform: BrowserPlatform, channel: ChromeReleaseChannel): string;
+export declare function compareVersions(a: string, b: string): number;
//# sourceMappingURL=chrome.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts.map
index 347072f..018fee9 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAiBjE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAAgE,GACtE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AAED,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC,CAqB9C;AAED,wBAAsB,mCAAmC,CACvD,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAG,SAAS,CAAC,CAW1D;AAED,wBAAsB,+BAA+B;AACnD;;GAEG;AACH,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAG,SAAS,CAAC,CAW1D;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;AACnB,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,GACd,O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AS,CAAC,CAAC;AAwB/B,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAwCR;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAc5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js
index 9de4c0d..12ef15f 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import path from 'path';
+import semver from 'semver';
import { getJSON } from '../httpUtil.js';
import { BrowserPlatform, ChromeReleaseChannel } from './types.js';
function folder(platform) {
@@ -20,7 +21,7 @@
return 'win64';
}
}
-export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing') {
+export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
export function resolveDownloadPath(platform, buildId) {
@@ -110,4 +111,21 @@
}
throw new Error(`Unable to detect browser executable path for '${channel}' on ${platform}.`);
}
+export function compareVersions(a, b) {
+ if (!semver.valid(a)) {
+ throw new Error(`Version ${a} is not a valid semver version`);
+ }
+ if (!semver.valid(b)) {
+ throw new Error(`Version ${b} is not a valid semver version`);
+ }
+ if (semver.gt(a, b)) {
+ return 1;
+ }
+ else if (semver.lt(a, b)) {
+ return -1;
+ }
+ else {
+ return 0;
+ }
+}
//# sourceMappingURL=chrome.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js.map
index 7926ff6..3651ad8 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js.map
@@ -1 +1 @@
-{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/browser-data/chrome.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAEjE,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,6DAA6D;IAEvE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;Q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E,CAAC;YAClF,CAAC;QACH,KAAK,eAAe,CAAC,KAAK;YACxB,QAAQ,OAAO,EAAE,CAAC;gBAChB,KAAK,oBAAoB,CAAC,MAAM;oBAC9B,OAAO,2BAA2B,CAAC;gBACrC,KAAK,oBAAoB,CAAC,IAAI;oBAC5B,OAAO,gCAAgC,CAAC;gBAC1C,KAAK,oBAAoB,CAAC,GAAG;oBAC3B,OAAO,oCAAoC,CAAC;YAChD,CAAC;IACL,CAAC;IAED,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,QAAQ,QAAQ,GAAG,CAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAS,EAAE,CAAS;IAClD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,gCAAgC,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,gCAAgC,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts
index 32a0ed1..5a26c3f 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts
@@ -2,5 +2,5 @@
export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
-export { resolveBuildId } from './chrome.js';
+export { resolveBuildId, compareVersions } from './chrome.js';
//# sourceMappingURL=chromedriver.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts.map
index 1fd1631..6f59ef1 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAAgE,GACtE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
+{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js
index d98891b..3e31d2f 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js
@@ -19,7 +19,7 @@
return 'win64';
}
}
-export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing') {
+export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
export function resolveDownloadPath(platform, buildId) {
@@ -37,5 +37,5 @@
return path.join('chromedriver-' + folder(platform), 'chromedriver.exe');
}
}
-export { resolveBuildId } from './chrome.js';
+export { resolveBuildId, compareVersions } from './chrome.js';
//# sourceMappingURL=chromedriver.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js.map
index 999bb69..744536d 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js.map
@@ -1 +1 @@
-{"version":3,"file":"chromedriver.js","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,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K;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC;AAED,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
+{"version":3,"file":"chromedriver.js","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,gBAAgB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,GAAG,CAAC;QACzB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;QACvE,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC;QAC3D,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts
index 4ff2699..6bcb936 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts
@@ -8,4 +8,5 @@
export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
export declare function resolveBuildId(platform: BrowserPlatform): Promise<string>;
+export declare function compareVersions(a: string, b: string): number;
//# sourceMappingURL=chromium.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts.map
index 701df7e..72e3a10 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"chromium.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AA+B3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA8D,GACpE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AACD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAQjB"}
\ No newline at end of file
+{"version":3,"file":"chromium.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AA+B3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA8D,GACpE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AACD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js
index a6627b9..0e0228a 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js
@@ -54,4 +54,7 @@
export async function resolveBuildId(platform) {
return await getText(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
}
+export function compareVersions(a, b) {
+ return Number(a) - Number(b);
+}
//# sourceMappingURL=chromium.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js.map
index bfee699..d3d6430 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js.map
@@ -1 +1 @@
-{"version":3,"file":"chromium.js","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAE3C,SAAS,OAAO,CAAC,QAAyB,EAAE,OAAe;IACzD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,cAAc,CAAC;QACxB,KAAK,eAAe,CAAC,OAAO,CAAC;QAC7B,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,YAAY,CAAC;QACtB,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,2CAA2C;YAC3C,OAAO,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC;IAC1E,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,WAAW,CAA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A6D,MAAM,CACjE,QAAQ,CACT,cAAc,CAChB,CACF,CAAC;AACJ,CAAC"}
\ No newline at end of file
+{"version":3,"file":"chromium.js","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAE3C,SAAS,OAAO,CAAC,QAAyB,EAAE,OAAe;IACzD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,cAAc,CAAC;QACxB,KAAK,eAAe,CAAC,OAAO,CAAC;QAC7B,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,YAAY,CAAC;QACtB,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,2CAA2C;YAC3C,OAAO,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC;IAC1E,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,WAAW,CAAC;QACrB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,KAAK,CAAC;QACf,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,KAAK,CAAC;QACf,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,2DAA2D;IAErE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,GAAG,CAAC;QACzB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,IAAI,CAAC,IAAI,CACd,YAAY,EACZ,cAAc,EACd,UAAU,EACV,OAAO,EACP,UAAU,CACX,CAAC;QACJ,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAC7C,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AACD,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,QAAyB;IAEzB,OAAO,MAAM,OAAO,CAClB,IAAI,GAAG,CACL,6DAA6D,MAAM,CACjE,QAAQ,CACT,cAAc,CAChB,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAS,EAAE,CAAS;IAClD,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts
index b24eb2f..de4a922 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts
@@ -9,4 +9,5 @@
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
export declare function resolveBuildId(channel?: 'FIREFOX_NIGHTLY'): Promise<string>;
export declare function createProfile(options: ProfileOptions): Promise<void>;
+export declare function compareVersions(a: string, b: string): number;
//# sourceMappingURL=firefox.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts.map
index 93f43de..6dd32c6 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"firefox.d.ts","sourceRoot":"","sources":["../../../src/browser-data/firefox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EAAC,eAAe,EAAE,KAAK,cAAc,EAAC,MAAM,YAAY,CAAC;AAehE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA2E,GACjF,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,wBAAsB,cAAc,CAClC,OAAO,GAAE,iBAAqC,GAC7C,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E"}
\ No newline at end of file
+{"version":3,"file":"firefox.d.ts","sourceRoot":"","sources":["../../../src/browser-data/firefox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EAAC,eAAe,EAAE,KAAK,cAAc,EAAC,MAAM,YAAY,CAAC;AAehE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA2E,GACjF,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,wBAAsB,cAAc,CAClC,OAAO,GAAE,iBAAqC,GAC7C,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E;AAwPD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js
index 9e0d5e3..94fda75 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js
@@ -243,4 +243,8 @@
await fs.promises.copyFile(prefsPath, prefsBackupPath);
}
}
+export function compareVersions(a, b) {
+ // TODO: this is a not very reliable check.
+ return parseInt(a.replace('.', ''), 16) - parseInt(b.replace('.', ''), 16);
+}
//# sourceMappingURL=firefox.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js.map
index 0b919bc..5a21cd7 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js.map
@@ -1 +1 @@
-{"version":3,"file":"firefox.js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.ts b/node_modules/@puppeteer/browsers/lib/esm/install.d.ts
index be538c5..a2ad587 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/install.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/install.d.ts
@@ -3,7 +3,7 @@
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
-import { type Browser, type BrowserPlatform } from './browser-data/browser-data.js';
+import { Browser, BrowserPlatform } from './browser-data/browser-data.js';
import { InstalledBrowser } from './Cache.js';
/**
* @public
@@ -29,6 +29,13 @@
*/
buildId: string;
/**
+ * An alias for the provided `buildId`. It will be used to maintain local
+ * metadata to support aliases in the `launch` command.
+ *
+ * @example 'canary'
+ */
+ buildIdAlias?: string;
+ /**
* Provides information about the progress of the download.
*/
downloadProgressCallback?: (downloadedBytes: number, totalBytes: number) => void;
@@ -37,7 +44,7 @@
*
* @defaultValue Either
*
- * - https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing or
+ * - https://storage.googleapis.com/chrome-for-testing-public or
* - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
*
*/
diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/install.d.ts.map
index 8a635f0..d60705c 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/install.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/install.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,eAAe,EAErB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAQ,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAwBnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,Q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AAG,OAAO,CAAC,OAAO,CAAC,CAe3E"}
\ No newline at end of file
+{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EACL,OAAO,EACP,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAQ,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAwBnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,wBAAwB,CAAC,EAAE,CACzB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,KACf,IAAI,CAAC;IACV;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,cAAc,GAAG;IAAC,MAAM,CAAC,EAAE,IAAI,CAAA;CAAC,GACxC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC7B;;GAEG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,cAAc,GAAG;IAAC,MAAM,EAAE,KAAK,CAAA;CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,CAAC;AA0JnB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAaxE;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAE7B;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAe3E"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.js b/node_modules/@puppeteer/browsers/lib/esm/install.js
index 356ea37..1ea7b29 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/install.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/install.js
@@ -8,12 +8,12 @@
import { mkdir, unlink } from 'fs/promises';
import os from 'os';
import path from 'path';
-import { downloadUrls, } from './browser-data/browser-data.js';
+import { Browser, BrowserPlatform, downloadUrls, } from './browser-data/browser-data.js';
import { Cache, InstalledBrowser } from './Cache.js';
import { debug } from './debug.js';
import { detectBrowserPlatform } from './detectPlatform.js';
import { unpackArchive } from './fileUtil.js';
-import { downloadFile, headHttpRequest } from './httpUtil.js';
+import { downloadFile, getJSON, headHttpRequest } from './httpUtil.js';
const debugInstall = debug('puppeteer:browsers:install');
const times = new Map();
function debugTime(label) {
@@ -35,6 +35,54 @@
throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
}
const url = getDownloadUrl(options.browser, options.platform, options.buildId, options.baseUrl);
+ try {
+ return await installUrl(url, options);
+ }
+ catch (err) {
+ debugInstall(`Error downloading from ${url}.`);
+ switch (options.browser) {
+ case Browser.CHROME:
+ case Browser.CHROMEDRIVER:
+ case Browser.CHROMEHEADLESSSHELL: {
+ debugInstall(`Trying to find download URL via https://googlechromelabs.github.io/chrome-for-testing.`);
+ const version = (await getJSON(new URL(`https://googlechromelabs.github.io/chrome-for-testing/${options.buildId}.json`)));
+ let platform = '';
+ switch (options.platform) {
+ case BrowserPlatform.LINUX:
+ platform = 'linux64';
+ break;
+ case BrowserPlatform.MAC_ARM:
+ platform = 'mac-arm64';
+ break;
+ case BrowserPlatform.MAC:
+ platform = 'mac-x64';
+ break;
+ case BrowserPlatform.WIN32:
+ platform = 'win32';
+ break;
+ case BrowserPlatform.WIN64:
+ platform = 'win64';
+ break;
+ }
+ const url = version.downloads[options.browser]?.find(link => {
+ return link['platform'] === platform;
+ })?.url;
+ if (url) {
+ debugInstall(`Falling back to downloading from ${url}.`);
+ return await installUrl(new URL(url), options);
+ }
+ throw err;
+ }
+ default:
+ throw err;
+ }
+ }
+}
+async function installUrl(url, options) {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
+ }
const fileName = url.toString().split('/').pop();
assert(fileName, `A malformed download URL was found: ${url}.`);
const cache = new Cache(options.cacheDir);
@@ -54,10 +102,14 @@
return archivePath;
}
const outputPath = cache.installationDir(options.browser, options.platform, options.buildId);
- if (existsSync(outputPath)) {
- return new InstalledBrowser(cache, options.browser, options.buildId, options.platform);
- }
try {
+ if (existsSync(outputPath)) {
+ const installedBrowser = new InstalledBrowser(cache, options.browser, options.buildId, options.platform);
+ if (!existsSync(installedBrowser.executablePath)) {
+ throw new Error(`The browser folder (${outputPath}) exists but the executable (${installedBrowser.executablePath}) is missing`);
+ }
+ return installedBrowser;
+ }
debugInstall(`Downloading binary from ${url}`);
try {
debugTime('download');
@@ -74,13 +126,19 @@
finally {
debugTimeEnd('extract');
}
+ const installedBrowser = new InstalledBrowser(cache, options.browser, options.buildId, options.platform);
+ if (options.buildIdAlias) {
+ const metadata = installedBrowser.readMetadata();
+ metadata.aliases[options.buildIdAlias] = options.buildId;
+ installedBrowser.writeMetadata(metadata);
+ }
+ return installedBrowser;
}
finally {
if (existsSync(archivePath)) {
await unlink(archivePath);
}
}
- return new InstalledBrowser(cache, options.browser, options.buildId, options.platform);
}
/**
*
diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.js.map b/node_modules/@puppeteer/browsers/lib/esm/install.js.map
index ebf1905..5ad3dae 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/install.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/install.js.map
@@ -1 +1 @@
-{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,UAAU,EAAC,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAGL,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAE5D,MAAM,YAAY,GAAG,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAM,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;AAClD,SAAS,SAAS,CAAC,KAAa;IAC9B,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC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AC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,uDAAuD,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,eAAe,CAC1B,cAAc,CACZ,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,OAAO,CAChB,CACF,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CACrB,OAAgB,EAChB,QAAyB,EACzB,OAAe,EACf,OAAgB;IAEhB,OAAO,IAAI,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main.d.ts b/node_modules/@puppeteer/browsers/lib/esm/main.d.ts
index 6e4355d..9ca6ab1 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/main.d.ts
+++ b/node_modules/@puppeteer/browsers/lib/esm/main.d.ts
@@ -9,7 +9,7 @@
export { install, getInstalledBrowsers, canDownload, uninstall, } from './install.js';
export { detectBrowserPlatform } from './detectPlatform.js';
export type { ProfileOptions } from './browser-data/browser-data.js';
-export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, } from './browser-data/browser-data.js';
+export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, getVersionComparator, } from './browser-data/browser-data.js';
export { CLI, makeProgressCallback } from './CLI.js';
export { Cache, InstalledBrowser } from './Cache.js';
//# sourceMappingURL=main.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/main.d.ts.map
index 74ebb54..a6c0b8e 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/main.d.ts.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/main.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,4BAA4B,IAAI,OAAO,EACvC,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAC,cAAc,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,GACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
+{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,4BAA4B,IAAI,OAAO,EACvC,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAC,cAAc,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main.js b/node_modules/@puppeteer/browsers/lib/esm/main.js
index a2f7008..22f36ee 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/main.js
+++ b/node_modules/@puppeteer/browsers/lib/esm/main.js
@@ -6,7 +6,7 @@
export { launch, computeExecutablePath, computeSystemExecutablePath, TimeoutError, CDP_WEBSOCKET_ENDPOINT_REGEX, WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, Process, } from './launch.js';
export { install, getInstalledBrowsers, canDownload, uninstall, } from './install.js';
export { detectBrowserPlatform } from './detectPlatform.js';
-export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, } from './browser-data/browser-data.js';
+export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, getVersionComparator, } from './browser-data/browser-data.js';
export { CLI, makeProgressCallback } from './CLI.js';
export { Cache, InstalledBrowser } from './Cache.js';
//# sourceMappingURL=main.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main.js.map b/node_modules/@puppeteer/browsers/lib/esm/main.js.map
index d2d6bbd..236001d 100644
--- a/node_modules/@puppeteer/browsers/lib/esm/main.js.map
+++ b/node_modules/@puppeteer/browsers/lib/esm/main.js.map
@@ -1 +1 @@
-{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AAMrB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,GACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
+{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AAMrB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/node_modules/.bin/semver b/node_modules/@puppeteer/browsers/node_modules/.bin/semver
new file mode 120000
index 0000000..5aaadf4
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver.js
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/LICENSE b/node_modules/@puppeteer/browsers/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/README.md b/node_modules/@puppeteer/browsers/node_modules/semver/README.md
new file mode 100644
index 0000000..a9d3a27
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/README.md
@@ -0,0 +1,641 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+You can also just load the module for the function that you care about, if
+you'd like to minimize your footprint.
+
+```js
+// load the whole API at once in a single object
+const semver = require('semver')
+
+// or just load the bits you need
+// all of them listed here, just pick and choose what you want
+
+// classes
+const SemVer = require('semver/classes/semver')
+const Comparator = require('semver/classes/comparator')
+const Range = require('semver/classes/range')
+
+// functions for working with versions
+const semverParse = require('semver/functions/parse')
+const semverValid = require('semver/functions/valid')
+const semverClean = require('semver/functions/clean')
+const semverInc = require('semver/functions/inc')
+const semverDiff = require('semver/functions/diff')
+const semverMajor = require('semver/functions/major')
+const semverMinor = require('semver/functions/minor')
+const semverPatch = require('semver/functions/patch')
+const semverPrerelease = require('semver/functions/prerelease')
+const semverCompare = require('semver/functions/compare')
+const semverRcompare = require('semver/functions/rcompare')
+const semverCompareLoose = require('semver/functions/compare-loose')
+const semverCompareBuild = require('semver/functions/compare-build')
+const semverSort = require('semver/functions/sort')
+const semverRsort = require('semver/functions/rsort')
+
+// low-level comparators between versions
+const semverGt = require('semver/functions/gt')
+const semverLt = require('semver/functions/lt')
+const semverEq = require('semver/functions/eq')
+const semverNeq = require('semver/functions/neq')
+const semverGte = require('semver/functions/gte')
+const semverLte = require('semver/functions/lte')
+const semverCmp = require('semver/functions/cmp')
+const semverCoerce = require('semver/functions/coerce')
+
+// working with ranges
+const semverSatisfies = require('semver/functions/satisfies')
+const semverMaxSatisfying = require('semver/ranges/max-satisfying')
+const semverMinSatisfying = require('semver/ranges/min-satisfying')
+const semverToComparators = require('semver/ranges/to-comparators')
+const semverMinVersion = require('semver/ranges/min-version')
+const semverValidRange = require('semver/ranges/valid')
+const semverOutside = require('semver/ranges/outside')
+const semverGtr = require('semver/ranges/gtr')
+const semverLtr = require('semver/ranges/ltr')
+const semverIntersects = require('semver/ranges/intersects')
+const simplifyRange = require('semver/ranges/simplify')
+const rangeSubset = require('semver/ranges/subset')
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-n <0|1>
+ This is the base to be used for the prerelease identifier.
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<https://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`. The comparator `>1` is equivalent to `>=2.0.0` and
+would match the versions `2.0.0` and `3.1.0`, but not the versions
+`1.0.1` or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for the purpose of range
+matching) by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+#### Prerelease Identifier Base
+
+The method `.inc` takes an optional parameter 'identifierBase' string
+that will let you let your prerelease number as zero-based or one-based.
+Set to `false` to omit the prerelease number altogether.
+If you do not specify this parameter, it will default to zero-based.
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta', '1')
+// '1.2.4-beta.1'
+```
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta', false)
+// '1.2.4-beta'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta -n 1
+1.2.4-beta.1
+```
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta -n false
+1.2.4-beta
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless
+ `includePrerelease` is specified, in which case any version at all
+ satisfies)
+* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero element in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0-0`
+* `^0.2.3` := `>=0.2.3 <0.3.0-0`
+* `^0.0.3` := `>=0.0.3 <0.0.4-0`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0-0`
+* `^0.0.x` := `>=0.0.0 <0.1.0-0`
+* `^0.0` := `>=0.0.0 <0.1.0-0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0-0`
+* `^0.x` := `>=0.0.0 <1.0.0-0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
+ are equal. Sorts in ascending order if passed to `Array.sort()`.
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can possibly match
+ the given range.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+* `simplifyRange(versions, range)`: Return a "simplified" range that
+ matches the same items in `versions` list as the range specified. Note
+ that it does *not* guarantee that it would match the same versions in all
+ cases, only for the set of versions provided. This is useful when
+ generating ranges by joining together multiple versions with `||`
+ programmatically, to provide the user with something a bit more
+ ergonomic. If the provided range is shorter in string-length than the
+ generated range, then that is returned.
+* `subset(subRange, superRange)`: Return `true` if the `subRange` range is
+ entirely contained by the `superRange` range.
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version, options)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string, and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
+
+If the `options.rtl` flag is set, then `coerce` will return the right-most
+coercible tuple that does not share an ending index with a longer coercible
+tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
+`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
+any other overlapping SemVer tuple.
+
+If the `options.includePrerelease` flag is set, then the `coerce` result will contain
+prerelease and build parts of a version. For example, `1.2.3.4-rc.1+rev.2`
+will preserve prerelease `rc.1` and build `rev.2` in the result.
+
+### Clean
+
+* `clean(version)`: Clean a string to be a valid semver if possible
+
+This will return a cleaned and trimmed semver version. If the provided
+version is not valid a null will be returned. This does not work for
+ranges.
+
+ex.
+* `s.clean(' = v 2.1.5foo')`: `null`
+* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean(' = v 2.1.5-foo')`: `null`
+* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean('=v2.1.5')`: `'2.1.5'`
+* `s.clean(' =v2.1.5')`: `'2.1.5'`
+* `s.clean(' 2.1.5 ')`: `'2.1.5'`
+* `s.clean('~1.0.0')`: `null`
+
+## Constants
+
+As a convenience, helper constants are exported to provide information about what `node-semver` supports:
+
+### `RELEASE_TYPES`
+
+- major
+- premajor
+- minor
+- preminor
+- patch
+- prepatch
+- prerelease
+
+```
+const semver = require('semver');
+
+if (semver.RELEASE_TYPES.includes(arbitraryUserInput)) {
+ console.log('This is a valid release type!');
+} else {
+ console.warn('This is NOT a valid release type!');
+}
+```
+
+### `SEMVER_SPEC_VERSION`
+
+2.0.0
+
+```
+const semver = require('semver');
+
+console.log('We are currently using the semver specification version:', semver.SEMVER_SPEC_VERSION);
+```
+
+## Exported Modules
+
+<!--
+TODO: Make sure that all of these items are documented (classes aren't,
+eg), and then pull the module name into the documentation for that specific
+thing.
+-->
+
+You may pull in just the part of this semver utility that you need, if you
+are sensitive to packing and tree-shaking concerns. The main
+`require('semver')` export uses getter functions to lazily load the parts
+of the API that are used.
+
+The following modules are available:
+
+* `require('semver')`
+* `require('semver/classes')`
+* `require('semver/classes/comparator')`
+* `require('semver/classes/range')`
+* `require('semver/classes/semver')`
+* `require('semver/functions/clean')`
+* `require('semver/functions/cmp')`
+* `require('semver/functions/coerce')`
+* `require('semver/functions/compare')`
+* `require('semver/functions/compare-build')`
+* `require('semver/functions/compare-loose')`
+* `require('semver/functions/diff')`
+* `require('semver/functions/eq')`
+* `require('semver/functions/gt')`
+* `require('semver/functions/gte')`
+* `require('semver/functions/inc')`
+* `require('semver/functions/lt')`
+* `require('semver/functions/lte')`
+* `require('semver/functions/major')`
+* `require('semver/functions/minor')`
+* `require('semver/functions/neq')`
+* `require('semver/functions/parse')`
+* `require('semver/functions/patch')`
+* `require('semver/functions/prerelease')`
+* `require('semver/functions/rcompare')`
+* `require('semver/functions/rsort')`
+* `require('semver/functions/satisfies')`
+* `require('semver/functions/sort')`
+* `require('semver/functions/valid')`
+* `require('semver/ranges/gtr')`
+* `require('semver/ranges/intersects')`
+* `require('semver/ranges/ltr')`
+* `require('semver/ranges/max-satisfying')`
+* `require('semver/ranges/min-satisfying')`
+* `require('semver/ranges/min-version')`
+* `require('semver/ranges/outside')`
+* `require('semver/ranges/to-comparators')`
+* `require('semver/ranges/valid')`
+
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/bin/semver.js b/node_modules/@puppeteer/browsers/node_modules/semver/bin/semver.js
new file mode 100755
index 0000000..242b7ad
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/bin/semver.js
@@ -0,0 +1,197 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+const argv = process.argv.slice(2)
+
+let versions = []
+
+const range = []
+
+let inc = null
+
+const version = require('../package.json').version
+
+let loose = false
+
+let includePrerelease = false
+
+let coerce = false
+
+let rtl = false
+
+let identifier
+
+let identifierBase
+
+const semver = require('../')
+const parseOptions = require('../internal/parse-options')
+
+let reverse = false
+
+let options = {}
+
+const main = () => {
+ if (!argv.length) {
+ return help()
+ }
+ while (argv.length) {
+ let a = argv.shift()
+ const indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ const value = a.slice(indexOfEqualSign + 1)
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(value)
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-n':
+ identifierBase = argv.shift()
+ if (identifierBase === 'false') {
+ identifierBase = false
+ }
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '--rtl':
+ rtl = true
+ break
+ case '--ltr':
+ rtl = false
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ options = parseOptions({ loose, includePrerelease, rtl })
+
+ versions = versions.map((v) => {
+ return coerce ? (semver.coerce(v, options) || { version: v }).version : v
+ }).filter((v) => {
+ return semver.valid(v)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ if (inc && (versions.length !== 1 || range.length)) {
+ return failInc()
+ }
+
+ for (let i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter((v) => {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ }
+ return success(versions)
+}
+
+const failInc = () => {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+const fail = () => process.exit(1)
+
+const success = () => {
+ const compare = reverse ? 'rcompare' : 'compare'
+ versions.sort((a, b) => {
+ return semver[compare](a, b, options)
+ }).map((v) => {
+ return semver.clean(v, options)
+ }).map((v) => {
+ return inc ? semver.inc(v, inc, options, identifier, identifierBase) : v
+ }).forEach((v, i, _) => {
+ console.log(v)
+ })
+}
+
+const help = () => console.log(
+`SemVer ${version}
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+-n <base>
+ Base number to be used for the prerelease identifier.
+ Can be either 0 or 1, or false to omit the number altogether.
+ Defaults to 0.
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.`)
+
+main()
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/classes/comparator.js b/node_modules/@puppeteer/browsers/node_modules/semver/classes/comparator.js
new file mode 100644
index 0000000..3d39c0e
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/classes/comparator.js
@@ -0,0 +1,141 @@
+const ANY = Symbol('SemVer ANY')
+// hoisted class for cyclic dependency
+class Comparator {
+ static get ANY () {
+ return ANY
+ }
+
+ constructor (comp, options) {
+ options = parseOptions(options)
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ comp = comp.trim().split(/\s+/).join(' ')
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+ }
+
+ parse (comp) {
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ const m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError(`Invalid comparator: ${comp}`)
+ }
+
+ this.operator = m[1] !== undefined ? m[1] : ''
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+ }
+
+ toString () {
+ return this.value
+ }
+
+ test (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY || version === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+ }
+
+ intersects (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true
+ }
+ return new Range(comp.value, options).test(this.value)
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true
+ }
+ return new Range(this.value, options).test(comp.semver)
+ }
+
+ options = parseOptions(options)
+
+ // Special cases where nothing can possibly be lower
+ if (options.includePrerelease &&
+ (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
+ return false
+ }
+ if (!options.includePrerelease &&
+ (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
+ return false
+ }
+
+ // Same direction increasing (> or >=)
+ if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
+ return true
+ }
+ // Same direction decreasing (< or <=)
+ if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
+ return true
+ }
+ // same SemVer and both sides are inclusive (<= or >=)
+ if (
+ (this.semver.version === comp.semver.version) &&
+ this.operator.includes('=') && comp.operator.includes('=')) {
+ return true
+ }
+ // opposite directions less than
+ if (cmp(this.semver, '<', comp.semver, options) &&
+ this.operator.startsWith('>') && comp.operator.startsWith('<')) {
+ return true
+ }
+ // opposite directions greater than
+ if (cmp(this.semver, '>', comp.semver, options) &&
+ this.operator.startsWith('<') && comp.operator.startsWith('>')) {
+ return true
+ }
+ return false
+ }
+}
+
+module.exports = Comparator
+
+const parseOptions = require('../internal/parse-options')
+const { safeRe: re, t } = require('../internal/re')
+const cmp = require('../functions/cmp')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const Range = require('./range')
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/classes/index.js b/node_modules/@puppeteer/browsers/node_modules/semver/classes/index.js
new file mode 100644
index 0000000..5e3f5c9
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/classes/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ SemVer: require('./semver.js'),
+ Range: require('./range.js'),
+ Comparator: require('./comparator.js'),
+}
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/classes/range.js b/node_modules/@puppeteer/browsers/node_modules/semver/classes/range.js
new file mode 100644
index 0000000..7e7c414
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/classes/range.js
@@ -0,0 +1,539 @@
+// hoisted class for cyclic dependency
+class Range {
+ constructor (range, options) {
+ options = parseOptions(options)
+
+ if (range instanceof Range) {
+ if (
+ range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease
+ ) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ // just put it in the set and return
+ this.raw = range.value
+ this.set = [[range]]
+ this.format()
+ return this
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First reduce all whitespace as much as possible so we do not have to rely
+ // on potentially slow regexes like \s*. This is then stored and used for
+ // future error messages as well.
+ this.raw = range
+ .trim()
+ .split(/\s+/)
+ .join(' ')
+
+ // First, split on ||
+ this.set = this.raw
+ .split('||')
+ // map the range to a 2d array of comparators
+ .map(r => this.parseRange(r.trim()))
+ // throw out any comparator lists that are empty
+ // this generally means that it was not a valid range, which is allowed
+ // in loose mode, but will still throw if the WHOLE range is invalid.
+ .filter(c => c.length)
+
+ if (!this.set.length) {
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
+ }
+
+ // if we have any that are not the null set, throw out null sets.
+ if (this.set.length > 1) {
+ // keep the first one, in case they're all null sets
+ const first = this.set[0]
+ this.set = this.set.filter(c => !isNullSet(c[0]))
+ if (this.set.length === 0) {
+ this.set = [first]
+ } else if (this.set.length > 1) {
+ // if we have any that are *, then the range is just *
+ for (const c of this.set) {
+ if (c.length === 1 && isAny(c[0])) {
+ this.set = [c]
+ break
+ }
+ }
+ }
+ }
+
+ this.format()
+ }
+
+ format () {
+ this.range = this.set
+ .map((comps) => comps.join(' ').trim())
+ .join('||')
+ .trim()
+ return this.range
+ }
+
+ toString () {
+ return this.range
+ }
+
+ parseRange (range) {
+ // memoize range parsing for performance.
+ // this is a very hot path, and fully deterministic.
+ const memoOpts =
+ (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
+ (this.options.loose && FLAG_LOOSE)
+ const memoKey = memoOpts + ':' + range
+ const cached = cache.get(memoKey)
+ if (cached) {
+ return cached
+ }
+
+ const loose = this.options.loose
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
+ debug('hyphen replace', range)
+
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range)
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
+ debug('tilde trim', range)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
+ debug('caret trim', range)
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ let rangeList = range
+ .split(' ')
+ .map(comp => parseComparator(comp, this.options))
+ .join(' ')
+ .split(/\s+/)
+ // >=0.0.0 is equivalent to *
+ .map(comp => replaceGTE0(comp, this.options))
+
+ if (loose) {
+ // in loose mode, throw out any that are not valid comparators
+ rangeList = rangeList.filter(comp => {
+ debug('loose invalid filter', comp, this.options)
+ return !!comp.match(re[t.COMPARATORLOOSE])
+ })
+ }
+ debug('range list', rangeList)
+
+ // if any comparators are the null set, then replace with JUST null set
+ // if more than one comparator, remove any * comparators
+ // also, don't include the same comparator more than once
+ const rangeMap = new Map()
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options))
+ for (const comp of comparators) {
+ if (isNullSet(comp)) {
+ return [comp]
+ }
+ rangeMap.set(comp.value, comp)
+ }
+ if (rangeMap.size > 1 && rangeMap.has('')) {
+ rangeMap.delete('')
+ }
+
+ const result = [...rangeMap.values()]
+ cache.set(memoKey, result)
+ return result
+ }
+
+ intersects (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some((thisComparators) => {
+ return (
+ isSatisfiable(thisComparators, options) &&
+ range.set.some((rangeComparators) => {
+ return (
+ isSatisfiable(rangeComparators, options) &&
+ thisComparators.every((thisComparator) => {
+ return rangeComparators.every((rangeComparator) => {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ )
+ })
+ )
+ })
+ }
+
+ // if ANY of the sets match ALL of its comparators, then pass
+ test (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ for (let i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+ }
+}
+
+module.exports = Range
+
+const LRU = require('lru-cache')
+const cache = new LRU({ max: 1000 })
+
+const parseOptions = require('../internal/parse-options')
+const Comparator = require('./comparator')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const {
+ safeRe: re,
+ t,
+ comparatorTrimReplace,
+ tildeTrimReplace,
+ caretTrimReplace,
+} = require('../internal/re')
+const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')
+
+const isNullSet = c => c.value === '<0.0.0-0'
+const isAny = c => c.value === ''
+
+// take a set of comparators and determine whether there
+// exists a version which can satisfy it
+const isSatisfiable = (comparators, options) => {
+ let result = true
+ const remainingComparators = comparators.slice()
+ let testComparator = remainingComparators.pop()
+
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every((otherComparator) => {
+ return testComparator.intersects(otherComparator, options)
+ })
+
+ testComparator = remainingComparators.pop()
+ }
+
+ return result
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+const parseComparator = (comp, options) => {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
+// ~0.0.1 --> >=0.0.1 <0.1.0-0
+const replaceTildes = (comp, options) => {
+ return comp
+ .trim()
+ .split(/\s+/)
+ .map((c) => replaceTilde(c, options))
+ .join(' ')
+}
+
+const replaceTilde = (comp, options) => {
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('tilde', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0-0
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
+ ret = `>=${M}.${m}.${p
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
+// ^1.2.3 --> >=1.2.3 <2.0.0-0
+// ^1.2.0 --> >=1.2.0 <2.0.0-0
+// ^0.0.1 --> >=0.0.1 <0.0.2-0
+// ^0.1.0 --> >=0.1.0 <0.2.0-0
+const replaceCarets = (comp, options) => {
+ return comp
+ .trim()
+ .split(/\s+/)
+ .map((c) => replaceCaret(c, options))
+ .join(' ')
+}
+
+const replaceCaret = (comp, options) => {
+ debug('caret', comp, options)
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
+ const z = options.includePrerelease ? '-0' : ''
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('caret', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
+ } else {
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${+M + 1}.0.0-0`
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p
+ } <${+M + 1}.0.0-0`
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+const replaceXRanges = (comp, options) => {
+ debug('replaceXRanges', comp, options)
+ return comp
+ .split(/\s+/)
+ .map((c) => replaceXRange(c, options))
+ .join(' ')
+}
+
+const replaceXRange = (comp, options) => {
+ comp = comp.trim()
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ const xM = isX(M)
+ const xm = xM || isX(m)
+ const xp = xm || isX(p)
+ const anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ // if we're including prereleases in the match, then we need
+ // to fix this to -0, the lowest possible prerelease value
+ pr = options.includePrerelease ? '-0' : ''
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0-0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ if (gtlt === '<') {
+ pr = '-0'
+ }
+
+ ret = `${gtlt + M}.${m}.${p}${pr}`
+ } else if (xm) {
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
+ } else if (xp) {
+ ret = `>=${M}.${m}.0${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+const replaceStars = (comp, options) => {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp
+ .trim()
+ .replace(re[t.STAR], '')
+}
+
+const replaceGTE0 = (comp, options) => {
+ debug('replaceGTE0', comp, options)
+ return comp
+ .trim()
+ .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
+}
+
+// This function is passed to string.replace(re[t.HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
+const hyphenReplace = incPr => ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) => {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = `>=${fM}.0.0${incPr ? '-0' : ''}`
+ } else if (isX(fp)) {
+ from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
+ } else if (fpr) {
+ from = `>=${from}`
+ } else {
+ from = `>=${from}${incPr ? '-0' : ''}`
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = `<${+tM + 1}.0.0-0`
+ } else if (isX(tp)) {
+ to = `<${tM}.${+tm + 1}.0-0`
+ } else if (tpr) {
+ to = `<=${tM}.${tm}.${tp}-${tpr}`
+ } else if (incPr) {
+ to = `<${tM}.${tm}.${+tp + 1}-0`
+ } else {
+ to = `<=${to}`
+ }
+
+ return `${from} ${to}`.trim()
+}
+
+const testSet = (set, version, options) => {
+ for (let i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (let i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === Comparator.ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ const allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/classes/semver.js b/node_modules/@puppeteer/browsers/node_modules/semver/classes/semver.js
new file mode 100644
index 0000000..84e8459
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/classes/semver.js
@@ -0,0 +1,302 @@
+const debug = require('../internal/debug')
+const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
+const { safeRe: re, t } = require('../internal/re')
+
+const parseOptions = require('../internal/parse-options')
+const { compareIdentifiers } = require('../internal/identifiers')
+class SemVer {
+ constructor (version, options) {
+ options = parseOptions(options)
+
+ if (version instanceof SemVer) {
+ if (version.loose === !!options.loose &&
+ version.includePrerelease === !!options.includePrerelease) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError(
+ `version is longer than ${MAX_LENGTH} characters`
+ )
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+ // this isn't actually relevant for versions, but keep it so that we
+ // don't run into trouble passing this.options around.
+ this.includePrerelease = !!options.includePrerelease
+
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
+
+ if (!m) {
+ throw new TypeError(`Invalid Version: ${version}`)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map((id) => {
+ if (/^[0-9]+$/.test(id)) {
+ const num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+ }
+
+ format () {
+ this.version = `${this.major}.${this.minor}.${this.patch}`
+ if (this.prerelease.length) {
+ this.version += `-${this.prerelease.join('.')}`
+ }
+ return this.version
+ }
+
+ toString () {
+ return this.version
+ }
+
+ compare (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ if (typeof other === 'string' && other === this.version) {
+ return 0
+ }
+ other = new SemVer(other, this.options)
+ }
+
+ if (other.version === this.version) {
+ return 0
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+ }
+
+ compareMain (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return (
+ compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+ )
+ }
+
+ comparePre (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ let i = 0
+ do {
+ const a = this.prerelease[i]
+ const b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ compareBuild (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ let i = 0
+ do {
+ const a = this.build[i]
+ const b = other.build[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ // preminor will bump the version up to the next minor release, and immediately
+ // down to pre-release. premajor and prepatch work the same way.
+ inc (release, identifier, identifierBase) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier, identifierBase)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier, identifierBase)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier, identifierBase)
+ this.inc('pre', identifier, identifierBase)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier, identifierBase)
+ }
+ this.inc('pre', identifier, identifierBase)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (
+ this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0
+ ) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
+ case 'pre': {
+ const base = Number(identifierBase) ? 1 : 0
+
+ if (!identifier && identifierBase === false) {
+ throw new Error('invalid increment argument: identifier is empty')
+ }
+
+ if (this.prerelease.length === 0) {
+ this.prerelease = [base]
+ } else {
+ let i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ if (identifier === this.prerelease.join('.') && identifierBase === false) {
+ throw new Error('invalid increment argument: identifier already exists')
+ }
+ this.prerelease.push(base)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ let prerelease = [identifier, base]
+ if (identifierBase === false) {
+ prerelease = [identifier]
+ }
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = prerelease
+ }
+ } else {
+ this.prerelease = prerelease
+ }
+ }
+ break
+ }
+ default:
+ throw new Error(`invalid increment argument: ${release}`)
+ }
+ this.raw = this.format()
+ if (this.build.length) {
+ this.raw += `+${this.build.join('.')}`
+ }
+ return this
+ }
+}
+
+module.exports = SemVer
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/clean.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/clean.js
new file mode 100644
index 0000000..811fe6b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/clean.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const clean = (version, options) => {
+ const s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+module.exports = clean
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/cmp.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/cmp.js
new file mode 100644
index 0000000..4011909
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/cmp.js
@@ -0,0 +1,52 @@
+const eq = require('./eq')
+const neq = require('./neq')
+const gt = require('./gt')
+const gte = require('./gte')
+const lt = require('./lt')
+const lte = require('./lte')
+
+const cmp = (a, op, b, loose) => {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError(`Invalid operator: ${op}`)
+ }
+}
+module.exports = cmp
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/coerce.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/coerce.js
new file mode 100644
index 0000000..b378dce
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/coerce.js
@@ -0,0 +1,60 @@
+const SemVer = require('../classes/semver')
+const parse = require('./parse')
+const { safeRe: re, t } = require('../internal/re')
+
+const coerce = (version, options) => {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version === 'number') {
+ version = String(version)
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ options = options || {}
+
+ let match = null
+ if (!options.rtl) {
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
+ } else {
+ // Find the right-most coercible string that does not share
+ // a terminus with a more left-ward coercible string.
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
+ // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
+ //
+ // Walk through the string checking with a /g regexp
+ // Manually set the index so as to pick up overlapping matches.
+ // Stop when we get a match that ends at the string end, since no
+ // coercible string can be more right-ward without the same terminus.
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
+ let next
+ while ((next = coerceRtlRegex.exec(version)) &&
+ (!match || match.index + match[0].length !== version.length)
+ ) {
+ if (!match ||
+ next.index + next[0].length !== match.index + match[0].length) {
+ match = next
+ }
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
+ }
+ // leave it in a clean state
+ coerceRtlRegex.lastIndex = -1
+ }
+
+ if (match === null) {
+ return null
+ }
+
+ const major = match[2]
+ const minor = match[3] || '0'
+ const patch = match[4] || '0'
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
+
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
+}
+module.exports = coerce
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare-build.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare-build.js
new file mode 100644
index 0000000..9eb881b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare-build.js
@@ -0,0 +1,7 @@
+const SemVer = require('../classes/semver')
+const compareBuild = (a, b, loose) => {
+ const versionA = new SemVer(a, loose)
+ const versionB = new SemVer(b, loose)
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
+}
+module.exports = compareBuild
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare-loose.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare-loose.js
new file mode 100644
index 0000000..4881fbe
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare-loose.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const compareLoose = (a, b) => compare(a, b, true)
+module.exports = compareLoose
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare.js
new file mode 100644
index 0000000..748b7af
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/compare.js
@@ -0,0 +1,5 @@
+const SemVer = require('../classes/semver')
+const compare = (a, b, loose) =>
+ new SemVer(a, loose).compare(new SemVer(b, loose))
+
+module.exports = compare
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/diff.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/diff.js
new file mode 100644
index 0000000..fc224e3
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/diff.js
@@ -0,0 +1,65 @@
+const parse = require('./parse.js')
+
+const diff = (version1, version2) => {
+ const v1 = parse(version1, null, true)
+ const v2 = parse(version2, null, true)
+ const comparison = v1.compare(v2)
+
+ if (comparison === 0) {
+ return null
+ }
+
+ const v1Higher = comparison > 0
+ const highVersion = v1Higher ? v1 : v2
+ const lowVersion = v1Higher ? v2 : v1
+ const highHasPre = !!highVersion.prerelease.length
+ const lowHasPre = !!lowVersion.prerelease.length
+
+ if (lowHasPre && !highHasPre) {
+ // Going from prerelease -> no prerelease requires some special casing
+
+ // If the low version has only a major, then it will always be a major
+ // Some examples:
+ // 1.0.0-1 -> 1.0.0
+ // 1.0.0-1 -> 1.1.1
+ // 1.0.0-1 -> 2.0.0
+ if (!lowVersion.patch && !lowVersion.minor) {
+ return 'major'
+ }
+
+ // Otherwise it can be determined by checking the high version
+
+ if (highVersion.patch) {
+ // anything higher than a patch bump would result in the wrong version
+ return 'patch'
+ }
+
+ if (highVersion.minor) {
+ // anything higher than a minor bump would result in the wrong version
+ return 'minor'
+ }
+
+ // bumping major/minor/patch all have same result
+ return 'major'
+ }
+
+ // add the `pre` prefix if we are going to a prerelease version
+ const prefix = highHasPre ? 'pre' : ''
+
+ if (v1.major !== v2.major) {
+ return prefix + 'major'
+ }
+
+ if (v1.minor !== v2.minor) {
+ return prefix + 'minor'
+ }
+
+ if (v1.patch !== v2.patch) {
+ return prefix + 'patch'
+ }
+
+ // high and low are preleases
+ return 'prerelease'
+}
+
+module.exports = diff
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/eq.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/eq.js
new file mode 100644
index 0000000..271fed9
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/eq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const eq = (a, b, loose) => compare(a, b, loose) === 0
+module.exports = eq
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/gt.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/gt.js
new file mode 100644
index 0000000..d9b2156
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/gt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gt = (a, b, loose) => compare(a, b, loose) > 0
+module.exports = gt
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/gte.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/gte.js
new file mode 100644
index 0000000..5aeaa63
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/gte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gte = (a, b, loose) => compare(a, b, loose) >= 0
+module.exports = gte
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/inc.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/inc.js
new file mode 100644
index 0000000..7670b1b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/inc.js
@@ -0,0 +1,19 @@
+const SemVer = require('../classes/semver')
+
+const inc = (version, release, options, identifier, identifierBase) => {
+ if (typeof (options) === 'string') {
+ identifierBase = identifier
+ identifier = options
+ options = undefined
+ }
+
+ try {
+ return new SemVer(
+ version instanceof SemVer ? version.version : version,
+ options
+ ).inc(release, identifier, identifierBase).version
+ } catch (er) {
+ return null
+ }
+}
+module.exports = inc
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/lt.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/lt.js
new file mode 100644
index 0000000..b440ab7
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/lt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lt = (a, b, loose) => compare(a, b, loose) < 0
+module.exports = lt
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/lte.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/lte.js
new file mode 100644
index 0000000..6dcc956
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/lte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lte = (a, b, loose) => compare(a, b, loose) <= 0
+module.exports = lte
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/major.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/major.js
new file mode 100644
index 0000000..4283165
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/major.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const major = (a, loose) => new SemVer(a, loose).major
+module.exports = major
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/minor.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/minor.js
new file mode 100644
index 0000000..57b3455
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/minor.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const minor = (a, loose) => new SemVer(a, loose).minor
+module.exports = minor
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/neq.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/neq.js
new file mode 100644
index 0000000..f944c01
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/neq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const neq = (a, b, loose) => compare(a, b, loose) !== 0
+module.exports = neq
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/parse.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/parse.js
new file mode 100644
index 0000000..459b3b1
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/parse.js
@@ -0,0 +1,16 @@
+const SemVer = require('../classes/semver')
+const parse = (version, options, throwErrors = false) => {
+ if (version instanceof SemVer) {
+ return version
+ }
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ if (!throwErrors) {
+ return null
+ }
+ throw er
+ }
+}
+
+module.exports = parse
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/patch.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/patch.js
new file mode 100644
index 0000000..63afca2
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/patch.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const patch = (a, loose) => new SemVer(a, loose).patch
+module.exports = patch
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/prerelease.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/prerelease.js
new file mode 100644
index 0000000..06aa132
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/prerelease.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const prerelease = (version, options) => {
+ const parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+module.exports = prerelease
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/rcompare.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/rcompare.js
new file mode 100644
index 0000000..0ac509e
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/rcompare.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const rcompare = (a, b, loose) => compare(b, a, loose)
+module.exports = rcompare
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/rsort.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/rsort.js
new file mode 100644
index 0000000..82404c5
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/rsort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
+module.exports = rsort
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/satisfies.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/satisfies.js
new file mode 100644
index 0000000..50af1c1
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/satisfies.js
@@ -0,0 +1,10 @@
+const Range = require('../classes/range')
+const satisfies = (version, range, options) => {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+module.exports = satisfies
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/sort.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/sort.js
new file mode 100644
index 0000000..4d10917
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/sort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
+module.exports = sort
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/functions/valid.js b/node_modules/@puppeteer/browsers/node_modules/semver/functions/valid.js
new file mode 100644
index 0000000..f27bae1
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/functions/valid.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const valid = (version, options) => {
+ const v = parse(version, options)
+ return v ? v.version : null
+}
+module.exports = valid
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/index.js b/node_modules/@puppeteer/browsers/node_modules/semver/index.js
new file mode 100644
index 0000000..86d42ac
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/index.js
@@ -0,0 +1,89 @@
+// just pre-load all the stuff that index.js lazily exports
+const internalRe = require('./internal/re')
+const constants = require('./internal/constants')
+const SemVer = require('./classes/semver')
+const identifiers = require('./internal/identifiers')
+const parse = require('./functions/parse')
+const valid = require('./functions/valid')
+const clean = require('./functions/clean')
+const inc = require('./functions/inc')
+const diff = require('./functions/diff')
+const major = require('./functions/major')
+const minor = require('./functions/minor')
+const patch = require('./functions/patch')
+const prerelease = require('./functions/prerelease')
+const compare = require('./functions/compare')
+const rcompare = require('./functions/rcompare')
+const compareLoose = require('./functions/compare-loose')
+const compareBuild = require('./functions/compare-build')
+const sort = require('./functions/sort')
+const rsort = require('./functions/rsort')
+const gt = require('./functions/gt')
+const lt = require('./functions/lt')
+const eq = require('./functions/eq')
+const neq = require('./functions/neq')
+const gte = require('./functions/gte')
+const lte = require('./functions/lte')
+const cmp = require('./functions/cmp')
+const coerce = require('./functions/coerce')
+const Comparator = require('./classes/comparator')
+const Range = require('./classes/range')
+const satisfies = require('./functions/satisfies')
+const toComparators = require('./ranges/to-comparators')
+const maxSatisfying = require('./ranges/max-satisfying')
+const minSatisfying = require('./ranges/min-satisfying')
+const minVersion = require('./ranges/min-version')
+const validRange = require('./ranges/valid')
+const outside = require('./ranges/outside')
+const gtr = require('./ranges/gtr')
+const ltr = require('./ranges/ltr')
+const intersects = require('./ranges/intersects')
+const simplifyRange = require('./ranges/simplify')
+const subset = require('./ranges/subset')
+module.exports = {
+ parse,
+ valid,
+ clean,
+ inc,
+ diff,
+ major,
+ minor,
+ patch,
+ prerelease,
+ compare,
+ rcompare,
+ compareLoose,
+ compareBuild,
+ sort,
+ rsort,
+ gt,
+ lt,
+ eq,
+ neq,
+ gte,
+ lte,
+ cmp,
+ coerce,
+ Comparator,
+ Range,
+ satisfies,
+ toComparators,
+ maxSatisfying,
+ minSatisfying,
+ minVersion,
+ validRange,
+ outside,
+ gtr,
+ ltr,
+ intersects,
+ simplifyRange,
+ subset,
+ SemVer,
+ re: internalRe.re,
+ src: internalRe.src,
+ tokens: internalRe.t,
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
+ RELEASE_TYPES: constants.RELEASE_TYPES,
+ compareIdentifiers: identifiers.compareIdentifiers,
+ rcompareIdentifiers: identifiers.rcompareIdentifiers,
+}
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/internal/constants.js b/node_modules/@puppeteer/browsers/node_modules/semver/internal/constants.js
new file mode 100644
index 0000000..94be1c5
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/internal/constants.js
@@ -0,0 +1,35 @@
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+const SEMVER_SPEC_VERSION = '2.0.0'
+
+const MAX_LENGTH = 256
+const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+/* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+const MAX_SAFE_COMPONENT_LENGTH = 16
+
+// Max safe length for a build identifier. The max length minus 6 characters for
+// the shortest version with a build 0.0.0+BUILD.
+const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
+
+const RELEASE_TYPES = [
+ 'major',
+ 'premajor',
+ 'minor',
+ 'preminor',
+ 'patch',
+ 'prepatch',
+ 'prerelease',
+]
+
+module.exports = {
+ MAX_LENGTH,
+ MAX_SAFE_COMPONENT_LENGTH,
+ MAX_SAFE_BUILD_LENGTH,
+ MAX_SAFE_INTEGER,
+ RELEASE_TYPES,
+ SEMVER_SPEC_VERSION,
+ FLAG_INCLUDE_PRERELEASE: 0b001,
+ FLAG_LOOSE: 0b010,
+}
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/internal/debug.js b/node_modules/@puppeteer/browsers/node_modules/semver/internal/debug.js
new file mode 100644
index 0000000..1c00e13
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/internal/debug.js
@@ -0,0 +1,9 @@
+const debug = (
+ typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)
+) ? (...args) => console.error('SEMVER', ...args)
+ : () => {}
+
+module.exports = debug
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/internal/identifiers.js b/node_modules/@puppeteer/browsers/node_modules/semver/internal/identifiers.js
new file mode 100644
index 0000000..e612d0a
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/internal/identifiers.js
@@ -0,0 +1,23 @@
+const numeric = /^[0-9]+$/
+const compareIdentifiers = (a, b) => {
+ const anum = numeric.test(a)
+ const bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
+
+module.exports = {
+ compareIdentifiers,
+ rcompareIdentifiers,
+}
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/internal/parse-options.js b/node_modules/@puppeteer/browsers/node_modules/semver/internal/parse-options.js
new file mode 100644
index 0000000..10d64ce
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/internal/parse-options.js
@@ -0,0 +1,15 @@
+// parse out just the options we care about
+const looseOption = Object.freeze({ loose: true })
+const emptyOpts = Object.freeze({ })
+const parseOptions = options => {
+ if (!options) {
+ return emptyOpts
+ }
+
+ if (typeof options !== 'object') {
+ return looseOption
+ }
+
+ return options
+}
+module.exports = parseOptions
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/internal/re.js b/node_modules/@puppeteer/browsers/node_modules/semver/internal/re.js
new file mode 100644
index 0000000..fd8920e
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/internal/re.js
@@ -0,0 +1,217 @@
+const {
+ MAX_SAFE_COMPONENT_LENGTH,
+ MAX_SAFE_BUILD_LENGTH,
+ MAX_LENGTH,
+} = require('./constants')
+const debug = require('./debug')
+exports = module.exports = {}
+
+// The actual regexps go on exports.re
+const re = exports.re = []
+const safeRe = exports.safeRe = []
+const src = exports.src = []
+const t = exports.t = {}
+let R = 0
+
+const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
+
+// Replace some greedy regex tokens to prevent regex dos issues. These regex are
+// used internally via the safeRe object since all inputs in this library get
+// normalized first to trim and collapse all extra whitespace. The original
+// regexes are exported for userland consumption and lower level usage. A
+// future breaking change could export the safer regex only with a note that
+// all input should have extra whitespace removed.
+const safeRegexReplacements = [
+ ['\\s', 1],
+ ['\\d', MAX_LENGTH],
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
+]
+
+const makeSafeRegex = (value) => {
+ for (const [token, max] of safeRegexReplacements) {
+ value = value
+ .split(`${token}*`).join(`${token}{0,${max}}`)
+ .split(`${token}+`).join(`${token}{1,${max}}`)
+ }
+ return value
+}
+
+const createToken = (name, value, isGlobal) => {
+ const safe = makeSafeRegex(value)
+ const index = R++
+ debug(name, index, value)
+ t[name] = index
+ src[index] = value
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
+ safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
+}
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
+createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})`)
+
+createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})`)
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
+}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
+
+createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
+}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
+}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
+}${src[t.PRERELEASE]}?${
+ src[t.BUILD]}?`)
+
+createToken('FULL', `^${src[t.FULLPLAIN]}$`)
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
+}${src[t.PRERELEASELOOSE]}?${
+ src[t.BUILD]}?`)
+
+createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
+
+createToken('GTLT', '((?:<|>)?=?)')
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
+createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
+
+createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:${src[t.PRERELEASE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:${src[t.PRERELEASELOOSE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
+createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+createToken('COERCEPLAIN', `${'(^|[^\\d])' +
+ '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
+createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
+createToken('COERCEFULL', src[t.COERCEPLAIN] +
+ `(?:${src[t.PRERELEASE]})?` +
+ `(?:${src[t.BUILD]})?` +
+ `(?:$|[^\\d])`)
+createToken('COERCERTL', src[t.COERCE], true)
+createToken('COERCERTLFULL', src[t.COERCEFULL], true)
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+createToken('LONETILDE', '(?:~>?)')
+
+createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
+exports.tildeTrimReplace = '$1~'
+
+createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
+createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+createToken('LONECARET', '(?:\\^)')
+
+createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
+exports.caretTrimReplace = '$1^'
+
+createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
+createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
+createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
+}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
+exports.comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAIN]})` +
+ `\\s*$`)
+
+createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s*$`)
+
+// Star ranges basically just allow anything at all.
+createToken('STAR', '(<|>)?=?\\s*\\*')
+// >=0.0.0 is like a star
+createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
+createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/package.json b/node_modules/@puppeteer/browsers/node_modules/semver/package.json
new file mode 100644
index 0000000..f00c6bd
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/package.json
@@ -0,0 +1,78 @@
+{
+ "name": "semver",
+ "version": "7.6.0",
+ "description": "The semantic version parser used by npm.",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
+ "postlint": "template-oss-check",
+ "lintfix": "npm run lint -- --fix",
+ "posttest": "npm run lint",
+ "template-oss-apply": "template-oss-apply --force"
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^4.0.0",
+ "@npmcli/template-oss": "4.21.3",
+ "tap": "^16.0.0"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/node-semver.git"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "files": [
+ "bin/",
+ "lib/",
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ],
+ "tap": {
+ "timeout": 30,
+ "coverage-map": "map.js",
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "author": "GitHub Inc.",
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "4.21.3",
+ "engines": ">=10",
+ "distPaths": [
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ],
+ "allowPaths": [
+ "/classes/",
+ "/functions/",
+ "/internal/",
+ "/ranges/",
+ "/index.js",
+ "/preload.js",
+ "/range.bnf"
+ ],
+ "publish": "true"
+ }
+}
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/preload.js b/node_modules/@puppeteer/browsers/node_modules/semver/preload.js
new file mode 100644
index 0000000..947cd4f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/preload.js
@@ -0,0 +1,2 @@
+// XXX remove in v8 or beyond
+module.exports = require('./index.js')
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/range.bnf b/node_modules/@puppeteer/browsers/node_modules/semver/range.bnf
new file mode 100644
index 0000000..d4c6ae0
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/gtr.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/gtr.js
new file mode 100644
index 0000000..db7e355
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/gtr.js
@@ -0,0 +1,4 @@
+// Determine if version is greater than all the versions possible in the range.
+const outside = require('./outside')
+const gtr = (version, range, options) => outside(version, range, '>', options)
+module.exports = gtr
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/intersects.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/intersects.js
new file mode 100644
index 0000000..e0e9b7c
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/intersects.js
@@ -0,0 +1,7 @@
+const Range = require('../classes/range')
+const intersects = (r1, r2, options) => {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2, options)
+}
+module.exports = intersects
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/ltr.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/ltr.js
new file mode 100644
index 0000000..528a885
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/ltr.js
@@ -0,0 +1,4 @@
+const outside = require('./outside')
+// Determine if version is less than all the versions possible in the range
+const ltr = (version, range, options) => outside(version, range, '<', options)
+module.exports = ltr
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/max-satisfying.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/max-satisfying.js
new file mode 100644
index 0000000..6e3d993
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/max-satisfying.js
@@ -0,0 +1,25 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+
+const maxSatisfying = (versions, range, options) => {
+ let max = null
+ let maxSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+module.exports = maxSatisfying
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/min-satisfying.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/min-satisfying.js
new file mode 100644
index 0000000..9b60974
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/min-satisfying.js
@@ -0,0 +1,24 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const minSatisfying = (versions, range, options) => {
+ let min = null
+ let minSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+module.exports = minSatisfying
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/min-version.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/min-version.js
new file mode 100644
index 0000000..350e1f7
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/min-version.js
@@ -0,0 +1,61 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const gt = require('../functions/gt')
+
+const minVersion = (range, loose) => {
+ range = new Range(range, loose)
+
+ let minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let setMin = null
+ comparators.forEach((comparator) => {
+ // Clone to avoid manipulating the comparator's semver object.
+ const compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!setMin || gt(compver, setMin)) {
+ setMin = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error(`Unexpected operation: ${comparator.operator}`)
+ }
+ })
+ if (setMin && (!minver || gt(minver, setMin))) {
+ minver = setMin
+ }
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+module.exports = minVersion
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/outside.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/outside.js
new file mode 100644
index 0000000..ae99b10
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/outside.js
@@ -0,0 +1,80 @@
+const SemVer = require('../classes/semver')
+const Comparator = require('../classes/comparator')
+const { ANY } = Comparator
+const Range = require('../classes/range')
+const satisfies = require('../functions/satisfies')
+const gt = require('../functions/gt')
+const lt = require('../functions/lt')
+const lte = require('../functions/lte')
+const gte = require('../functions/gte')
+
+const outside = (version, range, hilo, options) => {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ let gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisfies the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let high = null
+ let low = null
+
+ comparators.forEach((comparator) => {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+module.exports = outside
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/simplify.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/simplify.js
new file mode 100644
index 0000000..618d5b6
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/simplify.js
@@ -0,0 +1,47 @@
+// given a set of versions and a range, create a "simplified" range
+// that includes the same versions that the original range does
+// If the original range is shorter than the simplified one, return that.
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+module.exports = (versions, range, options) => {
+ const set = []
+ let first = null
+ let prev = null
+ const v = versions.sort((a, b) => compare(a, b, options))
+ for (const version of v) {
+ const included = satisfies(version, range, options)
+ if (included) {
+ prev = version
+ if (!first) {
+ first = version
+ }
+ } else {
+ if (prev) {
+ set.push([first, prev])
+ }
+ prev = null
+ first = null
+ }
+ }
+ if (first) {
+ set.push([first, null])
+ }
+
+ const ranges = []
+ for (const [min, max] of set) {
+ if (min === max) {
+ ranges.push(min)
+ } else if (!max && min === v[0]) {
+ ranges.push('*')
+ } else if (!max) {
+ ranges.push(`>=${min}`)
+ } else if (min === v[0]) {
+ ranges.push(`<=${max}`)
+ } else {
+ ranges.push(`${min} - ${max}`)
+ }
+ }
+ const simplified = ranges.join(' || ')
+ const original = typeof range.raw === 'string' ? range.raw : String(range)
+ return simplified.length < original.length ? simplified : range
+}
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/subset.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/subset.js
new file mode 100644
index 0000000..1e5c268
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/subset.js
@@ -0,0 +1,247 @@
+const Range = require('../classes/range.js')
+const Comparator = require('../classes/comparator.js')
+const { ANY } = Comparator
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+
+// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
+// - Every simple range `r1, r2, ...` is a null set, OR
+// - Every simple range `r1, r2, ...` which is not a null set is a subset of
+// some `R1, R2, ...`
+//
+// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
+// - If c is only the ANY comparator
+// - If C is only the ANY comparator, return true
+// - Else if in prerelease mode, return false
+// - else replace c with `[>=0.0.0]`
+// - If C is only the ANY comparator
+// - if in prerelease mode, return true
+// - else replace C with `[>=0.0.0]`
+// - Let EQ be the set of = comparators in c
+// - If EQ is more than one, return true (null set)
+// - Let GT be the highest > or >= comparator in c
+// - Let LT be the lowest < or <= comparator in c
+// - If GT and LT, and GT.semver > LT.semver, return true (null set)
+// - If any C is a = range, and GT or LT are set, return false
+// - If EQ
+// - If GT, and EQ does not satisfy GT, return true (null set)
+// - If LT, and EQ does not satisfy LT, return true (null set)
+// - If EQ satisfies every C, return true
+// - Else return false
+// - If GT
+// - If GT.semver is lower than any > or >= comp in C, return false
+// - If GT is >=, and GT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the GT.semver tuple, return false
+// - If LT
+// - If LT.semver is greater than any < or <= comp in C, return false
+// - If LT is <=, and LT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the LT.semver tuple, return false
+// - Else return true
+
+const subset = (sub, dom, options = {}) => {
+ if (sub === dom) {
+ return true
+ }
+
+ sub = new Range(sub, options)
+ dom = new Range(dom, options)
+ let sawNonNull = false
+
+ OUTER: for (const simpleSub of sub.set) {
+ for (const simpleDom of dom.set) {
+ const isSub = simpleSubset(simpleSub, simpleDom, options)
+ sawNonNull = sawNonNull || isSub !== null
+ if (isSub) {
+ continue OUTER
+ }
+ }
+ // the null set is a subset of everything, but null simple ranges in
+ // a complex range should be ignored. so if we saw a non-null range,
+ // then we know this isn't a subset, but if EVERY simple range was null,
+ // then it is a subset.
+ if (sawNonNull) {
+ return false
+ }
+ }
+ return true
+}
+
+const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
+const minimumVersion = [new Comparator('>=0.0.0')]
+
+const simpleSubset = (sub, dom, options) => {
+ if (sub === dom) {
+ return true
+ }
+
+ if (sub.length === 1 && sub[0].semver === ANY) {
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ return true
+ } else if (options.includePrerelease) {
+ sub = minimumVersionWithPreRelease
+ } else {
+ sub = minimumVersion
+ }
+ }
+
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ if (options.includePrerelease) {
+ return true
+ } else {
+ dom = minimumVersion
+ }
+ }
+
+ const eqSet = new Set()
+ let gt, lt
+ for (const c of sub) {
+ if (c.operator === '>' || c.operator === '>=') {
+ gt = higherGT(gt, c, options)
+ } else if (c.operator === '<' || c.operator === '<=') {
+ lt = lowerLT(lt, c, options)
+ } else {
+ eqSet.add(c.semver)
+ }
+ }
+
+ if (eqSet.size > 1) {
+ return null
+ }
+
+ let gtltComp
+ if (gt && lt) {
+ gtltComp = compare(gt.semver, lt.semver, options)
+ if (gtltComp > 0) {
+ return null
+ } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
+ return null
+ }
+ }
+
+ // will iterate one or zero times
+ for (const eq of eqSet) {
+ if (gt && !satisfies(eq, String(gt), options)) {
+ return null
+ }
+
+ if (lt && !satisfies(eq, String(lt), options)) {
+ return null
+ }
+
+ for (const c of dom) {
+ if (!satisfies(eq, String(c), options)) {
+ return false
+ }
+ }
+
+ return true
+ }
+
+ let higher, lower
+ let hasDomLT, hasDomGT
+ // if the subset has a prerelease, we need a comparator in the superset
+ // with the same tuple and a prerelease, or it's not a subset
+ let needDomLTPre = lt &&
+ !options.includePrerelease &&
+ lt.semver.prerelease.length ? lt.semver : false
+ let needDomGTPre = gt &&
+ !options.includePrerelease &&
+ gt.semver.prerelease.length ? gt.semver : false
+ // exception: <1.2.3-0 is the same as <1.2.3
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
+ lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
+ needDomLTPre = false
+ }
+
+ for (const c of dom) {
+ hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
+ hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
+ if (gt) {
+ if (needDomGTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomGTPre.major &&
+ c.semver.minor === needDomGTPre.minor &&
+ c.semver.patch === needDomGTPre.patch) {
+ needDomGTPre = false
+ }
+ }
+ if (c.operator === '>' || c.operator === '>=') {
+ higher = higherGT(gt, c, options)
+ if (higher === c && higher !== gt) {
+ return false
+ }
+ } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (lt) {
+ if (needDomLTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomLTPre.major &&
+ c.semver.minor === needDomLTPre.minor &&
+ c.semver.patch === needDomLTPre.patch) {
+ needDomLTPre = false
+ }
+ }
+ if (c.operator === '<' || c.operator === '<=') {
+ lower = lowerLT(lt, c, options)
+ if (lower === c && lower !== lt) {
+ return false
+ }
+ } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
+ return false
+ }
+ }
+
+ // if there was a < or >, and nothing in the dom, then must be false
+ // UNLESS it was limited by another range in the other direction.
+ // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
+ return false
+ }
+
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
+ return false
+ }
+
+ // we needed a prerelease range in a specific tuple, but didn't get one
+ // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
+ // because it includes prereleases in the 1.2.3 tuple
+ if (needDomGTPre || needDomLTPre) {
+ return false
+ }
+
+ return true
+}
+
+// >=1.2.3 is lower than >1.2.3
+const higherGT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp > 0 ? a
+ : comp < 0 ? b
+ : b.operator === '>' && a.operator === '>=' ? b
+ : a
+}
+
+// <=1.2.3 is higher than <1.2.3
+const lowerLT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp < 0 ? a
+ : comp > 0 ? b
+ : b.operator === '<' && a.operator === '<=' ? b
+ : a
+}
+
+module.exports = subset
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/to-comparators.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/to-comparators.js
new file mode 100644
index 0000000..6c8bc7e
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/to-comparators.js
@@ -0,0 +1,8 @@
+const Range = require('../classes/range')
+
+// Mostly just for testing and legacy API reasons
+const toComparators = (range, options) =>
+ new Range(range, options).set
+ .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
+
+module.exports = toComparators
diff --git a/node_modules/@puppeteer/browsers/node_modules/semver/ranges/valid.js b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/valid.js
new file mode 100644
index 0000000..365f356
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/node_modules/semver/ranges/valid.js
@@ -0,0 +1,11 @@
+const Range = require('../classes/range')
+const validRange = (range, options) => {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+module.exports = validRange
diff --git a/node_modules/@puppeteer/browsers/package.json b/node_modules/@puppeteer/browsers/package.json
index 890e4e6..0f2afa7 100644
--- a/node_modules/@puppeteer/browsers/package.json
+++ b/node_modules/@puppeteer/browsers/package.json
@@ -1,6 +1,6 @@
{
"name": "@puppeteer/browsers",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Download and launch browsers",
"scripts": {
"build:docs": "wireit",
@@ -98,10 +98,11 @@
"debug": "4.3.4",
"extract-zip": "2.0.1",
"progress": "2.0.3",
- "proxy-agent": "6.3.1",
- "tar-fs": "3.0.4",
+ "proxy-agent": "6.4.0",
+ "tar-fs": "3.0.5",
"unbzip2-stream": "1.4.3",
- "yargs": "17.7.2"
+ "yargs": "17.7.2",
+ "semver": "7.6.0"
},
"devDependencies": {
"@types/debug": "4.1.12",
diff --git a/node_modules/@puppeteer/browsers/src/CLI.ts b/node_modules/@puppeteer/browsers/src/CLI.ts
index 255f554..281f22c 100644
--- a/node_modules/@puppeteer/browsers/src/CLI.ts
+++ b/node_modules/@puppeteer/browsers/src/CLI.ts
@@ -173,6 +173,18 @@
'Install the latest available build for the Chrome browser.'
);
yargs.example(
+ '$0 install chrome@stable',
+ 'Install the latest available build for the Chrome browser from the stable channel.'
+ );
+ yargs.example(
+ '$0 install chrome@beta',
+ 'Install the latest available build for the Chrome browser from the beta channel.'
+ );
+ yargs.example(
+ '$0 install chrome@dev',
+ 'Install the latest available build for the Chrome browser from the dev channel.'
+ );
+ yargs.example(
'$0 install chrome@canary',
'Install the latest available build for the Chrome Canary browser.'
);
@@ -238,6 +250,7 @@
}
args.browser.buildId = pinnedVersion;
}
+ const originalBuildId = args.browser.buildId;
args.browser.buildId = await resolveBuildId(
args.browser.name,
args.platform,
@@ -253,6 +266,10 @@
args.browser.buildId
),
baseUrl: args.baseUrl,
+ buildIdAlias:
+ originalBuildId !== args.browser.buildId
+ ? originalBuildId
+ : undefined,
});
console.log(
`${args.browser.name}@${
diff --git a/node_modules/@puppeteer/browsers/src/Cache.ts b/node_modules/@puppeteer/browsers/src/Cache.ts
index 13b4658..e6b574d 100644
--- a/node_modules/@puppeteer/browsers/src/Cache.ts
+++ b/node_modules/@puppeteer/browsers/src/Cache.ts
@@ -8,13 +8,18 @@
import os from 'os';
import path from 'path';
+import debug from 'debug';
+
import {
Browser,
type BrowserPlatform,
executablePathByBrowser,
+ getVersionComparator,
} from './browser-data/browser-data.js';
import {detectBrowserPlatform} from './detectPlatform.js';
+const debugCache = debug('puppeteer:browsers:cache');
+
/**
* @public
*/
@@ -57,6 +62,14 @@
this.buildId
);
}
+
+ readMetadata(): Metadata {
+ return this.#cache.readMetadata(this.browser);
+ }
+
+ writeMetadata(metadata: Metadata): void {
+ this.#cache.writeMetadata(this.browser, metadata);
+ }
}
/**
@@ -80,6 +93,11 @@
buildId: string;
}
+export interface Metadata {
+ // Maps an alias (canary/latest/dev/etc.) to a buildId.
+ aliases: Record<string, string>;
+}
+
/**
* The cache used by Puppeteer relies on the following structure:
*
@@ -112,6 +130,39 @@
return path.join(this.#rootDir, browser);
}
+ metadataFile(browser: Browser): string {
+ return path.join(this.browserRoot(browser), '.metadata');
+ }
+
+ readMetadata(browser: Browser): Metadata {
+ const metatadaPath = this.metadataFile(browser);
+ if (!fs.existsSync(metatadaPath)) {
+ return {aliases: {}};
+ }
+ // TODO: add type-safe parsing.
+ const data = JSON.parse(fs.readFileSync(metatadaPath, 'utf8'));
+ if (typeof data !== 'object') {
+ throw new Error('.metadata is not an object');
+ }
+ return data;
+ }
+
+ writeMetadata(browser: Browser, metadata: Metadata): void {
+ const metatadaPath = this.metadataFile(browser);
+ fs.mkdirSync(path.dirname(metatadaPath), {recursive: true});
+ fs.writeFileSync(metatadaPath, JSON.stringify(metadata, null, 2));
+ }
+
+ resolveAlias(browser: Browser, alias: string): string | undefined {
+ const metadata = this.readMetadata(browser);
+ if (alias === 'latest') {
+ return Object.values(metadata.aliases || {})
+ .sort(getVersionComparator(browser))
+ .at(-1);
+ }
+ return metadata.aliases[alias];
+ }
+
installationDir(
browser: Browser,
platform: BrowserPlatform,
@@ -134,6 +185,12 @@
platform: BrowserPlatform,
buildId: string
): void {
+ const metadata = this.readMetadata(browser);
+ for (const alias of Object.keys(metadata.aliases)) {
+ if (metadata.aliases[alias] === buildId) {
+ delete metadata.aliases[alias];
+ }
+ }
fs.rmSync(this.installationDir(browser, platform, buildId), {
force: true,
recursive: true,
@@ -180,6 +237,12 @@
`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`
);
}
+ try {
+ options.buildId =
+ this.resolveAlias(options.browser, options.buildId) ?? options.buildId;
+ } catch {
+ debugCache('could not read .metadata file for the browser');
+ }
const installationDir = this.installationDir(
options.browser,
options.platform,
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/browser-data.ts b/node_modules/@puppeteer/browsers/src/browser-data/browser-data.ts
index 67bb499..3e78030 100644
--- a/node_modules/@puppeteer/browsers/src/browser-data/browser-data.ts
+++ b/node_modules/@puppeteer/browsers/src/browser-data/browser-data.ts
@@ -43,6 +43,14 @@
[Browser.FIREFOX]: firefox.relativeExecutablePath,
};
+export const versionComparators = {
+ [Browser.CHROMEDRIVER]: chromedriver.compareVersions,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.compareVersions,
+ [Browser.CHROME]: chrome.compareVersions,
+ [Browser.CHROMIUM]: chromium.compareVersions,
+ [Browser.FIREFOX]: firefox.compareVersions,
+};
+
export {Browser, BrowserPlatform, ChromeReleaseChannel};
/**
@@ -185,3 +193,15 @@
return chrome.resolveSystemExecutablePath(platform, channel);
}
}
+
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+export function getVersionComparator(
+ browser: Browser
+): (a: string, b: string) => number {
+ return versionComparators[browser];
+}
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/chrome-headless-shell.ts b/node_modules/@puppeteer/browsers/src/browser-data/chrome-headless-shell.ts
index b1c6178..f5f65cd 100644
--- a/node_modules/@puppeteer/browsers/src/browser-data/chrome-headless-shell.ts
+++ b/node_modules/@puppeteer/browsers/src/browser-data/chrome-headless-shell.ts
@@ -25,7 +25,7 @@
export function resolveDownloadUrl(
platform: BrowserPlatform,
buildId: string,
- baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing'
+ baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
): string {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
@@ -66,4 +66,4 @@
}
}
-export {resolveBuildId} from './chrome.js';
+export {resolveBuildId, compareVersions} from './chrome.js';
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/chrome.ts b/node_modules/@puppeteer/browsers/src/browser-data/chrome.ts
index c632925..c797516 100644
--- a/node_modules/@puppeteer/browsers/src/browser-data/chrome.ts
+++ b/node_modules/@puppeteer/browsers/src/browser-data/chrome.ts
@@ -6,6 +6,8 @@
import path from 'path';
+import semver from 'semver';
+
import {getJSON} from '../httpUtil.js';
import {BrowserPlatform, ChromeReleaseChannel} from './types.js';
@@ -28,7 +30,7 @@
export function resolveDownloadUrl(
platform: BrowserPlatform,
buildId: string,
- baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing'
+ baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
): string {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
@@ -193,3 +195,19 @@
`Unable to detect browser executable path for '${channel}' on ${platform}.`
);
}
+
+export function compareVersions(a: string, b: string): number {
+ if (!semver.valid(a)) {
+ throw new Error(`Version ${a} is not a valid semver version`);
+ }
+ if (!semver.valid(b)) {
+ throw new Error(`Version ${b} is not a valid semver version`);
+ }
+ if (semver.gt(a, b)) {
+ return 1;
+ } else if (semver.lt(a, b)) {
+ return -1;
+ } else {
+ return 0;
+ }
+}
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/chromedriver.ts b/node_modules/@puppeteer/browsers/src/browser-data/chromedriver.ts
index 290598d..2f1242b 100644
--- a/node_modules/@puppeteer/browsers/src/browser-data/chromedriver.ts
+++ b/node_modules/@puppeteer/browsers/src/browser-data/chromedriver.ts
@@ -25,7 +25,7 @@
export function resolveDownloadUrl(
platform: BrowserPlatform,
buildId: string,
- baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing'
+ baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
): string {
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
}
@@ -53,4 +53,4 @@
}
}
-export {resolveBuildId} from './chrome.js';
+export {resolveBuildId, compareVersions} from './chrome.js';
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/chromium.ts b/node_modules/@puppeteer/browsers/src/browser-data/chromium.ts
index 09cfc98..820e76d 100644
--- a/node_modules/@puppeteer/browsers/src/browser-data/chromium.ts
+++ b/node_modules/@puppeteer/browsers/src/browser-data/chromium.ts
@@ -86,3 +86,7 @@
)
);
}
+
+export function compareVersions(a: string, b: string): number {
+ return Number(a) - Number(b);
+}
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/firefox.ts b/node_modules/@puppeteer/browsers/src/browser-data/firefox.ts
index ccc30fa..6c22193 100644
--- a/node_modules/@puppeteer/browsers/src/browser-data/firefox.ts
+++ b/node_modules/@puppeteer/browsers/src/browser-data/firefox.ts
@@ -328,3 +328,8 @@
await fs.promises.copyFile(prefsPath, prefsBackupPath);
}
}
+
+export function compareVersions(a: string, b: string): number {
+ // TODO: this is a not very reliable check.
+ return parseInt(a.replace('.', ''), 16) - parseInt(b.replace('.', ''), 16);
+}
diff --git a/node_modules/@puppeteer/browsers/src/install.ts b/node_modules/@puppeteer/browsers/src/install.ts
index 375c75b..e78b2c3 100644
--- a/node_modules/@puppeteer/browsers/src/install.ts
+++ b/node_modules/@puppeteer/browsers/src/install.ts
@@ -11,15 +11,15 @@
import path from 'path';
import {
- type Browser,
- type BrowserPlatform,
+ Browser,
+ BrowserPlatform,
downloadUrls,
} from './browser-data/browser-data.js';
import {Cache, InstalledBrowser} from './Cache.js';
import {debug} from './debug.js';
import {detectBrowserPlatform} from './detectPlatform.js';
import {unpackArchive} from './fileUtil.js';
-import {downloadFile, headHttpRequest} from './httpUtil.js';
+import {downloadFile, getJSON, headHttpRequest} from './httpUtil.js';
const debugInstall = debug('puppeteer:browsers:install');
@@ -63,6 +63,13 @@
*/
buildId: string;
/**
+ * An alias for the provided `buildId`. It will be used to maintain local
+ * metadata to support aliases in the `launch` command.
+ *
+ * @example 'canary'
+ */
+ buildIdAlias?: string;
+ /**
* Provides information about the progress of the download.
*/
downloadProgressCallback?: (
@@ -74,7 +81,7 @@
*
* @defaultValue Either
*
- * - https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing or
+ * - https://storage.googleapis.com/chrome-for-testing-public or
* - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
*
*/
@@ -115,6 +122,68 @@
options.buildId,
options.baseUrl
);
+ try {
+ return await installUrl(url, options);
+ } catch (err) {
+ debugInstall(`Error downloading from ${url}.`);
+ switch (options.browser) {
+ case Browser.CHROME:
+ case Browser.CHROMEDRIVER:
+ case Browser.CHROMEHEADLESSSHELL: {
+ debugInstall(
+ `Trying to find download URL via https://googlechromelabs.github.io/chrome-for-testing.`
+ );
+ interface Version {
+ downloads: Record<string, Array<{platform: string; url: string}>>;
+ }
+ const version = (await getJSON(
+ new URL(
+ `https://googlechromelabs.github.io/chrome-for-testing/${options.buildId}.json`
+ )
+ )) as Version;
+ let platform = '';
+ switch (options.platform) {
+ case BrowserPlatform.LINUX:
+ platform = 'linux64';
+ break;
+ case BrowserPlatform.MAC_ARM:
+ platform = 'mac-arm64';
+ break;
+ case BrowserPlatform.MAC:
+ platform = 'mac-x64';
+ break;
+ case BrowserPlatform.WIN32:
+ platform = 'win32';
+ break;
+ case BrowserPlatform.WIN64:
+ platform = 'win64';
+ break;
+ }
+ const url = version.downloads[options.browser]?.find(link => {
+ return link['platform'] === platform;
+ })?.url;
+ if (url) {
+ debugInstall(`Falling back to downloading from ${url}.`);
+ return await installUrl(new URL(url), options);
+ }
+ throw err;
+ }
+ default:
+ throw err;
+ }
+ }
+}
+
+async function installUrl(
+ url: URL,
+ options: InstallOptions
+): Promise<InstalledBrowser | string> {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(
+ `Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`
+ );
+ }
const fileName = url.toString().split('/').pop();
assert(fileName, `A malformed download URL was found: ${url}.`);
const cache = new Cache(options.cacheDir);
@@ -140,15 +209,22 @@
options.platform,
options.buildId
);
- if (existsSync(outputPath)) {
- return new InstalledBrowser(
- cache,
- options.browser,
- options.buildId,
- options.platform
- );
- }
+
try {
+ if (existsSync(outputPath)) {
+ const installedBrowser = new InstalledBrowser(
+ cache,
+ options.browser,
+ options.buildId,
+ options.platform
+ );
+ if (!existsSync(installedBrowser.executablePath)) {
+ throw new Error(
+ `The browser folder (${outputPath}) exists but the executable (${installedBrowser.executablePath}) is missing`
+ );
+ }
+ return installedBrowser;
+ }
debugInstall(`Downloading binary from ${url}`);
try {
debugTime('download');
@@ -164,17 +240,23 @@
} finally {
debugTimeEnd('extract');
}
+ const installedBrowser = new InstalledBrowser(
+ cache,
+ options.browser,
+ options.buildId,
+ options.platform
+ );
+ if (options.buildIdAlias) {
+ const metadata = installedBrowser.readMetadata();
+ metadata.aliases[options.buildIdAlias] = options.buildId;
+ installedBrowser.writeMetadata(metadata);
+ }
+ return installedBrowser;
} finally {
if (existsSync(archivePath)) {
await unlink(archivePath);
}
}
- return new InstalledBrowser(
- cache,
- options.browser,
- options.buildId,
- options.platform
- );
}
/**
diff --git a/node_modules/@puppeteer/browsers/src/main.ts b/node_modules/@puppeteer/browsers/src/main.ts
index df93de5..c03c0c0 100644
--- a/node_modules/@puppeteer/browsers/src/main.ts
+++ b/node_modules/@puppeteer/browsers/src/main.ts
@@ -37,6 +37,7 @@
BrowserPlatform,
ChromeReleaseChannel,
createProfile,
+ getVersionComparator,
} from './browser-data/browser-data.js';
export {CLI, makeProgressCallback} from './CLI.js';
export {Cache, InstalledBrowser} from './Cache.js';
diff --git a/node_modules/@puppeteer/replay/LICENSE b/node_modules/@puppeteer/replay/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/node_modules/@puppeteer/replay/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/node_modules/@puppeteer/replay/README.md b/node_modules/@puppeteer/replay/README.md
deleted file mode 100644
index a471838..0000000
--- a/node_modules/@puppeteer/replay/README.md
+++ /dev/null
@@ -1,287 +0,0 @@
-# @puppeteer/replay
-
-<!-- [START badges] -->
-
-[](https://github.com/puppeteer/replay/actions?query=workflow%3Arun-checks) [](https://npmjs.org/package/@puppeteer/replay)
-
-<!-- [END badges] -->
-
-###### [API](https://github.com/puppeteer/replay/blob/main/docs/api) | [Contributing](https://github.com/puppeteer/replay/blob/main/docs/contributing.md)
-
-> Puppeteer Replay is a library that provides an API to replay and stringify recordings created using [Chrome DevTools Recorder](https://developer.chrome.com/docs/devtools/recorder/)
-
-## Installation
-
-```
-npm install @puppeteer/replay --save
-```
-
-If you want to replay recordings using Puppeteer, install Puppeteer as well:
-
-```
-npm install puppeteer --save
-```
-
-## Getting started with Puppeteer Replay
-
-You can use Puppeteer Replay to:
-
-1. **Replay recording**. Replay recording with CLI or using [the replay lib API](/examples/replay-from-file-using-puppeteer/main.js).
-2. **Customize replay**. Customize how a recording is run. For example, capture screenshots after each step or integrate with 3rd party libraries.
-3. **Transform recoding**. Customize how a recording is stringified. For example, transform the recording into another format.
-
-Also, you can use third-party integrations that build on top of `@puppeteer/replay`, which includes:
-
-Transform JSON user flows to custom scripts:
-
-- [Cypress Chrome Recorder](https://github.com/cypress-io/cypress-chrome-recorder). You can use it to convert user flow JSON files to Cypress test scripts. Watch this [demo](https://youtu.be/4qYs2bMz4GI) to see it in action.
-- [Nightwatch Chrome Recorder](https://github.com/nightwatchjs/nightwatch-chrome-recorder). You can use it to convert user flow JSON files to Nightwatch test scripts.
-- [WebdriverIO Chrome Recorder](https://github.com/webdriverio/chrome-recorder). You can use it to convert user flow JSON files to WebdriverIO test scripts.
-
-Replay JSON user flows:
-
-- [Replay with TestCafe](https://testcafe.io/documentation/403998/guides/experimental-capabilities/chrome-replay-support). You can use TestCafe to replay user flow JSON files and generate test reports for these recordings.
-- [Replay with Sauce Labs](https://saucelabs.com/blog/how-to-create-test-scripts-using-chrome-devtools). You can replay the JSON files on [Sauce Labs](https://saucelabs.com/) using [saucectl](https://github.com/saucelabs/saucectl-replay-example).
-
-## 1. Replay recording
-
-Download this [example recording](https://storage.googleapis.com/web-dev-uploads/file/dPDCek3EhZgLQPGtEG3y0fTn4v82/vzQbv2rUfTz2DEmx06Gv.json) and save it as `recording.json`.
-
-Using CLI + npx:
-
-```
-npx @puppeteer/replay recording.json
-```
-
-Using CLI + package.json:
-
-In your `package.json` add a new script to invoke the `replay` command:
-
-```json
-{
- "scripts": {
- "replay": "replay recording.json"
- }
-}
-```
-
-You can also give folder name as a parameter to run all the files in a folder.
-
-Using CLI + npx:
-
-```bash
-npx @puppeteer/replay all-recordings # runs all recordings in the "all-recordings" folder.
-```
-
-Using CLI + package.json:
-
-```json
-{
- "scripts": {
- "replay": "replay all-recordings"
- }
-}
-```
-
-Set the `PUPPETEER_HEADLESS` environment variable or `--headless` CLI flag to control whether the browser is start in a headful or headless mode. For example,
-
-```
-PUPPETEER_HEADLESS=true npx @puppeteer/replay recording.json # runs in headless mode, the default mode.
-PUPPETEER_HEADLESS=false npx @puppeteer/replay recording.json # runs in headful mode.
-PUPPETEER_HEADLESS=chrome npx @puppeteer/replay recording.json # runs in the new experimental headless mode.
-```
-
-Use the `--extension` CLI flag to provide a [custom replay extension](https://github.com/puppeteer/replay#2-customize-replay) for running the recording. For [example](https://github.com/puppeteer/replay/blob/main/examples/cli-extension/extension.js),
-
-```sh
-npx @puppeteer/replay --extension examples/cli-extension/extension.js recording.json
-```
-
-Run `npx @puppeteer/replay --help` to see all CLI options.
-
-Using [the replay lib API](/examples/replay-from-file-using-puppeteer/main.js):
-
-```js
-import { createRunner, parse } from '@puppeteer/replay';
-import fs from 'fs';
-
-// Read recording for a file.
-const recordingText = fs.readFileSync('./recording.json', 'utf8');
-// Validate & parse the file.
-const recording = parse(JSON.parse(recordingText));
-// Create a runner and execute the script.
-const runner = await createRunner(recording);
-await runner.run();
-```
-
-## 2. Customize replay
-
-The library offers a way to customize how a recording is run. You can extend
-the `PuppeteerRunnerExtension` class as shown in the example below.
-
-Full example of the `PuppeteerRunnerExtension`: [link](/examples/extend-runner/main.js)
-
-```js
-import { createRunner, PuppeteerRunnerExtension } from '@puppeteer/replay';
-import puppeteer from 'puppeteer';
-
-const browser = await puppeteer.launch({
- headless: true,
-});
-
-const page = await browser.newPage();
-
-class Extension extends PuppeteerRunnerExtension {
- async beforeAllSteps(flow) {
- await super.beforeAllSteps(flow);
- console.log('starting');
- }
-
- async beforeEachStep(step, flow) {
- await super.beforeEachStep(step, flow);
- console.log('before', step);
- }
-
- async afterEachStep(step, flow) {
- await super.afterEachStep(step, flow);
- console.log('after', step);
- }
-
- async afterAllSteps(flow) {
- await super.afterAllSteps(flow);
- console.log('done');
- }
-}
-
-const runner = await createRunner(
- {
- title: 'Test recording',
- steps: [
- {
- type: 'navigate',
- url: 'https://wikipedia.org',
- },
- ],
- },
- new Extension(browser, page, 7000)
-);
-
-await runner.run();
-
-await browser.close();
-```
-
-## 3. Transform recording
-
-You can customize how a recording is stringified and use it to transform the recording format.
-
-### Stringify a recording as a Puppeteer script
-
-```js
-import { stringify } from '@puppeteer/replay';
-
-console.log(
- await stringify({
- title: 'Test recording',
- steps: [],
- })
-);
-```
-
-### Customize how a recording is stringified
-
-You can customize how a recording is stringified by extending the `PuppeteerStringifyExtension` class as shown in the example below.
-
-Full example of `PuppeteerStringifyExtension` : [link](/examples/extend-stringify/main.js)
-
-```js
-import { stringify, PuppeteerStringifyExtension } from '@puppeteer/replay';
-
-class Extension extends PuppeteerStringifyExtension {
- // beforeAllSteps?(out: LineWriter, flow: UserFlow): Promise<void>;
- async beforeAllSteps(...args) {
- await super.beforeAllSteps(...args);
- args[0].appendLine('console.log("starting");');
- }
-
- // beforeEachStep?(out: LineWriter, step: Step, flow: UserFlow): Promise<void>;
- async beforeEachStep(...args) {
- await super.beforeEachStep(...args);
- const [out, step] = args;
- out.appendLine(`console.log("about to execute step ${step.type}")`);
- }
-
- // afterEachStep?(out: LineWriter, step: Step, flow: UserFlow): Promise<void>;
- async afterEachStep(...args) {
- const [out, step] = args;
- out.appendLine(`console.log("finished step ${step.type}")`);
- await super.afterEachStep(...args);
- }
-
- // afterAllSteps?(out: LineWriter, flow: UserFlow): Promise<void>;
- async afterAllSteps(...args) {
- args[0].appendLine('console.log("finished");');
- await super.afterAllSteps(...args);
- }
-}
-
-console.log(
- await stringify(
- {
- title: 'Test recording',
- steps: [
- {
- type: 'navigate',
- url: 'https://wikipedia.org',
- },
- ],
- },
- {
- extension: new Extension(),
- indentation: ' ', // use tab to indent lines
- }
- )
-);
-```
-
-## Others
-
-### Test your extensions using the replay lib
-
-The replay lib offers a canonical recording and a test page that allows to
-verify that your extension produces all expected side effects on a page.
-
-The test command supports both stringify and runner extensions. The stringify
-extension will be tested by running the stringified script using node. Run the
-test using the following command.
-
-```
-npx -p @puppeteer/replay replay-extension-test --ext path-to-your-extension-js
-```
-
-### Create a Chrome extension for Recorder (Available from Chrome 104 onwards)
-
-You can create a Chrome extension for [Recorder](https://goo.gle/devtools-recorder). Refer to the [Chrome Extensions documentation](https://developer.chrome.com/docs/extensions/mv3/devtools/) for more details on how to extend DevTools.
-
-For example, here are some of the third party extensions:
-
-- [Cypress extension](https://chrome.google.com/webstore/detail/cypress-chrome-recorder/fellcphjglholofndfmmjmheedhomgin) lets you export JSON user flows as [Cypress test script](https://github.com/cypress-io/cypress-recorder-extension). [Cypress](https://cypress.io) is a front end testing tool built for the modern web.
-- [WebPageTest extension](https://chrome.google.com/webstore/detail/webpagetest-recorder-exte/eklpnjohdjknellndlnepihjnhpaimok) lets you export user flows from the Recorder directly as [WebPageTest Custom scripts](https://docs.webpagetest.org/scripting/) to measure site's performance. See [Converting user flows to WebPageTest custom scripts](https://blog.webpagetest.org/posts/introducing-the-new-webpagetest-recorder-chrome-extension/) to learn more.
-- [Nightwatch extension](https://chrome.google.com/webstore/detail/nightwatch-chrome-recorde/nhbccjfogdgkahamfohokdhcnemjafjk/) lets you export JSON user flows as [Nightwatch test script](https://github.com/nightwatchjs/nightwatch-recorder-extension). [Nightwatch](https://nightwatchjs.org/) is an end-to-end testing solution for web applications and websites.
-- [Testing Library extension](https://chrome.google.com/webstore/detail/testing-library-recorder/pnobfbfcnoeealajjgnpeodbkkhgiici) lets you export JSON user flows as [Testing Library script](https://github.com/nickmccurdy/testing-library-recorder-extension). [Testing Library](https://testing-library.com/) has simple and complete testing utilities that encourage good testing practices.
-- [WebdriverIO extension](https://chrome.google.com/webstore/detail/webdriverio-chrome-record/pllimkccefnbmghgcikpjkmmcadeddfn?hl=en&authuser=1) lets you export JSON user flows as [WebdriverIO test script](https://github.com/webdriverio/recorder-extension). [WebdriverIO](https://webdriver.io/) is an end-to-end testing solution for web, mobile and IoT applications and websites..
-
-This feature only available from Chrome 104 onwards. Check your current Chrome version with `chrome://version`. Consider installing [Chrome Canary](https://www.google.com/chrome/canary/) to try out cutting-edge features in Chrome.
-
-This repository contains an [example extension](https://github.com/puppeteer/replay/tree/main/examples/chrome-extension). Once installed, the Recorder will have a new export option **Export as a Custom JSON script** in the [export dropdown](https://developer.chrome.com/docs/devtools/recorder/#export-flows).
-
-To load the example into Chrome DevTools. Follow these steps:
-
-1. Download the [chrome-extension](https://github.com/puppeteer/replay/tree/main/examples/chrome-extension) folder.
-2. [Load the folder as unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/#unpacked) in Chrome.
-3. [Open a recording](https://developer.chrome.com/docs/devtools/recorder/#record) in the Recorder.
-4. Click on [export](https://developer.chrome.com/docs/devtools/recorder/#export-flows). Now you can see a new **Export as a Custom JSON script** option in the export menu.
-
-Click and watch the video demo below:
-
-[](https://youtu.be/TCxIfbxgypQ)
diff --git a/node_modules/@puppeteer/replay/lib/cjs/main.cjs b/node_modules/@puppeteer/replay/lib/cjs/main.cjs
deleted file mode 100644
index fb5e4a9..0000000
--- a/node_modules/@puppeteer/replay/lib/cjs/main.cjs
+++ /dev/null
@@ -1,2091 +0,0 @@
-'use strict';
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-exports.SelectorType = void 0;
-(function (SelectorType) {
- SelectorType["CSS"] = "css";
- SelectorType["ARIA"] = "aria";
- SelectorType["Text"] = "text";
- SelectorType["XPath"] = "xpath";
- SelectorType["Pierce"] = "pierce";
-})(exports.SelectorType || (exports.SelectorType = {}));
-exports.StepType = void 0;
-(function (StepType) {
- StepType["Change"] = "change";
- StepType["Click"] = "click";
- StepType["Close"] = "close";
- StepType["CustomStep"] = "customStep";
- StepType["DoubleClick"] = "doubleClick";
- StepType["EmulateNetworkConditions"] = "emulateNetworkConditions";
- StepType["Hover"] = "hover";
- StepType["KeyDown"] = "keyDown";
- StepType["KeyUp"] = "keyUp";
- StepType["Navigate"] = "navigate";
- StepType["Scroll"] = "scroll";
- StepType["SetViewport"] = "setViewport";
- StepType["WaitForElement"] = "waitForElement";
- StepType["WaitForExpression"] = "waitForExpression";
-})(exports.StepType || (exports.StepType = {}));
-exports.AssertedEventType = void 0;
-(function (AssertedEventType) {
- AssertedEventType["Navigation"] = "navigation";
-})(exports.AssertedEventType || (exports.AssertedEventType = {}));
-
-var Schema = /*#__PURE__*/Object.freeze({
- __proto__: null,
- get AssertedEventType () { return exports.AssertedEventType; },
- get SelectorType () { return exports.SelectorType; },
- get StepType () { return exports.StepType; }
-});
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-function assertAllStepTypesAreHandled(s) {
- throw new Error(`Unknown step type: ${s.type}`);
-}
-const typeableInputTypes = new Set([
- 'textarea',
- 'text',
- 'url',
- 'tel',
- 'search',
- 'password',
- 'number',
- 'email',
-]);
-const pointerDeviceTypes = new Set([
- 'mouse',
- 'pen',
- 'touch',
-]);
-const mouseButtonMap = new Map([
- ['primary', 'left'],
- ['auxiliary', 'middle'],
- ['secondary', 'right'],
- ['back', 'back'],
- ['forward', 'forward'],
-]);
-function hasProperty(data, prop) {
- // TODO: use Object.hasOwn once types are available https://github.com/microsoft/TypeScript/issues/44253
- if (!Object.prototype.hasOwnProperty.call(data, prop)) {
- return false;
- }
- const keyedData = data;
- return keyedData[prop] !== undefined;
-}
-function isObject(data) {
- return typeof data === 'object' && data !== null;
-}
-function isString(data) {
- return typeof data === 'string';
-}
-function isNumber(data) {
- return typeof data === 'number';
-}
-function isArray(data) {
- return Array.isArray(data);
-}
-function isBoolean(data) {
- return typeof data === 'boolean';
-}
-function isIntegerArray(data) {
- return isArray(data) && data.every((item) => Number.isInteger(item));
-}
-function isKnownDeviceType(data) {
- return typeof data === 'string' && pointerDeviceTypes.has(data);
-}
-function isKnownMouseButton(data) {
- return typeof data === 'string' && mouseButtonMap.has(data);
-}
-function parseTarget(step) {
- if (hasProperty(step, 'target') && isString(step.target)) {
- return step.target;
- }
- return undefined;
-}
-function parseFrame(step) {
- if (hasProperty(step, 'frame')) {
- if (isIntegerArray(step.frame)) {
- return step.frame;
- }
- throw new Error('Step `frame` is not an integer array');
- }
- return undefined;
-}
-function parseNumber(step, prop) {
- if (hasProperty(step, prop)) {
- const maybeNumber = step[prop];
- if (isNumber(maybeNumber)) {
- return maybeNumber;
- }
- }
- throw new Error(`Step.${prop} is not a number`);
-}
-function parseBoolean(step, prop) {
- if (hasProperty(step, prop)) {
- const maybeBoolean = step[prop];
- if (isBoolean(maybeBoolean)) {
- return maybeBoolean;
- }
- }
- throw new Error(`Step.${prop} is not a boolean`);
-}
-function parseOptionalNumber(step, prop) {
- if (hasProperty(step, prop)) {
- return parseNumber(step, prop);
- }
- return undefined;
-}
-function parseOptionalString(step, prop) {
- if (hasProperty(step, prop)) {
- return parseString(step, prop);
- }
- return undefined;
-}
-function parseOptionalBoolean(step, prop) {
- if (hasProperty(step, prop)) {
- return parseBoolean(step, prop);
- }
- return undefined;
-}
-function parseString(step, prop) {
- if (hasProperty(step, prop)) {
- const maybeString = step[prop];
- if (isString(maybeString)) {
- return maybeString;
- }
- }
- throw new Error(`Step.${prop} is not a string`);
-}
-function parseSelectors(step) {
- if (!hasProperty(step, 'selectors')) {
- throw new Error('Step does not have required selectors');
- }
- if (!isArray(step.selectors)) {
- throw new Error('Step selectors are not an array');
- }
- if (step.selectors.length === 0) {
- throw new Error('Step does not have required selectors');
- }
- return step.selectors.map((s) => {
- if (!isString(s) && !isArray(s)) {
- throw new Error('Selector is not an array or string');
- }
- if (isArray(s)) {
- return s.map((sub) => {
- if (!isString(sub)) {
- throw new Error('Selector element is not a string');
- }
- return sub;
- });
- }
- return s;
- });
-}
-function parseOptionalSelectors(step) {
- if (!hasProperty(step, 'selectors')) {
- return undefined;
- }
- return parseSelectors(step);
-}
-function parseAssertedEvent(event) {
- if (!isObject(event)) {
- throw new Error('Asserted event is not an object');
- }
- if (!hasProperty(event, 'type')) {
- throw new Error('Asserted event is missing type');
- }
- if (event.type === exports.AssertedEventType.Navigation) {
- return {
- type: exports.AssertedEventType.Navigation,
- url: parseOptionalString(event, 'url'),
- title: parseOptionalString(event, 'title'),
- };
- }
- throw new Error('Unknown assertedEvent type');
-}
-function parseAssertedEvents(events) {
- if (!isArray(events)) {
- return undefined;
- }
- return events.map(parseAssertedEvent);
-}
-function parseBaseStep(type, step) {
- if (hasProperty(step, 'timeout') &&
- isNumber(step.timeout) &&
- !validTimeout(step.timeout)) {
- throw new Error(timeoutErrorMessage);
- }
- return {
- type,
- assertedEvents: hasProperty(step, 'assertedEvents')
- ? parseAssertedEvents(step.assertedEvents)
- : undefined,
- timeout: hasProperty(step, 'timeout') && isNumber(step.timeout)
- ? step.timeout
- : undefined,
- };
-}
-function parseStepWithTarget(type, step) {
- return {
- ...parseBaseStep(type, step),
- target: parseTarget(step),
- };
-}
-function parseStepWithFrame(type, step) {
- return {
- ...parseStepWithTarget(type, step),
- frame: parseFrame(step),
- };
-}
-function parseStepWithSelectors(type, step) {
- return {
- ...parseStepWithFrame(type, step),
- selectors: parseSelectors(step),
- };
-}
-function parseClickAttributes(step) {
- const attributes = {
- offsetX: parseNumber(step, 'offsetX'),
- offsetY: parseNumber(step, 'offsetY'),
- duration: parseOptionalNumber(step, 'duration'),
- };
- const deviceType = parseOptionalString(step, 'deviceType');
- if (deviceType) {
- if (!isKnownDeviceType(deviceType)) {
- throw new Error(`'deviceType' for click steps must be one of the following: ${[
- ...pointerDeviceTypes,
- ].join(', ')}`);
- }
- attributes.deviceType = deviceType;
- }
- const button = parseOptionalString(step, 'button');
- if (button) {
- if (!isKnownMouseButton(button)) {
- throw new Error(`'button' for click steps must be one of the following: ${[
- ...mouseButtonMap.keys(),
- ].join(', ')}`);
- }
- attributes.button = button;
- }
- return attributes;
-}
-function parseClickStep(step) {
- return {
- ...parseStepWithSelectors(exports.StepType.Click, step),
- ...parseClickAttributes(step),
- type: exports.StepType.Click,
- };
-}
-function parseDoubleClickStep(step) {
- return {
- ...parseStepWithSelectors(exports.StepType.DoubleClick, step),
- ...parseClickAttributes(step),
- type: exports.StepType.DoubleClick,
- };
-}
-function parseHoverStep(step) {
- return {
- ...parseStepWithSelectors(exports.StepType.Hover, step),
- type: exports.StepType.Hover,
- };
-}
-function parseChangeStep(step) {
- return {
- ...parseStepWithSelectors(exports.StepType.Change, step),
- type: exports.StepType.Change,
- value: parseString(step, 'value'),
- };
-}
-function parseKeyDownStep(step) {
- return {
- ...parseStepWithTarget(exports.StepType.KeyDown, step),
- type: exports.StepType.KeyDown,
- // TODO: type-check keys.
- key: parseString(step, 'key'),
- };
-}
-function parseKeyUpStep(step) {
- return {
- ...parseStepWithTarget(exports.StepType.KeyUp, step),
- type: exports.StepType.KeyUp,
- // TODO: type-check keys.
- key: parseString(step, 'key'),
- };
-}
-function parseEmulateNetworkConditionsStep(step) {
- return {
- ...parseStepWithTarget(exports.StepType.EmulateNetworkConditions, step),
- type: exports.StepType.EmulateNetworkConditions,
- download: parseNumber(step, 'download'),
- upload: parseNumber(step, 'upload'),
- latency: parseNumber(step, 'latency'),
- };
-}
-function parseCloseStep(step) {
- return {
- ...parseStepWithTarget(exports.StepType.Close, step),
- type: exports.StepType.Close,
- };
-}
-function parseSetViewportStep(step) {
- return {
- ...parseStepWithTarget(exports.StepType.SetViewport, step),
- type: exports.StepType.SetViewport,
- width: parseNumber(step, 'width'),
- height: parseNumber(step, 'height'),
- deviceScaleFactor: parseNumber(step, 'deviceScaleFactor'),
- isMobile: parseBoolean(step, 'isMobile'),
- hasTouch: parseBoolean(step, 'hasTouch'),
- isLandscape: parseBoolean(step, 'isLandscape'),
- };
-}
-function parseScrollStep(step) {
- return {
- ...parseStepWithFrame(exports.StepType.Scroll, step),
- type: exports.StepType.Scroll,
- x: parseOptionalNumber(step, 'x'),
- y: parseOptionalNumber(step, 'y'),
- selectors: parseOptionalSelectors(step),
- };
-}
-function parseNavigateStep(step) {
- return {
- ...parseStepWithTarget(exports.StepType.Navigate, step),
- type: exports.StepType.Navigate,
- target: parseTarget(step),
- url: parseString(step, 'url'),
- };
-}
-function parseWaitForElementStep(step) {
- const operator = parseOptionalString(step, 'operator');
- if (operator && operator !== '>=' && operator !== '==' && operator !== '<=') {
- throw new Error("WaitForElement step's operator is not one of '>=','==','<='");
- }
- if (hasProperty(step, 'attributes')) {
- if (!isObject(step.attributes) ||
- Object.values(step.attributes).some((attribute) => typeof attribute !== 'string')) {
- throw new Error("WaitForElement step's attribute is not a dictionary of strings");
- }
- }
- if (hasProperty(step, 'properties')) {
- if (!isObject(step.properties)) {
- throw new Error("WaitForElement step's attribute is not an object");
- }
- }
- return {
- ...parseStepWithSelectors(exports.StepType.WaitForElement, step),
- type: exports.StepType.WaitForElement,
- operator: operator,
- count: parseOptionalNumber(step, 'count'),
- visible: parseOptionalBoolean(step, 'visible'),
- attributes: hasProperty(step, 'attributes')
- ? step.attributes
- : undefined,
- properties: hasProperty(step, 'properties')
- ? step.properties
- : undefined,
- };
-}
-function parseWaitForExpressionStep(step) {
- if (!hasProperty(step, 'expression')) {
- throw new Error('waitForExpression step is missing `expression`');
- }
- return {
- ...parseStepWithFrame(exports.StepType.WaitForExpression, step),
- type: exports.StepType.WaitForExpression,
- expression: parseString(step, 'expression'),
- };
-}
-function parseCustomStep(step) {
- if (!hasProperty(step, 'name')) {
- throw new Error('customStep is missing name');
- }
- if (!isString(step.name)) {
- throw new Error("customStep's name is not a string");
- }
- return {
- ...parseStepWithFrame(exports.StepType.CustomStep, step),
- type: exports.StepType.CustomStep,
- name: step.name,
- parameters: hasProperty(step, 'parameters') ? step.parameters : undefined,
- };
-}
-function parseStep(step, idx) {
- if (!isObject(step)) {
- throw new Error(idx ? `Step ${idx} is not an object` : 'Step is not an object');
- }
- if (!hasProperty(step, 'type')) {
- throw new Error(idx ? `Step ${idx} does not have a type` : 'Step does not have a type');
- }
- if (!isString(step.type)) {
- throw new Error(idx
- ? `Type of the step ${idx} is not a string`
- : 'Type of the step is not a string');
- }
- switch (step.type) {
- case exports.StepType.Click:
- return parseClickStep(step);
- case exports.StepType.DoubleClick:
- return parseDoubleClickStep(step);
- case exports.StepType.Hover:
- return parseHoverStep(step);
- case exports.StepType.Change:
- return parseChangeStep(step);
- case exports.StepType.KeyDown:
- return parseKeyDownStep(step);
- case exports.StepType.KeyUp:
- return parseKeyUpStep(step);
- case exports.StepType.EmulateNetworkConditions:
- return parseEmulateNetworkConditionsStep(step);
- case exports.StepType.Close:
- return parseCloseStep(step);
- case exports.StepType.SetViewport:
- return parseSetViewportStep(step);
- case exports.StepType.Scroll:
- return parseScrollStep(step);
- case exports.StepType.Navigate:
- return parseNavigateStep(step);
- case exports.StepType.CustomStep:
- return parseCustomStep(step);
- case exports.StepType.WaitForElement:
- return parseWaitForElementStep(step);
- case exports.StepType.WaitForExpression:
- return parseWaitForExpressionStep(step);
- default:
- throw new Error(`Step type ${step.type} is not supported`);
- }
-}
-function parseSteps(steps) {
- const result = [];
- if (!isArray(steps)) {
- throw new Error('Recording `steps` is not an array');
- }
- for (const [idx, step] of steps.entries()) {
- result.push(parseStep(step, idx));
- }
- return result;
-}
-function cleanUndefined(json) {
- return JSON.parse(JSON.stringify(json));
-}
-const minTimeout = 1;
-const maxTimeout = 30000;
-const timeoutErrorMessage = `Timeout is not between ${minTimeout} and ${maxTimeout} milliseconds`;
-function validTimeout(timeout) {
- return timeout >= minTimeout && timeout <= maxTimeout;
-}
-function parse(data) {
- if (!isObject(data)) {
- throw new Error('Recording is not an object');
- }
- if (!hasProperty(data, 'title')) {
- throw new Error('Recording is missing `title`');
- }
- if (!isString(data.title)) {
- throw new Error('Recording `title` is not a string');
- }
- if (hasProperty(data, 'timeout') && !isNumber(data.timeout)) {
- throw new Error('Recording `timeout` is not a number');
- }
- if (!hasProperty(data, 'steps')) {
- throw new Error('Recording is missing `steps`');
- }
- if (hasProperty(data, 'timeout') &&
- isNumber(data.timeout) &&
- !validTimeout(data.timeout)) {
- throw new Error(timeoutErrorMessage);
- }
- return cleanUndefined({
- title: data.title,
- timeout: hasProperty(data, 'timeout') && isNumber(data.timeout)
- ? data.timeout
- : undefined,
- selectorAttribute: hasProperty(data, 'selectorAttribute') && isString(data.selectorAttribute)
- ? data.selectorAttribute
- : undefined,
- steps: parseSteps(data.steps),
- });
-}
-/**
- * Detects what type of a selector the string contains. For example,
- * `aria/Label` is a SelectorType.ARIA.
- *
- * Note that CSS selectors are special and usually don't require a prefix,
- * therefore, SelectorType.CSS is the default type if other types didn't match.
- */
-function getSelectorType(selector) {
- for (const value of Object.values(exports.SelectorType)) {
- if (selector.startsWith(`${value}/`)) {
- return value;
- }
- }
- return exports.SelectorType.CSS;
-}
-/**
- * Converts a selector or an array of selector parts into a Puppeteer selector.
- *
- * @see https://pptr.dev/guides/query-selectors#p-elements
- */
-function selectorToPElementSelector(selector) {
- if (!Array.isArray(selector)) {
- selector = [selector];
- }
- function escape(input) {
- return input.replace(/['"()]/g, `\\$&`);
- }
- const result = selector.map((s) => {
- switch (getSelectorType(s)) {
- case exports.SelectorType.ARIA:
- return `::-p-aria(${escape(s.substring(exports.SelectorType.ARIA.length + 1))})`;
- case exports.SelectorType.CSS:
- return s;
- case exports.SelectorType.XPath:
- return `::-p-xpath(${escape(s.substring(exports.SelectorType.XPath.length + 1))})`;
- case exports.SelectorType.Pierce:
- return `:scope >>> ${s.substring(exports.SelectorType.Pierce.length + 1)}`;
- case exports.SelectorType.Text:
- return `::-p-text(${escape(s.substring(exports.SelectorType.Text.length + 1))})`;
- }
- });
- return result.join(' >>>> ');
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class StringifyExtension {
- async beforeAllSteps(out, flow) { }
- async afterAllSteps(out, flow) { }
- async beforeEachStep(out, step, flow) { }
- async stringifyStep(out, step, flow) { }
- async afterEachStep(out, step, flow) { }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * Stringifies a user flow to JSON with source maps.
- *
- * You probably want to strip the source map because not all
- * parsers support comments in JSON.
- */
-class JSONStringifyExtension extends StringifyExtension {
- async beforeAllSteps(out, flow) {
- const copy = {
- ...flow,
- steps: undefined,
- };
- // Stringify top-level attributes.
- const text = JSON.stringify(copy, null, out.getIndent());
- const lines = text.split('\n');
- lines.pop();
- lines[lines.length - 1] += ',';
- lines.push(out.getIndent() + `"steps": [`);
- out.appendLine(lines.join('\n')).startBlock().startBlock();
- }
- async afterAllSteps(out) {
- out
- .endBlock()
- .endBlock()
- .appendLine(out.getIndent() + `]`)
- .appendLine('}');
- }
- async stringifyStep(out, step, flow) {
- const stepText = JSON.stringify(step, null, out.getIndent());
- if (!flow) {
- out.appendLine(stepText);
- return;
- }
- const separator = flow.steps.lastIndexOf(step) === flow.steps.length - 1 ? '' : ',';
- out.appendLine(stepText + separator);
- }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class InMemoryLineWriter {
- #indentation;
- #currentIndentation = 0;
- #lines = [];
- constructor(indentation) {
- this.#indentation = indentation;
- }
- appendLine(line) {
- const lines = line.split('\n').map((line) => {
- const indentedLine = line
- ? this.#indentation.repeat(this.#currentIndentation) + line.trimEnd()
- : '';
- return indentedLine;
- });
- this.#lines.push(...lines);
- return this;
- }
- startBlock() {
- this.#currentIndentation++;
- return this;
- }
- endBlock() {
- this.#currentIndentation--;
- if (this.#currentIndentation < 0) {
- throw new Error('Extra endBlock');
- }
- return this;
- }
- toString() {
- // Scripts should end with a final blank line.
- return this.#lines.join('\n') + '\n';
- }
- getIndent() {
- return this.#indentation;
- }
- getSize() {
- return this.#lines.length;
- }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * Copyright (c) 2020 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-function formatJSONAsJS(json, indent) {
- const buffer = [];
- format(json, buffer, 1, indent);
- return buffer.join('');
-}
-function format(json, buffer = [], level = 1, indent = ' ') {
- switch (typeof json) {
- case 'bigint':
- case 'symbol':
- case 'function':
- case 'undefined':
- throw new Error('Invalid JSON');
- case 'number':
- case 'boolean':
- buffer.push(String(json));
- break;
- case 'string':
- buffer.push(formatAsJSLiteral(json));
- break;
- case 'object': {
- if (json === null) {
- buffer.push('null');
- }
- else if (Array.isArray(json)) {
- buffer.push('[\n');
- for (let i = 0; i < json.length; i++) {
- buffer.push(indent.repeat(level));
- format(json[i], buffer, level + 1, indent);
- if (i !== json.length - 1) {
- buffer.push(',');
- }
- buffer.push('\n');
- }
- buffer.push(indent.repeat(level - 1) + ']');
- }
- else {
- buffer.push('{\n');
- const keys = Object.keys(json);
- for (let i = 0; i < keys.length; i++) {
- const key = keys[i];
- const value = json[key];
- if (value === undefined) {
- continue;
- }
- buffer.push(indent.repeat(level));
- buffer.push(key);
- buffer.push(': ');
- format(value, buffer, level + 1, indent);
- if (i !== keys.length - 1) {
- buffer.push(',');
- }
- buffer.push('\n');
- }
- buffer.push(indent.repeat(level - 1) + '}');
- }
- break;
- }
- default:
- throw new Error('Unknown object type');
- }
- return buffer;
-}
-// Taken from https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/core/platform/string-utilities.ts;l=29;drc=111134437ee51d74433829bed0088f7239e18867.
-const toHexadecimal = (charCode, padToLength) => {
- return charCode.toString(16).toUpperCase().padStart(padToLength, '0');
-};
-// Remember to update the third group in the regexps patternsToEscape and
-// patternsToEscapePlusSingleQuote when adding new entries in this map.
-const escapedReplacements = new Map([
- ['\b', '\\b'],
- ['\f', '\\f'],
- ['\n', '\\n'],
- ['\r', '\\r'],
- ['\t', '\\t'],
- ['\v', '\\v'],
- ["'", "\\'"],
- ['\\', '\\\\'],
- ['<!--', '\\x3C!--'],
- ['<script', '\\x3Cscript'],
- ['</script', '\\x3C/script'],
-]);
-const formatAsJSLiteral = (content) => {
- const patternsToEscape = /(\\|<(?:!--|\/?script))|(\p{Control})|(\p{Surrogate})/gu;
- const patternsToEscapePlusSingleQuote = /(\\|'|<(?:!--|\/?script))|(\p{Control})|(\p{Surrogate})/gu;
- const escapePattern = (match, pattern, controlChar, loneSurrogate) => {
- if (controlChar) {
- if (escapedReplacements.has(controlChar)) {
- // @ts-ignore https://github.com/microsoft/TypeScript/issues/13086
- return escapedReplacements.get(controlChar);
- }
- const twoDigitHex = toHexadecimal(controlChar.charCodeAt(0), 2);
- return '\\x' + twoDigitHex;
- }
- if (loneSurrogate) {
- const fourDigitHex = toHexadecimal(loneSurrogate.charCodeAt(0), 4);
- return '\\u' + fourDigitHex;
- }
- if (pattern) {
- return escapedReplacements.get(pattern) || '';
- }
- return match;
- };
- let escapedContent = '';
- let quote = '';
- if (!content.includes("'")) {
- quote = "'";
- escapedContent = content.replace(patternsToEscape, escapePattern);
- }
- else if (!content.includes('"')) {
- quote = '"';
- escapedContent = content.replace(patternsToEscape, escapePattern);
- }
- else if (!content.includes('`') && !content.includes('${')) {
- quote = '`';
- escapedContent = content.replace(patternsToEscape, escapePattern);
- }
- else {
- quote = "'";
- escapedContent = content.replace(patternsToEscapePlusSingleQuote, escapePattern);
- }
- return `${quote}${escapedContent}${quote}`;
-};
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class PuppeteerStringifyExtension extends StringifyExtension {
- #shouldAppendWaitForElementHelper = false;
- async beforeAllSteps(out, flow) {
- out.appendLine("const puppeteer = require('puppeteer'); // v20.7.4 or later");
- out.appendLine('');
- out.appendLine('(async () => {').startBlock();
- out.appendLine("const browser = await puppeteer.launch({headless: 'new'});");
- out.appendLine('const page = await browser.newPage();');
- out.appendLine(`const timeout = ${flow.timeout || defaultTimeout};`);
- out.appendLine('page.setDefaultTimeout(timeout);');
- out.appendLine('');
- this.#shouldAppendWaitForElementHelper = false;
- }
- async afterAllSteps(out, flow) {
- out.appendLine('');
- out.appendLine('await browser.close();');
- out.appendLine('');
- if (this.#shouldAppendWaitForElementHelper) {
- for (const line of waitForElementHelper.split('\n')) {
- out.appendLine(line);
- }
- }
- out.endBlock().appendLine('})().catch(err => {').startBlock();
- out.appendLine('console.error(err);');
- out.appendLine('process.exit(1);');
- out.endBlock().appendLine('});');
- }
- async stringifyStep(out, step, flow) {
- out.appendLine('{').startBlock();
- if (step.timeout !== undefined) {
- out.appendLine(`const timeout = ${step.timeout};`);
- }
- this.#appendContext(out, step);
- if (step.assertedEvents) {
- out.appendLine('const promises = [];');
- out.appendLine('const startWaitingForEvents = () => {').startBlock();
- for (const event of step.assertedEvents) {
- switch (event.type) {
- case exports.AssertedEventType.Navigation: {
- out.appendLine(`promises.push(${'frame' in step && step.frame ? 'frame' : 'targetPage'}.waitForNavigation());`);
- break;
- }
- default:
- throw new Error(`Event type ${event.type} is not supported`);
- }
- }
- out.endBlock().appendLine('}');
- }
- this.#appendStepType(out, step);
- if (step.assertedEvents) {
- out.appendLine('await Promise.all(promises);');
- }
- out.endBlock().appendLine('}');
- }
- #appendTarget(out, target) {
- if (target === 'main') {
- out.appendLine('const targetPage = page;');
- }
- else {
- out.appendLine(`const target = await browser.waitForTarget(t => t.url() === ${formatJSONAsJS(target, out.getIndent())}, { timeout });`);
- out.appendLine('const targetPage = await target.page();');
- out.appendLine('targetPage.setDefaultTimeout(timeout);');
- }
- }
- #appendFrame(out, path) {
- out.appendLine('let frame = targetPage.mainFrame();');
- for (const index of path) {
- out.appendLine(`frame = frame.childFrames()[${index}];`);
- }
- }
- #appendContext(out, step) {
- // TODO fix optional target: should it be main?
- this.#appendTarget(out, step.target || 'main');
- // TODO fix optional frame: should it be required?
- if (step.frame) {
- this.#appendFrame(out, step.frame);
- }
- }
- #appendLocators(out, step, action) {
- out.appendLine('await puppeteer.Locator.race([').startBlock();
- out.appendLine(step.selectors
- .map((s) => {
- return `${step.frame ? 'frame' : 'targetPage'}.locator(${formatJSONAsJS(selectorToPElementSelector(s), out.getIndent())})`;
- })
- .join(',\n'));
- out.endBlock().appendLine('])');
- out.startBlock().appendLine('.setTimeout(timeout)');
- if (step.assertedEvents?.length) {
- out.appendLine(`.on('action', () => startWaitingForEvents())`);
- }
- action();
- out.endBlock();
- }
- #appendClickStep(out, step) {
- this.#appendLocators(out, step, () => {
- out.appendLine('.click({');
- if (step.duration) {
- out.appendLine(` delay: ${step.duration},`);
- }
- if (step.button) {
- out.appendLine(` button: '${mouseButtonMap.get(step.button)}',`);
- }
- out.appendLine(' offset: {');
- out.appendLine(` x: ${step.offsetX},`);
- out.appendLine(` y: ${step.offsetY},`);
- out.appendLine(' },');
- out.appendLine('});');
- });
- }
- #appendDoubleClickStep(out, step) {
- this.#appendLocators(out, step, () => {
- out.appendLine('.click({');
- out.appendLine(` count: 2,`);
- if (step.duration) {
- out.appendLine(` delay: ${step.duration},`);
- }
- if (step.button) {
- out.appendLine(` button: '${mouseButtonMap.get(step.button)}',`);
- }
- out.appendLine(' offset: {');
- out.appendLine(` x: ${step.offsetX},`);
- out.appendLine(` y: ${step.offsetY},`);
- out.appendLine(' },');
- out.appendLine('});');
- });
- }
- #appendHoverStep(out, step) {
- this.#appendLocators(out, step, () => {
- out.appendLine('.hover();');
- });
- }
- #appendChangeStep(out, step) {
- this.#appendLocators(out, step, () => {
- out.appendLine(`.fill(${formatJSONAsJS(step.value, out.getIndent())});`);
- });
- }
- #appendEmulateNetworkConditionsStep(out, step) {
- out.appendLine('await targetPage.emulateNetworkConditions({');
- out.appendLine(` offline: ${!step.download && !step.upload},`);
- out.appendLine(` downloadThroughput: ${step.download},`);
- out.appendLine(` uploadThroughput: ${step.upload},`);
- out.appendLine(` latency: ${step.latency},`);
- out.appendLine('});');
- }
- #appendKeyDownStep(out, step) {
- out.appendLine(`await targetPage.keyboard.down(${formatJSONAsJS(step.key, out.getIndent())});`);
- }
- #appendKeyUpStep(out, step) {
- out.appendLine(`await targetPage.keyboard.up(${formatJSONAsJS(step.key, out.getIndent())});`);
- }
- #appendCloseStep(out, step) {
- out.appendLine('await targetPage.close()');
- }
- #appendViewportStep(out, step) {
- out.appendLine(`await targetPage.setViewport(${formatJSONAsJS({
- width: step.width,
- height: step.height,
- }, out.getIndent())})`);
- }
- #appendScrollStep(out, step) {
- if ('selectors' in step) {
- this.#appendLocators(out, step, () => {
- out.appendLine(`.scroll({ scrollTop: ${step.y}, scrollLeft: ${step.x}});`);
- });
- }
- else {
- out.appendLine(`await targetPage.evaluate((x, y) => { window.scroll(x, y); }, ${step.x}, ${step.y})`);
- }
- }
- #appendStepType(out, step) {
- switch (step.type) {
- case exports.StepType.Click:
- return this.#appendClickStep(out, step);
- case exports.StepType.DoubleClick:
- return this.#appendDoubleClickStep(out, step);
- case exports.StepType.Hover:
- return this.#appendHoverStep(out, step);
- case exports.StepType.Change:
- return this.#appendChangeStep(out, step);
- case exports.StepType.EmulateNetworkConditions:
- return this.#appendEmulateNetworkConditionsStep(out, step);
- case exports.StepType.KeyDown:
- return this.#appendKeyDownStep(out, step);
- case exports.StepType.KeyUp:
- return this.#appendKeyUpStep(out, step);
- case exports.StepType.Close:
- return this.#appendCloseStep(out, step);
- case exports.StepType.SetViewport:
- return this.#appendViewportStep(out, step);
- case exports.StepType.Scroll:
- return this.#appendScrollStep(out, step);
- case exports.StepType.Navigate:
- return this.#appendNavigationStep(out, step);
- case exports.StepType.WaitForElement:
- return this.#appendWaitForElementStep(out, step);
- case exports.StepType.WaitForExpression:
- return this.#appendWaitExpressionStep(out, step);
- case exports.StepType.CustomStep:
- return; // TODO: implement these
- default:
- return assertAllStepTypesAreHandled(step);
- }
- }
- #appendNavigationStep(out, step) {
- if (step.assertedEvents?.length) {
- out.appendLine(`startWaitingForEvents();`);
- }
- out.appendLine(`await targetPage.goto(${formatJSONAsJS(step.url, out.getIndent())});`);
- }
- #appendWaitExpressionStep(out, step) {
- out.appendLine(`await ${step.frame ? 'frame' : 'targetPage'}.waitForFunction(${formatJSONAsJS(step.expression, out.getIndent())}, { timeout });`);
- }
- #appendWaitForElementStep(out, step) {
- this.#shouldAppendWaitForElementHelper = true;
- out.appendLine(`await waitForElement(${formatJSONAsJS(step, out.getIndent())}, ${step.frame ? 'frame' : 'targetPage'}, timeout);`);
- }
-}
-const defaultTimeout = 5000;
-const waitForElementHelper = `async function waitForElement(step, frame, timeout) {
- const {
- count = 1,
- operator = '>=',
- visible = true,
- properties,
- attributes,
- } = step;
- const compFn = {
- '==': (a, b) => a === b,
- '>=': (a, b) => a >= b,
- '<=': (a, b) => a <= b,
- }[operator];
- await waitForFunction(async () => {
- const elements = await querySelectorsAll(step.selectors, frame);
- let result = compFn(elements.length, count);
- const elementsHandle = await frame.evaluateHandle((...elements) => {
- return elements;
- }, ...elements);
- await Promise.all(elements.map((element) => element.dispose()));
- if (result && (properties || attributes)) {
- result = await elementsHandle.evaluate(
- (elements, properties, attributes) => {
- for (const element of elements) {
- if (attributes) {
- for (const [name, value] of Object.entries(attributes)) {
- if (element.getAttribute(name) !== value) {
- return false;
- }
- }
- }
- if (properties) {
- if (!isDeepMatch(properties, element)) {
- return false;
- }
- }
- }
- return true;
-
- function isDeepMatch(a, b) {
- if (a === b) {
- return true;
- }
- if ((a && !b) || (!a && b)) {
- return false;
- }
- if (!(a instanceof Object) || !(b instanceof Object)) {
- return false;
- }
- for (const [key, value] of Object.entries(a)) {
- if (!isDeepMatch(value, b[key])) {
- return false;
- }
- }
- return true;
- }
- },
- properties,
- attributes
- );
- }
- await elementsHandle.dispose();
- return result === visible;
- }, timeout);
-}
-
-async function querySelectorsAll(selectors, frame) {
- for (const selector of selectors) {
- const result = await querySelectorAll(selector, frame);
- if (result.length) {
- return result;
- }
- }
- return [];
-}
-
-async function querySelectorAll(selector, frame) {
- if (!Array.isArray(selector)) {
- selector = [selector];
- }
- if (!selector.length) {
- throw new Error('Empty selector provided to querySelectorAll');
- }
- let elements = [];
- for (let i = 0; i < selector.length; i++) {
- const part = selector[i];
- if (i === 0) {
- elements = await frame.$$(part);
- } else {
- const tmpElements = elements;
- elements = [];
- for (const el of tmpElements) {
- elements.push(...(await el.$$(part)));
- }
- }
- if (elements.length === 0) {
- return [];
- }
- if (i < selector.length - 1) {
- const tmpElements = [];
- for (const el of elements) {
- const newEl = (await el.evaluateHandle(el => el.shadowRoot ? el.shadowRoot : el)).asElement();
- if (newEl) {
- tmpElements.push(newEl);
- }
- }
- elements = tmpElements;
- }
- }
- return elements;
-}
-
-async function waitForFunction(fn, timeout) {
- let isActive = true;
- const timeoutId = setTimeout(() => {
- isActive = false;
- }, timeout);
- while (isActive) {
- const result = await fn();
- if (result) {
- clearTimeout(timeoutId);
- return;
- }
- await new Promise(resolve => setTimeout(resolve, 100));
- }
- throw new Error('Timed out');
-}`;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-const alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
-const charToIdx = alpha.split('').reduce((acc, char, idx) => {
- acc.set(char, idx);
- return acc;
-}, new Map());
-const LEAST_5_BIT_MASK = 0b011111;
-const CONTINUATION_BIT_MASK = 0b100000;
-const MAX_INT = 2147483647;
-/**
- * Encoding variable length integer into base64 (6-bit):
- *
- * 1 N N N N N | 0 N N N N N
- *
- * The first bit indicates if there is more data for the int.
- */
-function encodeInt(num) {
- if (num < 0) {
- throw new Error('Only postive integers and zero are supported');
- }
- if (num > MAX_INT) {
- throw new Error('Only integers between 0 and ' + MAX_INT + ' are supported');
- }
- const result = [];
- do {
- let payload = num & LEAST_5_BIT_MASK;
- num >>>= 5;
- if (num > 0)
- payload |= CONTINUATION_BIT_MASK;
- result.push(alpha[payload]);
- } while (num !== 0);
- return result.join('');
-}
-function encode(nums) {
- const parts = [];
- for (const num of nums) {
- parts.push(encodeInt(num));
- }
- return parts.join('');
-}
-function decode(str) {
- const results = [];
- const chrs = str.split('');
- let result = 0;
- let shift = 0;
- for (const ch of chrs) {
- const num = charToIdx.get(ch);
- result |= (num & LEAST_5_BIT_MASK) << shift;
- shift += 5;
- const hasMore = num & CONTINUATION_BIT_MASK;
- if (!hasMore) {
- results.push(result);
- result = 0;
- shift = 0;
- }
- }
- return results;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-const SOURCE_MAP_PREFIX = '//# recorderSourceMap=';
-/**
- * Stringifes an entire recording. The following hooks are invoked with the `flow` parameter containing the entire flow:
- * - `beforeAllSteps` (once)
- * - `beforeEachStep` (per step)
- * - `stringifyStep` (per step)
- * - `afterEachStep` (per step)
- * - `afterAllSteps` (once)
- */
-async function stringify(flow, opts) {
- if (!opts) {
- opts = {};
- }
- const ext = opts.extension ?? new PuppeteerStringifyExtension();
- const out = opts.writer ?? new InMemoryLineWriter(opts.indentation ?? ' ');
- await ext.beforeAllSteps?.(out, flow);
- const sourceMap = [1]; // The first int indicates the version.
- for (const step of flow.steps) {
- const firstLine = out.getSize();
- await ext.beforeEachStep?.(out, step, flow);
- await ext.stringifyStep(out, step, flow);
- await ext.afterEachStep?.(out, step, flow);
- const lastLine = out.getSize();
- sourceMap.push(...[firstLine, lastLine - firstLine]);
- }
- await ext.afterAllSteps?.(out, flow);
- out.appendLine(SOURCE_MAP_PREFIX + encode(sourceMap));
- return out.toString();
-}
-/**
- * Stringifes a single step. Only the following hooks are invoked with the `flow` parameter as undefined:
- * - `beforeEachStep`
- * - `stringifyStep`
- * - `afterEachStep`
- */
-async function stringifyStep(step, opts) {
- if (!opts) {
- opts = {};
- }
- let ext = opts.extension;
- if (!ext) {
- ext = new PuppeteerStringifyExtension();
- }
- if (!opts.indentation) {
- opts.indentation = ' ';
- }
- const out = opts.writer ?? new InMemoryLineWriter(opts.indentation ?? ' ');
- await ext.beforeEachStep?.(out, step);
- await ext.stringifyStep(out, step);
- await ext.afterEachStep?.(out, step);
- return out.toString();
-}
-function isSourceMapLine(line) {
- return line.trim().startsWith(SOURCE_MAP_PREFIX);
-}
-/**
- * Extracts a source map from a text.
- */
-function parseSourceMap(text) {
- const lines = text.split('\n');
- for (let i = lines.length - 1; i >= 0; i--) {
- const line = lines[i];
- if (isSourceMapLine(line)) {
- return decode(line.trim().substring(SOURCE_MAP_PREFIX.length));
- }
- }
- return;
-}
-function stripSourceMap(text) {
- const lines = text.split('\n');
- return lines.filter((line) => !isSourceMapLine(line)).join('\n');
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class RunnerExtension {
- async beforeAllSteps(flow) { }
- async afterAllSteps(flow) { }
- async beforeEachStep(step, flow) { }
- async runStep(step, flow) { }
- async afterEachStep(step, flow) { }
-}
-
-const comparators = {
- '==': (a, b) => a === b,
- '>=': (a, b) => a >= b,
- '<=': (a, b) => a <= b,
-};
-class PuppeteerRunnerExtension extends RunnerExtension {
- browser;
- page;
- timeout;
- constructor(browser, page, opts) {
- super();
- this.browser = browser;
- this.page = page;
- this.timeout = opts?.timeout || 5000;
- }
- async #ensureAutomationEmulatation(pageOrFrame) {
- try {
- await pageOrFrame
- ._client()
- .send('Emulation.setAutomationOverride', { enabled: true });
- }
- catch {
- // ignore errors as not all versions support this command.
- }
- }
- #getTimeoutForStep(step, flow) {
- return step.timeout || flow?.timeout || this.timeout;
- }
- async runStep(step, flow) {
- const timeout = this.#getTimeoutForStep(step, flow);
- const page = this.page;
- const browser = this.browser;
- const targetPage = await getTargetPageForStep(browser, page, step, timeout);
- let targetFrame = null;
- if (!targetPage && step.target) {
- const frames = page.frames();
- for (const f of frames) {
- if (f.isOOPFrame() && f.url() === step.target) {
- targetFrame = f;
- break;
- }
- }
- if (!targetFrame) {
- targetFrame = await page.waitForFrame(step.target, { timeout });
- }
- }
- const targetPageOrFrame = targetFrame || targetPage;
- if (!targetPageOrFrame) {
- throw new Error('Target is not found for step: ' + JSON.stringify(step));
- }
- await this.#ensureAutomationEmulatation(targetPageOrFrame);
- const localFrame = await getFrame(targetPageOrFrame, step);
- await this.runStepInFrame(step, page, targetPageOrFrame, localFrame, timeout);
- }
- /**
- * @internal
- */
- async runStepInFrame(step, mainPage, targetPageOrFrame, localFrame, timeout) {
- let assertedEventsPromise = null;
- const startWaitingForEvents = () => {
- assertedEventsPromise = waitForEvents(localFrame, step, timeout);
- };
- const locatorRace = this.page.locatorRace;
- switch (step.type) {
- case exports.StepType.DoubleClick:
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .setTimeout(timeout)
- .on('action', () => startWaitingForEvents())
- .click({
- count: 2,
- button: step.button && mouseButtonMap.get(step.button),
- delay: step.duration,
- offset: {
- x: step.offsetX,
- y: step.offsetY,
- },
- });
- break;
- case exports.StepType.Click:
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .setTimeout(timeout)
- .on('action', () => startWaitingForEvents())
- .click({
- delay: step.duration,
- button: step.button && mouseButtonMap.get(step.button),
- offset: {
- x: step.offsetX,
- y: step.offsetY,
- },
- });
- break;
- case exports.StepType.Hover:
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .setTimeout(timeout)
- .on('action', () => startWaitingForEvents())
- .hover();
- break;
- case exports.StepType.EmulateNetworkConditions:
- {
- startWaitingForEvents();
- await mainPage.emulateNetworkConditions(step);
- }
- break;
- case exports.StepType.KeyDown:
- {
- startWaitingForEvents();
- await mainPage.keyboard.down(step.key);
- await mainPage.waitForTimeout(100);
- }
- break;
- case exports.StepType.KeyUp:
- {
- startWaitingForEvents();
- await mainPage.keyboard.up(step.key);
- await mainPage.waitForTimeout(100);
- }
- break;
- case exports.StepType.Close:
- {
- if ('close' in targetPageOrFrame) {
- startWaitingForEvents();
- await targetPageOrFrame.close();
- }
- }
- break;
- case exports.StepType.Change:
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .on('action', () => startWaitingForEvents())
- .setTimeout(timeout)
- .fill(step.value);
- break;
- case exports.StepType.SetViewport: {
- if ('setViewport' in targetPageOrFrame) {
- startWaitingForEvents();
- await targetPageOrFrame.setViewport(step);
- }
- break;
- }
- case exports.StepType.Scroll: {
- if ('selectors' in step) {
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .on('action', () => startWaitingForEvents())
- .setTimeout(timeout)
- .scroll({
- scrollLeft: step.x || 0,
- scrollTop: step.y || 0,
- });
- }
- else {
- startWaitingForEvents();
- await localFrame.evaluate((x, y) => {
- /* c8 ignore start */
- window.scroll(x, y);
- /* c8 ignore stop */
- }, step.x || 0, step.y || 0);
- }
- break;
- }
- case exports.StepType.Navigate: {
- startWaitingForEvents();
- await localFrame.goto(step.url);
- break;
- }
- case exports.StepType.WaitForElement: {
- try {
- startWaitingForEvents();
- await waitForElement(step, localFrame, timeout);
- }
- catch (err) {
- if (err.message === 'Timed out') {
- throw new Error('waitForElement timed out. The element(s) could not be found.');
- }
- else {
- throw err;
- }
- }
- break;
- }
- case exports.StepType.WaitForExpression: {
- startWaitingForEvents();
- await localFrame.waitForFunction(step.expression, {
- timeout,
- });
- break;
- }
- case exports.StepType.CustomStep: {
- // TODO implement these steps
- break;
- }
- default:
- assertAllStepTypesAreHandled(step);
- }
- await assertedEventsPromise;
- }
-}
-class PuppeteerRunnerOwningBrowserExtension extends PuppeteerRunnerExtension {
- async afterAllSteps() {
- await this.browser.close();
- }
-}
-async function getFrame(pageOrFrame, step) {
- let frame = 'mainFrame' in pageOrFrame ? pageOrFrame.mainFrame() : pageOrFrame;
- if ('frame' in step && step.frame) {
- for (const index of step.frame) {
- frame = frame.childFrames()[index];
- }
- }
- return frame;
-}
-async function getTargetPageForStep(browser, page, step, timeout) {
- if (!step.target || step.target === 'main') {
- return page;
- }
- const target = await browser.waitForTarget((t) => t.url() === step.target, {
- timeout,
- });
- const targetPage = await target.page();
- if (!targetPage) {
- return null;
- }
- targetPage.setDefaultTimeout(timeout);
- return targetPage;
-}
-async function waitForEvents(pageOrFrame, step, timeout) {
- const promises = [];
- if (step.assertedEvents) {
- for (const event of step.assertedEvents) {
- switch (event.type) {
- case exports.AssertedEventType.Navigation: {
- promises.push(pageOrFrame.waitForNavigation({
- timeout,
- }));
- continue;
- }
- default:
- throw new Error(`Event type ${event.type} is not supported`);
- }
- }
- }
- await Promise.all(promises);
-}
-async function waitForElement(step, frame, timeout) {
- const { count = 1, operator = '>=', visible = true, properties, attributes, } = step;
- const compFn = comparators[operator];
- await waitForFunction(async () => {
- const elements = await querySelectorsAll(step.selectors, frame);
- let result = compFn(elements.length, count);
- const elementsHandle = await frame.evaluateHandle((...elements) => {
- return elements;
- }, ...elements);
- await Promise.all(elements.map((element) => element.dispose()));
- if (result && (properties || attributes)) {
- result = await elementsHandle.evaluate((elements, properties, attributes) => {
- if (attributes) {
- for (const element of elements) {
- for (const [name, value] of Object.entries(attributes)) {
- if (element.getAttribute(name) !== value) {
- return false;
- }
- }
- }
- }
- if (properties) {
- for (const element of elements) {
- if (!isDeepMatch(properties, element)) {
- return false;
- }
- }
- }
- return true;
- function isDeepMatch(a, b) {
- if (a === b) {
- return true;
- }
- if ((a && !b) || (!a && b)) {
- return false;
- }
- if (!(a instanceof Object) || !(b instanceof Object)) {
- return false;
- }
- for (const [key, value] of Object.entries(a)) {
- if (!isDeepMatch(value, b[key])) {
- return false;
- }
- }
- return true;
- }
- }, properties, attributes);
- }
- await elementsHandle.dispose();
- return result === visible;
- }, timeout);
-}
-async function querySelectorsAll(selectors, frame) {
- for (const selector of selectors) {
- const result = await querySelectorAll(selector, frame);
- if (result.length) {
- return result;
- }
- }
- return [];
-}
-async function querySelectorAll(selector, frame) {
- if (!Array.isArray(selector)) {
- selector = [selector];
- }
- if (!selector.length) {
- throw new Error('Empty selector provided to querySelectorAll');
- }
- let elementHandles = await frame.$$(selector[0]);
- if (!elementHandles.length) {
- return [];
- }
- for (const part of selector.slice(1, selector.length)) {
- elementHandles = (await Promise.all(elementHandles.map(async (handle) => {
- const innerHandle = await handle.evaluateHandle((el) => el.shadowRoot ? el.shadowRoot : el);
- const elementHandles = await innerHandle.$$(part);
- innerHandle.dispose();
- handle.dispose();
- return elementHandles;
- }))).flat();
- if (!elementHandles.length) {
- return [];
- }
- }
- return elementHandles;
-}
-async function waitForFunction(fn, timeout) {
- let isActive = true;
- const timeoutId = setTimeout(() => {
- isActive = false;
- }, timeout);
- while (isActive) {
- const result = await fn();
- if (result) {
- clearTimeout(timeoutId);
- return;
- }
- await new Promise((resolve) => setTimeout(resolve, 100));
- }
- throw new Error('Timed out');
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-async function _runStepWithHooks(extension, step, flow) {
- await extension.beforeEachStep?.(step, flow);
- await extension.runStep(step, flow);
- await extension.afterEachStep?.(step, flow);
-}
-class Runner {
- #flow;
- #extension;
- #aborted = false;
- /**
- * @internal
- */
- constructor(extension) {
- this.#extension = extension;
- }
- abort() {
- this.#aborted = true;
- }
- set flow(flow) {
- this.#flow = flow;
- }
- async runBeforeAllSteps(flow) {
- await this.#extension.beforeAllSteps?.(flow);
- }
- async runAfterAllSteps(flow) {
- await this.#extension.afterAllSteps?.(flow);
- }
- /**
- * Runs the provided `step` with `beforeEachStep` and `afterEachStep` hooks.
- * Parameters from the `flow` apply if the `flow` is set.
- */
- async runStep(step) {
- await _runStepWithHooks(this.#extension, step);
- }
- /**
- * Run all the steps in the flow
- * @returns whether all the steps are run or the execution is aborted
- */
- async run() {
- if (!this.#flow) {
- throw new Error('Set the flow on the runner instance before calling `run`.');
- }
- const flow = this.#flow;
- this.#aborted = false;
- await this.#extension.beforeAllSteps?.(flow);
- if (this.#aborted) {
- return false;
- }
- for (const step of flow.steps) {
- if (this.#aborted) {
- await this.#extension.afterAllSteps?.(flow);
- return false;
- }
- await _runStepWithHooks(this.#extension, step, flow);
- }
- await this.#extension.afterAllSteps?.(flow);
- return true;
- }
-}
-async function createRunner(flowOrExtension, maybeExtension) {
- const extension = flowOrExtension instanceof RunnerExtension
- ? flowOrExtension
- : maybeExtension;
- const flow = !(flowOrExtension instanceof RunnerExtension)
- ? flowOrExtension
- : undefined;
- const runner = new Runner(extension ?? (await createPuppeteerRunnerOwningBrowserExtension()));
- if (flow) {
- runner.flow = flow;
- }
- return runner;
-}
-async function createPuppeteerRunnerOwningBrowserExtension() {
- const { default: puppeteer } = await import('puppeteer');
- const browser = await puppeteer.launch({
- headless: 'new',
- });
- const page = await browser.newPage();
- return new PuppeteerRunnerOwningBrowserExtension(browser, page);
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * Stringifies a user flow to a script that uses \@puppeteer/replay's own API.
- */
-class PuppeteerReplayStringifyExtension extends StringifyExtension {
- async beforeAllSteps(out) {
- out.appendLine("import url from 'url';");
- out.appendLine("import { createRunner } from '@puppeteer/replay';");
- out.appendLine('');
- out.appendLine('export async function run(extension) {').startBlock();
- out.appendLine('const runner = await createRunner(extension);');
- out.appendLine('');
- out.appendLine('await runner.runBeforeAllSteps();');
- out.appendLine('');
- }
- async afterAllSteps(out) {
- out.appendLine('');
- out
- .appendLine('await runner.runAfterAllSteps();')
- .endBlock()
- .appendLine('}');
- out.appendLine('');
- out
- .appendLine('if (process && import.meta.url === url.pathToFileURL(process.argv[1]).href) {')
- .startBlock()
- .appendLine('run()')
- .endBlock()
- .appendLine('}');
- }
- async stringifyStep(out, step) {
- out.appendLine(`await runner.runStep(${formatJSONAsJS(step, out.getIndent())});`);
- }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-function isNavigationStep(step) {
- return Boolean(step.type === exports.StepType.Navigate ||
- step.assertedEvents?.some((event) => event.type === exports.AssertedEventType.Navigation));
-}
-function isMobileFlow(flow) {
- for (const step of flow.steps) {
- if (step.type === exports.StepType.SetViewport) {
- return step.isMobile;
- }
- }
- return false;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class LighthouseStringifyExtension extends PuppeteerStringifyExtension {
- #isProcessingTimespan = false;
- async beforeAllSteps(out, flow) {
- out.appendLine(`const fs = require('fs');`);
- await super.beforeAllSteps(out, flow);
- out.appendLine(`const lhApi = await import('lighthouse'); // v10.0.0 or later`);
- const flags = {
- screenEmulation: {
- disabled: true,
- },
- };
- out.appendLine(`const flags = ${formatJSONAsJS(flags, out.getIndent())}`);
- if (isMobileFlow(flow)) {
- out.appendLine(`const config = undefined;`);
- }
- else {
- out.appendLine('const config = lhApi.desktopConfig;');
- }
- out.appendLine(`const lhFlow = await lhApi.startFlow(page, {name: ${formatJSONAsJS(flow.title, out.getIndent())}, config, flags});`);
- }
- async stringifyStep(out, step, flow) {
- if (step.type === exports.StepType.SetViewport) {
- await super.stringifyStep(out, step, flow);
- return;
- }
- const isNavigation = isNavigationStep(step);
- if (isNavigation) {
- if (this.#isProcessingTimespan) {
- out.appendLine(`await lhFlow.endTimespan();`);
- this.#isProcessingTimespan = false;
- }
- out.appendLine(`await lhFlow.startNavigation();`);
- }
- else if (!this.#isProcessingTimespan) {
- out.appendLine(`await lhFlow.startTimespan();`);
- this.#isProcessingTimespan = true;
- }
- await super.stringifyStep(out, step, flow);
- if (isNavigation) {
- out.appendLine(`await lhFlow.endNavigation();`);
- }
- }
- async afterAllSteps(out, flow) {
- if (this.#isProcessingTimespan) {
- out.appendLine(`await lhFlow.endTimespan();`);
- }
- out.appendLine(`const lhFlowReport = await lhFlow.generateReport();`);
- out.appendLine(`fs.writeFileSync(__dirname + '/flow.report.html', lhFlowReport)`);
- await super.afterAllSteps(out, flow);
- }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class LighthouseRunnerExtension extends PuppeteerRunnerExtension {
- #isTimespanRunning = false;
- #isNavigationRunning = false;
- #lhFlow;
- async createFlowResult() {
- if (!this.#lhFlow) {
- throw new Error('Cannot get flow result before running the flow');
- }
- return this.#lhFlow.createFlowResult();
- }
- async beforeAllSteps(flow) {
- await super.beforeAllSteps?.(flow);
- const { startFlow, desktopConfig } = await import('lighthouse');
- let config = undefined;
- if (!isMobileFlow(flow)) {
- config = desktopConfig;
- }
- this.#lhFlow = await startFlow(this.page, {
- config,
- flags: { screenEmulation: { disabled: true } },
- name: flow.title,
- });
- }
- async beforeEachStep(step, flow) {
- await super.beforeEachStep?.(step, flow);
- if (step.type === exports.StepType.SetViewport)
- return;
- if (isNavigationStep(step)) {
- if (this.#isTimespanRunning) {
- await this.#lhFlow.endTimespan();
- this.#isTimespanRunning = false;
- }
- await this.#lhFlow.startNavigation();
- this.#isNavigationRunning = true;
- }
- else if (!this.#isTimespanRunning) {
- await this.#lhFlow.startTimespan();
- this.#isTimespanRunning = true;
- }
- }
- async afterEachStep(step, flow) {
- if (this.#isNavigationRunning) {
- await this.#lhFlow.endNavigation();
- this.#isNavigationRunning = false;
- }
- await super.afterEachStep?.(step, flow);
- }
- async afterAllSteps(flow) {
- if (this.#isTimespanRunning) {
- await this.#lhFlow.endTimespan();
- }
- await super.afterAllSteps?.(flow);
- }
-}
-
-exports.JSONStringifyExtension = JSONStringifyExtension;
-exports.LighthouseRunnerExtension = LighthouseRunnerExtension;
-exports.LighthouseStringifyExtension = LighthouseStringifyExtension;
-exports.PuppeteerReplayStringifyExtension = PuppeteerReplayStringifyExtension;
-exports.PuppeteerRunnerExtension = PuppeteerRunnerExtension;
-exports.PuppeteerRunnerOwningBrowserExtension = PuppeteerRunnerOwningBrowserExtension;
-exports.PuppeteerStringifyExtension = PuppeteerStringifyExtension;
-exports.Runner = Runner;
-exports.RunnerExtension = RunnerExtension;
-exports.Schema = Schema;
-exports.StringifyExtension = StringifyExtension;
-exports.assertAllStepTypesAreHandled = assertAllStepTypesAreHandled;
-exports.createRunner = createRunner;
-exports.formatAsJSLiteral = formatAsJSLiteral;
-exports.formatJSONAsJS = formatJSONAsJS;
-exports.getSelectorType = getSelectorType;
-exports.maxTimeout = maxTimeout;
-exports.minTimeout = minTimeout;
-exports.mouseButtonMap = mouseButtonMap;
-exports.parse = parse;
-exports.parseSourceMap = parseSourceMap;
-exports.parseStep = parseStep;
-exports.pointerDeviceTypes = pointerDeviceTypes;
-exports.selectorToPElementSelector = selectorToPElementSelector;
-exports.stringify = stringify;
-exports.stringifyStep = stringifyStep;
-exports.stripSourceMap = stripSourceMap;
-exports.typeableInputTypes = typeableInputTypes;
-exports.validTimeout = validTimeout;
-//# sourceMappingURL=main.cjs.map
diff --git a/node_modules/@puppeteer/replay/lib/cjs/main.cjs.map b/node_modules/@puppeteer/replay/lib/cjs/main.cjs.map
deleted file mode 100644
index 601c547..0000000
--- a/node_modules/@puppeteer/replay/lib/cjs/main.cjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"main.cjs","sources":["../../src/Schema.ts","../../src/SchemaUtils.ts","../../src/StringifyExtension.ts","../../src/JSONStringifyExtension.ts","../../src/InMemoryLineWriter.ts","../../src/JSONUtils.ts","../../src/PuppeteerStringifyExtension.ts","../../src/vlq.ts","../../src/stringify.ts","../../src/RunnerExtension.ts","../../src/PuppeteerRunnerExtension.ts","../../src/Runner.ts","../../src/PuppeteerReplayStringifyExtension.ts","../../src/lighthouse/helpers.ts","../../src/lighthouse/LighthouseStringifyExtension.ts","../../src/lighthouse/LighthouseRunnerExtension.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["SelectorType","StepType","AssertedEventType"],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAEsBA,8BAAA;AAEzB,CAAA,UAAY,YAAS,EAAA;AACrB,IAAA,YAAY,CAAA,KAAU,CAAA,GAAA,KAAO,CAAA;AAC7B,IAAA,YAAoB,CAAA,MAAG,UAAS,CAAA;AAChC,IAAA,YAAY,CAAA,MAAA,CAAA,GAAgB,MAAA,CAAM;AAElC,IAAA,YAAA,CAAA,OAAwB,CAAA,GAAA,OAAA,CAAA;AACtB,IAAA,YAAW,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;AACX,CAAA,EAAAA,oBAAa,KAAAA,oBAAA,GAAA,EAAA,CAAA,CAAA,CAAA;AACAC,0BAAA;AACb,CAAA,UAAe,QAAA,EAAA;AACf,IAAA,QAAiB,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;AAClB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAA,CAAA;AAED,IAAA,QAAA,CAAA,OAAY,CAAQ,GAAA,OAAA,CAAA;AAClB,IAAA,QAAiB,CAAA,YAAA,CAAA,GAAA,YAAA,CAAA;AACjB,IAAA,QAAe,CAAA,aAAA,CAAA,GAAA,aAAA,CAAA;AACf,IAAA,QAAe,CAA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;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/replay/lib/cjs/main.d.cts b/node_modules/@puppeteer/replay/lib/cjs/main.d.cts
deleted file mode 100644
index 95b6a11..0000000
--- a/node_modules/@puppeteer/replay/lib/cjs/main.d.cts
+++ /dev/null
@@ -1,684 +0,0 @@
-import { Browser, Page } from 'puppeteer';
-import * as lighthouse from 'lighthouse';
-
-type ExcludeType<T, U> = {
- [K in keyof T]-?: T[K] extends U ? K : never;
-}[keyof T];
-type PickType<T, U> = Pick<T, ExcludeType<T, U>>;
-type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
-interface JSONObject {
- [key: string]: JSONValue;
-}
-type JSONArray = JSONValue[];
-type JSONSerializable<Object extends object> = PickType<Object, JSONValue>;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-type Target = string;
-type Pattern = string;
-type Selector = string | string[];
-type FrameSelector = number[];
-declare enum SelectorType {
- CSS = "css",
- ARIA = "aria",
- Text = "text",
- XPath = "xpath",
- Pierce = "pierce"
-}
-declare enum StepType {
- Change = "change",
- Click = "click",
- Close = "close",
- CustomStep = "customStep",
- DoubleClick = "doubleClick",
- EmulateNetworkConditions = "emulateNetworkConditions",
- Hover = "hover",
- KeyDown = "keyDown",
- KeyUp = "keyUp",
- Navigate = "navigate",
- Scroll = "scroll",
- SetViewport = "setViewport",
- WaitForElement = "waitForElement",
- WaitForExpression = "waitForExpression"
-}
-declare enum AssertedEventType {
- Navigation = "navigation"
-}
-interface NavigationEvent {
- type: AssertedEventType.Navigation;
- url?: Pattern;
- title?: Pattern;
-}
-type AssertedEvent = NavigationEvent;
-interface BaseStep {
- type: StepType;
- timeout?: number;
- assertedEvents?: AssertedEvent[];
-}
-interface StepWithTarget extends BaseStep {
- /**
- * Defaults to main
- */
- target?: Target;
-}
-interface StepWithFrame extends StepWithTarget {
- /**
- * Defaults to main frame
- */
- frame?: FrameSelector;
-}
-interface StepWithSelectors extends StepWithFrame {
- /**
- * A list of alternative selectors that lead to selection of a single element
- * to perform the step on. Currently, we support CSS selectors, ARIA selectors
- * (start with 'aria/'), XPath selectors (start with `xpath/`) and text
- * selectors (start with `text/`). Each selector could be a string or an array
- * of strings. If it's a string, it means that the selector points directly to
- * the target element. If it's an array, the last element is the selector for
- * the target element and the preceding selectors point to the ancestor
- * elements. If the parent element is a shadow root host, the subsequent
- * selector is evaluated only against the shadow DOM of the host (i.e.,
- * `parent.shadowRoot.querySelector`). If the parent element is not a shadow
- * root host, the subsequent selector is evaluated in the regular DOM (i.e.,
- * `parent.querySelector`).
- *
- * During the execution, it's recommended that the implementation tries out
- * all of the alternative selectors to improve reliability of the replay as
- * some selectors might get outdated over time.
- */
- selectors: Selector[];
-}
-type PointerDeviceType = 'mouse' | 'pen' | 'touch';
-type PointerButtonType = 'primary' | 'auxiliary' | 'secondary' | 'back' | 'forward';
-interface ClickAttributes {
- /**
- * Pointer type for the event. Defaults to 'mouse'.
- */
- deviceType?: PointerDeviceType;
- /**
- * Defaults to 'primary' if the device type is a mouse.
- */
- button?: PointerButtonType;
- /**
- * in px, relative to the top-left corner of the element content box. Defaults
- * to the center of the element
- */
- offsetX: number;
- /**
- * in px, relative to the top-left corner of the element content box. Defaults
- * to the center of the element
- */
- offsetY: number;
- /**
- * Delay (in ms) between the mouse up and mouse down of the click.
- *
- * @defaultValue `50`
- */
- duration?: number;
-}
-interface DoubleClickStep extends ClickAttributes, StepWithSelectors {
- type: StepType.DoubleClick;
-}
-interface ClickStep extends ClickAttributes, StepWithSelectors {
- type: StepType.Click;
-}
-interface HoverStep extends StepWithSelectors {
- type: StepType.Hover;
-}
-interface ChangeStep extends StepWithSelectors {
- type: StepType.Change;
- value: string;
-}
-interface EmulateNetworkConditionsStep extends StepWithTarget {
- type: StepType.EmulateNetworkConditions;
- download: number;
- upload: number;
- latency: number;
-}
-interface KeyDownStep extends StepWithTarget {
- type: StepType.KeyDown;
- key: Key;
-}
-interface KeyUpStep extends StepWithTarget {
- type: StepType.KeyUp;
- key: Key;
-}
-interface CloseStep extends StepWithTarget {
- type: StepType.Close;
-}
-interface SetViewportStep extends StepWithTarget {
- type: StepType.SetViewport;
- width: number;
- height: number;
- deviceScaleFactor: number;
- isMobile: boolean;
- hasTouch: boolean;
- isLandscape: boolean;
-}
-interface ScrollPageStep extends StepWithFrame {
- type: StepType.Scroll;
- /**
- * Absolute scroll x position in px. Defaults to 0
- */
- x?: number;
- /**
- * Absolute scroll y position in px. Defaults to 0
- */
- y?: number;
-}
-type ScrollElementStep = ScrollPageStep & StepWithSelectors;
-type ScrollStep = ScrollPageStep | ScrollElementStep;
-interface NavigateStep extends StepWithTarget {
- type: StepType.Navigate;
- url: string;
-}
-interface CustomStepParams {
- type: StepType.CustomStep;
- name: string;
- parameters: unknown;
-}
-type CustomStep = (CustomStepParams & StepWithTarget) | (CustomStepParams & StepWithFrame);
-type UserStep = ChangeStep | ClickStep | HoverStep | CloseStep | CustomStep | DoubleClickStep | EmulateNetworkConditionsStep | KeyDownStep | KeyUpStep | NavigateStep | ScrollStep | SetViewportStep;
-/**
- * `waitForElement` allows waiting for the presence (or absence) of the number
- * of elements identified by the selector.
- *
- * For example, the following step would wait for less than three elements
- * to be on the page that match the selector `.my-class`.
- *
- * ```
- * {
- * "type": "waitForElement",
- * "selectors": [".my-class"],
- * "operator": "<=",
- * "count": 2,
- * }
- * ```
- */
-interface WaitForElementStep extends StepWithSelectors {
- type: StepType.WaitForElement;
- /**
- * @defaultValue `'=='`
- */
- operator?: '>=' | '==' | '<=';
- /**
- * @defaultValue `1`
- */
- count?: number;
- /**
- * Whether to wait for elements matching this step to be hidden. This can be
- * thought of as an inversion of this step.
- *
- * @defaultValue `true`
- */
- visible?: boolean;
- /**
- * Whether to also check the element(s) for the given properties.
- */
- properties?: Partial<JSONSerializable<HTMLElement>> & {
- [key: string]: JSONValue;
- };
- /**
- * Whether to also check the element(s) for the given attributes.
- */
- attributes?: {
- [name: string]: string;
- };
-}
-/**
- * `waitForExpression` allows for a JavaScript expression to resolve to truthy
- * value.
- *
- * For example, the following step pauses for two seconds and then resolves to
- * true allowing the replay to continue.
- *
- * ```
- * {
- * "type": "waitForExpression",
- * "expression": "new Promise(resolve => setTimeout(() => resolve(true),
- * 2000))",
- * }
- * ```
- */
-interface WaitForExpressionStep extends StepWithFrame {
- type: StepType.WaitForExpression;
- expression: string;
-}
-type AssertionStep = WaitForElementStep | WaitForExpressionStep;
-type Step = UserStep | AssertionStep;
-interface UserFlow {
- /**
- * Human-readble title describing the recorder user flow.
- */
- title: string;
- /**
- * Timeout in milliseconds.
- */
- timeout?: number;
- /**
- * The name of the attribute to use to generate selectors instead of regular
- * CSS selectors. For example, specifying `data-testid` would generate the
- * selector `[data-testid=value]` for the element `<div data-testid=value>`.
- */
- selectorAttribute?: string;
- steps: Step[];
-}
-type Key = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'Power' | 'Eject' | 'Abort' | 'Help' | 'Backspace' | 'Tab' | 'Numpad5' | 'NumpadEnter' | 'Enter' | '\r' | '\n' | 'ShiftLeft' | 'ShiftRight' | 'ControlLeft' | 'ControlRight' | 'AltLeft' | 'AltRight' | 'Pause' | 'CapsLock' | 'Escape' | 'Convert' | 'NonConvert' | 'Space' | 'Numpad9' | 'PageUp' | 'Numpad3' | 'PageDown' | 'End' | 'Numpad1' | 'Home' | 'Numpad7' | 'ArrowLeft' | 'Numpad4' | 'Numpad8' | 'ArrowUp' | 'ArrowRight' | 'Numpad6' | 'Numpad2' | 'ArrowDown' | 'Select' | 'Open' | 'PrintScreen' | 'Insert' | 'Numpad0' | 'Delete' | 'NumpadDecimal' | 'Digit0' | 'Digit1' | 'Digit2' | 'Digit3' | 'Digit4' | 'Digit5' | 'Digit6' | 'Digit7' | 'Digit8' | 'Digit9' | 'KeyA' | 'KeyB' | 'KeyC' | 'KeyD' | 'KeyE' | 'KeyF' | 'KeyG' | 'KeyH' | 'KeyI' | 'KeyJ' | 'KeyK' | 'KeyL' | 'KeyM' | 'KeyN' | 'KeyO' | 'KeyP' | 'KeyQ' | 'KeyR' | 'KeyS' | 'KeyT' | 'KeyU' | 'KeyV' | 'KeyW' | 'KeyX' | 'KeyY' | 'KeyZ' | 'MetaLeft' | 'MetaRight' | 'ContextMenu' | 'NumpadMultiply' | 'NumpadAdd' | 'NumpadSubtract' | 'NumpadDivide' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'F13' | 'F14' | 'F15' | 'F16' | 'F17' | 'F18' | 'F19' | 'F20' | 'F21' | 'F22' | 'F23' | 'F24' | 'NumLock' | 'ScrollLock' | 'AudioVolumeMute' | 'AudioVolumeDown' | 'AudioVolumeUp' | 'MediaTrackNext' | 'MediaTrackPrevious' | 'MediaStop' | 'MediaPlayPause' | 'Semicolon' | 'Equal' | 'NumpadEqual' | 'Comma' | 'Minus' | 'Period' | 'Slash' | 'Backquote' | 'BracketLeft' | 'Backslash' | 'BracketRight' | 'Quote' | 'AltGraph' | 'Props' | 'Cancel' | 'Clear' | 'Shift' | 'Control' | 'Alt' | 'Accept' | 'ModeChange' | ' ' | 'Print' | 'Execute' | '\u0000' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'Meta' | '*' | '+' | '-' | '/' | ';' | '=' | ',' | '.' | '`' | '[' | '\\' | ']' | "'" | 'Attn' | 'CrSel' | 'ExSel' | 'EraseEof' | 'Play' | 'ZoomOut' | ')' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '(' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | ':' | '<' | '_' | '>' | '?' | '~' | '{' | '|' | '}' | '"' | 'SoftLeft' | 'SoftRight' | 'Camera' | 'Call' | 'EndCall' | 'VolumeDown' | 'VolumeUp';
-
-type Schema_AssertedEvent = AssertedEvent;
-type Schema_AssertedEventType = AssertedEventType;
-declare const Schema_AssertedEventType: typeof AssertedEventType;
-type Schema_AssertionStep = AssertionStep;
-type Schema_BaseStep = BaseStep;
-type Schema_ChangeStep = ChangeStep;
-type Schema_ClickAttributes = ClickAttributes;
-type Schema_ClickStep = ClickStep;
-type Schema_CloseStep = CloseStep;
-type Schema_CustomStep = CustomStep;
-type Schema_CustomStepParams = CustomStepParams;
-type Schema_DoubleClickStep = DoubleClickStep;
-type Schema_EmulateNetworkConditionsStep = EmulateNetworkConditionsStep;
-type Schema_FrameSelector = FrameSelector;
-type Schema_HoverStep = HoverStep;
-type Schema_Key = Key;
-type Schema_KeyDownStep = KeyDownStep;
-type Schema_KeyUpStep = KeyUpStep;
-type Schema_NavigateStep = NavigateStep;
-type Schema_NavigationEvent = NavigationEvent;
-type Schema_Pattern = Pattern;
-type Schema_PointerButtonType = PointerButtonType;
-type Schema_PointerDeviceType = PointerDeviceType;
-type Schema_ScrollElementStep = ScrollElementStep;
-type Schema_ScrollPageStep = ScrollPageStep;
-type Schema_ScrollStep = ScrollStep;
-type Schema_Selector = Selector;
-type Schema_SelectorType = SelectorType;
-declare const Schema_SelectorType: typeof SelectorType;
-type Schema_SetViewportStep = SetViewportStep;
-type Schema_Step = Step;
-type Schema_StepType = StepType;
-declare const Schema_StepType: typeof StepType;
-type Schema_StepWithFrame = StepWithFrame;
-type Schema_StepWithSelectors = StepWithSelectors;
-type Schema_StepWithTarget = StepWithTarget;
-type Schema_Target = Target;
-type Schema_UserFlow = UserFlow;
-type Schema_UserStep = UserStep;
-type Schema_WaitForElementStep = WaitForElementStep;
-type Schema_WaitForExpressionStep = WaitForExpressionStep;
-declare namespace Schema {
- export { type Schema_AssertedEvent as AssertedEvent, Schema_AssertedEventType as AssertedEventType, type Schema_AssertionStep as AssertionStep, type Schema_BaseStep as BaseStep, type Schema_ChangeStep as ChangeStep, type Schema_ClickAttributes as ClickAttributes, type Schema_ClickStep as ClickStep, type Schema_CloseStep as CloseStep, type Schema_CustomStep as CustomStep, type Schema_CustomStepParams as CustomStepParams, type Schema_DoubleClickStep as DoubleClickStep, type Schema_EmulateNetworkConditionsStep as EmulateNetworkConditionsStep, type Schema_FrameSelector as FrameSelector, type Schema_HoverStep as HoverStep, type Schema_Key as Key, type Schema_KeyDownStep as KeyDownStep, type Schema_KeyUpStep as KeyUpStep, type Schema_NavigateStep as NavigateStep, type Schema_NavigationEvent as NavigationEvent, type Schema_Pattern as Pattern, type Schema_PointerButtonType as PointerButtonType, type Schema_PointerDeviceType as PointerDeviceType, type Schema_ScrollElementStep as ScrollElementStep, type Schema_ScrollPageStep as ScrollPageStep, type Schema_ScrollStep as ScrollStep, type Schema_Selector as Selector, Schema_SelectorType as SelectorType, type Schema_SetViewportStep as SetViewportStep, type Schema_Step as Step, Schema_StepType as StepType, type Schema_StepWithFrame as StepWithFrame, type Schema_StepWithSelectors as StepWithSelectors, type Schema_StepWithTarget as StepWithTarget, type Schema_Target as Target, type Schema_UserFlow as UserFlow, type Schema_UserStep as UserStep, type Schema_WaitForElementStep as WaitForElementStep, type Schema_WaitForExpressionStep as WaitForExpressionStep };
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare function assertAllStepTypesAreHandled(s: never): never;
-declare const typeableInputTypes: ReadonlySet<string>;
-declare const pointerDeviceTypes: ReadonlySet<string>;
-declare const mouseButtonMap: ReadonlyMap<string, 'left' | 'middle' | 'right' | 'back' | 'forward'>;
-declare function parseStep(step: unknown, idx?: number): Step;
-declare const minTimeout = 1;
-declare const maxTimeout = 30000;
-declare function validTimeout(timeout: number): boolean;
-declare function parse(data: unknown): UserFlow;
-/**
- * Detects what type of a selector the string contains. For example,
- * `aria/Label` is a SelectorType.ARIA.
- *
- * Note that CSS selectors are special and usually don't require a prefix,
- * therefore, SelectorType.CSS is the default type if other types didn't match.
- */
-declare function getSelectorType(selector: string): SelectorType;
-/**
- * Converts a selector or an array of selector parts into a Puppeteer selector.
- *
- * @see https://pptr.dev/guides/query-selectors#p-elements
- */
-declare function selectorToPElementSelector(selector: string[] | string): string;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-interface LineWriter {
- appendLine(line: string): LineWriter;
- startBlock(): LineWriter;
- endBlock(): LineWriter;
- getIndent(): string;
- getSize(): number;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class StringifyExtension {
- beforeAllSteps?(out: LineWriter, flow: UserFlow): Promise<void>;
- afterAllSteps?(out: LineWriter, flow: UserFlow): Promise<void>;
- beforeEachStep?(out: LineWriter, step: Step, flow?: UserFlow): Promise<void>;
- stringifyStep(out: LineWriter, step: Step, flow?: UserFlow): Promise<void>;
- afterEachStep?(out: LineWriter, step: Step, flow?: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/**
- * Stringifies a user flow to JSON with source maps.
- *
- * You probably want to strip the source map because not all
- * parsers support comments in JSON.
- */
-declare class JSONStringifyExtension extends StringifyExtension {
- beforeAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
- afterAllSteps(out: LineWriter): Promise<void>;
- stringifyStep(out: LineWriter, step: Step, flow?: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-interface StringifyOptions {
- extension?: StringifyExtension;
- writer?: LineWriter;
- indentation?: string;
-}
-/**
- * The format is [version, [lineNo, length], [lineNo, length] ... [lineNo, length]].
- */
-type SourceMap = Array<number>;
-/**
- * Stringifes an entire recording. The following hooks are invoked with the `flow` parameter containing the entire flow:
- * - `beforeAllSteps` (once)
- * - `beforeEachStep` (per step)
- * - `stringifyStep` (per step)
- * - `afterEachStep` (per step)
- * - `afterAllSteps` (once)
- */
-declare function stringify(flow: UserFlow, opts?: StringifyOptions): Promise<string>;
-/**
- * Stringifes a single step. Only the following hooks are invoked with the `flow` parameter as undefined:
- * - `beforeEachStep`
- * - `stringifyStep`
- * - `afterEachStep`
- */
-declare function stringifyStep(step: Step, opts?: StringifyOptions): Promise<string>;
-/**
- * Extracts a source map from a text.
- */
-declare function parseSourceMap(text: string): SourceMap | undefined;
-declare function stripSourceMap(text: string): string;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class RunnerExtension {
- beforeAllSteps?(flow?: UserFlow): Promise<void>;
- afterAllSteps?(flow?: UserFlow): Promise<void>;
- beforeEachStep?(step: Step, flow?: UserFlow): Promise<void>;
- runStep(step: Step, flow?: UserFlow): Promise<void>;
- afterEachStep?(step: Step, flow?: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class Runner {
- #private;
- abort(): void;
- set flow(flow: UserFlow);
- runBeforeAllSteps(flow?: UserFlow): Promise<void>;
- runAfterAllSteps(flow?: UserFlow): Promise<void>;
- /**
- * Runs the provided `step` with `beforeEachStep` and `afterEachStep` hooks.
- * Parameters from the `flow` apply if the `flow` is set.
- */
- runStep(step: Step): Promise<void>;
- /**
- * Run all the steps in the flow
- * @returns whether all the steps are run or the execution is aborted
- */
- run(): Promise<boolean>;
-}
-declare function createRunner(): Promise<Runner>;
-declare function createRunner(flow: UserFlow): Promise<Runner>;
-declare function createRunner(extension: RunnerExtension): Promise<Runner>;
-declare function createRunner(flow: UserFlow, extension: RunnerExtension): Promise<Runner>;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class PuppeteerRunnerExtension extends RunnerExtension {
- #private;
- protected browser: Browser;
- protected page: Page;
- protected timeout: number;
- constructor(browser: Browser, page: Page, opts?: {
- timeout?: number;
- });
- runStep(step: Step, flow?: UserFlow): Promise<void>;
-}
-declare class PuppeteerRunnerOwningBrowserExtension extends PuppeteerRunnerExtension {
- afterAllSteps(): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class PuppeteerStringifyExtension extends StringifyExtension {
- #private;
- beforeAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
- afterAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
- stringifyStep(out: LineWriter, step: Step, flow: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/**
- * Stringifies a user flow to a script that uses \@puppeteer/replay's own API.
- */
-declare class PuppeteerReplayStringifyExtension extends StringifyExtension {
- beforeAllSteps(out: LineWriter): Promise<void>;
- afterAllSteps(out: LineWriter): Promise<void>;
- stringifyStep(out: LineWriter, step: Step): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class LighthouseStringifyExtension extends PuppeteerStringifyExtension {
- #private;
- beforeAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
- stringifyStep(out: LineWriter, step: Step, flow: UserFlow): Promise<void>;
- afterAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
-}
-
-declare class LighthouseRunnerExtension extends PuppeteerRunnerExtension {
- #private;
- createFlowResult(): Promise<lighthouse.FlowResult>;
- beforeAllSteps(flow: UserFlow): Promise<void>;
- beforeEachStep(step: Step, flow?: UserFlow): Promise<void>;
- afterEachStep(step: Step, flow?: UserFlow): Promise<void>;
- afterAllSteps(flow: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * Copyright (c) 2020 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-declare function formatJSONAsJS(json: unknown, indent: string): string;
-declare const formatAsJSLiteral: (content: string) => string;
-
-export { type AssertedEvent, AssertedEventType, type AssertionStep, type BaseStep, type ChangeStep, type ClickAttributes, type ClickStep, type CloseStep, type CustomStep, type CustomStepParams, type DoubleClickStep, type EmulateNetworkConditionsStep, type FrameSelector, type HoverStep, JSONStringifyExtension, type Key, type KeyDownStep, type KeyUpStep, LighthouseRunnerExtension, LighthouseStringifyExtension, type LineWriter, type NavigateStep, type NavigationEvent, type Pattern, type PointerButtonType, type PointerDeviceType, PuppeteerReplayStringifyExtension, PuppeteerRunnerExtension, PuppeteerRunnerOwningBrowserExtension, PuppeteerStringifyExtension, Runner, RunnerExtension, Schema, type ScrollElementStep, type ScrollPageStep, type ScrollStep, type Selector, SelectorType, type SetViewportStep, type SourceMap, type Step, StepType, type StepWithFrame, type StepWithSelectors, type StepWithTarget, StringifyExtension, type StringifyOptions, type Target, type UserFlow, type UserStep, type WaitForElementStep, type WaitForExpressionStep, assertAllStepTypesAreHandled, createRunner, formatAsJSLiteral, formatJSONAsJS, getSelectorType, maxTimeout, minTimeout, mouseButtonMap, parse, parseSourceMap, parseStep, pointerDeviceTypes, selectorToPElementSelector, stringify, stringifyStep, stripSourceMap, typeableInputTypes, validTimeout };
diff --git a/node_modules/@puppeteer/replay/lib/cjs/main.d.ts b/node_modules/@puppeteer/replay/lib/cjs/main.d.ts
deleted file mode 100644
index b6a192d..0000000
--- a/node_modules/@puppeteer/replay/lib/cjs/main.d.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * @packageDocumentation
- */
-export * from './Schema.js';
-export * as Schema from './Schema.js';
-export * from './SchemaUtils.js';
-export { StringifyExtension } from './StringifyExtension.js';
-export { JSONStringifyExtension } from './JSONStringifyExtension.js';
-export { stringify, stringifyStep, parseSourceMap, stripSourceMap, StringifyOptions, SourceMap, } from './stringify.js';
-export { LineWriter } from './LineWriter.js';
-export { RunnerExtension } from './RunnerExtension.js';
-export { createRunner, Runner } from './Runner.js';
-export { PuppeteerRunnerExtension } from './PuppeteerRunnerExtension.js';
-export { PuppeteerRunnerOwningBrowserExtension } from './PuppeteerRunnerExtension.js';
-export { PuppeteerStringifyExtension } from './PuppeteerStringifyExtension.js';
-export { PuppeteerReplayStringifyExtension } from './PuppeteerReplayStringifyExtension.js';
-export { LighthouseStringifyExtension } from './lighthouse/LighthouseStringifyExtension.js';
-export { LighthouseRunnerExtension } from './lighthouse/LighthouseRunnerExtension.js';
-export * from './JSONUtils.js';
-//# sourceMappingURL=main.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/replay/lib/cli.js b/node_modules/@puppeteer/replay/lib/cli.js
deleted file mode 100755
index 0c6e478..0000000
--- a/node_modules/@puppeteer/replay/lib/cli.js
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/usr/bin/env node
-import yargs from 'yargs';
-import { hideBin } from 'yargs/helpers';
-import { parse, createRunner, PuppeteerRunnerOwningBrowserExtension } from '../lib/main.js';
-import { lstatSync, readFileSync, readdirSync } from 'fs';
-import { extname, join, relative, isAbsolute } from 'path';
-import { pathToFileURL } from 'url';
-import { cwd } from 'process';
-import Table from 'cli-table3';
-import { bgGreen, bgRed, white } from 'colorette';
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-function getJSONFilesFromFolder(path) {
- return readdirSync(path)
- .filter((file) => extname(file) === '.json')
- .map((file) => join(path, file));
-}
-function getRecordingPaths(paths, log = true) {
- const recordingPaths = [];
- for (const path of paths) {
- let isDirectory;
- try {
- isDirectory = lstatSync(path).isDirectory();
- }
- catch (err) {
- log && console.error(`Couldn't find file/folder: ${path}`, err);
- continue;
- }
- if (isDirectory) {
- const filesInFolder = getJSONFilesFromFolder(path);
- if (!filesInFolder.length)
- log && console.error(`There is no recordings in: ${path}`);
- recordingPaths.push(...filesInFolder);
- }
- else
- recordingPaths.push(path);
- }
- return recordingPaths;
-}
-function getHeadlessEnvVar(headless) {
- if (!headless) {
- return true;
- }
- switch (headless.toLowerCase()) {
- case '1':
- case 'true':
- return true;
- case 'new':
- return 'new';
- case '0':
- case 'false':
- return false;
- default:
- throw new Error('PUPPETEER_HEADLESS: unrecognized value');
- }
-}
-function createStatusReport(results) {
- const table = new Table({
- head: ['Title', 'Status', 'File', 'Duration'],
- chars: {
- top: '═',
- 'top-mid': '╤',
- 'top-left': '╔',
- 'top-right': '╗',
- bottom: '═',
- 'bottom-mid': '╧',
- 'bottom-left': '╚',
- 'bottom-right': '╝',
- left: '║',
- 'left-mid': '╟',
- mid: '─',
- 'mid-mid': '┼',
- right: '║',
- 'right-mid': '╢',
- middle: '│',
- },
- style: {
- head: ['bold'],
- },
- });
- const resultTextColor = white;
- for (const result of results) {
- const row = [];
- const duration = result.finishedAt?.getTime() - result.startedAt.getTime() || 0;
- const status = result.success
- ? resultTextColor(bgGreen(' Success '))
- : resultTextColor(bgRed(' Failure '));
- row.push(result.title);
- row.push(status);
- row.push(relative(process.cwd(), result.file));
- row.push(`${duration}ms`);
- table.push(row);
- }
- return table;
-}
-async function importExtensionFromPath(path) {
- const module = await import(pathToFileURL(isAbsolute(path) ? path : join(cwd(), path)).toString());
- return module.default;
-}
-async function runFiles(files, opts = {
- log: true,
- headless: true,
-}) {
- let Extension = PuppeteerRunnerOwningBrowserExtension;
- let browser;
- if (opts.extension) {
- Extension = await importExtensionFromPath(opts.extension);
- }
- const results = [];
- for (const file of files) {
- const result = {
- title: '',
- startedAt: new Date(),
- finishedAt: new Date(),
- file,
- success: true,
- };
- opts.log && console.log(`Running ${file}...`);
- try {
- const content = readFileSync(file, 'utf-8');
- const object = JSON.parse(content);
- const recording = parse(object);
- result.title = recording.title;
- const { default: puppeteer } = await import('puppeteer');
- browser = await puppeteer.launch({
- headless: opts.headless ? 'new' : false,
- });
- const page = await browser.newPage();
- const extension = new Extension(browser, page);
- const runner = await createRunner(recording, extension);
- await runner.run();
- opts.log && console.log(`Finished running ${file}`);
- }
- catch (err) {
- opts.log && console.error(`Error running ${file}`, err);
- result.success = false;
- }
- finally {
- result.finishedAt = new Date();
- results.push(result);
- await browser?.close();
- }
- }
- if (opts.log) {
- const statusReport = createStatusReport(results);
- console.log(statusReport.toString());
- }
- if (results.every((result) => result.success))
- return;
- throw new Error('Some recordings have failed to run.');
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-yargs(hideBin(process.argv))
- .command('$0 <files..>', 'run files', () => { }, async (argv) => {
- const args = argv;
- const recordingPaths = getRecordingPaths(args.files);
- await runFiles(recordingPaths, {
- log: true,
- headless: getHeadlessEnvVar(args.headless || process.env['PUPPETEER_HEADLESS']),
- extension: args.extension,
- });
-})
- .option('headless', {
- type: 'string',
- description: "Run using the browser's headless mode.",
- choices: ['new', 'true', '1', '0', 'false'],
-})
- .option('extension', {
- alias: 'ext',
- type: 'string',
- description: 'Run using an extension identified by the path.',
-})
- .parse();
-//# sourceMappingURL=cli.js.map
diff --git a/node_modules/@puppeteer/replay/lib/cli.js.map b/node_modules/@puppeteer/replay/lib/cli.js.map
deleted file mode 100644
index abd36ba..0000000
--- a/node_modules/@puppeteer/replay/lib/cli.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"cli.js","sources":["../src/CLIUtils.ts","../src/cli.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;AAqEM,+BAAU,CAAA,IAAA,EAAA;IACjB,OAAO,WAAO,CAAA,IAAA,CAAA;SACd,MAAA,CAAA,CAAA,IAAA,KAAA,OAAA,CAAA,IAAA,CAAA,KAAA,OAAA,CAAA;AAEF,SAAgB,GAAA,CAAA,CAAA,IAAA,KAAA,IAAA,CAAA,IAAA,EAAA,IAAA,CAAA,CAAA,CAAA;AA8ChB,CAAsB;AAOA,SAAA,iBACpB,CAAK,KAAA,QAAU;IACP,oBAAa,GAAA,EAAA,CAAA;AAAC,IAAA,KAAA,MAAU,IAAA,IAAU,KAAA,EAAM;QAAU,IAAA,WAAS,CAAA;AAGlE,QACO,IAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClJX;;;;;;;;;;;;;;AAcG;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/replay/lib/extension-test.js b/node_modules/@puppeteer/replay/lib/extension-test.js
deleted file mode 100755
index 632ac07..0000000
--- a/node_modules/@puppeteer/replay/lib/extension-test.js
+++ /dev/null
@@ -1,334 +0,0 @@
-#!/usr/bin/env node
-import yargs from 'yargs';
-import { hideBin } from 'yargs/helpers';
-import { RunnerExtension, createRunner, parse, stringify } from '../lib/main.js';
-import 'fs';
-import { isAbsolute, join } from 'path';
-import { pathToFileURL } from 'url';
-import { cwd } from 'process';
-import 'cli-table3';
-import 'colorette';
-import http from 'http';
-import assert from 'assert/strict';
-import { spawn } from 'child_process';
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-async function importExtensionFromPath(path) {
- const module = await import(pathToFileURL(isAbsolute(path) ? path : join(cwd(), path)).toString());
- return module.default;
-}
-
-const recording = {
- title: 'spec',
- steps: [
- {
- type: 'setViewport',
- width: 900,
- height: 700,
- deviceScaleFactor: 1,
- isMobile: false,
- hasTouch: false,
- isLandscape: false,
- },
- {
- type: 'navigate',
- url: 'http://localhost:8907/spec.html',
- assertedEvents: [
- {
- type: 'navigation',
- url: 'http://localhost:8907/spec.html',
- title: '',
- },
- ],
- },
- {
- type: 'click',
- target: 'main',
- selectors: [
- ['aria/Click'],
- ['#button'],
- ['xpath///*[@id="button"]'],
- ['text/Click'],
- ],
- offsetY: 18,
- offsetX: 36,
- },
- {
- type: 'doubleClick',
- target: 'main',
- selectors: [
- ['aria/Click'],
- ['#button'],
- ['xpath///*[@id="button"]'],
- ['text/Click'],
- ],
- offsetY: 18,
- offsetX: 36,
- },
- {
- type: 'keyDown',
- target: 'main',
- key: 'Tab',
- },
- {
- type: 'keyUp',
- key: 'Tab',
- target: 'main',
- },
- {
- type: 'change',
- value: 'test',
- selectors: [['#input'], ['xpath///*[@id="input"]']],
- target: 'main',
- },
- {
- type: 'change',
- value: 'testSuffix',
- selectors: [['#input-prefilled']],
- target: 'main',
- },
- {
- type: 'keyDown',
- target: 'main',
- key: 'Enter',
- },
- {
- type: 'keyUp',
- key: 'Enter',
- target: 'main',
- },
- {
- type: 'click',
- selectors: [['#input'], ['xpath///*[@id="input"]']],
- target: 'main',
- button: 'secondary',
- offsetX: 1,
- offsetY: 1,
- },
- {
- type: 'hover',
- target: 'main',
- selectors: [
- ['aria/Hover'],
- ['#hover'],
- ['xpath///*[@id="hover"]'],
- ['text/Hover'],
- ],
- },
- {
- type: 'waitForExpression',
- expression: 'new Promise(resolve => setTimeout(() => resolve(true), 500))',
- },
- {
- type: 'waitForElement',
- target: 'main',
- selectors: ['#button'],
- count: 1,
- visible: true,
- properties: {
- id: 'button',
- },
- attributes: {
- id: 'button',
- },
- },
- {
- type: 'change',
- value: 'optionB',
- selectors: [['#select']],
- target: 'main',
- },
- ],
-};
-const expectedLog = `window dimensions 900x700
-click targetId=button button=0 detail=1 value=
-click targetId=button button=0 detail=1 value=
-click targetId=button button=0 detail=2 value=
-dblclick targetId=button button=0 detail=2 value=
-change targetId=input button=undefined detail=undefined value=test
-change targetId=input-prefilled button=undefined detail=undefined value=testSuffix
-contextmenu targetId=input button=2 detail=0 value=test
-mouseenter targetId=hover button=0 detail=0 value=
-change targetId=select button=undefined detail=undefined value=optionB
-`.trim();
-const files = new Map([
- [
- 'spec.html',
- `<!DOCTYPE html>
-<button id="button" onclick="logEvent(event)" ondblclick="logEvent(event)">
- Click
-</button>
-<button
- id="hover"
- onmouseenter="logEvent(event)"
- onmouseleave="logEvent(event)"
->
- Hover
-</button>
-<input id="input" oncontextmenu="logEvent(event)" onchange="logEvent(event)" />
-<input id="input-prefilled" onchange="logEvent(event)" value="test" />
-<select id="select" onchange="logEvent(event)">
- <option value=""></option>
- <option value="optionA">Option A</option>
- <option value="optionB">Option B</option>
-</select>
-<pre id="log"></pre>
-<script>
- function logStr(str) {
- log.innerText += str;
- const data = { username: 'example' };
- fetch('/log', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/text',
- },
- body: str,
- })
- .catch((error) => {
- console.error(error);
- });
- }
- function logEvent(event) {
- logStr(
- '\\n' +
- event.type +
- ' targetId=' +
- event.target.id +
- ' button=' +
- event.button +
- ' detail=' +
- event.detail +
- ' value=' +
- event.target.value
- );
- }
- logStr(\`window dimensions \${window.innerWidth}x\${window.innerHeight}\`);
- input.addEventListener('contextmenu', (e) => e.preventDefault(), false);
-</script>`,
- ],
-]);
-
-/**
- Copyright 2023 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-async function startServer() {
- const log = {
- contents: '',
- };
- const server = http.createServer(async (req, res) => {
- if (req.method === 'GET') {
- for (const [file, content] of files.entries()) {
- if (req.url?.endsWith(file)) {
- res.writeHead(200, { 'Content-Type': 'text/html' });
- res.end(content);
- return;
- }
- }
- res.writeHead(404, { 'Content-Type': 'text/plain' });
- res.end('Not found');
- return;
- }
- if (req.method === 'POST') {
- const body = await new Promise((resolve) => {
- const body = [];
- req
- .on('data', (chunk) => {
- body.push(chunk);
- })
- .on('end', () => {
- resolve(Buffer.concat(body).toString());
- });
- });
- res.writeHead(200);
- res.end();
- log.contents += body;
- return;
- }
- res.writeHead(400);
- res.end();
- });
- return new Promise((resolve) => {
- server.listen(8907, 'localhost', () => {
- resolve({ server, log });
- });
- });
-}
-yargs(hideBin(process.argv))
- .command('$0', 'Test an extension implementation', () => { }, async (argv) => {
- const args = argv;
- const Extension = await importExtensionFromPath(args.extension);
- const ext = new Extension();
- let run = async () => { };
- if (ext instanceof RunnerExtension) {
- console.log('runner');
- run = async () => {
- const extension = new Extension();
- const runner = await createRunner(parse(recording), extension);
- await runner.run();
- };
- }
- else {
- run = async () => {
- const exported = await stringify(parse(recording), {
- extension: new Extension(),
- });
- const childProcess = spawn('node', {
- stdio: ['pipe', 'pipe', 'inherit'],
- shell: true,
- });
- childProcess.stdin.write(exported);
- childProcess.stdin.end();
- await new Promise((resolve, reject) => {
- childProcess.on('close', (code) => code
- ? reject(new Error(`Running node failed with code ${code}`))
- : resolve());
- });
- };
- }
- const { server, log } = await startServer();
- try {
- await run();
- }
- catch (err) {
- console.error(err);
- }
- finally {
- server.close();
- }
- assert.equal(log.contents, expectedLog);
- console.log('Run matches the expectations');
-})
- .option('extension', {
- alias: 'ext',
- type: 'string',
- description: 'The path to the extension module. The default export will be used as a Stringify or Runner extension based on instanceOf checks.',
- demandOption: true,
-})
- .parse();
-//# sourceMappingURL=extension-test.js.map
diff --git a/node_modules/@puppeteer/replay/lib/extension-test.js.map b/node_modules/@puppeteer/replay/lib/extension-test.js.map
deleted file mode 100644
index 70c7184..0000000
--- a/node_modules/@puppeteer/replay/lib/extension-test.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"extension-test.js","sources":["../src/CLIUtils.ts","../src/Spec.ts","../src/extension-test.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;;;;;;ACdH,MAAA,SAAsB,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAtB;;;;;;;;;;;;;;AAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/replay/lib/main.d.ts b/node_modules/@puppeteer/replay/lib/main.d.ts
deleted file mode 100644
index 95b6a11..0000000
--- a/node_modules/@puppeteer/replay/lib/main.d.ts
+++ /dev/null
@@ -1,684 +0,0 @@
-import { Browser, Page } from 'puppeteer';
-import * as lighthouse from 'lighthouse';
-
-type ExcludeType<T, U> = {
- [K in keyof T]-?: T[K] extends U ? K : never;
-}[keyof T];
-type PickType<T, U> = Pick<T, ExcludeType<T, U>>;
-type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
-interface JSONObject {
- [key: string]: JSONValue;
-}
-type JSONArray = JSONValue[];
-type JSONSerializable<Object extends object> = PickType<Object, JSONValue>;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-type Target = string;
-type Pattern = string;
-type Selector = string | string[];
-type FrameSelector = number[];
-declare enum SelectorType {
- CSS = "css",
- ARIA = "aria",
- Text = "text",
- XPath = "xpath",
- Pierce = "pierce"
-}
-declare enum StepType {
- Change = "change",
- Click = "click",
- Close = "close",
- CustomStep = "customStep",
- DoubleClick = "doubleClick",
- EmulateNetworkConditions = "emulateNetworkConditions",
- Hover = "hover",
- KeyDown = "keyDown",
- KeyUp = "keyUp",
- Navigate = "navigate",
- Scroll = "scroll",
- SetViewport = "setViewport",
- WaitForElement = "waitForElement",
- WaitForExpression = "waitForExpression"
-}
-declare enum AssertedEventType {
- Navigation = "navigation"
-}
-interface NavigationEvent {
- type: AssertedEventType.Navigation;
- url?: Pattern;
- title?: Pattern;
-}
-type AssertedEvent = NavigationEvent;
-interface BaseStep {
- type: StepType;
- timeout?: number;
- assertedEvents?: AssertedEvent[];
-}
-interface StepWithTarget extends BaseStep {
- /**
- * Defaults to main
- */
- target?: Target;
-}
-interface StepWithFrame extends StepWithTarget {
- /**
- * Defaults to main frame
- */
- frame?: FrameSelector;
-}
-interface StepWithSelectors extends StepWithFrame {
- /**
- * A list of alternative selectors that lead to selection of a single element
- * to perform the step on. Currently, we support CSS selectors, ARIA selectors
- * (start with 'aria/'), XPath selectors (start with `xpath/`) and text
- * selectors (start with `text/`). Each selector could be a string or an array
- * of strings. If it's a string, it means that the selector points directly to
- * the target element. If it's an array, the last element is the selector for
- * the target element and the preceding selectors point to the ancestor
- * elements. If the parent element is a shadow root host, the subsequent
- * selector is evaluated only against the shadow DOM of the host (i.e.,
- * `parent.shadowRoot.querySelector`). If the parent element is not a shadow
- * root host, the subsequent selector is evaluated in the regular DOM (i.e.,
- * `parent.querySelector`).
- *
- * During the execution, it's recommended that the implementation tries out
- * all of the alternative selectors to improve reliability of the replay as
- * some selectors might get outdated over time.
- */
- selectors: Selector[];
-}
-type PointerDeviceType = 'mouse' | 'pen' | 'touch';
-type PointerButtonType = 'primary' | 'auxiliary' | 'secondary' | 'back' | 'forward';
-interface ClickAttributes {
- /**
- * Pointer type for the event. Defaults to 'mouse'.
- */
- deviceType?: PointerDeviceType;
- /**
- * Defaults to 'primary' if the device type is a mouse.
- */
- button?: PointerButtonType;
- /**
- * in px, relative to the top-left corner of the element content box. Defaults
- * to the center of the element
- */
- offsetX: number;
- /**
- * in px, relative to the top-left corner of the element content box. Defaults
- * to the center of the element
- */
- offsetY: number;
- /**
- * Delay (in ms) between the mouse up and mouse down of the click.
- *
- * @defaultValue `50`
- */
- duration?: number;
-}
-interface DoubleClickStep extends ClickAttributes, StepWithSelectors {
- type: StepType.DoubleClick;
-}
-interface ClickStep extends ClickAttributes, StepWithSelectors {
- type: StepType.Click;
-}
-interface HoverStep extends StepWithSelectors {
- type: StepType.Hover;
-}
-interface ChangeStep extends StepWithSelectors {
- type: StepType.Change;
- value: string;
-}
-interface EmulateNetworkConditionsStep extends StepWithTarget {
- type: StepType.EmulateNetworkConditions;
- download: number;
- upload: number;
- latency: number;
-}
-interface KeyDownStep extends StepWithTarget {
- type: StepType.KeyDown;
- key: Key;
-}
-interface KeyUpStep extends StepWithTarget {
- type: StepType.KeyUp;
- key: Key;
-}
-interface CloseStep extends StepWithTarget {
- type: StepType.Close;
-}
-interface SetViewportStep extends StepWithTarget {
- type: StepType.SetViewport;
- width: number;
- height: number;
- deviceScaleFactor: number;
- isMobile: boolean;
- hasTouch: boolean;
- isLandscape: boolean;
-}
-interface ScrollPageStep extends StepWithFrame {
- type: StepType.Scroll;
- /**
- * Absolute scroll x position in px. Defaults to 0
- */
- x?: number;
- /**
- * Absolute scroll y position in px. Defaults to 0
- */
- y?: number;
-}
-type ScrollElementStep = ScrollPageStep & StepWithSelectors;
-type ScrollStep = ScrollPageStep | ScrollElementStep;
-interface NavigateStep extends StepWithTarget {
- type: StepType.Navigate;
- url: string;
-}
-interface CustomStepParams {
- type: StepType.CustomStep;
- name: string;
- parameters: unknown;
-}
-type CustomStep = (CustomStepParams & StepWithTarget) | (CustomStepParams & StepWithFrame);
-type UserStep = ChangeStep | ClickStep | HoverStep | CloseStep | CustomStep | DoubleClickStep | EmulateNetworkConditionsStep | KeyDownStep | KeyUpStep | NavigateStep | ScrollStep | SetViewportStep;
-/**
- * `waitForElement` allows waiting for the presence (or absence) of the number
- * of elements identified by the selector.
- *
- * For example, the following step would wait for less than three elements
- * to be on the page that match the selector `.my-class`.
- *
- * ```
- * {
- * "type": "waitForElement",
- * "selectors": [".my-class"],
- * "operator": "<=",
- * "count": 2,
- * }
- * ```
- */
-interface WaitForElementStep extends StepWithSelectors {
- type: StepType.WaitForElement;
- /**
- * @defaultValue `'=='`
- */
- operator?: '>=' | '==' | '<=';
- /**
- * @defaultValue `1`
- */
- count?: number;
- /**
- * Whether to wait for elements matching this step to be hidden. This can be
- * thought of as an inversion of this step.
- *
- * @defaultValue `true`
- */
- visible?: boolean;
- /**
- * Whether to also check the element(s) for the given properties.
- */
- properties?: Partial<JSONSerializable<HTMLElement>> & {
- [key: string]: JSONValue;
- };
- /**
- * Whether to also check the element(s) for the given attributes.
- */
- attributes?: {
- [name: string]: string;
- };
-}
-/**
- * `waitForExpression` allows for a JavaScript expression to resolve to truthy
- * value.
- *
- * For example, the following step pauses for two seconds and then resolves to
- * true allowing the replay to continue.
- *
- * ```
- * {
- * "type": "waitForExpression",
- * "expression": "new Promise(resolve => setTimeout(() => resolve(true),
- * 2000))",
- * }
- * ```
- */
-interface WaitForExpressionStep extends StepWithFrame {
- type: StepType.WaitForExpression;
- expression: string;
-}
-type AssertionStep = WaitForElementStep | WaitForExpressionStep;
-type Step = UserStep | AssertionStep;
-interface UserFlow {
- /**
- * Human-readble title describing the recorder user flow.
- */
- title: string;
- /**
- * Timeout in milliseconds.
- */
- timeout?: number;
- /**
- * The name of the attribute to use to generate selectors instead of regular
- * CSS selectors. For example, specifying `data-testid` would generate the
- * selector `[data-testid=value]` for the element `<div data-testid=value>`.
- */
- selectorAttribute?: string;
- steps: Step[];
-}
-type Key = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'Power' | 'Eject' | 'Abort' | 'Help' | 'Backspace' | 'Tab' | 'Numpad5' | 'NumpadEnter' | 'Enter' | '\r' | '\n' | 'ShiftLeft' | 'ShiftRight' | 'ControlLeft' | 'ControlRight' | 'AltLeft' | 'AltRight' | 'Pause' | 'CapsLock' | 'Escape' | 'Convert' | 'NonConvert' | 'Space' | 'Numpad9' | 'PageUp' | 'Numpad3' | 'PageDown' | 'End' | 'Numpad1' | 'Home' | 'Numpad7' | 'ArrowLeft' | 'Numpad4' | 'Numpad8' | 'ArrowUp' | 'ArrowRight' | 'Numpad6' | 'Numpad2' | 'ArrowDown' | 'Select' | 'Open' | 'PrintScreen' | 'Insert' | 'Numpad0' | 'Delete' | 'NumpadDecimal' | 'Digit0' | 'Digit1' | 'Digit2' | 'Digit3' | 'Digit4' | 'Digit5' | 'Digit6' | 'Digit7' | 'Digit8' | 'Digit9' | 'KeyA' | 'KeyB' | 'KeyC' | 'KeyD' | 'KeyE' | 'KeyF' | 'KeyG' | 'KeyH' | 'KeyI' | 'KeyJ' | 'KeyK' | 'KeyL' | 'KeyM' | 'KeyN' | 'KeyO' | 'KeyP' | 'KeyQ' | 'KeyR' | 'KeyS' | 'KeyT' | 'KeyU' | 'KeyV' | 'KeyW' | 'KeyX' | 'KeyY' | 'KeyZ' | 'MetaLeft' | 'MetaRight' | 'ContextMenu' | 'NumpadMultiply' | 'NumpadAdd' | 'NumpadSubtract' | 'NumpadDivide' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'F13' | 'F14' | 'F15' | 'F16' | 'F17' | 'F18' | 'F19' | 'F20' | 'F21' | 'F22' | 'F23' | 'F24' | 'NumLock' | 'ScrollLock' | 'AudioVolumeMute' | 'AudioVolumeDown' | 'AudioVolumeUp' | 'MediaTrackNext' | 'MediaTrackPrevious' | 'MediaStop' | 'MediaPlayPause' | 'Semicolon' | 'Equal' | 'NumpadEqual' | 'Comma' | 'Minus' | 'Period' | 'Slash' | 'Backquote' | 'BracketLeft' | 'Backslash' | 'BracketRight' | 'Quote' | 'AltGraph' | 'Props' | 'Cancel' | 'Clear' | 'Shift' | 'Control' | 'Alt' | 'Accept' | 'ModeChange' | ' ' | 'Print' | 'Execute' | '\u0000' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'Meta' | '*' | '+' | '-' | '/' | ';' | '=' | ',' | '.' | '`' | '[' | '\\' | ']' | "'" | 'Attn' | 'CrSel' | 'ExSel' | 'EraseEof' | 'Play' | 'ZoomOut' | ')' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '(' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | ':' | '<' | '_' | '>' | '?' | '~' | '{' | '|' | '}' | '"' | 'SoftLeft' | 'SoftRight' | 'Camera' | 'Call' | 'EndCall' | 'VolumeDown' | 'VolumeUp';
-
-type Schema_AssertedEvent = AssertedEvent;
-type Schema_AssertedEventType = AssertedEventType;
-declare const Schema_AssertedEventType: typeof AssertedEventType;
-type Schema_AssertionStep = AssertionStep;
-type Schema_BaseStep = BaseStep;
-type Schema_ChangeStep = ChangeStep;
-type Schema_ClickAttributes = ClickAttributes;
-type Schema_ClickStep = ClickStep;
-type Schema_CloseStep = CloseStep;
-type Schema_CustomStep = CustomStep;
-type Schema_CustomStepParams = CustomStepParams;
-type Schema_DoubleClickStep = DoubleClickStep;
-type Schema_EmulateNetworkConditionsStep = EmulateNetworkConditionsStep;
-type Schema_FrameSelector = FrameSelector;
-type Schema_HoverStep = HoverStep;
-type Schema_Key = Key;
-type Schema_KeyDownStep = KeyDownStep;
-type Schema_KeyUpStep = KeyUpStep;
-type Schema_NavigateStep = NavigateStep;
-type Schema_NavigationEvent = NavigationEvent;
-type Schema_Pattern = Pattern;
-type Schema_PointerButtonType = PointerButtonType;
-type Schema_PointerDeviceType = PointerDeviceType;
-type Schema_ScrollElementStep = ScrollElementStep;
-type Schema_ScrollPageStep = ScrollPageStep;
-type Schema_ScrollStep = ScrollStep;
-type Schema_Selector = Selector;
-type Schema_SelectorType = SelectorType;
-declare const Schema_SelectorType: typeof SelectorType;
-type Schema_SetViewportStep = SetViewportStep;
-type Schema_Step = Step;
-type Schema_StepType = StepType;
-declare const Schema_StepType: typeof StepType;
-type Schema_StepWithFrame = StepWithFrame;
-type Schema_StepWithSelectors = StepWithSelectors;
-type Schema_StepWithTarget = StepWithTarget;
-type Schema_Target = Target;
-type Schema_UserFlow = UserFlow;
-type Schema_UserStep = UserStep;
-type Schema_WaitForElementStep = WaitForElementStep;
-type Schema_WaitForExpressionStep = WaitForExpressionStep;
-declare namespace Schema {
- export { type Schema_AssertedEvent as AssertedEvent, Schema_AssertedEventType as AssertedEventType, type Schema_AssertionStep as AssertionStep, type Schema_BaseStep as BaseStep, type Schema_ChangeStep as ChangeStep, type Schema_ClickAttributes as ClickAttributes, type Schema_ClickStep as ClickStep, type Schema_CloseStep as CloseStep, type Schema_CustomStep as CustomStep, type Schema_CustomStepParams as CustomStepParams, type Schema_DoubleClickStep as DoubleClickStep, type Schema_EmulateNetworkConditionsStep as EmulateNetworkConditionsStep, type Schema_FrameSelector as FrameSelector, type Schema_HoverStep as HoverStep, type Schema_Key as Key, type Schema_KeyDownStep as KeyDownStep, type Schema_KeyUpStep as KeyUpStep, type Schema_NavigateStep as NavigateStep, type Schema_NavigationEvent as NavigationEvent, type Schema_Pattern as Pattern, type Schema_PointerButtonType as PointerButtonType, type Schema_PointerDeviceType as PointerDeviceType, type Schema_ScrollElementStep as ScrollElementStep, type Schema_ScrollPageStep as ScrollPageStep, type Schema_ScrollStep as ScrollStep, type Schema_Selector as Selector, Schema_SelectorType as SelectorType, type Schema_SetViewportStep as SetViewportStep, type Schema_Step as Step, Schema_StepType as StepType, type Schema_StepWithFrame as StepWithFrame, type Schema_StepWithSelectors as StepWithSelectors, type Schema_StepWithTarget as StepWithTarget, type Schema_Target as Target, type Schema_UserFlow as UserFlow, type Schema_UserStep as UserStep, type Schema_WaitForElementStep as WaitForElementStep, type Schema_WaitForExpressionStep as WaitForExpressionStep };
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare function assertAllStepTypesAreHandled(s: never): never;
-declare const typeableInputTypes: ReadonlySet<string>;
-declare const pointerDeviceTypes: ReadonlySet<string>;
-declare const mouseButtonMap: ReadonlyMap<string, 'left' | 'middle' | 'right' | 'back' | 'forward'>;
-declare function parseStep(step: unknown, idx?: number): Step;
-declare const minTimeout = 1;
-declare const maxTimeout = 30000;
-declare function validTimeout(timeout: number): boolean;
-declare function parse(data: unknown): UserFlow;
-/**
- * Detects what type of a selector the string contains. For example,
- * `aria/Label` is a SelectorType.ARIA.
- *
- * Note that CSS selectors are special and usually don't require a prefix,
- * therefore, SelectorType.CSS is the default type if other types didn't match.
- */
-declare function getSelectorType(selector: string): SelectorType;
-/**
- * Converts a selector or an array of selector parts into a Puppeteer selector.
- *
- * @see https://pptr.dev/guides/query-selectors#p-elements
- */
-declare function selectorToPElementSelector(selector: string[] | string): string;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-interface LineWriter {
- appendLine(line: string): LineWriter;
- startBlock(): LineWriter;
- endBlock(): LineWriter;
- getIndent(): string;
- getSize(): number;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class StringifyExtension {
- beforeAllSteps?(out: LineWriter, flow: UserFlow): Promise<void>;
- afterAllSteps?(out: LineWriter, flow: UserFlow): Promise<void>;
- beforeEachStep?(out: LineWriter, step: Step, flow?: UserFlow): Promise<void>;
- stringifyStep(out: LineWriter, step: Step, flow?: UserFlow): Promise<void>;
- afterEachStep?(out: LineWriter, step: Step, flow?: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/**
- * Stringifies a user flow to JSON with source maps.
- *
- * You probably want to strip the source map because not all
- * parsers support comments in JSON.
- */
-declare class JSONStringifyExtension extends StringifyExtension {
- beforeAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
- afterAllSteps(out: LineWriter): Promise<void>;
- stringifyStep(out: LineWriter, step: Step, flow?: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-interface StringifyOptions {
- extension?: StringifyExtension;
- writer?: LineWriter;
- indentation?: string;
-}
-/**
- * The format is [version, [lineNo, length], [lineNo, length] ... [lineNo, length]].
- */
-type SourceMap = Array<number>;
-/**
- * Stringifes an entire recording. The following hooks are invoked with the `flow` parameter containing the entire flow:
- * - `beforeAllSteps` (once)
- * - `beforeEachStep` (per step)
- * - `stringifyStep` (per step)
- * - `afterEachStep` (per step)
- * - `afterAllSteps` (once)
- */
-declare function stringify(flow: UserFlow, opts?: StringifyOptions): Promise<string>;
-/**
- * Stringifes a single step. Only the following hooks are invoked with the `flow` parameter as undefined:
- * - `beforeEachStep`
- * - `stringifyStep`
- * - `afterEachStep`
- */
-declare function stringifyStep(step: Step, opts?: StringifyOptions): Promise<string>;
-/**
- * Extracts a source map from a text.
- */
-declare function parseSourceMap(text: string): SourceMap | undefined;
-declare function stripSourceMap(text: string): string;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class RunnerExtension {
- beforeAllSteps?(flow?: UserFlow): Promise<void>;
- afterAllSteps?(flow?: UserFlow): Promise<void>;
- beforeEachStep?(step: Step, flow?: UserFlow): Promise<void>;
- runStep(step: Step, flow?: UserFlow): Promise<void>;
- afterEachStep?(step: Step, flow?: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class Runner {
- #private;
- abort(): void;
- set flow(flow: UserFlow);
- runBeforeAllSteps(flow?: UserFlow): Promise<void>;
- runAfterAllSteps(flow?: UserFlow): Promise<void>;
- /**
- * Runs the provided `step` with `beforeEachStep` and `afterEachStep` hooks.
- * Parameters from the `flow` apply if the `flow` is set.
- */
- runStep(step: Step): Promise<void>;
- /**
- * Run all the steps in the flow
- * @returns whether all the steps are run or the execution is aborted
- */
- run(): Promise<boolean>;
-}
-declare function createRunner(): Promise<Runner>;
-declare function createRunner(flow: UserFlow): Promise<Runner>;
-declare function createRunner(extension: RunnerExtension): Promise<Runner>;
-declare function createRunner(flow: UserFlow, extension: RunnerExtension): Promise<Runner>;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class PuppeteerRunnerExtension extends RunnerExtension {
- #private;
- protected browser: Browser;
- protected page: Page;
- protected timeout: number;
- constructor(browser: Browser, page: Page, opts?: {
- timeout?: number;
- });
- runStep(step: Step, flow?: UserFlow): Promise<void>;
-}
-declare class PuppeteerRunnerOwningBrowserExtension extends PuppeteerRunnerExtension {
- afterAllSteps(): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class PuppeteerStringifyExtension extends StringifyExtension {
- #private;
- beforeAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
- afterAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
- stringifyStep(out: LineWriter, step: Step, flow: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/**
- * Stringifies a user flow to a script that uses \@puppeteer/replay's own API.
- */
-declare class PuppeteerReplayStringifyExtension extends StringifyExtension {
- beforeAllSteps(out: LineWriter): Promise<void>;
- afterAllSteps(out: LineWriter): Promise<void>;
- stringifyStep(out: LineWriter, step: Step): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-declare class LighthouseStringifyExtension extends PuppeteerStringifyExtension {
- #private;
- beforeAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
- stringifyStep(out: LineWriter, step: Step, flow: UserFlow): Promise<void>;
- afterAllSteps(out: LineWriter, flow: UserFlow): Promise<void>;
-}
-
-declare class LighthouseRunnerExtension extends PuppeteerRunnerExtension {
- #private;
- createFlowResult(): Promise<lighthouse.FlowResult>;
- beforeAllSteps(flow: UserFlow): Promise<void>;
- beforeEachStep(step: Step, flow?: UserFlow): Promise<void>;
- afterEachStep(step: Step, flow?: UserFlow): Promise<void>;
- afterAllSteps(flow: UserFlow): Promise<void>;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * Copyright (c) 2020 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-declare function formatJSONAsJS(json: unknown, indent: string): string;
-declare const formatAsJSLiteral: (content: string) => string;
-
-export { type AssertedEvent, AssertedEventType, type AssertionStep, type BaseStep, type ChangeStep, type ClickAttributes, type ClickStep, type CloseStep, type CustomStep, type CustomStepParams, type DoubleClickStep, type EmulateNetworkConditionsStep, type FrameSelector, type HoverStep, JSONStringifyExtension, type Key, type KeyDownStep, type KeyUpStep, LighthouseRunnerExtension, LighthouseStringifyExtension, type LineWriter, type NavigateStep, type NavigationEvent, type Pattern, type PointerButtonType, type PointerDeviceType, PuppeteerReplayStringifyExtension, PuppeteerRunnerExtension, PuppeteerRunnerOwningBrowserExtension, PuppeteerStringifyExtension, Runner, RunnerExtension, Schema, type ScrollElementStep, type ScrollPageStep, type ScrollStep, type Selector, SelectorType, type SetViewportStep, type SourceMap, type Step, StepType, type StepWithFrame, type StepWithSelectors, type StepWithTarget, StringifyExtension, type StringifyOptions, type Target, type UserFlow, type UserStep, type WaitForElementStep, type WaitForExpressionStep, assertAllStepTypesAreHandled, createRunner, formatAsJSLiteral, formatJSONAsJS, getSelectorType, maxTimeout, minTimeout, mouseButtonMap, parse, parseSourceMap, parseStep, pointerDeviceTypes, selectorToPElementSelector, stringify, stringifyStep, stripSourceMap, typeableInputTypes, validTimeout };
diff --git a/node_modules/@puppeteer/replay/lib/main.js b/node_modules/@puppeteer/replay/lib/main.js
deleted file mode 100644
index ec6dcbb..0000000
--- a/node_modules/@puppeteer/replay/lib/main.js
+++ /dev/null
@@ -1,2061 +0,0 @@
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-var SelectorType;
-(function (SelectorType) {
- SelectorType["CSS"] = "css";
- SelectorType["ARIA"] = "aria";
- SelectorType["Text"] = "text";
- SelectorType["XPath"] = "xpath";
- SelectorType["Pierce"] = "pierce";
-})(SelectorType || (SelectorType = {}));
-var StepType;
-(function (StepType) {
- StepType["Change"] = "change";
- StepType["Click"] = "click";
- StepType["Close"] = "close";
- StepType["CustomStep"] = "customStep";
- StepType["DoubleClick"] = "doubleClick";
- StepType["EmulateNetworkConditions"] = "emulateNetworkConditions";
- StepType["Hover"] = "hover";
- StepType["KeyDown"] = "keyDown";
- StepType["KeyUp"] = "keyUp";
- StepType["Navigate"] = "navigate";
- StepType["Scroll"] = "scroll";
- StepType["SetViewport"] = "setViewport";
- StepType["WaitForElement"] = "waitForElement";
- StepType["WaitForExpression"] = "waitForExpression";
-})(StepType || (StepType = {}));
-var AssertedEventType;
-(function (AssertedEventType) {
- AssertedEventType["Navigation"] = "navigation";
-})(AssertedEventType || (AssertedEventType = {}));
-
-var Schema = /*#__PURE__*/Object.freeze({
- __proto__: null,
- get AssertedEventType () { return AssertedEventType; },
- get SelectorType () { return SelectorType; },
- get StepType () { return StepType; }
-});
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-function assertAllStepTypesAreHandled(s) {
- throw new Error(`Unknown step type: ${s.type}`);
-}
-const typeableInputTypes = new Set([
- 'textarea',
- 'text',
- 'url',
- 'tel',
- 'search',
- 'password',
- 'number',
- 'email',
-]);
-const pointerDeviceTypes = new Set([
- 'mouse',
- 'pen',
- 'touch',
-]);
-const mouseButtonMap = new Map([
- ['primary', 'left'],
- ['auxiliary', 'middle'],
- ['secondary', 'right'],
- ['back', 'back'],
- ['forward', 'forward'],
-]);
-function hasProperty(data, prop) {
- // TODO: use Object.hasOwn once types are available https://github.com/microsoft/TypeScript/issues/44253
- if (!Object.prototype.hasOwnProperty.call(data, prop)) {
- return false;
- }
- const keyedData = data;
- return keyedData[prop] !== undefined;
-}
-function isObject(data) {
- return typeof data === 'object' && data !== null;
-}
-function isString(data) {
- return typeof data === 'string';
-}
-function isNumber(data) {
- return typeof data === 'number';
-}
-function isArray(data) {
- return Array.isArray(data);
-}
-function isBoolean(data) {
- return typeof data === 'boolean';
-}
-function isIntegerArray(data) {
- return isArray(data) && data.every((item) => Number.isInteger(item));
-}
-function isKnownDeviceType(data) {
- return typeof data === 'string' && pointerDeviceTypes.has(data);
-}
-function isKnownMouseButton(data) {
- return typeof data === 'string' && mouseButtonMap.has(data);
-}
-function parseTarget(step) {
- if (hasProperty(step, 'target') && isString(step.target)) {
- return step.target;
- }
- return undefined;
-}
-function parseFrame(step) {
- if (hasProperty(step, 'frame')) {
- if (isIntegerArray(step.frame)) {
- return step.frame;
- }
- throw new Error('Step `frame` is not an integer array');
- }
- return undefined;
-}
-function parseNumber(step, prop) {
- if (hasProperty(step, prop)) {
- const maybeNumber = step[prop];
- if (isNumber(maybeNumber)) {
- return maybeNumber;
- }
- }
- throw new Error(`Step.${prop} is not a number`);
-}
-function parseBoolean(step, prop) {
- if (hasProperty(step, prop)) {
- const maybeBoolean = step[prop];
- if (isBoolean(maybeBoolean)) {
- return maybeBoolean;
- }
- }
- throw new Error(`Step.${prop} is not a boolean`);
-}
-function parseOptionalNumber(step, prop) {
- if (hasProperty(step, prop)) {
- return parseNumber(step, prop);
- }
- return undefined;
-}
-function parseOptionalString(step, prop) {
- if (hasProperty(step, prop)) {
- return parseString(step, prop);
- }
- return undefined;
-}
-function parseOptionalBoolean(step, prop) {
- if (hasProperty(step, prop)) {
- return parseBoolean(step, prop);
- }
- return undefined;
-}
-function parseString(step, prop) {
- if (hasProperty(step, prop)) {
- const maybeString = step[prop];
- if (isString(maybeString)) {
- return maybeString;
- }
- }
- throw new Error(`Step.${prop} is not a string`);
-}
-function parseSelectors(step) {
- if (!hasProperty(step, 'selectors')) {
- throw new Error('Step does not have required selectors');
- }
- if (!isArray(step.selectors)) {
- throw new Error('Step selectors are not an array');
- }
- if (step.selectors.length === 0) {
- throw new Error('Step does not have required selectors');
- }
- return step.selectors.map((s) => {
- if (!isString(s) && !isArray(s)) {
- throw new Error('Selector is not an array or string');
- }
- if (isArray(s)) {
- return s.map((sub) => {
- if (!isString(sub)) {
- throw new Error('Selector element is not a string');
- }
- return sub;
- });
- }
- return s;
- });
-}
-function parseOptionalSelectors(step) {
- if (!hasProperty(step, 'selectors')) {
- return undefined;
- }
- return parseSelectors(step);
-}
-function parseAssertedEvent(event) {
- if (!isObject(event)) {
- throw new Error('Asserted event is not an object');
- }
- if (!hasProperty(event, 'type')) {
- throw new Error('Asserted event is missing type');
- }
- if (event.type === AssertedEventType.Navigation) {
- return {
- type: AssertedEventType.Navigation,
- url: parseOptionalString(event, 'url'),
- title: parseOptionalString(event, 'title'),
- };
- }
- throw new Error('Unknown assertedEvent type');
-}
-function parseAssertedEvents(events) {
- if (!isArray(events)) {
- return undefined;
- }
- return events.map(parseAssertedEvent);
-}
-function parseBaseStep(type, step) {
- if (hasProperty(step, 'timeout') &&
- isNumber(step.timeout) &&
- !validTimeout(step.timeout)) {
- throw new Error(timeoutErrorMessage);
- }
- return {
- type,
- assertedEvents: hasProperty(step, 'assertedEvents')
- ? parseAssertedEvents(step.assertedEvents)
- : undefined,
- timeout: hasProperty(step, 'timeout') && isNumber(step.timeout)
- ? step.timeout
- : undefined,
- };
-}
-function parseStepWithTarget(type, step) {
- return {
- ...parseBaseStep(type, step),
- target: parseTarget(step),
- };
-}
-function parseStepWithFrame(type, step) {
- return {
- ...parseStepWithTarget(type, step),
- frame: parseFrame(step),
- };
-}
-function parseStepWithSelectors(type, step) {
- return {
- ...parseStepWithFrame(type, step),
- selectors: parseSelectors(step),
- };
-}
-function parseClickAttributes(step) {
- const attributes = {
- offsetX: parseNumber(step, 'offsetX'),
- offsetY: parseNumber(step, 'offsetY'),
- duration: parseOptionalNumber(step, 'duration'),
- };
- const deviceType = parseOptionalString(step, 'deviceType');
- if (deviceType) {
- if (!isKnownDeviceType(deviceType)) {
- throw new Error(`'deviceType' for click steps must be one of the following: ${[
- ...pointerDeviceTypes,
- ].join(', ')}`);
- }
- attributes.deviceType = deviceType;
- }
- const button = parseOptionalString(step, 'button');
- if (button) {
- if (!isKnownMouseButton(button)) {
- throw new Error(`'button' for click steps must be one of the following: ${[
- ...mouseButtonMap.keys(),
- ].join(', ')}`);
- }
- attributes.button = button;
- }
- return attributes;
-}
-function parseClickStep(step) {
- return {
- ...parseStepWithSelectors(StepType.Click, step),
- ...parseClickAttributes(step),
- type: StepType.Click,
- };
-}
-function parseDoubleClickStep(step) {
- return {
- ...parseStepWithSelectors(StepType.DoubleClick, step),
- ...parseClickAttributes(step),
- type: StepType.DoubleClick,
- };
-}
-function parseHoverStep(step) {
- return {
- ...parseStepWithSelectors(StepType.Hover, step),
- type: StepType.Hover,
- };
-}
-function parseChangeStep(step) {
- return {
- ...parseStepWithSelectors(StepType.Change, step),
- type: StepType.Change,
- value: parseString(step, 'value'),
- };
-}
-function parseKeyDownStep(step) {
- return {
- ...parseStepWithTarget(StepType.KeyDown, step),
- type: StepType.KeyDown,
- // TODO: type-check keys.
- key: parseString(step, 'key'),
- };
-}
-function parseKeyUpStep(step) {
- return {
- ...parseStepWithTarget(StepType.KeyUp, step),
- type: StepType.KeyUp,
- // TODO: type-check keys.
- key: parseString(step, 'key'),
- };
-}
-function parseEmulateNetworkConditionsStep(step) {
- return {
- ...parseStepWithTarget(StepType.EmulateNetworkConditions, step),
- type: StepType.EmulateNetworkConditions,
- download: parseNumber(step, 'download'),
- upload: parseNumber(step, 'upload'),
- latency: parseNumber(step, 'latency'),
- };
-}
-function parseCloseStep(step) {
- return {
- ...parseStepWithTarget(StepType.Close, step),
- type: StepType.Close,
- };
-}
-function parseSetViewportStep(step) {
- return {
- ...parseStepWithTarget(StepType.SetViewport, step),
- type: StepType.SetViewport,
- width: parseNumber(step, 'width'),
- height: parseNumber(step, 'height'),
- deviceScaleFactor: parseNumber(step, 'deviceScaleFactor'),
- isMobile: parseBoolean(step, 'isMobile'),
- hasTouch: parseBoolean(step, 'hasTouch'),
- isLandscape: parseBoolean(step, 'isLandscape'),
- };
-}
-function parseScrollStep(step) {
- return {
- ...parseStepWithFrame(StepType.Scroll, step),
- type: StepType.Scroll,
- x: parseOptionalNumber(step, 'x'),
- y: parseOptionalNumber(step, 'y'),
- selectors: parseOptionalSelectors(step),
- };
-}
-function parseNavigateStep(step) {
- return {
- ...parseStepWithTarget(StepType.Navigate, step),
- type: StepType.Navigate,
- target: parseTarget(step),
- url: parseString(step, 'url'),
- };
-}
-function parseWaitForElementStep(step) {
- const operator = parseOptionalString(step, 'operator');
- if (operator && operator !== '>=' && operator !== '==' && operator !== '<=') {
- throw new Error("WaitForElement step's operator is not one of '>=','==','<='");
- }
- if (hasProperty(step, 'attributes')) {
- if (!isObject(step.attributes) ||
- Object.values(step.attributes).some((attribute) => typeof attribute !== 'string')) {
- throw new Error("WaitForElement step's attribute is not a dictionary of strings");
- }
- }
- if (hasProperty(step, 'properties')) {
- if (!isObject(step.properties)) {
- throw new Error("WaitForElement step's attribute is not an object");
- }
- }
- return {
- ...parseStepWithSelectors(StepType.WaitForElement, step),
- type: StepType.WaitForElement,
- operator: operator,
- count: parseOptionalNumber(step, 'count'),
- visible: parseOptionalBoolean(step, 'visible'),
- attributes: hasProperty(step, 'attributes')
- ? step.attributes
- : undefined,
- properties: hasProperty(step, 'properties')
- ? step.properties
- : undefined,
- };
-}
-function parseWaitForExpressionStep(step) {
- if (!hasProperty(step, 'expression')) {
- throw new Error('waitForExpression step is missing `expression`');
- }
- return {
- ...parseStepWithFrame(StepType.WaitForExpression, step),
- type: StepType.WaitForExpression,
- expression: parseString(step, 'expression'),
- };
-}
-function parseCustomStep(step) {
- if (!hasProperty(step, 'name')) {
- throw new Error('customStep is missing name');
- }
- if (!isString(step.name)) {
- throw new Error("customStep's name is not a string");
- }
- return {
- ...parseStepWithFrame(StepType.CustomStep, step),
- type: StepType.CustomStep,
- name: step.name,
- parameters: hasProperty(step, 'parameters') ? step.parameters : undefined,
- };
-}
-function parseStep(step, idx) {
- if (!isObject(step)) {
- throw new Error(idx ? `Step ${idx} is not an object` : 'Step is not an object');
- }
- if (!hasProperty(step, 'type')) {
- throw new Error(idx ? `Step ${idx} does not have a type` : 'Step does not have a type');
- }
- if (!isString(step.type)) {
- throw new Error(idx
- ? `Type of the step ${idx} is not a string`
- : 'Type of the step is not a string');
- }
- switch (step.type) {
- case StepType.Click:
- return parseClickStep(step);
- case StepType.DoubleClick:
- return parseDoubleClickStep(step);
- case StepType.Hover:
- return parseHoverStep(step);
- case StepType.Change:
- return parseChangeStep(step);
- case StepType.KeyDown:
- return parseKeyDownStep(step);
- case StepType.KeyUp:
- return parseKeyUpStep(step);
- case StepType.EmulateNetworkConditions:
- return parseEmulateNetworkConditionsStep(step);
- case StepType.Close:
- return parseCloseStep(step);
- case StepType.SetViewport:
- return parseSetViewportStep(step);
- case StepType.Scroll:
- return parseScrollStep(step);
- case StepType.Navigate:
- return parseNavigateStep(step);
- case StepType.CustomStep:
- return parseCustomStep(step);
- case StepType.WaitForElement:
- return parseWaitForElementStep(step);
- case StepType.WaitForExpression:
- return parseWaitForExpressionStep(step);
- default:
- throw new Error(`Step type ${step.type} is not supported`);
- }
-}
-function parseSteps(steps) {
- const result = [];
- if (!isArray(steps)) {
- throw new Error('Recording `steps` is not an array');
- }
- for (const [idx, step] of steps.entries()) {
- result.push(parseStep(step, idx));
- }
- return result;
-}
-function cleanUndefined(json) {
- return JSON.parse(JSON.stringify(json));
-}
-const minTimeout = 1;
-const maxTimeout = 30000;
-const timeoutErrorMessage = `Timeout is not between ${minTimeout} and ${maxTimeout} milliseconds`;
-function validTimeout(timeout) {
- return timeout >= minTimeout && timeout <= maxTimeout;
-}
-function parse(data) {
- if (!isObject(data)) {
- throw new Error('Recording is not an object');
- }
- if (!hasProperty(data, 'title')) {
- throw new Error('Recording is missing `title`');
- }
- if (!isString(data.title)) {
- throw new Error('Recording `title` is not a string');
- }
- if (hasProperty(data, 'timeout') && !isNumber(data.timeout)) {
- throw new Error('Recording `timeout` is not a number');
- }
- if (!hasProperty(data, 'steps')) {
- throw new Error('Recording is missing `steps`');
- }
- if (hasProperty(data, 'timeout') &&
- isNumber(data.timeout) &&
- !validTimeout(data.timeout)) {
- throw new Error(timeoutErrorMessage);
- }
- return cleanUndefined({
- title: data.title,
- timeout: hasProperty(data, 'timeout') && isNumber(data.timeout)
- ? data.timeout
- : undefined,
- selectorAttribute: hasProperty(data, 'selectorAttribute') && isString(data.selectorAttribute)
- ? data.selectorAttribute
- : undefined,
- steps: parseSteps(data.steps),
- });
-}
-/**
- * Detects what type of a selector the string contains. For example,
- * `aria/Label` is a SelectorType.ARIA.
- *
- * Note that CSS selectors are special and usually don't require a prefix,
- * therefore, SelectorType.CSS is the default type if other types didn't match.
- */
-function getSelectorType(selector) {
- for (const value of Object.values(SelectorType)) {
- if (selector.startsWith(`${value}/`)) {
- return value;
- }
- }
- return SelectorType.CSS;
-}
-/**
- * Converts a selector or an array of selector parts into a Puppeteer selector.
- *
- * @see https://pptr.dev/guides/query-selectors#p-elements
- */
-function selectorToPElementSelector(selector) {
- if (!Array.isArray(selector)) {
- selector = [selector];
- }
- function escape(input) {
- return input.replace(/['"()]/g, `\\$&`);
- }
- const result = selector.map((s) => {
- switch (getSelectorType(s)) {
- case SelectorType.ARIA:
- return `::-p-aria(${escape(s.substring(SelectorType.ARIA.length + 1))})`;
- case SelectorType.CSS:
- return s;
- case SelectorType.XPath:
- return `::-p-xpath(${escape(s.substring(SelectorType.XPath.length + 1))})`;
- case SelectorType.Pierce:
- return `:scope >>> ${s.substring(SelectorType.Pierce.length + 1)}`;
- case SelectorType.Text:
- return `::-p-text(${escape(s.substring(SelectorType.Text.length + 1))})`;
- }
- });
- return result.join(' >>>> ');
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class StringifyExtension {
- async beforeAllSteps(out, flow) { }
- async afterAllSteps(out, flow) { }
- async beforeEachStep(out, step, flow) { }
- async stringifyStep(out, step, flow) { }
- async afterEachStep(out, step, flow) { }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * Stringifies a user flow to JSON with source maps.
- *
- * You probably want to strip the source map because not all
- * parsers support comments in JSON.
- */
-class JSONStringifyExtension extends StringifyExtension {
- async beforeAllSteps(out, flow) {
- const copy = {
- ...flow,
- steps: undefined,
- };
- // Stringify top-level attributes.
- const text = JSON.stringify(copy, null, out.getIndent());
- const lines = text.split('\n');
- lines.pop();
- lines[lines.length - 1] += ',';
- lines.push(out.getIndent() + `"steps": [`);
- out.appendLine(lines.join('\n')).startBlock().startBlock();
- }
- async afterAllSteps(out) {
- out
- .endBlock()
- .endBlock()
- .appendLine(out.getIndent() + `]`)
- .appendLine('}');
- }
- async stringifyStep(out, step, flow) {
- const stepText = JSON.stringify(step, null, out.getIndent());
- if (!flow) {
- out.appendLine(stepText);
- return;
- }
- const separator = flow.steps.lastIndexOf(step) === flow.steps.length - 1 ? '' : ',';
- out.appendLine(stepText + separator);
- }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class InMemoryLineWriter {
- #indentation;
- #currentIndentation = 0;
- #lines = [];
- constructor(indentation) {
- this.#indentation = indentation;
- }
- appendLine(line) {
- const lines = line.split('\n').map((line) => {
- const indentedLine = line
- ? this.#indentation.repeat(this.#currentIndentation) + line.trimEnd()
- : '';
- return indentedLine;
- });
- this.#lines.push(...lines);
- return this;
- }
- startBlock() {
- this.#currentIndentation++;
- return this;
- }
- endBlock() {
- this.#currentIndentation--;
- if (this.#currentIndentation < 0) {
- throw new Error('Extra endBlock');
- }
- return this;
- }
- toString() {
- // Scripts should end with a final blank line.
- return this.#lines.join('\n') + '\n';
- }
- getIndent() {
- return this.#indentation;
- }
- getSize() {
- return this.#lines.length;
- }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * Copyright (c) 2020 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-function formatJSONAsJS(json, indent) {
- const buffer = [];
- format(json, buffer, 1, indent);
- return buffer.join('');
-}
-function format(json, buffer = [], level = 1, indent = ' ') {
- switch (typeof json) {
- case 'bigint':
- case 'symbol':
- case 'function':
- case 'undefined':
- throw new Error('Invalid JSON');
- case 'number':
- case 'boolean':
- buffer.push(String(json));
- break;
- case 'string':
- buffer.push(formatAsJSLiteral(json));
- break;
- case 'object': {
- if (json === null) {
- buffer.push('null');
- }
- else if (Array.isArray(json)) {
- buffer.push('[\n');
- for (let i = 0; i < json.length; i++) {
- buffer.push(indent.repeat(level));
- format(json[i], buffer, level + 1, indent);
- if (i !== json.length - 1) {
- buffer.push(',');
- }
- buffer.push('\n');
- }
- buffer.push(indent.repeat(level - 1) + ']');
- }
- else {
- buffer.push('{\n');
- const keys = Object.keys(json);
- for (let i = 0; i < keys.length; i++) {
- const key = keys[i];
- const value = json[key];
- if (value === undefined) {
- continue;
- }
- buffer.push(indent.repeat(level));
- buffer.push(key);
- buffer.push(': ');
- format(value, buffer, level + 1, indent);
- if (i !== keys.length - 1) {
- buffer.push(',');
- }
- buffer.push('\n');
- }
- buffer.push(indent.repeat(level - 1) + '}');
- }
- break;
- }
- default:
- throw new Error('Unknown object type');
- }
- return buffer;
-}
-// Taken from https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/core/platform/string-utilities.ts;l=29;drc=111134437ee51d74433829bed0088f7239e18867.
-const toHexadecimal = (charCode, padToLength) => {
- return charCode.toString(16).toUpperCase().padStart(padToLength, '0');
-};
-// Remember to update the third group in the regexps patternsToEscape and
-// patternsToEscapePlusSingleQuote when adding new entries in this map.
-const escapedReplacements = new Map([
- ['\b', '\\b'],
- ['\f', '\\f'],
- ['\n', '\\n'],
- ['\r', '\\r'],
- ['\t', '\\t'],
- ['\v', '\\v'],
- ["'", "\\'"],
- ['\\', '\\\\'],
- ['<!--', '\\x3C!--'],
- ['<script', '\\x3Cscript'],
- ['</script', '\\x3C/script'],
-]);
-const formatAsJSLiteral = (content) => {
- const patternsToEscape = /(\\|<(?:!--|\/?script))|(\p{Control})|(\p{Surrogate})/gu;
- const patternsToEscapePlusSingleQuote = /(\\|'|<(?:!--|\/?script))|(\p{Control})|(\p{Surrogate})/gu;
- const escapePattern = (match, pattern, controlChar, loneSurrogate) => {
- if (controlChar) {
- if (escapedReplacements.has(controlChar)) {
- // @ts-ignore https://github.com/microsoft/TypeScript/issues/13086
- return escapedReplacements.get(controlChar);
- }
- const twoDigitHex = toHexadecimal(controlChar.charCodeAt(0), 2);
- return '\\x' + twoDigitHex;
- }
- if (loneSurrogate) {
- const fourDigitHex = toHexadecimal(loneSurrogate.charCodeAt(0), 4);
- return '\\u' + fourDigitHex;
- }
- if (pattern) {
- return escapedReplacements.get(pattern) || '';
- }
- return match;
- };
- let escapedContent = '';
- let quote = '';
- if (!content.includes("'")) {
- quote = "'";
- escapedContent = content.replace(patternsToEscape, escapePattern);
- }
- else if (!content.includes('"')) {
- quote = '"';
- escapedContent = content.replace(patternsToEscape, escapePattern);
- }
- else if (!content.includes('`') && !content.includes('${')) {
- quote = '`';
- escapedContent = content.replace(patternsToEscape, escapePattern);
- }
- else {
- quote = "'";
- escapedContent = content.replace(patternsToEscapePlusSingleQuote, escapePattern);
- }
- return `${quote}${escapedContent}${quote}`;
-};
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class PuppeteerStringifyExtension extends StringifyExtension {
- #shouldAppendWaitForElementHelper = false;
- async beforeAllSteps(out, flow) {
- out.appendLine("const puppeteer = require('puppeteer'); // v20.7.4 or later");
- out.appendLine('');
- out.appendLine('(async () => {').startBlock();
- out.appendLine("const browser = await puppeteer.launch({headless: 'new'});");
- out.appendLine('const page = await browser.newPage();');
- out.appendLine(`const timeout = ${flow.timeout || defaultTimeout};`);
- out.appendLine('page.setDefaultTimeout(timeout);');
- out.appendLine('');
- this.#shouldAppendWaitForElementHelper = false;
- }
- async afterAllSteps(out, flow) {
- out.appendLine('');
- out.appendLine('await browser.close();');
- out.appendLine('');
- if (this.#shouldAppendWaitForElementHelper) {
- for (const line of waitForElementHelper.split('\n')) {
- out.appendLine(line);
- }
- }
- out.endBlock().appendLine('})().catch(err => {').startBlock();
- out.appendLine('console.error(err);');
- out.appendLine('process.exit(1);');
- out.endBlock().appendLine('});');
- }
- async stringifyStep(out, step, flow) {
- out.appendLine('{').startBlock();
- if (step.timeout !== undefined) {
- out.appendLine(`const timeout = ${step.timeout};`);
- }
- this.#appendContext(out, step);
- if (step.assertedEvents) {
- out.appendLine('const promises = [];');
- out.appendLine('const startWaitingForEvents = () => {').startBlock();
- for (const event of step.assertedEvents) {
- switch (event.type) {
- case AssertedEventType.Navigation: {
- out.appendLine(`promises.push(${'frame' in step && step.frame ? 'frame' : 'targetPage'}.waitForNavigation());`);
- break;
- }
- default:
- throw new Error(`Event type ${event.type} is not supported`);
- }
- }
- out.endBlock().appendLine('}');
- }
- this.#appendStepType(out, step);
- if (step.assertedEvents) {
- out.appendLine('await Promise.all(promises);');
- }
- out.endBlock().appendLine('}');
- }
- #appendTarget(out, target) {
- if (target === 'main') {
- out.appendLine('const targetPage = page;');
- }
- else {
- out.appendLine(`const target = await browser.waitForTarget(t => t.url() === ${formatJSONAsJS(target, out.getIndent())}, { timeout });`);
- out.appendLine('const targetPage = await target.page();');
- out.appendLine('targetPage.setDefaultTimeout(timeout);');
- }
- }
- #appendFrame(out, path) {
- out.appendLine('let frame = targetPage.mainFrame();');
- for (const index of path) {
- out.appendLine(`frame = frame.childFrames()[${index}];`);
- }
- }
- #appendContext(out, step) {
- // TODO fix optional target: should it be main?
- this.#appendTarget(out, step.target || 'main');
- // TODO fix optional frame: should it be required?
- if (step.frame) {
- this.#appendFrame(out, step.frame);
- }
- }
- #appendLocators(out, step, action) {
- out.appendLine('await puppeteer.Locator.race([').startBlock();
- out.appendLine(step.selectors
- .map((s) => {
- return `${step.frame ? 'frame' : 'targetPage'}.locator(${formatJSONAsJS(selectorToPElementSelector(s), out.getIndent())})`;
- })
- .join(',\n'));
- out.endBlock().appendLine('])');
- out.startBlock().appendLine('.setTimeout(timeout)');
- if (step.assertedEvents?.length) {
- out.appendLine(`.on('action', () => startWaitingForEvents())`);
- }
- action();
- out.endBlock();
- }
- #appendClickStep(out, step) {
- this.#appendLocators(out, step, () => {
- out.appendLine('.click({');
- if (step.duration) {
- out.appendLine(` delay: ${step.duration},`);
- }
- if (step.button) {
- out.appendLine(` button: '${mouseButtonMap.get(step.button)}',`);
- }
- out.appendLine(' offset: {');
- out.appendLine(` x: ${step.offsetX},`);
- out.appendLine(` y: ${step.offsetY},`);
- out.appendLine(' },');
- out.appendLine('});');
- });
- }
- #appendDoubleClickStep(out, step) {
- this.#appendLocators(out, step, () => {
- out.appendLine('.click({');
- out.appendLine(` count: 2,`);
- if (step.duration) {
- out.appendLine(` delay: ${step.duration},`);
- }
- if (step.button) {
- out.appendLine(` button: '${mouseButtonMap.get(step.button)}',`);
- }
- out.appendLine(' offset: {');
- out.appendLine(` x: ${step.offsetX},`);
- out.appendLine(` y: ${step.offsetY},`);
- out.appendLine(' },');
- out.appendLine('});');
- });
- }
- #appendHoverStep(out, step) {
- this.#appendLocators(out, step, () => {
- out.appendLine('.hover();');
- });
- }
- #appendChangeStep(out, step) {
- this.#appendLocators(out, step, () => {
- out.appendLine(`.fill(${formatJSONAsJS(step.value, out.getIndent())});`);
- });
- }
- #appendEmulateNetworkConditionsStep(out, step) {
- out.appendLine('await targetPage.emulateNetworkConditions({');
- out.appendLine(` offline: ${!step.download && !step.upload},`);
- out.appendLine(` downloadThroughput: ${step.download},`);
- out.appendLine(` uploadThroughput: ${step.upload},`);
- out.appendLine(` latency: ${step.latency},`);
- out.appendLine('});');
- }
- #appendKeyDownStep(out, step) {
- out.appendLine(`await targetPage.keyboard.down(${formatJSONAsJS(step.key, out.getIndent())});`);
- }
- #appendKeyUpStep(out, step) {
- out.appendLine(`await targetPage.keyboard.up(${formatJSONAsJS(step.key, out.getIndent())});`);
- }
- #appendCloseStep(out, step) {
- out.appendLine('await targetPage.close()');
- }
- #appendViewportStep(out, step) {
- out.appendLine(`await targetPage.setViewport(${formatJSONAsJS({
- width: step.width,
- height: step.height,
- }, out.getIndent())})`);
- }
- #appendScrollStep(out, step) {
- if ('selectors' in step) {
- this.#appendLocators(out, step, () => {
- out.appendLine(`.scroll({ scrollTop: ${step.y}, scrollLeft: ${step.x}});`);
- });
- }
- else {
- out.appendLine(`await targetPage.evaluate((x, y) => { window.scroll(x, y); }, ${step.x}, ${step.y})`);
- }
- }
- #appendStepType(out, step) {
- switch (step.type) {
- case StepType.Click:
- return this.#appendClickStep(out, step);
- case StepType.DoubleClick:
- return this.#appendDoubleClickStep(out, step);
- case StepType.Hover:
- return this.#appendHoverStep(out, step);
- case StepType.Change:
- return this.#appendChangeStep(out, step);
- case StepType.EmulateNetworkConditions:
- return this.#appendEmulateNetworkConditionsStep(out, step);
- case StepType.KeyDown:
- return this.#appendKeyDownStep(out, step);
- case StepType.KeyUp:
- return this.#appendKeyUpStep(out, step);
- case StepType.Close:
- return this.#appendCloseStep(out, step);
- case StepType.SetViewport:
- return this.#appendViewportStep(out, step);
- case StepType.Scroll:
- return this.#appendScrollStep(out, step);
- case StepType.Navigate:
- return this.#appendNavigationStep(out, step);
- case StepType.WaitForElement:
- return this.#appendWaitForElementStep(out, step);
- case StepType.WaitForExpression:
- return this.#appendWaitExpressionStep(out, step);
- case StepType.CustomStep:
- return; // TODO: implement these
- default:
- return assertAllStepTypesAreHandled(step);
- }
- }
- #appendNavigationStep(out, step) {
- if (step.assertedEvents?.length) {
- out.appendLine(`startWaitingForEvents();`);
- }
- out.appendLine(`await targetPage.goto(${formatJSONAsJS(step.url, out.getIndent())});`);
- }
- #appendWaitExpressionStep(out, step) {
- out.appendLine(`await ${step.frame ? 'frame' : 'targetPage'}.waitForFunction(${formatJSONAsJS(step.expression, out.getIndent())}, { timeout });`);
- }
- #appendWaitForElementStep(out, step) {
- this.#shouldAppendWaitForElementHelper = true;
- out.appendLine(`await waitForElement(${formatJSONAsJS(step, out.getIndent())}, ${step.frame ? 'frame' : 'targetPage'}, timeout);`);
- }
-}
-const defaultTimeout = 5000;
-const waitForElementHelper = `async function waitForElement(step, frame, timeout) {
- const {
- count = 1,
- operator = '>=',
- visible = true,
- properties,
- attributes,
- } = step;
- const compFn = {
- '==': (a, b) => a === b,
- '>=': (a, b) => a >= b,
- '<=': (a, b) => a <= b,
- }[operator];
- await waitForFunction(async () => {
- const elements = await querySelectorsAll(step.selectors, frame);
- let result = compFn(elements.length, count);
- const elementsHandle = await frame.evaluateHandle((...elements) => {
- return elements;
- }, ...elements);
- await Promise.all(elements.map((element) => element.dispose()));
- if (result && (properties || attributes)) {
- result = await elementsHandle.evaluate(
- (elements, properties, attributes) => {
- for (const element of elements) {
- if (attributes) {
- for (const [name, value] of Object.entries(attributes)) {
- if (element.getAttribute(name) !== value) {
- return false;
- }
- }
- }
- if (properties) {
- if (!isDeepMatch(properties, element)) {
- return false;
- }
- }
- }
- return true;
-
- function isDeepMatch(a, b) {
- if (a === b) {
- return true;
- }
- if ((a && !b) || (!a && b)) {
- return false;
- }
- if (!(a instanceof Object) || !(b instanceof Object)) {
- return false;
- }
- for (const [key, value] of Object.entries(a)) {
- if (!isDeepMatch(value, b[key])) {
- return false;
- }
- }
- return true;
- }
- },
- properties,
- attributes
- );
- }
- await elementsHandle.dispose();
- return result === visible;
- }, timeout);
-}
-
-async function querySelectorsAll(selectors, frame) {
- for (const selector of selectors) {
- const result = await querySelectorAll(selector, frame);
- if (result.length) {
- return result;
- }
- }
- return [];
-}
-
-async function querySelectorAll(selector, frame) {
- if (!Array.isArray(selector)) {
- selector = [selector];
- }
- if (!selector.length) {
- throw new Error('Empty selector provided to querySelectorAll');
- }
- let elements = [];
- for (let i = 0; i < selector.length; i++) {
- const part = selector[i];
- if (i === 0) {
- elements = await frame.$$(part);
- } else {
- const tmpElements = elements;
- elements = [];
- for (const el of tmpElements) {
- elements.push(...(await el.$$(part)));
- }
- }
- if (elements.length === 0) {
- return [];
- }
- if (i < selector.length - 1) {
- const tmpElements = [];
- for (const el of elements) {
- const newEl = (await el.evaluateHandle(el => el.shadowRoot ? el.shadowRoot : el)).asElement();
- if (newEl) {
- tmpElements.push(newEl);
- }
- }
- elements = tmpElements;
- }
- }
- return elements;
-}
-
-async function waitForFunction(fn, timeout) {
- let isActive = true;
- const timeoutId = setTimeout(() => {
- isActive = false;
- }, timeout);
- while (isActive) {
- const result = await fn();
- if (result) {
- clearTimeout(timeoutId);
- return;
- }
- await new Promise(resolve => setTimeout(resolve, 100));
- }
- throw new Error('Timed out');
-}`;
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-const alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
-const charToIdx = alpha.split('').reduce((acc, char, idx) => {
- acc.set(char, idx);
- return acc;
-}, new Map());
-const LEAST_5_BIT_MASK = 0b011111;
-const CONTINUATION_BIT_MASK = 0b100000;
-const MAX_INT = 2147483647;
-/**
- * Encoding variable length integer into base64 (6-bit):
- *
- * 1 N N N N N | 0 N N N N N
- *
- * The first bit indicates if there is more data for the int.
- */
-function encodeInt(num) {
- if (num < 0) {
- throw new Error('Only postive integers and zero are supported');
- }
- if (num > MAX_INT) {
- throw new Error('Only integers between 0 and ' + MAX_INT + ' are supported');
- }
- const result = [];
- do {
- let payload = num & LEAST_5_BIT_MASK;
- num >>>= 5;
- if (num > 0)
- payload |= CONTINUATION_BIT_MASK;
- result.push(alpha[payload]);
- } while (num !== 0);
- return result.join('');
-}
-function encode(nums) {
- const parts = [];
- for (const num of nums) {
- parts.push(encodeInt(num));
- }
- return parts.join('');
-}
-function decode(str) {
- const results = [];
- const chrs = str.split('');
- let result = 0;
- let shift = 0;
- for (const ch of chrs) {
- const num = charToIdx.get(ch);
- result |= (num & LEAST_5_BIT_MASK) << shift;
- shift += 5;
- const hasMore = num & CONTINUATION_BIT_MASK;
- if (!hasMore) {
- results.push(result);
- result = 0;
- shift = 0;
- }
- }
- return results;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-const SOURCE_MAP_PREFIX = '//# recorderSourceMap=';
-/**
- * Stringifes an entire recording. The following hooks are invoked with the `flow` parameter containing the entire flow:
- * - `beforeAllSteps` (once)
- * - `beforeEachStep` (per step)
- * - `stringifyStep` (per step)
- * - `afterEachStep` (per step)
- * - `afterAllSteps` (once)
- */
-async function stringify(flow, opts) {
- if (!opts) {
- opts = {};
- }
- const ext = opts.extension ?? new PuppeteerStringifyExtension();
- const out = opts.writer ?? new InMemoryLineWriter(opts.indentation ?? ' ');
- await ext.beforeAllSteps?.(out, flow);
- const sourceMap = [1]; // The first int indicates the version.
- for (const step of flow.steps) {
- const firstLine = out.getSize();
- await ext.beforeEachStep?.(out, step, flow);
- await ext.stringifyStep(out, step, flow);
- await ext.afterEachStep?.(out, step, flow);
- const lastLine = out.getSize();
- sourceMap.push(...[firstLine, lastLine - firstLine]);
- }
- await ext.afterAllSteps?.(out, flow);
- out.appendLine(SOURCE_MAP_PREFIX + encode(sourceMap));
- return out.toString();
-}
-/**
- * Stringifes a single step. Only the following hooks are invoked with the `flow` parameter as undefined:
- * - `beforeEachStep`
- * - `stringifyStep`
- * - `afterEachStep`
- */
-async function stringifyStep(step, opts) {
- if (!opts) {
- opts = {};
- }
- let ext = opts.extension;
- if (!ext) {
- ext = new PuppeteerStringifyExtension();
- }
- if (!opts.indentation) {
- opts.indentation = ' ';
- }
- const out = opts.writer ?? new InMemoryLineWriter(opts.indentation ?? ' ');
- await ext.beforeEachStep?.(out, step);
- await ext.stringifyStep(out, step);
- await ext.afterEachStep?.(out, step);
- return out.toString();
-}
-function isSourceMapLine(line) {
- return line.trim().startsWith(SOURCE_MAP_PREFIX);
-}
-/**
- * Extracts a source map from a text.
- */
-function parseSourceMap(text) {
- const lines = text.split('\n');
- for (let i = lines.length - 1; i >= 0; i--) {
- const line = lines[i];
- if (isSourceMapLine(line)) {
- return decode(line.trim().substring(SOURCE_MAP_PREFIX.length));
- }
- }
- return;
-}
-function stripSourceMap(text) {
- const lines = text.split('\n');
- return lines.filter((line) => !isSourceMapLine(line)).join('\n');
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class RunnerExtension {
- async beforeAllSteps(flow) { }
- async afterAllSteps(flow) { }
- async beforeEachStep(step, flow) { }
- async runStep(step, flow) { }
- async afterEachStep(step, flow) { }
-}
-
-const comparators = {
- '==': (a, b) => a === b,
- '>=': (a, b) => a >= b,
- '<=': (a, b) => a <= b,
-};
-class PuppeteerRunnerExtension extends RunnerExtension {
- browser;
- page;
- timeout;
- constructor(browser, page, opts) {
- super();
- this.browser = browser;
- this.page = page;
- this.timeout = opts?.timeout || 5000;
- }
- async #ensureAutomationEmulatation(pageOrFrame) {
- try {
- await pageOrFrame
- ._client()
- .send('Emulation.setAutomationOverride', { enabled: true });
- }
- catch {
- // ignore errors as not all versions support this command.
- }
- }
- #getTimeoutForStep(step, flow) {
- return step.timeout || flow?.timeout || this.timeout;
- }
- async runStep(step, flow) {
- const timeout = this.#getTimeoutForStep(step, flow);
- const page = this.page;
- const browser = this.browser;
- const targetPage = await getTargetPageForStep(browser, page, step, timeout);
- let targetFrame = null;
- if (!targetPage && step.target) {
- const frames = page.frames();
- for (const f of frames) {
- if (f.isOOPFrame() && f.url() === step.target) {
- targetFrame = f;
- break;
- }
- }
- if (!targetFrame) {
- targetFrame = await page.waitForFrame(step.target, { timeout });
- }
- }
- const targetPageOrFrame = targetFrame || targetPage;
- if (!targetPageOrFrame) {
- throw new Error('Target is not found for step: ' + JSON.stringify(step));
- }
- await this.#ensureAutomationEmulatation(targetPageOrFrame);
- const localFrame = await getFrame(targetPageOrFrame, step);
- await this.runStepInFrame(step, page, targetPageOrFrame, localFrame, timeout);
- }
- /**
- * @internal
- */
- async runStepInFrame(step, mainPage, targetPageOrFrame, localFrame, timeout) {
- let assertedEventsPromise = null;
- const startWaitingForEvents = () => {
- assertedEventsPromise = waitForEvents(localFrame, step, timeout);
- };
- const locatorRace = this.page.locatorRace;
- switch (step.type) {
- case StepType.DoubleClick:
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .setTimeout(timeout)
- .on('action', () => startWaitingForEvents())
- .click({
- count: 2,
- button: step.button && mouseButtonMap.get(step.button),
- delay: step.duration,
- offset: {
- x: step.offsetX,
- y: step.offsetY,
- },
- });
- break;
- case StepType.Click:
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .setTimeout(timeout)
- .on('action', () => startWaitingForEvents())
- .click({
- delay: step.duration,
- button: step.button && mouseButtonMap.get(step.button),
- offset: {
- x: step.offsetX,
- y: step.offsetY,
- },
- });
- break;
- case StepType.Hover:
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .setTimeout(timeout)
- .on('action', () => startWaitingForEvents())
- .hover();
- break;
- case StepType.EmulateNetworkConditions:
- {
- startWaitingForEvents();
- await mainPage.emulateNetworkConditions(step);
- }
- break;
- case StepType.KeyDown:
- {
- startWaitingForEvents();
- await mainPage.keyboard.down(step.key);
- await mainPage.waitForTimeout(100);
- }
- break;
- case StepType.KeyUp:
- {
- startWaitingForEvents();
- await mainPage.keyboard.up(step.key);
- await mainPage.waitForTimeout(100);
- }
- break;
- case StepType.Close:
- {
- if ('close' in targetPageOrFrame) {
- startWaitingForEvents();
- await targetPageOrFrame.close();
- }
- }
- break;
- case StepType.Change:
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .on('action', () => startWaitingForEvents())
- .setTimeout(timeout)
- .fill(step.value);
- break;
- case StepType.SetViewport: {
- if ('setViewport' in targetPageOrFrame) {
- startWaitingForEvents();
- await targetPageOrFrame.setViewport(step);
- }
- break;
- }
- case StepType.Scroll: {
- if ('selectors' in step) {
- await locatorRace(step.selectors.map((selector) => {
- return localFrame.locator(selectorToPElementSelector(selector));
- }))
- .on('action', () => startWaitingForEvents())
- .setTimeout(timeout)
- .scroll({
- scrollLeft: step.x || 0,
- scrollTop: step.y || 0,
- });
- }
- else {
- startWaitingForEvents();
- await localFrame.evaluate((x, y) => {
- /* c8 ignore start */
- window.scroll(x, y);
- /* c8 ignore stop */
- }, step.x || 0, step.y || 0);
- }
- break;
- }
- case StepType.Navigate: {
- startWaitingForEvents();
- await localFrame.goto(step.url);
- break;
- }
- case StepType.WaitForElement: {
- try {
- startWaitingForEvents();
- await waitForElement(step, localFrame, timeout);
- }
- catch (err) {
- if (err.message === 'Timed out') {
- throw new Error('waitForElement timed out. The element(s) could not be found.');
- }
- else {
- throw err;
- }
- }
- break;
- }
- case StepType.WaitForExpression: {
- startWaitingForEvents();
- await localFrame.waitForFunction(step.expression, {
- timeout,
- });
- break;
- }
- case StepType.CustomStep: {
- // TODO implement these steps
- break;
- }
- default:
- assertAllStepTypesAreHandled(step);
- }
- await assertedEventsPromise;
- }
-}
-class PuppeteerRunnerOwningBrowserExtension extends PuppeteerRunnerExtension {
- async afterAllSteps() {
- await this.browser.close();
- }
-}
-async function getFrame(pageOrFrame, step) {
- let frame = 'mainFrame' in pageOrFrame ? pageOrFrame.mainFrame() : pageOrFrame;
- if ('frame' in step && step.frame) {
- for (const index of step.frame) {
- frame = frame.childFrames()[index];
- }
- }
- return frame;
-}
-async function getTargetPageForStep(browser, page, step, timeout) {
- if (!step.target || step.target === 'main') {
- return page;
- }
- const target = await browser.waitForTarget((t) => t.url() === step.target, {
- timeout,
- });
- const targetPage = await target.page();
- if (!targetPage) {
- return null;
- }
- targetPage.setDefaultTimeout(timeout);
- return targetPage;
-}
-async function waitForEvents(pageOrFrame, step, timeout) {
- const promises = [];
- if (step.assertedEvents) {
- for (const event of step.assertedEvents) {
- switch (event.type) {
- case AssertedEventType.Navigation: {
- promises.push(pageOrFrame.waitForNavigation({
- timeout,
- }));
- continue;
- }
- default:
- throw new Error(`Event type ${event.type} is not supported`);
- }
- }
- }
- await Promise.all(promises);
-}
-async function waitForElement(step, frame, timeout) {
- const { count = 1, operator = '>=', visible = true, properties, attributes, } = step;
- const compFn = comparators[operator];
- await waitForFunction(async () => {
- const elements = await querySelectorsAll(step.selectors, frame);
- let result = compFn(elements.length, count);
- const elementsHandle = await frame.evaluateHandle((...elements) => {
- return elements;
- }, ...elements);
- await Promise.all(elements.map((element) => element.dispose()));
- if (result && (properties || attributes)) {
- result = await elementsHandle.evaluate((elements, properties, attributes) => {
- if (attributes) {
- for (const element of elements) {
- for (const [name, value] of Object.entries(attributes)) {
- if (element.getAttribute(name) !== value) {
- return false;
- }
- }
- }
- }
- if (properties) {
- for (const element of elements) {
- if (!isDeepMatch(properties, element)) {
- return false;
- }
- }
- }
- return true;
- function isDeepMatch(a, b) {
- if (a === b) {
- return true;
- }
- if ((a && !b) || (!a && b)) {
- return false;
- }
- if (!(a instanceof Object) || !(b instanceof Object)) {
- return false;
- }
- for (const [key, value] of Object.entries(a)) {
- if (!isDeepMatch(value, b[key])) {
- return false;
- }
- }
- return true;
- }
- }, properties, attributes);
- }
- await elementsHandle.dispose();
- return result === visible;
- }, timeout);
-}
-async function querySelectorsAll(selectors, frame) {
- for (const selector of selectors) {
- const result = await querySelectorAll(selector, frame);
- if (result.length) {
- return result;
- }
- }
- return [];
-}
-async function querySelectorAll(selector, frame) {
- if (!Array.isArray(selector)) {
- selector = [selector];
- }
- if (!selector.length) {
- throw new Error('Empty selector provided to querySelectorAll');
- }
- let elementHandles = await frame.$$(selector[0]);
- if (!elementHandles.length) {
- return [];
- }
- for (const part of selector.slice(1, selector.length)) {
- elementHandles = (await Promise.all(elementHandles.map(async (handle) => {
- const innerHandle = await handle.evaluateHandle((el) => el.shadowRoot ? el.shadowRoot : el);
- const elementHandles = await innerHandle.$$(part);
- innerHandle.dispose();
- handle.dispose();
- return elementHandles;
- }))).flat();
- if (!elementHandles.length) {
- return [];
- }
- }
- return elementHandles;
-}
-async function waitForFunction(fn, timeout) {
- let isActive = true;
- const timeoutId = setTimeout(() => {
- isActive = false;
- }, timeout);
- while (isActive) {
- const result = await fn();
- if (result) {
- clearTimeout(timeoutId);
- return;
- }
- await new Promise((resolve) => setTimeout(resolve, 100));
- }
- throw new Error('Timed out');
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-async function _runStepWithHooks(extension, step, flow) {
- await extension.beforeEachStep?.(step, flow);
- await extension.runStep(step, flow);
- await extension.afterEachStep?.(step, flow);
-}
-class Runner {
- #flow;
- #extension;
- #aborted = false;
- /**
- * @internal
- */
- constructor(extension) {
- this.#extension = extension;
- }
- abort() {
- this.#aborted = true;
- }
- set flow(flow) {
- this.#flow = flow;
- }
- async runBeforeAllSteps(flow) {
- await this.#extension.beforeAllSteps?.(flow);
- }
- async runAfterAllSteps(flow) {
- await this.#extension.afterAllSteps?.(flow);
- }
- /**
- * Runs the provided `step` with `beforeEachStep` and `afterEachStep` hooks.
- * Parameters from the `flow` apply if the `flow` is set.
- */
- async runStep(step) {
- await _runStepWithHooks(this.#extension, step);
- }
- /**
- * Run all the steps in the flow
- * @returns whether all the steps are run or the execution is aborted
- */
- async run() {
- if (!this.#flow) {
- throw new Error('Set the flow on the runner instance before calling `run`.');
- }
- const flow = this.#flow;
- this.#aborted = false;
- await this.#extension.beforeAllSteps?.(flow);
- if (this.#aborted) {
- return false;
- }
- for (const step of flow.steps) {
- if (this.#aborted) {
- await this.#extension.afterAllSteps?.(flow);
- return false;
- }
- await _runStepWithHooks(this.#extension, step, flow);
- }
- await this.#extension.afterAllSteps?.(flow);
- return true;
- }
-}
-async function createRunner(flowOrExtension, maybeExtension) {
- const extension = flowOrExtension instanceof RunnerExtension
- ? flowOrExtension
- : maybeExtension;
- const flow = !(flowOrExtension instanceof RunnerExtension)
- ? flowOrExtension
- : undefined;
- const runner = new Runner(extension ?? (await createPuppeteerRunnerOwningBrowserExtension()));
- if (flow) {
- runner.flow = flow;
- }
- return runner;
-}
-async function createPuppeteerRunnerOwningBrowserExtension() {
- const { default: puppeteer } = await import('puppeteer');
- const browser = await puppeteer.launch({
- headless: 'new',
- });
- const page = await browser.newPage();
- return new PuppeteerRunnerOwningBrowserExtension(browser, page);
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-/**
- * Stringifies a user flow to a script that uses \@puppeteer/replay's own API.
- */
-class PuppeteerReplayStringifyExtension extends StringifyExtension {
- async beforeAllSteps(out) {
- out.appendLine("import url from 'url';");
- out.appendLine("import { createRunner } from '@puppeteer/replay';");
- out.appendLine('');
- out.appendLine('export async function run(extension) {').startBlock();
- out.appendLine('const runner = await createRunner(extension);');
- out.appendLine('');
- out.appendLine('await runner.runBeforeAllSteps();');
- out.appendLine('');
- }
- async afterAllSteps(out) {
- out.appendLine('');
- out
- .appendLine('await runner.runAfterAllSteps();')
- .endBlock()
- .appendLine('}');
- out.appendLine('');
- out
- .appendLine('if (process && import.meta.url === url.pathToFileURL(process.argv[1]).href) {')
- .startBlock()
- .appendLine('run()')
- .endBlock()
- .appendLine('}');
- }
- async stringifyStep(out, step) {
- out.appendLine(`await runner.runStep(${formatJSONAsJS(step, out.getIndent())});`);
- }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-function isNavigationStep(step) {
- return Boolean(step.type === StepType.Navigate ||
- step.assertedEvents?.some((event) => event.type === AssertedEventType.Navigation));
-}
-function isMobileFlow(flow) {
- for (const step of flow.steps) {
- if (step.type === StepType.SetViewport) {
- return step.isMobile;
- }
- }
- return false;
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class LighthouseStringifyExtension extends PuppeteerStringifyExtension {
- #isProcessingTimespan = false;
- async beforeAllSteps(out, flow) {
- out.appendLine(`const fs = require('fs');`);
- await super.beforeAllSteps(out, flow);
- out.appendLine(`const lhApi = await import('lighthouse'); // v10.0.0 or later`);
- const flags = {
- screenEmulation: {
- disabled: true,
- },
- };
- out.appendLine(`const flags = ${formatJSONAsJS(flags, out.getIndent())}`);
- if (isMobileFlow(flow)) {
- out.appendLine(`const config = undefined;`);
- }
- else {
- out.appendLine('const config = lhApi.desktopConfig;');
- }
- out.appendLine(`const lhFlow = await lhApi.startFlow(page, {name: ${formatJSONAsJS(flow.title, out.getIndent())}, config, flags});`);
- }
- async stringifyStep(out, step, flow) {
- if (step.type === StepType.SetViewport) {
- await super.stringifyStep(out, step, flow);
- return;
- }
- const isNavigation = isNavigationStep(step);
- if (isNavigation) {
- if (this.#isProcessingTimespan) {
- out.appendLine(`await lhFlow.endTimespan();`);
- this.#isProcessingTimespan = false;
- }
- out.appendLine(`await lhFlow.startNavigation();`);
- }
- else if (!this.#isProcessingTimespan) {
- out.appendLine(`await lhFlow.startTimespan();`);
- this.#isProcessingTimespan = true;
- }
- await super.stringifyStep(out, step, flow);
- if (isNavigation) {
- out.appendLine(`await lhFlow.endNavigation();`);
- }
- }
- async afterAllSteps(out, flow) {
- if (this.#isProcessingTimespan) {
- out.appendLine(`await lhFlow.endTimespan();`);
- }
- out.appendLine(`const lhFlowReport = await lhFlow.generateReport();`);
- out.appendLine(`fs.writeFileSync(__dirname + '/flow.report.html', lhFlowReport)`);
- await super.afterAllSteps(out, flow);
- }
-}
-
-/**
- Copyright 2022 Google LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-class LighthouseRunnerExtension extends PuppeteerRunnerExtension {
- #isTimespanRunning = false;
- #isNavigationRunning = false;
- #lhFlow;
- async createFlowResult() {
- if (!this.#lhFlow) {
- throw new Error('Cannot get flow result before running the flow');
- }
- return this.#lhFlow.createFlowResult();
- }
- async beforeAllSteps(flow) {
- await super.beforeAllSteps?.(flow);
- const { startFlow, desktopConfig } = await import('lighthouse');
- let config = undefined;
- if (!isMobileFlow(flow)) {
- config = desktopConfig;
- }
- this.#lhFlow = await startFlow(this.page, {
- config,
- flags: { screenEmulation: { disabled: true } },
- name: flow.title,
- });
- }
- async beforeEachStep(step, flow) {
- await super.beforeEachStep?.(step, flow);
- if (step.type === StepType.SetViewport)
- return;
- if (isNavigationStep(step)) {
- if (this.#isTimespanRunning) {
- await this.#lhFlow.endTimespan();
- this.#isTimespanRunning = false;
- }
- await this.#lhFlow.startNavigation();
- this.#isNavigationRunning = true;
- }
- else if (!this.#isTimespanRunning) {
- await this.#lhFlow.startTimespan();
- this.#isTimespanRunning = true;
- }
- }
- async afterEachStep(step, flow) {
- if (this.#isNavigationRunning) {
- await this.#lhFlow.endNavigation();
- this.#isNavigationRunning = false;
- }
- await super.afterEachStep?.(step, flow);
- }
- async afterAllSteps(flow) {
- if (this.#isTimespanRunning) {
- await this.#lhFlow.endTimespan();
- }
- await super.afterAllSteps?.(flow);
- }
-}
-
-export { AssertedEventType, JSONStringifyExtension, LighthouseRunnerExtension, LighthouseStringifyExtension, PuppeteerReplayStringifyExtension, PuppeteerRunnerExtension, PuppeteerRunnerOwningBrowserExtension, PuppeteerStringifyExtension, Runner, RunnerExtension, Schema, SelectorType, StepType, StringifyExtension, assertAllStepTypesAreHandled, createRunner, formatAsJSLiteral, formatJSONAsJS, getSelectorType, maxTimeout, minTimeout, mouseButtonMap, parse, parseSourceMap, parseStep, pointerDeviceTypes, selectorToPElementSelector, stringify, stringifyStep, stripSourceMap, typeableInputTypes, validTimeout };
-//# sourceMappingURL=main.js.map
diff --git a/node_modules/@puppeteer/replay/lib/main.js.map b/node_modules/@puppeteer/replay/lib/main.js.map
deleted file mode 100644
index 7437210..0000000
--- a/node_modules/@puppeteer/replay/lib/main.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"main.js","sources":["../src/Schema.ts","../src/SchemaUtils.ts","../src/StringifyExtension.ts","../src/JSONStringifyExtension.ts","../src/InMemoryLineWriter.ts","../src/JSONUtils.ts","../src/PuppeteerStringifyExtension.ts","../src/vlq.ts","../src/stringify.ts","../src/RunnerExtension.ts","../src/PuppeteerRunnerExtension.ts","../src/Runner.ts","../src/PuppeteerReplayStringifyExtension.ts","../src/lighthouse/helpers.ts","../src/lighthouse/LighthouseStringifyExtension.ts","../src/lighthouse/LighthouseRunnerExtension.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;AAcG;AAEsB,IAAA,aAAA;AAEzB,CAAA,UAAY,YAAS,EAAA;AACrB,IAAA,YAAY,CAAA,KAAU,CAAA,GAAA,KAAO,CAAA;AAC7B,IAAA,YAAoB,CAAA,MAAG,UAAS,CAAA;AAChC,IAAA,YAAY,CAAA,MAAA,CAAA,GAAgB,MAAA,CAAM;AAElC,IAAA,YAAA,CAAA,OAAwB,CAAA,GAAA,OAAA,CAAA;AACtB,IAAA,YAAW,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;AACX,CAAA,EAAA,YAAa,KAAA,YAAA,GAAA,EAAA,CAAA,CAAA,CAAA;AACA,IAAA,SAAA;AACb,CAAA,UAAe,QAAA,EAAA;AACf,IAAA,QAAiB,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;AAClB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAA,CAAA;AAED,IAAA,QAAA,CAAA,OAAY,CAAQ,GAAA,OAAA,CAAA;AAClB,IAAA,QAAiB,CAAA,YAAA,CAAA,GAAA,YAAA,CAAA;AACjB,IAAA,QAAe,CAAA,aAAA,CAAA,GAAA,aAAA,CAAA;AACf,IAAA,QAAe,CAAA,0BAAA,CAAA,GAAA,0BAAA,CAAA;AACf,IAAA,QAAA,CAAA,OAAyB,CAAA,GAAA,OAAA,CAAA;AACzB,IAAA,QAAA,CAAA,SAA2B,CAAA,GAAA,SAAA,CAAA;AAC3B,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAqD,CAAA;AACrD,IAAA,QAAe,CAAA,UAAA,CAAA,GAAA,UAAA,CAAA;AACf,IAAA,QAAmB,CAAA,QAAA,CAAA,GAAA,QAAA,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A;QAWjB,GAAA,CAAA,UAAI,CAAE,mDAAU,CAAA,CAAA;AAiB7B,QAAA,GAAA,CAAA,UAAiB,CAAE;AAKnC,QAAA,GAAA,CAAA,UAAA,CAAA,wCAAA,CAAA,CAAA,UAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;AC1DD;;;;;;;;;;;;;;AAcG;AAKH,SAAA;AASA,IAAA,OAAA,OAAA,CAAA,IAAA,CAAgB,iBAAiB,SAAU;;;;;;;;;;;;AC5B3C;;;;;;;;;;;;;;AAcG;;AAac,IAAA,8BAA8B;IA8B9B,MAAa,cAAgB,CAAA,GAAA,EAAA,IAAA,EAAM;AA0BnC,QAAA,GAAA,CAAA,UAAiB,CAAE,0BAA0B,CAAA,CAAA,CAAA;AAU7D,QAAA,MAAA,KAAA,CAAA,cAAA,CAAA,GAAA,EAAA,IAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7FD;;;;;;;;;;;;;;AAcG;;AAYK,IAAA,qBAA2B,KAAA,CAAA;IAOlB,oBAAmB,GAAU,KAAA,CAAA;IAiB7B,OAAc,CAAA;IAiBd,MAAa,gBAAO;QAQP,IAAA,CAAA,IAAA,CAAC,OAAc,EAAA;AAM5C,YAAA,MAAA,IAAA,KAAA,CAAA,gDAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/replay/node_modules/ansi-regex/index.d.ts b/node_modules/@puppeteer/replay/node_modules/ansi-regex/index.d.ts
deleted file mode 100644
index 2dbf6af..0000000
--- a/node_modules/@puppeteer/replay/node_modules/ansi-regex/index.d.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-declare namespace ansiRegex {
- interface Options {
- /**
- Match only the first ANSI escape.
-
- @default false
- */
- onlyFirst: boolean;
- }
-}
-
-/**
-Regular expression for matching ANSI escape codes.
-
-@example
-```
-import ansiRegex = require('ansi-regex');
-
-ansiRegex().test('\u001B[4mcake\u001B[0m');
-//=> true
-
-ansiRegex().test('cake');
-//=> false
-
-'\u001B[4mcake\u001B[0m'.match(ansiRegex());
-//=> ['\u001B[4m', '\u001B[0m']
-
-'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
-//=> ['\u001B[4m']
-
-'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
-//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
-```
-*/
-declare function ansiRegex(options?: ansiRegex.Options): RegExp;
-
-export = ansiRegex;
diff --git a/node_modules/@puppeteer/replay/node_modules/ansi-regex/index.js b/node_modules/@puppeteer/replay/node_modules/ansi-regex/index.js
deleted file mode 100644
index 616ff83..0000000
--- a/node_modules/@puppeteer/replay/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = ({onlyFirst = false} = {}) => {
- const pattern = [
- '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
- ].join('|');
-
- return new RegExp(pattern, onlyFirst ? undefined : 'g');
-};
diff --git a/node_modules/@puppeteer/replay/node_modules/ansi-regex/license b/node_modules/@puppeteer/replay/node_modules/ansi-regex/license
deleted file mode 100644
index e7af2f7..0000000
--- a/node_modules/@puppeteer/replay/node_modules/ansi-regex/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@puppeteer/replay/node_modules/ansi-regex/package.json b/node_modules/@puppeteer/replay/node_modules/ansi-regex/package.json
deleted file mode 100644
index dd9939e..0000000
--- a/node_modules/@puppeteer/replay/node_modules/ansi-regex/package.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "name": "ansi-regex",
- "version": "5.0.1",
- "description": "Regular expression for matching ANSI escape codes",
- "license": "MIT",
- "repository": "chalk/ansi-regex",
- "author": {
- "name": "Sindre Sorhus",
- "email": "[email protected]",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=8"
- },
- "scripts": {
- "test": "xo && ava && tsd",
- "view-supported": "node fixtures/view-codes.js"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "text",
- "regex",
- "regexp",
- "re",
- "match",
- "test",
- "find",
- "pattern"
- ],
- "devDependencies": {
- "ava": "^2.4.0",
- "tsd": "^0.9.0",
- "xo": "^0.25.3"
- }
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/ansi-regex/readme.md b/node_modules/@puppeteer/replay/node_modules/ansi-regex/readme.md
deleted file mode 100644
index 4d848bc..0000000
--- a/node_modules/@puppeteer/replay/node_modules/ansi-regex/readme.md
+++ /dev/null
@@ -1,78 +0,0 @@
-# ansi-regex
-
-> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install ansi-regex
-```
-
-
-## Usage
-
-```js
-const ansiRegex = require('ansi-regex');
-
-ansiRegex().test('\u001B[4mcake\u001B[0m');
-//=> true
-
-ansiRegex().test('cake');
-//=> false
-
-'\u001B[4mcake\u001B[0m'.match(ansiRegex());
-//=> ['\u001B[4m', '\u001B[0m']
-
-'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
-//=> ['\u001B[4m']
-
-'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
-//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
-```
-
-
-## API
-
-### ansiRegex(options?)
-
-Returns a regex for matching ANSI escape codes.
-
-#### options
-
-Type: `object`
-
-##### onlyFirst
-
-Type: `boolean`<br>
-Default: `false` *(Matches any ANSI escape codes in a string)*
-
-Match only the first ANSI escape.
-
-
-## FAQ
-
-### Why do you test for codes not in the ECMA 48 standard?
-
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
-
-On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
-
-
-## Maintainers
-
-- [Sindre Sorhus](https://github.com/sindresorhus)
-- [Josh Junon](https://github.com/qix-)
-
-
----
-
-<div align="center">
- <b>
- <a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
- </b>
- <br>
- <sub>
- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
- </sub>
-</div>
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/CHANGELOG.md b/node_modules/@puppeteer/replay/node_modules/cliui/CHANGELOG.md
deleted file mode 100644
index 61f06c3..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/CHANGELOG.md
+++ /dev/null
@@ -1,139 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-## [8.0.1](https://github.com/yargs/cliui/compare/v8.0.0...v8.0.1) (2022-10-01)
-
-
-### Bug Fixes
-
-* **deps:** move rollup-plugin-ts to dev deps ([#124](https://github.com/yargs/cliui/issues/124)) ([7c8bd6b](https://github.com/yargs/cliui/commit/7c8bd6ba024d61e4eeae310c7959ab8ab6829081))
-
-## [8.0.0](https://github.com/yargs/cliui/compare/v7.0.4...v8.0.0) (2022-09-30)
-
-
-### ⚠ BREAKING CHANGES
-
-* **deps:** drop Node 10 to release CVE-2021-3807 patch (#122)
-
-### Bug Fixes
-
-* **deps:** drop Node 10 to release CVE-2021-3807 patch ([#122](https://github.com/yargs/cliui/issues/122)) ([f156571](https://github.com/yargs/cliui/commit/f156571ce4f2ebf313335e3a53ad905589da5a30))
-
-### [7.0.4](https://www.github.com/yargs/cliui/compare/v7.0.3...v7.0.4) (2020-11-08)
-
-
-### Bug Fixes
-
-* **deno:** import UIOptions from definitions ([#97](https://www.github.com/yargs/cliui/issues/97)) ([f04f343](https://www.github.com/yargs/cliui/commit/f04f3439bc78114c7e90f82ff56f5acf16268ea8))
-
-### [7.0.3](https://www.github.com/yargs/cliui/compare/v7.0.2...v7.0.3) (2020-10-16)
-
-
-### Bug Fixes
-
-* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#93](https://www.github.com/yargs/cliui/issues/93)) ([eca16fc](https://www.github.com/yargs/cliui/commit/eca16fc05d26255df3280906c36d7f0e5b05c6e9))
-
-### [7.0.2](https://www.github.com/yargs/cliui/compare/v7.0.1...v7.0.2) (2020-10-14)
-
-
-### Bug Fixes
-
-* **exports:** node 13.0-13.6 require a string fallback ([#91](https://www.github.com/yargs/cliui/issues/91)) ([b529d7e](https://www.github.com/yargs/cliui/commit/b529d7e432901af1af7848b23ed6cf634497d961))
-
-### [7.0.1](https://www.github.com/yargs/cliui/compare/v7.0.0...v7.0.1) (2020-08-16)
-
-
-### Bug Fixes
-
-* **build:** main should be build/index.cjs ([dc29a3c](https://www.github.com/yargs/cliui/commit/dc29a3cc617a410aa850e06337b5954b04f2cb4d))
-
-## [7.0.0](https://www.github.com/yargs/cliui/compare/v6.0.0...v7.0.0) (2020-08-16)
-
-
-### ⚠ BREAKING CHANGES
-
-* tsc/ESM/Deno support (#82)
-* modernize deps and build (#80)
-
-### Build System
-
-* modernize deps and build ([#80](https://www.github.com/yargs/cliui/issues/80)) ([339d08d](https://www.github.com/yargs/cliui/commit/339d08dc71b15a3928aeab09042af94db2f43743))
-
-
-### Code Refactoring
-
-* tsc/ESM/Deno support ([#82](https://www.github.com/yargs/cliui/issues/82)) ([4b777a5](https://www.github.com/yargs/cliui/commit/4b777a5fe01c5d8958c6708695d6aab7dbe5706c))
-
-## [6.0.0](https://www.github.com/yargs/cliui/compare/v5.0.0...v6.0.0) (2019-11-10)
-
-
-### ⚠ BREAKING CHANGES
-
-* update deps, drop Node 6
-
-### Code Refactoring
-
-* update deps, drop Node 6 ([62056df](https://www.github.com/yargs/cliui/commit/62056df))
-
-## [5.0.0](https://github.com/yargs/cliui/compare/v4.1.0...v5.0.0) (2019-04-10)
-
-
-### Bug Fixes
-
-* Update wrap-ansi to fix compatibility with latest versions of chalk. ([#60](https://github.com/yargs/cliui/issues/60)) ([7bf79ae](https://github.com/yargs/cliui/commit/7bf79ae))
-
-
-### BREAKING CHANGES
-
-* Drop support for node < 6.
-
-
-
-<a name="4.1.0"></a>
-## [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23)
-
-
-### Features
-
-* add resetOutput method ([#57](https://github.com/yargs/cliui/issues/57)) ([7246902](https://github.com/yargs/cliui/commit/7246902))
-
-
-
-<a name="4.0.0"></a>
-## [4.0.0](https://github.com/yargs/cliui/compare/v3.2.0...v4.0.0) (2017-12-18)
-
-
-### Bug Fixes
-
-* downgrades strip-ansi to version 3.0.1 ([#54](https://github.com/yargs/cliui/issues/54)) ([5764c46](https://github.com/yargs/cliui/commit/5764c46))
-* set env variable FORCE_COLOR. ([#56](https://github.com/yargs/cliui/issues/56)) ([7350e36](https://github.com/yargs/cliui/commit/7350e36))
-
-
-### Chores
-
-* drop support for node < 4 ([#53](https://github.com/yargs/cliui/issues/53)) ([b105376](https://github.com/yargs/cliui/commit/b105376))
-
-
-### Features
-
-* add fallback for window width ([#45](https://github.com/yargs/cliui/issues/45)) ([d064922](https://github.com/yargs/cliui/commit/d064922))
-
-
-### BREAKING CHANGES
-
-* officially drop support for Node < 4
-
-
-
-<a name="3.2.0"></a>
-## [3.2.0](https://github.com/yargs/cliui/compare/v3.1.2...v3.2.0) (2016-04-11)
-
-
-### Bug Fixes
-
-* reduces tarball size ([acc6c33](https://github.com/yargs/cliui/commit/acc6c33))
-
-### Features
-
-* adds standard-version for release management ([ff84e32](https://github.com/yargs/cliui/commit/ff84e32))
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/LICENSE.txt b/node_modules/@puppeteer/replay/node_modules/cliui/LICENSE.txt
deleted file mode 100644
index c7e2747..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/LICENSE.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2015, Contributors
-
-Permission to use, copy, modify, and/or distribute this software
-for any purpose with or without fee is hereby granted, provided
-that the above copyright notice and this permission notice
-appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
-LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
-OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/README.md b/node_modules/@puppeteer/replay/node_modules/cliui/README.md
deleted file mode 100644
index 65b5672..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/README.md
+++ /dev/null
@@ -1,141 +0,0 @@
-# cliui
-
-
-[](https://www.npmjs.com/package/cliui)
-[](https://conventionalcommits.org)
-
-
-easily create complex multi-column command-line-interfaces.
-
-## Example
-
-```js
-const ui = require('cliui')()
-
-ui.div('Usage: $0 [command] [options]')
-
-ui.div({
- text: 'Options:',
- padding: [2, 0, 1, 0]
-})
-
-ui.div(
- {
- text: "-f, --file",
- width: 20,
- padding: [0, 4, 0, 4]
- },
- {
- text: "the file to load." +
- chalk.green("(if this description is long it wraps).")
- ,
- width: 20
- },
- {
- text: chalk.red("[required]"),
- align: 'right'
- }
-)
-
-console.log(ui.toString())
-```
-
-## Deno/ESM Support
-
-As of `v7` `cliui` supports [Deno](https://github.com/denoland/deno) and
-[ESM](https://nodejs.org/api/esm.html#esm_ecmascript_modules):
-
-```typescript
-import cliui from "https://deno.land/x/cliui/deno.ts";
-
-const ui = cliui({})
-
-ui.div('Usage: $0 [command] [options]')
-
-ui.div({
- text: 'Options:',
- padding: [2, 0, 1, 0]
-})
-
-ui.div({
- text: "-f, --file",
- width: 20,
- padding: [0, 4, 0, 4]
-})
-
-console.log(ui.toString())
-```
-
-<img width="500" src="screenshot.png">
-
-## Layout DSL
-
-cliui exposes a simple layout DSL:
-
-If you create a single `ui.div`, passing a string rather than an
-object:
-
-* `\n`: characters will be interpreted as new rows.
-* `\t`: characters will be interpreted as new columns.
-* `\s`: characters will be interpreted as padding.
-
-**as an example...**
-
-```js
-var ui = require('./')({
- width: 60
-})
-
-ui.div(
- 'Usage: node ./bin/foo.js\n' +
- ' <regex>\t provide a regex\n' +
- ' <glob>\t provide a glob\t [required]'
-)
-
-console.log(ui.toString())
-```
-
-**will output:**
-
-```shell
-Usage: node ./bin/foo.js
- <regex> provide a regex
- <glob> provide a glob [required]
-```
-
-## Methods
-
-```js
-cliui = require('cliui')
-```
-
-### cliui({width: integer})
-
-Specify the maximum width of the UI being generated.
-If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`.
-
-### cliui({wrap: boolean})
-
-Enable or disable the wrapping of text in a column.
-
-### cliui.div(column, column, column)
-
-Create a row with any number of columns, a column
-can either be a string, or an object with the following
-options:
-
-* **text:** some text to place in the column.
-* **width:** the width of a column.
-* **align:** alignment, `right` or `center`.
-* **padding:** `[top, right, bottom, left]`.
-* **border:** should a border be placed around the div?
-
-### cliui.span(column, column, column)
-
-Similar to `div`, except the next row will be appended without
-a new line being created.
-
-### cliui.resetOutput()
-
-Resets the UI elements of the current cliui instance, maintaining the values
-set for `width` and `wrap`.
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/build/index.cjs b/node_modules/@puppeteer/replay/node_modules/cliui/build/index.cjs
deleted file mode 100644
index 82126b6..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/build/index.cjs
+++ /dev/null
@@ -1,302 +0,0 @@
-'use strict';
-
-const align = {
- right: alignRight,
- center: alignCenter
-};
-const top = 0;
-const right = 1;
-const bottom = 2;
-const left = 3;
-class UI {
- constructor(opts) {
- var _a;
- this.width = opts.width;
- this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true;
- this.rows = [];
- }
- span(...args) {
- const cols = this.div(...args);
- cols.span = true;
- }
- resetOutput() {
- this.rows = [];
- }
- div(...args) {
- if (args.length === 0) {
- this.div('');
- }
- if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') {
- return this.applyLayoutDSL(args[0]);
- }
- const cols = args.map(arg => {
- if (typeof arg === 'string') {
- return this.colFromString(arg);
- }
- return arg;
- });
- this.rows.push(cols);
- return cols;
- }
- shouldApplyLayoutDSL(...args) {
- return args.length === 1 && typeof args[0] === 'string' &&
- /[\t\n]/.test(args[0]);
- }
- applyLayoutDSL(str) {
- const rows = str.split('\n').map(row => row.split('\t'));
- let leftColumnWidth = 0;
- // simple heuristic for layout, make sure the
- // second column lines up along the left-hand.
- // don't allow the first column to take up more
- // than 50% of the screen.
- rows.forEach(columns => {
- if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) {
- leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0]));
- }
- });
- // generate a table:
- // replacing ' ' with padding calculations.
- // using the algorithmically generated width.
- rows.forEach(columns => {
- this.div(...columns.map((r, i) => {
- return {
- text: r.trim(),
- padding: this.measurePadding(r),
- width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined
- };
- }));
- });
- return this.rows[this.rows.length - 1];
- }
- colFromString(text) {
- return {
- text,
- padding: this.measurePadding(text)
- };
- }
- measurePadding(str) {
- // measure padding without ansi escape codes
- const noAnsi = mixin.stripAnsi(str);
- return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length];
- }
- toString() {
- const lines = [];
- this.rows.forEach(row => {
- this.rowToString(row, lines);
- });
- // don't display any lines with the
- // hidden flag set.
- return lines
- .filter(line => !line.hidden)
- .map(line => line.text)
- .join('\n');
- }
- rowToString(row, lines) {
- this.rasterize(row).forEach((rrow, r) => {
- let str = '';
- rrow.forEach((col, c) => {
- const { width } = row[c]; // the width with padding.
- const wrapWidth = this.negatePadding(row[c]); // the width without padding.
- let ts = col; // temporary string used during alignment/padding.
- if (wrapWidth > mixin.stringWidth(col)) {
- ts += ' '.repeat(wrapWidth - mixin.stringWidth(col));
- }
- // align the string within its column.
- if (row[c].align && row[c].align !== 'left' && this.wrap) {
- const fn = align[row[c].align];
- ts = fn(ts, wrapWidth);
- if (mixin.stringWidth(ts) < wrapWidth) {
- ts += ' '.repeat((width || 0) - mixin.stringWidth(ts) - 1);
- }
- }
- // apply border and padding to string.
- const padding = row[c].padding || [0, 0, 0, 0];
- if (padding[left]) {
- str += ' '.repeat(padding[left]);
- }
- str += addBorder(row[c], ts, '| ');
- str += ts;
- str += addBorder(row[c], ts, ' |');
- if (padding[right]) {
- str += ' '.repeat(padding[right]);
- }
- // if prior row is span, try to render the
- // current row on the prior line.
- if (r === 0 && lines.length > 0) {
- str = this.renderInline(str, lines[lines.length - 1]);
- }
- });
- // remove trailing whitespace.
- lines.push({
- text: str.replace(/ +$/, ''),
- span: row.span
- });
- });
- return lines;
- }
- // if the full 'source' can render in
- // the target line, do so.
- renderInline(source, previousLine) {
- const match = source.match(/^ */);
- const leadingWhitespace = match ? match[0].length : 0;
- const target = previousLine.text;
- const targetTextWidth = mixin.stringWidth(target.trimRight());
- if (!previousLine.span) {
- return source;
- }
- // if we're not applying wrapping logic,
- // just always append to the span.
- if (!this.wrap) {
- previousLine.hidden = true;
- return target + source;
- }
- if (leadingWhitespace < targetTextWidth) {
- return source;
- }
- previousLine.hidden = true;
- return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft();
- }
- rasterize(row) {
- const rrows = [];
- const widths = this.columnWidths(row);
- let wrapped;
- // word wrap all columns, and create
- // a data-structure that is easy to rasterize.
- row.forEach((col, c) => {
- // leave room for left and right padding.
- col.width = widths[c];
- if (this.wrap) {
- wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n');
- }
- else {
- wrapped = col.text.split('\n');
- }
- if (col.border) {
- wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.');
- wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'");
- }
- // add top and bottom padding.
- if (col.padding) {
- wrapped.unshift(...new Array(col.padding[top] || 0).fill(''));
- wrapped.push(...new Array(col.padding[bottom] || 0).fill(''));
- }
- wrapped.forEach((str, r) => {
- if (!rrows[r]) {
- rrows.push([]);
- }
- const rrow = rrows[r];
- for (let i = 0; i < c; i++) {
- if (rrow[i] === undefined) {
- rrow.push('');
- }
- }
- rrow.push(str);
- });
- });
- return rrows;
- }
- negatePadding(col) {
- let wrapWidth = col.width || 0;
- if (col.padding) {
- wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0);
- }
- if (col.border) {
- wrapWidth -= 4;
- }
- return wrapWidth;
- }
- columnWidths(row) {
- if (!this.wrap) {
- return row.map(col => {
- return col.width || mixin.stringWidth(col.text);
- });
- }
- let unset = row.length;
- let remainingWidth = this.width;
- // column widths can be set in config.
- const widths = row.map(col => {
- if (col.width) {
- unset--;
- remainingWidth -= col.width;
- return col.width;
- }
- return undefined;
- });
- // any unset widths should be calculated.
- const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0;
- return widths.map((w, i) => {
- if (w === undefined) {
- return Math.max(unsetWidth, _minWidth(row[i]));
- }
- return w;
- });
- }
-}
-function addBorder(col, ts, style) {
- if (col.border) {
- if (/[.']-+[.']/.test(ts)) {
- return '';
- }
- if (ts.trim().length !== 0) {
- return style;
- }
- return ' ';
- }
- return '';
-}
-// calculates the minimum width of
-// a column, based on padding preferences.
-function _minWidth(col) {
- const padding = col.padding || [];
- const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0);
- if (col.border) {
- return minWidth + 4;
- }
- return minWidth;
-}
-function getWindowWidth() {
- /* istanbul ignore next: depends on terminal */
- if (typeof process === 'object' && process.stdout && process.stdout.columns) {
- return process.stdout.columns;
- }
- return 80;
-}
-function alignRight(str, width) {
- str = str.trim();
- const strWidth = mixin.stringWidth(str);
- if (strWidth < width) {
- return ' '.repeat(width - strWidth) + str;
- }
- return str;
-}
-function alignCenter(str, width) {
- str = str.trim();
- const strWidth = mixin.stringWidth(str);
- /* istanbul ignore next */
- if (strWidth >= width) {
- return str;
- }
- return ' '.repeat((width - strWidth) >> 1) + str;
-}
-let mixin;
-function cliui(opts, _mixin) {
- mixin = _mixin;
- return new UI({
- width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(),
- wrap: opts === null || opts === void 0 ? void 0 : opts.wrap
- });
-}
-
-// Bootstrap cliui with CommonJS dependencies:
-const stringWidth = require('string-width');
-const stripAnsi = require('strip-ansi');
-const wrap = require('wrap-ansi');
-function ui(opts) {
- return cliui(opts, {
- stringWidth,
- stripAnsi,
- wrap
- });
-}
-
-module.exports = ui;
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/build/index.d.cts b/node_modules/@puppeteer/replay/node_modules/cliui/build/index.d.cts
deleted file mode 100644
index 4567f94..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/build/index.d.cts
+++ /dev/null
@@ -1,43 +0,0 @@
-interface UIOptions {
- width: number;
- wrap?: boolean;
- rows?: string[];
-}
-interface Column {
- text: string;
- width?: number;
- align?: "right" | "left" | "center";
- padding: number[];
- border?: boolean;
-}
-interface ColumnArray extends Array<Column> {
- span: boolean;
-}
-interface Line {
- hidden?: boolean;
- text: string;
- span?: boolean;
-}
-declare class UI {
- width: number;
- wrap: boolean;
- rows: ColumnArray[];
- constructor(opts: UIOptions);
- span(...args: ColumnArray): void;
- resetOutput(): void;
- div(...args: (Column | string)[]): ColumnArray;
- private shouldApplyLayoutDSL;
- private applyLayoutDSL;
- private colFromString;
- private measurePadding;
- toString(): string;
- rowToString(row: ColumnArray, lines: Line[]): Line[];
- // if the full 'source' can render in
- // the target line, do so.
- private renderInline;
- private rasterize;
- private negatePadding;
- private columnWidths;
-}
-declare function ui(opts: UIOptions): UI;
-export { ui as default };
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/build/lib/index.js b/node_modules/@puppeteer/replay/node_modules/cliui/build/lib/index.js
deleted file mode 100644
index b6eb054..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/build/lib/index.js
+++ /dev/null
@@ -1,287 +0,0 @@
-'use strict';
-const align = {
- right: alignRight,
- center: alignCenter
-};
-const top = 0;
-const right = 1;
-const bottom = 2;
-const left = 3;
-export class UI {
- constructor(opts) {
- var _a;
- this.width = opts.width;
- this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true;
- this.rows = [];
- }
- span(...args) {
- const cols = this.div(...args);
- cols.span = true;
- }
- resetOutput() {
- this.rows = [];
- }
- div(...args) {
- if (args.length === 0) {
- this.div('');
- }
- if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') {
- return this.applyLayoutDSL(args[0]);
- }
- const cols = args.map(arg => {
- if (typeof arg === 'string') {
- return this.colFromString(arg);
- }
- return arg;
- });
- this.rows.push(cols);
- return cols;
- }
- shouldApplyLayoutDSL(...args) {
- return args.length === 1 && typeof args[0] === 'string' &&
- /[\t\n]/.test(args[0]);
- }
- applyLayoutDSL(str) {
- const rows = str.split('\n').map(row => row.split('\t'));
- let leftColumnWidth = 0;
- // simple heuristic for layout, make sure the
- // second column lines up along the left-hand.
- // don't allow the first column to take up more
- // than 50% of the screen.
- rows.forEach(columns => {
- if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) {
- leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0]));
- }
- });
- // generate a table:
- // replacing ' ' with padding calculations.
- // using the algorithmically generated width.
- rows.forEach(columns => {
- this.div(...columns.map((r, i) => {
- return {
- text: r.trim(),
- padding: this.measurePadding(r),
- width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined
- };
- }));
- });
- return this.rows[this.rows.length - 1];
- }
- colFromString(text) {
- return {
- text,
- padding: this.measurePadding(text)
- };
- }
- measurePadding(str) {
- // measure padding without ansi escape codes
- const noAnsi = mixin.stripAnsi(str);
- return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length];
- }
- toString() {
- const lines = [];
- this.rows.forEach(row => {
- this.rowToString(row, lines);
- });
- // don't display any lines with the
- // hidden flag set.
- return lines
- .filter(line => !line.hidden)
- .map(line => line.text)
- .join('\n');
- }
- rowToString(row, lines) {
- this.rasterize(row).forEach((rrow, r) => {
- let str = '';
- rrow.forEach((col, c) => {
- const { width } = row[c]; // the width with padding.
- const wrapWidth = this.negatePadding(row[c]); // the width without padding.
- let ts = col; // temporary string used during alignment/padding.
- if (wrapWidth > mixin.stringWidth(col)) {
- ts += ' '.repeat(wrapWidth - mixin.stringWidth(col));
- }
- // align the string within its column.
- if (row[c].align && row[c].align !== 'left' && this.wrap) {
- const fn = align[row[c].align];
- ts = fn(ts, wrapWidth);
- if (mixin.stringWidth(ts) < wrapWidth) {
- ts += ' '.repeat((width || 0) - mixin.stringWidth(ts) - 1);
- }
- }
- // apply border and padding to string.
- const padding = row[c].padding || [0, 0, 0, 0];
- if (padding[left]) {
- str += ' '.repeat(padding[left]);
- }
- str += addBorder(row[c], ts, '| ');
- str += ts;
- str += addBorder(row[c], ts, ' |');
- if (padding[right]) {
- str += ' '.repeat(padding[right]);
- }
- // if prior row is span, try to render the
- // current row on the prior line.
- if (r === 0 && lines.length > 0) {
- str = this.renderInline(str, lines[lines.length - 1]);
- }
- });
- // remove trailing whitespace.
- lines.push({
- text: str.replace(/ +$/, ''),
- span: row.span
- });
- });
- return lines;
- }
- // if the full 'source' can render in
- // the target line, do so.
- renderInline(source, previousLine) {
- const match = source.match(/^ */);
- const leadingWhitespace = match ? match[0].length : 0;
- const target = previousLine.text;
- const targetTextWidth = mixin.stringWidth(target.trimRight());
- if (!previousLine.span) {
- return source;
- }
- // if we're not applying wrapping logic,
- // just always append to the span.
- if (!this.wrap) {
- previousLine.hidden = true;
- return target + source;
- }
- if (leadingWhitespace < targetTextWidth) {
- return source;
- }
- previousLine.hidden = true;
- return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft();
- }
- rasterize(row) {
- const rrows = [];
- const widths = this.columnWidths(row);
- let wrapped;
- // word wrap all columns, and create
- // a data-structure that is easy to rasterize.
- row.forEach((col, c) => {
- // leave room for left and right padding.
- col.width = widths[c];
- if (this.wrap) {
- wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n');
- }
- else {
- wrapped = col.text.split('\n');
- }
- if (col.border) {
- wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.');
- wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'");
- }
- // add top and bottom padding.
- if (col.padding) {
- wrapped.unshift(...new Array(col.padding[top] || 0).fill(''));
- wrapped.push(...new Array(col.padding[bottom] || 0).fill(''));
- }
- wrapped.forEach((str, r) => {
- if (!rrows[r]) {
- rrows.push([]);
- }
- const rrow = rrows[r];
- for (let i = 0; i < c; i++) {
- if (rrow[i] === undefined) {
- rrow.push('');
- }
- }
- rrow.push(str);
- });
- });
- return rrows;
- }
- negatePadding(col) {
- let wrapWidth = col.width || 0;
- if (col.padding) {
- wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0);
- }
- if (col.border) {
- wrapWidth -= 4;
- }
- return wrapWidth;
- }
- columnWidths(row) {
- if (!this.wrap) {
- return row.map(col => {
- return col.width || mixin.stringWidth(col.text);
- });
- }
- let unset = row.length;
- let remainingWidth = this.width;
- // column widths can be set in config.
- const widths = row.map(col => {
- if (col.width) {
- unset--;
- remainingWidth -= col.width;
- return col.width;
- }
- return undefined;
- });
- // any unset widths should be calculated.
- const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0;
- return widths.map((w, i) => {
- if (w === undefined) {
- return Math.max(unsetWidth, _minWidth(row[i]));
- }
- return w;
- });
- }
-}
-function addBorder(col, ts, style) {
- if (col.border) {
- if (/[.']-+[.']/.test(ts)) {
- return '';
- }
- if (ts.trim().length !== 0) {
- return style;
- }
- return ' ';
- }
- return '';
-}
-// calculates the minimum width of
-// a column, based on padding preferences.
-function _minWidth(col) {
- const padding = col.padding || [];
- const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0);
- if (col.border) {
- return minWidth + 4;
- }
- return minWidth;
-}
-function getWindowWidth() {
- /* istanbul ignore next: depends on terminal */
- if (typeof process === 'object' && process.stdout && process.stdout.columns) {
- return process.stdout.columns;
- }
- return 80;
-}
-function alignRight(str, width) {
- str = str.trim();
- const strWidth = mixin.stringWidth(str);
- if (strWidth < width) {
- return ' '.repeat(width - strWidth) + str;
- }
- return str;
-}
-function alignCenter(str, width) {
- str = str.trim();
- const strWidth = mixin.stringWidth(str);
- /* istanbul ignore next */
- if (strWidth >= width) {
- return str;
- }
- return ' '.repeat((width - strWidth) >> 1) + str;
-}
-let mixin;
-export function cliui(opts, _mixin) {
- mixin = _mixin;
- return new UI({
- width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(),
- wrap: opts === null || opts === void 0 ? void 0 : opts.wrap
- });
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/build/lib/string-utils.js b/node_modules/@puppeteer/replay/node_modules/cliui/build/lib/string-utils.js
deleted file mode 100644
index 4b87453..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/build/lib/string-utils.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// Minimal replacement for ansi string helpers "wrap-ansi" and "strip-ansi".
-// to facilitate ESM and Deno modules.
-// TODO: look at porting https://www.npmjs.com/package/wrap-ansi to ESM.
-// The npm application
-// Copyright (c) npm, Inc. and Contributors
-// Licensed on the terms of The Artistic License 2.0
-// See: https://github.com/npm/cli/blob/4c65cd952bc8627811735bea76b9b110cc4fc80e/lib/utils/ansi-trim.js
-const ansi = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' +
- '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g');
-export function stripAnsi(str) {
- return str.replace(ansi, '');
-}
-export function wrap(str, width) {
- const [start, end] = str.match(ansi) || ['', ''];
- str = stripAnsi(str);
- let wrapped = '';
- for (let i = 0; i < str.length; i++) {
- if (i !== 0 && (i % width) === 0) {
- wrapped += '\n';
- }
- wrapped += str.charAt(i);
- }
- if (start && end) {
- wrapped = `${start}${wrapped}${end}`;
- }
- return wrapped;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/index.mjs b/node_modules/@puppeteer/replay/node_modules/cliui/index.mjs
deleted file mode 100644
index bc7a022..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/index.mjs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Bootstrap cliui with CommonJS dependencies:
-import { cliui } from './build/lib/index.js'
-import { wrap, stripAnsi } from './build/lib/string-utils.js'
-
-export default function ui (opts) {
- return cliui(opts, {
- stringWidth: (str) => {
- return [...str].length
- },
- stripAnsi,
- wrap
- })
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/cliui/package.json b/node_modules/@puppeteer/replay/node_modules/cliui/package.json
deleted file mode 100644
index eab6bf4..0000000
--- a/node_modules/@puppeteer/replay/node_modules/cliui/package.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "name": "cliui",
- "version": "8.0.1",
- "description": "easily create complex multi-column command-line-interfaces",
- "main": "build/index.cjs",
- "exports": {
- ".": [
- {
- "import": "./index.mjs",
- "require": "./build/index.cjs"
- },
- "./build/index.cjs"
- ]
- },
- "type": "module",
- "module": "./index.mjs",
- "scripts": {
- "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'",
- "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'",
- "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs",
- "test": "c8 mocha ./test/*.cjs",
- "test:esm": "c8 mocha ./test/esm/cliui-test.mjs",
- "postest": "check",
- "coverage": "c8 report --check-coverage",
- "precompile": "rimraf build",
- "compile": "tsc",
- "postcompile": "npm run build:cjs",
- "build:cjs": "rollup -c",
- "prepare": "npm run compile"
- },
- "repository": "yargs/cliui",
- "standard": {
- "ignore": [
- "**/example/**"
- ],
- "globals": [
- "it"
- ]
- },
- "keywords": [
- "cli",
- "command-line",
- "layout",
- "design",
- "console",
- "wrap",
- "table"
- ],
- "author": "Ben Coe <[email protected]>",
- "license": "ISC",
- "dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.1",
- "wrap-ansi": "^7.0.0"
- },
- "devDependencies": {
- "@types/node": "^14.0.27",
- "@typescript-eslint/eslint-plugin": "^4.0.0",
- "@typescript-eslint/parser": "^4.0.0",
- "c8": "^7.3.0",
- "chai": "^4.2.0",
- "chalk": "^4.1.0",
- "cross-env": "^7.0.2",
- "eslint": "^7.6.0",
- "eslint-plugin-import": "^2.22.0",
- "eslint-plugin-node": "^11.1.0",
- "gts": "^3.0.0",
- "mocha": "^10.0.0",
- "rimraf": "^3.0.2",
- "rollup": "^2.23.1",
- "rollup-plugin-ts": "^3.0.2",
- "standardx": "^7.0.0",
- "typescript": "^4.0.0"
- },
- "files": [
- "build",
- "index.mjs",
- "!*.d.ts"
- ],
- "engines": {
- "node": ">=12"
- }
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/strip-ansi/index.d.ts b/node_modules/@puppeteer/replay/node_modules/strip-ansi/index.d.ts
deleted file mode 100644
index 907fccc..0000000
--- a/node_modules/@puppeteer/replay/node_modules/strip-ansi/index.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
-Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
-
-@example
-```
-import stripAnsi = require('strip-ansi');
-
-stripAnsi('\u001B[4mUnicorn\u001B[0m');
-//=> 'Unicorn'
-
-stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
-//=> 'Click'
-```
-*/
-declare function stripAnsi(string: string): string;
-
-export = stripAnsi;
diff --git a/node_modules/@puppeteer/replay/node_modules/strip-ansi/index.js b/node_modules/@puppeteer/replay/node_modules/strip-ansi/index.js
deleted file mode 100644
index 9a593df..0000000
--- a/node_modules/@puppeteer/replay/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-const ansiRegex = require('ansi-regex');
-
-module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
diff --git a/node_modules/@puppeteer/replay/node_modules/strip-ansi/license b/node_modules/@puppeteer/replay/node_modules/strip-ansi/license
deleted file mode 100644
index e7af2f7..0000000
--- a/node_modules/@puppeteer/replay/node_modules/strip-ansi/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@puppeteer/replay/node_modules/strip-ansi/package.json b/node_modules/@puppeteer/replay/node_modules/strip-ansi/package.json
deleted file mode 100644
index daafb34..0000000
--- a/node_modules/@puppeteer/replay/node_modules/strip-ansi/package.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "name": "strip-ansi",
- "version": "6.0.1",
- "description": "Strip ANSI escape codes from a string",
- "license": "MIT",
- "repository": "chalk/strip-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "[email protected]",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=8"
- },
- "scripts": {
- "test": "xo && ava && tsd"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "keywords": [
- "strip",
- "trim",
- "remove",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "devDependencies": {
- "ava": "^2.4.0",
- "tsd": "^0.10.0",
- "xo": "^0.25.3"
- }
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/strip-ansi/readme.md b/node_modules/@puppeteer/replay/node_modules/strip-ansi/readme.md
deleted file mode 100644
index 7c4b56d..0000000
--- a/node_modules/@puppeteer/replay/node_modules/strip-ansi/readme.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# strip-ansi [](https://travis-ci.org/chalk/strip-ansi)
-
-> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
-
-
-## Install
-
-```
-$ npm install strip-ansi
-```
-
-
-## Usage
-
-```js
-const stripAnsi = require('strip-ansi');
-
-stripAnsi('\u001B[4mUnicorn\u001B[0m');
-//=> 'Unicorn'
-
-stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
-//=> 'Click'
-```
-
-
-## strip-ansi for enterprise
-
-Available as part of the Tidelift Subscription.
-
-The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
-
-
-## Related
-
-- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
-- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module
-- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
-- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
-- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
-
-
-## Maintainers
-
-- [Sindre Sorhus](https://github.com/sindresorhus)
-- [Josh Junon](https://github.com/qix-)
-
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/CHANGELOG.md b/node_modules/@puppeteer/replay/node_modules/yargs-parser/CHANGELOG.md
deleted file mode 100644
index 584eb86..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/CHANGELOG.md
+++ /dev/null
@@ -1,308 +0,0 @@
-# Changelog
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-## [21.1.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.1.0...yargs-parser-v21.1.1) (2022-08-04)
-
-
-### Bug Fixes
-
-* **typescript:** ignore .cts files during publish ([#454](https://github.com/yargs/yargs-parser/issues/454)) ([d69f9c3](https://github.com/yargs/yargs-parser/commit/d69f9c3a91c3ad2f9494d0a94e29a8b76c41b81b)), closes [#452](https://github.com/yargs/yargs-parser/issues/452)
-
-## [21.1.0](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.1...yargs-parser-v21.1.0) (2022-08-03)
-
-
-### Features
-
-* allow the browser build to be imported ([#443](https://github.com/yargs/yargs-parser/issues/443)) ([a89259f](https://github.com/yargs/yargs-parser/commit/a89259ff41d6f5312b3ce8a30bef343a993f395a))
-
-
-### Bug Fixes
-
-* **halt-at-non-option:** prevent known args from being parsed when "unknown-options-as-args" is enabled ([#438](https://github.com/yargs/yargs-parser/issues/438)) ([c474bc1](https://github.com/yargs/yargs-parser/commit/c474bc10c3aa0ae864b95e5722730114ef15f573))
-* node version check now uses process.versions.node ([#450](https://github.com/yargs/yargs-parser/issues/450)) ([d07bcdb](https://github.com/yargs/yargs-parser/commit/d07bcdbe43075f7201fbe8a08e491217247fe1f1))
-* parse options ending with 3+ hyphens ([#434](https://github.com/yargs/yargs-parser/issues/434)) ([4f1060b](https://github.com/yargs/yargs-parser/commit/4f1060b50759fadbac3315c5117b0c3d65b0a7d8))
-
-### [21.0.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.0...yargs-parser-v21.0.1) (2022-02-27)
-
-
-### Bug Fixes
-
-* return deno env object ([#432](https://github.com/yargs/yargs-parser/issues/432)) ([b00eb87](https://github.com/yargs/yargs-parser/commit/b00eb87b4860a890dd2dab0d6058241bbfd2b3ec))
-
-## [21.0.0](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.9...yargs-parser-v21.0.0) (2021-11-15)
-
-
-### ⚠ BREAKING CHANGES
-
-* drops support for 10 (#421)
-
-### Bug Fixes
-
-* esm json import ([#416](https://www.github.com/yargs/yargs-parser/issues/416)) ([90f970a](https://www.github.com/yargs/yargs-parser/commit/90f970a6482dd4f5b5eb18d38596dd6f02d73edf))
-* parser should preserve inner quotes ([#407](https://www.github.com/yargs/yargs-parser/issues/407)) ([ae11f49](https://www.github.com/yargs/yargs-parser/commit/ae11f496a8318ea8885aa25015d429b33713c314))
-
-
-### Code Refactoring
-
-* drops support for 10 ([#421](https://www.github.com/yargs/yargs-parser/issues/421)) ([3aaf878](https://www.github.com/yargs/yargs-parser/commit/3aaf8784f5c7f2aec6108c1c6a55537fa7e3b5c1))
-
-### [20.2.9](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.8...yargs-parser-v20.2.9) (2021-06-20)
-
-
-### Bug Fixes
-
-* **build:** fixed automated release pipeline ([1fe9135](https://www.github.com/yargs/yargs-parser/commit/1fe9135884790a083615419b2861683e2597dac3))
-
-### [20.2.8](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.7...yargs-parser-v20.2.8) (2021-06-20)
-
-
-### Bug Fixes
-
-* **locale:** Turkish camelize and decamelize issues with toLocaleLowerCase/toLocaleUpperCase ([2617303](https://www.github.com/yargs/yargs-parser/commit/261730383e02448562f737b94bbd1f164aed5143))
-* **perf:** address slow parse when using unknown-options-as-args ([#394](https://www.github.com/yargs/yargs-parser/issues/394)) ([441f059](https://www.github.com/yargs/yargs-parser/commit/441f059d585d446551068ad213db79ac91daf83a))
-* **string-utils:** detect [0,1] ranged values as numbers ([#388](https://www.github.com/yargs/yargs-parser/issues/388)) ([efcc32c](https://www.github.com/yargs/yargs-parser/commit/efcc32c2d6b09aba31abfa2db9bd947befe5586b))
-
-### [20.2.7](https://www.github.com/yargs/yargs-parser/compare/v20.2.6...v20.2.7) (2021-03-10)
-
-
-### Bug Fixes
-
-* **deno:** force release for Deno ([6687c97](https://www.github.com/yargs/yargs-parser/commit/6687c972d0f3ca7865a97908dde3080b05f8b026))
-
-### [20.2.6](https://www.github.com/yargs/yargs-parser/compare/v20.2.5...v20.2.6) (2021-02-22)
-
-
-### Bug Fixes
-
-* **populate--:** -- should always be array ([#354](https://www.github.com/yargs/yargs-parser/issues/354)) ([585ae8f](https://www.github.com/yargs/yargs-parser/commit/585ae8ffad74cc02974f92d788e750137fd65146))
-
-### [20.2.5](https://www.github.com/yargs/yargs-parser/compare/v20.2.4...v20.2.5) (2021-02-13)
-
-
-### Bug Fixes
-
-* do not lowercase camel cased string ([#348](https://www.github.com/yargs/yargs-parser/issues/348)) ([5f4da1f](https://www.github.com/yargs/yargs-parser/commit/5f4da1f17d9d50542d2aaa206c9806ce3e320335))
-
-### [20.2.4](https://www.github.com/yargs/yargs-parser/compare/v20.2.3...v20.2.4) (2020-11-09)
-
-
-### Bug Fixes
-
-* **deno:** address import issues in Deno ([#339](https://www.github.com/yargs/yargs-parser/issues/339)) ([3b54e5e](https://www.github.com/yargs/yargs-parser/commit/3b54e5eef6e9a7b7c6eec7c12bab3ba3b8ba8306))
-
-### [20.2.3](https://www.github.com/yargs/yargs-parser/compare/v20.2.2...v20.2.3) (2020-10-16)
-
-
-### Bug Fixes
-
-* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#336](https://www.github.com/yargs/yargs-parser/issues/336)) ([3ae7242](https://www.github.com/yargs/yargs-parser/commit/3ae7242040ff876d28dabded60ac226e00150c88))
-
-### [20.2.2](https://www.github.com/yargs/yargs-parser/compare/v20.2.1...v20.2.2) (2020-10-14)
-
-
-### Bug Fixes
-
-* **exports:** node 13.0-13.6 require a string fallback ([#333](https://www.github.com/yargs/yargs-parser/issues/333)) ([291aeda](https://www.github.com/yargs/yargs-parser/commit/291aeda06b685b7a015d83bdf2558e180b37388d))
-
-### [20.2.1](https://www.github.com/yargs/yargs-parser/compare/v20.2.0...v20.2.1) (2020-10-01)
-
-
-### Bug Fixes
-
-* **deno:** update types for deno ^1.4.0 ([#330](https://www.github.com/yargs/yargs-parser/issues/330)) ([0ab92e5](https://www.github.com/yargs/yargs-parser/commit/0ab92e50b090f11196334c048c9c92cecaddaf56))
-
-## [20.2.0](https://www.github.com/yargs/yargs-parser/compare/v20.1.0...v20.2.0) (2020-09-21)
-
-
-### Features
-
-* **string-utils:** export looksLikeNumber helper ([#324](https://www.github.com/yargs/yargs-parser/issues/324)) ([c8580a2](https://www.github.com/yargs/yargs-parser/commit/c8580a2327b55f6342acecb6e72b62963d506750))
-
-
-### Bug Fixes
-
-* **unknown-options-as-args:** convert positionals that look like numbers ([#326](https://www.github.com/yargs/yargs-parser/issues/326)) ([f85ebb4](https://www.github.com/yargs/yargs-parser/commit/f85ebb4face9d4b0f56147659404cbe0002f3dad))
-
-## [20.1.0](https://www.github.com/yargs/yargs-parser/compare/v20.0.0...v20.1.0) (2020-09-20)
-
-
-### Features
-
-* adds parse-positional-numbers configuration ([#321](https://www.github.com/yargs/yargs-parser/issues/321)) ([9cec00a](https://www.github.com/yargs/yargs-parser/commit/9cec00a622251292ffb7dce6f78f5353afaa0d4c))
-
-
-### Bug Fixes
-
-* **build:** update release-please; make labels kick off builds ([#323](https://www.github.com/yargs/yargs-parser/issues/323)) ([09f448b](https://www.github.com/yargs/yargs-parser/commit/09f448b4cd66e25d2872544718df46dab8af062a))
-
-## [20.0.0](https://www.github.com/yargs/yargs-parser/compare/v19.0.4...v20.0.0) (2020-09-09)
-
-
-### ⚠ BREAKING CHANGES
-
-* do not ship type definitions (#318)
-
-### Bug Fixes
-
-* only strip camel case if hyphenated ([#316](https://www.github.com/yargs/yargs-parser/issues/316)) ([95a9e78](https://www.github.com/yargs/yargs-parser/commit/95a9e785127b9bbf2d1db1f1f808ca1fb100e82a)), closes [#315](https://www.github.com/yargs/yargs-parser/issues/315)
-
-
-### Code Refactoring
-
-* do not ship type definitions ([#318](https://www.github.com/yargs/yargs-parser/issues/318)) ([8fbd56f](https://www.github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330))
-
-### [19.0.4](https://www.github.com/yargs/yargs-parser/compare/v19.0.3...v19.0.4) (2020-08-27)
-
-
-### Bug Fixes
-
-* **build:** fixing publication ([#310](https://www.github.com/yargs/yargs-parser/issues/310)) ([5d3c6c2](https://www.github.com/yargs/yargs-parser/commit/5d3c6c29a9126248ba601920d9cf87c78e161ff5))
-
-### [19.0.3](https://www.github.com/yargs/yargs-parser/compare/v19.0.2...v19.0.3) (2020-08-27)
-
-
-### Bug Fixes
-
-* **build:** switch to action for publish ([#308](https://www.github.com/yargs/yargs-parser/issues/308)) ([5c2f305](https://www.github.com/yargs/yargs-parser/commit/5c2f30585342bcd8aaf926407c863099d256d174))
-
-### [19.0.2](https://www.github.com/yargs/yargs-parser/compare/v19.0.1...v19.0.2) (2020-08-27)
-
-
-### Bug Fixes
-
-* **types:** envPrefix should be optional ([#305](https://www.github.com/yargs/yargs-parser/issues/305)) ([ae3f180](https://www.github.com/yargs/yargs-parser/commit/ae3f180e14df2de2fd962145f4518f9aa0e76523))
-
-### [19.0.1](https://www.github.com/yargs/yargs-parser/compare/v19.0.0...v19.0.1) (2020-08-09)
-
-
-### Bug Fixes
-
-* **build:** push tag created for deno ([2186a14](https://www.github.com/yargs/yargs-parser/commit/2186a14989749887d56189867602e39e6679f8b0))
-
-## [19.0.0](https://www.github.com/yargs/yargs-parser/compare/v18.1.3...v19.0.0) (2020-08-09)
-
-
-### ⚠ BREAKING CHANGES
-
-* adds support for ESM and Deno (#295)
-* **ts:** projects using `@types/yargs-parser` may see variations in type definitions.
-* drops Node 6. begin following Node.js LTS schedule (#278)
-
-### Features
-
-* adds support for ESM and Deno ([#295](https://www.github.com/yargs/yargs-parser/issues/295)) ([195bc4a](https://www.github.com/yargs/yargs-parser/commit/195bc4a7f20c2a8f8e33fbb6ba96ef6e9a0120a1))
-* expose camelCase and decamelize helpers ([#296](https://www.github.com/yargs/yargs-parser/issues/296)) ([39154ce](https://www.github.com/yargs/yargs-parser/commit/39154ceb5bdcf76b5f59a9219b34cedb79b67f26))
-* **deps:** update to latest camelcase/decamelize ([#281](https://www.github.com/yargs/yargs-parser/issues/281)) ([8931ab0](https://www.github.com/yargs/yargs-parser/commit/8931ab08f686cc55286f33a95a83537da2be5516))
-
-
-### Bug Fixes
-
-* boolean numeric short option ([#294](https://www.github.com/yargs/yargs-parser/issues/294)) ([f600082](https://www.github.com/yargs/yargs-parser/commit/f600082c959e092076caf420bbbc9d7a231e2418))
-* raise permission error for Deno if config load fails ([#298](https://www.github.com/yargs/yargs-parser/issues/298)) ([1174e2b](https://www.github.com/yargs/yargs-parser/commit/1174e2b3f0c845a1cd64e14ffc3703e730567a84))
-* **deps:** update dependency decamelize to v3 ([#274](https://www.github.com/yargs/yargs-parser/issues/274)) ([4d98698](https://www.github.com/yargs/yargs-parser/commit/4d98698bc6767e84ec54a0842908191739be73b7))
-* **types:** switch back to using Partial types ([#293](https://www.github.com/yargs/yargs-parser/issues/293)) ([bdc80ba](https://www.github.com/yargs/yargs-parser/commit/bdc80ba59fa13bc3025ce0a85e8bad9f9da24ea7))
-
-
-### Build System
-
-* drops Node 6. begin following Node.js LTS schedule ([#278](https://www.github.com/yargs/yargs-parser/issues/278)) ([9014ed7](https://www.github.com/yargs/yargs-parser/commit/9014ed722a32768b96b829e65a31705db5c1458a))
-
-
-### Code Refactoring
-
-* **ts:** move index.js to TypeScript ([#292](https://www.github.com/yargs/yargs-parser/issues/292)) ([f78d2b9](https://www.github.com/yargs/yargs-parser/commit/f78d2b97567ac4828624406e420b4047c710b789))
-
-### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16)
-
-
-### Bug Fixes
-
-* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e))
-
-### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26)
-
-
-### Bug Fixes
-
-* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13))
-
-### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16)
-
-
-### Bug Fixes
-
-* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential
-prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2))
-
-## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07)
-
-
-### Features
-
-* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f))
-
-## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02)
-
-
-### ⚠ BREAKING CHANGES
-
-* the narg count is now enforced when parsing arrays.
-
-### Features
-
-* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c))
-
-## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01)
-
-
-### Features
-
-* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb))
-
-### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29)
-
-
-### Bug Fixes
-
-* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba))
-
-## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10)
-
-
-### ⚠ BREAKING CHANGES
-
-* this reverts parsing behavior of booleans to that of yargs@14
-* objects used during parsing are now created with a null
-prototype. There may be some scenarios where this change in behavior
-leaks externally.
-
-### Features
-
-* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5))
-* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732))
-
-
-### Bug Fixes
-
-* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346))
-* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c))
-* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de))
-* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5))
-
-## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01)
-
-
-### ⚠ BREAKING CHANGES
-
-* populate error if incompatible narg/count or array/count options are used (#191)
-
-### Features
-
-* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0))
-* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9))
-
-
-### Reverts
-
-* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf))
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/LICENSE.txt b/node_modules/@puppeteer/replay/node_modules/yargs-parser/LICENSE.txt
deleted file mode 100644
index 836440b..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/LICENSE.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2016, Contributors
-
-Permission to use, copy, modify, and/or distribute this software
-for any purpose with or without fee is hereby granted, provided
-that the above copyright notice and this permission notice
-appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
-LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
-OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/README.md b/node_modules/@puppeteer/replay/node_modules/yargs-parser/README.md
deleted file mode 100644
index 2614840..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/README.md
+++ /dev/null
@@ -1,518 +0,0 @@
-# yargs-parser
-
-
-[](https://www.npmjs.com/package/yargs-parser)
-[](https://conventionalcommits.org)
-
-
-The mighty option parser used by [yargs](https://github.com/yargs/yargs).
-
-visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions.
-
-<img width="250" src="https://raw.githubusercontent.com/yargs/yargs-parser/main/yargs-logo.png">
-
-## Example
-
-```sh
-npm i yargs-parser --save
-```
-
-```js
-const argv = require('yargs-parser')(process.argv.slice(2))
-console.log(argv)
-```
-
-```console
-$ node example.js --foo=33 --bar hello
-{ _: [], foo: 33, bar: 'hello' }
-```
-
-_or parse a string!_
-
-```js
-const argv = require('yargs-parser')('--foo=99 --bar=33')
-console.log(argv)
-```
-
-```console
-{ _: [], foo: 99, bar: 33 }
-```
-
-Convert an array of mixed types before passing to `yargs-parser`:
-
-```js
-const parse = require('yargs-parser')
-parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string
-parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings
-```
-
-## Deno Example
-
-As of `v19` `yargs-parser` supports [Deno](https://github.com/denoland/deno):
-
-```typescript
-import parser from "https://deno.land/x/yargs_parser/deno.ts";
-
-const argv = parser('--foo=99 --bar=9987930', {
- string: ['bar']
-})
-console.log(argv)
-```
-
-## ESM Example
-
-As of `v19` `yargs-parser` supports ESM (_both in Node.js and in the browser_):
-
-**Node.js:**
-
-```js
-import parser from 'yargs-parser'
-
-const argv = parser('--foo=99 --bar=9987930', {
- string: ['bar']
-})
-console.log(argv)
-```
-
-**Browsers:**
-
-```html
-<!doctype html>
-<body>
- <script type="module">
- import parser from "https://unpkg.com/[email protected]/browser.js";
-
- const argv = parser('--foo=99 --bar=9987930', {
- string: ['bar']
- })
- console.log(argv)
- </script>
-</body>
-```
-
-## API
-
-### parser(args, opts={})
-
-Parses command line arguments returning a simple mapping of keys and values.
-
-**expects:**
-
-* `args`: a string or array of strings representing the options to parse.
-* `opts`: provide a set of hints indicating how `args` should be parsed:
- * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`.
- * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.<br>
- Indicate that keys should be parsed as an array and coerced to booleans / numbers:<br>
- `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`.
- * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`.
- * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided
- (or throws an error). For arrays the function is called only once for the entire array:<br>
- `{coerce: {foo: function (arg) {return modifiedArg}}}`.
- * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed).
- * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:<br>
- `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`.
- * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)).
- * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`.
- * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`.
- * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed.
- * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`.
- * `opts.normalize`: `path.normalize()` will be applied to values set to this key.
- * `opts.number`: keys should be treated as numbers.
- * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`).
-
-**returns:**
-
-* `obj`: an object representing the parsed value of `args`
- * `key/value`: key value pairs for each argument and their aliases.
- * `_`: an array representing the positional arguments.
- * [optional] `--`: an array with arguments after the end-of-options flag `--`.
-
-### require('yargs-parser').detailed(args, opts={})
-
-Parses a command line string, returning detailed information required by the
-yargs engine.
-
-**expects:**
-
-* `args`: a string or array of strings representing options to parse.
-* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`.
-
-**returns:**
-
-* `argv`: an object representing the parsed value of `args`
- * `key/value`: key value pairs for each argument and their aliases.
- * `_`: an array representing the positional arguments.
- * [optional] `--`: an array with arguments after the end-of-options flag `--`.
-* `error`: populated with an error object if an exception occurred during parsing.
-* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`.
-* `newAliases`: any new aliases added via camel-case expansion:
- * `boolean`: `{ fooBar: true }`
-* `defaulted`: any new argument created by `opts.default`, no aliases included.
- * `boolean`: `{ foo: true }`
-* `configuration`: given by default settings and `opts.configuration`.
-
-<a name="configuration"></a>
-
-### Configuration
-
-The yargs-parser applies several automated transformations on the keys provided
-in `args`. These features can be turned on and off using the `configuration` field
-of `opts`.
-
-```js
-var parsed = parser(['--no-dice'], {
- configuration: {
- 'boolean-negation': false
- }
-})
-```
-
-### short option groups
-
-* default: `true`.
-* key: `short-option-groups`.
-
-Should a group of short-options be treated as boolean flags?
-
-```console
-$ node example.js -abc
-{ _: [], a: true, b: true, c: true }
-```
-
-_if disabled:_
-
-```console
-$ node example.js -abc
-{ _: [], abc: true }
-```
-
-### camel-case expansion
-
-* default: `true`.
-* key: `camel-case-expansion`.
-
-Should hyphenated arguments be expanded into camel-case aliases?
-
-```console
-$ node example.js --foo-bar
-{ _: [], 'foo-bar': true, fooBar: true }
-```
-
-_if disabled:_
-
-```console
-$ node example.js --foo-bar
-{ _: [], 'foo-bar': true }
-```
-
-### dot-notation
-
-* default: `true`
-* key: `dot-notation`
-
-Should keys that contain `.` be treated as objects?
-
-```console
-$ node example.js --foo.bar
-{ _: [], foo: { bar: true } }
-```
-
-_if disabled:_
-
-```console
-$ node example.js --foo.bar
-{ _: [], "foo.bar": true }
-```
-
-### parse numbers
-
-* default: `true`
-* key: `parse-numbers`
-
-Should keys that look like numbers be treated as such?
-
-```console
-$ node example.js --foo=99.3
-{ _: [], foo: 99.3 }
-```
-
-_if disabled:_
-
-```console
-$ node example.js --foo=99.3
-{ _: [], foo: "99.3" }
-```
-
-### parse positional numbers
-
-* default: `true`
-* key: `parse-positional-numbers`
-
-Should positional keys that look like numbers be treated as such.
-
-```console
-$ node example.js 99.3
-{ _: [99.3] }
-```
-
-_if disabled:_
-
-```console
-$ node example.js 99.3
-{ _: ['99.3'] }
-```
-
-### boolean negation
-
-* default: `true`
-* key: `boolean-negation`
-
-Should variables prefixed with `--no` be treated as negations?
-
-```console
-$ node example.js --no-foo
-{ _: [], foo: false }
-```
-
-_if disabled:_
-
-```console
-$ node example.js --no-foo
-{ _: [], "no-foo": true }
-```
-
-### combine arrays
-
-* default: `false`
-* key: `combine-arrays`
-
-Should arrays be combined when provided by both command line arguments and
-a configuration file.
-
-### duplicate arguments array
-
-* default: `true`
-* key: `duplicate-arguments-array`
-
-Should arguments be coerced into an array when duplicated:
-
-```console
-$ node example.js -x 1 -x 2
-{ _: [], x: [1, 2] }
-```
-
-_if disabled:_
-
-```console
-$ node example.js -x 1 -x 2
-{ _: [], x: 2 }
-```
-
-### flatten duplicate arrays
-
-* default: `true`
-* key: `flatten-duplicate-arrays`
-
-Should array arguments be coerced into a single array when duplicated:
-
-```console
-$ node example.js -x 1 2 -x 3 4
-{ _: [], x: [1, 2, 3, 4] }
-```
-
-_if disabled:_
-
-```console
-$ node example.js -x 1 2 -x 3 4
-{ _: [], x: [[1, 2], [3, 4]] }
-```
-
-### greedy arrays
-
-* default: `true`
-* key: `greedy-arrays`
-
-Should arrays consume more than one positional argument following their flag.
-
-```console
-$ node example --arr 1 2
-{ _: [], arr: [1, 2] }
-```
-
-_if disabled:_
-
-```console
-$ node example --arr 1 2
-{ _: [2], arr: [1] }
-```
-
-**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.**
-
-### nargs eats options
-
-* default: `false`
-* key: `nargs-eats-options`
-
-Should nargs consume dash options as well as positional arguments.
-
-### negation prefix
-
-* default: `no-`
-* key: `negation-prefix`
-
-The prefix to use for negated boolean variables.
-
-```console
-$ node example.js --no-foo
-{ _: [], foo: false }
-```
-
-_if set to `quux`:_
-
-```console
-$ node example.js --quuxfoo
-{ _: [], foo: false }
-```
-
-### populate --
-
-* default: `false`.
-* key: `populate--`
-
-Should unparsed flags be stored in `--` or `_`.
-
-_If disabled:_
-
-```console
-$ node example.js a -b -- x y
-{ _: [ 'a', 'x', 'y' ], b: true }
-```
-
-_If enabled:_
-
-```console
-$ node example.js a -b -- x y
-{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true }
-```
-
-### set placeholder key
-
-* default: `false`.
-* key: `set-placeholder-key`.
-
-Should a placeholder be added for keys not set via the corresponding CLI argument?
-
-_If disabled:_
-
-```console
-$ node example.js -a 1 -c 2
-{ _: [], a: 1, c: 2 }
-```
-
-_If enabled:_
-
-```console
-$ node example.js -a 1 -c 2
-{ _: [], a: 1, b: undefined, c: 2 }
-```
-
-### halt at non-option
-
-* default: `false`.
-* key: `halt-at-non-option`.
-
-Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line.
-
-_If disabled:_
-
-```console
-$ node example.js -a run b -x y
-{ _: [ 'b' ], a: 'run', x: 'y' }
-```
-
-_If enabled:_
-
-```console
-$ node example.js -a run b -x y
-{ _: [ 'b', '-x', 'y' ], a: 'run' }
-```
-
-### strip aliased
-
-* default: `false`
-* key: `strip-aliased`
-
-Should aliases be removed before returning results?
-
-_If disabled:_
-
-```console
-$ node example.js --test-field 1
-{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 }
-```
-
-_If enabled:_
-
-```console
-$ node example.js --test-field 1
-{ _: [], 'test-field': 1, testField: 1 }
-```
-
-### strip dashed
-
-* default: `false`
-* key: `strip-dashed`
-
-Should dashed keys be removed before returning results? This option has no effect if
-`camel-case-expansion` is disabled.
-
-_If disabled:_
-
-```console
-$ node example.js --test-field 1
-{ _: [], 'test-field': 1, testField: 1 }
-```
-
-_If enabled:_
-
-```console
-$ node example.js --test-field 1
-{ _: [], testField: 1 }
-```
-
-### unknown options as args
-
-* default: `false`
-* key: `unknown-options-as-args`
-
-Should unknown options be treated like regular arguments? An unknown option is one that is not
-configured in `opts`.
-
-_If disabled_
-
-```console
-$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2
-{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true }
-```
-
-_If enabled_
-
-```console
-$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2
-{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' }
-```
-
-## Supported Node.js Versions
-
-Libraries in this ecosystem make a best effort to track
-[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a
-post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
-
-## Special Thanks
-
-The yargs project evolves from optimist and minimist. It owes its
-existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/
-
-## License
-
-ISC
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/browser.js b/node_modules/@puppeteer/replay/node_modules/yargs-parser/browser.js
deleted file mode 100644
index 241202c7..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/browser.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Main entrypoint for ESM web browser environments. Avoids using Node.js
-// specific libraries, such as "path".
-//
-// TODO: figure out reasonable web equivalents for "resolve", "normalize", etc.
-import { camelCase, decamelize, looksLikeNumber } from './build/lib/string-utils.js'
-import { YargsParser } from './build/lib/yargs-parser.js'
-const parser = new YargsParser({
- cwd: () => { return '' },
- format: (str, arg) => { return str.replace('%s', arg) },
- normalize: (str) => { return str },
- resolve: (str) => { return str },
- require: () => {
- throw Error('loading config from files not currently supported in browser')
- },
- env: () => {}
-})
-
-const yargsParser = function Parser (args, opts) {
- const result = parser.parse(args.slice(), opts)
- return result.argv
-}
-yargsParser.detailed = function (args, opts) {
- return parser.parse(args.slice(), opts)
-}
-yargsParser.camelCase = camelCase
-yargsParser.decamelize = decamelize
-yargsParser.looksLikeNumber = looksLikeNumber
-
-export default yargsParser
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/index.cjs b/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/index.cjs
deleted file mode 100644
index cf6f50f..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/index.cjs
+++ /dev/null
@@ -1,1050 +0,0 @@
-'use strict';
-
-var util = require('util');
-var path = require('path');
-var fs = require('fs');
-
-function camelCase(str) {
- const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
- if (!isCamelCase) {
- str = str.toLowerCase();
- }
- if (str.indexOf('-') === -1 && str.indexOf('_') === -1) {
- return str;
- }
- else {
- let camelcase = '';
- let nextChrUpper = false;
- const leadingHyphens = str.match(/^-+/);
- for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) {
- let chr = str.charAt(i);
- if (nextChrUpper) {
- nextChrUpper = false;
- chr = chr.toUpperCase();
- }
- if (i !== 0 && (chr === '-' || chr === '_')) {
- nextChrUpper = true;
- }
- else if (chr !== '-' && chr !== '_') {
- camelcase += chr;
- }
- }
- return camelcase;
- }
-}
-function decamelize(str, joinString) {
- const lowercase = str.toLowerCase();
- joinString = joinString || '-';
- let notCamelcase = '';
- for (let i = 0; i < str.length; i++) {
- const chrLower = lowercase.charAt(i);
- const chrString = str.charAt(i);
- if (chrLower !== chrString && i > 0) {
- notCamelcase += `${joinString}${lowercase.charAt(i)}`;
- }
- else {
- notCamelcase += chrString;
- }
- }
- return notCamelcase;
-}
-function looksLikeNumber(x) {
- if (x === null || x === undefined)
- return false;
- if (typeof x === 'number')
- return true;
- if (/^0x[0-9a-f]+$/i.test(x))
- return true;
- if (/^0[^.]/.test(x))
- return false;
- return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
-function tokenizeArgString(argString) {
- if (Array.isArray(argString)) {
- return argString.map(e => typeof e !== 'string' ? e + '' : e);
- }
- argString = argString.trim();
- let i = 0;
- let prevC = null;
- let c = null;
- let opening = null;
- const args = [];
- for (let ii = 0; ii < argString.length; ii++) {
- prevC = c;
- c = argString.charAt(ii);
- if (c === ' ' && !opening) {
- if (!(prevC === ' ')) {
- i++;
- }
- continue;
- }
- if (c === opening) {
- opening = null;
- }
- else if ((c === "'" || c === '"') && !opening) {
- opening = c;
- }
- if (!args[i])
- args[i] = '';
- args[i] += c;
- }
- return args;
-}
-
-var DefaultValuesForTypeKey;
-(function (DefaultValuesForTypeKey) {
- DefaultValuesForTypeKey["BOOLEAN"] = "boolean";
- DefaultValuesForTypeKey["STRING"] = "string";
- DefaultValuesForTypeKey["NUMBER"] = "number";
- DefaultValuesForTypeKey["ARRAY"] = "array";
-})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));
-
-let mixin;
-class YargsParser {
- constructor(_mixin) {
- mixin = _mixin;
- }
- parse(argsInput, options) {
- const opts = Object.assign({
- alias: undefined,
- array: undefined,
- boolean: undefined,
- config: undefined,
- configObjects: undefined,
- configuration: undefined,
- coerce: undefined,
- count: undefined,
- default: undefined,
- envPrefix: undefined,
- narg: undefined,
- normalize: undefined,
- string: undefined,
- number: undefined,
- __: undefined,
- key: undefined
- }, options);
- const args = tokenizeArgString(argsInput);
- const inputIsString = typeof argsInput === 'string';
- const aliases = combineAliases(Object.assign(Object.create(null), opts.alias));
- const configuration = Object.assign({
- 'boolean-negation': true,
- 'camel-case-expansion': true,
- 'combine-arrays': false,
- 'dot-notation': true,
- 'duplicate-arguments-array': true,
- 'flatten-duplicate-arrays': true,
- 'greedy-arrays': true,
- 'halt-at-non-option': false,
- 'nargs-eats-options': false,
- 'negation-prefix': 'no-',
- 'parse-numbers': true,
- 'parse-positional-numbers': true,
- 'populate--': false,
- 'set-placeholder-key': false,
- 'short-option-groups': true,
- 'strip-aliased': false,
- 'strip-dashed': false,
- 'unknown-options-as-args': false
- }, opts.configuration);
- const defaults = Object.assign(Object.create(null), opts.default);
- const configObjects = opts.configObjects || [];
- const envPrefix = opts.envPrefix;
- const notFlagsOption = configuration['populate--'];
- const notFlagsArgv = notFlagsOption ? '--' : '_';
- const newAliases = Object.create(null);
- const defaulted = Object.create(null);
- const __ = opts.__ || mixin.format;
- const flags = {
- aliases: Object.create(null),
- arrays: Object.create(null),
- bools: Object.create(null),
- strings: Object.create(null),
- numbers: Object.create(null),
- counts: Object.create(null),
- normalize: Object.create(null),
- configs: Object.create(null),
- nargs: Object.create(null),
- coercions: Object.create(null),
- keys: []
- };
- const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
- const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)');
- [].concat(opts.array || []).filter(Boolean).forEach(function (opt) {
- const key = typeof opt === 'object' ? opt.key : opt;
- const assignment = Object.keys(opt).map(function (key) {
- const arrayFlagKeys = {
- boolean: 'bools',
- string: 'strings',
- number: 'numbers'
- };
- return arrayFlagKeys[key];
- }).filter(Boolean).pop();
- if (assignment) {
- flags[assignment][key] = true;
- }
- flags.arrays[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.string || []).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.number || []).filter(Boolean).forEach(function (key) {
- flags.numbers[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.count || []).filter(Boolean).forEach(function (key) {
- flags.counts[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) {
- flags.normalize[key] = true;
- flags.keys.push(key);
- });
- if (typeof opts.narg === 'object') {
- Object.entries(opts.narg).forEach(([key, value]) => {
- if (typeof value === 'number') {
- flags.nargs[key] = value;
- flags.keys.push(key);
- }
- });
- }
- if (typeof opts.coerce === 'object') {
- Object.entries(opts.coerce).forEach(([key, value]) => {
- if (typeof value === 'function') {
- flags.coercions[key] = value;
- flags.keys.push(key);
- }
- });
- }
- if (typeof opts.config !== 'undefined') {
- if (Array.isArray(opts.config) || typeof opts.config === 'string') {
- [].concat(opts.config).filter(Boolean).forEach(function (key) {
- flags.configs[key] = true;
- });
- }
- else if (typeof opts.config === 'object') {
- Object.entries(opts.config).forEach(([key, value]) => {
- if (typeof value === 'boolean' || typeof value === 'function') {
- flags.configs[key] = value;
- }
- });
- }
- }
- extendAliases(opts.key, aliases, opts.default, flags.arrays);
- Object.keys(defaults).forEach(function (key) {
- (flags.aliases[key] || []).forEach(function (alias) {
- defaults[alias] = defaults[key];
- });
- });
- let error = null;
- checkConfiguration();
- let notFlags = [];
- const argv = Object.assign(Object.create(null), { _: [] });
- const argvReturn = {};
- for (let i = 0; i < args.length; i++) {
- const arg = args[i];
- const truncatedArg = arg.replace(/^-{3,}/, '---');
- let broken;
- let key;
- let letters;
- let m;
- let next;
- let value;
- if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
- pushPositional(arg);
- }
- else if (truncatedArg.match(/^---+(=|$)/)) {
- pushPositional(arg);
- continue;
- }
- else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) {
- m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
- if (m !== null && Array.isArray(m) && m.length >= 3) {
- if (checkAllAliases(m[1], flags.arrays)) {
- i = eatArray(i, m[1], args, m[2]);
- }
- else if (checkAllAliases(m[1], flags.nargs) !== false) {
- i = eatNargs(i, m[1], args, m[2]);
- }
- else {
- setArg(m[1], m[2], true);
- }
- }
- }
- else if (arg.match(negatedBoolean) && configuration['boolean-negation']) {
- m = arg.match(negatedBoolean);
- if (m !== null && Array.isArray(m) && m.length >= 2) {
- key = m[1];
- setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);
- }
- }
- else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) {
- m = arg.match(/^--?(.+)/);
- if (m !== null && Array.isArray(m) && m.length >= 2) {
- key = m[1];
- if (checkAllAliases(key, flags.arrays)) {
- i = eatArray(i, key, args);
- }
- else if (checkAllAliases(key, flags.nargs) !== false) {
- i = eatNargs(i, key, args);
- }
- else {
- next = args[i + 1];
- if (next !== undefined && (!next.match(/^-/) ||
- next.match(negative)) &&
- !checkAllAliases(key, flags.bools) &&
- !checkAllAliases(key, flags.counts)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next);
- i++;
- }
- else {
- setArg(key, defaultValue(key));
- }
- }
- }
- }
- else if (arg.match(/^-.\..+=/)) {
- m = arg.match(/^-([^=]+)=([\s\S]*)$/);
- if (m !== null && Array.isArray(m) && m.length >= 3) {
- setArg(m[1], m[2]);
- }
- }
- else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
- next = args[i + 1];
- m = arg.match(/^-(.\..+)/);
- if (m !== null && Array.isArray(m) && m.length >= 2) {
- key = m[1];
- if (next !== undefined && !next.match(/^-/) &&
- !checkAllAliases(key, flags.bools) &&
- !checkAllAliases(key, flags.counts)) {
- setArg(key, next);
- i++;
- }
- else {
- setArg(key, defaultValue(key));
- }
- }
- }
- else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
- letters = arg.slice(1, -1).split('');
- broken = false;
- for (let j = 0; j < letters.length; j++) {
- next = arg.slice(j + 2);
- if (letters[j + 1] && letters[j + 1] === '=') {
- value = arg.slice(j + 3);
- key = letters[j];
- if (checkAllAliases(key, flags.arrays)) {
- i = eatArray(i, key, args, value);
- }
- else if (checkAllAliases(key, flags.nargs) !== false) {
- i = eatNargs(i, key, args, value);
- }
- else {
- setArg(key, value);
- }
- broken = true;
- break;
- }
- if (next === '-') {
- setArg(letters[j], next);
- continue;
- }
- if (/[A-Za-z]/.test(letters[j]) &&
- /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) &&
- checkAllAliases(next, flags.bools) === false) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
- if (letters[j + 1] && letters[j + 1].match(/\W/)) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
- else {
- setArg(letters[j], defaultValue(letters[j]));
- }
- }
- key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (checkAllAliases(key, flags.arrays)) {
- i = eatArray(i, key, args);
- }
- else if (checkAllAliases(key, flags.nargs) !== false) {
- i = eatNargs(i, key, args);
- }
- else {
- next = args[i + 1];
- if (next !== undefined && (!/^(-|--)[^-]/.test(next) ||
- next.match(negative)) &&
- !checkAllAliases(key, flags.bools) &&
- !checkAllAliases(key, flags.counts)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next);
- i++;
- }
- else {
- setArg(key, defaultValue(key));
- }
- }
- }
- }
- else if (arg.match(/^-[0-9]$/) &&
- arg.match(negative) &&
- checkAllAliases(arg.slice(1), flags.bools)) {
- key = arg.slice(1);
- setArg(key, defaultValue(key));
- }
- else if (arg === '--') {
- notFlags = args.slice(i + 1);
- break;
- }
- else if (configuration['halt-at-non-option']) {
- notFlags = args.slice(i);
- break;
- }
- else {
- pushPositional(arg);
- }
- }
- applyEnvVars(argv, true);
- applyEnvVars(argv, false);
- setConfig(argv);
- setConfigObjects();
- applyDefaultsAndAliases(argv, flags.aliases, defaults, true);
- applyCoercions(argv);
- if (configuration['set-placeholder-key'])
- setPlaceholderKeys(argv);
- Object.keys(flags.counts).forEach(function (key) {
- if (!hasKey(argv, key.split('.')))
- setArg(key, 0);
- });
- if (notFlagsOption && notFlags.length)
- argv[notFlagsArgv] = [];
- notFlags.forEach(function (key) {
- argv[notFlagsArgv].push(key);
- });
- if (configuration['camel-case-expansion'] && configuration['strip-dashed']) {
- Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => {
- delete argv[key];
- });
- }
- if (configuration['strip-aliased']) {
- [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => {
- if (configuration['camel-case-expansion'] && alias.includes('-')) {
- delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')];
- }
- delete argv[alias];
- });
- }
- function pushPositional(arg) {
- const maybeCoercedNumber = maybeCoerceNumber('_', arg);
- if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') {
- argv._.push(maybeCoercedNumber);
- }
- }
- function eatNargs(i, key, args, argAfterEqualSign) {
- let ii;
- let toEat = checkAllAliases(key, flags.nargs);
- toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat;
- if (toEat === 0) {
- if (!isUndefined(argAfterEqualSign)) {
- error = Error(__('Argument unexpected for: %s', key));
- }
- setArg(key, defaultValue(key));
- return i;
- }
- let available = isUndefined(argAfterEqualSign) ? 0 : 1;
- if (configuration['nargs-eats-options']) {
- if (args.length - (i + 1) + available < toEat) {
- error = Error(__('Not enough arguments following: %s', key));
- }
- available = toEat;
- }
- else {
- for (ii = i + 1; ii < args.length; ii++) {
- if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii]))
- available++;
- else
- break;
- }
- if (available < toEat)
- error = Error(__('Not enough arguments following: %s', key));
- }
- let consumed = Math.min(available, toEat);
- if (!isUndefined(argAfterEqualSign) && consumed > 0) {
- setArg(key, argAfterEqualSign);
- consumed--;
- }
- for (ii = i + 1; ii < (consumed + i + 1); ii++) {
- setArg(key, args[ii]);
- }
- return (i + consumed);
- }
- function eatArray(i, key, args, argAfterEqualSign) {
- let argsToSet = [];
- let next = argAfterEqualSign || args[i + 1];
- const nargsCount = checkAllAliases(key, flags.nargs);
- if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) {
- argsToSet.push(true);
- }
- else if (isUndefined(next) ||
- (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) {
- if (defaults[key] !== undefined) {
- const defVal = defaults[key];
- argsToSet = Array.isArray(defVal) ? defVal : [defVal];
- }
- }
- else {
- if (!isUndefined(argAfterEqualSign)) {
- argsToSet.push(processValue(key, argAfterEqualSign, true));
- }
- for (let ii = i + 1; ii < args.length; ii++) {
- if ((!configuration['greedy-arrays'] && argsToSet.length > 0) ||
- (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount))
- break;
- next = args[ii];
- if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))
- break;
- i = ii;
- argsToSet.push(processValue(key, next, inputIsString));
- }
- }
- if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) ||
- (isNaN(nargsCount) && argsToSet.length === 0))) {
- error = Error(__('Not enough arguments following: %s', key));
- }
- setArg(key, argsToSet);
- return i;
- }
- function setArg(key, val, shouldStripQuotes = inputIsString) {
- if (/-/.test(key) && configuration['camel-case-expansion']) {
- const alias = key.split('.').map(function (prop) {
- return camelCase(prop);
- }).join('.');
- addNewAlias(key, alias);
- }
- const value = processValue(key, val, shouldStripQuotes);
- const splitKey = key.split('.');
- setKey(argv, splitKey, value);
- if (flags.aliases[key]) {
- flags.aliases[key].forEach(function (x) {
- const keyProperties = x.split('.');
- setKey(argv, keyProperties, value);
- });
- }
- if (splitKey.length > 1 && configuration['dot-notation']) {
- (flags.aliases[splitKey[0]] || []).forEach(function (x) {
- let keyProperties = x.split('.');
- const a = [].concat(splitKey);
- a.shift();
- keyProperties = keyProperties.concat(a);
- if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) {
- setKey(argv, keyProperties, value);
- }
- });
- }
- if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
- const keys = [key].concat(flags.aliases[key] || []);
- keys.forEach(function (key) {
- Object.defineProperty(argvReturn, key, {
- enumerable: true,
- get() {
- return val;
- },
- set(value) {
- val = typeof value === 'string' ? mixin.normalize(value) : value;
- }
- });
- });
- }
- }
- function addNewAlias(key, alias) {
- if (!(flags.aliases[key] && flags.aliases[key].length)) {
- flags.aliases[key] = [alias];
- newAliases[alias] = true;
- }
- if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
- addNewAlias(alias, key);
- }
- }
- function processValue(key, val, shouldStripQuotes) {
- if (shouldStripQuotes) {
- val = stripQuotes(val);
- }
- if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
- if (typeof val === 'string')
- val = val === 'true';
- }
- let value = Array.isArray(val)
- ? val.map(function (v) { return maybeCoerceNumber(key, v); })
- : maybeCoerceNumber(key, val);
- if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {
- value = increment();
- }
- if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
- if (Array.isArray(val))
- value = val.map((val) => { return mixin.normalize(val); });
- else
- value = mixin.normalize(val);
- }
- return value;
- }
- function maybeCoerceNumber(key, value) {
- if (!configuration['parse-positional-numbers'] && key === '_')
- return value;
- if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {
- const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`))));
- if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) {
- value = Number(value);
- }
- }
- return value;
- }
- function setConfig(argv) {
- const configLookup = Object.create(null);
- applyDefaultsAndAliases(configLookup, flags.aliases, defaults);
- Object.keys(flags.configs).forEach(function (configKey) {
- const configPath = argv[configKey] || configLookup[configKey];
- if (configPath) {
- try {
- let config = null;
- const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
- const resolveConfig = flags.configs[configKey];
- if (typeof resolveConfig === 'function') {
- try {
- config = resolveConfig(resolvedConfigPath);
- }
- catch (e) {
- config = e;
- }
- if (config instanceof Error) {
- error = config;
- return;
- }
- }
- else {
- config = mixin.require(resolvedConfigPath);
- }
- setConfigObject(config);
- }
- catch (ex) {
- if (ex.name === 'PermissionDenied')
- error = ex;
- else if (argv[configKey])
- error = Error(__('Invalid JSON config file: %s', configPath));
- }
- }
- });
- }
- function setConfigObject(config, prev) {
- Object.keys(config).forEach(function (key) {
- const value = config[key];
- const fullKey = prev ? prev + '.' + key : key;
- if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
- setConfigObject(value, fullKey);
- }
- else {
- if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) {
- setArg(fullKey, value);
- }
- }
- });
- }
- function setConfigObjects() {
- if (typeof configObjects !== 'undefined') {
- configObjects.forEach(function (configObject) {
- setConfigObject(configObject);
- });
- }
- }
- function applyEnvVars(argv, configOnly) {
- if (typeof envPrefix === 'undefined')
- return;
- const prefix = typeof envPrefix === 'string' ? envPrefix : '';
- const env = mixin.env();
- Object.keys(env).forEach(function (envVar) {
- if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {
- const keys = envVar.split('__').map(function (key, i) {
- if (i === 0) {
- key = key.substring(prefix.length);
- }
- return camelCase(key);
- });
- if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) {
- setArg(keys.join('.'), env[envVar]);
- }
- }
- });
- }
- function applyCoercions(argv) {
- let coerce;
- const applied = new Set();
- Object.keys(argv).forEach(function (key) {
- if (!applied.has(key)) {
- coerce = checkAllAliases(key, flags.coercions);
- if (typeof coerce === 'function') {
- try {
- const value = maybeCoerceNumber(key, coerce(argv[key]));
- ([].concat(flags.aliases[key] || [], key)).forEach(ali => {
- applied.add(ali);
- argv[ali] = value;
- });
- }
- catch (err) {
- error = err;
- }
- }
- }
- });
- }
- function setPlaceholderKeys(argv) {
- flags.keys.forEach((key) => {
- if (~key.indexOf('.'))
- return;
- if (typeof argv[key] === 'undefined')
- argv[key] = undefined;
- });
- return argv;
- }
- function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) {
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(obj, key.split('.'))) {
- setKey(obj, key.split('.'), defaults[key]);
- if (canLog)
- defaulted[key] = true;
- (aliases[key] || []).forEach(function (x) {
- if (hasKey(obj, x.split('.')))
- return;
- setKey(obj, x.split('.'), defaults[key]);
- });
- }
- });
- }
- function hasKey(obj, keys) {
- let o = obj;
- if (!configuration['dot-notation'])
- keys = [keys.join('.')];
- keys.slice(0, -1).forEach(function (key) {
- o = (o[key] || {});
- });
- const key = keys[keys.length - 1];
- if (typeof o !== 'object')
- return false;
- else
- return key in o;
- }
- function setKey(obj, keys, value) {
- let o = obj;
- if (!configuration['dot-notation'])
- keys = [keys.join('.')];
- keys.slice(0, -1).forEach(function (key) {
- key = sanitizeKey(key);
- if (typeof o === 'object' && o[key] === undefined) {
- o[key] = {};
- }
- if (typeof o[key] !== 'object' || Array.isArray(o[key])) {
- if (Array.isArray(o[key])) {
- o[key].push({});
- }
- else {
- o[key] = [o[key], {}];
- }
- o = o[key][o[key].length - 1];
- }
- else {
- o = o[key];
- }
- });
- const key = sanitizeKey(keys[keys.length - 1]);
- const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays);
- const isValueArray = Array.isArray(value);
- let duplicate = configuration['duplicate-arguments-array'];
- if (!duplicate && checkAllAliases(key, flags.nargs)) {
- duplicate = true;
- if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) {
- o[key] = undefined;
- }
- }
- if (value === increment()) {
- o[key] = increment(o[key]);
- }
- else if (Array.isArray(o[key])) {
- if (duplicate && isTypeArray && isValueArray) {
- o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
- }
- else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
- o[key] = value;
- }
- else {
- o[key] = o[key].concat([value]);
- }
- }
- else if (o[key] === undefined && isTypeArray) {
- o[key] = isValueArray ? value : [value];
- }
- else if (duplicate && !(o[key] === undefined ||
- checkAllAliases(key, flags.counts) ||
- checkAllAliases(key, flags.bools))) {
- o[key] = [o[key], value];
- }
- else {
- o[key] = value;
- }
- }
- function extendAliases(...args) {
- args.forEach(function (obj) {
- Object.keys(obj || {}).forEach(function (key) {
- if (flags.aliases[key])
- return;
- flags.aliases[key] = [].concat(aliases[key] || []);
- flags.aliases[key].concat(key).forEach(function (x) {
- if (/-/.test(x) && configuration['camel-case-expansion']) {
- const c = camelCase(x);
- if (c !== key && flags.aliases[key].indexOf(c) === -1) {
- flags.aliases[key].push(c);
- newAliases[c] = true;
- }
- }
- });
- flags.aliases[key].concat(key).forEach(function (x) {
- if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) {
- const c = decamelize(x, '-');
- if (c !== key && flags.aliases[key].indexOf(c) === -1) {
- flags.aliases[key].push(c);
- newAliases[c] = true;
- }
- }
- });
- flags.aliases[key].forEach(function (x) {
- flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
- });
- }
- function checkAllAliases(key, flag) {
- const toCheck = [].concat(flags.aliases[key] || [], key);
- const keys = Object.keys(flag);
- const setAlias = toCheck.find(key => keys.includes(key));
- return setAlias ? flag[setAlias] : false;
- }
- function hasAnyFlag(key) {
- const flagsKeys = Object.keys(flags);
- const toCheck = [].concat(flagsKeys.map(k => flags[k]));
- return toCheck.some(function (flag) {
- return Array.isArray(flag) ? flag.includes(key) : flag[key];
- });
- }
- function hasFlagsMatching(arg, ...patterns) {
- const toCheck = [].concat(...patterns);
- return toCheck.some(function (pattern) {
- const match = arg.match(pattern);
- return match && hasAnyFlag(match[1]);
- });
- }
- function hasAllShortFlags(arg) {
- if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
- return false;
- }
- let hasAllFlags = true;
- let next;
- const letters = arg.slice(1).split('');
- for (let j = 0; j < letters.length; j++) {
- next = arg.slice(j + 2);
- if (!hasAnyFlag(letters[j])) {
- hasAllFlags = false;
- break;
- }
- if ((letters[j + 1] && letters[j + 1] === '=') ||
- next === '-' ||
- (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) ||
- (letters[j + 1] && letters[j + 1].match(/\W/))) {
- break;
- }
- }
- return hasAllFlags;
- }
- function isUnknownOptionAsArg(arg) {
- return configuration['unknown-options-as-args'] && isUnknownOption(arg);
- }
- function isUnknownOption(arg) {
- arg = arg.replace(/^-{3,}/, '--');
- if (arg.match(negative)) {
- return false;
- }
- if (hasAllShortFlags(arg)) {
- return false;
- }
- const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/;
- const normalFlag = /^-+([^=]+?)$/;
- const flagEndingInHyphen = /^-+([^=]+?)-$/;
- const flagEndingInDigits = /^-+([^=]+?\d+)$/;
- const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/;
- return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);
- }
- function defaultValue(key) {
- if (!checkAllAliases(key, flags.bools) &&
- !checkAllAliases(key, flags.counts) &&
- `${key}` in defaults) {
- return defaults[key];
- }
- else {
- return defaultForType(guessType(key));
- }
- }
- function defaultForType(type) {
- const def = {
- [DefaultValuesForTypeKey.BOOLEAN]: true,
- [DefaultValuesForTypeKey.STRING]: '',
- [DefaultValuesForTypeKey.NUMBER]: undefined,
- [DefaultValuesForTypeKey.ARRAY]: []
- };
- return def[type];
- }
- function guessType(key) {
- let type = DefaultValuesForTypeKey.BOOLEAN;
- if (checkAllAliases(key, flags.strings))
- type = DefaultValuesForTypeKey.STRING;
- else if (checkAllAliases(key, flags.numbers))
- type = DefaultValuesForTypeKey.NUMBER;
- else if (checkAllAliases(key, flags.bools))
- type = DefaultValuesForTypeKey.BOOLEAN;
- else if (checkAllAliases(key, flags.arrays))
- type = DefaultValuesForTypeKey.ARRAY;
- return type;
- }
- function isUndefined(num) {
- return num === undefined;
- }
- function checkConfiguration() {
- Object.keys(flags.counts).find(key => {
- if (checkAllAliases(key, flags.arrays)) {
- error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key));
- return true;
- }
- else if (checkAllAliases(key, flags.nargs)) {
- error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key));
- return true;
- }
- return false;
- });
- }
- return {
- aliases: Object.assign({}, flags.aliases),
- argv: Object.assign(argvReturn, argv),
- configuration: configuration,
- defaulted: Object.assign({}, defaulted),
- error: error,
- newAliases: Object.assign({}, newAliases)
- };
- }
-}
-function combineAliases(aliases) {
- const aliasArrays = [];
- const combined = Object.create(null);
- let change = true;
- Object.keys(aliases).forEach(function (key) {
- aliasArrays.push([].concat(aliases[key], key));
- });
- while (change) {
- change = false;
- for (let i = 0; i < aliasArrays.length; i++) {
- for (let ii = i + 1; ii < aliasArrays.length; ii++) {
- const intersect = aliasArrays[i].filter(function (v) {
- return aliasArrays[ii].indexOf(v) !== -1;
- });
- if (intersect.length) {
- aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);
- aliasArrays.splice(ii, 1);
- change = true;
- break;
- }
- }
- }
- }
- aliasArrays.forEach(function (aliasArray) {
- aliasArray = aliasArray.filter(function (v, i, self) {
- return self.indexOf(v) === i;
- });
- const lastAlias = aliasArray.pop();
- if (lastAlias !== undefined && typeof lastAlias === 'string') {
- combined[lastAlias] = aliasArray;
- }
- });
- return combined;
-}
-function increment(orig) {
- return orig !== undefined ? orig + 1 : 1;
-}
-function sanitizeKey(key) {
- if (key === '__proto__')
- return '___proto___';
- return key;
-}
-function stripQuotes(val) {
- return (typeof val === 'string' &&
- (val[0] === "'" || val[0] === '"') &&
- val[val.length - 1] === val[0])
- ? val.substring(1, val.length - 1)
- : val;
-}
-
-var _a, _b, _c;
-const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION)
- ? Number(process.env.YARGS_MIN_NODE_VERSION)
- : 12;
-const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
-if (nodeVersion) {
- const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
- if (major < minNodeVersion) {
- throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
- }
-}
-const env = process ? process.env : {};
-const parser = new YargsParser({
- cwd: process.cwd,
- env: () => {
- return env;
- },
- format: util.format,
- normalize: path.normalize,
- resolve: path.resolve,
- require: (path) => {
- if (typeof require !== 'undefined') {
- return require(path);
- }
- else if (path.match(/\.json$/)) {
- return JSON.parse(fs.readFileSync(path, 'utf8'));
- }
- else {
- throw Error('only .json config files are supported in ESM');
- }
- }
-});
-const yargsParser = function Parser(args, opts) {
- const result = parser.parse(args.slice(), opts);
- return result.argv;
-};
-yargsParser.detailed = function (args, opts) {
- return parser.parse(args.slice(), opts);
-};
-yargsParser.camelCase = camelCase;
-yargsParser.decamelize = decamelize;
-yargsParser.looksLikeNumber = looksLikeNumber;
-
-module.exports = yargsParser;
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/index.js b/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/index.js
deleted file mode 100644
index 43ef485..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/index.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
- * CJS and ESM environments.
- *
- * @license
- * Copyright (c) 2016, Contributors
- * SPDX-License-Identifier: ISC
- */
-var _a, _b, _c;
-import { format } from 'util';
-import { normalize, resolve } from 'path';
-import { camelCase, decamelize, looksLikeNumber } from './string-utils.js';
-import { YargsParser } from './yargs-parser.js';
-import { readFileSync } from 'fs';
-// See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our
-// version support policy. The YARGS_MIN_NODE_VERSION is used for testing only.
-const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION)
- ? Number(process.env.YARGS_MIN_NODE_VERSION)
- : 12;
-const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
-if (nodeVersion) {
- const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
- if (major < minNodeVersion) {
- throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
- }
-}
-// Creates a yargs-parser instance using Node.js standard libraries:
-const env = process ? process.env : {};
-const parser = new YargsParser({
- cwd: process.cwd,
- env: () => {
- return env;
- },
- format,
- normalize,
- resolve,
- // TODO: figure out a way to combine ESM and CJS coverage, such that
- // we can exercise all the lines below:
- require: (path) => {
- if (typeof require !== 'undefined') {
- return require(path);
- }
- else if (path.match(/\.json$/)) {
- // Addresses: https://github.com/yargs/yargs/issues/2040
- return JSON.parse(readFileSync(path, 'utf8'));
- }
- else {
- throw Error('only .json config files are supported in ESM');
- }
- }
-});
-const yargsParser = function Parser(args, opts) {
- const result = parser.parse(args.slice(), opts);
- return result.argv;
-};
-yargsParser.detailed = function (args, opts) {
- return parser.parse(args.slice(), opts);
-};
-yargsParser.camelCase = camelCase;
-yargsParser.decamelize = decamelize;
-yargsParser.looksLikeNumber = looksLikeNumber;
-export default yargsParser;
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/string-utils.js b/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/string-utils.js
deleted file mode 100644
index 4e8bd99..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/string-utils.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * @license
- * Copyright (c) 2016, Contributors
- * SPDX-License-Identifier: ISC
- */
-export function camelCase(str) {
- // Handle the case where an argument is provided as camel case, e.g., fooBar.
- // by ensuring that the string isn't already mixed case:
- const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
- if (!isCamelCase) {
- str = str.toLowerCase();
- }
- if (str.indexOf('-') === -1 && str.indexOf('_') === -1) {
- return str;
- }
- else {
- let camelcase = '';
- let nextChrUpper = false;
- const leadingHyphens = str.match(/^-+/);
- for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) {
- let chr = str.charAt(i);
- if (nextChrUpper) {
- nextChrUpper = false;
- chr = chr.toUpperCase();
- }
- if (i !== 0 && (chr === '-' || chr === '_')) {
- nextChrUpper = true;
- }
- else if (chr !== '-' && chr !== '_') {
- camelcase += chr;
- }
- }
- return camelcase;
- }
-}
-export function decamelize(str, joinString) {
- const lowercase = str.toLowerCase();
- joinString = joinString || '-';
- let notCamelcase = '';
- for (let i = 0; i < str.length; i++) {
- const chrLower = lowercase.charAt(i);
- const chrString = str.charAt(i);
- if (chrLower !== chrString && i > 0) {
- notCamelcase += `${joinString}${lowercase.charAt(i)}`;
- }
- else {
- notCamelcase += chrString;
- }
- }
- return notCamelcase;
-}
-export function looksLikeNumber(x) {
- if (x === null || x === undefined)
- return false;
- // if loaded from config, may already be a number.
- if (typeof x === 'number')
- return true;
- // hexadecimal.
- if (/^0x[0-9a-f]+$/i.test(x))
- return true;
- // don't treat 0123 as a number; as it drops the leading '0'.
- if (/^0[^.]/.test(x))
- return false;
- return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/tokenize-arg-string.js b/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/tokenize-arg-string.js
deleted file mode 100644
index 5e732ef..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/tokenize-arg-string.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @license
- * Copyright (c) 2016, Contributors
- * SPDX-License-Identifier: ISC
- */
-// take an un-split argv string and tokenize it.
-export function tokenizeArgString(argString) {
- if (Array.isArray(argString)) {
- return argString.map(e => typeof e !== 'string' ? e + '' : e);
- }
- argString = argString.trim();
- let i = 0;
- let prevC = null;
- let c = null;
- let opening = null;
- const args = [];
- for (let ii = 0; ii < argString.length; ii++) {
- prevC = c;
- c = argString.charAt(ii);
- // split on spaces unless we're in quotes.
- if (c === ' ' && !opening) {
- if (!(prevC === ' ')) {
- i++;
- }
- continue;
- }
- // don't split the string if we're in matching
- // opening or closing single and double quotes.
- if (c === opening) {
- opening = null;
- }
- else if ((c === "'" || c === '"') && !opening) {
- opening = c;
- }
- if (!args[i])
- args[i] = '';
- args[i] += c;
- }
- return args;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/yargs-parser-types.js b/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/yargs-parser-types.js
deleted file mode 100644
index 63b7c31..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/yargs-parser-types.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * @license
- * Copyright (c) 2016, Contributors
- * SPDX-License-Identifier: ISC
- */
-export var DefaultValuesForTypeKey;
-(function (DefaultValuesForTypeKey) {
- DefaultValuesForTypeKey["BOOLEAN"] = "boolean";
- DefaultValuesForTypeKey["STRING"] = "string";
- DefaultValuesForTypeKey["NUMBER"] = "number";
- DefaultValuesForTypeKey["ARRAY"] = "array";
-})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/yargs-parser.js b/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/yargs-parser.js
deleted file mode 100644
index 415d4bc..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/build/lib/yargs-parser.js
+++ /dev/null
@@ -1,1045 +0,0 @@
-/**
- * @license
- * Copyright (c) 2016, Contributors
- * SPDX-License-Identifier: ISC
- */
-import { tokenizeArgString } from './tokenize-arg-string.js';
-import { DefaultValuesForTypeKey } from './yargs-parser-types.js';
-import { camelCase, decamelize, looksLikeNumber } from './string-utils.js';
-let mixin;
-export class YargsParser {
- constructor(_mixin) {
- mixin = _mixin;
- }
- parse(argsInput, options) {
- const opts = Object.assign({
- alias: undefined,
- array: undefined,
- boolean: undefined,
- config: undefined,
- configObjects: undefined,
- configuration: undefined,
- coerce: undefined,
- count: undefined,
- default: undefined,
- envPrefix: undefined,
- narg: undefined,
- normalize: undefined,
- string: undefined,
- number: undefined,
- __: undefined,
- key: undefined
- }, options);
- // allow a string argument to be passed in rather
- // than an argv array.
- const args = tokenizeArgString(argsInput);
- // tokenizeArgString adds extra quotes to args if argsInput is a string
- // only strip those extra quotes in processValue if argsInput is a string
- const inputIsString = typeof argsInput === 'string';
- // aliases might have transitive relationships, normalize this.
- const aliases = combineAliases(Object.assign(Object.create(null), opts.alias));
- const configuration = Object.assign({
- 'boolean-negation': true,
- 'camel-case-expansion': true,
- 'combine-arrays': false,
- 'dot-notation': true,
- 'duplicate-arguments-array': true,
- 'flatten-duplicate-arrays': true,
- 'greedy-arrays': true,
- 'halt-at-non-option': false,
- 'nargs-eats-options': false,
- 'negation-prefix': 'no-',
- 'parse-numbers': true,
- 'parse-positional-numbers': true,
- 'populate--': false,
- 'set-placeholder-key': false,
- 'short-option-groups': true,
- 'strip-aliased': false,
- 'strip-dashed': false,
- 'unknown-options-as-args': false
- }, opts.configuration);
- const defaults = Object.assign(Object.create(null), opts.default);
- const configObjects = opts.configObjects || [];
- const envPrefix = opts.envPrefix;
- const notFlagsOption = configuration['populate--'];
- const notFlagsArgv = notFlagsOption ? '--' : '_';
- const newAliases = Object.create(null);
- const defaulted = Object.create(null);
- // allow a i18n handler to be passed in, default to a fake one (util.format).
- const __ = opts.__ || mixin.format;
- const flags = {
- aliases: Object.create(null),
- arrays: Object.create(null),
- bools: Object.create(null),
- strings: Object.create(null),
- numbers: Object.create(null),
- counts: Object.create(null),
- normalize: Object.create(null),
- configs: Object.create(null),
- nargs: Object.create(null),
- coercions: Object.create(null),
- keys: []
- };
- const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
- const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)');
- [].concat(opts.array || []).filter(Boolean).forEach(function (opt) {
- const key = typeof opt === 'object' ? opt.key : opt;
- // assign to flags[bools|strings|numbers]
- const assignment = Object.keys(opt).map(function (key) {
- const arrayFlagKeys = {
- boolean: 'bools',
- string: 'strings',
- number: 'numbers'
- };
- return arrayFlagKeys[key];
- }).filter(Boolean).pop();
- // assign key to be coerced
- if (assignment) {
- flags[assignment][key] = true;
- }
- flags.arrays[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.string || []).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.number || []).filter(Boolean).forEach(function (key) {
- flags.numbers[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.count || []).filter(Boolean).forEach(function (key) {
- flags.counts[key] = true;
- flags.keys.push(key);
- });
- [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) {
- flags.normalize[key] = true;
- flags.keys.push(key);
- });
- if (typeof opts.narg === 'object') {
- Object.entries(opts.narg).forEach(([key, value]) => {
- if (typeof value === 'number') {
- flags.nargs[key] = value;
- flags.keys.push(key);
- }
- });
- }
- if (typeof opts.coerce === 'object') {
- Object.entries(opts.coerce).forEach(([key, value]) => {
- if (typeof value === 'function') {
- flags.coercions[key] = value;
- flags.keys.push(key);
- }
- });
- }
- if (typeof opts.config !== 'undefined') {
- if (Array.isArray(opts.config) || typeof opts.config === 'string') {
- ;
- [].concat(opts.config).filter(Boolean).forEach(function (key) {
- flags.configs[key] = true;
- });
- }
- else if (typeof opts.config === 'object') {
- Object.entries(opts.config).forEach(([key, value]) => {
- if (typeof value === 'boolean' || typeof value === 'function') {
- flags.configs[key] = value;
- }
- });
- }
- }
- // create a lookup table that takes into account all
- // combinations of aliases: {f: ['foo'], foo: ['f']}
- extendAliases(opts.key, aliases, opts.default, flags.arrays);
- // apply default values to all aliases.
- Object.keys(defaults).forEach(function (key) {
- (flags.aliases[key] || []).forEach(function (alias) {
- defaults[alias] = defaults[key];
- });
- });
- let error = null;
- checkConfiguration();
- let notFlags = [];
- const argv = Object.assign(Object.create(null), { _: [] });
- // TODO(bcoe): for the first pass at removing object prototype we didn't
- // remove all prototypes from objects returned by this API, we might want
- // to gradually move towards doing so.
- const argvReturn = {};
- for (let i = 0; i < args.length; i++) {
- const arg = args[i];
- const truncatedArg = arg.replace(/^-{3,}/, '---');
- let broken;
- let key;
- let letters;
- let m;
- let next;
- let value;
- // any unknown option (except for end-of-options, "--")
- if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
- pushPositional(arg);
- // ---, ---=, ----, etc,
- }
- else if (truncatedArg.match(/^---+(=|$)/)) {
- // options without key name are invalid.
- pushPositional(arg);
- continue;
- // -- separated by =
- }
- else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
- // arrays format = '--f=a b c'
- if (m !== null && Array.isArray(m) && m.length >= 3) {
- if (checkAllAliases(m[1], flags.arrays)) {
- i = eatArray(i, m[1], args, m[2]);
- }
- else if (checkAllAliases(m[1], flags.nargs) !== false) {
- // nargs format = '--f=monkey washing cat'
- i = eatNargs(i, m[1], args, m[2]);
- }
- else {
- setArg(m[1], m[2], true);
- }
- }
- }
- else if (arg.match(negatedBoolean) && configuration['boolean-negation']) {
- m = arg.match(negatedBoolean);
- if (m !== null && Array.isArray(m) && m.length >= 2) {
- key = m[1];
- setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);
- }
- // -- separated by space.
- }
- else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) {
- m = arg.match(/^--?(.+)/);
- if (m !== null && Array.isArray(m) && m.length >= 2) {
- key = m[1];
- if (checkAllAliases(key, flags.arrays)) {
- // array format = '--foo a b c'
- i = eatArray(i, key, args);
- }
- else if (checkAllAliases(key, flags.nargs) !== false) {
- // nargs format = '--foo a b c'
- // should be truthy even if: flags.nargs[key] === 0
- i = eatNargs(i, key, args);
- }
- else {
- next = args[i + 1];
- if (next !== undefined && (!next.match(/^-/) ||
- next.match(negative)) &&
- !checkAllAliases(key, flags.bools) &&
- !checkAllAliases(key, flags.counts)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next);
- i++;
- }
- else {
- setArg(key, defaultValue(key));
- }
- }
- }
- // dot-notation flag separated by '='.
- }
- else if (arg.match(/^-.\..+=/)) {
- m = arg.match(/^-([^=]+)=([\s\S]*)$/);
- if (m !== null && Array.isArray(m) && m.length >= 3) {
- setArg(m[1], m[2]);
- }
- // dot-notation flag separated by space.
- }
- else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
- next = args[i + 1];
- m = arg.match(/^-(.\..+)/);
- if (m !== null && Array.isArray(m) && m.length >= 2) {
- key = m[1];
- if (next !== undefined && !next.match(/^-/) &&
- !checkAllAliases(key, flags.bools) &&
- !checkAllAliases(key, flags.counts)) {
- setArg(key, next);
- i++;
- }
- else {
- setArg(key, defaultValue(key));
- }
- }
- }
- else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
- letters = arg.slice(1, -1).split('');
- broken = false;
- for (let j = 0; j < letters.length; j++) {
- next = arg.slice(j + 2);
- if (letters[j + 1] && letters[j + 1] === '=') {
- value = arg.slice(j + 3);
- key = letters[j];
- if (checkAllAliases(key, flags.arrays)) {
- // array format = '-f=a b c'
- i = eatArray(i, key, args, value);
- }
- else if (checkAllAliases(key, flags.nargs) !== false) {
- // nargs format = '-f=monkey washing cat'
- i = eatNargs(i, key, args, value);
- }
- else {
- setArg(key, value);
- }
- broken = true;
- break;
- }
- if (next === '-') {
- setArg(letters[j], next);
- continue;
- }
- // current letter is an alphabetic character and next value is a number
- if (/[A-Za-z]/.test(letters[j]) &&
- /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) &&
- checkAllAliases(next, flags.bools) === false) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
- if (letters[j + 1] && letters[j + 1].match(/\W/)) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
- else {
- setArg(letters[j], defaultValue(letters[j]));
- }
- }
- key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (checkAllAliases(key, flags.arrays)) {
- // array format = '-f a b c'
- i = eatArray(i, key, args);
- }
- else if (checkAllAliases(key, flags.nargs) !== false) {
- // nargs format = '-f a b c'
- // should be truthy even if: flags.nargs[key] === 0
- i = eatNargs(i, key, args);
- }
- else {
- next = args[i + 1];
- if (next !== undefined && (!/^(-|--)[^-]/.test(next) ||
- next.match(negative)) &&
- !checkAllAliases(key, flags.bools) &&
- !checkAllAliases(key, flags.counts)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next);
- i++;
- }
- else {
- setArg(key, defaultValue(key));
- }
- }
- }
- }
- else if (arg.match(/^-[0-9]$/) &&
- arg.match(negative) &&
- checkAllAliases(arg.slice(1), flags.bools)) {
- // single-digit boolean alias, e.g: xargs -0
- key = arg.slice(1);
- setArg(key, defaultValue(key));
- }
- else if (arg === '--') {
- notFlags = args.slice(i + 1);
- break;
- }
- else if (configuration['halt-at-non-option']) {
- notFlags = args.slice(i);
- break;
- }
- else {
- pushPositional(arg);
- }
- }
- // order of precedence:
- // 1. command line arg
- // 2. value from env var
- // 3. value from config file
- // 4. value from config objects
- // 5. configured default value
- applyEnvVars(argv, true); // special case: check env vars that point to config file
- applyEnvVars(argv, false);
- setConfig(argv);
- setConfigObjects();
- applyDefaultsAndAliases(argv, flags.aliases, defaults, true);
- applyCoercions(argv);
- if (configuration['set-placeholder-key'])
- setPlaceholderKeys(argv);
- // for any counts either not in args or without an explicit default, set to 0
- Object.keys(flags.counts).forEach(function (key) {
- if (!hasKey(argv, key.split('.')))
- setArg(key, 0);
- });
- // '--' defaults to undefined.
- if (notFlagsOption && notFlags.length)
- argv[notFlagsArgv] = [];
- notFlags.forEach(function (key) {
- argv[notFlagsArgv].push(key);
- });
- if (configuration['camel-case-expansion'] && configuration['strip-dashed']) {
- Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => {
- delete argv[key];
- });
- }
- if (configuration['strip-aliased']) {
- ;
- [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => {
- if (configuration['camel-case-expansion'] && alias.includes('-')) {
- delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')];
- }
- delete argv[alias];
- });
- }
- // Push argument into positional array, applying numeric coercion:
- function pushPositional(arg) {
- const maybeCoercedNumber = maybeCoerceNumber('_', arg);
- if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') {
- argv._.push(maybeCoercedNumber);
- }
- }
- // how many arguments should we consume, based
- // on the nargs option?
- function eatNargs(i, key, args, argAfterEqualSign) {
- let ii;
- let toEat = checkAllAliases(key, flags.nargs);
- // NaN has a special meaning for the array type, indicating that one or
- // more values are expected.
- toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat;
- if (toEat === 0) {
- if (!isUndefined(argAfterEqualSign)) {
- error = Error(__('Argument unexpected for: %s', key));
- }
- setArg(key, defaultValue(key));
- return i;
- }
- let available = isUndefined(argAfterEqualSign) ? 0 : 1;
- if (configuration['nargs-eats-options']) {
- // classic behavior, yargs eats positional and dash arguments.
- if (args.length - (i + 1) + available < toEat) {
- error = Error(__('Not enough arguments following: %s', key));
- }
- available = toEat;
- }
- else {
- // nargs will not consume flag arguments, e.g., -abc, --foo,
- // and terminates when one is observed.
- for (ii = i + 1; ii < args.length; ii++) {
- if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii]))
- available++;
- else
- break;
- }
- if (available < toEat)
- error = Error(__('Not enough arguments following: %s', key));
- }
- let consumed = Math.min(available, toEat);
- if (!isUndefined(argAfterEqualSign) && consumed > 0) {
- setArg(key, argAfterEqualSign);
- consumed--;
- }
- for (ii = i + 1; ii < (consumed + i + 1); ii++) {
- setArg(key, args[ii]);
- }
- return (i + consumed);
- }
- // if an option is an array, eat all non-hyphenated arguments
- // following it... YUM!
- // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"]
- function eatArray(i, key, args, argAfterEqualSign) {
- let argsToSet = [];
- let next = argAfterEqualSign || args[i + 1];
- // If both array and nargs are configured, enforce the nargs count:
- const nargsCount = checkAllAliases(key, flags.nargs);
- if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) {
- argsToSet.push(true);
- }
- else if (isUndefined(next) ||
- (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) {
- // for keys without value ==> argsToSet remains an empty []
- // set user default value, if available
- if (defaults[key] !== undefined) {
- const defVal = defaults[key];
- argsToSet = Array.isArray(defVal) ? defVal : [defVal];
- }
- }
- else {
- // value in --option=value is eaten as is
- if (!isUndefined(argAfterEqualSign)) {
- argsToSet.push(processValue(key, argAfterEqualSign, true));
- }
- for (let ii = i + 1; ii < args.length; ii++) {
- if ((!configuration['greedy-arrays'] && argsToSet.length > 0) ||
- (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount))
- break;
- next = args[ii];
- if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))
- break;
- i = ii;
- argsToSet.push(processValue(key, next, inputIsString));
- }
- }
- // If both array and nargs are configured, create an error if less than
- // nargs positionals were found. NaN has special meaning, indicating
- // that at least one value is required (more are okay).
- if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) ||
- (isNaN(nargsCount) && argsToSet.length === 0))) {
- error = Error(__('Not enough arguments following: %s', key));
- }
- setArg(key, argsToSet);
- return i;
- }
- function setArg(key, val, shouldStripQuotes = inputIsString) {
- if (/-/.test(key) && configuration['camel-case-expansion']) {
- const alias = key.split('.').map(function (prop) {
- return camelCase(prop);
- }).join('.');
- addNewAlias(key, alias);
- }
- const value = processValue(key, val, shouldStripQuotes);
- const splitKey = key.split('.');
- setKey(argv, splitKey, value);
- // handle populating aliases of the full key
- if (flags.aliases[key]) {
- flags.aliases[key].forEach(function (x) {
- const keyProperties = x.split('.');
- setKey(argv, keyProperties, value);
- });
- }
- // handle populating aliases of the first element of the dot-notation key
- if (splitKey.length > 1 && configuration['dot-notation']) {
- ;
- (flags.aliases[splitKey[0]] || []).forEach(function (x) {
- let keyProperties = x.split('.');
- // expand alias with nested objects in key
- const a = [].concat(splitKey);
- a.shift(); // nuke the old key.
- keyProperties = keyProperties.concat(a);
- // populate alias only if is not already an alias of the full key
- // (already populated above)
- if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) {
- setKey(argv, keyProperties, value);
- }
- });
- }
- // Set normalize getter and setter when key is in 'normalize' but isn't an array
- if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
- const keys = [key].concat(flags.aliases[key] || []);
- keys.forEach(function (key) {
- Object.defineProperty(argvReturn, key, {
- enumerable: true,
- get() {
- return val;
- },
- set(value) {
- val = typeof value === 'string' ? mixin.normalize(value) : value;
- }
- });
- });
- }
- }
- function addNewAlias(key, alias) {
- if (!(flags.aliases[key] && flags.aliases[key].length)) {
- flags.aliases[key] = [alias];
- newAliases[alias] = true;
- }
- if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
- addNewAlias(alias, key);
- }
- }
- function processValue(key, val, shouldStripQuotes) {
- // strings may be quoted, clean this up as we assign values.
- if (shouldStripQuotes) {
- val = stripQuotes(val);
- }
- // handle parsing boolean arguments --foo=true --bar false.
- if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
- if (typeof val === 'string')
- val = val === 'true';
- }
- let value = Array.isArray(val)
- ? val.map(function (v) { return maybeCoerceNumber(key, v); })
- : maybeCoerceNumber(key, val);
- // increment a count given as arg (either no value or value parsed as boolean)
- if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {
- value = increment();
- }
- // Set normalized value when key is in 'normalize' and in 'arrays'
- if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
- if (Array.isArray(val))
- value = val.map((val) => { return mixin.normalize(val); });
- else
- value = mixin.normalize(val);
- }
- return value;
- }
- function maybeCoerceNumber(key, value) {
- if (!configuration['parse-positional-numbers'] && key === '_')
- return value;
- if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {
- const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`))));
- if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) {
- value = Number(value);
- }
- }
- return value;
- }
- // set args from config.json file, this should be
- // applied last so that defaults can be applied.
- function setConfig(argv) {
- const configLookup = Object.create(null);
- // expand defaults/aliases, in-case any happen to reference
- // the config.json file.
- applyDefaultsAndAliases(configLookup, flags.aliases, defaults);
- Object.keys(flags.configs).forEach(function (configKey) {
- const configPath = argv[configKey] || configLookup[configKey];
- if (configPath) {
- try {
- let config = null;
- const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
- const resolveConfig = flags.configs[configKey];
- if (typeof resolveConfig === 'function') {
- try {
- config = resolveConfig(resolvedConfigPath);
- }
- catch (e) {
- config = e;
- }
- if (config instanceof Error) {
- error = config;
- return;
- }
- }
- else {
- config = mixin.require(resolvedConfigPath);
- }
- setConfigObject(config);
- }
- catch (ex) {
- // Deno will receive a PermissionDenied error if an attempt is
- // made to load config without the --allow-read flag:
- if (ex.name === 'PermissionDenied')
- error = ex;
- else if (argv[configKey])
- error = Error(__('Invalid JSON config file: %s', configPath));
- }
- }
- });
- }
- // set args from config object.
- // it recursively checks nested objects.
- function setConfigObject(config, prev) {
- Object.keys(config).forEach(function (key) {
- const value = config[key];
- const fullKey = prev ? prev + '.' + key : key;
- // if the value is an inner object and we have dot-notation
- // enabled, treat inner objects in config the same as
- // heavily nested dot notations (foo.bar.apple).
- if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
- // if the value is an object but not an array, check nested object
- setConfigObject(value, fullKey);
- }
- else {
- // setting arguments via CLI takes precedence over
- // values within the config file.
- if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) {
- setArg(fullKey, value);
- }
- }
- });
- }
- // set all config objects passed in opts
- function setConfigObjects() {
- if (typeof configObjects !== 'undefined') {
- configObjects.forEach(function (configObject) {
- setConfigObject(configObject);
- });
- }
- }
- function applyEnvVars(argv, configOnly) {
- if (typeof envPrefix === 'undefined')
- return;
- const prefix = typeof envPrefix === 'string' ? envPrefix : '';
- const env = mixin.env();
- Object.keys(env).forEach(function (envVar) {
- if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {
- // get array of nested keys and convert them to camel case
- const keys = envVar.split('__').map(function (key, i) {
- if (i === 0) {
- key = key.substring(prefix.length);
- }
- return camelCase(key);
- });
- if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) {
- setArg(keys.join('.'), env[envVar]);
- }
- }
- });
- }
- function applyCoercions(argv) {
- let coerce;
- const applied = new Set();
- Object.keys(argv).forEach(function (key) {
- if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases
- coerce = checkAllAliases(key, flags.coercions);
- if (typeof coerce === 'function') {
- try {
- const value = maybeCoerceNumber(key, coerce(argv[key]));
- ([].concat(flags.aliases[key] || [], key)).forEach(ali => {
- applied.add(ali);
- argv[ali] = value;
- });
- }
- catch (err) {
- error = err;
- }
- }
- }
- });
- }
- function setPlaceholderKeys(argv) {
- flags.keys.forEach((key) => {
- // don't set placeholder keys for dot notation options 'foo.bar'.
- if (~key.indexOf('.'))
- return;
- if (typeof argv[key] === 'undefined')
- argv[key] = undefined;
- });
- return argv;
- }
- function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) {
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(obj, key.split('.'))) {
- setKey(obj, key.split('.'), defaults[key]);
- if (canLog)
- defaulted[key] = true;
- (aliases[key] || []).forEach(function (x) {
- if (hasKey(obj, x.split('.')))
- return;
- setKey(obj, x.split('.'), defaults[key]);
- });
- }
- });
- }
- function hasKey(obj, keys) {
- let o = obj;
- if (!configuration['dot-notation'])
- keys = [keys.join('.')];
- keys.slice(0, -1).forEach(function (key) {
- o = (o[key] || {});
- });
- const key = keys[keys.length - 1];
- if (typeof o !== 'object')
- return false;
- else
- return key in o;
- }
- function setKey(obj, keys, value) {
- let o = obj;
- if (!configuration['dot-notation'])
- keys = [keys.join('.')];
- keys.slice(0, -1).forEach(function (key) {
- // TODO(bcoe): in the next major version of yargs, switch to
- // Object.create(null) for dot notation:
- key = sanitizeKey(key);
- if (typeof o === 'object' && o[key] === undefined) {
- o[key] = {};
- }
- if (typeof o[key] !== 'object' || Array.isArray(o[key])) {
- // ensure that o[key] is an array, and that the last item is an empty object.
- if (Array.isArray(o[key])) {
- o[key].push({});
- }
- else {
- o[key] = [o[key], {}];
- }
- // we want to update the empty object at the end of the o[key] array, so set o to that object
- o = o[key][o[key].length - 1];
- }
- else {
- o = o[key];
- }
- });
- // TODO(bcoe): in the next major version of yargs, switch to
- // Object.create(null) for dot notation:
- const key = sanitizeKey(keys[keys.length - 1]);
- const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays);
- const isValueArray = Array.isArray(value);
- let duplicate = configuration['duplicate-arguments-array'];
- // nargs has higher priority than duplicate
- if (!duplicate && checkAllAliases(key, flags.nargs)) {
- duplicate = true;
- if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) {
- o[key] = undefined;
- }
- }
- if (value === increment()) {
- o[key] = increment(o[key]);
- }
- else if (Array.isArray(o[key])) {
- if (duplicate && isTypeArray && isValueArray) {
- o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
- }
- else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
- o[key] = value;
- }
- else {
- o[key] = o[key].concat([value]);
- }
- }
- else if (o[key] === undefined && isTypeArray) {
- o[key] = isValueArray ? value : [value];
- }
- else if (duplicate && !(o[key] === undefined ||
- checkAllAliases(key, flags.counts) ||
- checkAllAliases(key, flags.bools))) {
- o[key] = [o[key], value];
- }
- else {
- o[key] = value;
- }
- }
- // extend the aliases list with inferred aliases.
- function extendAliases(...args) {
- args.forEach(function (obj) {
- Object.keys(obj || {}).forEach(function (key) {
- // short-circuit if we've already added a key
- // to the aliases array, for example it might
- // exist in both 'opts.default' and 'opts.key'.
- if (flags.aliases[key])
- return;
- flags.aliases[key] = [].concat(aliases[key] || []);
- // For "--option-name", also set argv.optionName
- flags.aliases[key].concat(key).forEach(function (x) {
- if (/-/.test(x) && configuration['camel-case-expansion']) {
- const c = camelCase(x);
- if (c !== key && flags.aliases[key].indexOf(c) === -1) {
- flags.aliases[key].push(c);
- newAliases[c] = true;
- }
- }
- });
- // For "--optionName", also set argv['option-name']
- flags.aliases[key].concat(key).forEach(function (x) {
- if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) {
- const c = decamelize(x, '-');
- if (c !== key && flags.aliases[key].indexOf(c) === -1) {
- flags.aliases[key].push(c);
- newAliases[c] = true;
- }
- }
- });
- flags.aliases[key].forEach(function (x) {
- flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
- });
- }
- function checkAllAliases(key, flag) {
- const toCheck = [].concat(flags.aliases[key] || [], key);
- const keys = Object.keys(flag);
- const setAlias = toCheck.find(key => keys.includes(key));
- return setAlias ? flag[setAlias] : false;
- }
- function hasAnyFlag(key) {
- const flagsKeys = Object.keys(flags);
- const toCheck = [].concat(flagsKeys.map(k => flags[k]));
- return toCheck.some(function (flag) {
- return Array.isArray(flag) ? flag.includes(key) : flag[key];
- });
- }
- function hasFlagsMatching(arg, ...patterns) {
- const toCheck = [].concat(...patterns);
- return toCheck.some(function (pattern) {
- const match = arg.match(pattern);
- return match && hasAnyFlag(match[1]);
- });
- }
- // based on a simplified version of the short flag group parsing logic
- function hasAllShortFlags(arg) {
- // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group
- if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
- return false;
- }
- let hasAllFlags = true;
- let next;
- const letters = arg.slice(1).split('');
- for (let j = 0; j < letters.length; j++) {
- next = arg.slice(j + 2);
- if (!hasAnyFlag(letters[j])) {
- hasAllFlags = false;
- break;
- }
- if ((letters[j + 1] && letters[j + 1] === '=') ||
- next === '-' ||
- (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) ||
- (letters[j + 1] && letters[j + 1].match(/\W/))) {
- break;
- }
- }
- return hasAllFlags;
- }
- function isUnknownOptionAsArg(arg) {
- return configuration['unknown-options-as-args'] && isUnknownOption(arg);
- }
- function isUnknownOption(arg) {
- arg = arg.replace(/^-{3,}/, '--');
- // ignore negative numbers
- if (arg.match(negative)) {
- return false;
- }
- // if this is a short option group and all of them are configured, it isn't unknown
- if (hasAllShortFlags(arg)) {
- return false;
- }
- // e.g. '--count=2'
- const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/;
- // e.g. '-a' or '--arg'
- const normalFlag = /^-+([^=]+?)$/;
- // e.g. '-a-'
- const flagEndingInHyphen = /^-+([^=]+?)-$/;
- // e.g. '-abc123'
- const flagEndingInDigits = /^-+([^=]+?\d+)$/;
- // e.g. '-a/usr/local'
- const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/;
- // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method
- return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);
- }
- // make a best effort to pick a default value
- // for an option based on name and type.
- function defaultValue(key) {
- if (!checkAllAliases(key, flags.bools) &&
- !checkAllAliases(key, flags.counts) &&
- `${key}` in defaults) {
- return defaults[key];
- }
- else {
- return defaultForType(guessType(key));
- }
- }
- // return a default value, given the type of a flag.,
- function defaultForType(type) {
- const def = {
- [DefaultValuesForTypeKey.BOOLEAN]: true,
- [DefaultValuesForTypeKey.STRING]: '',
- [DefaultValuesForTypeKey.NUMBER]: undefined,
- [DefaultValuesForTypeKey.ARRAY]: []
- };
- return def[type];
- }
- // given a flag, enforce a default type.
- function guessType(key) {
- let type = DefaultValuesForTypeKey.BOOLEAN;
- if (checkAllAliases(key, flags.strings))
- type = DefaultValuesForTypeKey.STRING;
- else if (checkAllAliases(key, flags.numbers))
- type = DefaultValuesForTypeKey.NUMBER;
- else if (checkAllAliases(key, flags.bools))
- type = DefaultValuesForTypeKey.BOOLEAN;
- else if (checkAllAliases(key, flags.arrays))
- type = DefaultValuesForTypeKey.ARRAY;
- return type;
- }
- function isUndefined(num) {
- return num === undefined;
- }
- // check user configuration settings for inconsistencies
- function checkConfiguration() {
- // count keys should not be set as array/narg
- Object.keys(flags.counts).find(key => {
- if (checkAllAliases(key, flags.arrays)) {
- error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key));
- return true;
- }
- else if (checkAllAliases(key, flags.nargs)) {
- error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key));
- return true;
- }
- return false;
- });
- }
- return {
- aliases: Object.assign({}, flags.aliases),
- argv: Object.assign(argvReturn, argv),
- configuration: configuration,
- defaulted: Object.assign({}, defaulted),
- error: error,
- newAliases: Object.assign({}, newAliases)
- };
- }
-}
-// if any aliases reference each other, we should
-// merge them together.
-function combineAliases(aliases) {
- const aliasArrays = [];
- const combined = Object.create(null);
- let change = true;
- // turn alias lookup hash {key: ['alias1', 'alias2']} into
- // a simple array ['key', 'alias1', 'alias2']
- Object.keys(aliases).forEach(function (key) {
- aliasArrays.push([].concat(aliases[key], key));
- });
- // combine arrays until zero changes are
- // made in an iteration.
- while (change) {
- change = false;
- for (let i = 0; i < aliasArrays.length; i++) {
- for (let ii = i + 1; ii < aliasArrays.length; ii++) {
- const intersect = aliasArrays[i].filter(function (v) {
- return aliasArrays[ii].indexOf(v) !== -1;
- });
- if (intersect.length) {
- aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);
- aliasArrays.splice(ii, 1);
- change = true;
- break;
- }
- }
- }
- }
- // map arrays back to the hash-lookup (de-dupe while
- // we're at it).
- aliasArrays.forEach(function (aliasArray) {
- aliasArray = aliasArray.filter(function (v, i, self) {
- return self.indexOf(v) === i;
- });
- const lastAlias = aliasArray.pop();
- if (lastAlias !== undefined && typeof lastAlias === 'string') {
- combined[lastAlias] = aliasArray;
- }
- });
- return combined;
-}
-// this function should only be called when a count is given as an arg
-// it is NOT called to set a default value
-// thus we can start the count at 1 instead of 0
-function increment(orig) {
- return orig !== undefined ? orig + 1 : 1;
-}
-// TODO(bcoe): in the next major version of yargs, switch to
-// Object.create(null) for dot notation:
-function sanitizeKey(key) {
- if (key === '__proto__')
- return '___proto___';
- return key;
-}
-function stripQuotes(val) {
- return (typeof val === 'string' &&
- (val[0] === "'" || val[0] === '"') &&
- val[val.length - 1] === val[0])
- ? val.substring(1, val.length - 1)
- : val;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs-parser/package.json b/node_modules/@puppeteer/replay/node_modules/yargs-parser/package.json
deleted file mode 100644
index decd0c3..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs-parser/package.json
+++ /dev/null
@@ -1,92 +0,0 @@
-{
- "name": "yargs-parser",
- "version": "21.1.1",
- "description": "the mighty option parser used by yargs",
- "main": "build/index.cjs",
- "exports": {
- ".": [
- {
- "import": "./build/lib/index.js",
- "require": "./build/index.cjs"
- },
- "./build/index.cjs"
- ],
- "./browser": [
- "./browser.js"
- ]
- },
- "type": "module",
- "module": "./build/lib/index.js",
- "scripts": {
- "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'",
- "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'",
- "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs",
- "test": "c8 --reporter=text --reporter=html mocha test/*.cjs",
- "test:esm": "c8 --reporter=text --reporter=html mocha test/*.mjs",
- "test:browser": "start-server-and-test 'serve ./ -p 8080' http://127.0.0.1:8080/package.json 'node ./test/browser/yargs-test.cjs'",
- "pretest:typescript": "npm run pretest",
- "test:typescript": "c8 mocha ./build/test/typescript/*.js",
- "coverage": "c8 report --check-coverage",
- "precompile": "rimraf build",
- "compile": "tsc",
- "postcompile": "npm run build:cjs",
- "build:cjs": "rollup -c",
- "prepare": "npm run compile"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/yargs/yargs-parser.git"
- },
- "keywords": [
- "argument",
- "parser",
- "yargs",
- "command",
- "cli",
- "parsing",
- "option",
- "args",
- "argument"
- ],
- "author": "Ben Coe <[email protected]>",
- "license": "ISC",
- "devDependencies": {
- "@types/chai": "^4.2.11",
- "@types/mocha": "^9.0.0",
- "@types/node": "^16.11.4",
- "@typescript-eslint/eslint-plugin": "^3.10.1",
- "@typescript-eslint/parser": "^3.10.1",
- "c8": "^7.3.0",
- "chai": "^4.2.0",
- "cross-env": "^7.0.2",
- "eslint": "^7.0.0",
- "eslint-plugin-import": "^2.20.1",
- "eslint-plugin-node": "^11.0.0",
- "gts": "^3.0.0",
- "mocha": "^10.0.0",
- "puppeteer": "^16.0.0",
- "rimraf": "^3.0.2",
- "rollup": "^2.22.1",
- "rollup-plugin-cleanup": "^3.1.1",
- "rollup-plugin-ts": "^3.0.2",
- "serve": "^14.0.0",
- "standardx": "^7.0.0",
- "start-server-and-test": "^1.11.2",
- "ts-transform-default-export": "^1.0.2",
- "typescript": "^4.0.0"
- },
- "files": [
- "browser.js",
- "build",
- "!*.d.ts",
- "!*.d.cts"
- ],
- "engines": {
- "node": ">=12"
- },
- "standardx": {
- "ignore": [
- "build"
- ]
- }
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/LICENSE b/node_modules/@puppeteer/replay/node_modules/yargs/LICENSE
deleted file mode 100644
index b0145ca..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright 2010 James Halliday ([email protected]); Modified work Copyright 2014 Contributors ([email protected])
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/README.md b/node_modules/@puppeteer/replay/node_modules/yargs/README.md
deleted file mode 100644
index 51f5b22..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/README.md
+++ /dev/null
@@ -1,204 +0,0 @@
-<p align="center">
- <img width="250" src="https://raw.githubusercontent.com/yargs/yargs/main/yargs-logo.png">
-</p>
-<h1 align="center"> Yargs </h1>
-<p align="center">
- <b >Yargs be a node.js library fer hearties tryin' ter parse optstrings</b>
-</p>
-
-<br>
-
-
-[![NPM version][npm-image]][npm-url]
-[![js-standard-style][standard-image]][standard-url]
-[![Coverage][coverage-image]][coverage-url]
-[![Conventional Commits][conventional-commits-image]][conventional-commits-url]
-[![Slack][slack-image]][slack-url]
-
-## Description
-Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.
-
-It gives you:
-
-* commands and (grouped) options (`my-program.js serve --port=5000`).
-* a dynamically generated help menu based on your arguments:
-
-```
-mocha [spec..]
-
-Run tests with Mocha
-
-Commands
- mocha inspect [spec..] Run tests with Mocha [default]
- mocha init <path> create a client-side Mocha setup at <path>
-
-Rules & Behavior
- --allow-uncaught Allow uncaught errors to propagate [boolean]
- --async-only, -A Require all tests to use a callback (async) or
- return a Promise [boolean]
-```
-
-* bash-completion shortcuts for commands and options.
-* and [tons more](/docs/api.md).
-
-## Installation
-
-Stable version:
-```bash
-npm i yargs
-```
-
-Bleeding edge version with the most recent features:
-```bash
-npm i yargs@next
-```
-
-## Usage
-
-### Simple Example
-
-```javascript
-#!/usr/bin/env node
-const yargs = require('yargs/yargs')
-const { hideBin } = require('yargs/helpers')
-const argv = yargs(hideBin(process.argv)).argv
-
-if (argv.ships > 3 && argv.distance < 53.5) {
- console.log('Plunder more riffiwobbles!')
-} else {
- console.log('Retreat from the xupptumblers!')
-}
-```
-
-```bash
-$ ./plunder.js --ships=4 --distance=22
-Plunder more riffiwobbles!
-
-$ ./plunder.js --ships 12 --distance 98.7
-Retreat from the xupptumblers!
-```
-
-> Note: `hideBin` is a shorthand for [`process.argv.slice(2)`](https://nodejs.org/en/knowledge/command-line/how-to-parse-command-line-arguments/). It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690).
-
-### Complex Example
-
-```javascript
-#!/usr/bin/env node
-const yargs = require('yargs/yargs')
-const { hideBin } = require('yargs/helpers')
-
-yargs(hideBin(process.argv))
- .command('serve [port]', 'start the server', (yargs) => {
- return yargs
- .positional('port', {
- describe: 'port to bind on',
- default: 5000
- })
- }, (argv) => {
- if (argv.verbose) console.info(`start server on :${argv.port}`)
- serve(argv.port)
- })
- .option('verbose', {
- alias: 'v',
- type: 'boolean',
- description: 'Run with verbose logging'
- })
- .parse()
-```
-
-Run the example above with `--help` to see the help for the application.
-
-## Supported Platforms
-
-### TypeScript
-
-yargs has type definitions at [@types/yargs][type-definitions].
-
-```
-npm i @types/yargs --save-dev
-```
-
-See usage examples in [docs](/docs/typescript.md).
-
-### Deno
-
-As of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno):
-
-```typescript
-import yargs from 'https://deno.land/x/yargs/deno.ts'
-import { Arguments } from 'https://deno.land/x/yargs/deno-types.ts'
-
-yargs(Deno.args)
- .command('download <files...>', 'download a list of files', (yargs: any) => {
- return yargs.positional('files', {
- describe: 'a list of files to do something with'
- })
- }, (argv: Arguments) => {
- console.info(argv)
- })
- .strictCommands()
- .demandCommand(1)
- .parse()
-```
-
-### ESM
-
-As of `v16`,`yargs` supports ESM imports:
-
-```js
-import yargs from 'yargs'
-import { hideBin } from 'yargs/helpers'
-
-yargs(hideBin(process.argv))
- .command('curl <url>', 'fetch the contents of the URL', () => {}, (argv) => {
- console.info(argv)
- })
- .demandCommand(1)
- .parse()
-```
-
-### Usage in Browser
-
-See examples of using yargs in the browser in [docs](/docs/browser.md).
-
-## Community
-
-Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com).
-
-## Documentation
-
-### Table of Contents
-
-* [Yargs' API](/docs/api.md)
-* [Examples](/docs/examples.md)
-* [Parsing Tricks](/docs/tricks.md)
- * [Stop the Parser](/docs/tricks.md#stop)
- * [Negating Boolean Arguments](/docs/tricks.md#negate)
- * [Numbers](/docs/tricks.md#numbers)
- * [Arrays](/docs/tricks.md#arrays)
- * [Objects](/docs/tricks.md#objects)
- * [Quotes](/docs/tricks.md#quotes)
-* [Advanced Topics](/docs/advanced.md)
- * [Composing Your App Using Commands](/docs/advanced.md#commands)
- * [Building Configurable CLI Apps](/docs/advanced.md#configuration)
- * [Customizing Yargs' Parser](/docs/advanced.md#customizing)
- * [Bundling yargs](/docs/bundling.md)
-* [Contributing](/contributing.md)
-
-## Supported Node.js Versions
-
-Libraries in this ecosystem make a best effort to track
-[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a
-post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
-
-[npm-url]: https://www.npmjs.com/package/yargs
-[npm-image]: https://img.shields.io/npm/v/yargs.svg
-[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
-[standard-url]: http://standardjs.com/
-[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
-[conventional-commits-url]: https://conventionalcommits.org/
-[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg
-[slack-url]: http://devtoolscommunity.herokuapp.com
-[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
-[coverage-image]: https://img.shields.io/nycrc/yargs/yargs
-[coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/browser.d.ts b/node_modules/@puppeteer/replay/node_modules/yargs/browser.d.ts
deleted file mode 100644
index 21f3fc6..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/browser.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import {YargsFactory} from './build/lib/yargs-factory';
-
-declare const Yargs: ReturnType<typeof YargsFactory>;
-
-export default Yargs;
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/browser.mjs b/node_modules/@puppeteer/replay/node_modules/yargs/browser.mjs
deleted file mode 100644
index 2d0d6e9..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/browser.mjs
+++ /dev/null
@@ -1,7 +0,0 @@
-// Bootstrap yargs for browser:
-import browserPlatformShim from './lib/platform-shims/browser.mjs';
-import {YargsFactory} from './build/lib/yargs-factory.js';
-
-const Yargs = YargsFactory(browserPlatformShim);
-
-export default Yargs;
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/index.cjs b/node_modules/@puppeteer/replay/node_modules/yargs/build/index.cjs
deleted file mode 100644
index e9cf013..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/index.cjs
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";var t=require("assert");class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}let s,i=[];function n(t,o,a,h){s=h;let l={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return l;const r=/\.json|\..*rc$/.test(t.extends);let h=null;if(r)h=function(t,e){return s.path.resolve(t,e)}(o,t.extends);else try{h=require.resolve(t.extends)}catch(e){return t}!function(t){if(i.indexOf(t)>-1)throw new e(`Circular extended configurations: '${t}'.`)}(h),i.push(h),l=r?JSON.parse(s.readFileSync(h,"utf8")):require(t.extends),delete t.extends,l=n(l,s.path.dirname(h),a,s)}return i=[],a?r(l,t):Object.assign({},l,t)}function r(t,e){const s={};function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}Object.assign(s,t);for(const n of Object.keys(e))i(e[n])&&i(s[n])?s[n]=r(t[n],e[n]):s[n]=e[n];return s}function o(t){const e=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),s=/\.*[\][<>]/g,i=e.shift();if(!i)throw new Error(`No command found in: ${t}`);const n={cmd:i.replace(s,""),demanded:[],optional:[]};return e.forEach(((t,i)=>{let r=!1;t=t.replace(/\s/g,""),/\.+[\]>]/.test(t)&&i===e.length-1&&(r=!0),/^\[/.test(t)?n.optional.push({cmd:t.replace(s,"").split("|"),variadic:r}):n.demanded.push({cmd:t.replace(s,"").split("|"),variadic:r})})),n}const a=["first","second","third","fourth","fifth","sixth"];function h(t,s,i){try{let n=0;const[r,a,h]="object"==typeof t?[{demanded:[],optional:[]},t,s]:[o(`cmd ${t}`),s,i],f=[].slice.call(a);for(;f.length&&void 0===f[f.length-1];)f.pop();const d=h||f.length;if(d<r.demanded.length)throw new e(`Not enough arguments provided. Expected ${r.demanded.length} but received ${f.length}.`);const u=r.demanded.length+r.optional.length;if(d>u)throw new e(`Too many arguments provided. Expected max ${u} but received ${d}.`);r.demanded.forEach((t=>{const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1})),r.optional.forEach((t=>{if(0===f.length)return;const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1}))}catch(t){console.warn(t.stack)}}function l(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function c(t,s,i){throw new e(`Invalid ${a[i]||"manyith"} argument. Expected ${s.join(" or ")} but received ${t}.`)}function f(t){return!!t&&!!t.then&&"function"==typeof t.then}function d(t,e,s,i){s.assert.notStrictEqual(t,e,i)}function u(t,e){e.assert.strictEqual(typeof t,"string")}function p(t){return Object.keys(t)}function g(t={},e=(()=>!0)){const s={};return p(t).forEach((i=>{e(i,t[i])&&(s[i]=t[i])})),s}function m(){return process.versions.electron&&!process.defaultApp?0:1}function y(){return process.argv[m()]}var b=Object.freeze({__proto__:null,hideBin:function(t){return t.slice(m()+1)},getProcessArgvBin:y});function v(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)}function O(t,e,s,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(t,s):n?n.value=s:e.set(t,s),s}class w{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,e,s=!0,i=!1){if(h("<array|function> [boolean] [boolean] [boolean]",[t,e,s],arguments.length),Array.isArray(t)){for(let i=0;i<t.length;i++){if("function"!=typeof t[i])throw Error("middleware must be a function");const n=t[i];n.applyBeforeValidation=e,n.global=s}Array.prototype.push.apply(this.globalMiddleware,t)}else if("function"==typeof t){const n=t;n.applyBeforeValidation=e,n.global=s,n.mutates=i,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,e){const s=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((t=>{const i=[...s[e]||[],e];return!t.option||!i.includes(t.option)})),t.option=e,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const t=this.frozens.pop();void 0!==t&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter((t=>t.global))}}function C(t,e,s,i){return s.reduce(((t,s)=>{if(s.applyBeforeValidation!==i)return t;if(s.mutates){if(s.applied)return t;s.applied=!0}if(f(t))return t.then((t=>Promise.all([t,s(t,e)]))).then((([t,e])=>Object.assign(t,e)));{const i=s(t,e);return f(i)?i.then((e=>Object.assign(t,e))):Object.assign(t,i)}}),t)}function j(t,e,s=(t=>{throw t})){try{const s="function"==typeof t?t():t;return f(s)?s.then((t=>e(t))):e(s)}catch(t){return s(t)}}const M=/(^\*)|(^\$0)/;class _{constructor(t,e,s,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=s,this.validation=e}addDirectory(t,e,s,i){"boolean"!=typeof(i=i||{}).recurse&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const n="function"==typeof i.visit?i.visit:t=>t;i.visit=(t,e,s)=>{const i=n(t,e,s);if(i){if(this.requireCache.has(e))return i;this.requireCache.add(e),this.addHandler(i)}return i},this.shim.requireDirectory({require:e,filename:s},t,i)}addHandler(t,e,s,i,n,r){let a=[];const h=function(t){return t?t.map((t=>(t.applyBeforeValidation=!1,t))):[]}(n);if(i=i||(()=>{}),Array.isArray(t))if(function(t){return t.every((t=>"string"==typeof t))}(t))[t,...a]=t;else for(const e of t)this.addHandler(e);else{if(function(t){return"object"==typeof t&&!Array.isArray(t)}(t)){let e=Array.isArray(t.command)||"string"==typeof t.command?t.command:this.moduleName(t);return t.aliases&&(e=[].concat(e).concat(t.aliases)),void this.addHandler(e,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated)}if(k(s))return void this.addHandler([t].concat(a),e,s.builder,s.handler,s.middlewares,s.deprecated)}if("string"==typeof t){const n=o(t);a=a.map((t=>o(t).cmd));let l=!1;const c=[n.cmd].concat(a).filter((t=>!M.test(t)||(l=!0,!1)));0===c.length&&l&&c.push("$0"),l&&(n.cmd=c[0],a=c.slice(1),t=t.replace(M,n.cmd)),a.forEach((t=>{this.aliasMap[t]=n.cmd})),!1!==e&&this.usage.command(t,e,l,a,r),this.handlers[n.cmd]={original:t,description:e,handler:i,builder:s||{},middlewares:h,deprecated:r,demanded:n.demanded,optional:n.optional},l&&(this.defaultCommand=this.handlers[n.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,e,s,i,n,r){const o=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,a=e.getInternalMethods().getContext(),h=a.commands.slice(),l=!t;t&&(a.commands.push(t),a.fullCommands.push(o.original));const c=this.applyBuilderUpdateUsageAndParse(l,o,e,s.aliases,h,i,n,r);return f(c)?c.then((t=>this.applyMiddlewareAndGetResult(l,o,t.innerArgv,a,n,t.aliases,e))):this.applyMiddlewareAndGetResult(l,o,c.innerArgv,a,n,c.aliases,e)}applyBuilderUpdateUsageAndParse(t,e,s,i,n,r,o,a){const h=e.builder;let l=s;if(x(h)){s.getInternalMethods().getUsageInstance().freeze();const c=h(s.getInternalMethods().reset(i),a);if(f(c))return c.then((i=>{var a;return l=(a=i)&&"function"==typeof a.getInternalMethods?i:s,this.parseAndUpdateUsage(t,e,l,n,r,o)}))}else(function(t){return"object"==typeof t})(h)&&(s.getInternalMethods().getUsageInstance().freeze(),l=s.getInternalMethods().reset(i),Object.keys(e.builder).forEach((t=>{l.option(t,h[t])})));return this.parseAndUpdateUsage(t,e,l,n,r,o)}parseAndUpdateUsage(t,e,s,i,n,r){t&&s.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(s)&&s.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,e),e.description);const o=s.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,n,r);return f(o)?o.then((t=>({aliases:s.parsed.aliases,innerArgv:t}))):{aliases:s.parsed.aliases,innerArgv:o}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===t.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(t,e){const s=M.test(e.original)?e.original.replace(M,"").trim():e.original,i=t.filter((t=>!M.test(t)));return i.push(s),`$0 ${i.join(" ")}`}handleValidationAndGetResult(t,e,s,i,n,r,o,a){if(!r.getInternalMethods().getHasOutput()){const e=r.getInternalMethods().runValidation(n,a,r.parsed.error,t);s=j(s,(t=>(e(t),t)))}if(e.handler&&!r.getInternalMethods().getHasOutput()){r.getInternalMethods().setHasOutput();const i=!!r.getOptions().configuration["populate--"];r.getInternalMethods().postProcess(s,i,!1,!1),s=j(s=C(s,r,o,!1),(t=>{const s=e.handler(t);return f(s)?s.then((()=>t)):t})),t||r.getInternalMethods().getUsageInstance().cacheHelpMessage(),f(s)&&!r.getInternalMethods().hasParseCallback()&&s.catch((t=>{try{r.getInternalMethods().getUsageInstance().fail(null,t)}catch(t){}}))}return t||(i.commands.pop(),i.fullCommands.pop()),s}applyMiddlewareAndGetResult(t,e,s,i,n,r,o){let a={};if(n)return s;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(e,s,i,o));const h=this.globalMiddleware.getMiddleware().slice(0).concat(e.middlewares),l=C(s,o,h,!0);return f(l)?l.then((s=>this.handleValidationAndGetResult(t,e,s,i,r,o,h,a))):this.handleValidationAndGetResult(t,e,l,i,r,o,h,a)}populatePositionals(t,e,s,i){e._=e._.slice(s.commands.length);const n=t.demanded.slice(0),r=t.optional.slice(0),o={};for(this.validation.positionalCount(n.length,e._.length);n.length;){const t=n.shift();this.populatePositional(t,e,o)}for(;r.length;){const t=r.shift();this.populatePositional(t,e,o)}return e._=s.commands.concat(e._.map((t=>""+t))),this.postProcessPositionals(e,o,this.cmdToParseOptions(t.original),i),o}populatePositional(t,e,s){const i=t.cmd[0];t.variadic?s[i]=e._.splice(0).map(String):e._.length&&(s[i]=[String(e._.shift())])}cmdToParseOptions(t){const e={array:[],default:{},alias:{},demand:{}},s=o(t);return s.demanded.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i,e.demand[s]=!0})),s.optional.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i})),e}postProcessPositionals(t,e,s,i){const n=Object.assign({},i.getOptions());n.default=Object.assign(s.default,n.default);for(const t of Object.keys(s.alias))n.alias[t]=(n.alias[t]||[]).concat(s.alias[t]);n.array=n.array.concat(s.array),n.config={};const r=[];if(Object.keys(e).forEach((t=>{e[t].map((e=>{n.configuration["unknown-options-as-args"]&&(n.key[t]=!0),r.push(`--${t}`),r.push(e)}))})),!r.length)return;const o=Object.assign({},n.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(r,Object.assign({},n,{configuration:o}));if(a.error)i.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const s=Object.keys(e);Object.keys(e).forEach((t=>{s.push(...a.aliases[t])})),Object.keys(a.argv).forEach((n=>{s.includes(n)&&(e[n]||(e[n]=a.argv[n]),!this.isInConfigs(i,n)&&!this.isDefaulted(i,n)&&Object.prototype.hasOwnProperty.call(t,n)&&Object.prototype.hasOwnProperty.call(a.argv,n)&&(Array.isArray(t[n])||Array.isArray(a.argv[n]))?t[n]=[].concat(t[n],a.argv[n]):t[n]=a.argv[n])}))}}isDefaulted(t,e){const{default:s}=t.getOptions();return Object.prototype.hasOwnProperty.call(s,e)||Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(e))}isInConfigs(t,e){const{configObjects:s}=t.getOptions();return s.some((t=>Object.prototype.hasOwnProperty.call(t,e)))||s.some((t=>Object.prototype.hasOwnProperty.call(t,this.shim.Parser.camelCase(e))))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){const e=M.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(e,this.defaultCommand.description)}const e=this.defaultCommand.builder;if(x(e))return e(t,!0);k(e)||Object.keys(e).forEach((s=>{t.option(s,e[s])}))}moduleName(t){const e=function(t){if("undefined"==typeof require)return null;for(let e,s=0,i=Object.keys(require.cache);s<i.length;s++)if(e=require.cache[i[s]],e.exports===t)return e;return null}(t);if(!e)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(e.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:e,desc:s}){for(const i of[t,e,s]){if("string"==typeof i||!1===i)return i;d(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const t=this.frozens.pop();d(t,void 0,this.shim),({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t)}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function k(t){return"object"==typeof t&&!!t.builder&&"function"==typeof t.handler}function x(t){return"function"==typeof t}function E(t){"undefined"!=typeof process&&[process.stdout,process.stderr].forEach((e=>{const s=e;s._handle&&s.isTTY&&"function"==typeof s._handle.setBlocking&&s._handle.setBlocking(t)}))}function A(t){return"boolean"==typeof t}function P(t,s){const i=s.y18n.__,n={},r=[];n.failFn=function(t){r.push(t)};let o=null,a=null,h=!0;n.showHelpOnFail=function(e=!0,s){const[i,r]="string"==typeof e?[!0,e]:[e,s];return t.getInternalMethods().isGlobalContext()&&(a=r),o=r,h=i,n};let l=!1;n.fail=function(s,i){const c=t.getInternalMethods().getLoggerInstance();if(!r.length){if(t.getExitProcess()&&E(!0),!l){l=!0,h&&(t.showHelp("error"),c.error()),(s||i)&&c.error(s||i);const e=o||a;e&&((s||i)&&c.error(""),c.error(e))}if(i=i||new e(s),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,i);throw i}for(let t=r.length-1;t>=0;--t){const e=r[t];if(A(e)){if(i)throw i;if(s)throw Error(s)}else e(s,i,n)}};let c=[],f=!1;n.usage=(t,e)=>null===t?(f=!0,c=[],n):(f=!1,c.push([t,e||""]),n),n.getUsage=()=>c,n.getUsageDisabled=()=>f,n.getPositionalGroupName=()=>i("Positionals:");let d=[];n.example=(t,e)=>{d.push([t,e||""])};let u=[];n.command=function(t,e,s,i,n=!1){s&&(u=u.map((t=>(t[2]=!1,t)))),u.push([t,e||"",s,i,n])},n.getCommands=()=>u;let p={};n.describe=function(t,e){Array.isArray(t)?t.forEach((t=>{n.describe(t,e)})):"object"==typeof t?Object.keys(t).forEach((e=>{n.describe(e,t[e])})):p[t]=e},n.getDescriptions=()=>p;let m=[];n.epilog=t=>{m.push(t)};let y,b=!1;n.wrap=t=>{b=!0,y=t},n.getWrap=()=>s.getEnv("YARGS_DISABLE_WRAP")?null:(b||(y=function(){const t=80;return s.process.stdColumns?Math.min(t,s.process.stdColumns):t}(),b=!0),y);const v="__yargsString__:";function O(t,e,i){let n=0;return Array.isArray(t)||(t=Object.values(t).map((t=>[t]))),t.forEach((t=>{n=Math.max(s.stringWidth(i?`${i} ${I(t[0])}`:I(t[0]))+$(t[0]),n)})),e&&(n=Math.min(n,parseInt((.5*e).toString(),10))),n}let w;function C(e){return t.getOptions().hiddenOptions.indexOf(e)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}function j(t,e){let s=`[${i("default:")} `;if(void 0===t&&!e)return null;if(e)s+=e;else switch(typeof t){case"string":s+=`"${t}"`;break;case"object":s+=JSON.stringify(t);break;default:s+=t}return`${s}]`}n.deferY18nLookup=t=>v+t,n.help=function(){if(w)return w;!function(){const e=t.getDemandedOptions(),s=t.getOptions();(Object.keys(s.alias)||[]).forEach((i=>{s.alias[i].forEach((r=>{p[r]&&n.describe(i,p[r]),r in e&&t.demandOption(i,e[r]),s.boolean.includes(r)&&t.boolean(i),s.count.includes(r)&&t.count(i),s.string.includes(r)&&t.string(i),s.normalize.includes(r)&&t.normalize(i),s.array.includes(r)&&t.array(i),s.number.includes(r)&&t.number(i)}))}))}();const e=t.customScriptName?t.$0:s.path.basename(t.$0),r=t.getDemandedOptions(),o=t.getDemandedCommands(),a=t.getDeprecatedOptions(),h=t.getGroups(),l=t.getOptions();let g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(r)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(l.default)),g=g.filter(C),g=Object.keys(g.reduce(((t,e)=>("_"!==e&&(t[e]=!0),t)),{}));const y=n.getWrap(),b=s.cliui({width:y,wrap:!!y});if(!f)if(c.length)c.forEach((t=>{b.div({text:`${t[0].replace(/\$0/g,e)}`}),t[1]&&b.div({text:`${t[1]}`,padding:[1,0,0,0]})})),b.div();else if(u.length){let t=null;t=o._?`${e} <${i("command")}>\n`:`${e} [${i("command")}]\n`,b.div(`${t}`)}if(u.length>1||1===u.length&&!u[0][2]){b.div(i("Commands:"));const s=t.getInternalMethods().getContext(),n=s.commands.length?`${s.commands.join(" ")} `:"";!0===t.getInternalMethods().getParserConfiguration()["sort-commands"]&&(u=u.sort(((t,e)=>t[0].localeCompare(e[0]))));const r=e?`${e} `:"";u.forEach((t=>{const s=`${r}${n}${t[0].replace(/^\$0 ?/,"")}`;b.span({text:s,padding:[0,2,0,2],width:O(u,y,`${e}${n}`)+4},{text:t[1]});const o=[];t[2]&&o.push(`[${i("default")}]`),t[3]&&t[3].length&&o.push(`[${i("aliases:")} ${t[3].join(", ")}]`),t[4]&&("string"==typeof t[4]?o.push(`[${i("deprecated: %s",t[4])}]`):o.push(`[${i("deprecated")}]`)),o.length?b.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):b.div()})),b.div()}const M=(Object.keys(l.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);g=g.filter((e=>!t.parsed.newAliases[e]&&M.every((t=>-1===(l.alias[t]||[]).indexOf(e)))));const _=i("Options:");h[_]||(h[_]=[]),function(t,e,s,i){let n=[],r=null;Object.keys(s).forEach((t=>{n=n.concat(s[t])})),t.forEach((t=>{r=[t].concat(e[t]),r.some((t=>-1!==n.indexOf(t)))||s[i].push(t)}))}(g,l.alias,h,_);const k=t=>/^--/.test(I(t)),x=Object.keys(h).filter((t=>h[t].length>0)).map((t=>({groupName:t,normalizedKeys:h[t].filter(C).map((t=>{if(M.includes(t))return t;for(let e,s=0;void 0!==(e=M[s]);s++)if((l.alias[e]||[]).includes(t))return e;return t}))}))).filter((({normalizedKeys:t})=>t.length>0)).map((({groupName:t,normalizedKeys:e})=>{const s=e.reduce(((e,s)=>(e[s]=[s].concat(l.alias[s]||[]).map((e=>t===n.getPositionalGroupName()?e:(/^[0-9]$/.test(e)?l.boolean.includes(s)?"-":"--":e.length>1?"--":"-")+e)).sort(((t,e)=>k(t)===k(e)?0:k(t)?1:-1)).join(", "),e)),{});return{groupName:t,normalizedKeys:e,switches:s}}));if(x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).some((({normalizedKeys:t,switches:e})=>!t.every((t=>k(e[t])))))&&x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).forEach((({normalizedKeys:t,switches:e})=>{t.forEach((t=>{var s,i;k(e[t])&&(e[t]=(s=e[t],i=4,S(s)?{text:s.text,indentation:s.indentation+i}:{text:s,indentation:i}))}))})),x.forEach((({groupName:e,normalizedKeys:s,switches:o})=>{b.div(e),s.forEach((e=>{const s=o[e];let h=p[e]||"",c=null;h.includes(v)&&(h=i(h.substring(16))),l.boolean.includes(e)&&(c=`[${i("boolean")}]`),l.count.includes(e)&&(c=`[${i("count")}]`),l.string.includes(e)&&(c=`[${i("string")}]`),l.normalize.includes(e)&&(c=`[${i("string")}]`),l.array.includes(e)&&(c=`[${i("array")}]`),l.number.includes(e)&&(c=`[${i("number")}]`);const f=[e in a?(d=a[e],"string"==typeof d?`[${i("deprecated: %s",d)}]`:`[${i("deprecated")}]`):null,c,e in r?`[${i("required")}]`:null,l.choices&&l.choices[e]?`[${i("choices:")} ${n.stringifiedValues(l.choices[e])}]`:null,j(l.default[e],l.defaultDescription[e])].filter(Boolean).join(" ");var d;b.span({text:I(s),padding:[0,2,0,2+$(s)],width:O(o,y)+4},h);const u=!0===t.getInternalMethods().getUsageConfiguration()["hide-types"];f&&!u?b.div({text:f,padding:[0,0,0,2],align:"right"}):b.div()})),b.div()})),d.length&&(b.div(i("Examples:")),d.forEach((t=>{t[0]=t[0].replace(/\$0/g,e)})),d.forEach((t=>{""===t[1]?b.div({text:t[0],padding:[0,2,0,2]}):b.div({text:t[0],padding:[0,2,0,2],width:O(d,y)+4},{text:t[1]})})),b.div()),m.length>0){const t=m.map((t=>t.replace(/\$0/g,e))).join("\n");b.div(`${t}\n`)}return b.toString().replace(/\s*$/,"")},n.cacheHelpMessage=function(){w=this.help()},n.clearCachedHelpMessage=function(){w=void 0},n.hasCachedHelpMessage=function(){return!!w},n.showHelp=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(n.help())},n.functionDescription=t=>["(",t.name?s.Parser.decamelize(t.name,"-"):i("generated-value"),")"].join(""),n.stringifiedValues=function(t,e){let s="";const i=e||", ",n=[].concat(t);return t&&n.length?(n.forEach((t=>{s.length&&(s+=i),s+=JSON.stringify(t)})),s):s};let M=null;n.version=t=>{M=t},n.showVersion=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(M)},n.reset=function(t){return o=null,l=!1,c=[],f=!1,m=[],d=[],u=[],p=g(p,(e=>!t[e])),n};const _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p})},n.unfreeze=function(t=!1){const e=_.pop();e&&(t?(p={...e.descriptions,...p},u=[...e.commands,...u],c=[...e.usages,...c],d=[...e.examples,...d],m=[...e.epilogs,...m]):({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p}=e))},n}function S(t){return"object"==typeof t}function $(t){return S(t)?t.indentation:0}function I(t){return S(t)?t.text:t}class D{constructor(t,e,s,i){var n,r,o;this.yargs=t,this.usage=e,this.command=s,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(n=this.shim.getEnv("SHELL"))||void 0===n?void 0:n.includes("zsh"))||(null===(r=this.shim.getEnv("ZSH_NAME"))||void 0===r?void 0:r.includes("zsh")))&&void 0!==o&&o}defaultCompletion(t,e,s,i){const n=this.command.getCommandHandlers();for(let e=0,s=t.length;e<s;++e)if(n[t[e]]&&n[t[e]].builder){const s=n[t[e]].builder;if(x(s)){this.indexAfterLastReset=e+1;const t=this.yargs.getInternalMethods().reset();return s(t,!0),t.argv}}const r=[];this.commandCompletions(r,t,s),this.optionCompletions(r,t,e,s),this.choicesFromOptionsCompletions(r,t,e,s),this.choicesFromPositionalsCompletions(r,t,e,s),i(null,r)}commandCompletions(t,e,s){const i=this.yargs.getInternalMethods().getContext().commands;s.match(/^-/)||i[i.length-1]===s||this.previousArgHasChoices(e)||this.usage.getCommands().forEach((s=>{const i=o(s[0]).cmd;if(-1===e.indexOf(i))if(this.zshShell){const e=s[1]||"";t.push(i.replace(/:/g,"\\:")+":"+e)}else t.push(i)}))}optionCompletions(t,e,s,i){if((i.match(/^-/)||""===i&&0===t.length)&&!this.previousArgHasChoices(e)){const s=this.yargs.getOptions(),n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach((r=>{const o=!!s.configuration["boolean-negation"]&&s.boolean.includes(r);n.includes(r)||s.hiddenOptions.includes(r)||this.argsContainKey(e,r,o)||this.completeOptionKey(r,t,i,o&&!!s.default[r])}))}}choicesFromOptionsCompletions(t,e,s,i){if(this.previousArgHasChoices(e)){const s=this.getPreviousArgChoices(e);s&&s.length>0&&t.push(...s.map((t=>t.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(t,e,s,i){if(""===i&&t.length>0&&this.previousArgHasChoices(e))return;const n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],r=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=n[s._.length-r-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const e of a)e.startsWith(i)&&t.push(e.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let e=t[t.length-1],s="";if(!e.startsWith("-")&&t.length>1&&(s=e,e=t[t.length-2]),!e.startsWith("-"))return;const i=e.replace(/^-+/,""),n=this.yargs.getOptions(),r=[i,...this.yargs.getAliases()[i]||[]];let o;for(const t of r)if(Object.prototype.hasOwnProperty.call(n.key,t)&&Array.isArray(n.choices[t])){o=n.choices[t];break}return o?o.filter((t=>!s||t.startsWith(s))):void 0}previousArgHasChoices(t){const e=this.getPreviousArgChoices(t);return void 0!==e&&e.length>0}argsContainKey(t,e,s){const i=e=>-1!==t.indexOf((/^[^0-9]$/.test(e)?"-":"--")+e);if(i(e))return!0;if(s&&i(`no-${e}`))return!0;if(this.aliases)for(const t of this.aliases[e])if(i(t))return!0;return!1}completeOptionKey(t,e,s,i){var n,r,o,a;let h=t;if(this.zshShell){const e=this.usage.getDescriptions(),s=null===(r=null===(n=null==this?void 0:this.aliases)||void 0===n?void 0:n[t])||void 0===r?void 0:r.find((t=>{const s=e[t];return"string"==typeof s&&s.length>0})),i=s?e[s]:void 0,l=null!==(a=null!==(o=e[t])&&void 0!==o?o:i)&&void 0!==a?a:"";h=`${t.replace(/:/g,"\\:")}:${l.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const l=!/^--/.test(s)&&(t=>/^[^0-9]$/.test(t))(t)?"-":"--";e.push(l+h),i&&e.push(l+"no-"+h)}customCompletion(t,e,s,i){if(d(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const t=this.customCompletionFunction(s,e);return f(t)?t.then((t=>{this.shim.process.nextTick((()=>{i(null,t)}))})).catch((t=>{this.shim.process.nextTick((()=>{i(t,void 0)}))})):i(null,t)}return function(t){return t.length>3}(this.customCompletionFunction)?this.customCompletionFunction(s,e,((n=i)=>this.defaultCompletion(t,e,s,n)),(t=>{i(null,t)})):this.customCompletionFunction(s,e,(t=>{i(null,t)}))}getCompletion(t,e){const s=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),n=this.customCompletionFunction?i=>this.customCompletion(t,i,s,e):i=>this.defaultCompletion(t,i,s,e);return f(i)?i.then(n):n(i)}generateCompletionScript(t,e){let s=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),s=s.replace(/{{app_name}}/g,i),s=s.replace(/{{completion_command}}/g,e),s.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}}function N(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const s=[];let i,n;for(i=0;i<=e.length;i++)s[i]=[i];for(n=0;n<=t.length;n++)s[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?s[i][n]=s[i-1][n-1]:i>1&&n>1&&e.charAt(i-2)===t.charAt(n-1)&&e.charAt(i-1)===t.charAt(n-2)?s[i][n]=s[i-2][n-2]+1:s[i][n]=Math.min(s[i-1][n-1]+1,Math.min(s[i][n-1]+1,s[i-1][n]+1));return s[e.length][t.length]}const H=["$0","--","_"];var z,W,q,U,F,L,V,G,R,T,B,Y,K,J,Z,X,Q,tt,et,st,it,nt,rt,ot,at,ht,lt,ct,ft,dt,ut,pt,gt,mt,yt;const bt=Symbol("copyDoubleDash"),vt=Symbol("copyDoubleDash"),Ot=Symbol("deleteFromParserHintObject"),wt=Symbol("emitWarning"),Ct=Symbol("freeze"),jt=Symbol("getDollarZero"),Mt=Symbol("getParserConfiguration"),_t=Symbol("getUsageConfiguration"),kt=Symbol("guessLocale"),xt=Symbol("guessVersion"),Et=Symbol("parsePositionalNumbers"),At=Symbol("pkgUp"),Pt=Symbol("populateParserHintArray"),St=Symbol("populateParserHintSingleValueDictionary"),$t=Symbol("populateParserHintArrayDictionary"),It=Symbol("populateParserHintDictionary"),Dt=Symbol("sanitizeKey"),Nt=Symbol("setKey"),Ht=Symbol("unfreeze"),zt=Symbol("validateAsync"),Wt=Symbol("getCommandInstance"),qt=Symbol("getContext"),Ut=Symbol("getHasOutput"),Ft=Symbol("getLoggerInstance"),Lt=Symbol("getParseContext"),Vt=Symbol("getUsageInstance"),Gt=Symbol("getValidationInstance"),Rt=Symbol("hasParseCallback"),Tt=Symbol("isGlobalContext"),Bt=Symbol("postProcess"),Yt=Symbol("rebase"),Kt=Symbol("reset"),Jt=Symbol("runYargsParserAndExecuteCommands"),Zt=Symbol("runValidation"),Xt=Symbol("setHasOutput"),Qt=Symbol("kTrackManuallySetKeys");class te{constructor(t=[],e,s,i){this.customScriptName=!1,this.parsed=!1,z.set(this,void 0),W.set(this,void 0),q.set(this,{commands:[],fullCommands:[]}),U.set(this,null),F.set(this,null),L.set(this,"show-hidden"),V.set(this,null),G.set(this,!0),R.set(this,{}),T.set(this,!0),B.set(this,[]),Y.set(this,void 0),K.set(this,{}),J.set(this,!1),Z.set(this,null),X.set(this,!0),Q.set(this,void 0),tt.set(this,""),et.set(this,void 0),st.set(this,void 0),it.set(this,{}),nt.set(this,null),rt.set(this,null),ot.set(this,{}),at.set(this,{}),ht.set(this,void 0),lt.set(this,!1),ct.set(this,void 0),ft.set(this,!1),dt.set(this,!1),ut.set(this,!1),pt.set(this,void 0),gt.set(this,{}),mt.set(this,null),yt.set(this,void 0),O(this,ct,i,"f"),O(this,ht,t,"f"),O(this,W,e,"f"),O(this,st,s,"f"),O(this,Y,new w(this),"f"),this.$0=this[jt](),this[Kt](),O(this,z,v(this,z,"f"),"f"),O(this,pt,v(this,pt,"f"),"f"),O(this,yt,v(this,yt,"f"),"f"),O(this,et,v(this,et,"f"),"f"),v(this,et,"f").showHiddenOpt=v(this,L,"f"),O(this,Q,this[vt](),"f")}addHelpOpt(t,e){return h("[string|boolean] [string]",[t,e],arguments.length),v(this,Z,"f")&&(this[Ot](v(this,Z,"f")),O(this,Z,null,"f")),!1===t&&void 0===e||(O(this,Z,"string"==typeof t?t:"help","f"),this.boolean(v(this,Z,"f")),this.describe(v(this,Z,"f"),e||v(this,pt,"f").deferY18nLookup("Show help"))),this}help(t,e){return this.addHelpOpt(t,e)}addShowHiddenOpt(t,e){if(h("[string|boolean] [string]",[t,e],arguments.length),!1===t&&void 0===e)return this;const s="string"==typeof t?t:v(this,L,"f");return this.boolean(s),this.describe(s,e||v(this,pt,"f").deferY18nLookup("Show hidden options")),v(this,et,"f").showHiddenOpt=s,this}showHidden(t,e){return this.addShowHiddenOpt(t,e)}alias(t,e){return h("<object|string|array> [string|array]",[t,e],arguments.length),this[$t](this.alias.bind(this),"alias",t,e),this}array(t){return h("<array|string>",[t],arguments.length),this[Pt]("array",t),this[Qt](t),this}boolean(t){return h("<array|string>",[t],arguments.length),this[Pt]("boolean",t),this[Qt](t),this}check(t,e){return h("<function> [boolean]",[t,e],arguments.length),this.middleware(((e,s)=>j((()=>t(e,s.getOptions())),(s=>(s?("string"==typeof s||s instanceof Error)&&v(this,pt,"f").fail(s.toString(),s):v(this,pt,"f").fail(v(this,ct,"f").y18n.__("Argument check failed: %s",t.toString())),e)),(t=>(v(this,pt,"f").fail(t.message?t.message:t.toString(),t),e)))),!1,e),this}choices(t,e){return h("<object|string|array> [string|array]",[t,e],arguments.length),this[$t](this.choices.bind(this),"choices",t,e),this}coerce(t,s){if(h("<object|string|array> [function]",[t,s],arguments.length),Array.isArray(t)){if(!s)throw new e("coerce callback must be provided");for(const e of t)this.coerce(e,s);return this}if("object"==typeof t){for(const e of Object.keys(t))this.coerce(e,t[e]);return this}if(!s)throw new e("coerce callback must be provided");return v(this,et,"f").key[t]=!0,v(this,Y,"f").addCoerceMiddleware(((i,n)=>{let r;return Object.prototype.hasOwnProperty.call(i,t)?j((()=>(r=n.getAliases(),s(i[t]))),(e=>{i[t]=e;const s=n.getInternalMethods().getParserConfiguration()["strip-aliased"];if(r[t]&&!0!==s)for(const s of r[t])i[s]=e;return i}),(t=>{throw new e(t.message)})):i}),t),this}conflicts(t,e){return h("<string|object> [string|array]",[t,e],arguments.length),v(this,yt,"f").conflicts(t,e),this}config(t="config",e,s){return h("[object|string] [string|function] [function]",[t,e,s],arguments.length),"object"!=typeof t||Array.isArray(t)?("function"==typeof e&&(s=e,e=void 0),this.describe(t,e||v(this,pt,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach((t=>{v(this,et,"f").config[t]=s||!0})),this):(t=n(t,v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(t),this)}completion(t,e,s){return h("[string] [string|boolean|function] [function]",[t,e,s],arguments.length),"function"==typeof e&&(s=e,e=void 0),O(this,F,t||v(this,F,"f")||"completion","f"),e||!1===e||(e="generate completion script"),this.command(v(this,F,"f"),e),s&&v(this,U,"f").registerFunction(s),this}command(t,e,s,i,n,r){return h("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,e,s,i,n,r],arguments.length),v(this,z,"f").addHandler(t,e,s,i,n,r),this}commands(t,e,s,i,n,r){return this.command(t,e,s,i,n,r)}commandDir(t,e){h("<string> [object]",[t,e],arguments.length);const s=v(this,st,"f")||v(this,ct,"f").require;return v(this,z,"f").addDirectory(t,s,v(this,ct,"f").getCallerFile(),e),this}count(t){return h("<array|string>",[t],arguments.length),this[Pt]("count",t),this[Qt](t),this}default(t,e,s){return h("<object|string|array> [*] [string]",[t,e,s],arguments.length),s&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]=s),"function"==typeof e&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]||(v(this,et,"f").defaultDescription[t]=v(this,pt,"f").functionDescription(e)),e=e.call()),this[St](this.default.bind(this),"default",t,e),this}defaults(t,e,s){return this.default(t,e,s)}demandCommand(t=1,e,s,i){return h("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,e,s,i],arguments.length),"number"!=typeof e&&(s=e,e=1/0),this.global("_",!1),v(this,et,"f").demandedCommands._={min:t,max:e,minMsg:s,maxMsg:i},this}demand(t,e,s){return Array.isArray(e)?(e.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})),e=1/0):"number"!=typeof e&&(s=e,e=1/0),"number"==typeof t?(d(s,!0,v(this,ct,"f")),this.demandCommand(t,e,s,s)):Array.isArray(t)?t.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})):"string"==typeof s?this.demandOption(t,s):!0!==s&&void 0!==s||this.demandOption(t),this}demandOption(t,e){return h("<object|string|array> [string]",[t,e],arguments.length),this[St](this.demandOption.bind(this),"demandedOptions",t,e),this}deprecateOption(t,e){return h("<string> [string|boolean]",[t,e],arguments.length),v(this,et,"f").deprecatedOptions[t]=e,this}describe(t,e){return h("<object|string|array> [string]",[t,e],arguments.length),this[Nt](t,!0),v(this,pt,"f").describe(t,e),this}detectLocale(t){return h("<boolean>",[t],arguments.length),O(this,G,t,"f"),this}env(t){return h("[string|boolean]",[t],arguments.length),!1===t?delete v(this,et,"f").envPrefix:v(this,et,"f").envPrefix=t||"",this}epilogue(t){return h("<string>",[t],arguments.length),v(this,pt,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,e){return h("<string|array> [string]",[t,e],arguments.length),Array.isArray(t)?t.forEach((t=>this.example(...t))):v(this,pt,"f").example(t,e),this}exit(t,e){O(this,J,!0,"f"),O(this,V,e,"f"),v(this,T,"f")&&v(this,ct,"f").process.exit(t)}exitProcess(t=!0){return h("[boolean]",[t],arguments.length),O(this,T,t,"f"),this}fail(t){if(h("<function|boolean>",[t],arguments.length),"boolean"==typeof t&&!1!==t)throw new e("Invalid first argument. Expected function or boolean 'false'");return v(this,pt,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,e){return h("<array> [function]",[t,e],arguments.length),e?v(this,U,"f").getCompletion(t,e):new Promise(((e,s)=>{v(this,U,"f").getCompletion(t,((t,i)=>{t?s(t):e(i)}))}))}getDemandedOptions(){return h([],0),v(this,et,"f").demandedOptions}getDemandedCommands(){return h([],0),v(this,et,"f").demandedCommands}getDeprecatedOptions(){return h([],0),v(this,et,"f").deprecatedOptions}getDetectLocale(){return v(this,G,"f")}getExitProcess(){return v(this,T,"f")}getGroups(){return Object.assign({},v(this,K,"f"),v(this,at,"f"))}getHelp(){if(O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(t))return t.then((()=>v(this,pt,"f").help()))}const t=v(this,z,"f").runDefaultBuilderOn(this);if(f(t))return t.then((()=>v(this,pt,"f").help()))}return Promise.resolve(v(this,pt,"f").help())}getOptions(){return v(this,et,"f")}getStrict(){return v(this,ft,"f")}getStrictCommands(){return v(this,dt,"f")}getStrictOptions(){return v(this,ut,"f")}global(t,e){return h("<string|array> [boolean]",[t,e],arguments.length),t=[].concat(t),!1!==e?v(this,et,"f").local=v(this,et,"f").local.filter((e=>-1===t.indexOf(e))):t.forEach((t=>{v(this,et,"f").local.includes(t)||v(this,et,"f").local.push(t)})),this}group(t,e){h("<string|array> <string>",[t,e],arguments.length);const s=v(this,at,"f")[e]||v(this,K,"f")[e];v(this,at,"f")[e]&&delete v(this,at,"f")[e];const i={};return v(this,K,"f")[e]=(s||[]).concat(t).filter((t=>!i[t]&&(i[t]=!0))),this}hide(t){return h("<string>",[t],arguments.length),v(this,et,"f").hiddenOptions.push(t),this}implies(t,e){return h("<string|object> [number|string|array]",[t,e],arguments.length),v(this,yt,"f").implies(t,e),this}locale(t){return h("[string]",[t],arguments.length),void 0===t?(this[kt](),v(this,ct,"f").y18n.getLocale()):(O(this,G,!1,"f"),v(this,ct,"f").y18n.setLocale(t),this)}middleware(t,e,s){return v(this,Y,"f").addMiddleware(t,!!e,s)}nargs(t,e){return h("<string|object|array> [number]",[t,e],arguments.length),this[St](this.nargs.bind(this),"narg",t,e),this}normalize(t){return h("<array|string>",[t],arguments.length),this[Pt]("normalize",t),this}number(t){return h("<array|string>",[t],arguments.length),this[Pt]("number",t),this[Qt](t),this}option(t,e){if(h("<string|object> [object]",[t,e],arguments.length),"object"==typeof t)Object.keys(t).forEach((e=>{this.options(e,t[e])}));else{"object"!=typeof e&&(e={}),this[Qt](t),!v(this,mt,"f")||"version"!==t&&"version"!==(null==e?void 0:e.alias)||this[wt](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join("\n"),void 0,"versionWarning"),v(this,et,"f").key[t]=!0,e.alias&&this.alias(t,e.alias);const s=e.deprecate||e.deprecated;s&&this.deprecateOption(t,s);const i=e.demand||e.required||e.require;i&&this.demand(t,i),e.demandOption&&this.demandOption(t,"string"==typeof e.demandOption?e.demandOption:void 0),e.conflicts&&this.conflicts(t,e.conflicts),"default"in e&&this.default(t,e.default),void 0!==e.implies&&this.implies(t,e.implies),void 0!==e.nargs&&this.nargs(t,e.nargs),e.config&&this.config(t,e.configParser),e.normalize&&this.normalize(t),e.choices&&this.choices(t,e.choices),e.coerce&&this.coerce(t,e.coerce),e.group&&this.group(t,e.group),(e.boolean||"boolean"===e.type)&&(this.boolean(t),e.alias&&this.boolean(e.alias)),(e.array||"array"===e.type)&&(this.array(t),e.alias&&this.array(e.alias)),(e.number||"number"===e.type)&&(this.number(t),e.alias&&this.number(e.alias)),(e.string||"string"===e.type)&&(this.string(t),e.alias&&this.string(e.alias)),(e.count||"count"===e.type)&&this.count(t),"boolean"==typeof e.global&&this.global(t,e.global),e.defaultDescription&&(v(this,et,"f").defaultDescription[t]=e.defaultDescription),e.skipValidation&&this.skipValidation(t);const n=e.describe||e.description||e.desc,r=v(this,pt,"f").getDescriptions();Object.prototype.hasOwnProperty.call(r,t)&&"string"!=typeof n||this.describe(t,n),e.hidden&&this.hide(t),e.requiresArg&&this.requiresArg(t)}return this}options(t,e){return this.option(t,e)}parse(t,e,s){h("[string|array] [function|boolean|object] [function]",[t,e,s],arguments.length),this[Ct](),void 0===t&&(t=v(this,ht,"f")),"object"==typeof e&&(O(this,rt,e,"f"),e=s),"function"==typeof e&&(O(this,nt,e,"f"),e=!1),e||O(this,ht,t,"f"),v(this,nt,"f")&&O(this,T,!1,"f");const i=this[Jt](t,!!e),n=this.parsed;return v(this,U,"f").setParsed(this.parsed),f(i)?i.then((t=>(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),t,v(this,tt,"f")),t))).catch((t=>{throw v(this,nt,"f")&&v(this,nt,"f")(t,this.parsed.argv,v(this,tt,"f")),t})).finally((()=>{this[Ht](),this.parsed=n})):(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),i,v(this,tt,"f")),this[Ht](),this.parsed=n,i)}parseAsync(t,e,s){const i=this.parse(t,e,s);return f(i)?i:Promise.resolve(i)}parseSync(t,s,i){const n=this.parse(t,s,i);if(f(n))throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return n}parserConfiguration(t){return h("<object>",[t],arguments.length),O(this,it,t,"f"),this}pkgConf(t,e){h("<string> [string]",[t,e],arguments.length);let s=null;const i=this[At](e||v(this,W,"f"));return i[t]&&"object"==typeof i[t]&&(s=n(i[t],e||v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(s)),this}positional(t,e){h("<string> <object>",[t,e],arguments.length);const s=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];e=g(e,((t,e)=>!("type"===t&&!["string","number","boolean"].includes(e))&&s.includes(t)));const i=v(this,q,"f").fullCommands[v(this,q,"f").fullCommands.length-1],n=i?v(this,z,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return p(n).forEach((s=>{const i=n[s];Array.isArray(i)?-1!==i.indexOf(t)&&(e[s]=!0):i[t]&&!(s in e)&&(e[s]=i[t])})),this.group(t,v(this,pt,"f").getPositionalGroupName()),this.option(t,e)}recommendCommands(t=!0){return h("[boolean]",[t],arguments.length),O(this,lt,t,"f"),this}required(t,e,s){return this.demand(t,e,s)}require(t,e,s){return this.demand(t,e,s)}requiresArg(t){return h("<array|string|object> [number]",[t],arguments.length),"string"==typeof t&&v(this,et,"f").narg[t]||this[St](this.requiresArg.bind(this),"narg",t,NaN),this}showCompletionScript(t,e){return h("[string] [string]",[t,e],arguments.length),t=t||this.$0,v(this,Q,"f").log(v(this,U,"f").generateCompletionScript(t,e||v(this,F,"f")||"completion")),this}showHelp(t){if(h("[string|function]",[t],arguments.length),O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}const e=v(this,z,"f").runDefaultBuilderOn(this);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}return v(this,pt,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,e){return h("[boolean|string] [string]",[t,e],arguments.length),v(this,pt,"f").showHelpOnFail(t,e),this}showVersion(t){return h("[string|function]",[t],arguments.length),v(this,pt,"f").showVersion(t),this}skipValidation(t){return h("<array|string>",[t],arguments.length),this[Pt]("skipValidation",t),this}strict(t){return h("[boolean]",[t],arguments.length),O(this,ft,!1!==t,"f"),this}strictCommands(t){return h("[boolean]",[t],arguments.length),O(this,dt,!1!==t,"f"),this}strictOptions(t){return h("[boolean]",[t],arguments.length),O(this,ut,!1!==t,"f"),this}string(t){return h("<array|string>",[t],arguments.length),this[Pt]("string",t),this[Qt](t),this}terminalWidth(){return h([],0),v(this,ct,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return h("<object>",[t],arguments.length),O(this,G,!1,"f"),v(this,ct,"f").y18n.updateLocale(t),this}usage(t,s,i,n){if(h("<string|null|undefined> [string|boolean] [function|object] [function]",[t,s,i,n],arguments.length),void 0!==s){if(d(t,null,v(this,ct,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,s,i,n);throw new e(".usage() description must start with $0 if being used as alias for .command()")}return v(this,pt,"f").usage(t),this}usageConfiguration(t){return h("<object>",[t],arguments.length),O(this,gt,t,"f"),this}version(t,e,s){const i="version";if(h("[boolean|string] [string] [string]",[t,e,s],arguments.length),v(this,mt,"f")&&(this[Ot](v(this,mt,"f")),v(this,pt,"f").version(void 0),O(this,mt,null,"f")),0===arguments.length)s=this[xt](),t=i;else if(1===arguments.length){if(!1===t)return this;s=t,t=i}else 2===arguments.length&&(s=e,e=void 0);return O(this,mt,"string"==typeof t?t:i,"f"),e=e||v(this,pt,"f").deferY18nLookup("Show version number"),v(this,pt,"f").version(s||void 0),this.boolean(v(this,mt,"f")),this.describe(v(this,mt,"f"),e),this}wrap(t){return h("<number|null|undefined>",[t],arguments.length),v(this,pt,"f").wrap(t),this}[(z=new WeakMap,W=new WeakMap,q=new WeakMap,U=new WeakMap,F=new WeakMap,L=new WeakMap,V=new WeakMap,G=new WeakMap,R=new WeakMap,T=new WeakMap,B=new WeakMap,Y=new WeakMap,K=new WeakMap,J=new WeakMap,Z=new WeakMap,X=new WeakMap,Q=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,ht=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt=new WeakMap,bt)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch(t){}return t}[vt](){return{log:(...t)=>{this[Rt]()||console.log(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")},error:(...t)=>{this[Rt]()||console.error(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")}}}[Ot](t){p(v(this,et,"f")).forEach((e=>{if("configObjects"===e)return;const s=v(this,et,"f")[e];Array.isArray(s)?s.includes(t)&&s.splice(s.indexOf(t),1):"object"==typeof s&&delete s[t]})),delete v(this,pt,"f").getDescriptions()[t]}[wt](t,e,s){v(this,R,"f")[s]||(v(this,ct,"f").process.emitWarning(t,e),v(this,R,"f")[s]=!0)}[Ct](){v(this,B,"f").push({options:v(this,et,"f"),configObjects:v(this,et,"f").configObjects.slice(0),exitProcess:v(this,T,"f"),groups:v(this,K,"f"),strict:v(this,ft,"f"),strictCommands:v(this,dt,"f"),strictOptions:v(this,ut,"f"),completionCommand:v(this,F,"f"),output:v(this,tt,"f"),exitError:v(this,V,"f"),hasOutput:v(this,J,"f"),parsed:this.parsed,parseFn:v(this,nt,"f"),parseContext:v(this,rt,"f")}),v(this,pt,"f").freeze(),v(this,yt,"f").freeze(),v(this,z,"f").freeze(),v(this,Y,"f").freeze()}[jt](){let t,e="";return t=/\b(node|iojs|electron)(\.exe)?$/.test(v(this,ct,"f").process.argv()[0])?v(this,ct,"f").process.argv().slice(1,2):v(this,ct,"f").process.argv().slice(0,1),e=t.map((t=>{const e=this[Yt](v(this,W,"f"),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&e.length<t.length?e:t})).join(" ").trim(),v(this,ct,"f").getEnv("_")&&v(this,ct,"f").getProcessArgvBin()===v(this,ct,"f").getEnv("_")&&(e=v(this,ct,"f").getEnv("_").replace(`${v(this,ct,"f").path.dirname(v(this,ct,"f").process.execPath())}/`,"")),e}[Mt](){return v(this,it,"f")}[_t](){return v(this,gt,"f")}[kt](){if(!v(this,G,"f"))return;const t=v(this,ct,"f").getEnv("LC_ALL")||v(this,ct,"f").getEnv("LC_MESSAGES")||v(this,ct,"f").getEnv("LANG")||v(this,ct,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[xt](){return this[At]().version||"unknown"}[Et](t){const e=t["--"]?t["--"]:t._;for(let t,s=0;void 0!==(t=e[s]);s++)v(this,ct,"f").Parser.looksLikeNumber(t)&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))&&(e[s]=Number(t));return t}[At](t){const e=t||"*";if(v(this,ot,"f")[e])return v(this,ot,"f")[e];let s={};try{let e=t||v(this,ct,"f").mainFilename;!t&&v(this,ct,"f").path.extname(e)&&(e=v(this,ct,"f").path.dirname(e));const i=v(this,ct,"f").findUp(e,((t,e)=>e.includes("package.json")?"package.json":void 0));d(i,void 0,v(this,ct,"f")),s=JSON.parse(v(this,ct,"f").readFileSync(i,"utf8"))}catch(t){}return v(this,ot,"f")[e]=s||{},v(this,ot,"f")[e]}[Pt](t,e){(e=[].concat(e)).forEach((e=>{e=this[Dt](e),v(this,et,"f")[t].push(e)}))}[St](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=s}))}[$t](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=(v(this,et,"f")[t][e]||[]).concat(s)}))}[It](t,e,s,i,n){if(Array.isArray(s))s.forEach((e=>{t(e,i)}));else if((t=>"object"==typeof t)(s))for(const e of p(s))t(e,s[e]);else n(e,this[Dt](s),i)}[Dt](t){return"__proto__"===t?"___proto___":t}[Nt](t,e){return this[St](this[Nt].bind(this),"key",t,e),this}[Ht](){var t,e,s,i,n,r,o,a,h,l,c,f;const u=v(this,B,"f").pop();let p;d(u,void 0,v(this,ct,"f")),t=this,e=this,s=this,i=this,n=this,r=this,o=this,a=this,h=this,l=this,c=this,f=this,({options:{set value(e){O(t,et,e,"f")}}.value,configObjects:p,exitProcess:{set value(t){O(e,T,t,"f")}}.value,groups:{set value(t){O(s,K,t,"f")}}.value,output:{set value(t){O(i,tt,t,"f")}}.value,exitError:{set value(t){O(n,V,t,"f")}}.value,hasOutput:{set value(t){O(r,J,t,"f")}}.value,parsed:this.parsed,strict:{set value(t){O(o,ft,t,"f")}}.value,strictCommands:{set value(t){O(a,dt,t,"f")}}.value,strictOptions:{set value(t){O(h,ut,t,"f")}}.value,completionCommand:{set value(t){O(l,F,t,"f")}}.value,parseFn:{set value(t){O(c,nt,t,"f")}}.value,parseContext:{set value(t){O(f,rt,t,"f")}}.value}=u),v(this,et,"f").configObjects=p,v(this,pt,"f").unfreeze(),v(this,yt,"f").unfreeze(),v(this,z,"f").unfreeze(),v(this,Y,"f").unfreeze()}[zt](t,e){return j(e,(e=>(t(e),e)))}getInternalMethods(){return{getCommandInstance:this[Wt].bind(this),getContext:this[qt].bind(this),getHasOutput:this[Ut].bind(this),getLoggerInstance:this[Ft].bind(this),getParseContext:this[Lt].bind(this),getParserConfiguration:this[Mt].bind(this),getUsageConfiguration:this[_t].bind(this),getUsageInstance:this[Vt].bind(this),getValidationInstance:this[Gt].bind(this),hasParseCallback:this[Rt].bind(this),isGlobalContext:this[Tt].bind(this),postProcess:this[Bt].bind(this),reset:this[Kt].bind(this),runValidation:this[Zt].bind(this),runYargsParserAndExecuteCommands:this[Jt].bind(this),setHasOutput:this[Xt].bind(this)}}[Wt](){return v(this,z,"f")}[qt](){return v(this,q,"f")}[Ut](){return v(this,J,"f")}[Ft](){return v(this,Q,"f")}[Lt](){return v(this,rt,"f")||{}}[Vt](){return v(this,pt,"f")}[Gt](){return v(this,yt,"f")}[Rt](){return!!v(this,nt,"f")}[Tt](){return v(this,X,"f")}[Bt](t,e,s,i){if(s)return t;if(f(t))return t;e||(t=this[bt](t));return(this[Mt]()["parse-positional-numbers"]||void 0===this[Mt]()["parse-positional-numbers"])&&(t=this[Et](t)),i&&(t=C(t,this,v(this,Y,"f").getMiddleware(),!1)),t}[Kt](t={}){O(this,et,v(this,et,"f")||{},"f");const e={};e.local=v(this,et,"f").local||[],e.configObjects=v(this,et,"f").configObjects||[];const s={};e.local.forEach((e=>{s[e]=!0,(t[e]||[]).forEach((t=>{s[t]=!0}))})),Object.assign(v(this,at,"f"),Object.keys(v(this,K,"f")).reduce(((t,e)=>{const i=v(this,K,"f")[e].filter((t=>!(t in s)));return i.length>0&&(t[e]=i),t}),{})),O(this,K,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((t=>{e[t]=(v(this,et,"f")[t]||[]).filter((t=>!s[t]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((t=>{e[t]=g(v(this,et,"f")[t],(t=>!s[t]))})),e.envPrefix=v(this,et,"f").envPrefix,O(this,et,e,"f"),O(this,pt,v(this,pt,"f")?v(this,pt,"f").reset(s):P(this,v(this,ct,"f")),"f"),O(this,yt,v(this,yt,"f")?v(this,yt,"f").reset(s):function(t,e,s){const i=s.y18n.__,n=s.y18n.__n,r={nonOptionCount:function(s){const i=t.getDemandedCommands(),r=s._.length+(s["--"]?s["--"].length:0)-t.getInternalMethods().getContext().commands.length;i._&&(r<i._.min||r>i._.max)&&(r<i._.min?void 0!==i._.minMsg?e.fail(i._.minMsg?i._.minMsg.replace(/\$0/g,r.toString()).replace(/\$1/,i._.min.toString()):null):e.fail(n("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",r,r.toString(),i._.min.toString())):r>i._.max&&(void 0!==i._.maxMsg?e.fail(i._.maxMsg?i._.maxMsg.replace(/\$0/g,r.toString()).replace(/\$1/,i._.max.toString()):null):e.fail(n("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",r,r.toString(),i._.max.toString()))))},positionalCount:function(t,s){s<t&&e.fail(n("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",s,s+"",t+""))},requiredArguments:function(t,s){let i=null;for(const e of Object.keys(s))Object.prototype.hasOwnProperty.call(t,e)&&void 0!==t[e]||(i=i||{},i[e]=s[e]);if(i){const t=[];for(const e of Object.keys(i)){const s=i[e];s&&t.indexOf(s)<0&&t.push(s)}const s=t.length?`\n${t.join("\n")}`:"";e.fail(n("Missing required argument: %s","Missing required arguments: %s",Object.keys(i).length,Object.keys(i).join(", ")+s))}},unknownArguments:function(s,i,o,a,h=!0){var l;const c=t.getInternalMethods().getCommandInstance().getCommands(),f=[],d=t.getInternalMethods().getContext();if(Object.keys(s).forEach((e=>{H.includes(e)||Object.prototype.hasOwnProperty.call(o,e)||Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),e)||r.isValidAndSomeAliasIsNotNew(e,i)||f.push(e)})),h&&(d.commands.length>0||c.length>0||a)&&s._.slice(d.commands.length).forEach((t=>{c.includes(""+t)||f.push(""+t)})),h){const e=(null===(l=t.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,i=d.commands.length+e;i<s._.length&&s._.slice(i).forEach((t=>{t=String(t),d.commands.includes(t)||f.includes(t)||f.push(t)}))}f.length&&e.fail(n("Unknown argument: %s","Unknown arguments: %s",f.length,f.map((t=>t.trim()?t:`"${t}"`)).join(", ")))},unknownCommands:function(s){const i=t.getInternalMethods().getCommandInstance().getCommands(),r=[],o=t.getInternalMethods().getContext();return(o.commands.length>0||i.length>0)&&s._.slice(o.commands.length).forEach((t=>{i.includes(""+t)||r.push(""+t)})),r.length>0&&(e.fail(n("Unknown command: %s","Unknown commands: %s",r.length,r.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(e,s){if(!Object.prototype.hasOwnProperty.call(s,e))return!1;const i=t.parsed.newAliases;return[e,...s[e]].some((t=>!Object.prototype.hasOwnProperty.call(i,t)||!i[e]))},limitedChoices:function(s){const n=t.getOptions(),r={};if(!Object.keys(n.choices).length)return;Object.keys(s).forEach((t=>{-1===H.indexOf(t)&&Object.prototype.hasOwnProperty.call(n.choices,t)&&[].concat(s[t]).forEach((e=>{-1===n.choices[t].indexOf(e)&&void 0!==e&&(r[t]=(r[t]||[]).concat(e))}))}));const o=Object.keys(r);if(!o.length)return;let a=i("Invalid values:");o.forEach((t=>{a+=`\n ${i("Argument: %s, Given: %s, Choices: %s",t,e.stringifiedValues(r[t]),e.stringifiedValues(n.choices[t]))}`})),e.fail(a)}};let o={};function a(t,e){const s=Number(e);return"number"==typeof(e=isNaN(s)?e:s)?e=t._.length>=e:e.match(/^--no-.+/)?(e=e.match(/^--no-(.+)/)[1],e=!Object.prototype.hasOwnProperty.call(t,e)):e=Object.prototype.hasOwnProperty.call(t,e),e}r.implies=function(e,i){h("<string|object> [array|number|string]",[e,i],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.implies(t,e[t])})):(t.global(e),o[e]||(o[e]=[]),Array.isArray(i)?i.forEach((t=>r.implies(e,t))):(d(i,void 0,s),o[e].push(i)))},r.getImplied=function(){return o},r.implications=function(t){const s=[];if(Object.keys(o).forEach((e=>{const i=e;(o[e]||[]).forEach((e=>{let n=i;const r=e;n=a(t,n),e=a(t,e),n&&!e&&s.push(` ${i} -> ${r}`)}))})),s.length){let t=`${i("Implications failed:")}\n`;s.forEach((e=>{t+=e})),e.fail(t)}};let l={};r.conflicts=function(e,s){h("<string|object> [array|string]",[e,s],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.conflicts(t,e[t])})):(t.global(e),l[e]||(l[e]=[]),Array.isArray(s)?s.forEach((t=>r.conflicts(e,t))):l[e].push(s))},r.getConflicting=()=>l,r.conflicting=function(n){Object.keys(n).forEach((t=>{l[t]&&l[t].forEach((s=>{s&&void 0!==n[t]&&void 0!==n[s]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,s))}))})),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach((t=>{l[t].forEach((r=>{r&&void 0!==n[s.Parser.camelCase(t)]&&void 0!==n[s.Parser.camelCase(r)]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,r))}))}))},r.recommendCommands=function(t,s){s=s.sort(((t,e)=>e.length-t.length));let n=null,r=1/0;for(let e,i=0;void 0!==(e=s[i]);i++){const s=N(t,e);s<=3&&s<r&&(r=s,n=e)}n&&e.fail(i("Did you mean %s?",n))},r.reset=function(t){return o=g(o,(e=>!t[e])),l=g(l,(e=>!t[e])),r};const c=[];return r.freeze=function(){c.push({implied:o,conflicting:l})},r.unfreeze=function(){const t=c.pop();d(t,void 0,s),({implied:o,conflicting:l}=t)},r}(this,v(this,pt,"f"),v(this,ct,"f")),"f"),O(this,z,v(this,z,"f")?v(this,z,"f").reset():function(t,e,s,i){return new _(t,e,s,i)}(v(this,pt,"f"),v(this,yt,"f"),v(this,Y,"f"),v(this,ct,"f")),"f"),v(this,U,"f")||O(this,U,function(t,e,s,i){return new D(t,e,s,i)}(this,v(this,pt,"f"),v(this,z,"f"),v(this,ct,"f")),"f"),v(this,Y,"f").reset(),O(this,F,null,"f"),O(this,tt,"","f"),O(this,V,null,"f"),O(this,J,!1,"f"),this.parsed=!1,this}[Yt](t,e){return v(this,ct,"f").path.relative(t,e)}[Jt](t,s,i,n=0,r=!1){let o=!!i||r;t=t||v(this,ht,"f"),v(this,et,"f").__=v(this,ct,"f").y18n.__,v(this,et,"f").configuration=this[Mt]();const a=!!v(this,et,"f").configuration["populate--"],h=Object.assign({},v(this,et,"f").configuration,{"populate--":!0}),l=v(this,ct,"f").Parser.detailed(t,Object.assign({},v(this,et,"f"),{configuration:{"parse-positional-numbers":!1,...h}})),c=Object.assign(l.argv,v(this,rt,"f"));let d;const u=l.aliases;let p=!1,g=!1;Object.keys(c).forEach((t=>{t===v(this,Z,"f")&&c[t]?p=!0:t===v(this,mt,"f")&&c[t]&&(g=!0)})),c.$0=this.$0,this.parsed=l,0===n&&v(this,pt,"f").clearCachedHelpMessage();try{if(this[kt](),s)return this[Bt](c,a,!!i,!1);if(v(this,Z,"f")){[v(this,Z,"f")].concat(u[v(this,Z,"f")]||[]).filter((t=>t.length>1)).includes(""+c._[c._.length-1])&&(c._.pop(),p=!0)}O(this,X,!1,"f");const h=v(this,z,"f").getCommands(),m=v(this,U,"f").completionKey in c,y=p||m||r;if(c._.length){if(h.length){let t;for(let e,s=n||0;void 0!==c._[s];s++){if(e=String(c._[s]),h.includes(e)&&e!==v(this,F,"f")){const t=v(this,z,"f").runCommand(e,this,l,s+1,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(!t&&e!==v(this,F,"f")){t=e;break}}!v(this,z,"f").hasDefaultCommand()&&v(this,lt,"f")&&t&&!y&&v(this,yt,"f").recommendCommands(t,h)}v(this,F,"f")&&c._.includes(v(this,F,"f"))&&!m&&(v(this,T,"f")&&E(!0),this.showCompletionScript(),this.exit(0))}if(v(this,z,"f").hasDefaultCommand()&&!y){const t=v(this,z,"f").runCommand(null,this,l,0,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(m){v(this,T,"f")&&E(!0);const s=(t=[].concat(t)).slice(t.indexOf(`--${v(this,U,"f").completionKey}`)+1);return v(this,U,"f").getCompletion(s,((t,s)=>{if(t)throw new e(t.message);(s||[]).forEach((t=>{v(this,Q,"f").log(t)})),this.exit(0)})),this[Bt](c,!a,!!i,!1)}if(v(this,J,"f")||(p?(v(this,T,"f")&&E(!0),o=!0,this.showHelp("log"),this.exit(0)):g&&(v(this,T,"f")&&E(!0),o=!0,v(this,pt,"f").showVersion("log"),this.exit(0))),!o&&v(this,et,"f").skipValidation.length>0&&(o=Object.keys(c).some((t=>v(this,et,"f").skipValidation.indexOf(t)>=0&&!0===c[t]))),!o){if(l.error)throw new e(l.error.message);if(!m){const t=this[Zt](u,{},l.error);i||(d=C(c,this,v(this,Y,"f").getMiddleware(),!0)),d=this[zt](t,null!=d?d:c),f(d)&&!i&&(d=d.then((()=>C(c,this,v(this,Y,"f").getMiddleware(),!1))))}}}catch(t){if(!(t instanceof e))throw t;v(this,pt,"f").fail(t.message,t)}return this[Bt](null!=d?d:c,a,!!i,!0)}[Zt](t,s,i,n){const r={...this.getDemandedOptions()};return o=>{if(i)throw new e(i.message);v(this,yt,"f").nonOptionCount(o),v(this,yt,"f").requiredArguments(o,r);let a=!1;v(this,dt,"f")&&(a=v(this,yt,"f").unknownCommands(o)),v(this,ft,"f")&&!a?v(this,yt,"f").unknownArguments(o,t,s,!!n):v(this,ut,"f")&&v(this,yt,"f").unknownArguments(o,t,{},!1,!1),v(this,yt,"f").limitedChoices(o),v(this,yt,"f").implications(o),v(this,yt,"f").conflicting(o)}}[Xt](){O(this,J,!0,"f")}[Qt](t){if("string"==typeof t)v(this,et,"f").key[t]=!0;else for(const e of t)v(this,et,"f").key[e]=!0}}var ee,se;const{readFileSync:ie}=require("fs"),{inspect:ne}=require("util"),{resolve:re}=require("path"),oe=require("y18n"),ae=require("yargs-parser");var he,le={assert:{notStrictEqual:t.notStrictEqual,strictEqual:t.strictEqual},cliui:require("cliui"),findUp:require("escalade/sync"),getEnv:t=>process.env[t],getCallerFile:require("get-caller-file"),getProcessArgvBin:y,inspect:ne,mainFilename:null!==(se=null===(ee=null===require||void 0===require?void 0:require.main)||void 0===ee?void 0:ee.filename)&&void 0!==se?se:process.cwd(),Parser:ae,path:require("path"),process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:t=>{process.exit(t)},nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:ie,require:require,requireDirectory:require("require-directory"),stringWidth:require("string-width"),y18n:oe({directory:re(__dirname,"../locales"),updateFiles:!1})};const ce=(null===(he=null===process||void 0===process?void 0:process.env)||void 0===he?void 0:he.YARGS_MIN_NODE_VERSION)?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1])<ce)throw Error(`yargs supports a minimum Node.js version of ${ce}. Read our version support policy: https://github.com/yargs/yargs#supported-nodejs-versions`)}const fe=require("yargs-parser");var de,ue={applyExtends:n,cjsPlatformShim:le,Yargs:(de=le,(t=[],e=de.process.cwd(),s)=>{const i=new te(t,e,s,de);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}),argsert:h,isPromise:f,objFilter:g,parseCommand:o,Parser:fe,processArgv:b,YError:e};module.exports=ue;
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/argsert.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/argsert.js
deleted file mode 100644
index be5b3aa..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/argsert.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import { YError } from './yerror.js';
-import { parseCommand } from './parse-command.js';
-const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'];
-export function argsert(arg1, arg2, arg3) {
- function parseArgs() {
- return typeof arg1 === 'object'
- ? [{ demanded: [], optional: [] }, arg1, arg2]
- : [
- parseCommand(`cmd ${arg1}`),
- arg2,
- arg3,
- ];
- }
- try {
- let position = 0;
- const [parsed, callerArguments, _length] = parseArgs();
- const args = [].slice.call(callerArguments);
- while (args.length && args[args.length - 1] === undefined)
- args.pop();
- const length = _length || args.length;
- if (length < parsed.demanded.length) {
- throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`);
- }
- const totalCommands = parsed.demanded.length + parsed.optional.length;
- if (length > totalCommands) {
- throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`);
- }
- parsed.demanded.forEach(demanded => {
- const arg = args.shift();
- const observedType = guessType(arg);
- const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*');
- if (matchingTypes.length === 0)
- argumentTypeError(observedType, demanded.cmd, position);
- position += 1;
- });
- parsed.optional.forEach(optional => {
- if (args.length === 0)
- return;
- const arg = args.shift();
- const observedType = guessType(arg);
- const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*');
- if (matchingTypes.length === 0)
- argumentTypeError(observedType, optional.cmd, position);
- position += 1;
- });
- }
- catch (err) {
- console.warn(err.stack);
- }
-}
-function guessType(arg) {
- if (Array.isArray(arg)) {
- return 'array';
- }
- else if (arg === null) {
- return 'null';
- }
- return typeof arg;
-}
-function argumentTypeError(observedType, allowedTypes, position) {
- throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`);
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/command.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/command.js
deleted file mode 100644
index 47c1ed6..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/command.js
+++ /dev/null
@@ -1,449 +0,0 @@
-import { assertNotStrictEqual, } from './typings/common-types.js';
-import { isPromise } from './utils/is-promise.js';
-import { applyMiddleware, commandMiddlewareFactory, } from './middleware.js';
-import { parseCommand } from './parse-command.js';
-import { isYargsInstance, } from './yargs-factory.js';
-import { maybeAsyncResult } from './utils/maybe-async-result.js';
-import whichModule from './utils/which-module.js';
-const DEFAULT_MARKER = /(^\*)|(^\$0)/;
-export class CommandInstance {
- constructor(usage, validation, globalMiddleware, shim) {
- this.requireCache = new Set();
- this.handlers = {};
- this.aliasMap = {};
- this.frozens = [];
- this.shim = shim;
- this.usage = usage;
- this.globalMiddleware = globalMiddleware;
- this.validation = validation;
- }
- addDirectory(dir, req, callerFile, opts) {
- opts = opts || {};
- if (typeof opts.recurse !== 'boolean')
- opts.recurse = false;
- if (!Array.isArray(opts.extensions))
- opts.extensions = ['js'];
- const parentVisit = typeof opts.visit === 'function' ? opts.visit : (o) => o;
- opts.visit = (obj, joined, filename) => {
- const visited = parentVisit(obj, joined, filename);
- if (visited) {
- if (this.requireCache.has(joined))
- return visited;
- else
- this.requireCache.add(joined);
- this.addHandler(visited);
- }
- return visited;
- };
- this.shim.requireDirectory({ require: req, filename: callerFile }, dir, opts);
- }
- addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) {
- let aliases = [];
- const middlewares = commandMiddlewareFactory(commandMiddleware);
- handler = handler || (() => { });
- if (Array.isArray(cmd)) {
- if (isCommandAndAliases(cmd)) {
- [cmd, ...aliases] = cmd;
- }
- else {
- for (const command of cmd) {
- this.addHandler(command);
- }
- }
- }
- else if (isCommandHandlerDefinition(cmd)) {
- let command = Array.isArray(cmd.command) || typeof cmd.command === 'string'
- ? cmd.command
- : this.moduleName(cmd);
- if (cmd.aliases)
- command = [].concat(command).concat(cmd.aliases);
- this.addHandler(command, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated);
- return;
- }
- else if (isCommandBuilderDefinition(builder)) {
- this.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated);
- return;
- }
- if (typeof cmd === 'string') {
- const parsedCommand = parseCommand(cmd);
- aliases = aliases.map(alias => parseCommand(alias).cmd);
- let isDefault = false;
- const parsedAliases = [parsedCommand.cmd].concat(aliases).filter(c => {
- if (DEFAULT_MARKER.test(c)) {
- isDefault = true;
- return false;
- }
- return true;
- });
- if (parsedAliases.length === 0 && isDefault)
- parsedAliases.push('$0');
- if (isDefault) {
- parsedCommand.cmd = parsedAliases[0];
- aliases = parsedAliases.slice(1);
- cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd);
- }
- aliases.forEach(alias => {
- this.aliasMap[alias] = parsedCommand.cmd;
- });
- if (description !== false) {
- this.usage.command(cmd, description, isDefault, aliases, deprecated);
- }
- this.handlers[parsedCommand.cmd] = {
- original: cmd,
- description,
- handler,
- builder: builder || {},
- middlewares,
- deprecated,
- demanded: parsedCommand.demanded,
- optional: parsedCommand.optional,
- };
- if (isDefault)
- this.defaultCommand = this.handlers[parsedCommand.cmd];
- }
- }
- getCommandHandlers() {
- return this.handlers;
- }
- getCommands() {
- return Object.keys(this.handlers).concat(Object.keys(this.aliasMap));
- }
- hasDefaultCommand() {
- return !!this.defaultCommand;
- }
- runCommand(command, yargs, parsed, commandIndex, helpOnly, helpOrVersionSet) {
- const commandHandler = this.handlers[command] ||
- this.handlers[this.aliasMap[command]] ||
- this.defaultCommand;
- const currentContext = yargs.getInternalMethods().getContext();
- const parentCommands = currentContext.commands.slice();
- const isDefaultCommand = !command;
- if (command) {
- currentContext.commands.push(command);
- currentContext.fullCommands.push(commandHandler.original);
- }
- const builderResult = this.applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, parsed.aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet);
- return isPromise(builderResult)
- ? builderResult.then(result => this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, result.innerArgv, currentContext, helpOnly, result.aliases, yargs))
- : this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, builderResult.innerArgv, currentContext, helpOnly, builderResult.aliases, yargs);
- }
- applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet) {
- const builder = commandHandler.builder;
- let innerYargs = yargs;
- if (isCommandBuilderCallback(builder)) {
- yargs.getInternalMethods().getUsageInstance().freeze();
- const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet);
- if (isPromise(builderOutput)) {
- return builderOutput.then(output => {
- innerYargs = isYargsInstance(output) ? output : yargs;
- return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly);
- });
- }
- }
- else if (isCommandBuilderOptionDefinitions(builder)) {
- yargs.getInternalMethods().getUsageInstance().freeze();
- innerYargs = yargs.getInternalMethods().reset(aliases);
- Object.keys(commandHandler.builder).forEach(key => {
- innerYargs.option(key, builder[key]);
- });
- }
- return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly);
- }
- parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly) {
- if (isDefaultCommand)
- innerYargs.getInternalMethods().getUsageInstance().unfreeze(true);
- if (this.shouldUpdateUsage(innerYargs)) {
- innerYargs
- .getInternalMethods()
- .getUsageInstance()
- .usage(this.usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description);
- }
- const innerArgv = innerYargs
- .getInternalMethods()
- .runYargsParserAndExecuteCommands(null, undefined, true, commandIndex, helpOnly);
- return isPromise(innerArgv)
- ? innerArgv.then(argv => ({
- aliases: innerYargs.parsed.aliases,
- innerArgv: argv,
- }))
- : {
- aliases: innerYargs.parsed.aliases,
- innerArgv: innerArgv,
- };
- }
- shouldUpdateUsage(yargs) {
- return (!yargs.getInternalMethods().getUsageInstance().getUsageDisabled() &&
- yargs.getInternalMethods().getUsageInstance().getUsage().length === 0);
- }
- usageFromParentCommandsCommandHandler(parentCommands, commandHandler) {
- const c = DEFAULT_MARKER.test(commandHandler.original)
- ? commandHandler.original.replace(DEFAULT_MARKER, '').trim()
- : commandHandler.original;
- const pc = parentCommands.filter(c => {
- return !DEFAULT_MARKER.test(c);
- });
- pc.push(c);
- return `$0 ${pc.join(' ')}`;
- }
- handleValidationAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, aliases, yargs, middlewares, positionalMap) {
- if (!yargs.getInternalMethods().getHasOutput()) {
- const validation = yargs
- .getInternalMethods()
- .runValidation(aliases, positionalMap, yargs.parsed.error, isDefaultCommand);
- innerArgv = maybeAsyncResult(innerArgv, result => {
- validation(result);
- return result;
- });
- }
- if (commandHandler.handler && !yargs.getInternalMethods().getHasOutput()) {
- yargs.getInternalMethods().setHasOutput();
- const populateDoubleDash = !!yargs.getOptions().configuration['populate--'];
- yargs
- .getInternalMethods()
- .postProcess(innerArgv, populateDoubleDash, false, false);
- innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false);
- innerArgv = maybeAsyncResult(innerArgv, result => {
- const handlerResult = commandHandler.handler(result);
- return isPromise(handlerResult)
- ? handlerResult.then(() => result)
- : result;
- });
- if (!isDefaultCommand) {
- yargs.getInternalMethods().getUsageInstance().cacheHelpMessage();
- }
- if (isPromise(innerArgv) &&
- !yargs.getInternalMethods().hasParseCallback()) {
- innerArgv.catch(error => {
- try {
- yargs.getInternalMethods().getUsageInstance().fail(null, error);
- }
- catch (_err) {
- }
- });
- }
- }
- if (!isDefaultCommand) {
- currentContext.commands.pop();
- currentContext.fullCommands.pop();
- }
- return innerArgv;
- }
- applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, helpOnly, aliases, yargs) {
- let positionalMap = {};
- if (helpOnly)
- return innerArgv;
- if (!yargs.getInternalMethods().getHasOutput()) {
- positionalMap = this.populatePositionals(commandHandler, innerArgv, currentContext, yargs);
- }
- const middlewares = this.globalMiddleware
- .getMiddleware()
- .slice(0)
- .concat(commandHandler.middlewares);
- const maybePromiseArgv = applyMiddleware(innerArgv, yargs, middlewares, true);
- return isPromise(maybePromiseArgv)
- ? maybePromiseArgv.then(resolvedInnerArgv => this.handleValidationAndGetResult(isDefaultCommand, commandHandler, resolvedInnerArgv, currentContext, aliases, yargs, middlewares, positionalMap))
- : this.handleValidationAndGetResult(isDefaultCommand, commandHandler, maybePromiseArgv, currentContext, aliases, yargs, middlewares, positionalMap);
- }
- populatePositionals(commandHandler, argv, context, yargs) {
- argv._ = argv._.slice(context.commands.length);
- const demanded = commandHandler.demanded.slice(0);
- const optional = commandHandler.optional.slice(0);
- const positionalMap = {};
- this.validation.positionalCount(demanded.length, argv._.length);
- while (demanded.length) {
- const demand = demanded.shift();
- this.populatePositional(demand, argv, positionalMap);
- }
- while (optional.length) {
- const maybe = optional.shift();
- this.populatePositional(maybe, argv, positionalMap);
- }
- argv._ = context.commands.concat(argv._.map(a => '' + a));
- this.postProcessPositionals(argv, positionalMap, this.cmdToParseOptions(commandHandler.original), yargs);
- return positionalMap;
- }
- populatePositional(positional, argv, positionalMap) {
- const cmd = positional.cmd[0];
- if (positional.variadic) {
- positionalMap[cmd] = argv._.splice(0).map(String);
- }
- else {
- if (argv._.length)
- positionalMap[cmd] = [String(argv._.shift())];
- }
- }
- cmdToParseOptions(cmdString) {
- const parseOptions = {
- array: [],
- default: {},
- alias: {},
- demand: {},
- };
- const parsed = parseCommand(cmdString);
- parsed.demanded.forEach(d => {
- const [cmd, ...aliases] = d.cmd;
- if (d.variadic) {
- parseOptions.array.push(cmd);
- parseOptions.default[cmd] = [];
- }
- parseOptions.alias[cmd] = aliases;
- parseOptions.demand[cmd] = true;
- });
- parsed.optional.forEach(o => {
- const [cmd, ...aliases] = o.cmd;
- if (o.variadic) {
- parseOptions.array.push(cmd);
- parseOptions.default[cmd] = [];
- }
- parseOptions.alias[cmd] = aliases;
- });
- return parseOptions;
- }
- postProcessPositionals(argv, positionalMap, parseOptions, yargs) {
- const options = Object.assign({}, yargs.getOptions());
- options.default = Object.assign(parseOptions.default, options.default);
- for (const key of Object.keys(parseOptions.alias)) {
- options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]);
- }
- options.array = options.array.concat(parseOptions.array);
- options.config = {};
- const unparsed = [];
- Object.keys(positionalMap).forEach(key => {
- positionalMap[key].map(value => {
- if (options.configuration['unknown-options-as-args'])
- options.key[key] = true;
- unparsed.push(`--${key}`);
- unparsed.push(value);
- });
- });
- if (!unparsed.length)
- return;
- const config = Object.assign({}, options.configuration, {
- 'populate--': false,
- });
- const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
- configuration: config,
- }));
- if (parsed.error) {
- yargs
- .getInternalMethods()
- .getUsageInstance()
- .fail(parsed.error.message, parsed.error);
- }
- else {
- const positionalKeys = Object.keys(positionalMap);
- Object.keys(positionalMap).forEach(key => {
- positionalKeys.push(...parsed.aliases[key]);
- });
- Object.keys(parsed.argv).forEach(key => {
- if (positionalKeys.includes(key)) {
- if (!positionalMap[key])
- positionalMap[key] = parsed.argv[key];
- if (!this.isInConfigs(yargs, key) &&
- !this.isDefaulted(yargs, key) &&
- Object.prototype.hasOwnProperty.call(argv, key) &&
- Object.prototype.hasOwnProperty.call(parsed.argv, key) &&
- (Array.isArray(argv[key]) || Array.isArray(parsed.argv[key]))) {
- argv[key] = [].concat(argv[key], parsed.argv[key]);
- }
- else {
- argv[key] = parsed.argv[key];
- }
- }
- });
- }
- }
- isDefaulted(yargs, key) {
- const { default: defaults } = yargs.getOptions();
- return (Object.prototype.hasOwnProperty.call(defaults, key) ||
- Object.prototype.hasOwnProperty.call(defaults, this.shim.Parser.camelCase(key)));
- }
- isInConfigs(yargs, key) {
- const { configObjects } = yargs.getOptions();
- return (configObjects.some(c => Object.prototype.hasOwnProperty.call(c, key)) ||
- configObjects.some(c => Object.prototype.hasOwnProperty.call(c, this.shim.Parser.camelCase(key))));
- }
- runDefaultBuilderOn(yargs) {
- if (!this.defaultCommand)
- return;
- if (this.shouldUpdateUsage(yargs)) {
- const commandString = DEFAULT_MARKER.test(this.defaultCommand.original)
- ? this.defaultCommand.original
- : this.defaultCommand.original.replace(/^[^[\]<>]*/, '$0 ');
- yargs
- .getInternalMethods()
- .getUsageInstance()
- .usage(commandString, this.defaultCommand.description);
- }
- const builder = this.defaultCommand.builder;
- if (isCommandBuilderCallback(builder)) {
- return builder(yargs, true);
- }
- else if (!isCommandBuilderDefinition(builder)) {
- Object.keys(builder).forEach(key => {
- yargs.option(key, builder[key]);
- });
- }
- return undefined;
- }
- moduleName(obj) {
- const mod = whichModule(obj);
- if (!mod)
- throw new Error(`No command name given for module: ${this.shim.inspect(obj)}`);
- return this.commandFromFilename(mod.filename);
- }
- commandFromFilename(filename) {
- return this.shim.path.basename(filename, this.shim.path.extname(filename));
- }
- extractDesc({ describe, description, desc }) {
- for (const test of [describe, description, desc]) {
- if (typeof test === 'string' || test === false)
- return test;
- assertNotStrictEqual(test, true, this.shim);
- }
- return false;
- }
- freeze() {
- this.frozens.push({
- handlers: this.handlers,
- aliasMap: this.aliasMap,
- defaultCommand: this.defaultCommand,
- });
- }
- unfreeze() {
- const frozen = this.frozens.pop();
- assertNotStrictEqual(frozen, undefined, this.shim);
- ({
- handlers: this.handlers,
- aliasMap: this.aliasMap,
- defaultCommand: this.defaultCommand,
- } = frozen);
- }
- reset() {
- this.handlers = {};
- this.aliasMap = {};
- this.defaultCommand = undefined;
- this.requireCache = new Set();
- return this;
- }
-}
-export function command(usage, validation, globalMiddleware, shim) {
- return new CommandInstance(usage, validation, globalMiddleware, shim);
-}
-export function isCommandBuilderDefinition(builder) {
- return (typeof builder === 'object' &&
- !!builder.builder &&
- typeof builder.handler === 'function');
-}
-function isCommandAndAliases(cmd) {
- return cmd.every(c => typeof c === 'string');
-}
-export function isCommandBuilderCallback(builder) {
- return typeof builder === 'function';
-}
-function isCommandBuilderOptionDefinitions(builder) {
- return typeof builder === 'object';
-}
-export function isCommandHandlerDefinition(cmd) {
- return typeof cmd === 'object' && !Array.isArray(cmd);
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/completion-templates.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/completion-templates.js
deleted file mode 100644
index 2c4dcb5..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/completion-templates.js
+++ /dev/null
@@ -1,48 +0,0 @@
-export const completionShTemplate = `###-begin-{{app_name}}-completions-###
-#
-# yargs command completion script
-#
-# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
-# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
-#
-_{{app_name}}_yargs_completions()
-{
- local cur_word args type_list
-
- cur_word="\${COMP_WORDS[COMP_CWORD]}"
- args=("\${COMP_WORDS[@]}")
-
- # ask yargs to generate completions.
- type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
-
- COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
-
- # if no match was found, fall back to filename completion
- if [ \${#COMPREPLY[@]} -eq 0 ]; then
- COMPREPLY=()
- fi
-
- return 0
-}
-complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
-###-end-{{app_name}}-completions-###
-`;
-export const completionZshTemplate = `#compdef {{app_name}}
-###-begin-{{app_name}}-completions-###
-#
-# yargs command completion script
-#
-# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
-# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
-#
-_{{app_name}}_yargs_completions()
-{
- local reply
- local si=$IFS
- IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
- IFS=$si
- _describe 'values' reply
-}
-compdef _{{app_name}}_yargs_completions {{app_name}}
-###-end-{{app_name}}-completions-###
-`;
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/completion.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/completion.js
deleted file mode 100644
index cef2bbe..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/completion.js
+++ /dev/null
@@ -1,243 +0,0 @@
-import { isCommandBuilderCallback } from './command.js';
-import { assertNotStrictEqual } from './typings/common-types.js';
-import * as templates from './completion-templates.js';
-import { isPromise } from './utils/is-promise.js';
-import { parseCommand } from './parse-command.js';
-export class Completion {
- constructor(yargs, usage, command, shim) {
- var _a, _b, _c;
- this.yargs = yargs;
- this.usage = usage;
- this.command = command;
- this.shim = shim;
- this.completionKey = 'get-yargs-completions';
- this.aliases = null;
- this.customCompletionFunction = null;
- this.indexAfterLastReset = 0;
- this.zshShell =
- (_c = (((_a = this.shim.getEnv('SHELL')) === null || _a === void 0 ? void 0 : _a.includes('zsh')) ||
- ((_b = this.shim.getEnv('ZSH_NAME')) === null || _b === void 0 ? void 0 : _b.includes('zsh')))) !== null && _c !== void 0 ? _c : false;
- }
- defaultCompletion(args, argv, current, done) {
- const handlers = this.command.getCommandHandlers();
- for (let i = 0, ii = args.length; i < ii; ++i) {
- if (handlers[args[i]] && handlers[args[i]].builder) {
- const builder = handlers[args[i]].builder;
- if (isCommandBuilderCallback(builder)) {
- this.indexAfterLastReset = i + 1;
- const y = this.yargs.getInternalMethods().reset();
- builder(y, true);
- return y.argv;
- }
- }
- }
- const completions = [];
- this.commandCompletions(completions, args, current);
- this.optionCompletions(completions, args, argv, current);
- this.choicesFromOptionsCompletions(completions, args, argv, current);
- this.choicesFromPositionalsCompletions(completions, args, argv, current);
- done(null, completions);
- }
- commandCompletions(completions, args, current) {
- const parentCommands = this.yargs
- .getInternalMethods()
- .getContext().commands;
- if (!current.match(/^-/) &&
- parentCommands[parentCommands.length - 1] !== current &&
- !this.previousArgHasChoices(args)) {
- this.usage.getCommands().forEach(usageCommand => {
- const commandName = parseCommand(usageCommand[0]).cmd;
- if (args.indexOf(commandName) === -1) {
- if (!this.zshShell) {
- completions.push(commandName);
- }
- else {
- const desc = usageCommand[1] || '';
- completions.push(commandName.replace(/:/g, '\\:') + ':' + desc);
- }
- }
- });
- }
- }
- optionCompletions(completions, args, argv, current) {
- if ((current.match(/^-/) || (current === '' && completions.length === 0)) &&
- !this.previousArgHasChoices(args)) {
- const options = this.yargs.getOptions();
- const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [];
- Object.keys(options.key).forEach(key => {
- const negable = !!options.configuration['boolean-negation'] &&
- options.boolean.includes(key);
- const isPositionalKey = positionalKeys.includes(key);
- if (!isPositionalKey &&
- !options.hiddenOptions.includes(key) &&
- !this.argsContainKey(args, key, negable)) {
- this.completeOptionKey(key, completions, current, negable && !!options.default[key]);
- }
- });
- }
- }
- choicesFromOptionsCompletions(completions, args, argv, current) {
- if (this.previousArgHasChoices(args)) {
- const choices = this.getPreviousArgChoices(args);
- if (choices && choices.length > 0) {
- completions.push(...choices.map(c => c.replace(/:/g, '\\:')));
- }
- }
- }
- choicesFromPositionalsCompletions(completions, args, argv, current) {
- if (current === '' &&
- completions.length > 0 &&
- this.previousArgHasChoices(args)) {
- return;
- }
- const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [];
- const offset = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length +
- 1);
- const positionalKey = positionalKeys[argv._.length - offset - 1];
- if (!positionalKey) {
- return;
- }
- const choices = this.yargs.getOptions().choices[positionalKey] || [];
- for (const choice of choices) {
- if (choice.startsWith(current)) {
- completions.push(choice.replace(/:/g, '\\:'));
- }
- }
- }
- getPreviousArgChoices(args) {
- if (args.length < 1)
- return;
- let previousArg = args[args.length - 1];
- let filter = '';
- if (!previousArg.startsWith('-') && args.length > 1) {
- filter = previousArg;
- previousArg = args[args.length - 2];
- }
- if (!previousArg.startsWith('-'))
- return;
- const previousArgKey = previousArg.replace(/^-+/, '');
- const options = this.yargs.getOptions();
- const possibleAliases = [
- previousArgKey,
- ...(this.yargs.getAliases()[previousArgKey] || []),
- ];
- let choices;
- for (const possibleAlias of possibleAliases) {
- if (Object.prototype.hasOwnProperty.call(options.key, possibleAlias) &&
- Array.isArray(options.choices[possibleAlias])) {
- choices = options.choices[possibleAlias];
- break;
- }
- }
- if (choices) {
- return choices.filter(choice => !filter || choice.startsWith(filter));
- }
- }
- previousArgHasChoices(args) {
- const choices = this.getPreviousArgChoices(args);
- return choices !== undefined && choices.length > 0;
- }
- argsContainKey(args, key, negable) {
- const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? '-' : '--') + s) !== -1;
- if (argsContains(key))
- return true;
- if (negable && argsContains(`no-${key}`))
- return true;
- if (this.aliases) {
- for (const alias of this.aliases[key]) {
- if (argsContains(alias))
- return true;
- }
- }
- return false;
- }
- completeOptionKey(key, completions, current, negable) {
- var _a, _b, _c, _d;
- let keyWithDesc = key;
- if (this.zshShell) {
- const descs = this.usage.getDescriptions();
- const aliasKey = (_b = (_a = this === null || this === void 0 ? void 0 : this.aliases) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.find(alias => {
- const desc = descs[alias];
- return typeof desc === 'string' && desc.length > 0;
- });
- const descFromAlias = aliasKey ? descs[aliasKey] : undefined;
- const desc = (_d = (_c = descs[key]) !== null && _c !== void 0 ? _c : descFromAlias) !== null && _d !== void 0 ? _d : '';
- keyWithDesc = `${key.replace(/:/g, '\\:')}:${desc
- .replace('__yargsString__:', '')
- .replace(/(\r\n|\n|\r)/gm, ' ')}`;
- }
- const startsByTwoDashes = (s) => /^--/.test(s);
- const isShortOption = (s) => /^[^0-9]$/.test(s);
- const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--';
- completions.push(dashes + keyWithDesc);
- if (negable) {
- completions.push(dashes + 'no-' + keyWithDesc);
- }
- }
- customCompletion(args, argv, current, done) {
- assertNotStrictEqual(this.customCompletionFunction, null, this.shim);
- if (isSyncCompletionFunction(this.customCompletionFunction)) {
- const result = this.customCompletionFunction(current, argv);
- if (isPromise(result)) {
- return result
- .then(list => {
- this.shim.process.nextTick(() => {
- done(null, list);
- });
- })
- .catch(err => {
- this.shim.process.nextTick(() => {
- done(err, undefined);
- });
- });
- }
- return done(null, result);
- }
- else if (isFallbackCompletionFunction(this.customCompletionFunction)) {
- return this.customCompletionFunction(current, argv, (onCompleted = done) => this.defaultCompletion(args, argv, current, onCompleted), completions => {
- done(null, completions);
- });
- }
- else {
- return this.customCompletionFunction(current, argv, completions => {
- done(null, completions);
- });
- }
- }
- getCompletion(args, done) {
- const current = args.length ? args[args.length - 1] : '';
- const argv = this.yargs.parse(args, true);
- const completionFunction = this.customCompletionFunction
- ? (argv) => this.customCompletion(args, argv, current, done)
- : (argv) => this.defaultCompletion(args, argv, current, done);
- return isPromise(argv)
- ? argv.then(completionFunction)
- : completionFunction(argv);
- }
- generateCompletionScript($0, cmd) {
- let script = this.zshShell
- ? templates.completionZshTemplate
- : templates.completionShTemplate;
- const name = this.shim.path.basename($0);
- if ($0.match(/\.js$/))
- $0 = `./${$0}`;
- script = script.replace(/{{app_name}}/g, name);
- script = script.replace(/{{completion_command}}/g, cmd);
- return script.replace(/{{app_path}}/g, $0);
- }
- registerFunction(fn) {
- this.customCompletionFunction = fn;
- }
- setParsed(parsed) {
- this.aliases = parsed.aliases;
- }
-}
-export function completion(yargs, usage, command, shim) {
- return new Completion(yargs, usage, command, shim);
-}
-function isSyncCompletionFunction(completionFunction) {
- return completionFunction.length < 3;
-}
-function isFallbackCompletionFunction(completionFunction) {
- return completionFunction.length > 3;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/middleware.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/middleware.js
deleted file mode 100644
index 4e561a7..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/middleware.js
+++ /dev/null
@@ -1,88 +0,0 @@
-import { argsert } from './argsert.js';
-import { isPromise } from './utils/is-promise.js';
-export class GlobalMiddleware {
- constructor(yargs) {
- this.globalMiddleware = [];
- this.frozens = [];
- this.yargs = yargs;
- }
- addMiddleware(callback, applyBeforeValidation, global = true, mutates = false) {
- argsert('<array|function> [boolean] [boolean] [boolean]', [callback, applyBeforeValidation, global], arguments.length);
- if (Array.isArray(callback)) {
- for (let i = 0; i < callback.length; i++) {
- if (typeof callback[i] !== 'function') {
- throw Error('middleware must be a function');
- }
- const m = callback[i];
- m.applyBeforeValidation = applyBeforeValidation;
- m.global = global;
- }
- Array.prototype.push.apply(this.globalMiddleware, callback);
- }
- else if (typeof callback === 'function') {
- const m = callback;
- m.applyBeforeValidation = applyBeforeValidation;
- m.global = global;
- m.mutates = mutates;
- this.globalMiddleware.push(callback);
- }
- return this.yargs;
- }
- addCoerceMiddleware(callback, option) {
- const aliases = this.yargs.getAliases();
- this.globalMiddleware = this.globalMiddleware.filter(m => {
- const toCheck = [...(aliases[option] || []), option];
- if (!m.option)
- return true;
- else
- return !toCheck.includes(m.option);
- });
- callback.option = option;
- return this.addMiddleware(callback, true, true, true);
- }
- getMiddleware() {
- return this.globalMiddleware;
- }
- freeze() {
- this.frozens.push([...this.globalMiddleware]);
- }
- unfreeze() {
- const frozen = this.frozens.pop();
- if (frozen !== undefined)
- this.globalMiddleware = frozen;
- }
- reset() {
- this.globalMiddleware = this.globalMiddleware.filter(m => m.global);
- }
-}
-export function commandMiddlewareFactory(commandMiddleware) {
- if (!commandMiddleware)
- return [];
- return commandMiddleware.map(middleware => {
- middleware.applyBeforeValidation = false;
- return middleware;
- });
-}
-export function applyMiddleware(argv, yargs, middlewares, beforeValidation) {
- return middlewares.reduce((acc, middleware) => {
- if (middleware.applyBeforeValidation !== beforeValidation) {
- return acc;
- }
- if (middleware.mutates) {
- if (middleware.applied)
- return acc;
- middleware.applied = true;
- }
- if (isPromise(acc)) {
- return acc
- .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)]))
- .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj));
- }
- else {
- const result = middleware(acc, yargs);
- return isPromise(result)
- ? result.then(middlewareObj => Object.assign(acc, middlewareObj))
- : Object.assign(acc, result);
- }
- }, argv);
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/parse-command.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/parse-command.js
deleted file mode 100644
index 4989f53..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/parse-command.js
+++ /dev/null
@@ -1,32 +0,0 @@
-export function parseCommand(cmd) {
- const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ');
- const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/);
- const bregex = /\.*[\][<>]/g;
- const firstCommand = splitCommand.shift();
- if (!firstCommand)
- throw new Error(`No command found in: ${cmd}`);
- const parsedCommand = {
- cmd: firstCommand.replace(bregex, ''),
- demanded: [],
- optional: [],
- };
- splitCommand.forEach((cmd, i) => {
- let variadic = false;
- cmd = cmd.replace(/\s/g, '');
- if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1)
- variadic = true;
- if (/^\[/.test(cmd)) {
- parsedCommand.optional.push({
- cmd: cmd.replace(bregex, '').split('|'),
- variadic,
- });
- }
- else {
- parsedCommand.demanded.push({
- cmd: cmd.replace(bregex, '').split('|'),
- variadic,
- });
- }
- });
- return parsedCommand;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/typings/common-types.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/typings/common-types.js
deleted file mode 100644
index 73e1773..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/typings/common-types.js
+++ /dev/null
@@ -1,9 +0,0 @@
-export function assertNotStrictEqual(actual, expected, shim, message) {
- shim.assert.notStrictEqual(actual, expected, message);
-}
-export function assertSingleKey(actual, shim) {
- shim.assert.strictEqual(typeof actual, 'string');
-}
-export function objectKeys(object) {
- return Object.keys(object);
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/typings/yargs-parser-types.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/typings/yargs-parser-types.js
deleted file mode 100644
index cb0ff5c..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/typings/yargs-parser-types.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/usage.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/usage.js
deleted file mode 100644
index 0127c13..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/usage.js
+++ /dev/null
@@ -1,584 +0,0 @@
-import { objFilter } from './utils/obj-filter.js';
-import { YError } from './yerror.js';
-import setBlocking from './utils/set-blocking.js';
-function isBoolean(fail) {
- return typeof fail === 'boolean';
-}
-export function usage(yargs, shim) {
- const __ = shim.y18n.__;
- const self = {};
- const fails = [];
- self.failFn = function failFn(f) {
- fails.push(f);
- };
- let failMessage = null;
- let globalFailMessage = null;
- let showHelpOnFail = true;
- self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) {
- const [enabled, message] = typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2];
- if (yargs.getInternalMethods().isGlobalContext()) {
- globalFailMessage = message;
- }
- failMessage = message;
- showHelpOnFail = enabled;
- return self;
- };
- let failureOutput = false;
- self.fail = function fail(msg, err) {
- const logger = yargs.getInternalMethods().getLoggerInstance();
- if (fails.length) {
- for (let i = fails.length - 1; i >= 0; --i) {
- const fail = fails[i];
- if (isBoolean(fail)) {
- if (err)
- throw err;
- else if (msg)
- throw Error(msg);
- }
- else {
- fail(msg, err, self);
- }
- }
- }
- else {
- if (yargs.getExitProcess())
- setBlocking(true);
- if (!failureOutput) {
- failureOutput = true;
- if (showHelpOnFail) {
- yargs.showHelp('error');
- logger.error();
- }
- if (msg || err)
- logger.error(msg || err);
- const globalOrCommandFailMessage = failMessage || globalFailMessage;
- if (globalOrCommandFailMessage) {
- if (msg || err)
- logger.error('');
- logger.error(globalOrCommandFailMessage);
- }
- }
- err = err || new YError(msg);
- if (yargs.getExitProcess()) {
- return yargs.exit(1);
- }
- else if (yargs.getInternalMethods().hasParseCallback()) {
- return yargs.exit(1, err);
- }
- else {
- throw err;
- }
- }
- };
- let usages = [];
- let usageDisabled = false;
- self.usage = (msg, description) => {
- if (msg === null) {
- usageDisabled = true;
- usages = [];
- return self;
- }
- usageDisabled = false;
- usages.push([msg, description || '']);
- return self;
- };
- self.getUsage = () => {
- return usages;
- };
- self.getUsageDisabled = () => {
- return usageDisabled;
- };
- self.getPositionalGroupName = () => {
- return __('Positionals:');
- };
- let examples = [];
- self.example = (cmd, description) => {
- examples.push([cmd, description || '']);
- };
- let commands = [];
- self.command = function command(cmd, description, isDefault, aliases, deprecated = false) {
- if (isDefault) {
- commands = commands.map(cmdArray => {
- cmdArray[2] = false;
- return cmdArray;
- });
- }
- commands.push([cmd, description || '', isDefault, aliases, deprecated]);
- };
- self.getCommands = () => commands;
- let descriptions = {};
- self.describe = function describe(keyOrKeys, desc) {
- if (Array.isArray(keyOrKeys)) {
- keyOrKeys.forEach(k => {
- self.describe(k, desc);
- });
- }
- else if (typeof keyOrKeys === 'object') {
- Object.keys(keyOrKeys).forEach(k => {
- self.describe(k, keyOrKeys[k]);
- });
- }
- else {
- descriptions[keyOrKeys] = desc;
- }
- };
- self.getDescriptions = () => descriptions;
- let epilogs = [];
- self.epilog = msg => {
- epilogs.push(msg);
- };
- let wrapSet = false;
- let wrap;
- self.wrap = cols => {
- wrapSet = true;
- wrap = cols;
- };
- self.getWrap = () => {
- if (shim.getEnv('YARGS_DISABLE_WRAP')) {
- return null;
- }
- if (!wrapSet) {
- wrap = windowWidth();
- wrapSet = true;
- }
- return wrap;
- };
- const deferY18nLookupPrefix = '__yargsString__:';
- self.deferY18nLookup = str => deferY18nLookupPrefix + str;
- self.help = function help() {
- if (cachedHelpMessage)
- return cachedHelpMessage;
- normalizeAliases();
- const base$0 = yargs.customScriptName
- ? yargs.$0
- : shim.path.basename(yargs.$0);
- const demandedOptions = yargs.getDemandedOptions();
- const demandedCommands = yargs.getDemandedCommands();
- const deprecatedOptions = yargs.getDeprecatedOptions();
- const groups = yargs.getGroups();
- const options = yargs.getOptions();
- let keys = [];
- keys = keys.concat(Object.keys(descriptions));
- keys = keys.concat(Object.keys(demandedOptions));
- keys = keys.concat(Object.keys(demandedCommands));
- keys = keys.concat(Object.keys(options.default));
- keys = keys.filter(filterHiddenOptions);
- keys = Object.keys(keys.reduce((acc, key) => {
- if (key !== '_')
- acc[key] = true;
- return acc;
- }, {}));
- const theWrap = self.getWrap();
- const ui = shim.cliui({
- width: theWrap,
- wrap: !!theWrap,
- });
- if (!usageDisabled) {
- if (usages.length) {
- usages.forEach(usage => {
- ui.div({ text: `${usage[0].replace(/\$0/g, base$0)}` });
- if (usage[1]) {
- ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] });
- }
- });
- ui.div();
- }
- else if (commands.length) {
- let u = null;
- if (demandedCommands._) {
- u = `${base$0} <${__('command')}>\n`;
- }
- else {
- u = `${base$0} [${__('command')}]\n`;
- }
- ui.div(`${u}`);
- }
- }
- if (commands.length > 1 || (commands.length === 1 && !commands[0][2])) {
- ui.div(__('Commands:'));
- const context = yargs.getInternalMethods().getContext();
- const parentCommands = context.commands.length
- ? `${context.commands.join(' ')} `
- : '';
- if (yargs.getInternalMethods().getParserConfiguration()['sort-commands'] ===
- true) {
- commands = commands.sort((a, b) => a[0].localeCompare(b[0]));
- }
- const prefix = base$0 ? `${base$0} ` : '';
- commands.forEach(command => {
- const commandString = `${prefix}${parentCommands}${command[0].replace(/^\$0 ?/, '')}`;
- ui.span({
- text: commandString,
- padding: [0, 2, 0, 2],
- width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4,
- }, { text: command[1] });
- const hints = [];
- if (command[2])
- hints.push(`[${__('default')}]`);
- if (command[3] && command[3].length) {
- hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`);
- }
- if (command[4]) {
- if (typeof command[4] === 'string') {
- hints.push(`[${__('deprecated: %s', command[4])}]`);
- }
- else {
- hints.push(`[${__('deprecated')}]`);
- }
- }
- if (hints.length) {
- ui.div({
- text: hints.join(' '),
- padding: [0, 0, 0, 2],
- align: 'right',
- });
- }
- else {
- ui.div();
- }
- });
- ui.div();
- }
- const aliasKeys = (Object.keys(options.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []);
- keys = keys.filter(key => !yargs.parsed.newAliases[key] &&
- aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1));
- const defaultGroup = __('Options:');
- if (!groups[defaultGroup])
- groups[defaultGroup] = [];
- addUngroupedKeys(keys, options.alias, groups, defaultGroup);
- const isLongSwitch = (sw) => /^--/.test(getText(sw));
- const displayedGroups = Object.keys(groups)
- .filter(groupName => groups[groupName].length > 0)
- .map(groupName => {
- const normalizedKeys = groups[groupName]
- .filter(filterHiddenOptions)
- .map(key => {
- if (aliasKeys.includes(key))
- return key;
- for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) {
- if ((options.alias[aliasKey] || []).includes(key))
- return aliasKey;
- }
- return key;
- });
- return { groupName, normalizedKeys };
- })
- .filter(({ normalizedKeys }) => normalizedKeys.length > 0)
- .map(({ groupName, normalizedKeys }) => {
- const switches = normalizedKeys.reduce((acc, key) => {
- acc[key] = [key]
- .concat(options.alias[key] || [])
- .map(sw => {
- if (groupName === self.getPositionalGroupName())
- return sw;
- else {
- return ((/^[0-9]$/.test(sw)
- ? options.boolean.includes(key)
- ? '-'
- : '--'
- : sw.length > 1
- ? '--'
- : '-') + sw);
- }
- })
- .sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2)
- ? 0
- : isLongSwitch(sw1)
- ? 1
- : -1)
- .join(', ');
- return acc;
- }, {});
- return { groupName, normalizedKeys, switches };
- });
- const shortSwitchesUsed = displayedGroups
- .filter(({ groupName }) => groupName !== self.getPositionalGroupName())
- .some(({ normalizedKeys, switches }) => !normalizedKeys.every(key => isLongSwitch(switches[key])));
- if (shortSwitchesUsed) {
- displayedGroups
- .filter(({ groupName }) => groupName !== self.getPositionalGroupName())
- .forEach(({ normalizedKeys, switches }) => {
- normalizedKeys.forEach(key => {
- if (isLongSwitch(switches[key])) {
- switches[key] = addIndentation(switches[key], '-x, '.length);
- }
- });
- });
- }
- displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => {
- ui.div(groupName);
- normalizedKeys.forEach(key => {
- const kswitch = switches[key];
- let desc = descriptions[key] || '';
- let type = null;
- if (desc.includes(deferY18nLookupPrefix))
- desc = __(desc.substring(deferY18nLookupPrefix.length));
- if (options.boolean.includes(key))
- type = `[${__('boolean')}]`;
- if (options.count.includes(key))
- type = `[${__('count')}]`;
- if (options.string.includes(key))
- type = `[${__('string')}]`;
- if (options.normalize.includes(key))
- type = `[${__('string')}]`;
- if (options.array.includes(key))
- type = `[${__('array')}]`;
- if (options.number.includes(key))
- type = `[${__('number')}]`;
- const deprecatedExtra = (deprecated) => typeof deprecated === 'string'
- ? `[${__('deprecated: %s', deprecated)}]`
- : `[${__('deprecated')}]`;
- const extra = [
- key in deprecatedOptions
- ? deprecatedExtra(deprecatedOptions[key])
- : null,
- type,
- key in demandedOptions ? `[${__('required')}]` : null,
- options.choices && options.choices[key]
- ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]`
- : null,
- defaultString(options.default[key], options.defaultDescription[key]),
- ]
- .filter(Boolean)
- .join(' ');
- ui.span({
- text: getText(kswitch),
- padding: [0, 2, 0, 2 + getIndentation(kswitch)],
- width: maxWidth(switches, theWrap) + 4,
- }, desc);
- const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()['hide-types'] ===
- true;
- if (extra && !shouldHideOptionExtras)
- ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' });
- else
- ui.div();
- });
- ui.div();
- });
- if (examples.length) {
- ui.div(__('Examples:'));
- examples.forEach(example => {
- example[0] = example[0].replace(/\$0/g, base$0);
- });
- examples.forEach(example => {
- if (example[1] === '') {
- ui.div({
- text: example[0],
- padding: [0, 2, 0, 2],
- });
- }
- else {
- ui.div({
- text: example[0],
- padding: [0, 2, 0, 2],
- width: maxWidth(examples, theWrap) + 4,
- }, {
- text: example[1],
- });
- }
- });
- ui.div();
- }
- if (epilogs.length > 0) {
- const e = epilogs
- .map(epilog => epilog.replace(/\$0/g, base$0))
- .join('\n');
- ui.div(`${e}\n`);
- }
- return ui.toString().replace(/\s*$/, '');
- };
- function maxWidth(table, theWrap, modifier) {
- let width = 0;
- if (!Array.isArray(table)) {
- table = Object.values(table).map(v => [v]);
- }
- table.forEach(v => {
- width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText(v[0])}` : getText(v[0])) + getIndentation(v[0]), width);
- });
- if (theWrap)
- width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10));
- return width;
- }
- function normalizeAliases() {
- const demandedOptions = yargs.getDemandedOptions();
- const options = yargs.getOptions();
- (Object.keys(options.alias) || []).forEach(key => {
- options.alias[key].forEach(alias => {
- if (descriptions[alias])
- self.describe(key, descriptions[alias]);
- if (alias in demandedOptions)
- yargs.demandOption(key, demandedOptions[alias]);
- if (options.boolean.includes(alias))
- yargs.boolean(key);
- if (options.count.includes(alias))
- yargs.count(key);
- if (options.string.includes(alias))
- yargs.string(key);
- if (options.normalize.includes(alias))
- yargs.normalize(key);
- if (options.array.includes(alias))
- yargs.array(key);
- if (options.number.includes(alias))
- yargs.number(key);
- });
- });
- }
- let cachedHelpMessage;
- self.cacheHelpMessage = function () {
- cachedHelpMessage = this.help();
- };
- self.clearCachedHelpMessage = function () {
- cachedHelpMessage = undefined;
- };
- self.hasCachedHelpMessage = function () {
- return !!cachedHelpMessage;
- };
- function addUngroupedKeys(keys, aliases, groups, defaultGroup) {
- let groupedKeys = [];
- let toCheck = null;
- Object.keys(groups).forEach(group => {
- groupedKeys = groupedKeys.concat(groups[group]);
- });
- keys.forEach(key => {
- toCheck = [key].concat(aliases[key]);
- if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) {
- groups[defaultGroup].push(key);
- }
- });
- return groupedKeys;
- }
- function filterHiddenOptions(key) {
- return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 ||
- yargs.parsed.argv[yargs.getOptions().showHiddenOpt]);
- }
- self.showHelp = (level) => {
- const logger = yargs.getInternalMethods().getLoggerInstance();
- if (!level)
- level = 'error';
- const emit = typeof level === 'function' ? level : logger[level];
- emit(self.help());
- };
- self.functionDescription = fn => {
- const description = fn.name
- ? shim.Parser.decamelize(fn.name, '-')
- : __('generated-value');
- return ['(', description, ')'].join('');
- };
- self.stringifiedValues = function stringifiedValues(values, separator) {
- let string = '';
- const sep = separator || ', ';
- const array = [].concat(values);
- if (!values || !array.length)
- return string;
- array.forEach(value => {
- if (string.length)
- string += sep;
- string += JSON.stringify(value);
- });
- return string;
- };
- function defaultString(value, defaultDescription) {
- let string = `[${__('default:')} `;
- if (value === undefined && !defaultDescription)
- return null;
- if (defaultDescription) {
- string += defaultDescription;
- }
- else {
- switch (typeof value) {
- case 'string':
- string += `"${value}"`;
- break;
- case 'object':
- string += JSON.stringify(value);
- break;
- default:
- string += value;
- }
- }
- return `${string}]`;
- }
- function windowWidth() {
- const maxWidth = 80;
- if (shim.process.stdColumns) {
- return Math.min(maxWidth, shim.process.stdColumns);
- }
- else {
- return maxWidth;
- }
- }
- let version = null;
- self.version = ver => {
- version = ver;
- };
- self.showVersion = level => {
- const logger = yargs.getInternalMethods().getLoggerInstance();
- if (!level)
- level = 'error';
- const emit = typeof level === 'function' ? level : logger[level];
- emit(version);
- };
- self.reset = function reset(localLookup) {
- failMessage = null;
- failureOutput = false;
- usages = [];
- usageDisabled = false;
- epilogs = [];
- examples = [];
- commands = [];
- descriptions = objFilter(descriptions, k => !localLookup[k]);
- return self;
- };
- const frozens = [];
- self.freeze = function freeze() {
- frozens.push({
- failMessage,
- failureOutput,
- usages,
- usageDisabled,
- epilogs,
- examples,
- commands,
- descriptions,
- });
- };
- self.unfreeze = function unfreeze(defaultCommand = false) {
- const frozen = frozens.pop();
- if (!frozen)
- return;
- if (defaultCommand) {
- descriptions = { ...frozen.descriptions, ...descriptions };
- commands = [...frozen.commands, ...commands];
- usages = [...frozen.usages, ...usages];
- examples = [...frozen.examples, ...examples];
- epilogs = [...frozen.epilogs, ...epilogs];
- }
- else {
- ({
- failMessage,
- failureOutput,
- usages,
- usageDisabled,
- epilogs,
- examples,
- commands,
- descriptions,
- } = frozen);
- }
- };
- return self;
-}
-function isIndentedText(text) {
- return typeof text === 'object';
-}
-function addIndentation(text, indent) {
- return isIndentedText(text)
- ? { text: text.text, indentation: text.indentation + indent }
- : { text, indentation: indent };
-}
-function getIndentation(text) {
- return isIndentedText(text) ? text.indentation : 0;
-}
-function getText(text) {
- return isIndentedText(text) ? text.text : text;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/apply-extends.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/apply-extends.js
deleted file mode 100644
index 0e593b4..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/apply-extends.js
+++ /dev/null
@@ -1,59 +0,0 @@
-import { YError } from '../yerror.js';
-let previouslyVisitedConfigs = [];
-let shim;
-export function applyExtends(config, cwd, mergeExtends, _shim) {
- shim = _shim;
- let defaultConfig = {};
- if (Object.prototype.hasOwnProperty.call(config, 'extends')) {
- if (typeof config.extends !== 'string')
- return defaultConfig;
- const isPath = /\.json|\..*rc$/.test(config.extends);
- let pathToDefault = null;
- if (!isPath) {
- try {
- pathToDefault = require.resolve(config.extends);
- }
- catch (_err) {
- return config;
- }
- }
- else {
- pathToDefault = getPathToDefaultConfig(cwd, config.extends);
- }
- checkForCircularExtends(pathToDefault);
- previouslyVisitedConfigs.push(pathToDefault);
- defaultConfig = isPath
- ? JSON.parse(shim.readFileSync(pathToDefault, 'utf8'))
- : require(config.extends);
- delete config.extends;
- defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim);
- }
- previouslyVisitedConfigs = [];
- return mergeExtends
- ? mergeDeep(defaultConfig, config)
- : Object.assign({}, defaultConfig, config);
-}
-function checkForCircularExtends(cfgPath) {
- if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
- throw new YError(`Circular extended configurations: '${cfgPath}'.`);
- }
-}
-function getPathToDefaultConfig(cwd, pathToExtend) {
- return shim.path.resolve(cwd, pathToExtend);
-}
-function mergeDeep(config1, config2) {
- const target = {};
- function isObject(obj) {
- return obj && typeof obj === 'object' && !Array.isArray(obj);
- }
- Object.assign(target, config1);
- for (const key of Object.keys(config2)) {
- if (isObject(config2[key]) && isObject(target[key])) {
- target[key] = mergeDeep(config1[key], config2[key]);
- }
- else {
- target[key] = config2[key];
- }
- }
- return target;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/is-promise.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/is-promise.js
deleted file mode 100644
index d250c08..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/is-promise.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export function isPromise(maybePromise) {
- return (!!maybePromise &&
- !!maybePromise.then &&
- typeof maybePromise.then === 'function');
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/levenshtein.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/levenshtein.js
deleted file mode 100644
index 60575ef..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/levenshtein.js
+++ /dev/null
@@ -1,34 +0,0 @@
-export function levenshtein(a, b) {
- if (a.length === 0)
- return b.length;
- if (b.length === 0)
- return a.length;
- const matrix = [];
- let i;
- for (i = 0; i <= b.length; i++) {
- matrix[i] = [i];
- }
- let j;
- for (j = 0; j <= a.length; j++) {
- matrix[0][j] = j;
- }
- for (i = 1; i <= b.length; i++) {
- for (j = 1; j <= a.length; j++) {
- if (b.charAt(i - 1) === a.charAt(j - 1)) {
- matrix[i][j] = matrix[i - 1][j - 1];
- }
- else {
- if (i > 1 &&
- j > 1 &&
- b.charAt(i - 2) === a.charAt(j - 1) &&
- b.charAt(i - 1) === a.charAt(j - 2)) {
- matrix[i][j] = matrix[i - 2][j - 2] + 1;
- }
- else {
- matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1));
- }
- }
- }
- }
- return matrix[b.length][a.length];
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/maybe-async-result.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/maybe-async-result.js
deleted file mode 100644
index 8c6a40c..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/maybe-async-result.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { isPromise } from './is-promise.js';
-export function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => {
- throw err;
-}) {
- try {
- const result = isFunction(getResult) ? getResult() : getResult;
- return isPromise(result)
- ? result.then((result) => resultHandler(result))
- : resultHandler(result);
- }
- catch (err) {
- return errorHandler(err);
- }
-}
-function isFunction(arg) {
- return typeof arg === 'function';
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/obj-filter.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/obj-filter.js
deleted file mode 100644
index cd68ad2..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/obj-filter.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import { objectKeys } from '../typings/common-types.js';
-export function objFilter(original = {}, filter = () => true) {
- const obj = {};
- objectKeys(original).forEach(key => {
- if (filter(key, original[key])) {
- obj[key] = original[key];
- }
- });
- return obj;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/process-argv.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/process-argv.js
deleted file mode 100644
index 74dc9e4..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/process-argv.js
+++ /dev/null
@@ -1,17 +0,0 @@
-function getProcessArgvBinIndex() {
- if (isBundledElectronApp())
- return 0;
- return 1;
-}
-function isBundledElectronApp() {
- return isElectronApp() && !process.defaultApp;
-}
-function isElectronApp() {
- return !!process.versions.electron;
-}
-export function hideBin(argv) {
- return argv.slice(getProcessArgvBinIndex() + 1);
-}
-export function getProcessArgvBin() {
- return process.argv[getProcessArgvBinIndex()];
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/set-blocking.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/set-blocking.js
deleted file mode 100644
index 88fb806..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/set-blocking.js
+++ /dev/null
@@ -1,12 +0,0 @@
-export default function setBlocking(blocking) {
- if (typeof process === 'undefined')
- return;
- [process.stdout, process.stderr].forEach(_stream => {
- const stream = _stream;
- if (stream._handle &&
- stream.isTTY &&
- typeof stream._handle.setBlocking === 'function') {
- stream._handle.setBlocking(blocking);
- }
- });
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/which-module.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/which-module.js
deleted file mode 100644
index 5974e22..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/utils/which-module.js
+++ /dev/null
@@ -1,10 +0,0 @@
-export default function whichModule(exported) {
- if (typeof require === 'undefined')
- return null;
- for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) {
- mod = require.cache[files[i]];
- if (mod.exports === exported)
- return mod;
- }
- return null;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/validation.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/validation.js
deleted file mode 100644
index bd2e1b8..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/validation.js
+++ /dev/null
@@ -1,305 +0,0 @@
-import { argsert } from './argsert.js';
-import { assertNotStrictEqual, } from './typings/common-types.js';
-import { levenshtein as distance } from './utils/levenshtein.js';
-import { objFilter } from './utils/obj-filter.js';
-const specialKeys = ['$0', '--', '_'];
-export function validation(yargs, usage, shim) {
- const __ = shim.y18n.__;
- const __n = shim.y18n.__n;
- const self = {};
- self.nonOptionCount = function nonOptionCount(argv) {
- const demandedCommands = yargs.getDemandedCommands();
- const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0);
- const _s = positionalCount - yargs.getInternalMethods().getContext().commands.length;
- if (demandedCommands._ &&
- (_s < demandedCommands._.min || _s > demandedCommands._.max)) {
- if (_s < demandedCommands._.min) {
- if (demandedCommands._.minMsg !== undefined) {
- usage.fail(demandedCommands._.minMsg
- ? demandedCommands._.minMsg
- .replace(/\$0/g, _s.toString())
- .replace(/\$1/, demandedCommands._.min.toString())
- : null);
- }
- else {
- usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString()));
- }
- }
- else if (_s > demandedCommands._.max) {
- if (demandedCommands._.maxMsg !== undefined) {
- usage.fail(demandedCommands._.maxMsg
- ? demandedCommands._.maxMsg
- .replace(/\$0/g, _s.toString())
- .replace(/\$1/, demandedCommands._.max.toString())
- : null);
- }
- else {
- usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString()));
- }
- }
- }
- };
- self.positionalCount = function positionalCount(required, observed) {
- if (observed < required) {
- usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + ''));
- }
- };
- self.requiredArguments = function requiredArguments(argv, demandedOptions) {
- let missing = null;
- for (const key of Object.keys(demandedOptions)) {
- if (!Object.prototype.hasOwnProperty.call(argv, key) ||
- typeof argv[key] === 'undefined') {
- missing = missing || {};
- missing[key] = demandedOptions[key];
- }
- }
- if (missing) {
- const customMsgs = [];
- for (const key of Object.keys(missing)) {
- const msg = missing[key];
- if (msg && customMsgs.indexOf(msg) < 0) {
- customMsgs.push(msg);
- }
- }
- const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : '';
- usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg));
- }
- };
- self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) {
- var _a;
- const commandKeys = yargs
- .getInternalMethods()
- .getCommandInstance()
- .getCommands();
- const unknown = [];
- const currentContext = yargs.getInternalMethods().getContext();
- Object.keys(argv).forEach(key => {
- if (!specialKeys.includes(key) &&
- !Object.prototype.hasOwnProperty.call(positionalMap, key) &&
- !Object.prototype.hasOwnProperty.call(yargs.getInternalMethods().getParseContext(), key) &&
- !self.isValidAndSomeAliasIsNotNew(key, aliases)) {
- unknown.push(key);
- }
- });
- if (checkPositionals &&
- (currentContext.commands.length > 0 ||
- commandKeys.length > 0 ||
- isDefaultCommand)) {
- argv._.slice(currentContext.commands.length).forEach(key => {
- if (!commandKeys.includes('' + key)) {
- unknown.push('' + key);
- }
- });
- }
- if (checkPositionals) {
- const demandedCommands = yargs.getDemandedCommands();
- const maxNonOptDemanded = ((_a = demandedCommands._) === null || _a === void 0 ? void 0 : _a.max) || 0;
- const expected = currentContext.commands.length + maxNonOptDemanded;
- if (expected < argv._.length) {
- argv._.slice(expected).forEach(key => {
- key = String(key);
- if (!currentContext.commands.includes(key) &&
- !unknown.includes(key)) {
- unknown.push(key);
- }
- });
- }
- }
- if (unknown.length) {
- usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.map(s => (s.trim() ? s : `"${s}"`)).join(', ')));
- }
- };
- self.unknownCommands = function unknownCommands(argv) {
- const commandKeys = yargs
- .getInternalMethods()
- .getCommandInstance()
- .getCommands();
- const unknown = [];
- const currentContext = yargs.getInternalMethods().getContext();
- if (currentContext.commands.length > 0 || commandKeys.length > 0) {
- argv._.slice(currentContext.commands.length).forEach(key => {
- if (!commandKeys.includes('' + key)) {
- unknown.push('' + key);
- }
- });
- }
- if (unknown.length > 0) {
- usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', ')));
- return true;
- }
- else {
- return false;
- }
- };
- self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) {
- if (!Object.prototype.hasOwnProperty.call(aliases, key)) {
- return false;
- }
- const newAliases = yargs.parsed.newAliases;
- return [key, ...aliases[key]].some(a => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]);
- };
- self.limitedChoices = function limitedChoices(argv) {
- const options = yargs.getOptions();
- const invalid = {};
- if (!Object.keys(options.choices).length)
- return;
- Object.keys(argv).forEach(key => {
- if (specialKeys.indexOf(key) === -1 &&
- Object.prototype.hasOwnProperty.call(options.choices, key)) {
- [].concat(argv[key]).forEach(value => {
- if (options.choices[key].indexOf(value) === -1 &&
- value !== undefined) {
- invalid[key] = (invalid[key] || []).concat(value);
- }
- });
- }
- });
- const invalidKeys = Object.keys(invalid);
- if (!invalidKeys.length)
- return;
- let msg = __('Invalid values:');
- invalidKeys.forEach(key => {
- msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`;
- });
- usage.fail(msg);
- };
- let implied = {};
- self.implies = function implies(key, value) {
- argsert('<string|object> [array|number|string]', [key, value], arguments.length);
- if (typeof key === 'object') {
- Object.keys(key).forEach(k => {
- self.implies(k, key[k]);
- });
- }
- else {
- yargs.global(key);
- if (!implied[key]) {
- implied[key] = [];
- }
- if (Array.isArray(value)) {
- value.forEach(i => self.implies(key, i));
- }
- else {
- assertNotStrictEqual(value, undefined, shim);
- implied[key].push(value);
- }
- }
- };
- self.getImplied = function getImplied() {
- return implied;
- };
- function keyExists(argv, val) {
- const num = Number(val);
- val = isNaN(num) ? val : num;
- if (typeof val === 'number') {
- val = argv._.length >= val;
- }
- else if (val.match(/^--no-.+/)) {
- val = val.match(/^--no-(.+)/)[1];
- val = !Object.prototype.hasOwnProperty.call(argv, val);
- }
- else {
- val = Object.prototype.hasOwnProperty.call(argv, val);
- }
- return val;
- }
- self.implications = function implications(argv) {
- const implyFail = [];
- Object.keys(implied).forEach(key => {
- const origKey = key;
- (implied[key] || []).forEach(value => {
- let key = origKey;
- const origValue = value;
- key = keyExists(argv, key);
- value = keyExists(argv, value);
- if (key && !value) {
- implyFail.push(` ${origKey} -> ${origValue}`);
- }
- });
- });
- if (implyFail.length) {
- let msg = `${__('Implications failed:')}\n`;
- implyFail.forEach(value => {
- msg += value;
- });
- usage.fail(msg);
- }
- };
- let conflicting = {};
- self.conflicts = function conflicts(key, value) {
- argsert('<string|object> [array|string]', [key, value], arguments.length);
- if (typeof key === 'object') {
- Object.keys(key).forEach(k => {
- self.conflicts(k, key[k]);
- });
- }
- else {
- yargs.global(key);
- if (!conflicting[key]) {
- conflicting[key] = [];
- }
- if (Array.isArray(value)) {
- value.forEach(i => self.conflicts(key, i));
- }
- else {
- conflicting[key].push(value);
- }
- }
- };
- self.getConflicting = () => conflicting;
- self.conflicting = function conflictingFn(argv) {
- Object.keys(argv).forEach(key => {
- if (conflicting[key]) {
- conflicting[key].forEach(value => {
- if (value && argv[key] !== undefined && argv[value] !== undefined) {
- usage.fail(__('Arguments %s and %s are mutually exclusive', key, value));
- }
- });
- }
- });
- if (yargs.getInternalMethods().getParserConfiguration()['strip-dashed']) {
- Object.keys(conflicting).forEach(key => {
- conflicting[key].forEach(value => {
- if (value &&
- argv[shim.Parser.camelCase(key)] !== undefined &&
- argv[shim.Parser.camelCase(value)] !== undefined) {
- usage.fail(__('Arguments %s and %s are mutually exclusive', key, value));
- }
- });
- });
- }
- };
- self.recommendCommands = function recommendCommands(cmd, potentialCommands) {
- const threshold = 3;
- potentialCommands = potentialCommands.sort((a, b) => b.length - a.length);
- let recommended = null;
- let bestDistance = Infinity;
- for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) {
- const d = distance(cmd, candidate);
- if (d <= threshold && d < bestDistance) {
- bestDistance = d;
- recommended = candidate;
- }
- }
- if (recommended)
- usage.fail(__('Did you mean %s?', recommended));
- };
- self.reset = function reset(localLookup) {
- implied = objFilter(implied, k => !localLookup[k]);
- conflicting = objFilter(conflicting, k => !localLookup[k]);
- return self;
- };
- const frozens = [];
- self.freeze = function freeze() {
- frozens.push({
- implied,
- conflicting,
- });
- };
- self.unfreeze = function unfreeze() {
- const frozen = frozens.pop();
- assertNotStrictEqual(frozen, undefined, shim);
- ({ implied, conflicting } = frozen);
- };
- return self;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/yargs-factory.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/yargs-factory.js
deleted file mode 100644
index c4b1d50..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/yargs-factory.js
+++ /dev/null
@@ -1,1512 +0,0 @@
-var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
- if (kind === "m") throw new TypeError("Private method is not writable");
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
-};
-var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
-};
-var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation;
-import { command as Command, } from './command.js';
-import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js';
-import { YError } from './yerror.js';
-import { usage as Usage } from './usage.js';
-import { argsert } from './argsert.js';
-import { completion as Completion, } from './completion.js';
-import { validation as Validation, } from './validation.js';
-import { objFilter } from './utils/obj-filter.js';
-import { applyExtends } from './utils/apply-extends.js';
-import { applyMiddleware, GlobalMiddleware, } from './middleware.js';
-import { isPromise } from './utils/is-promise.js';
-import { maybeAsyncResult } from './utils/maybe-async-result.js';
-import setBlocking from './utils/set-blocking.js';
-export function YargsFactory(_shim) {
- return (processArgs = [], cwd = _shim.process.cwd(), parentRequire) => {
- const yargs = new YargsInstance(processArgs, cwd, parentRequire, _shim);
- Object.defineProperty(yargs, 'argv', {
- get: () => {
- return yargs.parse();
- },
- enumerable: true,
- });
- yargs.help();
- yargs.version();
- return yargs;
- };
-}
-const kCopyDoubleDash = Symbol('copyDoubleDash');
-const kCreateLogger = Symbol('copyDoubleDash');
-const kDeleteFromParserHintObject = Symbol('deleteFromParserHintObject');
-const kEmitWarning = Symbol('emitWarning');
-const kFreeze = Symbol('freeze');
-const kGetDollarZero = Symbol('getDollarZero');
-const kGetParserConfiguration = Symbol('getParserConfiguration');
-const kGetUsageConfiguration = Symbol('getUsageConfiguration');
-const kGuessLocale = Symbol('guessLocale');
-const kGuessVersion = Symbol('guessVersion');
-const kParsePositionalNumbers = Symbol('parsePositionalNumbers');
-const kPkgUp = Symbol('pkgUp');
-const kPopulateParserHintArray = Symbol('populateParserHintArray');
-const kPopulateParserHintSingleValueDictionary = Symbol('populateParserHintSingleValueDictionary');
-const kPopulateParserHintArrayDictionary = Symbol('populateParserHintArrayDictionary');
-const kPopulateParserHintDictionary = Symbol('populateParserHintDictionary');
-const kSanitizeKey = Symbol('sanitizeKey');
-const kSetKey = Symbol('setKey');
-const kUnfreeze = Symbol('unfreeze');
-const kValidateAsync = Symbol('validateAsync');
-const kGetCommandInstance = Symbol('getCommandInstance');
-const kGetContext = Symbol('getContext');
-const kGetHasOutput = Symbol('getHasOutput');
-const kGetLoggerInstance = Symbol('getLoggerInstance');
-const kGetParseContext = Symbol('getParseContext');
-const kGetUsageInstance = Symbol('getUsageInstance');
-const kGetValidationInstance = Symbol('getValidationInstance');
-const kHasParseCallback = Symbol('hasParseCallback');
-const kIsGlobalContext = Symbol('isGlobalContext');
-const kPostProcess = Symbol('postProcess');
-const kRebase = Symbol('rebase');
-const kReset = Symbol('reset');
-const kRunYargsParserAndExecuteCommands = Symbol('runYargsParserAndExecuteCommands');
-const kRunValidation = Symbol('runValidation');
-const kSetHasOutput = Symbol('setHasOutput');
-const kTrackManuallySetKeys = Symbol('kTrackManuallySetKeys');
-export class YargsInstance {
- constructor(processArgs = [], cwd, parentRequire, shim) {
- this.customScriptName = false;
- this.parsed = false;
- _YargsInstance_command.set(this, void 0);
- _YargsInstance_cwd.set(this, void 0);
- _YargsInstance_context.set(this, { commands: [], fullCommands: [] });
- _YargsInstance_completion.set(this, null);
- _YargsInstance_completionCommand.set(this, null);
- _YargsInstance_defaultShowHiddenOpt.set(this, 'show-hidden');
- _YargsInstance_exitError.set(this, null);
- _YargsInstance_detectLocale.set(this, true);
- _YargsInstance_emittedWarnings.set(this, {});
- _YargsInstance_exitProcess.set(this, true);
- _YargsInstance_frozens.set(this, []);
- _YargsInstance_globalMiddleware.set(this, void 0);
- _YargsInstance_groups.set(this, {});
- _YargsInstance_hasOutput.set(this, false);
- _YargsInstance_helpOpt.set(this, null);
- _YargsInstance_isGlobalContext.set(this, true);
- _YargsInstance_logger.set(this, void 0);
- _YargsInstance_output.set(this, '');
- _YargsInstance_options.set(this, void 0);
- _YargsInstance_parentRequire.set(this, void 0);
- _YargsInstance_parserConfig.set(this, {});
- _YargsInstance_parseFn.set(this, null);
- _YargsInstance_parseContext.set(this, null);
- _YargsInstance_pkgs.set(this, {});
- _YargsInstance_preservedGroups.set(this, {});
- _YargsInstance_processArgs.set(this, void 0);
- _YargsInstance_recommendCommands.set(this, false);
- _YargsInstance_shim.set(this, void 0);
- _YargsInstance_strict.set(this, false);
- _YargsInstance_strictCommands.set(this, false);
- _YargsInstance_strictOptions.set(this, false);
- _YargsInstance_usage.set(this, void 0);
- _YargsInstance_usageConfig.set(this, {});
- _YargsInstance_versionOpt.set(this, null);
- _YargsInstance_validation.set(this, void 0);
- __classPrivateFieldSet(this, _YargsInstance_shim, shim, "f");
- __classPrivateFieldSet(this, _YargsInstance_processArgs, processArgs, "f");
- __classPrivateFieldSet(this, _YargsInstance_cwd, cwd, "f");
- __classPrivateFieldSet(this, _YargsInstance_parentRequire, parentRequire, "f");
- __classPrivateFieldSet(this, _YargsInstance_globalMiddleware, new GlobalMiddleware(this), "f");
- this.$0 = this[kGetDollarZero]();
- this[kReset]();
- __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f"), "f");
- __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), "f");
- __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f"), "f");
- __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f"), "f");
- __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f");
- __classPrivateFieldSet(this, _YargsInstance_logger, this[kCreateLogger](), "f");
- }
- addHelpOpt(opt, msg) {
- const defaultHelpOpt = 'help';
- argsert('[string|boolean] [string]', [opt, msg], arguments.length);
- if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) {
- this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f"));
- __classPrivateFieldSet(this, _YargsInstance_helpOpt, null, "f");
- }
- if (opt === false && msg === undefined)
- return this;
- __classPrivateFieldSet(this, _YargsInstance_helpOpt, typeof opt === 'string' ? opt : defaultHelpOpt, "f");
- this.boolean(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f"));
- this.describe(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f"), msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show help'));
- return this;
- }
- help(opt, msg) {
- return this.addHelpOpt(opt, msg);
- }
- addShowHiddenOpt(opt, msg) {
- argsert('[string|boolean] [string]', [opt, msg], arguments.length);
- if (opt === false && msg === undefined)
- return this;
- const showHiddenOpt = typeof opt === 'string' ? opt : __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f");
- this.boolean(showHiddenOpt);
- this.describe(showHiddenOpt, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show hidden options'));
- __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = showHiddenOpt;
- return this;
- }
- showHidden(opt, msg) {
- return this.addShowHiddenOpt(opt, msg);
- }
- alias(key, value) {
- argsert('<object|string|array> [string|array]', [key, value], arguments.length);
- this[kPopulateParserHintArrayDictionary](this.alias.bind(this), 'alias', key, value);
- return this;
- }
- array(keys) {
- argsert('<array|string>', [keys], arguments.length);
- this[kPopulateParserHintArray]('array', keys);
- this[kTrackManuallySetKeys](keys);
- return this;
- }
- boolean(keys) {
- argsert('<array|string>', [keys], arguments.length);
- this[kPopulateParserHintArray]('boolean', keys);
- this[kTrackManuallySetKeys](keys);
- return this;
- }
- check(f, global) {
- argsert('<function> [boolean]', [f, global], arguments.length);
- this.middleware((argv, _yargs) => {
- return maybeAsyncResult(() => {
- return f(argv, _yargs.getOptions());
- }, (result) => {
- if (!result) {
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(__classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__('Argument check failed: %s', f.toString()));
- }
- else if (typeof result === 'string' || result instanceof Error) {
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(result.toString(), result);
- }
- return argv;
- }, (err) => {
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message ? err.message : err.toString(), err);
- return argv;
- });
- }, false, global);
- return this;
- }
- choices(key, value) {
- argsert('<object|string|array> [string|array]', [key, value], arguments.length);
- this[kPopulateParserHintArrayDictionary](this.choices.bind(this), 'choices', key, value);
- return this;
- }
- coerce(keys, value) {
- argsert('<object|string|array> [function]', [keys, value], arguments.length);
- if (Array.isArray(keys)) {
- if (!value) {
- throw new YError('coerce callback must be provided');
- }
- for (const key of keys) {
- this.coerce(key, value);
- }
- return this;
- }
- else if (typeof keys === 'object') {
- for (const key of Object.keys(keys)) {
- this.coerce(key, keys[key]);
- }
- return this;
- }
- if (!value) {
- throw new YError('coerce callback must be provided');
- }
- __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true;
- __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addCoerceMiddleware((argv, yargs) => {
- let aliases;
- const shouldCoerce = Object.prototype.hasOwnProperty.call(argv, keys);
- if (!shouldCoerce) {
- return argv;
- }
- return maybeAsyncResult(() => {
- aliases = yargs.getAliases();
- return value(argv[keys]);
- }, (result) => {
- argv[keys] = result;
- const stripAliased = yargs
- .getInternalMethods()
- .getParserConfiguration()['strip-aliased'];
- if (aliases[keys] && stripAliased !== true) {
- for (const alias of aliases[keys]) {
- argv[alias] = result;
- }
- }
- return argv;
- }, (err) => {
- throw new YError(err.message);
- });
- }, keys);
- return this;
- }
- conflicts(key1, key2) {
- argsert('<string|object> [string|array]', [key1, key2], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicts(key1, key2);
- return this;
- }
- config(key = 'config', msg, parseFn) {
- argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length);
- if (typeof key === 'object' && !Array.isArray(key)) {
- key = applyExtends(key, __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(key);
- return this;
- }
- if (typeof msg === 'function') {
- parseFn = msg;
- msg = undefined;
- }
- this.describe(key, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Path to JSON config file'));
- (Array.isArray(key) ? key : [key]).forEach(k => {
- __classPrivateFieldGet(this, _YargsInstance_options, "f").config[k] = parseFn || true;
- });
- return this;
- }
- completion(cmd, desc, fn) {
- argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length);
- if (typeof desc === 'function') {
- fn = desc;
- desc = undefined;
- }
- __classPrivateFieldSet(this, _YargsInstance_completionCommand, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion', "f");
- if (!desc && desc !== false) {
- desc = 'generate completion script';
- }
- this.command(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), desc);
- if (fn)
- __classPrivateFieldGet(this, _YargsInstance_completion, "f").registerFunction(fn);
- return this;
- }
- command(cmd, description, builder, handler, middlewares, deprecated) {
- argsert('<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_command, "f").addHandler(cmd, description, builder, handler, middlewares, deprecated);
- return this;
- }
- commands(cmd, description, builder, handler, middlewares, deprecated) {
- return this.command(cmd, description, builder, handler, middlewares, deprecated);
- }
- commandDir(dir, opts) {
- argsert('<string> [object]', [dir, opts], arguments.length);
- const req = __classPrivateFieldGet(this, _YargsInstance_parentRequire, "f") || __classPrivateFieldGet(this, _YargsInstance_shim, "f").require;
- __classPrivateFieldGet(this, _YargsInstance_command, "f").addDirectory(dir, req, __classPrivateFieldGet(this, _YargsInstance_shim, "f").getCallerFile(), opts);
- return this;
- }
- count(keys) {
- argsert('<array|string>', [keys], arguments.length);
- this[kPopulateParserHintArray]('count', keys);
- this[kTrackManuallySetKeys](keys);
- return this;
- }
- default(key, value, defaultDescription) {
- argsert('<object|string|array> [*] [string]', [key, value, defaultDescription], arguments.length);
- if (defaultDescription) {
- assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = defaultDescription;
- }
- if (typeof value === 'function') {
- assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key])
- __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] =
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").functionDescription(value);
- value = value.call();
- }
- this[kPopulateParserHintSingleValueDictionary](this.default.bind(this), 'default', key, value);
- return this;
- }
- defaults(key, value, defaultDescription) {
- return this.default(key, value, defaultDescription);
- }
- demandCommand(min = 1, max, minMsg, maxMsg) {
- argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length);
- if (typeof max !== 'number') {
- minMsg = max;
- max = Infinity;
- }
- this.global('_', false);
- __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands._ = {
- min,
- max,
- minMsg,
- maxMsg,
- };
- return this;
- }
- demand(keys, max, msg) {
- if (Array.isArray(max)) {
- max.forEach(key => {
- assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- this.demandOption(key, msg);
- });
- max = Infinity;
- }
- else if (typeof max !== 'number') {
- msg = max;
- max = Infinity;
- }
- if (typeof keys === 'number') {
- assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- this.demandCommand(keys, max, msg, msg);
- }
- else if (Array.isArray(keys)) {
- keys.forEach(key => {
- assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- this.demandOption(key, msg);
- });
- }
- else {
- if (typeof msg === 'string') {
- this.demandOption(keys, msg);
- }
- else if (msg === true || typeof msg === 'undefined') {
- this.demandOption(keys);
- }
- }
- return this;
- }
- demandOption(keys, msg) {
- argsert('<object|string|array> [string]', [keys, msg], arguments.length);
- this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this), 'demandedOptions', keys, msg);
- return this;
- }
- deprecateOption(option, message) {
- argsert('<string> [string|boolean]', [option, message], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions[option] = message;
- return this;
- }
- describe(keys, description) {
- argsert('<object|string|array> [string]', [keys, description], arguments.length);
- this[kSetKey](keys, true);
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description);
- return this;
- }
- detectLocale(detect) {
- argsert('<boolean>', [detect], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_detectLocale, detect, "f");
- return this;
- }
- env(prefix) {
- argsert('[string|boolean]', [prefix], arguments.length);
- if (prefix === false)
- delete __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix;
- else
- __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix = prefix || '';
- return this;
- }
- epilogue(msg) {
- argsert('<string>', [msg], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").epilog(msg);
- return this;
- }
- epilog(msg) {
- return this.epilogue(msg);
- }
- example(cmd, description) {
- argsert('<string|array> [string]', [cmd, description], arguments.length);
- if (Array.isArray(cmd)) {
- cmd.forEach(exampleParams => this.example(...exampleParams));
- }
- else {
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description);
- }
- return this;
- }
- exit(code, err) {
- __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
- __classPrivateFieldSet(this, _YargsInstance_exitError, err, "f");
- if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"))
- __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.exit(code);
- }
- exitProcess(enabled = true) {
- argsert('[boolean]', [enabled], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_exitProcess, enabled, "f");
- return this;
- }
- fail(f) {
- argsert('<function|boolean>', [f], arguments.length);
- if (typeof f === 'boolean' && f !== false) {
- throw new YError("Invalid first argument. Expected function or boolean 'false'");
- }
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").failFn(f);
- return this;
- }
- getAliases() {
- return this.parsed ? this.parsed.aliases : {};
- }
- async getCompletion(args, done) {
- argsert('<array> [function]', [args, done], arguments.length);
- if (!done) {
- return new Promise((resolve, reject) => {
- __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => {
- if (err)
- reject(err);
- else
- resolve(completions);
- });
- });
- }
- else {
- return __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, done);
- }
- }
- getDemandedOptions() {
- argsert([], 0);
- return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedOptions;
- }
- getDemandedCommands() {
- argsert([], 0);
- return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands;
- }
- getDeprecatedOptions() {
- argsert([], 0);
- return __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions;
- }
- getDetectLocale() {
- return __classPrivateFieldGet(this, _YargsInstance_detectLocale, "f");
- }
- getExitProcess() {
- return __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f");
- }
- getGroups() {
- return Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_groups, "f"), __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f"));
- }
- getHelp() {
- __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
- if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) {
- if (!this.parsed) {
- const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true);
- if (isPromise(parse)) {
- return parse.then(() => {
- return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help();
- });
- }
- }
- const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this);
- if (isPromise(builderResponse)) {
- return builderResponse.then(() => {
- return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help();
- });
- }
- }
- return Promise.resolve(__classPrivateFieldGet(this, _YargsInstance_usage, "f").help());
- }
- getOptions() {
- return __classPrivateFieldGet(this, _YargsInstance_options, "f");
- }
- getStrict() {
- return __classPrivateFieldGet(this, _YargsInstance_strict, "f");
- }
- getStrictCommands() {
- return __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f");
- }
- getStrictOptions() {
- return __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f");
- }
- global(globals, global) {
- argsert('<string|array> [boolean]', [globals, global], arguments.length);
- globals = [].concat(globals);
- if (global !== false) {
- __classPrivateFieldGet(this, _YargsInstance_options, "f").local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local.filter(l => globals.indexOf(l) === -1);
- }
- else {
- globals.forEach(g => {
- if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").local.includes(g))
- __classPrivateFieldGet(this, _YargsInstance_options, "f").local.push(g);
- });
- }
- return this;
- }
- group(opts, groupName) {
- argsert('<string|array> <string>', [opts, groupName], arguments.length);
- const existing = __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName] || __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName];
- if (__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]) {
- delete __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName];
- }
- const seen = {};
- __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName] = (existing || []).concat(opts).filter(key => {
- if (seen[key])
- return false;
- return (seen[key] = true);
- });
- return this;
- }
- hide(key) {
- argsert('<string>', [key], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_options, "f").hiddenOptions.push(key);
- return this;
- }
- implies(key, value) {
- argsert('<string|object> [number|string|array]', [key, value], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").implies(key, value);
- return this;
- }
- locale(locale) {
- argsert('[string]', [locale], arguments.length);
- if (locale === undefined) {
- this[kGuessLocale]();
- return __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.getLocale();
- }
- __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f");
- __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.setLocale(locale);
- return this;
- }
- middleware(callback, applyBeforeValidation, global) {
- return __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global);
- }
- nargs(key, value) {
- argsert('<string|object|array> [number]', [key, value], arguments.length);
- this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this), 'narg', key, value);
- return this;
- }
- normalize(keys) {
- argsert('<array|string>', [keys], arguments.length);
- this[kPopulateParserHintArray]('normalize', keys);
- return this;
- }
- number(keys) {
- argsert('<array|string>', [keys], arguments.length);
- this[kPopulateParserHintArray]('number', keys);
- this[kTrackManuallySetKeys](keys);
- return this;
- }
- option(key, opt) {
- argsert('<string|object> [object]', [key, opt], arguments.length);
- if (typeof key === 'object') {
- Object.keys(key).forEach(k => {
- this.options(k, key[k]);
- });
- }
- else {
- if (typeof opt !== 'object') {
- opt = {};
- }
- this[kTrackManuallySetKeys](key);
- if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && (key === 'version' || (opt === null || opt === void 0 ? void 0 : opt.alias) === 'version')) {
- this[kEmitWarning]([
- '"version" is a reserved word.',
- 'Please do one of the following:',
- '- Disable version with `yargs.version(false)` if using "version" as an option',
- '- Use the built-in `yargs.version` method instead (if applicable)',
- '- Use a different option key',
- 'https://yargs.js.org/docs/#api-reference-version',
- ].join('\n'), undefined, 'versionWarning');
- }
- __classPrivateFieldGet(this, _YargsInstance_options, "f").key[key] = true;
- if (opt.alias)
- this.alias(key, opt.alias);
- const deprecate = opt.deprecate || opt.deprecated;
- if (deprecate) {
- this.deprecateOption(key, deprecate);
- }
- const demand = opt.demand || opt.required || opt.require;
- if (demand) {
- this.demand(key, demand);
- }
- if (opt.demandOption) {
- this.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined);
- }
- if (opt.conflicts) {
- this.conflicts(key, opt.conflicts);
- }
- if ('default' in opt) {
- this.default(key, opt.default);
- }
- if (opt.implies !== undefined) {
- this.implies(key, opt.implies);
- }
- if (opt.nargs !== undefined) {
- this.nargs(key, opt.nargs);
- }
- if (opt.config) {
- this.config(key, opt.configParser);
- }
- if (opt.normalize) {
- this.normalize(key);
- }
- if (opt.choices) {
- this.choices(key, opt.choices);
- }
- if (opt.coerce) {
- this.coerce(key, opt.coerce);
- }
- if (opt.group) {
- this.group(key, opt.group);
- }
- if (opt.boolean || opt.type === 'boolean') {
- this.boolean(key);
- if (opt.alias)
- this.boolean(opt.alias);
- }
- if (opt.array || opt.type === 'array') {
- this.array(key);
- if (opt.alias)
- this.array(opt.alias);
- }
- if (opt.number || opt.type === 'number') {
- this.number(key);
- if (opt.alias)
- this.number(opt.alias);
- }
- if (opt.string || opt.type === 'string') {
- this.string(key);
- if (opt.alias)
- this.string(opt.alias);
- }
- if (opt.count || opt.type === 'count') {
- this.count(key);
- }
- if (typeof opt.global === 'boolean') {
- this.global(key, opt.global);
- }
- if (opt.defaultDescription) {
- __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = opt.defaultDescription;
- }
- if (opt.skipValidation) {
- this.skipValidation(key);
- }
- const desc = opt.describe || opt.description || opt.desc;
- const descriptions = __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions();
- if (!Object.prototype.hasOwnProperty.call(descriptions, key) ||
- typeof desc === 'string') {
- this.describe(key, desc);
- }
- if (opt.hidden) {
- this.hide(key);
- }
- if (opt.requiresArg) {
- this.requiresArg(key);
- }
- }
- return this;
- }
- options(key, opt) {
- return this.option(key, opt);
- }
- parse(args, shortCircuit, _parseFn) {
- argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length);
- this[kFreeze]();
- if (typeof args === 'undefined') {
- args = __classPrivateFieldGet(this, _YargsInstance_processArgs, "f");
- }
- if (typeof shortCircuit === 'object') {
- __classPrivateFieldSet(this, _YargsInstance_parseContext, shortCircuit, "f");
- shortCircuit = _parseFn;
- }
- if (typeof shortCircuit === 'function') {
- __classPrivateFieldSet(this, _YargsInstance_parseFn, shortCircuit, "f");
- shortCircuit = false;
- }
- if (!shortCircuit)
- __classPrivateFieldSet(this, _YargsInstance_processArgs, args, "f");
- if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f"))
- __classPrivateFieldSet(this, _YargsInstance_exitProcess, false, "f");
- const parsed = this[kRunYargsParserAndExecuteCommands](args, !!shortCircuit);
- const tmpParsed = this.parsed;
- __classPrivateFieldGet(this, _YargsInstance_completion, "f").setParsed(this.parsed);
- if (isPromise(parsed)) {
- return parsed
- .then(argv => {
- if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f"))
- __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), argv, __classPrivateFieldGet(this, _YargsInstance_output, "f"));
- return argv;
- })
- .catch(err => {
- if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) {
- __classPrivateFieldGet(this, _YargsInstance_parseFn, "f")(err, this.parsed.argv, __classPrivateFieldGet(this, _YargsInstance_output, "f"));
- }
- throw err;
- })
- .finally(() => {
- this[kUnfreeze]();
- this.parsed = tmpParsed;
- });
- }
- else {
- if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f"))
- __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), parsed, __classPrivateFieldGet(this, _YargsInstance_output, "f"));
- this[kUnfreeze]();
- this.parsed = tmpParsed;
- }
- return parsed;
- }
- parseAsync(args, shortCircuit, _parseFn) {
- const maybePromise = this.parse(args, shortCircuit, _parseFn);
- return !isPromise(maybePromise)
- ? Promise.resolve(maybePromise)
- : maybePromise;
- }
- parseSync(args, shortCircuit, _parseFn) {
- const maybePromise = this.parse(args, shortCircuit, _parseFn);
- if (isPromise(maybePromise)) {
- throw new YError('.parseSync() must not be used with asynchronous builders, handlers, or middleware');
- }
- return maybePromise;
- }
- parserConfiguration(config) {
- argsert('<object>', [config], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config, "f");
- return this;
- }
- pkgConf(key, rootPath) {
- argsert('<string> [string]', [key, rootPath], arguments.length);
- let conf = null;
- const obj = this[kPkgUp](rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f"));
- if (obj[key] && typeof obj[key] === 'object') {
- conf = applyExtends(obj[key], rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(conf);
- }
- return this;
- }
- positional(key, opts) {
- argsert('<string> <object>', [key, opts], arguments.length);
- const supportedOpts = [
- 'default',
- 'defaultDescription',
- 'implies',
- 'normalize',
- 'choices',
- 'conflicts',
- 'coerce',
- 'type',
- 'describe',
- 'desc',
- 'description',
- 'alias',
- ];
- opts = objFilter(opts, (k, v) => {
- if (k === 'type' && !['string', 'number', 'boolean'].includes(v))
- return false;
- return supportedOpts.includes(k);
- });
- const fullCommand = __classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands[__classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands.length - 1];
- const parseOptions = fullCommand
- ? __classPrivateFieldGet(this, _YargsInstance_command, "f").cmdToParseOptions(fullCommand)
- : {
- array: [],
- alias: {},
- default: {},
- demand: {},
- };
- objectKeys(parseOptions).forEach(pk => {
- const parseOption = parseOptions[pk];
- if (Array.isArray(parseOption)) {
- if (parseOption.indexOf(key) !== -1)
- opts[pk] = true;
- }
- else {
- if (parseOption[key] && !(pk in opts))
- opts[pk] = parseOption[key];
- }
- });
- this.group(key, __classPrivateFieldGet(this, _YargsInstance_usage, "f").getPositionalGroupName());
- return this.option(key, opts);
- }
- recommendCommands(recommend = true) {
- argsert('[boolean]', [recommend], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_recommendCommands, recommend, "f");
- return this;
- }
- required(keys, max, msg) {
- return this.demand(keys, max, msg);
- }
- require(keys, max, msg) {
- return this.demand(keys, max, msg);
- }
- requiresArg(keys) {
- argsert('<array|string|object> [number]', [keys], arguments.length);
- if (typeof keys === 'string' && __classPrivateFieldGet(this, _YargsInstance_options, "f").narg[keys]) {
- return this;
- }
- else {
- this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this), 'narg', keys, NaN);
- }
- return this;
- }
- showCompletionScript($0, cmd) {
- argsert('[string] [string]', [$0, cmd], arguments.length);
- $0 = $0 || this.$0;
- __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(__classPrivateFieldGet(this, _YargsInstance_completion, "f").generateCompletionScript($0, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion'));
- return this;
- }
- showHelp(level) {
- argsert('[string|function]', [level], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
- if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) {
- if (!this.parsed) {
- const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true);
- if (isPromise(parse)) {
- parse.then(() => {
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level);
- });
- return this;
- }
- }
- const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this);
- if (isPromise(builderResponse)) {
- builderResponse.then(() => {
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level);
- });
- return this;
- }
- }
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level);
- return this;
- }
- scriptName(scriptName) {
- this.customScriptName = true;
- this.$0 = scriptName;
- return this;
- }
- showHelpOnFail(enabled, message) {
- argsert('[boolean|string] [string]', [enabled, message], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelpOnFail(enabled, message);
- return this;
- }
- showVersion(level) {
- argsert('[string|function]', [level], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion(level);
- return this;
- }
- skipValidation(keys) {
- argsert('<array|string>', [keys], arguments.length);
- this[kPopulateParserHintArray]('skipValidation', keys);
- return this;
- }
- strict(enabled) {
- argsert('[boolean]', [enabled], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_strict, enabled !== false, "f");
- return this;
- }
- strictCommands(enabled) {
- argsert('[boolean]', [enabled], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_strictCommands, enabled !== false, "f");
- return this;
- }
- strictOptions(enabled) {
- argsert('[boolean]', [enabled], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_strictOptions, enabled !== false, "f");
- return this;
- }
- string(keys) {
- argsert('<array|string>', [keys], arguments.length);
- this[kPopulateParserHintArray]('string', keys);
- this[kTrackManuallySetKeys](keys);
- return this;
- }
- terminalWidth() {
- argsert([], 0);
- return __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.stdColumns;
- }
- updateLocale(obj) {
- return this.updateStrings(obj);
- }
- updateStrings(obj) {
- argsert('<object>', [obj], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f");
- __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.updateLocale(obj);
- return this;
- }
- usage(msg, description, builder, handler) {
- argsert('<string|null|undefined> [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length);
- if (description !== undefined) {
- assertNotStrictEqual(msg, null, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- if ((msg || '').match(/^\$0( |$)/)) {
- return this.command(msg, description, builder, handler);
- }
- else {
- throw new YError('.usage() description must start with $0 if being used as alias for .command()');
- }
- }
- else {
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").usage(msg);
- return this;
- }
- }
- usageConfiguration(config) {
- argsert('<object>', [config], arguments.length);
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config, "f");
- return this;
- }
- version(opt, msg, ver) {
- const defaultVersionOpt = 'version';
- argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length);
- if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")) {
- this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f"));
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(undefined);
- __classPrivateFieldSet(this, _YargsInstance_versionOpt, null, "f");
- }
- if (arguments.length === 0) {
- ver = this[kGuessVersion]();
- opt = defaultVersionOpt;
- }
- else if (arguments.length === 1) {
- if (opt === false) {
- return this;
- }
- ver = opt;
- opt = defaultVersionOpt;
- }
- else if (arguments.length === 2) {
- ver = msg;
- msg = undefined;
- }
- __classPrivateFieldSet(this, _YargsInstance_versionOpt, typeof opt === 'string' ? opt : defaultVersionOpt, "f");
- msg = msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show version number');
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(ver || undefined);
- this.boolean(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f"));
- this.describe(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f"), msg);
- return this;
- }
- wrap(cols) {
- argsert('<number|null|undefined>', [cols], arguments.length);
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").wrap(cols);
- return this;
- }
- [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_usageConfig = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) {
- if (!argv._ || !argv['--'])
- return argv;
- argv._.push.apply(argv._, argv['--']);
- try {
- delete argv['--'];
- }
- catch (_err) { }
- return argv;
- }
- [kCreateLogger]() {
- return {
- log: (...args) => {
- if (!this[kHasParseCallback]())
- console.log(...args);
- __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
- if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length)
- __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f");
- __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f");
- },
- error: (...args) => {
- if (!this[kHasParseCallback]())
- console.error(...args);
- __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
- if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length)
- __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f");
- __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f");
- },
- };
- }
- [kDeleteFromParserHintObject](optionKey) {
- objectKeys(__classPrivateFieldGet(this, _YargsInstance_options, "f")).forEach((hintKey) => {
- if (((key) => key === 'configObjects')(hintKey))
- return;
- const hint = __classPrivateFieldGet(this, _YargsInstance_options, "f")[hintKey];
- if (Array.isArray(hint)) {
- if (hint.includes(optionKey))
- hint.splice(hint.indexOf(optionKey), 1);
- }
- else if (typeof hint === 'object') {
- delete hint[optionKey];
- }
- });
- delete __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions()[optionKey];
- }
- [kEmitWarning](warning, type, deduplicationId) {
- if (!__classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId]) {
- __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.emitWarning(warning, type);
- __classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId] = true;
- }
- }
- [kFreeze]() {
- __classPrivateFieldGet(this, _YargsInstance_frozens, "f").push({
- options: __classPrivateFieldGet(this, _YargsInstance_options, "f"),
- configObjects: __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects.slice(0),
- exitProcess: __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"),
- groups: __classPrivateFieldGet(this, _YargsInstance_groups, "f"),
- strict: __classPrivateFieldGet(this, _YargsInstance_strict, "f"),
- strictCommands: __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"),
- strictOptions: __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"),
- completionCommand: __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"),
- output: __classPrivateFieldGet(this, _YargsInstance_output, "f"),
- exitError: __classPrivateFieldGet(this, _YargsInstance_exitError, "f"),
- hasOutput: __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"),
- parsed: this.parsed,
- parseFn: __classPrivateFieldGet(this, _YargsInstance_parseFn, "f"),
- parseContext: __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"),
- });
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").freeze();
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").freeze();
- __classPrivateFieldGet(this, _YargsInstance_command, "f").freeze();
- __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").freeze();
- }
- [kGetDollarZero]() {
- let $0 = '';
- let default$0;
- if (/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) {
- default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(1, 2);
- }
- else {
- default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(0, 1);
- }
- $0 = default$0
- .map(x => {
- const b = this[kRebase](__classPrivateFieldGet(this, _YargsInstance_cwd, "f"), x);
- return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x;
- })
- .join(' ')
- .trim();
- if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_') &&
- __classPrivateFieldGet(this, _YargsInstance_shim, "f").getProcessArgvBin() === __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_')) {
- $0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f")
- .getEnv('_')
- .replace(`${__classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.execPath())}/`, '');
- }
- return $0;
- }
- [kGetParserConfiguration]() {
- return __classPrivateFieldGet(this, _YargsInstance_parserConfig, "f");
- }
- [kGetUsageConfiguration]() {
- return __classPrivateFieldGet(this, _YargsInstance_usageConfig, "f");
- }
- [kGuessLocale]() {
- if (!__classPrivateFieldGet(this, _YargsInstance_detectLocale, "f"))
- return;
- const locale = __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_ALL') ||
- __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_MESSAGES') ||
- __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANG') ||
- __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANGUAGE') ||
- 'en_US';
- this.locale(locale.replace(/[.:].*/, ''));
- }
- [kGuessVersion]() {
- const obj = this[kPkgUp]();
- return obj.version || 'unknown';
- }
- [kParsePositionalNumbers](argv) {
- const args = argv['--'] ? argv['--'] : argv._;
- for (let i = 0, arg; (arg = args[i]) !== undefined; i++) {
- if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.looksLikeNumber(arg) &&
- Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) {
- args[i] = Number(arg);
- }
- }
- return argv;
- }
- [kPkgUp](rootPath) {
- const npath = rootPath || '*';
- if (__classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath])
- return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath];
- let obj = {};
- try {
- let startDir = rootPath || __classPrivateFieldGet(this, _YargsInstance_shim, "f").mainFilename;
- if (!rootPath && __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.extname(startDir)) {
- startDir = __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(startDir);
- }
- const pkgJsonPath = __classPrivateFieldGet(this, _YargsInstance_shim, "f").findUp(startDir, (dir, names) => {
- if (names.includes('package.json')) {
- return 'package.json';
- }
- else {
- return undefined;
- }
- });
- assertNotStrictEqual(pkgJsonPath, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- obj = JSON.parse(__classPrivateFieldGet(this, _YargsInstance_shim, "f").readFileSync(pkgJsonPath, 'utf8'));
- }
- catch (_noop) { }
- __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath] = obj || {};
- return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath];
- }
- [kPopulateParserHintArray](type, keys) {
- keys = [].concat(keys);
- keys.forEach(key => {
- key = this[kSanitizeKey](key);
- __classPrivateFieldGet(this, _YargsInstance_options, "f")[type].push(key);
- });
- }
- [kPopulateParserHintSingleValueDictionary](builder, type, key, value) {
- this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => {
- __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = value;
- });
- }
- [kPopulateParserHintArrayDictionary](builder, type, key, value) {
- this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => {
- __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] || []).concat(value);
- });
- }
- [kPopulateParserHintDictionary](builder, type, key, value, singleKeyHandler) {
- if (Array.isArray(key)) {
- key.forEach(k => {
- builder(k, value);
- });
- }
- else if (((key) => typeof key === 'object')(key)) {
- for (const k of objectKeys(key)) {
- builder(k, key[k]);
- }
- }
- else {
- singleKeyHandler(type, this[kSanitizeKey](key), value);
- }
- }
- [kSanitizeKey](key) {
- if (key === '__proto__')
- return '___proto___';
- return key;
- }
- [kSetKey](key, set) {
- this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this), 'key', key, set);
- return this;
- }
- [kUnfreeze]() {
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
- const frozen = __classPrivateFieldGet(this, _YargsInstance_frozens, "f").pop();
- assertNotStrictEqual(frozen, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
- let configObjects;
- (_a = this, _b = this, _c = this, _d = this, _e = this, _f = this, _g = this, _h = this, _j = this, _k = this, _l = this, _m = this, {
- options: ({ set value(_o) { __classPrivateFieldSet(_a, _YargsInstance_options, _o, "f"); } }).value,
- configObjects,
- exitProcess: ({ set value(_o) { __classPrivateFieldSet(_b, _YargsInstance_exitProcess, _o, "f"); } }).value,
- groups: ({ set value(_o) { __classPrivateFieldSet(_c, _YargsInstance_groups, _o, "f"); } }).value,
- output: ({ set value(_o) { __classPrivateFieldSet(_d, _YargsInstance_output, _o, "f"); } }).value,
- exitError: ({ set value(_o) { __classPrivateFieldSet(_e, _YargsInstance_exitError, _o, "f"); } }).value,
- hasOutput: ({ set value(_o) { __classPrivateFieldSet(_f, _YargsInstance_hasOutput, _o, "f"); } }).value,
- parsed: this.parsed,
- strict: ({ set value(_o) { __classPrivateFieldSet(_g, _YargsInstance_strict, _o, "f"); } }).value,
- strictCommands: ({ set value(_o) { __classPrivateFieldSet(_h, _YargsInstance_strictCommands, _o, "f"); } }).value,
- strictOptions: ({ set value(_o) { __classPrivateFieldSet(_j, _YargsInstance_strictOptions, _o, "f"); } }).value,
- completionCommand: ({ set value(_o) { __classPrivateFieldSet(_k, _YargsInstance_completionCommand, _o, "f"); } }).value,
- parseFn: ({ set value(_o) { __classPrivateFieldSet(_l, _YargsInstance_parseFn, _o, "f"); } }).value,
- parseContext: ({ set value(_o) { __classPrivateFieldSet(_m, _YargsInstance_parseContext, _o, "f"); } }).value,
- } = frozen);
- __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = configObjects;
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").unfreeze();
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").unfreeze();
- __classPrivateFieldGet(this, _YargsInstance_command, "f").unfreeze();
- __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").unfreeze();
- }
- [kValidateAsync](validation, argv) {
- return maybeAsyncResult(argv, result => {
- validation(result);
- return result;
- });
- }
- getInternalMethods() {
- return {
- getCommandInstance: this[kGetCommandInstance].bind(this),
- getContext: this[kGetContext].bind(this),
- getHasOutput: this[kGetHasOutput].bind(this),
- getLoggerInstance: this[kGetLoggerInstance].bind(this),
- getParseContext: this[kGetParseContext].bind(this),
- getParserConfiguration: this[kGetParserConfiguration].bind(this),
- getUsageConfiguration: this[kGetUsageConfiguration].bind(this),
- getUsageInstance: this[kGetUsageInstance].bind(this),
- getValidationInstance: this[kGetValidationInstance].bind(this),
- hasParseCallback: this[kHasParseCallback].bind(this),
- isGlobalContext: this[kIsGlobalContext].bind(this),
- postProcess: this[kPostProcess].bind(this),
- reset: this[kReset].bind(this),
- runValidation: this[kRunValidation].bind(this),
- runYargsParserAndExecuteCommands: this[kRunYargsParserAndExecuteCommands].bind(this),
- setHasOutput: this[kSetHasOutput].bind(this),
- };
- }
- [kGetCommandInstance]() {
- return __classPrivateFieldGet(this, _YargsInstance_command, "f");
- }
- [kGetContext]() {
- return __classPrivateFieldGet(this, _YargsInstance_context, "f");
- }
- [kGetHasOutput]() {
- return __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f");
- }
- [kGetLoggerInstance]() {
- return __classPrivateFieldGet(this, _YargsInstance_logger, "f");
- }
- [kGetParseContext]() {
- return __classPrivateFieldGet(this, _YargsInstance_parseContext, "f") || {};
- }
- [kGetUsageInstance]() {
- return __classPrivateFieldGet(this, _YargsInstance_usage, "f");
- }
- [kGetValidationInstance]() {
- return __classPrivateFieldGet(this, _YargsInstance_validation, "f");
- }
- [kHasParseCallback]() {
- return !!__classPrivateFieldGet(this, _YargsInstance_parseFn, "f");
- }
- [kIsGlobalContext]() {
- return __classPrivateFieldGet(this, _YargsInstance_isGlobalContext, "f");
- }
- [kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) {
- if (calledFromCommand)
- return argv;
- if (isPromise(argv))
- return argv;
- if (!populateDoubleDash) {
- argv = this[kCopyDoubleDash](argv);
- }
- const parsePositionalNumbers = this[kGetParserConfiguration]()['parse-positional-numbers'] ||
- this[kGetParserConfiguration]()['parse-positional-numbers'] === undefined;
- if (parsePositionalNumbers) {
- argv = this[kParsePositionalNumbers](argv);
- }
- if (runGlobalMiddleware) {
- argv = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false);
- }
- return argv;
- }
- [kReset](aliases = {}) {
- __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f") || {}, "f");
- const tmpOptions = {};
- tmpOptions.local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local || [];
- tmpOptions.configObjects = __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || [];
- const localLookup = {};
- tmpOptions.local.forEach(l => {
- localLookup[l] = true;
- (aliases[l] || []).forEach(a => {
- localLookup[a] = true;
- });
- });
- Object.assign(__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f"), Object.keys(__classPrivateFieldGet(this, _YargsInstance_groups, "f")).reduce((acc, groupName) => {
- const keys = __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName].filter(key => !(key in localLookup));
- if (keys.length > 0) {
- acc[groupName] = keys;
- }
- return acc;
- }, {}));
- __classPrivateFieldSet(this, _YargsInstance_groups, {}, "f");
- const arrayOptions = [
- 'array',
- 'boolean',
- 'string',
- 'skipValidation',
- 'count',
- 'normalize',
- 'number',
- 'hiddenOptions',
- ];
- const objectOptions = [
- 'narg',
- 'key',
- 'alias',
- 'default',
- 'defaultDescription',
- 'config',
- 'choices',
- 'demandedOptions',
- 'demandedCommands',
- 'deprecatedOptions',
- ];
- arrayOptions.forEach(k => {
- tmpOptions[k] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[k] || []).filter((k) => !localLookup[k]);
- });
- objectOptions.forEach((k) => {
- tmpOptions[k] = objFilter(__classPrivateFieldGet(this, _YargsInstance_options, "f")[k], k => !localLookup[k]);
- });
- tmpOptions.envPrefix = __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix;
- __classPrivateFieldSet(this, _YargsInstance_options, tmpOptions, "f");
- __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f")
- ? __classPrivateFieldGet(this, _YargsInstance_usage, "f").reset(localLookup)
- : Usage(this, __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f");
- __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f")
- ? __classPrivateFieldGet(this, _YargsInstance_validation, "f").reset(localLookup)
- : Validation(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f");
- __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f")
- ? __classPrivateFieldGet(this, _YargsInstance_command, "f").reset()
- : Command(__classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_validation, "f"), __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f");
- if (!__classPrivateFieldGet(this, _YargsInstance_completion, "f"))
- __classPrivateFieldSet(this, _YargsInstance_completion, Completion(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_command, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f");
- __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").reset();
- __classPrivateFieldSet(this, _YargsInstance_completionCommand, null, "f");
- __classPrivateFieldSet(this, _YargsInstance_output, '', "f");
- __classPrivateFieldSet(this, _YargsInstance_exitError, null, "f");
- __classPrivateFieldSet(this, _YargsInstance_hasOutput, false, "f");
- this.parsed = false;
- return this;
- }
- [kRebase](base, dir) {
- return __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.relative(base, dir);
- }
- [kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) {
- let skipValidation = !!calledFromCommand || helpOnly;
- args = args || __classPrivateFieldGet(this, _YargsInstance_processArgs, "f");
- __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
- __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
- const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration['populate--'];
- const config = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
- 'populate--': true,
- });
- const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
- configuration: { 'parse-positional-numbers': false, ...config },
- }));
- const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
- let argvPromise = undefined;
- const aliases = parsed.aliases;
- let helpOptSet = false;
- let versionOptSet = false;
- Object.keys(argv).forEach(key => {
- if (key === __classPrivateFieldGet(this, _YargsInstance_helpOpt, "f") && argv[key]) {
- helpOptSet = true;
- }
- else if (key === __classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && argv[key]) {
- versionOptSet = true;
- }
- });
- argv.$0 = this.$0;
- this.parsed = parsed;
- if (commandIndex === 0) {
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").clearCachedHelpMessage();
- }
- try {
- this[kGuessLocale]();
- if (shortCircuit) {
- return this[kPostProcess](argv, populateDoubleDash, !!calledFromCommand, false);
- }
- if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) {
- const helpCmds = [__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")]
- .concat(aliases[__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] || [])
- .filter(k => k.length > 1);
- if (helpCmds.includes('' + argv._[argv._.length - 1])) {
- argv._.pop();
- helpOptSet = true;
- }
- }
- __classPrivateFieldSet(this, _YargsInstance_isGlobalContext, false, "f");
- const handlerKeys = __classPrivateFieldGet(this, _YargsInstance_command, "f").getCommands();
- const requestCompletions = __classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey in argv;
- const skipRecommendation = helpOptSet || requestCompletions || helpOnly;
- if (argv._.length) {
- if (handlerKeys.length) {
- let firstUnknownCommand;
- for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) {
- cmd = String(argv._[i]);
- if (handlerKeys.includes(cmd) && cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) {
- const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(cmd, this, parsed, i + 1, helpOnly, helpOptSet || versionOptSet || helpOnly);
- return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false);
- }
- else if (!firstUnknownCommand &&
- cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) {
- firstUnknownCommand = cmd;
- break;
- }
- }
- if (!__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() &&
- __classPrivateFieldGet(this, _YargsInstance_recommendCommands, "f") &&
- firstUnknownCommand &&
- !skipRecommendation) {
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").recommendCommands(firstUnknownCommand, handlerKeys);
- }
- }
- if (__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") &&
- argv._.includes(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) &&
- !requestCompletions) {
- if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"))
- setBlocking(true);
- this.showCompletionScript();
- this.exit(0);
- }
- }
- if (__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && !skipRecommendation) {
- const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(null, this, parsed, 0, helpOnly, helpOptSet || versionOptSet || helpOnly);
- return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false);
- }
- if (requestCompletions) {
- if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"))
- setBlocking(true);
- args = [].concat(args);
- const completionArgs = args.slice(args.indexOf(`--${__classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey}`) + 1);
- __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(completionArgs, (err, completions) => {
- if (err)
- throw new YError(err.message);
- (completions || []).forEach(completion => {
- __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(completion);
- });
- this.exit(0);
- });
- return this[kPostProcess](argv, !populateDoubleDash, !!calledFromCommand, false);
- }
- if (!__classPrivateFieldGet(this, _YargsInstance_hasOutput, "f")) {
- if (helpOptSet) {
- if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"))
- setBlocking(true);
- skipValidation = true;
- this.showHelp('log');
- this.exit(0);
- }
- else if (versionOptSet) {
- if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"))
- setBlocking(true);
- skipValidation = true;
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion('log');
- this.exit(0);
- }
- }
- if (!skipValidation && __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.length > 0) {
- skipValidation = Object.keys(argv).some(key => __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.indexOf(key) >= 0 && argv[key] === true);
- }
- if (!skipValidation) {
- if (parsed.error)
- throw new YError(parsed.error.message);
- if (!requestCompletions) {
- const validation = this[kRunValidation](aliases, {}, parsed.error);
- if (!calledFromCommand) {
- argvPromise = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), true);
- }
- argvPromise = this[kValidateAsync](validation, argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv);
- if (isPromise(argvPromise) && !calledFromCommand) {
- argvPromise = argvPromise.then(() => {
- return applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false);
- });
- }
- }
- }
- }
- catch (err) {
- if (err instanceof YError)
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message, err);
- else
- throw err;
- }
- return this[kPostProcess](argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv, populateDoubleDash, !!calledFromCommand, true);
- }
- [kRunValidation](aliases, positionalMap, parseErrors, isDefaultCommand) {
- const demandedOptions = { ...this.getDemandedOptions() };
- return (argv) => {
- if (parseErrors)
- throw new YError(parseErrors.message);
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").nonOptionCount(argv);
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").requiredArguments(argv, demandedOptions);
- let failedStrictCommands = false;
- if (__classPrivateFieldGet(this, _YargsInstance_strictCommands, "f")) {
- failedStrictCommands = __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownCommands(argv);
- }
- if (__classPrivateFieldGet(this, _YargsInstance_strict, "f") && !failedStrictCommands) {
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, positionalMap, !!isDefaultCommand);
- }
- else if (__classPrivateFieldGet(this, _YargsInstance_strictOptions, "f")) {
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, {}, false, false);
- }
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").limitedChoices(argv);
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").implications(argv);
- __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicting(argv);
- };
- }
- [kSetHasOutput]() {
- __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
- }
- [kTrackManuallySetKeys](keys) {
- if (typeof keys === 'string') {
- __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true;
- }
- else {
- for (const k of keys) {
- __classPrivateFieldGet(this, _YargsInstance_options, "f").key[k] = true;
- }
- }
- }
-}
-export function isYargsInstance(y) {
- return !!y && typeof y.getInternalMethods === 'function';
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/yerror.js b/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/yerror.js
deleted file mode 100644
index 7a36684..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/build/lib/yerror.js
+++ /dev/null
@@ -1,9 +0,0 @@
-export class YError extends Error {
- constructor(msg) {
- super(msg || 'yargs error');
- this.name = 'YError';
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, YError);
- }
- }
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/helpers/helpers.mjs b/node_modules/@puppeteer/replay/node_modules/yargs/helpers/helpers.mjs
deleted file mode 100644
index 3f96b3d..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/helpers/helpers.mjs
+++ /dev/null
@@ -1,10 +0,0 @@
-import {applyExtends as _applyExtends} from '../build/lib/utils/apply-extends.js';
-import {hideBin} from '../build/lib/utils/process-argv.js';
-import Parser from 'yargs-parser';
-import shim from '../lib/platform-shims/esm.mjs';
-
-const applyExtends = (config, cwd, mergeExtends) => {
- return _applyExtends(config, cwd, mergeExtends, shim);
-};
-
-export {applyExtends, hideBin, Parser};
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/helpers/index.js b/node_modules/@puppeteer/replay/node_modules/yargs/helpers/index.js
deleted file mode 100644
index 8ab79a3..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/helpers/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-const {
- applyExtends,
- cjsPlatformShim,
- Parser,
- processArgv,
-} = require('../build/index.cjs');
-
-module.exports = {
- applyExtends: (config, cwd, mergeExtends) => {
- return applyExtends(config, cwd, mergeExtends, cjsPlatformShim);
- },
- hideBin: processArgv.hideBin,
- Parser,
-};
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/helpers/package.json b/node_modules/@puppeteer/replay/node_modules/yargs/helpers/package.json
deleted file mode 100644
index 5bbefff..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/helpers/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "commonjs"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/index.cjs b/node_modules/@puppeteer/replay/node_modules/yargs/index.cjs
deleted file mode 100644
index d1eee82..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/index.cjs
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-// classic singleton yargs API, to use yargs
-// without running as a singleton do:
-// require('yargs/yargs')(process.argv.slice(2))
-const {Yargs, processArgv} = require('./build/index.cjs');
-
-Argv(processArgv.hideBin(process.argv));
-
-module.exports = Argv;
-
-function Argv(processArgs, cwd) {
- const argv = Yargs(processArgs, cwd, require);
- singletonify(argv);
- // TODO(bcoe): warn if argv.parse() or argv.argv is used directly.
- return argv;
-}
-
-function defineGetter(obj, key, getter) {
- Object.defineProperty(obj, key, {
- configurable: true,
- enumerable: true,
- get: getter,
- });
-}
-function lookupGetter(obj, key) {
- const desc = Object.getOwnPropertyDescriptor(obj, key);
- if (typeof desc !== 'undefined') {
- return desc.get;
- }
-}
-
-/* Hack an instance of Argv with process.argv into Argv
- so people can do
- require('yargs')(['--beeble=1','-z','zizzle']).argv
- to parse a list of args and
- require('yargs').argv
- to get a parsed version of process.argv.
-*/
-function singletonify(inst) {
- [
- ...Object.keys(inst),
- ...Object.getOwnPropertyNames(inst.constructor.prototype),
- ].forEach(key => {
- if (key === 'argv') {
- defineGetter(Argv, key, lookupGetter(inst, key));
- } else if (typeof inst[key] === 'function') {
- Argv[key] = inst[key].bind(inst);
- } else {
- defineGetter(Argv, '$0', () => inst.$0);
- defineGetter(Argv, 'parsed', () => inst.parsed);
- }
- });
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/index.mjs b/node_modules/@puppeteer/replay/node_modules/yargs/index.mjs
deleted file mode 100644
index c6440b9..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/index.mjs
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-// Bootstraps yargs for ESM:
-import esmPlatformShim from './lib/platform-shims/esm.mjs';
-import {YargsFactory} from './build/lib/yargs-factory.js';
-
-const Yargs = YargsFactory(esmPlatformShim);
-export default Yargs;
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/lib/platform-shims/browser.mjs b/node_modules/@puppeteer/replay/node_modules/yargs/lib/platform-shims/browser.mjs
deleted file mode 100644
index 5f8ec61..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/lib/platform-shims/browser.mjs
+++ /dev/null
@@ -1,95 +0,0 @@
-/* eslint-disable no-unused-vars */
-'use strict';
-
-import cliui from 'https://unpkg.com/[email protected]/index.mjs'; // eslint-disable-line
-import Parser from 'https://unpkg.com/[email protected]/browser.js'; // eslint-disable-line
-import {getProcessArgvBin} from '../../build/lib/utils/process-argv.js';
-import {YError} from '../../build/lib/yerror.js';
-
-const REQUIRE_ERROR = 'require is not supported in browser';
-const REQUIRE_DIRECTORY_ERROR =
- 'loading a directory of commands is not supported in browser';
-
-export default {
- assert: {
- notStrictEqual: (a, b) => {
- // noop.
- },
- strictEqual: (a, b) => {
- // noop.
- },
- },
- cliui,
- findUp: () => undefined,
- getEnv: key => {
- // There is no environment in browser:
- return undefined;
- },
- inspect: console.log,
- getCallerFile: () => {
- throw new YError(REQUIRE_DIRECTORY_ERROR);
- },
- getProcessArgvBin,
- mainFilename: 'yargs',
- Parser,
- path: {
- basename: str => str,
- dirname: str => str,
- extname: str => str,
- relative: str => str,
- },
- process: {
- argv: () => [],
- cwd: () => '',
- emitWarning: (warning, name) => {},
- execPath: () => '',
- // exit is noop browser:
- exit: () => {},
- nextTick: cb => {
- // eslint-disable-next-line no-undef
- window.setTimeout(cb, 1);
- },
- stdColumns: 80,
- },
- readFileSync: () => {
- return '';
- },
- require: () => {
- throw new YError(REQUIRE_ERROR);
- },
- requireDirectory: () => {
- throw new YError(REQUIRE_DIRECTORY_ERROR);
- },
- stringWidth: str => {
- return [...str].length;
- },
- // TODO: replace this with y18n once it's ported to ESM:
- y18n: {
- __: (...str) => {
- if (str.length === 0) return '';
- const args = str.slice(1);
- return sprintf(str[0], ...args);
- },
- __n: (str1, str2, count, ...args) => {
- if (count === 1) {
- return sprintf(str1, ...args);
- } else {
- return sprintf(str2, ...args);
- }
- },
- getLocale: () => {
- return 'en_US';
- },
- setLocale: () => {},
- updateLocale: () => {},
- },
-};
-
-function sprintf(_str, ...args) {
- let str = '';
- const split = _str.split('%s');
- split.forEach((token, i) => {
- str += `${token}${split[i + 1] !== undefined && args[i] ? args[i] : ''}`;
- });
- return str;
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/lib/platform-shims/esm.mjs b/node_modules/@puppeteer/replay/node_modules/yargs/lib/platform-shims/esm.mjs
deleted file mode 100644
index c25baa5..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/lib/platform-shims/esm.mjs
+++ /dev/null
@@ -1,73 +0,0 @@
-'use strict'
-
-import { notStrictEqual, strictEqual } from 'assert'
-import cliui from 'cliui'
-import escalade from 'escalade/sync'
-import { inspect } from 'util'
-import { readFileSync } from 'fs'
-import { fileURLToPath } from 'url';
-import Parser from 'yargs-parser'
-import { basename, dirname, extname, relative, resolve } from 'path'
-import { getProcessArgvBin } from '../../build/lib/utils/process-argv.js'
-import { YError } from '../../build/lib/yerror.js'
-import y18n from 'y18n'
-
-const REQUIRE_ERROR = 'require is not supported by ESM'
-const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM'
-
-let __dirname;
-try {
- __dirname = fileURLToPath(import.meta.url);
-} catch (e) {
- __dirname = process.cwd();
-}
-const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules'));
-
-export default {
- assert: {
- notStrictEqual,
- strictEqual
- },
- cliui,
- findUp: escalade,
- getEnv: (key) => {
- return process.env[key]
- },
- inspect,
- getCallerFile: () => {
- throw new YError(REQUIRE_DIRECTORY_ERROR)
- },
- getProcessArgvBin,
- mainFilename: mainFilename || process.cwd(),
- Parser,
- path: {
- basename,
- dirname,
- extname,
- relative,
- resolve
- },
- process: {
- argv: () => process.argv,
- cwd: process.cwd,
- emitWarning: (warning, type) => process.emitWarning(warning, type),
- execPath: () => process.execPath,
- exit: process.exit,
- nextTick: process.nextTick,
- stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null
- },
- readFileSync,
- require: () => {
- throw new YError(REQUIRE_ERROR)
- },
- requireDirectory: () => {
- throw new YError(REQUIRE_DIRECTORY_ERROR)
- },
- stringWidth: (str) => {
- return [...str].length
- },
- y18n: y18n({
- directory: resolve(__dirname, '../../../locales'),
- updateFiles: false
- })
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/be.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/be.json
deleted file mode 100644
index e28fa30..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/be.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "Commands:": "Каманды:",
- "Options:": "Опцыі:",
- "Examples:": "Прыклады:",
- "boolean": "булевы тып",
- "count": "падлік",
- "string": "радковы тып",
- "number": "лік",
- "array": "масіў",
- "required": "неабходна",
- "default": "па змаўчанні",
- "default:": "па змаўчанні:",
- "choices:": "магчымасці:",
- "aliases:": "аліасы:",
- "generated-value": "згенераванае значэнне",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s",
- "other": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s",
- "other": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s"
- },
- "Missing argument value: %s": {
- "one": "Не хапае значэння аргументу: %s",
- "other": "Не хапае значэнняў аргументаў: %s"
- },
- "Missing required argument: %s": {
- "one": "Не хапае неабходнага аргументу: %s",
- "other": "Не хапае неабходных аргументаў: %s"
- },
- "Unknown argument: %s": {
- "one": "Невядомы аргумент: %s",
- "other": "Невядомыя аргументы: %s"
- },
- "Invalid values:": "Несапраўдныя значэння:",
- "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s",
- "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s",
- "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:",
- "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s",
- "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s",
- "Path to JSON config file": "Шлях да файла канфігурацыі JSON",
- "Show help": "Паказаць дапамогу",
- "Show version number": "Паказаць нумар версіі",
- "Did you mean %s?": "Вы мелі на ўвазе %s?"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/cs.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/cs.json
deleted file mode 100644
index 6394875..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/cs.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "Commands:": "Příkazy:",
- "Options:": "Možnosti:",
- "Examples:": "Příklady:",
- "boolean": "logická hodnota",
- "count": "počet",
- "string": "řetězec",
- "number": "číslo",
- "array": "pole",
- "required": "povinné",
- "default": "výchozí",
- "default:": "výchozí:",
- "choices:": "volby:",
- "aliases:": "aliasy:",
- "generated-value": "generovaná-hodnota",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s",
- "other": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Příliš mnoho argumentů: zadáno %s, maximálně %s",
- "other": "Příliš mnoho argumentů: zadáno %s, maximálně %s"
- },
- "Missing argument value: %s": {
- "one": "Chybí hodnota argumentu: %s",
- "other": "Chybí hodnoty argumentů: %s"
- },
- "Missing required argument: %s": {
- "one": "Chybí požadovaný argument: %s",
- "other": "Chybí požadované argumenty: %s"
- },
- "Unknown argument: %s": {
- "one": "Neznámý argument: %s",
- "other": "Neznámé argumenty: %s"
- },
- "Invalid values:": "Neplatné hodnoty:",
- "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Zadáno: %s, Možnosti: %s",
- "Argument check failed: %s": "Kontrola argumentů se nezdařila: %s",
- "Implications failed:": "Chybí závislé argumenty:",
- "Not enough arguments following: %s": "Následuje nedostatek argumentů: %s",
- "Invalid JSON config file: %s": "Neplatný konfigurační soubor JSON: %s",
- "Path to JSON config file": "Cesta ke konfiguračnímu souboru JSON",
- "Show help": "Zobrazit nápovědu",
- "Show version number": "Zobrazit číslo verze",
- "Did you mean %s?": "Měl jste na mysli %s?",
- "Arguments %s and %s are mutually exclusive" : "Argumenty %s a %s se vzájemně vylučují",
- "Positionals:": "Poziční:",
- "command": "příkaz",
- "deprecated": "zastaralé",
- "deprecated: %s": "zastaralé: %s"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/de.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/de.json
deleted file mode 100644
index dc73ec3..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/de.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "Commands:": "Kommandos:",
- "Options:": "Optionen:",
- "Examples:": "Beispiele:",
- "boolean": "boolean",
- "count": "Zähler",
- "string": "string",
- "number": "Zahl",
- "array": "array",
- "required": "erforderlich",
- "default": "Standard",
- "default:": "Standard:",
- "choices:": "Möglichkeiten:",
- "aliases:": "Aliase:",
- "generated-value": "Generierter-Wert",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt",
- "other": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt",
- "other": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt"
- },
- "Missing argument value: %s": {
- "one": "Fehlender Argumentwert: %s",
- "other": "Fehlende Argumentwerte: %s"
- },
- "Missing required argument: %s": {
- "one": "Fehlendes Argument: %s",
- "other": "Fehlende Argumente: %s"
- },
- "Unknown argument: %s": {
- "one": "Unbekanntes Argument: %s",
- "other": "Unbekannte Argumente: %s"
- },
- "Invalid values:": "Unzulässige Werte:",
- "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s",
- "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s",
- "Implications failed:": "Fehlende abhängige Argumente:",
- "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s",
- "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s",
- "Path to JSON config file": "Pfad zur JSON-Config Datei",
- "Show help": "Hilfe anzeigen",
- "Show version number": "Version anzeigen",
- "Did you mean %s?": "Meintest du %s?"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/en.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/en.json
deleted file mode 100644
index af096a1..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/en.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "Commands:": "Commands:",
- "Options:": "Options:",
- "Examples:": "Examples:",
- "boolean": "boolean",
- "count": "count",
- "string": "string",
- "number": "number",
- "array": "array",
- "required": "required",
- "default": "default",
- "default:": "default:",
- "choices:": "choices:",
- "aliases:": "aliases:",
- "generated-value": "generated-value",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Not enough non-option arguments: got %s, need at least %s",
- "other": "Not enough non-option arguments: got %s, need at least %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Too many non-option arguments: got %s, maximum of %s",
- "other": "Too many non-option arguments: got %s, maximum of %s"
- },
- "Missing argument value: %s": {
- "one": "Missing argument value: %s",
- "other": "Missing argument values: %s"
- },
- "Missing required argument: %s": {
- "one": "Missing required argument: %s",
- "other": "Missing required arguments: %s"
- },
- "Unknown argument: %s": {
- "one": "Unknown argument: %s",
- "other": "Unknown arguments: %s"
- },
- "Unknown command: %s": {
- "one": "Unknown command: %s",
- "other": "Unknown commands: %s"
- },
- "Invalid values:": "Invalid values:",
- "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s",
- "Argument check failed: %s": "Argument check failed: %s",
- "Implications failed:": "Missing dependent arguments:",
- "Not enough arguments following: %s": "Not enough arguments following: %s",
- "Invalid JSON config file: %s": "Invalid JSON config file: %s",
- "Path to JSON config file": "Path to JSON config file",
- "Show help": "Show help",
- "Show version number": "Show version number",
- "Did you mean %s?": "Did you mean %s?",
- "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive",
- "Positionals:": "Positionals:",
- "command": "command",
- "deprecated": "deprecated",
- "deprecated: %s": "deprecated: %s"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/es.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/es.json
deleted file mode 100644
index d77b461..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/es.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "Commands:": "Comandos:",
- "Options:": "Opciones:",
- "Examples:": "Ejemplos:",
- "boolean": "booleano",
- "count": "cuenta",
- "string": "cadena de caracteres",
- "number": "número",
- "array": "tabla",
- "required": "requerido",
- "default": "defecto",
- "default:": "defecto:",
- "choices:": "selección:",
- "aliases:": "alias:",
- "generated-value": "valor-generado",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s",
- "other": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s",
- "other": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s"
- },
- "Missing argument value: %s": {
- "one": "Falta argumento: %s",
- "other": "Faltan argumentos: %s"
- },
- "Missing required argument: %s": {
- "one": "Falta argumento requerido: %s",
- "other": "Faltan argumentos requeridos: %s"
- },
- "Unknown argument: %s": {
- "one": "Argumento desconocido: %s",
- "other": "Argumentos desconocidos: %s"
- },
- "Invalid values:": "Valores inválidos:",
- "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s",
- "Argument check failed: %s": "Verificación de argumento ha fallado: %s",
- "Implications failed:": "Implicaciones fallidas:",
- "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s",
- "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s",
- "Path to JSON config file": "Ruta al archivo de configuración JSON",
- "Show help": "Muestra ayuda",
- "Show version number": "Muestra número de versión",
- "Did you mean %s?": "Quisiste decir %s?"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/fi.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/fi.json
deleted file mode 100644
index 481feb7..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/fi.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "Commands:": "Komennot:",
- "Options:": "Valinnat:",
- "Examples:": "Esimerkkejä:",
- "boolean": "totuusarvo",
- "count": "lukumäärä",
- "string": "merkkijono",
- "number": "numero",
- "array": "taulukko",
- "required": "pakollinen",
- "default": "oletusarvo",
- "default:": "oletusarvo:",
- "choices:": "vaihtoehdot:",
- "aliases:": "aliakset:",
- "generated-value": "generoitu-arvo",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s",
- "other": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s",
- "other": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s"
- },
- "Missing argument value: %s": {
- "one": "Argumentin arvo puuttuu: %s",
- "other": "Argumentin arvot puuttuvat: %s"
- },
- "Missing required argument: %s": {
- "one": "Pakollinen argumentti puuttuu: %s",
- "other": "Pakollisia argumentteja puuttuu: %s"
- },
- "Unknown argument: %s": {
- "one": "Tuntematon argumentti: %s",
- "other": "Tuntemattomia argumentteja: %s"
- },
- "Invalid values:": "Virheelliset arvot:",
- "Argument: %s, Given: %s, Choices: %s": "Argumentti: %s, Annettu: %s, Vaihtoehdot: %s",
- "Argument check failed: %s": "Argumentin tarkistus epäonnistui: %s",
- "Implications failed:": "Riippuvia argumentteja puuttuu:",
- "Not enough arguments following: %s": "Argumentin perässä ei ole tarpeeksi argumentteja: %s",
- "Invalid JSON config file: %s": "Epävalidi JSON-asetustiedosto: %s",
- "Path to JSON config file": "JSON-asetustiedoston polku",
- "Show help": "Näytä ohje",
- "Show version number": "Näytä versionumero",
- "Did you mean %s?": "Tarkoititko %s?",
- "Arguments %s and %s are mutually exclusive" : "Argumentit %s ja %s eivät ole yhteensopivat",
- "Positionals:": "Sijaintiparametrit:",
- "command": "komento"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/fr.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/fr.json
deleted file mode 100644
index edd743f..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/fr.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "Commands:": "Commandes :",
- "Options:": "Options :",
- "Examples:": "Exemples :",
- "boolean": "booléen",
- "count": "compteur",
- "string": "chaîne de caractères",
- "number": "nombre",
- "array": "tableau",
- "required": "requis",
- "default": "défaut",
- "default:": "défaut :",
- "choices:": "choix :",
- "aliases:": "alias :",
- "generated-value": "valeur générée",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Pas assez d'arguments (hors options) : reçu %s, besoin d'au moins %s",
- "other": "Pas assez d'arguments (hors options) : reçus %s, besoin d'au moins %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Trop d'arguments (hors options) : reçu %s, maximum de %s",
- "other": "Trop d'arguments (hors options) : reçus %s, maximum de %s"
- },
- "Missing argument value: %s": {
- "one": "Argument manquant : %s",
- "other": "Arguments manquants : %s"
- },
- "Missing required argument: %s": {
- "one": "Argument requis manquant : %s",
- "other": "Arguments requis manquants : %s"
- },
- "Unknown argument: %s": {
- "one": "Argument inconnu : %s",
- "other": "Arguments inconnus : %s"
- },
- "Unknown command: %s": {
- "one": "Commande inconnue : %s",
- "other": "Commandes inconnues : %s"
- },
- "Invalid values:": "Valeurs invalides :",
- "Argument: %s, Given: %s, Choices: %s": "Argument : %s, donné : %s, choix : %s",
- "Argument check failed: %s": "Echec de la vérification de l'argument : %s",
- "Implications failed:": "Arguments dépendants manquants :",
- "Not enough arguments following: %s": "Pas assez d'arguments après : %s",
- "Invalid JSON config file: %s": "Fichier de configuration JSON invalide : %s",
- "Path to JSON config file": "Chemin du fichier de configuration JSON",
- "Show help": "Affiche l'aide",
- "Show version number": "Affiche le numéro de version",
- "Did you mean %s?": "Vouliez-vous dire %s ?",
- "Arguments %s and %s are mutually exclusive" : "Les arguments %s et %s sont mutuellement exclusifs",
- "Positionals:": "Arguments positionnels :",
- "command": "commande"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/hi.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/hi.json
deleted file mode 100644
index a9de77c..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/hi.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "Commands:": "आदेश:",
- "Options:": "विकल्प:",
- "Examples:": "उदाहरण:",
- "boolean": "सत्यता",
- "count": "संख्या",
- "string": "वर्णों का तार ",
- "number": "अंक",
- "array": "सरणी",
- "required": "आवश्यक",
- "default": "डिफॉल्ट",
- "default:": "डिफॉल्ट:",
- "choices:": "विकल्प:",
- "aliases:": "उपनाम:",
- "generated-value": "उत्पन्न-मूल्य",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है",
- "other": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य",
- "other": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य"
- },
- "Missing argument value: %s": {
- "one": "कुछ तर्को के मूल्य गुम हैं: %s",
- "other": "कुछ तर्को के मूल्य गुम हैं: %s"
- },
- "Missing required argument: %s": {
- "one": "आवश्यक तर्क गुम हैं: %s",
- "other": "आवश्यक तर्क गुम हैं: %s"
- },
- "Unknown argument: %s": {
- "one": "अज्ञात तर्क प्राप्त: %s",
- "other": "अज्ञात तर्क प्राप्त: %s"
- },
- "Invalid values:": "अमान्य मूल्य:",
- "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s",
- "Argument check failed: %s": "तर्क जांच विफल: %s",
- "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:",
- "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s",
- "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s",
- "Path to JSON config file": "JSON config फाइल का पथ",
- "Show help": "सहायता दिखाएँ",
- "Show version number": "Version संख्या दिखाएँ",
- "Did you mean %s?": "क्या आपका मतलब है %s?",
- "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं",
- "Positionals:": "स्थानीय:",
- "command": "आदेश"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/hu.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/hu.json
deleted file mode 100644
index 21492d0..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/hu.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "Commands:": "Parancsok:",
- "Options:": "Opciók:",
- "Examples:": "Példák:",
- "boolean": "boolean",
- "count": "számláló",
- "string": "szöveg",
- "number": "szám",
- "array": "tömb",
- "required": "kötelező",
- "default": "alapértelmezett",
- "default:": "alapértelmezett:",
- "choices:": "lehetőségek:",
- "aliases:": "aliaszok:",
- "generated-value": "generált-érték",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell",
- "other": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet",
- "other": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet"
- },
- "Missing argument value: %s": {
- "one": "Hiányzó argumentum érték: %s",
- "other": "Hiányzó argumentum értékek: %s"
- },
- "Missing required argument: %s": {
- "one": "Hiányzó kötelező argumentum: %s",
- "other": "Hiányzó kötelező argumentumok: %s"
- },
- "Unknown argument: %s": {
- "one": "Ismeretlen argumentum: %s",
- "other": "Ismeretlen argumentumok: %s"
- },
- "Invalid values:": "Érvénytelen érték:",
- "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s",
- "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s",
- "Implications failed:": "Implikációk sikertelenek:",
- "Not enough arguments following: %s": "Nem elég argumentum követi: %s",
- "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s",
- "Path to JSON config file": "JSON konfigurációs file helye",
- "Show help": "Súgo megjelenítése",
- "Show version number": "Verziószám megjelenítése",
- "Did you mean %s?": "Erre gondoltál %s?"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/id.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/id.json
deleted file mode 100644
index 125867c..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/id.json
+++ /dev/null
@@ -1,50 +0,0 @@
-
-{
- "Commands:": "Perintah:",
- "Options:": "Pilihan:",
- "Examples:": "Contoh:",
- "boolean": "boolean",
- "count": "jumlah",
- "number": "nomor",
- "string": "string",
- "array": "larik",
- "required": "diperlukan",
- "default": "bawaan",
- "default:": "bawaan:",
- "aliases:": "istilah lain:",
- "choices:": "pilihan:",
- "generated-value": "nilai-yang-dihasilkan",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Argumen wajib kurang: hanya %s, minimal %s",
- "other": "Argumen wajib kurang: hanya %s, minimal %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Terlalu banyak argumen wajib: ada %s, maksimal %s",
- "other": "Terlalu banyak argumen wajib: ada %s, maksimal %s"
- },
- "Missing argument value: %s": {
- "one": "Kurang argumen: %s",
- "other": "Kurang argumen: %s"
- },
- "Missing required argument: %s": {
- "one": "Kurang argumen wajib: %s",
- "other": "Kurang argumen wajib: %s"
- },
- "Unknown argument: %s": {
- "one": "Argumen tak diketahui: %s",
- "other": "Argumen tak diketahui: %s"
- },
- "Invalid values:": "Nilai-nilai tidak valid:",
- "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s",
- "Argument check failed: %s": "Pemeriksaan argument gagal: %s",
- "Implications failed:": "Implikasi gagal:",
- "Not enough arguments following: %s": "Kurang argumen untuk: %s",
- "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s",
- "Path to JSON config file": "Alamat berkas konfigurasi JSON",
- "Show help": "Lihat bantuan",
- "Show version number": "Lihat nomor versi",
- "Did you mean %s?": "Maksud Anda: %s?",
- "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif",
- "Positionals:": "Posisional-posisional:",
- "command": "perintah"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/it.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/it.json
deleted file mode 100644
index fde5756..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/it.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "Commands:": "Comandi:",
- "Options:": "Opzioni:",
- "Examples:": "Esempi:",
- "boolean": "booleano",
- "count": "contatore",
- "string": "stringa",
- "number": "numero",
- "array": "vettore",
- "required": "richiesto",
- "default": "predefinito",
- "default:": "predefinito:",
- "choices:": "scelte:",
- "aliases:": "alias:",
- "generated-value": "valore generato",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s",
- "other": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s",
- "other": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s"
- },
- "Missing argument value: %s": {
- "one": "Argomento mancante: %s",
- "other": "Argomenti mancanti: %s"
- },
- "Missing required argument: %s": {
- "one": "Argomento richiesto mancante: %s",
- "other": "Argomenti richiesti mancanti: %s"
- },
- "Unknown argument: %s": {
- "one": "Argomento sconosciuto: %s",
- "other": "Argomenti sconosciuti: %s"
- },
- "Invalid values:": "Valori non validi:",
- "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s",
- "Argument check failed: %s": "Controllo dell'argomento fallito: %s",
- "Implications failed:": "Argomenti dipendenti mancanti:",
- "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s",
- "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s",
- "Path to JSON config file": "Percorso del file di configurazione JSON",
- "Show help": "Mostra la schermata di aiuto",
- "Show version number": "Mostra il numero di versione",
- "Did you mean %s?": "Intendi forse %s?"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/ja.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/ja.json
deleted file mode 100644
index 3954ae6..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/ja.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "Commands:": "コマンド:",
- "Options:": "オプション:",
- "Examples:": "例:",
- "boolean": "真偽",
- "count": "カウント",
- "string": "文字列",
- "number": "数値",
- "array": "配列",
- "required": "必須",
- "default": "デフォルト",
- "default:": "デフォルト:",
- "choices:": "選択してください:",
- "aliases:": "エイリアス:",
- "generated-value": "生成された値",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:",
- "other": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:",
- "other": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:"
- },
- "Missing argument value: %s": {
- "one": "引数の値が見つかりません: %s",
- "other": "引数の値が見つかりません: %s"
- },
- "Missing required argument: %s": {
- "one": "必須の引数が見つかりません: %s",
- "other": "必須の引数が見つかりません: %s"
- },
- "Unknown argument: %s": {
- "one": "未知の引数です: %s",
- "other": "未知の引数です: %s"
- },
- "Invalid values:": "不正な値です:",
- "Argument: %s, Given: %s, Choices: %s": "引数は %s です。与えられた値: %s, 選択してください: %s",
- "Argument check failed: %s": "引数のチェックに失敗しました: %s",
- "Implications failed:": "オプションの組み合わせで不正が生じました:",
- "Not enough arguments following: %s": "次の引数が不足しています。: %s",
- "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s",
- "Path to JSON config file": "JSONの設定ファイルまでのpath",
- "Show help": "ヘルプを表示",
- "Show version number": "バージョンを表示",
- "Did you mean %s?": "もしかして %s?",
- "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません",
- "Positionals:": "位置:",
- "command": "コマンド",
- "deprecated": "非推奨",
- "deprecated: %s": "非推奨: %s"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/ko.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/ko.json
deleted file mode 100644
index 746bc89..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/ko.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "Commands:": "명령:",
- "Options:": "옵션:",
- "Examples:": "예시:",
- "boolean": "불리언",
- "count": "개수",
- "string": "문자열",
- "number": "숫자",
- "array": "배열",
- "required": "필수",
- "default": "기본값",
- "default:": "기본값:",
- "choices:": "선택지:",
- "aliases:": "별칭:",
- "generated-value": "생성된 값",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요",
- "other": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능",
- "other": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능"
- },
- "Missing argument value: %s": {
- "one": "인수가 주어지지 않았습니다: %s",
- "other": "인수가 주어지지 않았습니다: %s"
- },
- "Missing required argument: %s": {
- "one": "필수 인수가 주어지지 않았습니다: %s",
- "other": "필수 인수가 주어지지 않았습니다: %s"
- },
- "Unknown argument: %s": {
- "one": "알 수 없는 인수입니다: %s",
- "other": "알 수 없는 인수입니다: %s"
- },
- "Invalid values:": "유효하지 않은 값:",
- "Argument: %s, Given: %s, Choices: %s": "인수: %s, 주어진 값: %s, 선택지: %s",
- "Argument check failed: %s": "인수 체크에 실패했습니다: %s",
- "Implications failed:": "주어진 인수에 필요한 추가 인수가 주어지지 않았습니다:",
- "Not enough arguments following: %s": "다음 인수가 주어지지 않았습니다: %s",
- "Invalid JSON config file: %s": "유효하지 않은 JSON 설정 파일: %s",
- "Path to JSON config file": "JSON 설정 파일 경로",
- "Show help": "도움말 표시",
- "Show version number": "버전 표시",
- "Did you mean %s?": "%s을(를) 찾으시나요?",
- "Arguments %s and %s are mutually exclusive" : "인수 %s과(와) %s은(는) 동시에 지정할 수 없습니다",
- "Positionals:": "위치:",
- "command": "명령"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/nb.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/nb.json
deleted file mode 100644
index 6f410ed..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/nb.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "Commands:": "Kommandoer:",
- "Options:": "Alternativer:",
- "Examples:": "Eksempler:",
- "boolean": "boolsk",
- "count": "antall",
- "string": "streng",
- "number": "nummer",
- "array": "matrise",
- "required": "obligatorisk",
- "default": "standard",
- "default:": "standard:",
- "choices:": "valg:",
- "generated-value": "generert-verdi",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s",
- "other": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s",
- "other": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s"
- },
- "Missing argument value: %s": {
- "one": "Mangler argument verdi: %s",
- "other": "Mangler argument verdier: %s"
- },
- "Missing required argument: %s": {
- "one": "Mangler obligatorisk argument: %s",
- "other": "Mangler obligatoriske argumenter: %s"
- },
- "Unknown argument: %s": {
- "one": "Ukjent argument: %s",
- "other": "Ukjente argumenter: %s"
- },
- "Invalid values:": "Ugyldige verdier:",
- "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s",
- "Argument check failed: %s": "Argumentsjekk mislyktes: %s",
- "Implications failed:": "Konsekvensene mislyktes:",
- "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s",
- "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s",
- "Path to JSON config file": "Bane til JSON konfigurasjonsfil",
- "Show help": "Vis hjelp",
- "Show version number": "Vis versjonsnummer"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/nl.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/nl.json
deleted file mode 100644
index 9ff95c5..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/nl.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "Commands:": "Commando's:",
- "Options:": "Opties:",
- "Examples:": "Voorbeelden:",
- "boolean": "booleaans",
- "count": "aantal",
- "string": "string",
- "number": "getal",
- "array": "lijst",
- "required": "verplicht",
- "default": "standaard",
- "default:": "standaard:",
- "choices:": "keuzes:",
- "aliases:": "aliassen:",
- "generated-value": "gegenereerde waarde",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig",
- "other": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s",
- "other": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s"
- },
- "Missing argument value: %s": {
- "one": "Missende argumentwaarde: %s",
- "other": "Missende argumentwaarden: %s"
- },
- "Missing required argument: %s": {
- "one": "Missend verplicht argument: %s",
- "other": "Missende verplichte argumenten: %s"
- },
- "Unknown argument: %s": {
- "one": "Onbekend argument: %s",
- "other": "Onbekende argumenten: %s"
- },
- "Invalid values:": "Ongeldige waarden:",
- "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s",
- "Argument check failed: %s": "Argumentcontrole mislukt: %s",
- "Implications failed:": "Ontbrekende afhankelijke argumenten:",
- "Not enough arguments following: %s": "Niet genoeg argumenten na: %s",
- "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s",
- "Path to JSON config file": "Pad naar JSON-config-bestand",
- "Show help": "Toon help",
- "Show version number": "Toon versienummer",
- "Did you mean %s?": "Bedoelde u misschien %s?",
- "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden",
- "Positionals:": "Positie-afhankelijke argumenten",
- "command": "commando"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/nn.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/nn.json
deleted file mode 100644
index 24479ac..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/nn.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "Commands:": "Kommandoar:",
- "Options:": "Alternativ:",
- "Examples:": "Døme:",
- "boolean": "boolsk",
- "count": "mengd",
- "string": "streng",
- "number": "nummer",
- "array": "matrise",
- "required": "obligatorisk",
- "default": "standard",
- "default:": "standard:",
- "choices:": "val:",
- "generated-value": "generert-verdi",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s",
- "other": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "For mange ikkje-alternativ argument: fekk %s, maksimum %s",
- "other": "For mange ikkje-alternativ argument: fekk %s, maksimum %s"
- },
- "Missing argument value: %s": {
- "one": "Manglar argumentverdi: %s",
- "other": "Manglar argumentverdiar: %s"
- },
- "Missing required argument: %s": {
- "one": "Manglar obligatorisk argument: %s",
- "other": "Manglar obligatoriske argument: %s"
- },
- "Unknown argument: %s": {
- "one": "Ukjent argument: %s",
- "other": "Ukjende argument: %s"
- },
- "Invalid values:": "Ugyldige verdiar:",
- "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s",
- "Argument check failed: %s": "Argumentsjekk mislukkast: %s",
- "Implications failed:": "Konsekvensane mislukkast:",
- "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s",
- "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s",
- "Path to JSON config file": "Bane til JSON konfigurasjonsfil",
- "Show help": "Vis hjelp",
- "Show version number": "Vis versjonsnummer"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/pirate.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/pirate.json
deleted file mode 100644
index dcb5cb7..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/pirate.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Commands:": "Choose yer command:",
- "Options:": "Options for me hearties!",
- "Examples:": "Ex. marks the spot:",
- "required": "requi-yar-ed",
- "Missing required argument: %s": {
- "one": "Ye be havin' to set the followin' argument land lubber: %s",
- "other": "Ye be havin' to set the followin' arguments land lubber: %s"
- },
- "Show help": "Parlay this here code of conduct",
- "Show version number": "'Tis the version ye be askin' fer",
- "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/pl.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/pl.json
deleted file mode 100644
index a41d4bd..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/pl.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "Commands:": "Polecenia:",
- "Options:": "Opcje:",
- "Examples:": "Przykłady:",
- "boolean": "boolean",
- "count": "ilość",
- "string": "ciąg znaków",
- "number": "liczba",
- "array": "tablica",
- "required": "wymagany",
- "default": "domyślny",
- "default:": "domyślny:",
- "choices:": "dostępne:",
- "aliases:": "aliasy:",
- "generated-value": "wygenerowana-wartość",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s",
- "other": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s",
- "other": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s"
- },
- "Missing argument value: %s": {
- "one": "Brak wartości dla argumentu: %s",
- "other": "Brak wartości dla argumentów: %s"
- },
- "Missing required argument: %s": {
- "one": "Brak wymaganego argumentu: %s",
- "other": "Brak wymaganych argumentów: %s"
- },
- "Unknown argument: %s": {
- "one": "Nieznany argument: %s",
- "other": "Nieznane argumenty: %s"
- },
- "Invalid values:": "Nieprawidłowe wartości:",
- "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s",
- "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s",
- "Implications failed:": "Założenia nie zostały spełnione:",
- "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s",
- "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s",
- "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON",
- "Show help": "Pokaż pomoc",
- "Show version number": "Pokaż numer wersji",
- "Did you mean %s?": "Czy chodziło Ci o %s?",
- "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają",
- "Positionals:": "Pozycyjne:",
- "command": "polecenie"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/pt.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/pt.json
deleted file mode 100644
index 0c8ac99..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/pt.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "Commands:": "Comandos:",
- "Options:": "Opções:",
- "Examples:": "Exemplos:",
- "boolean": "boolean",
- "count": "contagem",
- "string": "cadeia de caracteres",
- "number": "número",
- "array": "arranjo",
- "required": "requerido",
- "default": "padrão",
- "default:": "padrão:",
- "choices:": "escolhas:",
- "generated-value": "valor-gerado",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s",
- "other": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Excesso de argumentos não opcionais: recebido %s, máximo de %s",
- "other": "Excesso de argumentos não opcionais: recebido %s, máximo de %s"
- },
- "Missing argument value: %s": {
- "one": "Falta valor de argumento: %s",
- "other": "Falta valores de argumento: %s"
- },
- "Missing required argument: %s": {
- "one": "Falta argumento obrigatório: %s",
- "other": "Faltando argumentos obrigatórios: %s"
- },
- "Unknown argument: %s": {
- "one": "Argumento desconhecido: %s",
- "other": "Argumentos desconhecidos: %s"
- },
- "Invalid values:": "Valores inválidos:",
- "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s",
- "Argument check failed: %s": "Verificação de argumento falhou: %s",
- "Implications failed:": "Implicações falharam:",
- "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s",
- "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s",
- "Path to JSON config file": "Caminho para o arquivo de configuração em JSON",
- "Show help": "Mostra ajuda",
- "Show version number": "Mostra número de versão",
- "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/pt_BR.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/pt_BR.json
deleted file mode 100644
index eae1ec6..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/pt_BR.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "Commands:": "Comandos:",
- "Options:": "Opções:",
- "Examples:": "Exemplos:",
- "boolean": "booleano",
- "count": "contagem",
- "string": "string",
- "number": "número",
- "array": "array",
- "required": "obrigatório",
- "default:": "padrão:",
- "choices:": "opções:",
- "aliases:": "sinônimos:",
- "generated-value": "valor-gerado",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s",
- "other": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Excesso de argumentos: recebido %s, máximo de %s",
- "other": "Excesso de argumentos: recebido %s, máximo de %s"
- },
- "Missing argument value: %s": {
- "one": "Falta valor de argumento: %s",
- "other": "Falta valores de argumento: %s"
- },
- "Missing required argument: %s": {
- "one": "Falta argumento obrigatório: %s",
- "other": "Faltando argumentos obrigatórios: %s"
- },
- "Unknown argument: %s": {
- "one": "Argumento desconhecido: %s",
- "other": "Argumentos desconhecidos: %s"
- },
- "Invalid values:": "Valores inválidos:",
- "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s",
- "Argument check failed: %s": "Verificação de argumento falhou: %s",
- "Implications failed:": "Implicações falharam:",
- "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s",
- "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s",
- "Path to JSON config file": "Caminho para o arquivo JSON de configuração",
- "Show help": "Exibe ajuda",
- "Show version number": "Exibe a versão",
- "Did you mean %s?": "Você quis dizer %s?",
- "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos",
- "Positionals:": "Posicionais:",
- "command": "comando"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/ru.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/ru.json
deleted file mode 100644
index d5c9e32..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/ru.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "Commands:": "Команды:",
- "Options:": "Опции:",
- "Examples:": "Примеры:",
- "boolean": "булевый тип",
- "count": "подсчет",
- "string": "строковой тип",
- "number": "число",
- "array": "массив",
- "required": "необходимо",
- "default": "по умолчанию",
- "default:": "по умолчанию:",
- "choices:": "возможности:",
- "aliases:": "алиасы:",
- "generated-value": "генерированное значение",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s",
- "other": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s",
- "other": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s"
- },
- "Missing argument value: %s": {
- "one": "Не хватает значения аргумента: %s",
- "other": "Не хватает значений аргументов: %s"
- },
- "Missing required argument: %s": {
- "one": "Не хватает необходимого аргумента: %s",
- "other": "Не хватает необходимых аргументов: %s"
- },
- "Unknown argument: %s": {
- "one": "Неизвестный аргумент: %s",
- "other": "Неизвестные аргументы: %s"
- },
- "Invalid values:": "Недействительные значения:",
- "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s",
- "Argument check failed: %s": "Проверка аргументов не удалась: %s",
- "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:",
- "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s",
- "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s",
- "Path to JSON config file": "Путь к файлу конфигурации JSON",
- "Show help": "Показать помощь",
- "Show version number": "Показать номер версии",
- "Did you mean %s?": "Вы имели в виду %s?",
- "Arguments %s and %s are mutually exclusive": "Аргументы %s и %s являются взаимоисключающими",
- "Positionals:": "Позиционные аргументы:",
- "command": "команда",
- "deprecated": "устар.",
- "deprecated: %s": "устар.: %s"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/th.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/th.json
deleted file mode 100644
index 33b048e..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/th.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "Commands:": "คอมมาน",
- "Options:": "ออฟชั่น",
- "Examples:": "ตัวอย่าง",
- "boolean": "บูลีน",
- "count": "นับ",
- "string": "สตริง",
- "number": "ตัวเลข",
- "array": "อาเรย์",
- "required": "จำเป็น",
- "default": "ค่าเริ่มต้",
- "default:": "ค่าเริ่มต้น",
- "choices:": "ตัวเลือก",
- "aliases:": "เอเลียส",
- "generated-value": "ค่าที่ถูกสร้างขึ้น",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า",
- "other": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า",
- "other": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า"
- },
- "Missing argument value: %s": {
- "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s",
- "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s"
- },
- "Missing required argument: %s": {
- "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s",
- "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s"
- },
- "Unknown argument: %s": {
- "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s",
- "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s"
- },
- "Invalid values:": "ค่าไม่ถูกต้อง:",
- "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s",
- "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s",
- "Implications failed:": "Implications ไม่สำเร็จ:",
- "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s",
- "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s",
- "Path to JSON config file": "พาทไฟล์คอนฟิค JSON",
- "Show help": "ขอความช่วยเหลือ",
- "Show version number": "แสดงตัวเลขเวอร์ชั่น",
- "Did you mean %s?": "คุณหมายถึง %s?"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/tr.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/tr.json
deleted file mode 100644
index 0d0d2cc..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/tr.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "Commands:": "Komutlar:",
- "Options:": "Seçenekler:",
- "Examples:": "Örnekler:",
- "boolean": "boolean",
- "count": "sayı",
- "string": "string",
- "number": "numara",
- "array": "array",
- "required": "zorunlu",
- "default": "varsayılan",
- "default:": "varsayılan:",
- "choices:": "seçimler:",
- "aliases:": "takma adlar:",
- "generated-value": "oluşturulan-değer",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli",
- "other": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s",
- "other": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s"
- },
- "Missing argument value: %s": {
- "one": "Eksik argüman değeri: %s",
- "other": "Eksik argüman değerleri: %s"
- },
- "Missing required argument: %s": {
- "one": "Eksik zorunlu argüman: %s",
- "other": "Eksik zorunlu argümanlar: %s"
- },
- "Unknown argument: %s": {
- "one": "Bilinmeyen argüman: %s",
- "other": "Bilinmeyen argümanlar: %s"
- },
- "Invalid values:": "Geçersiz değerler:",
- "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s",
- "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s",
- "Implications failed:": "Sonuçlar başarısız oldu:",
- "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı",
- "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s",
- "Path to JSON config file": "JSON yapılandırma dosya konumu",
- "Show help": "Yardım detaylarını göster",
- "Show version number": "Versiyon detaylarını göster",
- "Did you mean %s?": "Bunu mu demek istediniz: %s?",
- "Positionals:": "Sıralılar:",
- "command": "komut"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/uk_UA.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/uk_UA.json
deleted file mode 100644
index 0af0e99..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/uk_UA.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "Commands:": "Команди:",
- "Options:": "Опції:",
- "Examples:": "Приклади:",
- "boolean": "boolean",
- "count": "кількість",
- "string": "строка",
- "number": "число",
- "array": "масива",
- "required": "обов'язково",
- "default": "за замовчуванням",
- "default:": "за замовчуванням:",
- "choices:": "доступні варіанти:",
- "aliases:": "псевдоніми:",
- "generated-value": "згенероване значення",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "Недостатньо аргументів: наразі %s, потрібно %s або більше",
- "other": "Недостатньо аргументів: наразі %s, потрібно %s або більше"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "Забагато аргументів: наразі %s, максимум %s",
- "other": "Too many non-option arguments: наразі %s, максимум of %s"
- },
- "Missing argument value: %s": {
- "one": "Відсутнє значення для аргументу: %s",
- "other": "Відсутні значення для аргументу: %s"
- },
- "Missing required argument: %s": {
- "one": "Відсутній обов'язковий аргумент: %s",
- "other": "Відсутні обов'язкові аргументи: %s"
- },
- "Unknown argument: %s": {
- "one": "Аргумент %s не підтримується",
- "other": "Аргументи %s не підтримуються"
- },
- "Invalid values:": "Некоректні значення:",
- "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Введено: %s, Доступні варіанти: %s",
- "Argument check failed: %s": "Аргумент не пройшов перевірку: %s",
- "Implications failed:": "Відсутні залежні аргументи:",
- "Not enough arguments following: %s": "Не достатньо аргументів після: %s",
- "Invalid JSON config file: %s": "Некоректний JSON-файл конфігурації: %s",
- "Path to JSON config file": "Шлях до JSON-файлу конфігурації",
- "Show help": "Показати довідку",
- "Show version number": "Показати версію",
- "Did you mean %s?": "Можливо, ви мали на увазі %s?",
- "Arguments %s and %s are mutually exclusive" : "Аргументи %s та %s взаємовиключні",
- "Positionals:": "Позиційні:",
- "command": "команда",
- "deprecated": "застарілий",
- "deprecated: %s": "застарілий: %s"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/uz.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/uz.json
deleted file mode 100644
index 0d07168..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/uz.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "Commands:": "Buyruqlar:",
- "Options:": "Imkoniyatlar:",
- "Examples:": "Misollar:",
- "boolean": "boolean",
- "count": "sanoq",
- "string": "satr",
- "number": "raqam",
- "array": "massiv",
- "required": "majburiy",
- "default": "boshlang'ich",
- "default:": "boshlang'ich:",
- "choices:": "tanlovlar:",
- "aliases:": "taxalluslar:",
- "generated-value": "yaratilgan-qiymat",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s",
- "other": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "No-imkoniyat argumentlar juda ko'p: berilgan %s, maksimum %s",
- "other": "No-imkoniyat argumentlar juda ko'p: got %s, maksimum %s"
- },
- "Missing argument value: %s": {
- "one": "Argument qiymati berilmagan: %s",
- "other": "Argument qiymatlari berilmagan: %s"
- },
- "Missing required argument: %s": {
- "one": "Majburiy argument berilmagan: %s",
- "other": "Majburiy argumentlar berilmagan: %s"
- },
- "Unknown argument: %s": {
- "one": "Noma'lum argument berilmagan: %s",
- "other": "Noma'lum argumentlar berilmagan: %s"
- },
- "Invalid values:": "Nosoz qiymatlar:",
- "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Berilgan: %s, Tanlovlar: %s",
- "Argument check failed: %s": "Muvaffaqiyatsiz argument tekshiruvi: %s",
- "Implications failed:": "Bog'liq argumentlar berilmagan:",
- "Not enough arguments following: %s": "Quyidagi argumentlar yetarli emas: %s",
- "Invalid JSON config file: %s": "Nosoz JSON konfiguratsiya fayli: %s",
- "Path to JSON config file": "JSON konfiguratsiya fayli joylashuvi",
- "Show help": "Yordam ko'rsatish",
- "Show version number": "Versiyani ko'rsatish",
- "Did you mean %s?": "%s ni nazarda tutyapsizmi?",
- "Arguments %s and %s are mutually exclusive" : "%s va %s argumentlari alohida",
- "Positionals:": "Positsionallar:",
- "command": "buyruq",
- "deprecated": "eskirgan",
- "deprecated: %s": "eskirgan: %s"
- }
-
\ No newline at end of file
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/zh_CN.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/zh_CN.json
deleted file mode 100644
index 257d26b..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/zh_CN.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "Commands:": "命令:",
- "Options:": "选项:",
- "Examples:": "示例:",
- "boolean": "布尔",
- "count": "计数",
- "string": "字符串",
- "number": "数字",
- "array": "数组",
- "required": "必需",
- "default": "默认值",
- "default:": "默认值:",
- "choices:": "可选值:",
- "generated-value": "生成的值",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个",
- "other": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个",
- "other": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个"
- },
- "Missing argument value: %s": {
- "one": "没有给此选项指定值:%s",
- "other": "没有给这些选项指定值:%s"
- },
- "Missing required argument: %s": {
- "one": "缺少必须的选项:%s",
- "other": "缺少这些必须的选项:%s"
- },
- "Unknown argument: %s": {
- "one": "无法识别的选项:%s",
- "other": "无法识别这些选项:%s"
- },
- "Invalid values:": "无效的选项值:",
- "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s",
- "Argument check failed: %s": "选项值验证失败:%s",
- "Implications failed:": "缺少依赖的选项:",
- "Not enough arguments following: %s": "没有提供足够的值给此选项:%s",
- "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s",
- "Path to JSON config file": "JSON 配置文件的路径",
- "Show help": "显示帮助信息",
- "Show version number": "显示版本号",
- "Did you mean %s?": "是指 %s?",
- "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的",
- "Positionals:": "位置:",
- "command": "命令"
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/locales/zh_TW.json b/node_modules/@puppeteer/replay/node_modules/yargs/locales/zh_TW.json
deleted file mode 100644
index e38495d..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/locales/zh_TW.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "Commands:": "命令:",
- "Options:": "選項:",
- "Examples:": "範例:",
- "boolean": "布林",
- "count": "次數",
- "string": "字串",
- "number": "數字",
- "array": "陣列",
- "required": "必填",
- "default": "預設值",
- "default:": "預設值:",
- "choices:": "可選值:",
- "aliases:": "別名:",
- "generated-value": "生成的值",
- "Not enough non-option arguments: got %s, need at least %s": {
- "one": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個",
- "other": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個"
- },
- "Too many non-option arguments: got %s, maximum of %s": {
- "one": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個",
- "other": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個"
- },
- "Missing argument value: %s": {
- "one": "此引數無指定值:%s",
- "other": "這些引數無指定值:%s"
- },
- "Missing required argument: %s": {
- "one": "缺少必須的引數:%s",
- "other": "缺少這些必須的引數:%s"
- },
- "Unknown argument: %s": {
- "one": "未知的引數:%s",
- "other": "未知的引數:%s"
- },
- "Invalid values:": "無效的選項值:",
- "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s",
- "Argument check failed: %s": "引數驗證失敗:%s",
- "Implications failed:": "缺少依賴引數:",
- "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s",
- "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s",
- "Path to JSON config file": "JSON 設置文件的路徑",
- "Show help": "顯示說明",
- "Show version number": "顯示版本",
- "Did you mean %s?": "您是指 %s 嗎?",
- "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 互斥",
- "Positionals:": "位置:",
- "command": "命令",
- "deprecated": "已淘汰",
- "deprecated: %s": "已淘汰:%s"
- }
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/package.json b/node_modules/@puppeteer/replay/node_modules/yargs/package.json
deleted file mode 100644
index 389cc6b..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/package.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "name": "yargs",
- "version": "17.7.2",
- "description": "yargs the modern, pirate-themed, successor to optimist.",
- "main": "./index.cjs",
- "exports": {
- "./package.json": "./package.json",
- ".": [
- {
- "import": "./index.mjs",
- "require": "./index.cjs"
- },
- "./index.cjs"
- ],
- "./helpers": {
- "import": "./helpers/helpers.mjs",
- "require": "./helpers/index.js"
- },
- "./browser": {
- "import": "./browser.mjs",
- "types": "./browser.d.ts"
- },
- "./yargs": [
- {
- "import": "./yargs.mjs",
- "require": "./yargs"
- },
- "./yargs"
- ]
- },
- "type": "module",
- "module": "./index.mjs",
- "contributors": [
- {
- "name": "Yargs Contributors",
- "url": "https://github.com/yargs/yargs/graphs/contributors"
- }
- ],
- "files": [
- "browser.mjs",
- "browser.d.ts",
- "index.cjs",
- "helpers/*.js",
- "helpers/*",
- "index.mjs",
- "yargs",
- "yargs.mjs",
- "build",
- "locales",
- "LICENSE",
- "lib/platform-shims/*.mjs",
- "!*.d.ts",
- "!**/*.d.ts"
- ],
- "dependencies": {
- "cliui": "^8.0.1",
- "escalade": "^3.1.1",
- "get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.3",
- "y18n": "^5.0.5",
- "yargs-parser": "^21.1.1"
- },
- "devDependencies": {
- "@types/chai": "^4.2.11",
- "@types/mocha": "^9.0.0",
- "@types/node": "^18.0.0",
- "c8": "^7.7.0",
- "chai": "^4.2.0",
- "chalk": "^4.0.0",
- "coveralls": "^3.0.9",
- "cpr": "^3.0.1",
- "cross-env": "^7.0.2",
- "cross-spawn": "^7.0.0",
- "eslint": "^7.23.0",
- "gts": "^3.0.0",
- "hashish": "0.0.4",
- "mocha": "^9.0.0",
- "rimraf": "^3.0.2",
- "rollup": "^2.23.0",
- "rollup-plugin-cleanup": "^3.1.1",
- "rollup-plugin-terser": "^7.0.2",
- "rollup-plugin-ts": "^2.0.4",
- "typescript": "^4.0.2",
- "which": "^2.0.0",
- "yargs-test-extends": "^1.0.1"
- },
- "scripts": {
- "fix": "gts fix && npm run fix:js",
- "fix:js": "eslint . --ext cjs --ext mjs --ext js --fix",
- "posttest": "npm run check",
- "test": "c8 mocha --enable-source-maps ./test/*.cjs --require ./test/before.cjs --timeout=12000 --check-leaks",
- "test:esm": "c8 mocha --enable-source-maps ./test/esm/*.mjs --check-leaks",
- "coverage": "c8 report --check-coverage",
- "prepare": "npm run compile",
- "pretest": "npm run compile -- -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs",
- "compile": "rimraf build && tsc",
- "postcompile": "npm run build:cjs",
- "build:cjs": "rollup -c rollup.config.cjs",
- "postbuild:cjs": "rimraf ./build/index.cjs.d.ts",
- "check": "gts lint && npm run check:js",
- "check:js": "eslint . --ext cjs --ext mjs --ext js",
- "clean": "gts clean"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/yargs/yargs.git"
- },
- "homepage": "https://yargs.js.org/",
- "keywords": [
- "argument",
- "args",
- "option",
- "parser",
- "parsing",
- "cli",
- "command"
- ],
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
-}
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/yargs b/node_modules/@puppeteer/replay/node_modules/yargs/yargs
deleted file mode 100644
index 8460d10..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/yargs
+++ /dev/null
@@ -1,9 +0,0 @@
-// TODO: consolidate on using a helpers file at some point in the future, which
-// is the approach currently used to export Parser and applyExtends for ESM:
-const {applyExtends, cjsPlatformShim, Parser, Yargs, processArgv} = require('./build/index.cjs')
-Yargs.applyExtends = (config, cwd, mergeExtends) => {
- return applyExtends(config, cwd, mergeExtends, cjsPlatformShim)
-}
-Yargs.hideBin = processArgv.hideBin
-Yargs.Parser = Parser
-module.exports = Yargs
diff --git a/node_modules/@puppeteer/replay/node_modules/yargs/yargs.mjs b/node_modules/@puppeteer/replay/node_modules/yargs/yargs.mjs
deleted file mode 100644
index 6d9f390..0000000
--- a/node_modules/@puppeteer/replay/node_modules/yargs/yargs.mjs
+++ /dev/null
@@ -1,10 +0,0 @@
-// TODO: consolidate on using a helpers file at some point in the future, which
-// is the approach currently used to export Parser and applyExtends for ESM:
-import pkg from './build/index.cjs';
-const {applyExtends, cjsPlatformShim, Parser, processArgv, Yargs} = pkg;
-Yargs.applyExtends = (config, cwd, mergeExtends) => {
- return applyExtends(config, cwd, mergeExtends, cjsPlatformShim);
-};
-Yargs.hideBin = processArgv.hideBin;
-Yargs.Parser = Parser;
-export default Yargs;
diff --git a/node_modules/@puppeteer/replay/package.json b/node_modules/@puppeteer/replay/package.json
deleted file mode 100644
index c38ffdf..0000000
--- a/node_modules/@puppeteer/replay/package.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "name": "@puppeteer/replay",
- "version": "2.13.4",
- "description": "Replay is a library which provides an API to replay and stringify recordings created using Chrome DevTools Recorder](https://developer.chrome.com/docs/devtools/recorder/)",
- "main": "lib/cjs/main.cjs",
- "types": "lib/main.d.ts",
- "bin": {
- "@puppeteer/replay": "lib/cli.js",
- "replay-extension-test": "lib/extension-test.js"
- },
- "exports": {
- ".": {
- "import": {
- "types": "./lib/main.d.ts",
- "default": "./lib/main.js"
- },
- "require": {
- "types": "./lib/cjs/main.d.cts",
- "default": "./lib/cjs/main.cjs"
- }
- }
- },
- "repository": "github:puppeteer/replay",
- "directories": {
- "doc": "docs"
- },
- "engines": {
- "node": ">=16.3.0"
- },
- "scripts": {
- "test": "npm run build:testserver && cross-env TS_NODE_PROJECT=test/tsconfig.json mocha --config .mocharc.cjs",
- "test:headful": "cross-env PUPPETEER_HEADFUL=true npm run test",
- "test:coverage": "c8 npm run test",
- "test:fast": "npm run test -- --ignore=test/e2e/**/*",
- "lint": "npm run lint:format",
- "lint:format": "prettier --check . && npm run eslint",
- "format": "prettier --write . && eslint --ext js --ext ts --fix .",
- "eslint": "([ \"$CI\" = true ] && eslint --ext js --ext ts --quiet -f codeframe . || eslint --ext js --ext ts .)",
- "docs": "typedoc --tsconfig docs.tsconfig.json --readme none --gitRevision main --externalPattern --excludeExternals --excludeProtected --excludePrivate --plugin typedoc-plugin-markdown --out docs/api src/main.ts && npm run format",
- "clean": "rimraf lib",
- "build": "npm run clean && rollup --config rollup.config.cjs",
- "build:testserver": "cd third_party/testserver && npm run build"
- },
- "files": [
- "lib",
- "!lib/**/*.d.ts",
- "!lib/**/*.d.ts.map",
- "lib/main.d.ts",
- "lib/cjs/main.d.cts"
- ],
- "author": "Chrome DevTools authors",
- "license": "Apache-2.0",
- "type": "module",
- "devDependencies": {
- "@rollup/plugin-commonjs": "25.0.4",
- "@rollup/plugin-node-resolve": "15.2.1",
- "@rollup/plugin-typescript": "11.1.3",
- "@types/chai": "4.3.6",
- "@types/cssesc": "^3.0.0",
- "@types/mime": "3.0.1",
- "@types/mocha": "10.0.1",
- "@types/node": "20.6.2",
- "@types/ws": "8.5.5",
- "@types/yargs": "17.0.24",
- "@typescript-eslint/eslint-plugin": "6.7.2",
- "@typescript-eslint/parser": "6.7.2",
- "c8": "8.0.1",
- "chai": "4.3.8",
- "cross-env": "7.0.3",
- "eslint": "8.49.0",
- "eslint-config-google": "0.14.0",
- "eslint-config-prettier": "9.0.0",
- "eslint-plugin-prettier": "5.0.0",
- "eslint-plugin-tsdoc": "0.2.17",
- "lighthouse": "^11.1.0",
- "mime": "3.0.0",
- "mocha": "10.2.0",
- "prettier": "3.0.3",
- "puppeteer": "21.3.0",
- "puppeteer-core": "21.3.0",
- "rimraf": "5.0.1",
- "rollup": "3.29.2",
- "rollup-plugin-dts": "6.0.2",
- "snap-shot-it": "7.9.10",
- "ts-node": "10.9.1",
- "tslib": "2.6.2",
- "typedoc": "0.25.1",
- "typedoc-plugin-markdown": "3.16.0",
- "typescript": "5.2.2"
- },
- "peerDependencies": {
- "lighthouse": ">=10.0.0",
- "puppeteer": ">=21.0.1"
- },
- "peerDependenciesMeta": {
- "puppeteer": {
- "optional": true
- },
- "lighthouse": {
- "optional": true
- }
- },
- "dependencies": {
- "cli-table3": "0.6.3",
- "colorette": "2.0.20",
- "yargs": "17.7.2"
- }
-}