From 43a3d0f9bf1215a877cb9a649c32bf3a2a01da21 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Fri, 10 Jan 2025 08:50:48 +0100 Subject: [PATCH 1/2] Make usb-power an optional package --- lib/android/index.js | 12 ++- lib/chrome/webdriver/chromium.js | 17 +++- lib/firefox/webdriver/firefox.js | 17 +++- lib/support/usbPower.js | 11 +++ package-lock.json | 160 ++++++++++++++++++++++++------- package.json | 4 +- 6 files changed, 174 insertions(+), 47 deletions(-) create mode 100644 lib/support/usbPower.js diff --git a/lib/android/index.js b/lib/android/index.js index 65d2c97fc..c1769f03a 100644 --- a/lib/android/index.js +++ b/lib/android/index.js @@ -5,7 +5,7 @@ import { EOL as endOfLine } from 'node:os'; import { execa } from 'execa'; import { getLogger } from '@sitespeed.io/log'; import pkg from '@devicefarmer/adbkit'; -import usbPowerProfiler from 'usb-power-profiling/usb-power-profiling.js'; +import { loadUsbPowerProfiler } from './support/usbPower.js'; const { Adb } = pkg; import get from 'lodash.get'; import { pathToFolder } from '../support/pathToFolder.js'; @@ -474,6 +474,11 @@ export class Android { } async getUsbPowerUsageProfile(index, url, result, options, storageManager) { + const usbPowerProfiler = await loadUsbPowerProfiler(); + if (!usbPowerProfiler) { + log.info('USB profiler is not installed'); + return; + } let profileData = await usbPowerProfiler.profileFromData(); let destinationFilename = path.join( await pathToFolder(url, options), @@ -485,6 +490,11 @@ export class Android { } async function getUsbPowerUsage(startTime, endTime) { + const usbPowerProfiler = await loadUsbPowerProfiler(); + if (!usbPowerProfiler) { + log.info('USB profiler is not installed'); + return; + } let baselineUsageData = await usbPowerProfiler.getPowerData( startTime - 2, endTime - 1 diff --git a/lib/chrome/webdriver/chromium.js b/lib/chrome/webdriver/chromium.js index e9188dbc7..8c86ada27 100644 --- a/lib/chrome/webdriver/chromium.js +++ b/lib/chrome/webdriver/chromium.js @@ -3,7 +3,7 @@ import { unlink as _unlink, rm as _rm } from 'node:fs'; import path from 'node:path'; import { logging } from 'selenium-webdriver'; import { getLogger } from '@sitespeed.io/log'; -import usbPowerProfiler from 'usb-power-profiling/usb-power-profiling.js'; +import { loadUsbPowerProfiler } from './support/usbPower.js'; const log = getLogger('browsertime.chrome'); const { Type } = logging; import { longTaskMetrics } from '../longTaskMetrics.js'; @@ -80,7 +80,10 @@ export class Chromium { await this.android.addDevtoolsFw(); if (this.options.androidUsbPower) { - usbPowerProfiler.startSampling(); + const usbPowerProfiler = await loadUsbPowerProfiler(); + if (usbPowerProfiler) { + usbPowerProfiler.startSampling(); + } } } @@ -171,7 +174,10 @@ export class Chromium { if (this.options.androidPower) { await this.android.resetPowerUsage(); } else if (this.options.androidUsbPower) { - await usbPowerProfiler.resetPowerData(); + const usbPowerProfiler = await loadUsbPowerProfiler(); + if (usbPowerProfiler) { + await usbPowerProfiler.resetPowerData(); + } } } @@ -511,7 +517,10 @@ export class Chromium { if (this.options.androidPower) { await this.android.stopPowerTesting(); } else if (this.options.androidUsbPower) { - await usbPowerProfiler.stopSampling(); + const usbPowerProfiler = await loadUsbPowerProfiler(); + if (usbPowerProfiler) { + await usbPowerProfiler.stopSampling(); + } } } diff --git a/lib/firefox/webdriver/firefox.js b/lib/firefox/webdriver/firefox.js index 38f09ac95..348f50e57 100644 --- a/lib/firefox/webdriver/firefox.js +++ b/lib/firefox/webdriver/firefox.js @@ -3,7 +3,7 @@ import { promisify } from 'node:util'; import path from 'node:path'; import { getLogger } from '@sitespeed.io/log'; import get from 'lodash.get'; -import usbPowerProfiler from 'usb-power-profiling/usb-power-profiling.js'; +import { loadUsbPowerProfiler } from './support/usbPower.js'; import { adapters } from 'ff-test-bidi-har-export'; import { getEmptyHAR, mergeHars } from '../../support/har/index.js'; import { pathToFolder } from '../../support/pathToFolder.js'; @@ -75,7 +75,10 @@ export class Firefox { ); if (isAndroidConfigured(this.options) && this.options.androidUsbPower) { - usbPowerProfiler.startSampling(); + const usbPowerProfiler = await loadUsbPowerProfiler(); + if (usbPowerProfiler) { + usbPowerProfiler.startSampling(); + } } } @@ -144,7 +147,10 @@ export class Firefox { if (this.options.androidPower) { await this.android.resetPowerUsage(); } else if (this.options.androidUsbPower) { - await usbPowerProfiler.resetPowerData(); + const usbPowerProfiler = await loadUsbPowerProfiler(); + if (usbPowerProfiler) { + await usbPowerProfiler.resetPowerData(); + } } } @@ -408,7 +414,10 @@ export class Firefox { if (this.options.androidPower) { await this.android.stopPowerTesting(); } else if (this.options.androidUsbPower) { - await usbPowerProfiler.stopSampling(); + const usbPowerProfiler = await loadUsbPowerProfiler(); + if (usbPowerProfiler) { + await usbPowerProfiler.stopSampling(); + } } } } diff --git a/lib/support/usbPower.js b/lib/support/usbPower.js new file mode 100644 index 000000000..c98138dd4 --- /dev/null +++ b/lib/support/usbPower.js @@ -0,0 +1,11 @@ +export async function loadUsbPowerProfiler() { + try { + // usb-power-profiling/usb-power-profiling.js exports a default, so we destructure it + const { default: usbPowerProfiler } = await import( + 'usb-power-profiling/usb-power-profiling.js' + ); + return usbPowerProfiler; + } catch { + return; + } +} diff --git a/package-lock.json b/package-lock.json index 22fa3d7e3..13af1ac05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,6 @@ "lodash.merge": "4.6.2", "lodash.set": "4.3.2", "selenium-webdriver": "4.27.0", - "usb-power-profiling": "1.5.0", "yargs": "17.7.2" }, "bin": { @@ -53,7 +52,8 @@ "@jimp/jpeg": "0.22.12", "@jimp/plugin-resize": "0.22.12", "@jimp/plugin-scale": "0.22.12", - "@jimp/png": "0.22.12" + "@jimp/png": "0.22.12", + "usb-power-profiling": "1.5.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -878,6 +878,7 @@ "version": "10.2.2", "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz", "integrity": "sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==", + "optional": true, "dependencies": { "@serialport/bindings-interface": "^1.2.1", "debug": "^4.3.3" @@ -890,6 +891,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "optional": true, "dependencies": { "ms": "2.1.2" }, @@ -907,6 +909,7 @@ "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-12.0.1.tgz", "integrity": "sha512-r2XOwY2dDvbW7dKqSPIk2gzsr6M6Qpe9+/Ngs94fNaNlcTRCV02PfaoDmRgcubpNVVcLATlxSxPTIDw12dbKOg==", "hasInstallScript": true, + "optional": true, "dependencies": { "@serialport/bindings-interface": "1.2.2", "@serialport/parser-readline": "11.0.0", @@ -925,6 +928,7 @@ "version": "11.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-11.0.0.tgz", "integrity": "sha512-aZLJhlRTjSmEwllLG7S4J8s8ctRAS0cbvCpO87smLvl3e4BgzbVgF6Z6zaJd3Aji2uSiYgfedCdNc4L6W+1E2g==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -936,6 +940,7 @@ "version": "11.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-11.0.0.tgz", "integrity": "sha512-rRAivhRkT3YO28WjmmG4FQX6L+KMb5/ikhyylRfzWPw0nSXy97+u07peS9CbHqaNvJkMhH1locp2H36aGMOEIA==", + "optional": true, "dependencies": { "@serialport/parser-delimiter": "11.0.0" }, @@ -950,6 +955,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "optional": true, "dependencies": { "ms": "2.1.2" }, @@ -965,12 +971,14 @@ "node_modules/@serialport/bindings-cpp/node_modules/node-addon-api": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz", - "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==" + "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==", + "optional": true }, "node_modules/@serialport/bindings-cpp/node_modules/node-gyp-build": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "optional": true, "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -981,6 +989,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.2.tgz", "integrity": "sha512-CJaUd5bLvtM9c5dmO9rPBHPXTa9R2UwpkJ0wdh9JCYcbrPWsKz+ErvR0hBLeo7NPeiFdjFO4sonRljiw4d2XiA==", + "optional": true, "engines": { "node": "^12.22 || ^14.13 || >=16" } @@ -989,6 +998,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-12.0.0.tgz", "integrity": "sha512-0ei0txFAj+s6FTiCJFBJ1T2hpKkX8Md0Pu6dqMrYoirjPskDLJRgZGLqoy3/lnU1bkvHpnJO+9oJ3PB9v8rNlg==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -1000,6 +1010,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-12.0.0.tgz", "integrity": "sha512-0PfLzO9t2X5ufKuBO34DQKLXrCCqS9xz2D0pfuaLNeTkyGUBv426zxoMf3rsMRodDOZNbFblu3Ae84MOQXjnZw==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -1011,6 +1022,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-12.0.0.tgz", "integrity": "sha512-gu26tVt5lQoybhorLTPsH2j2LnX3AOP2x/34+DUSTNaUTzu2fBXw+isVjQJpUBFWu6aeQRZw5bJol5X9Gxjblw==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -1022,6 +1034,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-12.0.0.tgz", "integrity": "sha512-GnCh8K0NAESfhCuXAt+FfBRz1Cf9CzIgXfp7SdMgXwrtuUnCC/yuRTUFWRvuzhYKoAo1TL0hhUo77SFHUH1T/w==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -1033,6 +1046,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-packet-length/-/parser-packet-length-12.0.0.tgz", "integrity": "sha512-p1hiCRqvGHHLCN/8ZiPUY/G0zrxd7gtZs251n+cfNTn+87rwcdUeu9Dps3Aadx30/sOGGFL6brIRGK4l/t7MuQ==", + "optional": true, "engines": { "node": ">=8.6.0" } @@ -1041,6 +1055,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-12.0.0.tgz", "integrity": "sha512-O7cywCWC8PiOMvo/gglEBfAkLjp/SENEML46BXDykfKP5mTPM46XMaX1L0waWU6DXJpBgjaL7+yX6VriVPbN4w==", + "optional": true, "dependencies": { "@serialport/parser-delimiter": "12.0.0" }, @@ -1055,6 +1070,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-12.0.0.tgz", "integrity": "sha512-ygDwj3O4SDpZlbrRUraoXIoIqb8sM7aMKryGjYTIF0JRnKeB1ys8+wIp0RFMdFbO62YriUDextHB5Um5cKFSWg==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -1066,6 +1082,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-12.0.0.tgz", "integrity": "sha512-dCAVh4P/pZrLcPv9NJ2mvPRBg64L5jXuiRxIlyxxdZGH4WubwXVXY/kBTihQmiAMPxbT3yshSX8f2+feqWsxqA==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -1077,6 +1094,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-slip-encoder/-/parser-slip-encoder-12.0.0.tgz", "integrity": "sha512-0APxDGR9YvJXTRfY+uRGhzOhTpU5akSH183RUcwzN7QXh8/1jwFsFLCu0grmAUfi+fItCkR+Xr1TcNJLR13VNA==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -1088,6 +1106,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-spacepacket/-/parser-spacepacket-12.0.0.tgz", "integrity": "sha512-dozONxhPC/78pntuxpz/NOtVps8qIc/UZzdc/LuPvVsqCoJXiRxOg6ZtCP/W58iibJDKPZPAWPGYeZt9DJxI+Q==", + "optional": true, "engines": { "node": ">=12.0.0" }, @@ -1099,6 +1118,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-12.0.0.tgz", "integrity": "sha512-9On64rhzuqKdOQyiYLYv2lQOh3TZU/D3+IWCR5gk0alPel2nwpp4YwDEGiUBfrQZEdQ6xww0PWkzqth4wqwX3Q==", + "optional": true, "dependencies": { "@serialport/bindings-interface": "1.2.2", "debug": "4.3.4" @@ -1114,6 +1134,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "optional": true, "dependencies": { "ms": "2.1.2" }, @@ -1291,7 +1312,8 @@ "node_modules/@types/w3c-web-usb": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.10.tgz", - "integrity": "sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ==" + "integrity": "sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ==", + "optional": true }, "node_modules/@types/ws": { "version": "8.5.10", @@ -1666,7 +1688,8 @@ "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "devOptional": true }, "node_modules/base64-js": { "version": "1.5.1", @@ -1808,6 +1831,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "devOptional": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1903,6 +1927,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -2514,7 +2539,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "devOptional": true }, "node_modules/concordance": { "version": "5.0.4", @@ -2548,6 +2574,7 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -2582,7 +2609,8 @@ "node_modules/crc-full": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/crc-full/-/crc-full-1.1.0.tgz", - "integrity": "sha512-7YK4t8C9PiekOSnBotYjU2roaaorUXHyT+Xzb12Zgg4DsfG58AxmPk2/wx7XnC9UXyriqRvl3c+U0zFsZkdVYg==" + "integrity": "sha512-7YK4t8C9PiekOSnBotYjU2roaaorUXHyT+Xzb12Zgg4DsfG58AxmPk2/wx7XnC9UXyriqRvl3c+U0zFsZkdVYg==", + "optional": true }, "node_modules/cross-spawn": { "version": "7.0.6", @@ -4424,6 +4452,7 @@ "version": "1.33.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -4432,6 +4461,7 @@ "version": "2.1.18", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "devOptional": true, "dependencies": { "mime-db": "~1.33.0" }, @@ -4464,6 +4494,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "devOptional": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4554,7 +4585,8 @@ "node_modules/node-addon-api": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "optional": true }, "node_modules/node-downloader-helper": { "version": "2.1.9", @@ -4599,6 +4631,7 @@ "version": "4.8.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "devOptional": true, "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -4610,6 +4643,7 @@ "resolved": "https://registry.npmjs.org/node-hid/-/node-hid-3.0.0.tgz", "integrity": "sha512-8CZdobqYCKTnKx9M5r9/clAehC7jOLXu9Ts2ItMWVT6LJa0bjmkkM1SdB7TgJsothng7GE/Y+fex5AidiJLjKA==", "hasInstallScript": true, + "optional": true, "dependencies": { "node-addon-api": "^3.2.1", "pkg-prebuilds": "^0.2.1" @@ -4910,7 +4944,8 @@ "node_modules/path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==" + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "devOptional": true }, "node_modules/path-key": { "version": "3.1.1", @@ -4954,7 +4989,8 @@ "node_modules/path-to-regexp": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", - "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==" + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "devOptional": true }, "node_modules/path-type": { "version": "5.0.0", @@ -5024,6 +5060,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/pkg-prebuilds/-/pkg-prebuilds-0.2.1.tgz", "integrity": "sha512-FdOlDiRqRL7i9aYzQflhGWCoiJf/8u6Qgzq48gKsRDYejtfjvGb1U5QGSzllcqpNg2a8Swx/9fMgtuVefwU+zw==", + "optional": true, "dependencies": { "yargs": "^17.5.1" }, @@ -5165,6 +5202,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -5625,6 +5663,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/serialport/-/serialport-12.0.0.tgz", "integrity": "sha512-AmH3D9hHPFmnF/oq/rvigfiAouAKyK/TjnrkwZRYSFZxNggJxwvbAbfYrLeuvq7ktUdhuHdVdSjj852Z55R+uA==", + "optional": true, "dependencies": { "@serialport/binding-mock": "10.2.2", "@serialport/bindings-cpp": "12.0.1", @@ -5652,6 +5691,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "optional": true, "dependencies": { "ms": "2.1.2" }, @@ -5693,6 +5733,7 @@ "version": "6.1.6", "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.6.tgz", "integrity": "sha512-x5RL9Y2p5+Sh3D38Fh9i/iQ5ZK+e4xuXRd/pGbM4D13tgo/MGwbttUk8emytcr1YYzBYs+apnUngBDFYfpjPuQ==", + "devOptional": true, "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", @@ -6438,6 +6479,7 @@ "resolved": "https://registry.npmjs.org/usb/-/usb-2.12.1.tgz", "integrity": "sha512-hgtoSQUFuMXVJBApelpUTiX7ZB83MQCbYeHTBsHftA2JG7YZ76ycwIgKQhkhKqVY76C8K6xJscHpF7Ep0eG3pQ==", "hasInstallScript": true, + "optional": true, "dependencies": { "@types/w3c-web-usb": "^1.0.6", "node-addon-api": "^7.0.0", @@ -6452,6 +6494,7 @@ "resolved": "https://registry.npmjs.org/usb-power-profiling/-/usb-power-profiling-1.5.0.tgz", "integrity": "sha512-wCgiNNw26eokowJYwDUURmy/em12YrIKXsAdThUU0q7izaZ/+4EhWk8n30jPpYVzxKIsms8z7sk2ARr9tzaLwA==", "license": "MPL-2.0", + "optional": true, "dependencies": { "crc-full": "^1.1.0", "node-hid": "^3.0.0", @@ -6464,6 +6507,7 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", + "optional": true, "engines": { "node": "^16 || ^18 || >= 20" } @@ -7440,6 +7484,7 @@ "version": "10.2.2", "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz", "integrity": "sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==", + "optional": true, "requires": { "@serialport/bindings-interface": "^1.2.1", "debug": "^4.3.3" @@ -7449,6 +7494,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "optional": true, "requires": { "ms": "2.1.2" } @@ -7459,6 +7505,7 @@ "version": "12.0.1", "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-12.0.1.tgz", "integrity": "sha512-r2XOwY2dDvbW7dKqSPIk2gzsr6M6Qpe9+/Ngs94fNaNlcTRCV02PfaoDmRgcubpNVVcLATlxSxPTIDw12dbKOg==", + "optional": true, "requires": { "@serialport/bindings-interface": "1.2.2", "@serialport/parser-readline": "11.0.0", @@ -7470,12 +7517,14 @@ "@serialport/parser-delimiter": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-11.0.0.tgz", - "integrity": "sha512-aZLJhlRTjSmEwllLG7S4J8s8ctRAS0cbvCpO87smLvl3e4BgzbVgF6Z6zaJd3Aji2uSiYgfedCdNc4L6W+1E2g==" + "integrity": "sha512-aZLJhlRTjSmEwllLG7S4J8s8ctRAS0cbvCpO87smLvl3e4BgzbVgF6Z6zaJd3Aji2uSiYgfedCdNc4L6W+1E2g==", + "optional": true }, "@serialport/parser-readline": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-11.0.0.tgz", "integrity": "sha512-rRAivhRkT3YO28WjmmG4FQX6L+KMb5/ikhyylRfzWPw0nSXy97+u07peS9CbHqaNvJkMhH1locp2H36aGMOEIA==", + "optional": true, "requires": { "@serialport/parser-delimiter": "11.0.0" } @@ -7484,6 +7533,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "optional": true, "requires": { "ms": "2.1.2" } @@ -7491,49 +7541,58 @@ "node-addon-api": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz", - "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==" + "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==", + "optional": true }, "node-gyp-build": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==" + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "optional": true } } }, "@serialport/bindings-interface": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.2.tgz", - "integrity": "sha512-CJaUd5bLvtM9c5dmO9rPBHPXTa9R2UwpkJ0wdh9JCYcbrPWsKz+ErvR0hBLeo7NPeiFdjFO4sonRljiw4d2XiA==" + "integrity": "sha512-CJaUd5bLvtM9c5dmO9rPBHPXTa9R2UwpkJ0wdh9JCYcbrPWsKz+ErvR0hBLeo7NPeiFdjFO4sonRljiw4d2XiA==", + "optional": true }, "@serialport/parser-byte-length": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-12.0.0.tgz", - "integrity": "sha512-0ei0txFAj+s6FTiCJFBJ1T2hpKkX8Md0Pu6dqMrYoirjPskDLJRgZGLqoy3/lnU1bkvHpnJO+9oJ3PB9v8rNlg==" + "integrity": "sha512-0ei0txFAj+s6FTiCJFBJ1T2hpKkX8Md0Pu6dqMrYoirjPskDLJRgZGLqoy3/lnU1bkvHpnJO+9oJ3PB9v8rNlg==", + "optional": true }, "@serialport/parser-cctalk": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-12.0.0.tgz", - "integrity": "sha512-0PfLzO9t2X5ufKuBO34DQKLXrCCqS9xz2D0pfuaLNeTkyGUBv426zxoMf3rsMRodDOZNbFblu3Ae84MOQXjnZw==" + "integrity": "sha512-0PfLzO9t2X5ufKuBO34DQKLXrCCqS9xz2D0pfuaLNeTkyGUBv426zxoMf3rsMRodDOZNbFblu3Ae84MOQXjnZw==", + "optional": true }, "@serialport/parser-delimiter": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-12.0.0.tgz", - "integrity": "sha512-gu26tVt5lQoybhorLTPsH2j2LnX3AOP2x/34+DUSTNaUTzu2fBXw+isVjQJpUBFWu6aeQRZw5bJol5X9Gxjblw==" + "integrity": "sha512-gu26tVt5lQoybhorLTPsH2j2LnX3AOP2x/34+DUSTNaUTzu2fBXw+isVjQJpUBFWu6aeQRZw5bJol5X9Gxjblw==", + "optional": true }, "@serialport/parser-inter-byte-timeout": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-12.0.0.tgz", - "integrity": "sha512-GnCh8K0NAESfhCuXAt+FfBRz1Cf9CzIgXfp7SdMgXwrtuUnCC/yuRTUFWRvuzhYKoAo1TL0hhUo77SFHUH1T/w==" + "integrity": "sha512-GnCh8K0NAESfhCuXAt+FfBRz1Cf9CzIgXfp7SdMgXwrtuUnCC/yuRTUFWRvuzhYKoAo1TL0hhUo77SFHUH1T/w==", + "optional": true }, "@serialport/parser-packet-length": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-packet-length/-/parser-packet-length-12.0.0.tgz", - "integrity": "sha512-p1hiCRqvGHHLCN/8ZiPUY/G0zrxd7gtZs251n+cfNTn+87rwcdUeu9Dps3Aadx30/sOGGFL6brIRGK4l/t7MuQ==" + "integrity": "sha512-p1hiCRqvGHHLCN/8ZiPUY/G0zrxd7gtZs251n+cfNTn+87rwcdUeu9Dps3Aadx30/sOGGFL6brIRGK4l/t7MuQ==", + "optional": true }, "@serialport/parser-readline": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-12.0.0.tgz", "integrity": "sha512-O7cywCWC8PiOMvo/gglEBfAkLjp/SENEML46BXDykfKP5mTPM46XMaX1L0waWU6DXJpBgjaL7+yX6VriVPbN4w==", + "optional": true, "requires": { "@serialport/parser-delimiter": "12.0.0" } @@ -7541,27 +7600,32 @@ "@serialport/parser-ready": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-12.0.0.tgz", - "integrity": "sha512-ygDwj3O4SDpZlbrRUraoXIoIqb8sM7aMKryGjYTIF0JRnKeB1ys8+wIp0RFMdFbO62YriUDextHB5Um5cKFSWg==" + "integrity": "sha512-ygDwj3O4SDpZlbrRUraoXIoIqb8sM7aMKryGjYTIF0JRnKeB1ys8+wIp0RFMdFbO62YriUDextHB5Um5cKFSWg==", + "optional": true }, "@serialport/parser-regex": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-12.0.0.tgz", - "integrity": "sha512-dCAVh4P/pZrLcPv9NJ2mvPRBg64L5jXuiRxIlyxxdZGH4WubwXVXY/kBTihQmiAMPxbT3yshSX8f2+feqWsxqA==" + "integrity": "sha512-dCAVh4P/pZrLcPv9NJ2mvPRBg64L5jXuiRxIlyxxdZGH4WubwXVXY/kBTihQmiAMPxbT3yshSX8f2+feqWsxqA==", + "optional": true }, "@serialport/parser-slip-encoder": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-slip-encoder/-/parser-slip-encoder-12.0.0.tgz", - "integrity": "sha512-0APxDGR9YvJXTRfY+uRGhzOhTpU5akSH183RUcwzN7QXh8/1jwFsFLCu0grmAUfi+fItCkR+Xr1TcNJLR13VNA==" + "integrity": "sha512-0APxDGR9YvJXTRfY+uRGhzOhTpU5akSH183RUcwzN7QXh8/1jwFsFLCu0grmAUfi+fItCkR+Xr1TcNJLR13VNA==", + "optional": true }, "@serialport/parser-spacepacket": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/parser-spacepacket/-/parser-spacepacket-12.0.0.tgz", - "integrity": "sha512-dozONxhPC/78pntuxpz/NOtVps8qIc/UZzdc/LuPvVsqCoJXiRxOg6ZtCP/W58iibJDKPZPAWPGYeZt9DJxI+Q==" + "integrity": "sha512-dozONxhPC/78pntuxpz/NOtVps8qIc/UZzdc/LuPvVsqCoJXiRxOg6ZtCP/W58iibJDKPZPAWPGYeZt9DJxI+Q==", + "optional": true }, "@serialport/stream": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-12.0.0.tgz", "integrity": "sha512-9On64rhzuqKdOQyiYLYv2lQOh3TZU/D3+IWCR5gk0alPel2nwpp4YwDEGiUBfrQZEdQ6xww0PWkzqth4wqwX3Q==", + "optional": true, "requires": { "@serialport/bindings-interface": "1.2.2", "debug": "4.3.4" @@ -7571,6 +7635,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "optional": true, "requires": { "ms": "2.1.2" } @@ -7717,7 +7782,8 @@ "@types/w3c-web-usb": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.10.tgz", - "integrity": "sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ==" + "integrity": "sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ==", + "optional": true }, "@types/ws": { "version": "8.5.10", @@ -7986,7 +8052,8 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "devOptional": true }, "base64-js": { "version": "1.5.1", @@ -8080,6 +8147,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "devOptional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8131,7 +8199,8 @@ "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "devOptional": true }, "callsites": { "version": "4.2.0", @@ -8563,7 +8632,8 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "devOptional": true }, "concordance": { "version": "5.0.4", @@ -8590,7 +8660,8 @@ "content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==" + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "devOptional": true }, "convert-to-spaces": { "version": "2.0.1", @@ -8615,7 +8686,8 @@ "crc-full": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/crc-full/-/crc-full-1.1.0.tgz", - "integrity": "sha512-7YK4t8C9PiekOSnBotYjU2roaaorUXHyT+Xzb12Zgg4DsfG58AxmPk2/wx7XnC9UXyriqRvl3c+U0zFsZkdVYg==" + "integrity": "sha512-7YK4t8C9PiekOSnBotYjU2roaaorUXHyT+Xzb12Zgg4DsfG58AxmPk2/wx7XnC9UXyriqRvl3c+U0zFsZkdVYg==", + "optional": true }, "cross-spawn": { "version": "7.0.6", @@ -9944,12 +10016,14 @@ "mime-db": { "version": "1.33.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "devOptional": true }, "mime-types": { "version": "2.1.18", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "devOptional": true, "requires": { "mime-db": "~1.33.0" } @@ -9970,6 +10044,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "devOptional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -10041,7 +10116,8 @@ "node-addon-api": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "optional": true }, "node-downloader-helper": { "version": "2.1.9", @@ -10065,12 +10141,14 @@ "node-gyp-build": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==" + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "devOptional": true }, "node-hid": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/node-hid/-/node-hid-3.0.0.tgz", "integrity": "sha512-8CZdobqYCKTnKx9M5r9/clAehC7jOLXu9Ts2ItMWVT6LJa0bjmkkM1SdB7TgJsothng7GE/Y+fex5AidiJLjKA==", + "optional": true, "requires": { "node-addon-api": "^3.2.1", "pkg-prebuilds": "^0.2.1" @@ -10283,7 +10361,8 @@ "path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==" + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "devOptional": true }, "path-key": { "version": "3.1.1", @@ -10317,7 +10396,8 @@ "path-to-regexp": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", - "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==" + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "devOptional": true }, "path-type": { "version": "5.0.0", @@ -10364,6 +10444,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/pkg-prebuilds/-/pkg-prebuilds-0.2.1.tgz", "integrity": "sha512-FdOlDiRqRL7i9aYzQflhGWCoiJf/8u6Qgzq48gKsRDYejtfjvGb1U5QGSzllcqpNg2a8Swx/9fMgtuVefwU+zw==", + "optional": true, "requires": { "yargs": "^17.5.1" } @@ -10444,7 +10525,8 @@ "range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==" + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "devOptional": true }, "rc": { "version": "1.2.8", @@ -10760,6 +10842,7 @@ "version": "12.0.0", "resolved": "https://registry.npmjs.org/serialport/-/serialport-12.0.0.tgz", "integrity": "sha512-AmH3D9hHPFmnF/oq/rvigfiAouAKyK/TjnrkwZRYSFZxNggJxwvbAbfYrLeuvq7ktUdhuHdVdSjj852Z55R+uA==", + "optional": true, "requires": { "@serialport/binding-mock": "10.2.2", "@serialport/bindings-cpp": "12.0.1", @@ -10781,6 +10864,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "optional": true, "requires": { "ms": "2.1.2" } @@ -10836,6 +10920,7 @@ "version": "6.1.6", "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.6.tgz", "integrity": "sha512-x5RL9Y2p5+Sh3D38Fh9i/iQ5ZK+e4xuXRd/pGbM4D13tgo/MGwbttUk8emytcr1YYzBYs+apnUngBDFYfpjPuQ==", + "devOptional": true, "requires": { "bytes": "3.0.0", "content-disposition": "0.5.2", @@ -11354,6 +11439,7 @@ "version": "2.12.1", "resolved": "https://registry.npmjs.org/usb/-/usb-2.12.1.tgz", "integrity": "sha512-hgtoSQUFuMXVJBApelpUTiX7ZB83MQCbYeHTBsHftA2JG7YZ76ycwIgKQhkhKqVY76C8K6xJscHpF7Ep0eG3pQ==", + "optional": true, "requires": { "@types/w3c-web-usb": "^1.0.6", "node-addon-api": "^7.0.0", @@ -11363,7 +11449,8 @@ "node-addon-api": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", - "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==" + "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", + "optional": true } } }, @@ -11371,6 +11458,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/usb-power-profiling/-/usb-power-profiling-1.5.0.tgz", "integrity": "sha512-wCgiNNw26eokowJYwDUURmy/em12YrIKXsAdThUU0q7izaZ/+4EhWk8n30jPpYVzxKIsms8z7sk2ARr9tzaLwA==", + "optional": true, "requires": { "crc-full": "^1.1.0", "node-hid": "^3.0.0", diff --git a/package.json b/package.json index 9513f6def..896e2fb8d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "lodash.merge": "4.6.2", "lodash.set": "4.3.2", "selenium-webdriver": "4.27.0", - "usb-power-profiling": "1.5.0", "yargs": "17.7.2" }, "optionalDependencies": { @@ -30,7 +29,8 @@ "@jimp/png": "0.22.12", "@jimp/jpeg": "0.22.12", "@jimp/plugin-resize": "0.22.12", - "@jimp/plugin-scale": "0.22.12" + "@jimp/plugin-scale": "0.22.12", + "usb-power-profiling": "1.5.0" }, "devDependencies": { "@types/selenium-webdriver": "4.1.25", From 4b80fd22a13419c787d88b951bbd2973fe608f53 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Fri, 10 Jan 2025 09:54:07 +0100 Subject: [PATCH 2/2] fix --- lib/android/index.js | 2 +- lib/chrome/webdriver/chromium.js | 2 +- lib/firefox/webdriver/firefox.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/android/index.js b/lib/android/index.js index c1769f03a..5e6dd4630 100644 --- a/lib/android/index.js +++ b/lib/android/index.js @@ -5,10 +5,10 @@ import { EOL as endOfLine } from 'node:os'; import { execa } from 'execa'; import { getLogger } from '@sitespeed.io/log'; import pkg from '@devicefarmer/adbkit'; -import { loadUsbPowerProfiler } from './support/usbPower.js'; const { Adb } = pkg; import get from 'lodash.get'; import { pathToFolder } from '../support/pathToFolder.js'; +import { loadUsbPowerProfiler } from '../support/usbPower.js'; const log = getLogger('browsertime.android'); const mkdir = promisify(_mkdir); const delay = ms => new Promise(res => setTimeout(res, ms)); diff --git a/lib/chrome/webdriver/chromium.js b/lib/chrome/webdriver/chromium.js index 8c86ada27..c3581d5f2 100644 --- a/lib/chrome/webdriver/chromium.js +++ b/lib/chrome/webdriver/chromium.js @@ -3,7 +3,6 @@ import { unlink as _unlink, rm as _rm } from 'node:fs'; import path from 'node:path'; import { logging } from 'selenium-webdriver'; import { getLogger } from '@sitespeed.io/log'; -import { loadUsbPowerProfiler } from './support/usbPower.js'; const log = getLogger('browsertime.chrome'); const { Type } = logging; import { longTaskMetrics } from '../longTaskMetrics.js'; @@ -14,6 +13,7 @@ import { toArray } from '../../support/util.js'; import { logging as _logging } from 'selenium-webdriver'; import { parse } from '../traceCategoriesParser.js'; import { pathToFolder } from '../../support/pathToFolder.js'; +import { loadUsbPowerProfiler } from '../../support/usbPower.js'; import { ChromeDevtoolsProtocol } from '../chromeDevtoolsProtocol.js'; import { NetworkManager } from '../networkManager.js'; import { Android, isAndroidConfigured } from '../../android/index.js'; diff --git a/lib/firefox/webdriver/firefox.js b/lib/firefox/webdriver/firefox.js index 348f50e57..cae2977e7 100644 --- a/lib/firefox/webdriver/firefox.js +++ b/lib/firefox/webdriver/firefox.js @@ -3,9 +3,9 @@ import { promisify } from 'node:util'; import path from 'node:path'; import { getLogger } from '@sitespeed.io/log'; import get from 'lodash.get'; -import { loadUsbPowerProfiler } from './support/usbPower.js'; import { adapters } from 'ff-test-bidi-har-export'; import { getEmptyHAR, mergeHars } from '../../support/har/index.js'; +import { loadUsbPowerProfiler } from '../../support/usbPower.js'; import { pathToFolder } from '../../support/pathToFolder.js'; import { isAndroidConfigured, Android } from '../../android/index.js'; import { adjustVisualProgressTimestamps } from '../../support/util.js';