HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/good-life-be/node_modules/puppeteer/src/node/cli.ts
#!/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);