From 615f661314f4e58b241678ef2126c34d48ef96ef Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra <14110965+ayushmanchhabra@users.noreply.github.com> Date: Tue, 26 Mar 2024 00:46:56 +0530 Subject: [PATCH] feat: install multiple binaries (#138) Closes: #47 --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 43 ++++ README.md | 187 +++++----------- bin/nw.js | 20 +- lib/app_assets.js | 19 +- lib/findpath.js | 58 ----- lib/install.js | 231 ------------------- package-lock.json | 471 +++++++++++---------------------------- package.json | 19 +- src/decompress.js | 21 +- src/get.js | 2 + src/index.js | 8 + src/postinstall.js | 63 ++++++ src/util.js | 54 ++++- test/app/index.html | 2 +- test/index.test.js | 8 +- test/selenium.test.js | 31 +++ 17 files changed, 439 insertions(+), 800 deletions(-) delete mode 100644 lib/findpath.js delete mode 100755 lib/install.js create mode 100644 src/index.js create mode 100644 src/postinstall.js create mode 100644 test/selenium.test.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd57382..5f03619 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,6 @@ jobs: - name: Enable corepack run: corepack enable - name: Install dependencies - run: npm ci + run: npm ci --nwjs-build-type=sdk - name: Run test run: npm test diff --git a/CHANGELOG.md b/CHANGELOG.md index 993bdef..d902394 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,49 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +## [0.85.0-1] + +### Added + +- Option to specify cache directory by setting `nwjs_cache_dir` in `.npmrc` or `NWJS_CACHE_DIR` as ENV variable. Defaults to `./node_modules/nw`. + +- Option to customise caching behaviour by enabling/disabling `nwjs_cache` in `.npmrc` or `NWJS_CACHE` as ENV variable. Defaults to `false`. + +- Option to download community ffmpeg by enabling/disabling `nwjs_ffmpeg` in `.npmrc` or `NWJS_FFMPEG` as ENV variable. Defaults to `false`. + +- Option to download NW.js Node headers by enabling/disabling `nwjs_native_addon` in `.npmrc` or `NWJS_NATIVE_ADDON` as ENV variable. Defaults to `false`. + +### Changed + +Switch from CJS to ESM. + +ESM import: + +```javascript +import { findpath } from 'nw'; +``` + +Previous CJS import: + +```javascript + const { findpath } = require('nw'); +``` + +Current CJS import: + +```javascript + let nw; + import('nw').then(object => { + nw = object; + }); +``` + +### Removed + +- CJS support. +- `compressing` package. +- `cli-progress` package. + ## [0.85.0] ## Changed diff --git a/README.md b/README.md index a03c582..c01e438 100644 --- a/README.md +++ b/README.md @@ -1,173 +1,108 @@ # nw -An installer for [NW.js](https://nwjs.io). +An npm installer for [NW.js](https://nwjs.io). -> NW.js is a runtime-environment based on Chromium and Node.js. It is used to build desktop applications that run on Windows, OSX, and Linux. +[![npm](https://img.shields.io/npm/v/nw)](https://www.npmjs.com/package/nw) -[![npm](https://img.shields.io/npm/v/nw.svg?style=flat)](https://www.npmjs.com/package/nw) +## Install -## usage -Install locally to your project with: `npm install nw` and then in your `package.json` add a script: +### Latest version of normal build flavor: -```json -{ - "scripts": { - "start": "nw" - } -} +```shell +npm install --save-dev nw ``` -Now it will run your local project when you type `npm start`. - -If your project is in another folder, add the path to the project `"start": "nw path/to/app"`. - -You could also call `nw` directly from `node_modules/.bin/nw` instead of adding to your `package.json`. - -### global -You can also install globally with `npm install nw -g` and then in any project type `nw` to run the project. Installing locally is recommended though as each project can have its own dependent version of nw.js. +### Specific version with changes to installer: -## example -If you want a really quick example try this: - -1. `git clone https://github.com/zcbenz/nw-sample-apps && cd nw-sample-apps` -2. `npm init` -3. `npm install nw` -4. `"node_modules/.bin/nw" file-explorer` - -and now you should see a file explorer demo app. - -## command line options -There are a few (platform-specific) arguments you can pass to the `nw` executable to -customize your nw.js application: - -* `--mac_plist `: (OS X only) Copies the given file to Info.plist in the app - bundle. This lets you do things like change your app's name and point to a different icon. - -* `--mac_icon `: (OS X only) Copies the given .icns file to the Resources/ dir - in the app bundle. You will need to point to the file with a custom plist file as well (see - `--mac_list`) - -**NOTE**: These options will keep the copied files in the app bundle for as long as the bundle is -on the filesystem (they're not deleted between app invocations). As a result, they're not -recommended if you installed nw globally using `-g`. Also note that -[OS X caches these files](http://proteo.me.uk/2011/08/mac-application-bundle-caching/), -so you may need to manually clear these cached files during development. - -## install a specific version of nw.js - -To install a specific version of nw.js use npm with the specific version: `npm install nw@0.12.0` - -> *Please note:* This npm package version tracks the version of nw.js that will be installed, with an additional build number that is used for revisions to the installer. As such `0.12.0-1` and `0.12.0-2` will both install `nw.js@0.12.0` but the latter has newer changes to the installer. - -You may use `npm view nw versions` to view the list of available versions. +```shell +npm install --save-dev nw@0.85.0-1 +``` -## install a specific build type of nw.js +> You may use `npm view nw versions` to view the list of available versions. -nw.js has three build types: `normal`, `sdk` and `nacl`. To install a specific build type you may set npm config property `nwjs_build_type`, environment variable `NWJS_BUILD_TYPE` or pass command line option `--nwjs_build_type`: +### Specify build flavor: -``` shell -npm install nw --nwjs_build_type=sdk +```shell +npm install --save-dev nw@sdk ``` -Setting option in `.npmrc` file (https://www.npmjs.org/doc/files/npmrc.html): - -``` -nwjs_build_type=sdk -``` +> Optionally set `nwjs_build_type=sdk` in `.npmrc` or `NWJS_BUILD_TYPE=sdk` environment variable. -Setting environment variable `NWJS_BUILD_TYPE`: +### Specify platform: -``` shell -export NWJS_BUILD_TYPE=sdk -``` +Set `nwjs_platform` in `.npmrc` or `NWJS_PLATFORM` environment variable. Defaults to `process.platform`. -You can alternatively install `sdk` build by specifying `-sdk` suffix in version: +### Specify architecture: -``` shell -npm install nw@0.13.3-sdk -``` +Set `nwjs_arch` in `.npmrc` or `NWJS_ARCH` environment variable. Defaults to `process.arch`. -You can also run `npm install nw@sdk` to get the latest of published SDK versions. (Note: that may be a beta version.) +### Specify cache directory: -## install a specific architecture +Set `nwjs_cache_dir` in `.npmrc` or `NWJS_ARCH` environment variable. Defaults to `./node_modules/nw`. -You may use the environment variable `npm_config_nwjs_process_arch` to override the default architecture (`process.arch`) and to download NW.js built for some other architecture. +### Specify cache flag: -## finding the path to the nw.js binary +Set `nwjs_cache` in `.npmrc` or `NWJS_ARCH` environment variable to keep or delete cached binaries. Defaults to `true`. -If you would like to programmatically retrieve the path to the nw.js binary use: +### Specify ffmpeg flag: -``` js -var findpath = require('nw').findpath; -var nwpath = findpath(); -// nwpath will equal the path to the binary depending on your environment -``` +Set `nwjs_ffmpeg` in `.npmrc` or `NWJS_ARCH` environment variable to toggle downloading [community FFmpeg binaries](https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt). Defaults to `false`. -## finding the path to the chromedriver binary +### Specify Native Addon flag: -If you would like to programmatically retrieve the path to the chromedriver use: +Set `nwjs_native_addon` in `.npmrc` or `NWJS_NATIVE_ADDON` environment variable to toggle downloading NW.js Node headers. Defaults to `false`. -``` js -var findpath = require('nw').findpath; -var chromedriver_path = findpath('chromedriver'); -// chromedriver_path will equal the path to the binary depending on your environment -``` +### Specify download URL: -Then you can use that path to run NW.js programmatically. For example, to run in the current script's directory: - -```js -require('child_process').spawn( - require('nw').findpath(), - ['.'].concat( process.argv.slice(2) ), - { - cwd: __dirname, - detached: true, - stdio: 'ignore' - } -).unref(); -``` +Set `nwjs_urlbase` in `.npmrc` or `NWJS_URLBASE` environment variable. Defaults to `https://dl.nwjs.io`. The file system (`file://`) is also supported. -## retrieve binaries from custom download location or file path +## Usage -The installer attempts to download binaries from the default location of `https://dl.nwjs.io/v`. You can override this by setting the npm config property `nwjs_urlbase` on the command line by passing the `--nwjs_urlbase` option: +Add a script in your `package.json`: -``` shell -npm install nw --nwjs_urlbase=http://my.own.location/somewhere +```json +{ + "scripts": { + "start": "nw /path/to/app" + } +} ``` -or adding it to your `.npmrc` file (https://www.npmjs.org/doc/files/npmrc.html): +Executing `npm start` runs the NW.js app. Omitting the file path makes NW.js check for valid project in current working directory. You can also call `nw` directly from `node_modules/.bin/nw`. -``` -nwjs_urlbase=http://my.own.location/somewhere -``` +## Command Line Options -You can alternatively set an environment variable `NWJS_URLBASE`: +There are a few (platform-specific) arguments you can pass to the `nw` executable to customize your nw.js application: -``` shell -export NWJS_URLBASE=http://my.own.location/somewhere -``` +* `--mac_plist `: (OS X only) Copies the given file to Info.plist in the app + bundle. This lets you do things like change your app's name and point to a different icon. -The installer supports `file://` URLs to retrieve files from the local filesystem: +* `--mac_icon `: (OS X only) Copies the given .icns file to the Resources/ dir + in the app bundle. You will need to point to the file with a custom plist file as well (see + `--mac_list`) -``` shell -export NWJS_URLBASE=file:///home/bilbo/my/own/mirror -``` +**NOTE**: These options will keep the copied files in the app bundle for as long as the bundle is +on the filesystem (they're not deleted between app invocations). As a result, they're not +recommended if you installed nw globally using `-g`. Also note that +[OS X caches these files](http://proteo.me.uk/2011/08/mac-application-bundle-caching/), +so you may need to manually clear these cached files during development. -## using a proxy with or without authentication +## APIs -If you are behind a proxy server you have to set an environment variable `http_proxy` with proxy servers url: +### Find path to the NW.js binary: -``` -export http_proxy="http://username:password@myproxy.com:8080" +``` js +import { findpath } from 'nw'; +var path = findpath(); ``` -or +## Find the path to the chromedriver binary -``` -export http_proxy="http://myproxy.com:8080" +``` js +import { findpath } from 'nw'; +var path = findpath('chromedriver'); ``` -(However, if the environment variable `https_proxy` is set, then it will be preferred, as [programmed](https://github.com/kevva/get-proxy/blob/master/index.js) in the `get-proxy` package.) +## License -## license -[nw.js](https://github.com/nwjs/nw.js)'s code and this installer use the MIT license. +[NW.js](https://github.com/nwjs/nw.js)'s code and this installer use the MIT license. diff --git a/bin/nw.js b/bin/nw.js index ff50628..3585076 100755 --- a/bin/nw.js +++ b/bin/nw.js @@ -7,7 +7,7 @@ import { platform, argv, nextTick, exit, execPath } from 'node:process'; import { fileURLToPath } from 'node:url'; import { copyAssets } from '../lib/app_assets.js'; -import { findpath } from '../lib/findpath.js'; +import util from '../src/util.js'; const __dirname = dirname(fileURLToPath(import.meta.url)); @@ -18,11 +18,11 @@ function run() { if (!existsSync(packagejsonBackup)) { try { renameSync(packagejson, packagejsonBackup); - } catch (err) {} + } catch (err) { } } // copy over any asset files (icons, etc) specified via CLI args: - copyAssets(platform, findpath()); + copyAssets(platform, util.findpath()); // Normalize cli args var args = argv.slice(2); @@ -34,26 +34,26 @@ function run() { } // Spawn node-webkit - var nw = spawn(findpath(), args, { stdio: 'inherit' }); - nw.on('close', function() { - nextTick(function() { + var nw = spawn(util.findpath(), args, { stdio: 'inherit' }); + nw.on('close', function () { + nextTick(function () { exit(0); }); }); // Restore package.json shortly after nw is spawned - setTimeout(function() { + setTimeout(function () { try { if (existsSync(packagejsonBackup)) { renameSync(packagejsonBackup, packagejson); } - } catch (err) {} + } catch (err) { } }, 1000); } -if (!existsSync(findpath())) { +if (!existsSync(util.findpath())) { console.log('nw.js appears to have failed to download and extract. Attempting to download and extract again...'); - var child = spawn(execPath, [resolve(__dirname, '..', 'scripts', 'install.js')], { stdio: 'inherit' }); + var child = spawn(execPath, [resolve(__dirname, '..', 'src', 'postinstall.js')], { stdio: 'inherit' }); child.on('close', run); } else { run(); diff --git a/lib/app_assets.js b/lib/app_assets.js index a71a277..1b4095b 100644 --- a/lib/app_assets.js +++ b/lib/app_assets.js @@ -1,11 +1,14 @@ -import { readFileSync, writeFileSync } from 'fs'; -import { join, basename } from 'path'; -import { argv } from 'yargs'; +import fs from 'node:fs'; +import path from 'node:path'; + +import yargs from 'yargs'; + +const argv = yargs(process.argv.slice(2)).argv; // Helper to simulate the shell's "cp" command function copyFileSync(srcFile, destFile) { - var content = readFileSync(srcFile); - writeFileSync(destFile, content); + let content = fs.readFileSync(srcFile); + fs.writeFileSync(destFile, content); } // Copy asset files (specified via process.argv) over to the app binary's folder @@ -14,7 +17,7 @@ export function copyAssets(platform, binPath) { // app bundle. This lets you customize things like the app's menubar // name and icon (see argv.mac_icon below) if (argv.mac_plist && platform === 'darwin') { - var plistPath = join(binPath, '..', '..', 'Info.plist'); + let plistPath = path.join(binPath, '..', '..', 'Info.plist'); copyFileSync(argv.mac_plist, plistPath); } @@ -22,8 +25,8 @@ export function copyAssets(platform, binPath) { // Note that for the icon to work properly you need to point to // it with a custom plist file. if (argv.mac_icon && platform === 'darwin') { - var iconName = basename(argv.mac_icon); // Preserve the file's name - var iconPath = join(binPath, '..', '..', 'Resources', iconName); + let iconName = path.basename(argv.mac_icon); // Preserve the file's name + let iconPath = path.join(binPath, '..', '..', 'Resources', iconName); copyFileSync(argv.mac_icon, iconPath); } } diff --git a/lib/findpath.js b/lib/findpath.js deleted file mode 100644 index 6fbb68c..0000000 --- a/lib/findpath.js +++ /dev/null @@ -1,58 +0,0 @@ -import { env, platform } from 'node:process'; -import { dirname, join, resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; - -const __dirname = dirname(fileURLToPath(import.meta.url)); - -/** - * Get the platform dependant path of the NW.js or ChromeDriver binary. - * - * @param {'nwjs' | 'chromedriver'} executable Path to NW.js or Chromedriver executable. - * @return {string} - */ -export function findpath(executable = 'nwjs') { - const nwDir = resolve(__dirname, '..', 'nwjs'); - /** - * File path to executable. - * - * @type {string} - */ - let binPath = ''; - - /** - * Host operating system - * - * @type {NodeJS.Platform} - */ - let hostOs = env.npm_config_nwjs_platform || env.NWJS_PLATFORM || platform; - - /** - * Get the platform dependant path of the NW.js binary. - */ - function findNwjs() { - if (hostOs === 'darwin') { - binPath = join(nwDir, 'nwjs.app', 'Contents', 'MacOS', 'nwjs'); - } else if (hostOs === 'win32') { - binPath = join(nwDir, 'nw.exe'); - } else { - binPath = join(nwDir, 'nw'); - } - } - - /** - * Get the platform dependant path of the ChromeDriver binary. - */ - function findChromeDriver() { - binPath = resolve(nwDir, `chromedriver${platform === "win32" ? ".exe" : ""}`); - } - - if (executable === 'nwjs') { - findNwjs(); - } else if (executable === 'chromedriver') { - findChromeDriver(); - } else { - console.error(`[ ERROR ] Expected nwjs or chromedriver, got ${executable}.`); - } - - return binPath; -} diff --git a/lib/install.js b/lib/install.js deleted file mode 100755 index 9dcaabc..0000000 --- a/lib/install.js +++ /dev/null @@ -1,231 +0,0 @@ -import { createWriteStream, existsSync } from 'node:fs'; -import { rename, rm, symlink } from 'node:fs/promises'; -import { get } from 'node:https'; -import { dirname, resolve } from 'node:path'; -import { arch, env, platform, exit } from 'node:process'; -import { URL, fileURLToPath } from 'node:url'; - -import compressing from 'compressing'; -import { SingleBar, Presets } from 'cli-progress'; -import { parse } from 'semver'; - -import nodeManifest from '../package.json' assert { type: "json" }; - -const __dirname = dirname(fileURLToPath(import.meta.url)); - -await install() - .catch((error) => { - if (error.code === 'EPERM') { - console.error('Unable to create symlink since user did not run as Administrator.'); - } - }); - -async function install() { - - const PLATFORM_KV = { - darwin: 'osx', - linux: 'linux', - win32: 'win', - }; - - const ARCH_KV = { - x64: 'x64', - ia32: 'ia32', - arm64: 'arm64', - }; - - /** - * URL to download or get binaries from. - * - * @type {string} - */ - let url = ''; - - /** - * URL base prepended to `url`. - * - * @type {string} - */ - let urlBase = env.npm_config_nwjs_urlbase || env.NWJS_URLBASE || 'https://dl.nwjs.io/v'; - - /** - * NW.js build flavor - * - * @type {'sdk' | 'normal'} - */ - let buildType = env.npm_config_nwjs_build_type || env.NWJS_BUILD_TYPE || 'normal'; - - /** - * Parsed string version to Semver version object - */ - let parsedVersion = parse(nodeManifest.version); - - /** - * Version string of the format `X.Y.Z-pre`. - * The prerelease segment `pre` is used to specify build flavor, or other tags. - * - * @type {string} - */ - let versionString = [ - parsedVersion.major, - parsedVersion.minor, - parsedVersion.patch - ].join('.'); - - /** - * Host operating system - * - * @type {NodeJS.Platform | 'osx' | 'win'} - */ - let hostOs = env.npm_config_nwjs_platform || env.NWJS_PLATFORM || platform; - - /** - * Host architecture - * - * @type {NodeJS.Architecture} - */ - let hostArch = env.npm_config_nwjs_process_arch || arch; - - /** - * Path to the decompressed folder. - * - * @type {string} - */ - let nwFile = ''; - - /** - * Extension of the downloaded file. - * - * @type {'.tar.gz' | '.zip'} - */ - let nwExt = ''; - - /** - * Path to the compressed file. - * - * @type {string} - */ - let nwCache = ''; - - /** - * Path to the renamed folder containing NW.js binaries. - * - * @type {string} - */ - let nwDir = resolve(__dirname, '..', 'nwjs'); - - // Check if version is a prelease. - if (typeof parsedVersion?.prerelease?.[0] === 'string') { - let prerelease = parsedVersion.prerelease[0].split('-'); - if (prerelease.length > 1) { - prerelease = prerelease.slice(0, -1); - } - versionString = [versionString, ...prerelease].join('-'); - } - - // Check build flavor and slice that off the `versionString`. - if (versionString.endsWith('-sdk')) { - versionString = versionString.slice(0, -4); - buildType = 'sdk'; - } else if (versionString.endsWith('sdk')) { - versionString = versionString.slice(0, -3); - buildType = 'sdk'; - } - - nwFile = [ - 'nwjs', - buildType === 'normal' ? '' : `-${buildType}`, - '-v', - versionString, - '-', - PLATFORM_KV[hostOs], - '-', - ARCH_KV[hostArch], - ].join(''); - - nwExt = PLATFORM_KV[hostOs] === 'linux' ? '.tar.gz' : '.zip' - - nwCache = [nwFile, nwExt].join(''); - - url = [ - urlBase, - versionString, - '/', - nwCache, - ].join(''); - - if (!PLATFORM_KV[hostOs] || !ARCH_KV[hostArch]) { - console.error('[ ERROR ] Could not find a compatible version of nw.js to download for your platform.'); - exit(1); - } - - /** - * Parsed URL. - * - * @type {URL} - */ - let parsedUrl = new URL(url); - - /** - * Request download from server. - * - * @type {Promise | null} - */ - let request = null; - - if (parsedUrl.protocol === 'file:') { - nwCache = resolve(decodeURIComponent(url.slice('file://'.length))); - if (existsSync(nwCache) === false) { - console.error('[ ERROR ] Could not find ' + nwCache); - exit(1); - } - } - - if (existsSync(nwCache) === false) { - const bar = new SingleBar({}, Presets.rect); - - const stream = createWriteStream(nwCache); - request = new Promise((res, rej) => { - get(url, (response) => { - - let chunks = 0; - bar.start(Number(response.headers['content-length']), 0); - response.on('data', async (chunk) => { - chunks += chunk.length; - bar.increment(); - bar.update(chunks); - }); - - response.on('error', async () => { - await rm(nwCache, { force: true }); - rej(); - }); - - response.on('end', () => { - res(); - }); - - response.pipe(stream); - }); - }); - } - - if (request !== null) { - await request; - } - await rm(nwDir, { - recursive: true, - force: true, - }); - await compressing[platform === 'linux' ? 'tgz' : 'zip'] - .uncompress(nwCache, '.'); - await rename( - nwFile, - nwDir - ); - - // This allows nw-builder to treat ./node_modules/nw as cacheDir and access the downloaded binary. - await symlink(nwDir, nwFile); - - return; -} diff --git a/package-lock.json b/package-lock.json index 3cad9a9..f463520 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,33 @@ { "name": "nw", - "version": "0.85.0", + "version": "0.85.0-1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nw", - "version": "0.85.0", + "version": "0.85.0-1", "hasInstallScript": true, "license": "MIT", "dependencies": { - "cli-progress": "^3.12.0", - "compressing": "^1.10.0", + "axios": "^1.6.8", "semver": "^7.5.4", - "yargs": "^17.7.2" + "tar": "^6.2.1", + "yargs": "^17.7.2", + "yauzl-promise": "^4.0.0" }, "bin": { "nw": "bin/nw.js" }, "devDependencies": { - "axios": "^1.6.8", - "tar": "^6.2.1", - "vitest": "^1.4.0", - "yauzl-promise": "^4.0.0" + "selenium-webdriver": "^4.18.1", + "vitest": "^1.4.0" } }, "node_modules/@babel/runtime": { "version": "7.24.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", - "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -37,20 +35,10 @@ "node": ">=6.9.0" } }, - "node_modules/@eggjs/yauzl": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@eggjs/yauzl/-/yauzl-2.11.0.tgz", - "integrity": "sha512-Jq+k2fCZJ3i3HShb0nxLUiAgq5pwo8JTT1TrH22JoehZQ0Nm2dvByGIja1NYfNyuE4Tx5/Dns5nVsBN/mlC8yg==", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer2": "^1.2.0" - } - }, "node_modules/@emnapi/core": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.1.0.tgz", "integrity": "sha512-gNEVZo0HhUfVjhr6rFG//HZXbauclxueiDxaKGBZHcK5h8i9pslABNPfG8kMwYTubAn3mV7AyOZN8gfPRgbU8A==", - "dev": true, "optional": true, "dependencies": { "tslib": "^2.4.0" @@ -60,7 +48,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.1.0.tgz", "integrity": "sha512-gCGlE0fJGWalfy+wbFApjhKn6uoSVvopru77IPyxNKkjkaiSx2HxDS7eOYSmo9dcMIhmmIvoxiC3N9TM1c3EaA==", - "dev": true, "optional": true, "dependencies": { "tslib": "^2.4.0" @@ -456,7 +443,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.1.2.tgz", "integrity": "sha512-8JuczewTFIZ/XIjHQ+YlQUydHvlKx2hkcxtuGwh+t/t5zWyZct6YG4+xjHcq8xyc/e7FmFwf42Zj2YgICwmlvA==", - "dev": true, "optional": true, "dependencies": { "@emnapi/core": "^1.1.0", @@ -468,7 +454,6 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/@node-rs/crc32/-/crc32-1.10.0.tgz", "integrity": "sha512-SFvU8PGZexRMRPUhi+4a9LW4oqFuK5CLEElysrKoRtNkJ+LcRFL+b3wfuzbcDq/ea0rS0nzRLFZwVsNVyWaGew==", - "dev": true, "engines": { "node": ">= 10" }, @@ -500,7 +485,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -516,7 +500,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -532,7 +515,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -548,7 +530,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -564,7 +545,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -580,7 +560,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -596,7 +575,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -612,7 +590,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -628,7 +605,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -644,7 +620,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -660,7 +635,6 @@ "cpu": [ "wasm32" ], - "dev": true, "optional": true, "dependencies": { "@napi-rs/wasm-runtime": "^0.1.1" @@ -676,7 +650,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -692,7 +665,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -708,7 +680,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -896,7 +867,6 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.8.1.tgz", "integrity": "sha512-GSsTwyBl4pIzsxAY5wroZdyQKyhXk0d8PCRZtrSZ2WEB1cBdrp2EgGBwHOGCZtIIPun/DL3+AykCv+J6fyRH4Q==", - "dev": true, "optional": true, "dependencies": { "tslib": "^2.4.0" @@ -1007,14 +977,12 @@ } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -1032,56 +1000,18 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { "version": "1.6.8", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", - "dev": true, "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, - "node_modules/bl": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", - "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "dependencies": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dependencies": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "node_modules/buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "engines": { - "node": "*" - } - }, - "node_modules/buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==" - }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -1125,22 +1055,10 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, "engines": { "node": ">=10" } }, - "node_modules/cli-progress": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.12.0.tgz", - "integrity": "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==", - "dependencies": { - "string-width": "^4.2.3" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -1174,7 +1092,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1182,29 +1099,11 @@ "node": ">= 0.8" } }, - "node_modules/compressing": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/compressing/-/compressing-1.10.0.tgz", - "integrity": "sha512-k2vpbZLaJoHe9euyUZjYYE8vOrbR19aU3HcWIYw5EBXiUs34ygfDVnXU+ubI41JXMriHutnoiu0ZFdwCkH6jPA==", - "dependencies": { - "@eggjs/yauzl": "^2.11.0", - "flushwritable": "^1.0.0", - "get-ready": "^1.0.0", - "iconv-lite": "^0.5.0", - "mkdirp": "^0.5.1", - "pump": "^3.0.0", - "streamifier": "^0.1.1", - "tar-stream": "^1.5.2", - "yazl": "^2.4.2" - }, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -1253,7 +1152,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1270,7 +1168,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -1287,7 +1184,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -1306,19 +1202,10 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -1330,7 +1217,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -1413,24 +1299,10 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/fd-slicer2": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fd-slicer2/-/fd-slicer2-1.2.0.tgz", - "integrity": "sha512-3lBUNUckhMZduCc4g+Pw4Ve16LD9vpX9b8qUkkKq2mgDRLYWzblszZH2luADnJqjJe+cypngjCuKRm/IW12rRw==", - "dependencies": { - "pend": "^1.2.0" - } - }, - "node_modules/flushwritable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flushwritable/-/flushwritable-1.0.0.tgz", - "integrity": "sha512-3VELfuWCLVzt5d2Gblk8qcqFro6nuwvxwMzHaENVDHI7rxcBRtMCwTk/E9FXcgh+82DSpavPNDueA9+RxXJoFg==" - }, "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "dev": true, "funding": [ { "type": "individual", @@ -1450,7 +1322,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -1460,16 +1331,10 @@ "node": ">= 6" } }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, "node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, "dependencies": { "minipass": "^3.0.0" }, @@ -1481,7 +1346,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -1507,7 +1371,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1533,7 +1396,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -1548,11 +1410,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-ready": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-ready/-/get-ready-1.0.0.tgz", - "integrity": "sha512-mFXCZPJIlcYcth+N8267+mghfYN9h3EhsDa6JSnbA3Wrhh/XFpuowviFcsDeYZtKspQyWyJqfs4O6P8CHeTwzw==" - }, "node_modules/get-stream": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", @@ -1569,7 +1426,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, "dependencies": { "define-properties": "^1.1.3" }, @@ -1584,7 +1440,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -1596,7 +1451,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -1608,7 +1462,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -1620,7 +1473,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -1632,7 +1484,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -1649,21 +1500,17 @@ "node": ">=16.17.0" } }, - "node_modules/iconv-lite": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.2.tgz", - "integrity": "sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "dev": true }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", @@ -1677,7 +1524,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/is-it-type/-/is-it-type-5.1.2.tgz", "integrity": "sha512-q/gOZQTNYABAxaXWnBKZjTFH4yACvWEFtgVOj+LbgxYIgAJG1xVmUZOsECSrZPIemYUQvaQWVilSFVbh4Eyt8A==", - "dev": true, "dependencies": { "@babel/runtime": "^7.16.7", "globalthis": "^1.0.2" @@ -1701,7 +1547,8 @@ "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true }, "node_modules/isexe": { "version": "2.0.0", @@ -1721,6 +1568,27 @@ "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", "dev": true }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "dev": true, + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/local-pkg": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", @@ -1779,7 +1647,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -1788,7 +1655,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -1808,19 +1674,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -1829,7 +1686,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -1842,7 +1698,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -1851,14 +1706,14 @@ } }, "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dependencies": { - "minimist": "^1.2.6" - }, + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "bin": { "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/mlly": { @@ -1928,19 +1783,10 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "engines": { "node": ">= 0.4" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/onetime": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", @@ -1971,6 +1817,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -1995,11 +1847,6 @@ "node": "*" } }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -2059,37 +1906,16 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/react-is": { "version": "18.2.0", @@ -2101,6 +1927,7 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -2111,16 +1938,10 @@ "util-deprecate": "~1.0.1" } }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/require-directory": { "version": "2.1.1", @@ -2163,28 +1984,24 @@ } }, "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "node_modules/selenium-webdriver": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.18.1.tgz", + "integrity": "sha512-uP4OJ5wR4+VjdTi5oi/k8oieV2fIhVdVuaOPrklKghgS59w7Zz3nGa5gcG73VcU9EBRv5IZEBRhPr7qFJAj5mQ==", + "dev": true, + "dependencies": { + "jszip": "^3.10.1", + "tmp": "^0.2.1", + "ws": ">=8.14.2" + }, + "engines": { + "node": ">= 14.20.0" + } }, "node_modules/semver": { "version": "7.6.0", @@ -2200,6 +2017,12 @@ "node": ">=10" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2243,7 +2066,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/simple-invariant/-/simple-invariant-2.0.1.tgz", "integrity": "sha512-1sbhsxqI+I2tqlmjbz99GXNmZtr6tKIyEgGGnJw/MKGblalqk/XoOYYFJlBzTKZCxx8kLaD3FD5s9BEEjx5Pyg==", - "dev": true, "engines": { "node": ">=10" } @@ -2269,27 +2091,15 @@ "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", "dev": true }, - "node_modules/streamifier": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", - "integrity": "sha512-zDgl+muIlWzXNsXeyUfOk9dChMjlpkq0DRsxujtYPgyJ676yQ8jEm6zzaaWHFDg5BNcLuif0eD2MTyJdZqXpdg==", - "engines": { - "node": ">=0.10" - } - }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "dependencies": { "safe-buffer": "~5.1.0" } }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -2342,7 +2152,6 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -2355,35 +2164,6 @@ "node": ">=10" } }, - "node_modules/tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dependencies": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/tar/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/tinybench": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.6.0.tgz", @@ -2408,16 +2188,19 @@ "node": ">=14.0.0" } }, - "node_modules/to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + "node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true, + "engines": { + "node": ">=14.14" + } }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true, "optional": true }, "node_modules/type-detect": { @@ -2430,20 +2213,21 @@ } }, "node_modules/ufo": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.4.0.tgz", - "integrity": "sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==", "dev": true }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/vite": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.2.tgz", - "integrity": "sha512-FWZbz0oSdLq5snUI0b6sULbz58iXFXdvkZfZWR/F0ZJuKTSPO7v72QPXt6KqYeMFb0yytNp6kZosxJ96Nr/wDQ==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.6.tgz", + "integrity": "sha512-FPtnxFlSIKYjZ2eosBQamz4CbyrTizbZ3hnGJlh/wMtCrlp1Hah6AzBLjGI5I2urTfNnpovpHdrL6YRuBOPnCA==", "dev": true, "dependencies": { "esbuild": "^0.20.1", @@ -2629,17 +2413,39 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "dev": true, "engines": { - "node": ">=0.4" + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/y18n": { @@ -2684,7 +2490,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yauzl-promise/-/yauzl-promise-4.0.0.tgz", "integrity": "sha512-/HCXpyHXJQQHvFq9noqrjfa/WpQC2XYs3vI7tBiAi4QiIU1knvYhZGaO1QPjwIVMdqflxbmwgMXtYeaRiAE0CA==", - "dev": true, "dependencies": { "@node-rs/crc32": "^1.7.0", "is-it-type": "^5.1.2", @@ -2694,14 +2499,6 @@ "node": ">=16" } }, - "node_modules/yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "dependencies": { - "buffer-crc32": "~0.2.3" - } - }, "node_modules/yocto-queue": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", diff --git a/package.json b/package.json index 435d93c..f805332 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,18 @@ { "name": "nw", - "version": "0.85.0", + "version": "0.85.0-1", "description": "An installer for nw.js", "repository": { "type": "git", "url": "git://github.com/nwjs/npm-installer.git" }, "type": "module", - "main": "lib/findpath.js", + "main": "src/index.js", "bin": { "nw": "bin/nw.js" }, "scripts": { - "postinstall": "node lib/install.js", + "postinstall": "node src/postinstall.js", "test": "vitest run", "demo": "nw ./test/app" }, @@ -33,10 +33,11 @@ ], "license": "MIT", "dependencies": { - "cli-progress": "^3.12.0", - "compressing": "^1.10.0", + "axios": "^1.6.8", "semver": "^7.5.4", - "yargs": "^17.7.2" + "tar": "^6.2.1", + "yargs": "^17.7.2", + "yauzl-promise": "^4.0.0" }, "keywords": [ "nw", @@ -51,9 +52,7 @@ "application" ], "devDependencies": { - "axios": "^1.6.8", - "tar": "^6.2.1", - "vitest": "^1.4.0", - "yauzl-promise": "^4.0.0" + "selenium-webdriver": "^4.18.1", + "vitest": "^1.4.0" } } diff --git a/src/decompress.js b/src/decompress.js index c168d5b..98e815a 100644 --- a/src/decompress.js +++ b/src/decompress.js @@ -5,6 +5,8 @@ import stream from "node:stream"; import tar from "tar"; import yauzl from "yauzl-promise"; +import util from "./util.js"; + /** * Decompresses a file at `filePath` to `cacheDir` directory. * @@ -52,31 +54,31 @@ async function unzip(zippedFile, cacheDir) { while (entry !== null) { let entryPathAbs = path.join(cacheDir, entry.filename); - // Check if entry is a symbolic link + /* Check if entry is a symbolic link */ const isSymlink = ((modeFromEntry(entry) & 0o170000) === 0o120000); if (isSymlink) { - // Store symlink entries to process later + /* Store symlink entries to process later */ symlinks.push(entry); } else { - // Handle regular files and directories + /* Handle regular files and directories */ await fs.promises.mkdir(path.dirname(entryPathAbs), {recursive: true}); if (!entry.filename.endsWith('/')) { // Skip directories const readStream = await entry.openReadStream(); const writeStream = fs.createWriteStream(entryPathAbs); await stream.promises.pipeline(readStream, writeStream); - // Set file permissions after the file has been written + /* Set file permissions after the file has been written */ const mode = modeFromEntry(entry); await fs.promises.chmod(entryPathAbs, mode); } } - // Read next entry + /* Read next entry */ entry = await zip.readEntry(); } - // Process symbolic links after all other files have been extracted + /* Process symbolic links after all other files have been extracted */ for (const symlinkEntry of symlinks) { let entryPathAbs = path.join(cacheDir, symlinkEntry.filename); const readStream = await symlinkEntry.openReadStream(); @@ -85,11 +87,8 @@ async function unzip(zippedFile, cacheDir) { await new Promise(resolve => readStream.on("end", resolve)); const linkTarget = Buffer.concat(chunks).toString('utf8').trim(); - // Check if the symlink or a file/directory already exists at the destination - if (fs.existsSync(entryPathAbs)) { - //skip - } else { - // Create symbolic link + const fileExists = await util.fileExists(entryPathAbs); + if (!fileExists) { await fs.promises.symlink(linkTarget, entryPathAbs); } } diff --git a/src/get.js b/src/get.js index 20b5e99..94b5804 100644 --- a/src/get.js +++ b/src/get.js @@ -88,6 +88,8 @@ async function get(options) { await decompress(nwFilePath, options.cacheDir); + await fs.promises.symlink(nwDirPath, './nwjs', ); + if (options.ffmpeg === true) { /** diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..6c010ed --- /dev/null +++ b/src/index.js @@ -0,0 +1,8 @@ +import get from './get.js'; +import util from './util.js'; + +const { findpath } = util; + +export { + findpath, +} diff --git a/src/postinstall.js b/src/postinstall.js new file mode 100644 index 0000000..02c069d --- /dev/null +++ b/src/postinstall.js @@ -0,0 +1,63 @@ +import process from 'node:process'; + +import semver from 'semver'; + +import get from './get.js'; +import util from './util.js'; + +import nodeManifest from '../package.json' assert { type: 'json' }; + +await postinstall() + .catch((error) => { + if (error.code === 'EPERM') { + console.error('Unable to create symlink since user did not run as Administrator.'); + } + }); + +async function postinstall() { + const parsedVersion = semver.parse(nodeManifest.version); + let version = [ + parsedVersion.major, + parsedVersion.minor, + parsedVersion.patch + ].join('.'); + + let flavor = process.env.npm_config_nwjs_build_type || process.env.NWJS_BUILD_TYPE || 'normal'; + /* Check if version is a prelease. */ + if (typeof parsedVersion?.prerelease?.[0] === 'string') { + let prerelease = parsedVersion.prerelease[0].split('-'); + if (prerelease.length > 1) { + prerelease = prerelease.slice(0, -1); + } + version = [version, ...prerelease].join('-'); + } + + /* Check build flavor and slice that off the `version`. */ + if (version.endsWith('-sdk')) { + version = version.slice(0, -4); + flavor = 'sdk'; + } else if (version.endsWith('sdk')) { + version = version.slice(0, -3); + flavor = 'sdk'; + } + + const platform = util.PLATFORM_KV[process.env.npm_config_nwjs_platform || process.env.NWJS_PLATFORM || process.platform]; + const arch = util.ARCH_KV[process.env.npm_config_nwjs_process_arch || process.env.NWJS_ARCH || process.arch]; + const downloadUrl = process.env.npm_config_nwjs_urlbase || process.env.NWJS_URLBASE || 'https://dl.nwjs.io'; + const cacheDir = process.env.npm_config_nwjs_cache_dir || process.env.NWJS_CACHE_DIR || '.'; + const cache = process.env.npm_config_nwjs_cache || process.env.NWJS_CACHE || true; + const ffmpeg = process.env.npm_config_nwjs_ffmpeg || process.env.NWJS_FFMPEG || false; + const nativeAddon = process.env.npm_config_nwjs_native_addon || process.env.NWJS_NATIVE_ADDON || false; + + await get({ + version, + flavor, + platform, + arch, + downloadUrl, + cacheDir, + cache, + ffmpeg: ffmpeg, + nativeAddon: nativeAddon + }); +} diff --git a/src/util.js b/src/util.js index 26a3a82..415cc72 100644 --- a/src/util.js +++ b/src/util.js @@ -1,4 +1,9 @@ import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import url from 'node:url'; + +const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); /** * Check if file exists at specified path. @@ -34,4 +39,51 @@ const EXE_NAME = { linux: "nw", }; -export default { ARCH_KV, EXE_NAME, PLATFORM_KV, fileExists } +/** + * Get the platform dependant path of the NW.js or ChromeDriver binary. + * + * @param {'nwjs' | 'chromedriver'} executable Path to NW.js or Chromedriver executable. + * @return {string} + */ +function findpath(executable = 'nwjs') { + const nwDir = path.resolve(__dirname, '..', 'nwjs'); + /** + * File path to executable. + * + * @type {string} + */ + let binPath = ''; + + /** + * Host operating system + * + * @type {NodeJS.Platform} + */ + let hostOs = PLATFORM_KV[process.env.npm_config_nwjs_platform || process.env.NWJS_PLATFORM || process.platform]; + + /** + * Get the platform dependant path of the NW.js binary. + */ + function findNwjs() { + binPath = path.resolve(nwDir, EXE_NAME[hostOs]); + } + + /** + * Get the platform dependant path of the ChromeDriver binary. + */ + function findChromeDriver() { + binPath = path.resolve(nwDir, `chromedriver${process.platform === "win32" ? ".exe" : ""}`); + } + + if (executable === 'nwjs') { + findNwjs(); + } else if (executable === 'chromedriver') { + findChromeDriver(); + } else { + console.error(`[ ERROR ] Expected nwjs or chromedriver, got ${executable}.`); + } + + return binPath; +} + +export default { ARCH_KV, EXE_NAME, PLATFORM_KV, fileExists, findpath } diff --git a/test/app/index.html b/test/app/index.html index 2924f37..89154cd 100644 --- a/test/app/index.html +++ b/test/app/index.html @@ -3,7 +3,7 @@ NW.js Demo - + Hello, World! Is anyone out there? diff --git a/test/index.test.js b/test/index.test.js index 4b209b6..2044701 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -1,12 +1,8 @@ import fs from 'node:fs'; import { expect, test } from 'vitest'; -import { findpath } from '../lib/findpath.js'; +import util from '../src/util.js'; test('nwjs has downloaded and been extracted', function() { - expect(fs.existsSync(findpath())).toBe(true); -}); - -test('chromedriver does not exist in normal build', function() { - expect(fs.existsSync(findpath('chromedriver'))).toBe(false); + expect(fs.existsSync(util.findpath())).toBe(true); }); diff --git a/test/selenium.test.js b/test/selenium.test.js new file mode 100644 index 0000000..e3fba08 --- /dev/null +++ b/test/selenium.test.js @@ -0,0 +1,31 @@ +import assert from "node:assert"; +import path from "node:path"; + +import { By } from "selenium-webdriver"; +import chrome from "selenium-webdriver/chrome.js"; +import { describe, it } from "vitest"; + +import util from "../src/util.js"; + +const { Driver, ServiceBuilder, Options } = chrome; + +describe("run", async () => { + let driver = undefined; + + it("should run post install", async () => { + const options = new Options(); + const args = [ + `--nwapp=${path.resolve("test", "app")}`, + "--headless=new", + ]; + options.addArguments(args); + + const chromedriverPath = util.findpath("chromedriver"); + + const service = new ServiceBuilder(chromedriverPath).build(); + + driver = Driver.createSession(options, service); + const text = await driver.findElement(By.id("test")).getText(); + assert.strictEqual(text, "Hello, World! Is anyone out there?"); + }, { timeout: Infinity }); +});