{
  "_id": "@rnx-kit/chromium-edge-launcher",
  "maintainers": [
    {
      "email": "jasonmo@microsoft.com",
      "name": "jasonvmorse"
    },
    {
      "email": "acoates@microsoft.com",
      "name": "acoates"
    },
    {
      "email": "rnbot@microsoft.com",
      "name": "rnbot"
    },
    {
      "email": "tonguye@microsoft.com",
      "name": "tido64"
    },
    {
      "email": "rnsdkbot@microsoft.com",
      "name": "rnsdkbot"
    },
    {
      "email": "hansenyao.yy@gmail.com",
      "name": "hansenyy"
    },
    {
      "email": "microsoft-oss-publishing@microsoft.com",
      "name": "microsoft-oss-releases"
    },
    {
      "email": "npmjs@microsoft.com",
      "name": "microsoft1es"
    }
  ],
  "dist-tags": {
    "latest": "1.0.0"
  },
  "author": {
    "name": "Microsoft Open Source",
    "email": "microsoftopensource@users.noreply.github.com"
  },
  "_rev": "4-6db095dca536ec11000ae117ccef427e",
  "description": "EXPERIMENTAL - USE WITH CAUTION - Launch latest Edge with the Devtools Protocol port open",
  "readme": "# Edge Launcher\n\n<img src=\"https://user-images.githubusercontent.com/4672033/107800563-adb9ce00-6d3d-11eb-8425-2256d0278894.png\" align=right height=200>\n\nLaunch Microsoft Edge with ease from node.\n\n- [Disables many Edge services](https://github.com/microsoft/rnx-kit/incubator/chromium-edge-launcher/blob/main/src/flags.ts)\n  that add noise to automated scenarios\n- Opens up the browser's `remote-debugging-port` on an available port\n- Automagically locates a Edge binary to launch\n- Uses a fresh Edge profile for each launch, and cleans itself up on `kill()`\n- Binds `Ctrl-C` (by default) to terminate the Edge process\n- Exposes a small set of [options](#api) for configurability over these details\n\n> \\_This project started as a fork of\n> [Chrome Launcher](https://github.com/GoogleChrome/chrome-launcher) and\n> inherits, whereas possible, all its features.\n\n### Installing\n\n```sh\nyarn add @rnx-kit/chromium-edge-launcher\n\n# or with npm:\nnpm install @rnx-kit/chromium-edge-launcher\n```\n\n## API\n\n### `.launch([opts])`\n\n#### Launch options\n\n```js\n{\n  // (optional) remote debugging port number to use. If provided port is already busy, launch() will reject\n  // Default: an available port is autoselected\n  port: number;\n\n  // (optional) Additional flags to pass to Edge, for example: ['--headless', '--disable-gpu']\n  // See: https://github.com/microsoft/rnx-kit/incubator/chromium-edge-launcher/blob/main/docs/edge-flags-for-tools.md\n  // Do note, many flags are set by default: https://github.com/microsoft/rnx-kit/incubator/chromium-edge-launcher/blob/main/src/flags.ts\n  edgeFlags: Array<string>;\n\n  // (optional) Close the Edge process on `Ctrl-C`\n  // Default: true\n  handleSIGINT: boolean;\n\n  // (optional) Explicit path of intended Edge binary\n  // * If this `edgePath` option is defined, it will be used.\n  // * Otherwise, the `EDGE_PATH` env variable will be used if set. (`LIGHTHOUSE_CHROMIUM_PATH` is deprecated)\n  // * Otherwise, a detected Edge Canary will be used if found\n  // * Otherwise, a detected Edge (stable) will be used\n  edgePath: string;\n\n  // (optional) Edge profile path to use, if set to `false` then the default profile will be used.\n  // By default, a fresh Edge profile will be created\n  userDataDir: string | boolean;\n\n  // (optional) Starting URL to open the browser with\n  // Default: `about:blank`\n  startingUrl: string;\n\n  // (optional) Logging level\n  // Default: 'silent'\n  logLevel: 'verbose'|'info'|'error'|'silent';\n\n  // (optional) Flags specific in [flags.ts](src/flags.ts) will not be included.\n  // Typically used with the defaultFlags() method and edgeFlags option.\n  // Default: false\n  ignoreDefaultFlags: boolean;\n\n  // (optional) Interval in ms, which defines how often launcher checks browser port to be ready.\n  // Default: 500\n  connectionPollInterval: number;\n\n  // (optional) A number of retries, before browser launch considered unsuccessful.\n  // Default: 50\n  maxConnectionRetries: number;\n\n  // (optional) A dict of environmental key value pairs to pass to the spawned edge process.\n  envVars: {[key: string]: string};\n};\n```\n\n#### Launched edge interface\n\n#### `.launch().then(edge => ...`\n\n```js\n// The remote debugging port exposed by the launched edge\nedge.port: number;\n\n// Method to kill Edge (and cleanup the profile folder)\nedge.kill: () => Promise<void>;\n\n// The process id\nedge.pid: number;\n\n// The childProcess object for the launched Edge\nedge.process: childProcess\n```\n\n### `EdgeLauncher.Launcher.defaultFlags()`\n\nReturns an `Array<string>` of the default [flags](docs/edge-flags-for-tools.md)\nEdge is launched with. Typically used along with the `ignoreDefaultFlags` and\n`edgeFlags` options.\n\nNote: This array will exclude the following flags: `--remote-debugging-port`\n`--disable-setuid-sandbox` `--user-data-dir`.\n\n### `EdgeLauncher.Launcher.getInstallations()`\n\nReturns an `Array<string>` of paths to available Edge installations. When\n`edgePath` is not provided to `.launch()`, the first installation returned from\nthis method is used instead.\n\nNote: This method performs synchronous I/O operations.\n\n### `.killAll()`\n\nAttempts to kill all Edge instances created with\n[`.launch([opts])`](#launchopts). Returns a Promise that resolves to an array of\nerrors that occurred while killing instances. If all instances were killed\nsuccessfully, the array will be empty.\n\n```js\nconst EdgeLauncher = require(\"@rnx-kit/chromium-edge-launcher\");\n\nasync function cleanup() {\n  await EdgeLauncher.killAll();\n}\n```\n\n## Examples\n\n#### Launching edge:\n\n```js\nconst EdgeLauncher = require(\"@rnx-kit/chromium-edge-launcher\");\n\nEdgeLauncher.launch({\n  startingUrl: \"https://google.com\",\n}).then((edge) => {\n  console.log(`Edge debugging port running on ${edge.port}`);\n});\n```\n\n#### Launching headless edge:\n\n```js\nconst EdgeLauncher = require(\"@rnx-kit/chromium-edge-launcher\");\n\nEdgeLauncher.launch({\n  startingUrl: \"https://google.com\",\n  edgeFlags: [\"--headless\", \"--disable-gpu\"],\n}).then((edge) => {\n  console.log(`Edge debugging port running on ${edge.port}`);\n});\n```\n\n#### Launching with support for extensions and audio:\n\n```js\nconst EdgeLauncher = require('@rnx-kit/chromium-edge-launcher');\n\nconst newFlags = EdgeLauncher.Launcher.defaultFlags().filter(flag => flag !== '--disable-extensions' && flag !== '--mute-audio');\n\nEdgeLauncher.launch({\n  ignoreDefaultFlags: true,\n  edgeFlags: newFlags,\n}).then(edge => { ... });\n```\n\n### Continuous Integration\n\nIn a CI environment like Travis, Edge may not be installed. If you want to use\n`@rnx-kit/chromium-edge-launcher`, Travis can\n[install Edge at run time with an addon](https://docs.travis-ci.com/user/edge).\nAlternatively, you can also install Edge using the\n[`download-edge.sh`](https://raw.githubusercontent.com/cezaraugusto/chromium-edge-launcher/v0.8.0/scripts/download-edge.sh)\nscript.\n\nThen in `.travis.yml`, use it like so:\n\n```yaml\nlanguage: node_js\ninstall:\n  - yarn install\nbefore_script:\n  - export DISPLAY=:99.0\n  - export CHROME_PATH=\"$(pwd)/edge-linux/edge\"\n  - sh -e /etc/init.d/xvfb start\n  - sleep 3 # wait for xvfb to boot\n\naddons:\n  edge: stable\n```\n\n### Acknowledgements\n\nThis project is a fork of https://github.com/cezaraugusto/chromium-edge-launcher\nwhich started as a fork of, and is inspired by\nhttps://github.com/cezaraugusto/chromium-edge-launcher which is released under\nthe Apache-2.0 License, and is copyright of Google Inc.\n",
  "repository": {
    "url": "git+https://github.com/microsoft/rnx-kit.git",
    "type": "git",
    "directory": "incubator/chromium-edge-launcher"
  },
  "bugs": {
    "url": "https://github.com/microsoft/rnx-kit/issues"
  },
  "license": "Apache-2.0",
  "versions": {
    "1.0.0": {
      "name": "@rnx-kit/chromium-edge-launcher",
      "version": "1.0.0",
      "author": {
        "name": "Microsoft Open Source",
        "email": "microsoftopensource@users.noreply.github.com"
      },
      "license": "Apache-2.0",
      "_id": "@rnx-kit/chromium-edge-launcher@1.0.0",
      "maintainers": [
        {
          "name": "kelset",
          "email": "notkelset@kelset.dev"
        },
        {
          "name": "hansenyy",
          "email": "hansenyao.yy@gmail.com"
        },
        {
          "name": "jasonvmorse",
          "email": "jasonmo@microsoft.com"
        },
        {
          "name": "acoates",
          "email": "acoates@microsoft.com"
        },
        {
          "name": "rnbot",
          "email": "rnbot@microsoft.com"
        },
        {
          "name": "tido64",
          "email": "tonguye@microsoft.com"
        },
        {
          "name": "rnsdkbot",
          "email": "rnsdkbot@microsoft.com"
        }
      ],
      "homepage": "https://github.com/microsoft/rnx-kit/tree/main/incubator/chromium-edge-launcher#readme",
      "bugs": {
        "url": "https://github.com/microsoft/rnx-kit/issues"
      },
      "dist": {
        "shasum": "c0df8ea00a902c7a417cd9655aab06de398b939c",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@rnx-kit/chromium-edge-launcher/-/chromium-edge-launcher-1.0.0.tgz",
        "fileCount": 31,
        "integrity": "sha512-lzD84av1ZQhYUS+jsGqJiCMaJO2dn9u+RTT9n9q6D3SaKVwWqv+7AoRKqBu19bkwyE+iFRl1ymr40QS90jVFYg==",
        "signatures": [
          {
            "sig": "MEUCIH+8ep3XN+xbMea5iyV/0BaQs3Kxrvs4SI2tXPnTYpA/AiEAynhictkUMxo0ffLRjmH+Utjfnmhfu7Ekat88ws5/ZQ0=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 83412
      },
      "jest": {
        "preset": "@rnx-kit/jest-preset/private"
      },
      "main": "lib/index.js",
      "types": "lib/index.d.ts",
      "engines": {
        "node": ">=14.15"
      },
      "gitHead": "290e59068295a0113840a0519353e015ac9cf19f",
      "scripts": {
        "lint": "rnx-kit-scripts lint",
        "test": "rnx-kit-scripts test",
        "build": "rnx-kit-scripts build",
        "format": "rnx-kit-scripts format"
      },
      "_npmUser": {
        "name": "rnsdkbot",
        "email": "rnsdkbot@microsoft.com"
      },
      "repository": {
        "url": "git+https://github.com/microsoft/rnx-kit.git",
        "type": "git",
        "directory": "incubator/chromium-edge-launcher"
      },
      "_npmVersion": "8.19.4",
      "description": "EXPERIMENTAL - USE WITH CAUTION - Launch latest Edge with the Devtools Protocol port open",
      "directories": {},
      "_nodeVersion": "16.20.2",
      "dependencies": {
        "is-wsl": "^2.2.0",
        "mkdirp": "^1.0.4",
        "rimraf": "^3.0.2",
        "@types/node": "^18.0.0",
        "lighthouse-logger": "^1.0.0",
        "escape-string-regexp": "^4.0.0"
      },
      "experimental": true,
      "_hasShrinkwrap": false,
      "devDependencies": {
        "jest": "^29.2.1",
        "sinon": "^9.0.1",
        "eslint": "^8.0.0",
        "prettier": "^3.0.0",
        "typescript": "^5.0.0",
        "@types/sinon": "^9.0.1",
        "@types/mkdirp": "^1.0.1",
        "@types/rimraf": "^3.0.0",
        "@rnx-kit/scripts": "*",
        "@rnx-kit/jest-preset": "*",
        "@rnx-kit/eslint-config": "*"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/chromium-edge-launcher_1.0.0_1699380536074_0.5745945842186613",
        "host": "s3://npm-registry-packages"
      }
    }
  },
  "name": "@rnx-kit/chromium-edge-launcher",
  "time": {
    "created": "2023-11-07T18:08:55.988Z",
    "modified": "2026-05-27T20:56:31.090Z",
    "1.0.0": "2023-11-07T18:08:56.239Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/microsoft/rnx-kit/tree/main/incubator/chromium-edge-launcher#readme"
}