add hw2
This commit is contained in:
11
node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.d.ts
generated
vendored
Normal file
11
node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
import type { Configuration } from 'puppeteer-core';
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const getConfiguration: () => Configuration;
|
||||
//# sourceMappingURL=getConfiguration.d.ts.map
|
||||
1
node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.d.ts.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getConfiguration.d.ts","sourceRoot":"","sources":["../../../src/getConfiguration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAGV,aAAa,EAGd,MAAM,gBAAgB,CAAC;AAkGxB;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,aAgDnC,CAAC"}
|
||||
126
node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.js
generated
vendored
Normal file
126
node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.js
generated
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getConfiguration = void 0;
|
||||
const os_1 = require("os");
|
||||
const path_1 = require("path");
|
||||
const cosmiconfig_1 = require("cosmiconfig");
|
||||
function getBooleanEnvVar(name) {
|
||||
const env = process.env[name];
|
||||
if (env === undefined) {
|
||||
return;
|
||||
}
|
||||
switch (env.toLowerCase()) {
|
||||
case '':
|
||||
case '0':
|
||||
case 'false':
|
||||
case 'off':
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function isSupportedBrowser(product) {
|
||||
switch (product) {
|
||||
case 'chrome':
|
||||
case 'firefox':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function getDefaultBrowser(browser) {
|
||||
// Validate configuration.
|
||||
if (browser && !isSupportedBrowser(browser)) {
|
||||
throw new Error(`Unsupported browser ${browser}`);
|
||||
}
|
||||
switch (browser) {
|
||||
case 'firefox':
|
||||
return 'firefox';
|
||||
default:
|
||||
return 'chrome';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function getLogLevel(logLevel) {
|
||||
switch (logLevel) {
|
||||
case 'silent':
|
||||
return 'silent';
|
||||
case 'error':
|
||||
return 'error';
|
||||
default:
|
||||
return 'warn';
|
||||
}
|
||||
}
|
||||
function getBrowserSetting(browser, configuration, defaultConfig = {}) {
|
||||
if (configuration.skipDownload) {
|
||||
return {
|
||||
skipDownload: true,
|
||||
};
|
||||
}
|
||||
const browserSetting = {};
|
||||
const browserEnvName = browser.replaceAll('-', '_').toUpperCase();
|
||||
browserSetting.version =
|
||||
process.env[`PUPPETEER_${browserEnvName}_VERSION`] ??
|
||||
configuration[browser]?.version ??
|
||||
defaultConfig.version;
|
||||
browserSetting.downloadBaseUrl =
|
||||
process.env[`PUPPETEER_${browserEnvName}_DOWNLOAD_BASE_URL`] ??
|
||||
configuration[browser]?.downloadBaseUrl ??
|
||||
defaultConfig.downloadBaseUrl;
|
||||
browserSetting.skipDownload =
|
||||
getBooleanEnvVar(`PUPPETEER_${browserEnvName}_SKIP_DOWNLOAD`) ??
|
||||
getBooleanEnvVar(`PUPPETEER_SKIP_${browserEnvName}_DOWNLOAD`) ??
|
||||
configuration[browser]?.skipDownload ??
|
||||
defaultConfig.skipDownload;
|
||||
return browserSetting;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const getConfiguration = () => {
|
||||
const result = (0, cosmiconfig_1.cosmiconfigSync)('puppeteer', {
|
||||
searchStrategy: 'global',
|
||||
}).search();
|
||||
const configuration = result ? result.config : {};
|
||||
configuration.logLevel = getLogLevel(process.env['PUPPETEER_LOGLEVEL'] ?? configuration.logLevel);
|
||||
// Merging environment variables.
|
||||
configuration.defaultBrowser = getDefaultBrowser(process.env['PUPPETEER_BROWSER'] ?? configuration.defaultBrowser);
|
||||
configuration.executablePath =
|
||||
process.env['PUPPETEER_EXECUTABLE_PATH'] ?? configuration.executablePath;
|
||||
// Default to skipDownload if executablePath is set
|
||||
if (configuration.executablePath) {
|
||||
configuration.skipDownload = true;
|
||||
}
|
||||
// Set skipDownload explicitly or from default
|
||||
configuration.skipDownload =
|
||||
getBooleanEnvVar('PUPPETEER_SKIP_DOWNLOAD') ?? configuration.skipDownload;
|
||||
// Prepare variables used in browser downloading
|
||||
configuration.chrome = getBrowserSetting('chrome', configuration);
|
||||
configuration['chrome-headless-shell'] = getBrowserSetting('chrome-headless-shell', configuration);
|
||||
configuration.firefox = getBrowserSetting('firefox', configuration, {
|
||||
skipDownload: true,
|
||||
});
|
||||
configuration.cacheDirectory =
|
||||
process.env['PUPPETEER_CACHE_DIR'] ??
|
||||
configuration.cacheDirectory ??
|
||||
(0, path_1.join)((0, os_1.homedir)(), '.cache', 'puppeteer');
|
||||
configuration.temporaryDirectory =
|
||||
process.env['PUPPETEER_TMP_DIR'] ?? configuration.temporaryDirectory;
|
||||
configuration.experiments ??= {};
|
||||
return configuration;
|
||||
};
|
||||
exports.getConfiguration = getConfiguration;
|
||||
//# sourceMappingURL=getConfiguration.js.map
|
||||
1
node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.js.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{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teer/node/cli.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
export {};
|
||||
//# sourceMappingURL=cli.d.ts.map
|
||||
1
node_modules/puppeteer/lib/cjs/puppeteer/node/cli.d.ts.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/cjs/puppeteer/node/cli.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/node/cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
|
||||
45
node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js
generated
vendored
Executable file
45
node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js
generated
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const browsers_1 = require("@puppeteer/browsers");
|
||||
const revisions_js_1 = require("puppeteer-core/internal/revisions.js");
|
||||
const puppeteer_js_1 = __importDefault(require("../puppeteer.js"));
|
||||
const cacheDir = puppeteer_js_1.default.configuration.cacheDirectory;
|
||||
void new browsers_1.CLI({
|
||||
cachePath: cacheDir,
|
||||
scriptName: 'puppeteer',
|
||||
prefixCommand: {
|
||||
cmd: 'browsers',
|
||||
description: 'Manage browsers of this Puppeteer installation',
|
||||
},
|
||||
allowCachePathOverride: false,
|
||||
pinnedBrowsers: {
|
||||
[browsers_1.Browser.CHROME]: {
|
||||
buildId: puppeteer_js_1.default.configuration.chrome?.version ||
|
||||
revisions_js_1.PUPPETEER_REVISIONS['chrome'] ||
|
||||
'latest',
|
||||
skipDownload: puppeteer_js_1.default.configuration.chrome?.skipDownload ?? false,
|
||||
},
|
||||
[browsers_1.Browser.FIREFOX]: {
|
||||
buildId: puppeteer_js_1.default.configuration.firefox?.version ||
|
||||
revisions_js_1.PUPPETEER_REVISIONS['firefox'] ||
|
||||
'latest',
|
||||
skipDownload: puppeteer_js_1.default.configuration.firefox?.skipDownload ?? true,
|
||||
},
|
||||
[browsers_1.Browser.CHROMEHEADLESSSHELL]: {
|
||||
buildId: puppeteer_js_1.default.configuration['chrome-headless-shell']?.version ||
|
||||
revisions_js_1.PUPPETEER_REVISIONS['chrome-headless-shell'] ||
|
||||
'latest',
|
||||
skipDownload: puppeteer_js_1.default.configuration['chrome-headless-shell']?.skipDownload ?? false,
|
||||
},
|
||||
},
|
||||
}).run(process.argv);
|
||||
//# sourceMappingURL=cli.js.map
|
||||
1
node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../src/node/cli.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;;;;;AAEH,kDAAiD;AACjD,uEAAyE;AAEzE,mEAAwC;AAExC,MAAM,QAAQ,GAAG,sBAAS,CAAC,aAAa,CAAC,cAAe,CAAC;AAEzD,KAAK,IAAI,cAAG,CAAC;IACX,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,WAAW;IACvB,aAAa,EAAE;QACb,GAAG,EAAE,UAAU;QACf,WAAW,EAAE,gDAAgD;KAC9D;IACD,sBAAsB,EAAE,KAAK;IAC7B,cAAc,EAAE;QACd,CAAC,kBAAO,CAAC,MAAM,CAAC,EAAE;YAChB,OAAO,EACL,sBAAS,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO;gBACvC,kCAAmB,CAAC,QAAQ,CAAC;gBAC7B,QAAQ;YACV,YAAY,EAAE,sBAAS,CAAC,aAAa,CAAC,MAAM,EAAE,YAAY,IAAI,KAAK;SACpE;QACD,CAAC,kBAAO,CAAC,OAAO,CAAC,EAAE;YACjB,OAAO,EACL,sBAAS,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO;gBACxC,kCAAmB,CAAC,SAAS,CAAC;gBAC9B,QAAQ;YACV,YAAY,EAAE,sBAAS,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,IAAI,IAAI;SACpE;QACD,CAAC,kBAAO,CAAC,mBAAmB,CAAC,EAAE;YAC7B,OAAO,EACL,sBAAS,CAAC,aAAa,CAAC,uBAAuB,CAAC,EAAE,OAAO;gBACzD,kCAAmB,CAAC,uBAAuB,CAAC;gBAC5C,QAAQ;YACV,YAAY,EACV,sBAAS,CAAC,aAAa,CAAC,uBAAuB,CAAC,EAAE,YAAY,IAAI,KAAK;SAC1E;KACF;CACF,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
||||
10
node_modules/puppeteer/lib/cjs/puppeteer/node/install.d.ts
generated
vendored
Normal file
10
node_modules/puppeteer/lib/cjs/puppeteer/node/install.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare function downloadBrowsers(): Promise<void>;
|
||||
//# sourceMappingURL=install.d.ts.map
|
||||
1
node_modules/puppeteer/lib/cjs/puppeteer/node/install.d.ts.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/cjs/puppeteer/node/install.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../src/node/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA4DH;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkEtD"}
|
||||
122
node_modules/puppeteer/lib/cjs/puppeteer/node/install.js
generated
vendored
Normal file
122
node_modules/puppeteer/lib/cjs/puppeteer/node/install.js
generated
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.downloadBrowsers = downloadBrowsers;
|
||||
const browsers_1 = require("@puppeteer/browsers");
|
||||
const revisions_js_1 = require("puppeteer-core/internal/revisions.js");
|
||||
const getConfiguration_js_1 = require("../getConfiguration.js");
|
||||
async function downloadBrowser({ browser, configuration, cacheDir, platform, }) {
|
||||
const unresolvedBuildId = configuration?.version || revisions_js_1.PUPPETEER_REVISIONS[browser] || 'latest';
|
||||
const baseUrl = configuration?.downloadBaseUrl;
|
||||
const buildId = await (0, browsers_1.resolveBuildId)(browser, platform, unresolvedBuildId);
|
||||
try {
|
||||
const result = await (0, browsers_1.install)({
|
||||
browser,
|
||||
cacheDir,
|
||||
platform,
|
||||
buildId,
|
||||
downloadProgressCallback: (0, browsers_1.makeProgressCallback)(browser, buildId),
|
||||
baseUrl,
|
||||
buildIdAlias: buildId !== unresolvedBuildId ? unresolvedBuildId : undefined,
|
||||
});
|
||||
logPolitely(`${browser} (${result.buildId}) downloaded to ${result.path}`);
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error(`ERROR: Failed to set up ${browser} v${buildId}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.`, {
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
async function downloadBrowsers() {
|
||||
overrideProxy();
|
||||
const configuration = (0, getConfiguration_js_1.getConfiguration)();
|
||||
if (configuration.skipDownload) {
|
||||
logPolitely('**INFO** Skipping downloading browsers as instructed.');
|
||||
return;
|
||||
}
|
||||
const platform = (0, browsers_1.detectBrowserPlatform)();
|
||||
if (!platform) {
|
||||
throw new Error('The current platform is not supported.');
|
||||
}
|
||||
const cacheDir = configuration.cacheDirectory;
|
||||
const installationJobs = [];
|
||||
if (configuration.chrome?.skipDownload) {
|
||||
logPolitely('**INFO** Skipping Chrome download as instructed.');
|
||||
}
|
||||
else {
|
||||
const browser = browsers_1.Browser.CHROME;
|
||||
installationJobs.push(downloadBrowser({
|
||||
browser,
|
||||
configuration: configuration[browser] ?? {},
|
||||
cacheDir,
|
||||
platform,
|
||||
}));
|
||||
}
|
||||
if (configuration['chrome-headless-shell']?.skipDownload) {
|
||||
logPolitely('**INFO** Skipping Chrome download as instructed.');
|
||||
}
|
||||
else {
|
||||
const browser = browsers_1.Browser.CHROMEHEADLESSSHELL;
|
||||
installationJobs.push(downloadBrowser({
|
||||
browser,
|
||||
configuration: configuration[browser] ?? {},
|
||||
cacheDir,
|
||||
platform,
|
||||
}));
|
||||
}
|
||||
if (configuration.firefox?.skipDownload) {
|
||||
logPolitely('**INFO** Skipping Firefox download as instructed.');
|
||||
}
|
||||
else {
|
||||
const browser = browsers_1.Browser.FIREFOX;
|
||||
installationJobs.push(downloadBrowser({
|
||||
browser,
|
||||
configuration: configuration[browser] ?? {},
|
||||
cacheDir,
|
||||
platform,
|
||||
}));
|
||||
}
|
||||
try {
|
||||
await Promise.all(installationJobs);
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function logPolitely(toBeLogged) {
|
||||
const logLevel = process.env['npm_config_loglevel'] || '';
|
||||
const logLevelDisplay = ['silent', 'error', 'warn'].indexOf(logLevel) > -1;
|
||||
if (!logLevelDisplay) {
|
||||
console.log(toBeLogged);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function overrideProxy() {
|
||||
// Override current environment proxy settings with npm configuration, if any.
|
||||
const NPM_HTTPS_PROXY = process.env['npm_config_https_proxy'] || process.env['npm_config_proxy'];
|
||||
const NPM_HTTP_PROXY = process.env['npm_config_http_proxy'] || process.env['npm_config_proxy'];
|
||||
const NPM_NO_PROXY = process.env['npm_config_no_proxy'];
|
||||
if (NPM_HTTPS_PROXY) {
|
||||
process.env['HTTPS_PROXY'] = NPM_HTTPS_PROXY;
|
||||
}
|
||||
if (NPM_HTTP_PROXY) {
|
||||
process.env['HTTP_PROXY'] = NPM_HTTP_PROXY;
|
||||
}
|
||||
if (NPM_NO_PROXY) {
|
||||
process.env['NO_PROXY'] = NPM_NO_PROXY;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=install.js.map
|
||||
1
node_modules/puppeteer/lib/cjs/puppeteer/node/install.js.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/cjs/puppeteer/node/install.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../../src/node/install.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA+DH,4CAkEC;AA9HD,kDAM6B;AAM7B,uEAAyE;AAEzE,gEAAwD;AAExD,KAAK,UAAU,eAAe,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,QAAQ,EACR,QAAQ,GAST;IACC,MAAM,iBAAiB,GACrB,aAAa,EAAE,OAAO,IAAI,kCAAmB,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC;IACrE,MAAM,OAAO,GAAG,aAAa,EAAE,eAAe,CAAC;IAC/C,MAAM,OAAO,GAAG,MAAM,IAAA,yBAAc,EAAC,OAAO,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAE3E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAO,EAAC;YAC3B,OAAO;YACP,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,wBAAwB,EAAE,IAAA,+BAAoB,EAAC,OAAO,EAAE,OAAO,CAAC;YAChE,OA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Aa;IACpB,8EAA8E;IAC9E,MAAM,eAAe,GACnB,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC3E,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC1E,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAExD,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,eAAe,CAAC;IAC/C,CAAC;IACD,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,cAAc,CAAC;IAC7C,CAAC;IACD,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC;IACzC,CAAC;AACH,CAAC"}
|
||||
39
node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.d.ts
generated
vendored
Normal file
39
node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
export type { Protocol } from 'puppeteer-core';
|
||||
export * from 'puppeteer-core/internal/puppeteer-core.js';
|
||||
import * as PuppeteerCore from 'puppeteer-core/internal/puppeteer-core.js';
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
declare const puppeteer: PuppeteerCore.PuppeteerNode;
|
||||
export declare const
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
connect: (options: PuppeteerCore.ConnectOptions) => Promise<PuppeteerCore.Browser>,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
defaultArgs: (options?: PuppeteerCore.LaunchOptions) => string[],
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
executablePath: {
|
||||
(channel: PuppeteerCore.ChromeReleaseChannel): string;
|
||||
(options: PuppeteerCore.LaunchOptions): string;
|
||||
(): string;
|
||||
},
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
launch: (options?: PuppeteerCore.LaunchOptions) => Promise<PuppeteerCore.Browser>,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
trimCache: () => Promise<void>;
|
||||
export default puppeteer;
|
||||
//# sourceMappingURL=puppeteer.d.ts.map
|
||||
1
node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.d.ts.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"puppeteer.d.ts","sourceRoot":"","sources":["../../../src/puppeteer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAE7C,cAAc,2CAA2C,CAAC;AAE1D,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAM3E;;GAEG;AACH,QAAA,MAAM,SAAS,6BAGb,CAAC;AAEH,eAAO;AACL;;GAEG;AACH,OAAO;AACP;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,cAAc;;;;;AACd;;GAEG;AACH,MAAM;AACN;;GAEG;AACH,SAAS,qBACE,CAAC;AAEd,eAAe,SAAS,CAAC"}
|
||||
77
node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js
generated
vendored
Normal file
77
node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.trimCache = exports.launch = exports.executablePath = exports.defaultArgs = exports.connect = void 0;
|
||||
__exportStar(require("puppeteer-core/internal/puppeteer-core.js"), exports);
|
||||
const PuppeteerCore = __importStar(require("puppeteer-core/internal/puppeteer-core.js"));
|
||||
const getConfiguration_js_1 = require("./getConfiguration.js");
|
||||
const configuration = (0, getConfiguration_js_1.getConfiguration)();
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
const puppeteer = new PuppeteerCore.PuppeteerNode({
|
||||
isPuppeteerCore: false,
|
||||
configuration,
|
||||
});
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
exports.connect = puppeteer.connect,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
exports.defaultArgs = puppeteer.defaultArgs,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
exports.executablePath = puppeteer.executablePath,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
exports.launch = puppeteer.launch,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
exports.trimCache = puppeteer.trimCache;
|
||||
exports.default = puppeteer;
|
||||
//# sourceMappingURL=puppeteer.js.map
|
||||
1
node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"puppeteer.js","sourceRoot":"","sources":["../../../src/puppeteer.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,4EAA0D;AAE1D,yFAA2E;AAE3E,+DAAuD;AAEvD,MAAM,aAAa,GAAG,IAAA,sCAAgB,GAAE,CAAC;AAEzC;;GAEG;AACH,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC,aAAa,CAAC;IAChD,eAAe,EAAE,KAAK;IACtB,aAAa;CACd,CAAC,CAAC;AAGD;;GAEG;AACH,eAAO,GAiBL,SAAS;AAhBX;;GAEG;AACH,mBAAW,GAaT,SAAS;AAZX;;GAEG;AACH,sBAAc,GASZ,SAAS;AARX;;GAEG;AACH,cAAM,GAKJ,SAAS;AAJX;;GAEG;AACH,iBAAS,GACP,SAAS,WAAC;AAEd,kBAAe,SAAS,CAAC"}
|
||||
1
node_modules/puppeteer/lib/esm/package.json
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/package.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"type": "module"}
|
||||
11
node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.d.ts
generated
vendored
Normal file
11
node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
import type { Configuration } from 'puppeteer-core';
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const getConfiguration: () => Configuration;
|
||||
//# sourceMappingURL=getConfiguration.d.ts.map
|
||||
1
node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.d.ts.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getConfiguration.d.ts","sourceRoot":"","sources":["../../../src/getConfiguration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAGV,aAAa,EAGd,MAAM,gBAAgB,CAAC;AAkGxB;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,aAgDnC,CAAC"}
|
||||
122
node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.js
generated
vendored
Normal file
122
node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.js
generated
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
import { homedir } from 'os';
|
||||
import { join } from 'path';
|
||||
import { cosmiconfigSync } from 'cosmiconfig';
|
||||
function getBooleanEnvVar(name) {
|
||||
const env = process.env[name];
|
||||
if (env === undefined) {
|
||||
return;
|
||||
}
|
||||
switch (env.toLowerCase()) {
|
||||
case '':
|
||||
case '0':
|
||||
case 'false':
|
||||
case 'off':
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function isSupportedBrowser(product) {
|
||||
switch (product) {
|
||||
case 'chrome':
|
||||
case 'firefox':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function getDefaultBrowser(browser) {
|
||||
// Validate configuration.
|
||||
if (browser && !isSupportedBrowser(browser)) {
|
||||
throw new Error(`Unsupported browser ${browser}`);
|
||||
}
|
||||
switch (browser) {
|
||||
case 'firefox':
|
||||
return 'firefox';
|
||||
default:
|
||||
return 'chrome';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function getLogLevel(logLevel) {
|
||||
switch (logLevel) {
|
||||
case 'silent':
|
||||
return 'silent';
|
||||
case 'error':
|
||||
return 'error';
|
||||
default:
|
||||
return 'warn';
|
||||
}
|
||||
}
|
||||
function getBrowserSetting(browser, configuration, defaultConfig = {}) {
|
||||
if (configuration.skipDownload) {
|
||||
return {
|
||||
skipDownload: true,
|
||||
};
|
||||
}
|
||||
const browserSetting = {};
|
||||
const browserEnvName = browser.replaceAll('-', '_').toUpperCase();
|
||||
browserSetting.version =
|
||||
process.env[`PUPPETEER_${browserEnvName}_VERSION`] ??
|
||||
configuration[browser]?.version ??
|
||||
defaultConfig.version;
|
||||
browserSetting.downloadBaseUrl =
|
||||
process.env[`PUPPETEER_${browserEnvName}_DOWNLOAD_BASE_URL`] ??
|
||||
configuration[browser]?.downloadBaseUrl ??
|
||||
defaultConfig.downloadBaseUrl;
|
||||
browserSetting.skipDownload =
|
||||
getBooleanEnvVar(`PUPPETEER_${browserEnvName}_SKIP_DOWNLOAD`) ??
|
||||
getBooleanEnvVar(`PUPPETEER_SKIP_${browserEnvName}_DOWNLOAD`) ??
|
||||
configuration[browser]?.skipDownload ??
|
||||
defaultConfig.skipDownload;
|
||||
return browserSetting;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const getConfiguration = () => {
|
||||
const result = cosmiconfigSync('puppeteer', {
|
||||
searchStrategy: 'global',
|
||||
}).search();
|
||||
const configuration = result ? result.config : {};
|
||||
configuration.logLevel = getLogLevel(process.env['PUPPETEER_LOGLEVEL'] ?? configuration.logLevel);
|
||||
// Merging environment variables.
|
||||
configuration.defaultBrowser = getDefaultBrowser(process.env['PUPPETEER_BROWSER'] ?? configuration.defaultBrowser);
|
||||
configuration.executablePath =
|
||||
process.env['PUPPETEER_EXECUTABLE_PATH'] ?? configuration.executablePath;
|
||||
// Default to skipDownload if executablePath is set
|
||||
if (configuration.executablePath) {
|
||||
configuration.skipDownload = true;
|
||||
}
|
||||
// Set skipDownload explicitly or from default
|
||||
configuration.skipDownload =
|
||||
getBooleanEnvVar('PUPPETEER_SKIP_DOWNLOAD') ?? configuration.skipDownload;
|
||||
// Prepare variables used in browser downloading
|
||||
configuration.chrome = getBrowserSetting('chrome', configuration);
|
||||
configuration['chrome-headless-shell'] = getBrowserSetting('chrome-headless-shell', configuration);
|
||||
configuration.firefox = getBrowserSetting('firefox', configuration, {
|
||||
skipDownload: true,
|
||||
});
|
||||
configuration.cacheDirectory =
|
||||
process.env['PUPPETEER_CACHE_DIR'] ??
|
||||
configuration.cacheDirectory ??
|
||||
join(homedir(), '.cache', 'puppeteer');
|
||||
configuration.temporaryDirectory =
|
||||
process.env['PUPPETEER_TMP_DIR'] ?? configuration.temporaryDirectory;
|
||||
configuration.experiments ??= {};
|
||||
return configuration;
|
||||
};
|
||||
//# sourceMappingURL=getConfiguration.js.map
|
||||
1
node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.js.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getConfiguration.js","sourceRoot":"","sources":["../../../src/getConfiguration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,IAAI,CAAC;AAC3B,OAAO,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GAAG,iBAAiB,CAC9C,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,aAAa,CAAC,cAAc,CACjE,CAAC;IAEF,aAAa,CAAC,cAAc;QAC1B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,aAAa,CAAC,cAAc,CAAC;IAE3E,mDAAmD;IACnD,IAAI,aAAa,CAAC,cAAc,EAAE,CAAC;QACjC,aAAa,CAAC,YAAY,GAAG,IAAI,CAAC;IACpC,CAAC;IAED,8CAA8C;IAC9C,aAAa,CAAC,YAAY;QACxB,gBAAgB,CAAC,yBAAyB,CAAC,IAAI,aAAa,CAAC,YAAY,CAAC;IAE5E,gDAAgD;IAChD,aAAa,CAAC,MAAM,GAAG,iBAAiB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAClE,aAAa,CAAC,uBAAuB,CAAC,GAAG,iBAAiB,CACxD,uBAAuB,EACvB,aAAa,CACd,CAAC;IACF,aAAa,CAAC,OAAO,GAAG,iBAAiB,CAAC,SAAS,EAAE,aAAa,EAAE;QAClE,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;IAEH,aAAa,CAAC,cAAc;QAC1B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;YAClC,aAAa,CAAC,cAAc;YAC5B,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IAEzC,aAAa,CAAC,kBAAkB;QAC9B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,aAAa,CAAC,kBAAkB,CAAC;IAEvE,aAAa,CAAC,WAAW,KAAK,EAAE,CAAC;IAEjC,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC"}
|
||||
8
node_modules/puppeteer/lib/esm/puppeteer/node/cli.d.ts
generated
vendored
Normal file
8
node_modules/puppeteer/lib/esm/puppeteer/node/cli.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
export {};
|
||||
//# sourceMappingURL=cli.d.ts.map
|
||||
1
node_modules/puppeteer/lib/esm/puppeteer/node/cli.d.ts.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/puppeteer/node/cli.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/node/cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
|
||||
40
node_modules/puppeteer/lib/esm/puppeteer/node/cli.js
generated
vendored
Executable file
40
node_modules/puppeteer/lib/esm/puppeteer/node/cli.js
generated
vendored
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
import { CLI, Browser } from '@puppeteer/browsers';
|
||||
import { PUPPETEER_REVISIONS } from 'puppeteer-core/internal/revisions.js';
|
||||
import puppeteer from '../puppeteer.js';
|
||||
const cacheDir = puppeteer.configuration.cacheDirectory;
|
||||
void new CLI({
|
||||
cachePath: cacheDir,
|
||||
scriptName: 'puppeteer',
|
||||
prefixCommand: {
|
||||
cmd: 'browsers',
|
||||
description: 'Manage browsers of this Puppeteer installation',
|
||||
},
|
||||
allowCachePathOverride: false,
|
||||
pinnedBrowsers: {
|
||||
[Browser.CHROME]: {
|
||||
buildId: puppeteer.configuration.chrome?.version ||
|
||||
PUPPETEER_REVISIONS['chrome'] ||
|
||||
'latest',
|
||||
skipDownload: puppeteer.configuration.chrome?.skipDownload ?? false,
|
||||
},
|
||||
[Browser.FIREFOX]: {
|
||||
buildId: puppeteer.configuration.firefox?.version ||
|
||||
PUPPETEER_REVISIONS['firefox'] ||
|
||||
'latest',
|
||||
skipDownload: puppeteer.configuration.firefox?.skipDownload ?? true,
|
||||
},
|
||||
[Browser.CHROMEHEADLESSSHELL]: {
|
||||
buildId: puppeteer.configuration['chrome-headless-shell']?.version ||
|
||||
PUPPETEER_REVISIONS['chrome-headless-shell'] ||
|
||||
'latest',
|
||||
skipDownload: puppeteer.configuration['chrome-headless-shell']?.skipDownload ?? false,
|
||||
},
|
||||
},
|
||||
}).run(process.argv);
|
||||
//# sourceMappingURL=cli.js.map
|
||||
1
node_modules/puppeteer/lib/esm/puppeteer/node/cli.js.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/puppeteer/node/cli.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../src/node/cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAO,EAAC,GAAG,EAAE,OAAO,EAAC,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,sCAAsC,CAAC;AAEzE,OAAO,SAAS,MAAM,iBAAiB,CAAC;AAExC,MAAM,QAAQ,GAAG,SAAS,CAAC,aAAa,CAAC,cAAe,CAAC;AAEzD,KAAK,IAAI,GAAG,CAAC;IACX,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,WAAW;IACvB,aAAa,EAAE;QACb,GAAG,EAAE,UAAU;QACf,WAAW,EAAE,gDAAgD;KAC9D;IACD,sBAAsB,EAAE,KAAK;IAC7B,cAAc,EAAE;QACd,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,OAAO,EACL,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO;gBACvC,mBAAmB,CAAC,QAAQ,CAAC;gBAC7B,QAAQ;YACV,YAAY,EAAE,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,YAAY,IAAI,KAAK;SACpE;QACD,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YACjB,OAAO,EACL,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO;gBACxC,mBAAmB,CAAC,SAAS,CAAC;gBAC9B,QAAQ;YACV,YAAY,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,IAAI,IAAI;SACpE;QACD,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE;YAC7B,OAAO,EACL,SAAS,CAAC,aAAa,CAAC,uBAAuB,CAAC,EAAE,OAAO;gBACzD,mBAAmB,CAAC,uBAAuB,CAAC;gBAC5C,QAAQ;YACV,YAAY,EACV,SAAS,CAAC,aAAa,CAAC,uBAAuB,CAAC,EAAE,YAAY,IAAI,KAAK;SAC1E;KACF;CACF,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
||||
10
node_modules/puppeteer/lib/esm/puppeteer/node/install.d.ts
generated
vendored
Normal file
10
node_modules/puppeteer/lib/esm/puppeteer/node/install.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare function downloadBrowsers(): Promise<void>;
|
||||
//# sourceMappingURL=install.d.ts.map
|
||||
1
node_modules/puppeteer/lib/esm/puppeteer/node/install.d.ts.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/puppeteer/node/install.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../src/node/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA4DH;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkEtD"}
|
||||
119
node_modules/puppeteer/lib/esm/puppeteer/node/install.js
generated
vendored
Normal file
119
node_modules/puppeteer/lib/esm/puppeteer/node/install.js
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
import { install, Browser, resolveBuildId, makeProgressCallback, detectBrowserPlatform, } from '@puppeteer/browsers';
|
||||
import { PUPPETEER_REVISIONS } from 'puppeteer-core/internal/revisions.js';
|
||||
import { getConfiguration } from '../getConfiguration.js';
|
||||
async function downloadBrowser({ browser, configuration, cacheDir, platform, }) {
|
||||
const unresolvedBuildId = configuration?.version || PUPPETEER_REVISIONS[browser] || 'latest';
|
||||
const baseUrl = configuration?.downloadBaseUrl;
|
||||
const buildId = await resolveBuildId(browser, platform, unresolvedBuildId);
|
||||
try {
|
||||
const result = await install({
|
||||
browser,
|
||||
cacheDir,
|
||||
platform,
|
||||
buildId,
|
||||
downloadProgressCallback: makeProgressCallback(browser, buildId),
|
||||
baseUrl,
|
||||
buildIdAlias: buildId !== unresolvedBuildId ? unresolvedBuildId : undefined,
|
||||
});
|
||||
logPolitely(`${browser} (${result.buildId}) downloaded to ${result.path}`);
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error(`ERROR: Failed to set up ${browser} v${buildId}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.`, {
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export async function downloadBrowsers() {
|
||||
overrideProxy();
|
||||
const configuration = getConfiguration();
|
||||
if (configuration.skipDownload) {
|
||||
logPolitely('**INFO** Skipping downloading browsers as instructed.');
|
||||
return;
|
||||
}
|
||||
const platform = detectBrowserPlatform();
|
||||
if (!platform) {
|
||||
throw new Error('The current platform is not supported.');
|
||||
}
|
||||
const cacheDir = configuration.cacheDirectory;
|
||||
const installationJobs = [];
|
||||
if (configuration.chrome?.skipDownload) {
|
||||
logPolitely('**INFO** Skipping Chrome download as instructed.');
|
||||
}
|
||||
else {
|
||||
const browser = Browser.CHROME;
|
||||
installationJobs.push(downloadBrowser({
|
||||
browser,
|
||||
configuration: configuration[browser] ?? {},
|
||||
cacheDir,
|
||||
platform,
|
||||
}));
|
||||
}
|
||||
if (configuration['chrome-headless-shell']?.skipDownload) {
|
||||
logPolitely('**INFO** Skipping Chrome download as instructed.');
|
||||
}
|
||||
else {
|
||||
const browser = Browser.CHROMEHEADLESSSHELL;
|
||||
installationJobs.push(downloadBrowser({
|
||||
browser,
|
||||
configuration: configuration[browser] ?? {},
|
||||
cacheDir,
|
||||
platform,
|
||||
}));
|
||||
}
|
||||
if (configuration.firefox?.skipDownload) {
|
||||
logPolitely('**INFO** Skipping Firefox download as instructed.');
|
||||
}
|
||||
else {
|
||||
const browser = Browser.FIREFOX;
|
||||
installationJobs.push(downloadBrowser({
|
||||
browser,
|
||||
configuration: configuration[browser] ?? {},
|
||||
cacheDir,
|
||||
platform,
|
||||
}));
|
||||
}
|
||||
try {
|
||||
await Promise.all(installationJobs);
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function logPolitely(toBeLogged) {
|
||||
const logLevel = process.env['npm_config_loglevel'] || '';
|
||||
const logLevelDisplay = ['silent', 'error', 'warn'].indexOf(logLevel) > -1;
|
||||
if (!logLevelDisplay) {
|
||||
console.log(toBeLogged);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function overrideProxy() {
|
||||
// Override current environment proxy settings with npm configuration, if any.
|
||||
const NPM_HTTPS_PROXY = process.env['npm_config_https_proxy'] || process.env['npm_config_proxy'];
|
||||
const NPM_HTTP_PROXY = process.env['npm_config_http_proxy'] || process.env['npm_config_proxy'];
|
||||
const NPM_NO_PROXY = process.env['npm_config_no_proxy'];
|
||||
if (NPM_HTTPS_PROXY) {
|
||||
process.env['HTTPS_PROXY'] = NPM_HTTPS_PROXY;
|
||||
}
|
||||
if (NPM_HTTP_PROXY) {
|
||||
process.env['HTTP_PROXY'] = NPM_HTTP_PROXY;
|
||||
}
|
||||
if (NPM_NO_PROXY) {
|
||||
process.env['NO_PROXY'] = NPM_NO_PROXY;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=install.js.map
|
||||
1
node_modules/puppeteer/lib/esm/puppeteer/node/install.js.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/puppeteer/node/install.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../../src/node/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAC,mBAAmB,EAAC,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAExD,KAAK,UAAU,eAAe,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,QAAQ,EACR,QAAQ,GAST;IACC,MAAM,iBAAiB,GACrB,aAAa,EAAE,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC;IACrE,MAAM,OAAO,GAAG,aAAa,EAAE,eAAe,CAAC;IAC/C,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAE3E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;YAC3B,OAAO;YACP,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,wBAAwB,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC;YAChE,OAAO;YACP,YAAY,EACV,OAAO,KAAK,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS;SAChE,CAAC,CAAC;QACH,WAAW,CAAC,GAAG,OAAO,KAAK,MAAM,CAAC,OAAO,mBAAmB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK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AO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAExD,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,eAAe,CAAC;IAC/C,CAAC;IACD,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,cAAc,CAAC;IAC7C,CAAC;IACD,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC;IACzC,CAAC;AACH,CAAC"}
|
||||
39
node_modules/puppeteer/lib/esm/puppeteer/puppeteer.d.ts
generated
vendored
Normal file
39
node_modules/puppeteer/lib/esm/puppeteer/puppeteer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
export type { Protocol } from 'puppeteer-core';
|
||||
export * from 'puppeteer-core/internal/puppeteer-core.js';
|
||||
import * as PuppeteerCore from 'puppeteer-core/internal/puppeteer-core.js';
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
declare const puppeteer: PuppeteerCore.PuppeteerNode;
|
||||
export declare const
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
connect: (options: PuppeteerCore.ConnectOptions) => Promise<PuppeteerCore.Browser>,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
defaultArgs: (options?: PuppeteerCore.LaunchOptions) => string[],
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
executablePath: {
|
||||
(channel: PuppeteerCore.ChromeReleaseChannel): string;
|
||||
(options: PuppeteerCore.LaunchOptions): string;
|
||||
(): string;
|
||||
},
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
launch: (options?: PuppeteerCore.LaunchOptions) => Promise<PuppeteerCore.Browser>,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
trimCache: () => Promise<void>;
|
||||
export default puppeteer;
|
||||
//# sourceMappingURL=puppeteer.d.ts.map
|
||||
1
node_modules/puppeteer/lib/esm/puppeteer/puppeteer.d.ts.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/puppeteer/puppeteer.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"puppeteer.d.ts","sourceRoot":"","sources":["../../../src/puppeteer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAE7C,cAAc,2CAA2C,CAAC;AAE1D,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAM3E;;GAEG;AACH,QAAA,MAAM,SAAS,6BAGb,CAAC;AAEH,eAAO;AACL;;GAEG;AACH,OAAO;AACP;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,cAAc;;;;;AACd;;GAEG;AACH,MAAM;AACN;;GAEG;AACH,SAAS,qBACE,CAAC;AAEd,eAAe,SAAS,CAAC"}
|
||||
39
node_modules/puppeteer/lib/esm/puppeteer/puppeteer.js
generated
vendored
Normal file
39
node_modules/puppeteer/lib/esm/puppeteer/puppeteer.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
export * from 'puppeteer-core/internal/puppeteer-core.js';
|
||||
import * as PuppeteerCore from 'puppeteer-core/internal/puppeteer-core.js';
|
||||
import { getConfiguration } from './getConfiguration.js';
|
||||
const configuration = getConfiguration();
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
const puppeteer = new PuppeteerCore.PuppeteerNode({
|
||||
isPuppeteerCore: false,
|
||||
configuration,
|
||||
});
|
||||
export const {
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
connect,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
defaultArgs,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
executablePath,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
launch,
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
trimCache, } = puppeteer;
|
||||
export default puppeteer;
|
||||
//# sourceMappingURL=puppeteer.js.map
|
||||
1
node_modules/puppeteer/lib/esm/puppeteer/puppeteer.js.map
generated
vendored
Normal file
1
node_modules/puppeteer/lib/esm/puppeteer/puppeteer.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"puppeteer.js","sourceRoot":"","sources":["../../../src/puppeteer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,cAAc,2CAA2C,CAAC;AAE1D,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAEvD,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAEzC;;GAEG;AACH,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC,aAAa,CAAC;IAChD,eAAe,EAAE,KAAK;IACtB,aAAa;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM;AACX;;GAEG;AACH,OAAO;AACP;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,cAAc;AACd;;GAEG;AACH,MAAM;AACN;;GAEG;AACH,SAAS,GACV,GAAG,SAAS,CAAC;AAEd,eAAe,SAAS,CAAC"}
|
||||
8642
node_modules/puppeteer/lib/types.d.ts
generated
vendored
Normal file
8642
node_modules/puppeteer/lib/types.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user