From 3a6c324f8db359610c8bda345b8a9f0fcdde4745 Mon Sep 17 00:00:00 2001 From: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:26:06 -0800 Subject: [PATCH 1/5] misc: group napi crates --- .github/renovate.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/renovate.json b/.github/renovate.json index ca31f773c..63da21b65 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -27,6 +27,11 @@ "groupName": "go minor", "matchManagers": ["gomod"], "matchUpdateTypes": ["minor", "patch"] + }, + { + "groupName": "napi crates", + "matchManagers": ["cargo"], + "matchPackageNames": ["napi", "napi-derive", "napi-build", "napi-derive-backend", "napi-sys"] } ], "ignoreDeps": ["dotnet-sdk"] From ba548e2cda5a7f7c837348aac42f29c7b6ba0674 Mon Sep 17 00:00:00 2001 From: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:35:26 -0800 Subject: [PATCH 2/5] chore: update napi crates --- Cargo.lock | 110 ++++++++++++++++++++++++------- crates/bitwarden-napi/Cargo.toml | 4 +- 2 files changed, 89 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fda7ed021..a0894e1fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -355,7 +355,7 @@ dependencies = [ "bitwarden-core", "bitwarden-generators", "bitwarden-sm", - "thiserror 1.0.69", + "thiserror 2.0.17", "uuid", ] @@ -743,7 +743,7 @@ dependencies = [ "serde_yaml", "supports-color", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.17", "tokio", "toml", "uuid", @@ -1061,9 +1061,9 @@ dependencies = [ [[package]] name = "convert_case" -version = "0.6.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ "unicode-segmentation", ] @@ -1204,14 +1204,20 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.9" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" +checksum = "424e0138278faeb2b401f174ad17e715c829512d74f3d1e81eb43365c2e0590e" dependencies = [ - "quote", - "syn", + "ctor-proc-macro", + "dtor", ] +[[package]] +name = "ctor-proc-macro" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -1451,6 +1457,21 @@ dependencies = [ "litrs", ] +[[package]] +name = "dtor" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404d02eeb088a82cfd873006cb713fe411306c7d182c344905e101fb1167d301" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + [[package]] name = "dyn-clone" version = "1.0.20" @@ -1659,6 +1680,21 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.31" @@ -1666,6 +1702,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -1674,6 +1711,23 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + [[package]] name = "futures-macro" version = "0.3.31" @@ -1703,9 +1757,13 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ + "futures-channel", "futures-core", + "futures-io", "futures-macro", + "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", "slab", @@ -2341,9 +2399,9 @@ checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "libloading" -version = "0.8.9" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" dependencies = [ "cfg-if", "windows-link", @@ -2506,15 +2564,17 @@ dependencies = [ [[package]] name = "napi" -version = "2.16.17" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55740c4ae1d8696773c78fdafd5d0e5fe9bc9f1b071c7ba493ba5c413a9184f3" +checksum = "3af30fe8e799dda3a555c496c59e960e4cff1e931b63acbaf3a3b25d9fad22b6" dependencies = [ "bitflags 2.10.0", "ctor", - "napi-derive", + "futures", + "napi-build", "napi-sys", - "once_cell", + "nohash-hasher", + "rustc-hash", "tokio", ] @@ -2526,12 +2586,12 @@ checksum = "d376940fd5b723c6893cd1ee3f33abbfd86acb1cd1ec079f3ab04a2a3bc4d3b1" [[package]] name = "napi-derive" -version = "2.16.13" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cbe2585d8ac223f7d34f13701434b9d5f4eb9c332cccce8dee57ea18ab8ab0c" +checksum = "47cffa09ea668c4cc5d7b1198780882e28780ed1804a903b80680725426223d9" dependencies = [ - "cfg-if", "convert_case", + "ctor", "napi-derive-backend", "proc-macro2", "quote", @@ -2540,24 +2600,22 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "1.0.75" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1639aaa9eeb76e91c6ae66da8ce3e89e921cd3885e99ec85f4abacae72fc91bf" +checksum = "5e186227ec22f4675267a176d98dffecb27e6cc88926cbb7efb5427268565c0f" dependencies = [ "convert_case", - "once_cell", "proc-macro2", "quote", - "regex", "semver", "syn", ] [[package]] name = "napi-sys" -version = "2.4.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427802e8ec3a734331fec1035594a210ce1ff4dc5bc1950530920ab717964ea3" +checksum = "8eb602b84d7c1edae45e50bbf1374696548f36ae179dfa667f577e384bb90c2b" dependencies = [ "libloading", ] @@ -2571,6 +2629,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "nu-ansi-term" version = "0.50.3" diff --git a/crates/bitwarden-napi/Cargo.toml b/crates/bitwarden-napi/Cargo.toml index 7a9deeb8f..3a9cbfffa 100644 --- a/crates/bitwarden-napi/Cargo.toml +++ b/crates/bitwarden-napi/Cargo.toml @@ -23,8 +23,8 @@ bitwarden-json = { path = "../bitwarden-json", version = "0.3.0", features = [ ] } env_logger = "0.11.1" log = { workspace = true } -napi = { version = "2", features = ["async"] } -napi-derive = "2" +napi = { version = "3", features = ["async"] } +napi-derive = "3" [build-dependencies] napi-build = "2.1.0" From ee4f5f6a6780fe1821fa138c54e537d358eb0ac4 Mon Sep 17 00:00:00 2001 From: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:56:20 -0800 Subject: [PATCH 3/5] fix: update napi bindings --- crates/bitwarden-napi/binding.d.ts | 16 +- crates/bitwarden-napi/binding.js | 591 ++++--- crates/bitwarden-napi/package-lock.json | 2002 ++++++++++++++++++++++- crates/bitwarden-napi/package.json | 2 +- 4 files changed, 2351 insertions(+), 260 deletions(-) diff --git a/crates/bitwarden-napi/binding.d.ts b/crates/bitwarden-napi/binding.d.ts index 174d33d92..96c5d1ec0 100644 --- a/crates/bitwarden-napi/binding.d.ts +++ b/crates/bitwarden-napi/binding.d.ts @@ -1,16 +1,14 @@ -/* tslint:disable */ -/* eslint-disable */ - /* auto-generated by NAPI-RS */ +/* eslint-disable */ +export declare class BitwardenClient { + constructor(settingsInput?: string | undefined | null, logLevel?: LogLevel | undefined | null) + runCommand(commandInput: string): Promise +} -export const enum LogLevel { +export declare const enum LogLevel { Trace = 0, Debug = 1, Info = 2, Warn = 3, - Error = 4, -} -export declare class BitwardenClient { - constructor(settingsInput?: string | undefined | null, logLevel?: LogLevel | undefined | null); - runCommand(commandInput: string): Promise; + Error = 4 } diff --git a/crates/bitwarden-napi/binding.js b/crates/bitwarden-napi/binding.js index 3da97e8f9..90c402b72 100644 --- a/crates/bitwarden-napi/binding.js +++ b/crates/bitwarden-napi/binding.js @@ -1,290 +1,397 @@ -/* tslint:disable */ +// prettier-ignore /* eslint-disable */ -/* prettier-ignore */ - +// @ts-nocheck /* auto-generated by NAPI-RS */ -const { existsSync, readFileSync } = require('fs') -const { join } = require("path"); +const { createRequire } = require('node:module') +require = createRequire(__filename) -const { platform, arch } = process; +const { readFileSync } = require('node:fs') +let nativeBinding = null +const loadErrors = [] -let nativeBinding = null; -let localFileExisted = false; -let loadError = null; +const isMusl = () => { + let musl = false + if (process.platform === 'linux') { + musl = isMuslFromFilesystem() + if (musl === null) { + musl = isMuslFromReport() + } + if (musl === null) { + musl = isMuslFromChildProcess() + } + } + return musl +} -function isMusl() { - // For Node 10 - if (!process.report || typeof process.report.getReport !== "function") { - try { - const lddPath = require("child_process").execSync("which ldd").toString().trim(); - return readFileSync(lddPath, "utf8").includes("musl"); - } catch (e) { - return true; +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-') + +const isMuslFromFilesystem = () => { + try { + return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl') + } catch { + return null + } +} + +const isMuslFromReport = () => { + let report = null + if (typeof process.report?.getReport === 'function') { + process.report.excludeNetwork = true + report = process.report.getReport() + } + if (!report) { + return null + } + if (report.header && report.header.glibcVersionRuntime) { + return false + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return true } - } else { - const { glibcVersionRuntime } = process.report.getReport().header; - return !glibcVersionRuntime; + } + return false +} + +const isMuslFromChildProcess = () => { + try { + return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl') + } catch (e) { + // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false + return false } } -switch (platform) { - case "android": - switch (arch) { - case "arm64": - localFileExisted = existsSync(join(__dirname, "sdk-napi.android-arm64.node")); +function requireNative() { + if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) { + try { + nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH); + } catch (err) { + loadErrors.push(err) + } + } else if (process.platform === 'android') { + if (process.arch === 'arm64') { + try { + return require('./sdk-napi.android-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-android-arm64') + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm') { + try { + return require('./sdk-napi.android-arm-eabi.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-android-arm-eabi') + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`)) + } + } else if (process.platform === 'win32') { + if (process.arch === 'x64') { + try { + return require('./sdk-napi.win32-x64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-win32-x64-msvc') + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'ia32') { + try { + return require('./sdk-napi.win32-ia32-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-win32-ia32-msvc') + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./sdk-napi.win32-arm64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-win32-arm64-msvc') + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`)) + } + } else if (process.platform === 'darwin') { + try { + return require('./sdk-napi.darwin-universal.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-darwin-universal') + } catch (e) { + loadErrors.push(e) + } + if (process.arch === 'x64') { + try { + return require('./sdk-napi.darwin-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-darwin-x64') + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./sdk-napi.darwin-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-darwin-arm64') + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`)) + } + } else if (process.platform === 'freebsd') { + if (process.arch === 'x64') { + try { + return require('./sdk-napi.freebsd-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-freebsd-x64') + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./sdk-napi.freebsd-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-freebsd-arm64') + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`)) + } + } else if (process.platform === 'linux') { + if (process.arch === 'x64') { + if (isMusl()) { try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.android-arm64.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-android-arm64"); - } + return require('./sdk-napi.linux-x64-musl.node') } catch (e) { - loadError = e; + loadErrors.push(e) } - break; - case "arm": - localFileExisted = existsSync(join(__dirname, "sdk-napi.android-arm-eabi.node")); try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.android-arm-eabi.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-android-arm-eabi"); - } + return require('@bitwarden/sdk-napi-linux-x64-musl') } catch (e) { - loadError = e; + loadErrors.push(e) } - break; - default: - throw new Error(`Unsupported architecture on Android ${arch}`); - } - break; - case "win32": - switch (arch) { - case "x64": - localFileExisted = existsSync(join(__dirname, "sdk-napi.win32-x64-msvc.node")); + } else { try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.win32-x64-msvc.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-win32-x64-msvc"); - } + return require('./sdk-napi.linux-x64-gnu.node') } catch (e) { - loadError = e; + loadErrors.push(e) } - break; - case "ia32": - localFileExisted = existsSync(join(__dirname, "sdk-napi.win32-ia32-msvc.node")); try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.win32-ia32-msvc.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-win32-ia32-msvc"); - } + return require('@bitwarden/sdk-napi-linux-x64-gnu') } catch (e) { - loadError = e; + loadErrors.push(e) } - break; - case "arm64": - localFileExisted = existsSync(join(__dirname, "sdk-napi.win32-arm64-msvc.node")); + } + } else if (process.arch === 'arm64') { + if (isMusl()) { try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.win32-arm64-msvc.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-win32-arm64-msvc"); - } + return require('./sdk-napi.linux-arm64-musl.node') } catch (e) { - loadError = e; + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-linux-arm64-musl') + } catch (e) { + loadErrors.push(e) } - break; - default: - throw new Error(`Unsupported architecture on Windows: ${arch}`); - } - break; - case "darwin": - localFileExisted = existsSync(join(__dirname, "sdk-napi.darwin-universal.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.darwin-universal.node"); } else { - nativeBinding = require("@bitwarden/sdk-napi-darwin-universal"); + try { + return require('./sdk-napi.linux-arm64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-linux-arm64-gnu') + } catch (e) { + loadErrors.push(e) + } } - break; - } catch {} - switch (arch) { - case "x64": - localFileExisted = existsSync(join(__dirname, "sdk-napi.darwin-x64.node")); + } else if (process.arch === 'arm') { + if (isMusl()) { try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.darwin-x64.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-darwin-x64"); - } + return require('./sdk-napi.linux-arm-musleabihf.node') } catch (e) { - loadError = e; + loadErrors.push(e) } - break; - case "arm64": - localFileExisted = existsSync(join(__dirname, "sdk-napi.darwin-arm64.node")); try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.darwin-arm64.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-darwin-arm64"); - } + return require('@bitwarden/sdk-napi-linux-arm-musleabihf') } catch (e) { - loadError = e; + loadErrors.push(e) } - break; - default: - throw new Error(`Unsupported architecture on macOS: ${arch}`); - } - break; - case "freebsd": - if (arch !== "x64") { - throw new Error(`Unsupported architecture on FreeBSD: ${arch}`); - } - localFileExisted = existsSync(join(__dirname, "sdk-napi.freebsd-x64.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.freebsd-x64.node"); } else { - nativeBinding = require("@bitwarden/sdk-napi-freebsd-x64"); - } - } catch (e) { - loadError = e; - } - break; - case "linux": - switch (arch) { - case "x64": - if (isMusl()) { - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-x64-musl.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-x64-musl.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-x64-musl"); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-x64-gnu.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-x64-gnu.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-x64-gnu"); - } - } catch (e) { - loadError = e; - } + try { + return require('./sdk-napi.linux-arm-gnueabihf.node') + } catch (e) { + loadErrors.push(e) } - break; - case "arm64": - if (isMusl()) { - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-arm64-musl.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-arm64-musl.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-arm64-musl"); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-arm64-gnu.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-arm64-gnu.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-arm64-gnu"); - } - } catch (e) { - loadError = e; - } + try { + return require('@bitwarden/sdk-napi-linux-arm-gnueabihf') + } catch (e) { + loadErrors.push(e) } - break; - case "arm": - if (isMusl()) { - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-arm-musleabihf.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-arm-musleabihf.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-arm-musleabihf"); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-arm-gnueabihf.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-arm-gnueabihf.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-arm-gnueabihf"); - } - } catch (e) { - loadError = e; - } + } + } else if (process.arch === 'riscv64') { + if (isMusl()) { + try { + return require('./sdk-napi.linux-riscv64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-linux-riscv64-musl') + } catch (e) { + loadErrors.push(e) } - break; - case "riscv64": - if (isMusl()) { - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-riscv64-musl.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-riscv64-musl.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-riscv64-musl"); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-riscv64-gnu.node")); - try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-riscv64-gnu.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-riscv64-gnu"); - } - } catch (e) { - loadError = e; - } + } else { + try { + return require('./sdk-napi.linux-riscv64-gnu.node') + } catch (e) { + loadErrors.push(e) } - break; - case "s390x": - localFileExisted = existsSync(join(__dirname, "sdk-napi.linux-s390x-gnu.node")); try { - if (localFileExisted) { - nativeBinding = require("./sdk-napi.linux-s390x-gnu.node"); - } else { - nativeBinding = require("@bitwarden/sdk-napi-linux-s390x-gnu"); - } + return require('@bitwarden/sdk-napi-linux-riscv64-gnu') } catch (e) { - loadError = e; + loadErrors.push(e) } - break; - default: - throw new Error(`Unsupported architecture on Linux: ${arch}`); + } + } else if (process.arch === 'ppc64') { + try { + return require('./sdk-napi.linux-ppc64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-linux-ppc64-gnu') + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 's390x') { + try { + return require('./sdk-napi.linux-s390x-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-linux-s390x-gnu') + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`)) + } + } else if (process.platform === 'openharmony') { + if (process.arch === 'arm64') { + try { + return require('./sdk-napi.linux-arm64-ohos.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-linux-arm64-ohos') + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'x64') { + try { + return require('./sdk-napi.linux-x64-ohos.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-linux-x64-ohos') + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm') { + try { + return require('./sdk-napi.linux-arm-ohos.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@bitwarden/sdk-napi-linux-arm-ohos') + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`)) } - break; - default: - throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); + } else { + loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`)) + } } -if (!nativeBinding) { - if (loadError) { - throw loadError; +nativeBinding = requireNative() + +if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { + try { + nativeBinding = require('./sdk-napi.wasi.cjs') + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + loadErrors.push(err) + } + } + if (!nativeBinding) { + try { + nativeBinding = require('@bitwarden/sdk-napi-wasm32-wasi') + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + loadErrors.push(err) + } + } } - throw new Error(`Failed to load native binding`); } -const { LogLevel, BitwardenClient } = nativeBinding; +if (!nativeBinding) { + if (loadErrors.length > 0) { + throw new Error( + `Cannot find native binding. ` + + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + + 'Please try `npm i` again after removing both package-lock.json and node_modules directory.', + { cause: loadErrors } + ) + } + throw new Error(`Failed to load native binding`) +} -module.exports.LogLevel = LogLevel; -module.exports.BitwardenClient = BitwardenClient; +module.exports = nativeBinding +module.exports.BitwardenClient = nativeBinding.BitwardenClient +module.exports.LogLevel = nativeBinding.LogLevel diff --git a/crates/bitwarden-napi/package-lock.json b/crates/bitwarden-napi/package-lock.json index e1b1e7a9d..407aabf26 100644 --- a/crates/bitwarden-napi/package-lock.json +++ b/crates/bitwarden-napi/package-lock.json @@ -9,30 +9,1948 @@ "version": "1.0.0", "license": "SEE LICENSE IN LICENSE", "devDependencies": { - "@napi-rs/cli": "2.18.4", + "@napi-rs/cli": "3.0.0", "typescript": "5.9.3" }, "engines": { "node": ">= 10" } }, + "node_modules/@emnapi/core": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.1.tgz", + "integrity": "sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.1.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", + "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", + "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@inquirer/ansi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.2.tgz", + "integrity": "sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/checkbox": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.3.2.tgz", + "integrity": "sha512-VXukHf0RR1doGe6Sm4F0Em7SWYLTHSsbGfJdS9Ja2bX5/D5uwVOEjr07cncLROdBvmnvCATYEWlHqYmXv2IlQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/confirm": { + "version": "5.1.21", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.21.tgz", + "integrity": "sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/core": { + "version": "10.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.3.2.tgz", + "integrity": "sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^1.0.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/editor": { + "version": "4.2.23", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.23.tgz", + "integrity": "sha512-aLSROkEwirotxZ1pBaP8tugXRFCxW94gwrQLxXfrZsKkfjOYC1aRvAZuhpJOb5cu4IBTJdsCigUlf2iCOu4ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/external-editor": "^1.0.3", + "@inquirer/type": "^3.0.10" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/expand": { + "version": "4.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.23.tgz", + "integrity": "sha512-nRzdOyFYnpeYTTR2qFwEVmIWypzdAx/sIkCMeTNTcflFOovfqUk+HcFhQQVBftAh9gmGrpFj6QcGEqrDMDOiew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.1", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz", + "integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.3.1.tgz", + "integrity": "sha512-kN0pAM4yPrLjJ1XJBjDxyfDduXOuQHrBB8aLDMueuwUGn+vNpF7Gq7TvyVxx8u4SHlFFj4trmj+a2cbpG4Jn1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/number": { + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.23.tgz", + "integrity": "sha512-5Smv0OK7K0KUzUfYUXDXQc9jrf8OHo4ktlEayFlelCjwMXz0299Y8OrI+lj7i4gCBY15UObk76q0QtxjzFcFcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/password": { + "version": "4.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.23.tgz", + "integrity": "sha512-zREJHjhT5vJBMZX/IUbyI9zVtVfOLiTO66MrF/3GFZYZ7T4YILW5MSkEYHceSii/KtRk+4i3RE7E1CUXA2jHcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/prompts": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.10.1.tgz", + "integrity": "sha512-Dx/y9bCQcXLI5ooQ5KyvA4FTgeo2jYj/7plWfV5Ak5wDPKQZgudKez2ixyfz7tKXzcJciTxqLeK7R9HItwiByg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^4.3.2", + "@inquirer/confirm": "^5.1.21", + "@inquirer/editor": "^4.2.23", + "@inquirer/expand": "^4.0.23", + "@inquirer/input": "^4.3.1", + "@inquirer/number": "^3.0.23", + "@inquirer/password": "^4.0.23", + "@inquirer/rawlist": "^4.1.11", + "@inquirer/search": "^3.2.2", + "@inquirer/select": "^4.4.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/rawlist": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.11.tgz", + "integrity": "sha512-+LLQB8XGr3I5LZN/GuAHo+GpDJegQwuPARLChlMICNdwW7OwV2izlCSCxN6cqpL0sMXmbKbFcItJgdQq5EBXTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/search": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.2.2.tgz", + "integrity": "sha512-p2bvRfENXCZdWF/U2BXvnSI9h+tuA8iNqtUKb9UWbmLYCRQxd8WkvwWvYn+3NgYaNwdUkHytJMGG4MMLucI1kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/select": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.4.2.tgz", + "integrity": "sha512-l4xMuJo55MAe+N7Qr4rX90vypFwCajSakx59qe/tMaC1aEHWLyw68wF4o0A4SLAY4E0nd+Vt+EyskeDIqu1M6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/type": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", + "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@napi-rs/cli": { - "version": "2.18.4", - "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-2.18.4.tgz", - "integrity": "sha512-SgJeA4df9DE2iAEpr3M2H0OKl/yjtg1BnRI5/JyowS71tUWhrfSu2LT0V3vlHET+g1hBVlrO60PmEXwUEKp8Mg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-3.0.0.tgz", + "integrity": "sha512-V4xSbP4AnS+1POtAGVRhCt0erOTEyLAsZ2+MJOcI1NXCwgsKZGjp8cf/UmVo8e2jUE8tTkyxvnIPCqzVkT3RjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/prompts": "^7.4.0", + "@napi-rs/cross-toolchain": "^0.0.19", + "@napi-rs/wasm-tools": "^0.0.3", + "@octokit/rest": "^22.0.0", + "clipanion": "^4.0.0-rc.4", + "colorette": "^2.0.20", + "debug": "^4.4.0", + "emnapi": "^1.4.0", + "find-up": "^7.0.0", + "js-yaml": "^4.1.0", + "lodash-es": "^4.17.21", + "semver": "^7.7.1", + "typanion": "^3.14.0", + "wasm-sjlj": "^1.0.6" + }, + "bin": { + "napi": "dist/cli.js", + "napi-raw": "cli.mjs" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/runtime": "^1.1.0", + "emnapi": "^1.1.0" + }, + "peerDependenciesMeta": { + "@emnapi/runtime": { + "optional": true + }, + "emnapi": { + "optional": true + } + } + }, + "node_modules/@napi-rs/cross-toolchain": { + "version": "0.0.19", + "resolved": "https://registry.npmjs.org/@napi-rs/cross-toolchain/-/cross-toolchain-0.0.19.tgz", + "integrity": "sha512-StHXqYANdTaMFqJJ3JXHqKQMylOzOJPcrOCd9Nt2NIGfvfaXK3SzpmNfkJimkOAYfTsfpfuRERsML0bUZCpHBQ==", + "dev": true, + "license": "MIT", + "workspaces": [ + ".", + "arm64/*", + "x64/*" + ], + "dependencies": { + "@napi-rs/lzma": "^1.4.1", + "@napi-rs/tar": "^0.1.4", + "debug": "^4.4.0" + }, + "peerDependencies": { + "@napi-rs/cross-toolchain-arm64-target-aarch64": "^0.0.19", + "@napi-rs/cross-toolchain-arm64-target-armv7": "^0.0.19", + "@napi-rs/cross-toolchain-arm64-target-x86_64": "^0.0.19", + "@napi-rs/cross-toolchain-x64-target-aarch64": "^0.0.19", + "@napi-rs/cross-toolchain-x64-target-armv7": "^0.0.19", + "@napi-rs/cross-toolchain-x64-target-x86_64": "^0.0.19" + }, + "peerDependenciesMeta": { + "@napi-rs/cross-toolchain-arm64-target-aarch64": { + "optional": true + }, + "@napi-rs/cross-toolchain-arm64-target-armv7": { + "optional": true + }, + "@napi-rs/cross-toolchain-arm64-target-x86_64": { + "optional": true + }, + "@napi-rs/cross-toolchain-x64-target-aarch64": { + "optional": true + }, + "@napi-rs/cross-toolchain-x64-target-armv7": { + "optional": true + }, + "@napi-rs/cross-toolchain-x64-target-x86_64": { + "optional": true + } + } + }, + "node_modules/@napi-rs/lzma": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma/-/lzma-1.4.5.tgz", + "integrity": "sha512-zS5LuN1OBPAyZpda2ZZgYOEDC+xecUdAGnrvbYzjnLXkrq/OBC3B9qcRvlxbDR3k5H/gVfvef1/jyUqPknqjbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "optionalDependencies": { + "@napi-rs/lzma-android-arm-eabi": "1.4.5", + "@napi-rs/lzma-android-arm64": "1.4.5", + "@napi-rs/lzma-darwin-arm64": "1.4.5", + "@napi-rs/lzma-darwin-x64": "1.4.5", + "@napi-rs/lzma-freebsd-x64": "1.4.5", + "@napi-rs/lzma-linux-arm-gnueabihf": "1.4.5", + "@napi-rs/lzma-linux-arm64-gnu": "1.4.5", + "@napi-rs/lzma-linux-arm64-musl": "1.4.5", + "@napi-rs/lzma-linux-ppc64-gnu": "1.4.5", + "@napi-rs/lzma-linux-riscv64-gnu": "1.4.5", + "@napi-rs/lzma-linux-s390x-gnu": "1.4.5", + "@napi-rs/lzma-linux-x64-gnu": "1.4.5", + "@napi-rs/lzma-linux-x64-musl": "1.4.5", + "@napi-rs/lzma-wasm32-wasi": "1.4.5", + "@napi-rs/lzma-win32-arm64-msvc": "1.4.5", + "@napi-rs/lzma-win32-ia32-msvc": "1.4.5", + "@napi-rs/lzma-win32-x64-msvc": "1.4.5" + } + }, + "node_modules/@napi-rs/lzma-android-arm-eabi": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-android-arm-eabi/-/lzma-android-arm-eabi-1.4.5.tgz", + "integrity": "sha512-Up4gpyw2SacmyKWWEib06GhiDdF+H+CCU0LAV8pnM4aJIDqKKd5LHSlBht83Jut6frkB0vwEPmAkv4NjQ5u//Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-android-arm64": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-android-arm64/-/lzma-android-arm64-1.4.5.tgz", + "integrity": "sha512-uwa8sLlWEzkAM0MWyoZJg0JTD3BkPknvejAFG2acUA1raXM8jLrqujWCdOStisXhqQjZ2nDMp3FV6cs//zjfuQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-darwin-arm64": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-darwin-arm64/-/lzma-darwin-arm64-1.4.5.tgz", + "integrity": "sha512-0Y0TQLQ2xAjVabrMDem1NhIssOZzF/y/dqetc6OT8mD3xMTDtF8u5BqZoX3MyPc9FzpsZw4ksol+w7DsxHrpMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-darwin-x64": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-darwin-x64/-/lzma-darwin-x64-1.4.5.tgz", + "integrity": "sha512-vR2IUyJY3En+V1wJkwmbGWcYiT8pHloTAWdW4pG24+51GIq+intst6Uf6D/r46citObGZrlX0QvMarOkQeHWpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-freebsd-x64": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-freebsd-x64/-/lzma-freebsd-x64-1.4.5.tgz", + "integrity": "sha512-XpnYQC5SVovO35tF0xGkbHYjsS6kqyNCjuaLQ2dbEblFRr5cAZVvsJ/9h7zj/5FluJPJRDojVNxGyRhTp4z2lw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-linux-arm-gnueabihf": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm-gnueabihf/-/lzma-linux-arm-gnueabihf-1.4.5.tgz", + "integrity": "sha512-ic1ZZMoRfRMwtSwxkyw4zIlbDZGC6davC9r+2oX6x9QiF247BRqqT94qGeL5ZP4Vtz0Hyy7TEViWhx5j6Bpzvw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-linux-arm64-gnu": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm64-gnu/-/lzma-linux-arm64-gnu-1.4.5.tgz", + "integrity": "sha512-asEp7FPd7C1Yi6DQb45a3KPHKOFBSfGuJWXcAd4/bL2Fjetb2n/KK2z14yfW8YC/Fv6x3rBM0VAZKmJuz4tysg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-linux-arm64-musl": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm64-musl/-/lzma-linux-arm64-musl-1.4.5.tgz", + "integrity": "sha512-yWjcPDgJ2nIL3KNvi4536dlT/CcCWO0DUyEOlBs/SacG7BeD6IjGh6yYzd3/X1Y3JItCbZoDoLUH8iB1lTXo3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-linux-ppc64-gnu": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-ppc64-gnu/-/lzma-linux-ppc64-gnu-1.4.5.tgz", + "integrity": "sha512-0XRhKuIU/9ZjT4WDIG/qnX7Xz7mSQHYZo9Gb3MP2gcvBgr6BA4zywQ9k3gmQaPn9ECE+CZg2V7DV7kT+x2pUMQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-linux-riscv64-gnu": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-riscv64-gnu/-/lzma-linux-riscv64-gnu-1.4.5.tgz", + "integrity": "sha512-QrqDIPEUUB23GCpyQj/QFyMlr8SGxxyExeZz9OWFnHfb70kXdTLWrHS/hEI1Ru+lSbQ/6xRqeoGyQ4Aqdg+/RA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-linux-s390x-gnu": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-s390x-gnu/-/lzma-linux-s390x-gnu-1.4.5.tgz", + "integrity": "sha512-k8RVM5aMhW86E9H0QXdquwojew4H3SwPxbRVbl49/COJQWCUjGi79X6mYruMnMPEznZinUiT1jgKbFo2A00NdA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.4.5.tgz", + "integrity": "sha512-6rMtBgnIq2Wcl1rQdZsnM+rtCcVCbws1nF8S2NzaUsVaZv8bjrPiAa0lwg4Eqnn1d9lgwqT+cZgm5m+//K08Kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-linux-x64-musl": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-musl/-/lzma-linux-x64-musl-1.4.5.tgz", + "integrity": "sha512-eiadGBKi7Vd0bCArBUOO/qqRYPHt/VQVvGyYvDFt6C2ZSIjlD+HuOl+2oS1sjf4CFjK4eDIog6EdXnL0NE6iyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-wasm32-wasi": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-wasm32-wasi/-/lzma-wasm32-wasi-1.4.5.tgz", + "integrity": "sha512-+VyHHlr68dvey6fXc2hehw9gHVFIW3TtGF1XkcbAu65qVXsA9D/T+uuoRVqhE+JCyFHFrO0ixRbZDRK1XJt1sA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^1.0.3" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@napi-rs/lzma-win32-arm64-msvc": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-arm64-msvc/-/lzma-win32-arm64-msvc-1.4.5.tgz", + "integrity": "sha512-eewnqvIyyhHi3KaZtBOJXohLvwwN27gfS2G/YDWdfHlbz1jrmfeHAmzMsP5qv8vGB+T80TMHNkro4kYjeh6Deg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-win32-ia32-msvc": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-ia32-msvc/-/lzma-win32-ia32-msvc-1.4.5.tgz", + "integrity": "sha512-OeacFVRCJOKNU/a0ephUfYZ2Yt+NvaHze/4TgOwJ0J0P4P7X1mHzN+ig9Iyd74aQDXYqc7kaCXA2dpAOcH87Cg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/lzma-win32-x64-msvc": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-x64-msvc/-/lzma-win32-x64-msvc-1.4.5.tgz", + "integrity": "sha512-T4I1SamdSmtyZgDXGAGP+y5LEK5vxHUFwe8mz6D4R7Sa5/WCxTcCIgPJ9BD7RkpO17lzhlaM2vmVvMy96Lvk9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar/-/tar-0.1.5.tgz", + "integrity": "sha512-skgWKcpjtUqJUk1jwhVl8vXYCXQlFC532KiryU3hQBr6ZIJk0E0qD9FG99hUqtPko8mIMS5HDPO+uSnvHfgRVg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@napi-rs/tar-android-arm-eabi": "0.1.5", + "@napi-rs/tar-android-arm64": "0.1.5", + "@napi-rs/tar-darwin-arm64": "0.1.5", + "@napi-rs/tar-darwin-x64": "0.1.5", + "@napi-rs/tar-freebsd-x64": "0.1.5", + "@napi-rs/tar-linux-arm-gnueabihf": "0.1.5", + "@napi-rs/tar-linux-arm64-gnu": "0.1.5", + "@napi-rs/tar-linux-arm64-musl": "0.1.5", + "@napi-rs/tar-linux-ppc64-gnu": "0.1.5", + "@napi-rs/tar-linux-s390x-gnu": "0.1.5", + "@napi-rs/tar-linux-x64-gnu": "0.1.5", + "@napi-rs/tar-linux-x64-musl": "0.1.5", + "@napi-rs/tar-wasm32-wasi": "0.1.5", + "@napi-rs/tar-win32-arm64-msvc": "0.1.5", + "@napi-rs/tar-win32-ia32-msvc": "0.1.5", + "@napi-rs/tar-win32-x64-msvc": "0.1.5" + } + }, + "node_modules/@napi-rs/tar-android-arm-eabi": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-android-arm-eabi/-/tar-android-arm-eabi-0.1.5.tgz", + "integrity": "sha512-FM2qNG3ELeYibnZC8dfsCV4i/pql1nlLKVINfRC7TSwqFfgj5gbezZ0rT8gRPHbLyslVt6m4MPZfRE8Uj/MuCA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-android-arm64": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-android-arm64/-/tar-android-arm64-0.1.5.tgz", + "integrity": "sha512-OpP0QyD+K0a68nqyko793lLWiC2BN1wWF/Doatus1OCKxgj61vtrUPVO2cQGQS5i07I/+YGRF8lD0tQDrk4JDQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-darwin-arm64": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-darwin-arm64/-/tar-darwin-arm64-0.1.5.tgz", + "integrity": "sha512-sfyM/9gxFabdMTFt4quvLJuKbXS6StGIUf7Cp3l8aV2WqCURJevdpN6wW8XtGBo/iSnAP52ERwMRdyIavPYruw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-darwin-x64": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-darwin-x64/-/tar-darwin-x64-0.1.5.tgz", + "integrity": "sha512-NtY8bADKE/3ODBM3hW/RgPeeERJpI6/jgipT3eLJ/CQWY1VJ6t9GHR7anJKhx1oxVdmSfqfCGMolM8WPV9x9bw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-freebsd-x64": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-freebsd-x64/-/tar-freebsd-x64-0.1.5.tgz", + "integrity": "sha512-azl0nWrDJAGg25cGVKEY7UtU5ABGz4sQASKvemDLwGbzMDtkJgCoPb+OunI1pezijRAyhiuZEQ4jK8S1qNAWCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-linux-arm-gnueabihf": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm-gnueabihf/-/tar-linux-arm-gnueabihf-0.1.5.tgz", + "integrity": "sha512-OjGdKjaW7b0m96rAvsLthMBhwYSSgpTM/WkHqRJo91HCYQ6tHXDBnq4VIQx2FpwT1PoetvRsbSgy0tOc95iYjA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-linux-arm64-gnu": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm64-gnu/-/tar-linux-arm64-gnu-0.1.5.tgz", + "integrity": "sha512-o3b2VE5c7+NFb6XRcXrdXgur1yhpx+XNItFoeJUMBE8z0AGAISf2DJSbcJawmefUvrGtr+iLr61hsr6f2hw+5Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-linux-arm64-musl": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm64-musl/-/tar-linux-arm64-musl-0.1.5.tgz", + "integrity": "sha512-5xTxsoPVqovnZ197CqTc+q3psRM4i+ErdiyfDgkG4nP045jh50gp22WKZuE24dc7/iS+IyUrM3+PRbmj2mzR8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-linux-ppc64-gnu": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-ppc64-gnu/-/tar-linux-ppc64-gnu-0.1.5.tgz", + "integrity": "sha512-7FF1u8EkDpCEPCgU0/kvuzsO+opB7eIbsGfKRIbOqrDT7c1DYxDetNTtukPvNoT2kvwfxxThgTfcPADPxdOE/w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-linux-s390x-gnu": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-s390x-gnu/-/tar-linux-s390x-gnu-0.1.5.tgz", + "integrity": "sha512-uyIZ7OLCLHtVBpogoJUD0GSAF1IUa3d5c5AVUemTLIwYkVgzdEB+khh3i2+/oKObf79ZKfQ8mYxOryHqfx+ulw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-linux-x64-gnu": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-x64-gnu/-/tar-linux-x64-gnu-0.1.5.tgz", + "integrity": "sha512-y8pFyVTU6lSYiW2lse6i1Ns9yt9mBkAqPbcJnIjqC7ZqRd61T6g3XZDSrKmsM6ycTfsAqoE5WyyFxBjQN29AOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-linux-x64-musl": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-x64-musl/-/tar-linux-x64-musl-0.1.5.tgz", + "integrity": "sha512-8phLYc0QX+tqvp34PQHUulZUi4sy/fdg1KgFHiyYExTRRleBB01vM7KSn7Bk9dwH7lannO5D7j4O8OY46Xcr/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-wasm32-wasi": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-wasm32-wasi/-/tar-wasm32-wasi-0.1.5.tgz", + "integrity": "sha512-OpVWC/bwY0zb6nbQDg6koxeZGb441gXwPkaYVjaK4O0TJjNpRKbokLAMlGFtcc/sVSPjghFL0+enfnLDt/P7og==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.9" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@napi-rs/tar-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.10.0" + } + }, + "node_modules/@napi-rs/tar-win32-arm64-msvc": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-arm64-msvc/-/tar-win32-arm64-msvc-0.1.5.tgz", + "integrity": "sha512-FXwQA2Ib55q98szshvDsitgo2iLW2lTD1Q53e8dPMGobPa2yL5e8IjJDCcMI7XJwBZPl9YjJk7nAb8y20DXF+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-win32-ia32-msvc": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-ia32-msvc/-/tar-win32-ia32-msvc-0.1.5.tgz", + "integrity": "sha512-XEt58yFslNkwf2yJ+uX5nDNmPAk15Metkx2hVPeH29mOpuG2H8nuS8/42hZ+dQfZf3xABRjyurVMMH9JcgLZIQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/tar-win32-x64-msvc": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-x64-msvc/-/tar-win32-x64-msvc-0.1.5.tgz", + "integrity": "sha512-9Rq0Ob4S5NGFwNL3kGQkgrYlObqQgw19QMSZdVuhzZ9sSxn9OSF5cWgZ/n1oMEPWK+u6n9GSN2XbPn4DI7pm7Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.0.tgz", + "integrity": "sha512-Fq6DJW+Bb5jaWE69/qOE0D1TUN9+6uWhCeZpdnSBk14pjLcCWR7Q8n49PTSPHazM37JqrsdpEthXy2xn6jWWiA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1", + "@tybys/wasm-util": "^0.10.1" + } + }, + "node_modules/@napi-rs/wasm-tools": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools/-/wasm-tools-0.0.3.tgz", + "integrity": "sha512-p7NT5wnOIwmP0f3KbXlMabeld5dPFsADpHMWJaBodTSmnPE8P4msguxKJLKWquqAS1FY2dsjBZ62K0/hfiqAUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@napi-rs/wasm-tools-android-arm-eabi": "0.0.3", + "@napi-rs/wasm-tools-android-arm64": "0.0.3", + "@napi-rs/wasm-tools-darwin-arm64": "0.0.3", + "@napi-rs/wasm-tools-darwin-x64": "0.0.3", + "@napi-rs/wasm-tools-freebsd-x64": "0.0.3", + "@napi-rs/wasm-tools-linux-arm64-gnu": "0.0.3", + "@napi-rs/wasm-tools-linux-arm64-musl": "0.0.3", + "@napi-rs/wasm-tools-linux-x64-gnu": "0.0.3", + "@napi-rs/wasm-tools-linux-x64-musl": "0.0.3", + "@napi-rs/wasm-tools-wasm32-wasi": "0.0.3", + "@napi-rs/wasm-tools-win32-arm64-msvc": "0.0.3", + "@napi-rs/wasm-tools-win32-ia32-msvc": "0.0.3", + "@napi-rs/wasm-tools-win32-x64-msvc": "0.0.3" + } + }, + "node_modules/@napi-rs/wasm-tools-android-arm-eabi": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-android-arm-eabi/-/wasm-tools-android-arm-eabi-0.0.3.tgz", + "integrity": "sha512-T2tme8w5jZ/ZCjJurqNtKCxYtGoDjW9v2rn1bfI60ewCfkYXNpxrTURdkOib85sz+BcwmOfXn0enbg5W9KohoQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-android-arm64": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-android-arm64/-/wasm-tools-android-arm64-0.0.3.tgz", + "integrity": "sha512-siHTjrxxBrvsVty5X2jI5waAyzJpr756GqGVUqxqS2eoTuqYRfgaFNvX8asp9LAagFtOojfD0fZfuvxK7dc4Rw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-darwin-arm64": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-darwin-arm64/-/wasm-tools-darwin-arm64-0.0.3.tgz", + "integrity": "sha512-0MqsSOYJ4jXcLv/nAInS8nwU+/hL0rSEJo7JXKj3dhkT9UNSj4zfidcOaIb05O9VskJBPmV040+edtWPHXNt2Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-darwin-x64": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-darwin-x64/-/wasm-tools-darwin-x64-0.0.3.tgz", + "integrity": "sha512-yXAK2mrlBMZZYK/59JRHZu/c683HFpr5ork1cn++fy8gqUBRLbjuq47VDjA7oyLW5SmWqNDhmhjFTDGvfIvcUg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-freebsd-x64": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-freebsd-x64/-/wasm-tools-freebsd-x64-0.0.3.tgz", + "integrity": "sha512-K1rne814utBd9Zo9LCggQ5h0TSnzGPzA+sG78Qr7KfFz8XQxEGDRH5wpzXyF1KaKav2RmO6wGMXlasDgIcq7GA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-linux-arm64-gnu": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-arm64-gnu/-/wasm-tools-linux-arm64-gnu-0.0.3.tgz", + "integrity": "sha512-Yu3gtpvGc2+hcay3SU5MK7EMrGPBq/V4i8mpw/MEYUCzOb7Vd9aL8CryElzlk0SIbktG08VYMdhFFFoJAjlYtg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-linux-arm64-musl": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-arm64-musl/-/wasm-tools-linux-arm64-musl-0.0.3.tgz", + "integrity": "sha512-XN+sPgEwFw3P47wDvtcQyOoZNghIL8gaiRjEGzprB+kE9N21GkuMbk3kdjiBBJkjqKF25f4fbOvNAY0jQEAO3A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-linux-x64-gnu": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-x64-gnu/-/wasm-tools-linux-x64-gnu-0.0.3.tgz", + "integrity": "sha512-mfMvMEqn33YtEjIyLPguZ6yDsNtF5zV7mqc99620YDyj2SLa0aI35TNTc7Dm+/hlgqHRKhdudsWGfYc4dBND2Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-linux-x64-musl": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-x64-musl/-/wasm-tools-linux-x64-musl-0.0.3.tgz", + "integrity": "sha512-KXMsXWGELoN5xgPCoRHbgt5TScSx8BK2GcCHKJ9OPZ2HMfsXbLgS/SNi6vz1CbLMZMLPBY2G6HAk0gzLGyS0mQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-wasm32-wasi": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-wasm32-wasi/-/wasm-tools-wasm32-wasi-0.0.3.tgz", + "integrity": "sha512-v3iMHnAfMteogpbqHTFeLXPeAzL5AhpDJLvZvLXbuRiMsMRL0dn8CbcEnYja2P/Ui6Xlyky6PcaUsepOUTNb7A==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.7" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@napi-rs/wasm-tools-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.10.0" + } + }, + "node_modules/@napi-rs/wasm-tools-win32-arm64-msvc": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-arm64-msvc/-/wasm-tools-win32-arm64-msvc-0.0.3.tgz", + "integrity": "sha512-HWrg9cW+u+rQKL9XCQILaGGs6mDYdwX9nwcTIvJAjrpGWu8Dp4wz6i66w6YKHqVng1suGYjjr+LH4/1e0tDaAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-win32-ia32-msvc": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-ia32-msvc/-/wasm-tools-win32-ia32-msvc-0.0.3.tgz", + "integrity": "sha512-h99hAWvQKhcloyPfPi0IjrvKRToTE9Z4UVXoXZhcjpCGmr3o1qW+1FAupRy/TcVdMjUJNLE/aenml3UPqzQEQw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/wasm-tools-win32-x64-msvc": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-x64-msvc/-/wasm-tools-win32-x64-msvc-0.0.3.tgz", + "integrity": "sha512-7/6IpzMi9VGYxLcc9SJyu9ZIdbDwyyb09glVF/2SFEgke9F5H46XzRrAdSoRnjfcq/tdLyHKJbnpCIB257qVYg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@octokit/auth-token": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz", + "integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/core": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz", + "integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/auth-token": "^6.0.0", + "@octokit/graphql": "^9.0.3", + "@octokit/request": "^10.0.6", + "@octokit/request-error": "^7.0.2", + "@octokit/types": "^16.0.0", + "before-after-hook": "^4.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/endpoint": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz", + "integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/graphql": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz", + "integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/request": "^10.0.6", + "@octokit/types": "^16.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "27.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz", + "integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz", + "integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/plugin-request-log": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-6.0.0.tgz", + "integrity": "sha512-UkOzeEN3W91/eBq9sPZNQ7sUBvYCqYbrrD8gTbBuGtHEuycE4/awMXcYvx6sVYo7LypPhmQwwpUe4Yyu4QZN5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz", + "integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/request": { + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.7.tgz", + "integrity": "sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/endpoint": "^11.0.2", + "@octokit/request-error": "^7.0.2", + "@octokit/types": "^16.0.0", + "fast-content-type-parse": "^3.0.0", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/request-error": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz", + "integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/rest": { + "version": "22.0.1", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-22.0.1.tgz", + "integrity": "sha512-Jzbhzl3CEexhnivb1iQ0KJ7s5vvjMWcmRtq5aUsKmKDrRW6z3r84ngmiFKFvpZjpiU/9/S6ITPFRpn5s/3uQJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/core": "^7.0.6", + "@octokit/plugin-paginate-rest": "^14.0.0", + "@octokit/plugin-request-log": "^6.0.0", + "@octokit/plugin-rest-endpoint-methods": "^17.0.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/types": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz", + "integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@octokit/openapi-types": "^27.0.0" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/before-after-hook": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz", + "integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/chardet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/clipanion": { + "version": "4.0.0-rc.4", + "resolved": "https://registry.npmjs.org/clipanion/-/clipanion-4.0.0-rc.4.tgz", + "integrity": "sha512-CXkMQxU6s9GklO/1f714dkKBMu1lopS1WFF0B8o4AxPykR1hpozxSiUZ5ZUeBjfPgCWqbcNOtZVFhB8Lkfp1+Q==", + "dev": true, + "license": "MIT", + "workspaces": [ + "website" + ], + "dependencies": { + "typanion": "^3.8.0" + }, + "peerDependencies": { + "typanion": "*" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/emnapi": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/emnapi/-/emnapi-1.7.1.tgz", + "integrity": "sha512-wlLK2xFq+T+rCBlY6+lPlFVDEyE93b7hSn9dMrfWBIcPf4ArwUvymvvMnN9M5WWuiryYQe9M+UJrkqw4trdyRA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "node-addon-api": ">= 6.1.0" + }, + "peerDependenciesMeta": { + "node-addon-api": { + "optional": true + } + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-content-type-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz", + "integrity": "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, + "node_modules/find-up": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz", + "integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^7.2.0", + "path-exists": "^5.0.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", "dev": true, "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, "bin": { - "napi": "scripts/index.js" + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^6.0.0" }, "engines": { - "node": ">= 10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/typanion": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/typanion/-/typanion-3.14.0.tgz", + "integrity": "sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==", + "dev": true, + "license": "MIT", + "workspaces": [ + "website" + ] + }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -46,6 +1964,74 @@ "engines": { "node": ">=14.17" } + }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/universal-user-agent": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==", + "dev": true, + "license": "ISC" + }, + "node_modules/wasm-sjlj": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/wasm-sjlj/-/wasm-sjlj-1.0.6.tgz", + "integrity": "sha512-pjaKtLJejlWm6+okPV2X1A6nIsRDD4qeK97eCh8DP8KXi3Nzn/HY01vpHhZHlhDri12eZqipjm8HhdTVw+ATxw==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/crates/bitwarden-napi/package.json b/crates/bitwarden-napi/package.json index 20d78f061..d83fcb99a 100644 --- a/crates/bitwarden-napi/package.json +++ b/crates/bitwarden-napi/package.json @@ -29,7 +29,7 @@ "version": "napi version" }, "devDependencies": { - "@napi-rs/cli": "2.18.4", + "@napi-rs/cli": "3.0.0", "typescript": "5.9.3" }, "engines": { From 2d040d822dcd500eacf3d693a69f85ca06ae1b68 Mon Sep 17 00:00:00 2001 From: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:58:52 -0800 Subject: [PATCH 4/5] misc: group napi npm deps with cargo deps --- .github/renovate.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index 63da21b65..217ddaecf 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -29,9 +29,16 @@ "matchUpdateTypes": ["minor", "patch"] }, { - "groupName": "napi crates", - "matchManagers": ["cargo"], - "matchPackageNames": ["napi", "napi-derive", "napi-build", "napi-derive-backend", "napi-sys"] + "groupName": "napi dependencies", + "matchManagers": ["cargo", "npm"], + "matchPackageNames": [ + "napi", + "napi-derive", + "napi-build", + "napi-derive-backend", + "napi-sys", + "@napi-rs/cli" + ] } ], "ignoreDeps": ["dotnet-sdk"] From 6223172567d069c62747f8b8b3a30f08ad5aadab Mon Sep 17 00:00:00 2001 From: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com> Date: Mon, 8 Dec 2025 11:19:24 -0800 Subject: [PATCH 5/5] misc: npm run prettier --- crates/bitwarden-napi/binding.d.ts | 6 +- crates/bitwarden-napi/binding.js | 330 +++++++++++++++-------------- 2 files changed, 170 insertions(+), 166 deletions(-) diff --git a/crates/bitwarden-napi/binding.d.ts b/crates/bitwarden-napi/binding.d.ts index 96c5d1ec0..f1a3f3512 100644 --- a/crates/bitwarden-napi/binding.d.ts +++ b/crates/bitwarden-napi/binding.d.ts @@ -1,8 +1,8 @@ /* auto-generated by NAPI-RS */ /* eslint-disable */ export declare class BitwardenClient { - constructor(settingsInput?: string | undefined | null, logLevel?: LogLevel | undefined | null) - runCommand(commandInput: string): Promise + constructor(settingsInput?: string | undefined | null, logLevel?: LogLevel | undefined | null); + runCommand(commandInput: string): Promise; } export declare const enum LogLevel { @@ -10,5 +10,5 @@ export declare const enum LogLevel { Debug = 1, Info = 2, Warn = 3, - Error = 4 + Error = 4, } diff --git a/crates/bitwarden-napi/binding.js b/crates/bitwarden-napi/binding.js index 90c402b72..232a66918 100644 --- a/crates/bitwarden-napi/binding.js +++ b/crates/bitwarden-napi/binding.js @@ -4,377 +4,381 @@ /* auto-generated by NAPI-RS */ const { createRequire } = require('node:module') -require = createRequire(__filename) +require = createRequire(__filename); -const { readFileSync } = require('node:fs') -let nativeBinding = null -const loadErrors = [] +const { readFileSync } = require("node:fs"); +let nativeBinding = null; +const loadErrors = []; const isMusl = () => { - let musl = false - if (process.platform === 'linux') { - musl = isMuslFromFilesystem() + let musl = false; + if (process.platform === "linux") { + musl = isMuslFromFilesystem(); if (musl === null) { - musl = isMuslFromReport() + musl = isMuslFromReport(); } if (musl === null) { - musl = isMuslFromChildProcess() + musl = isMuslFromChildProcess(); } } - return musl -} + return musl; +}; -const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-') +const isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-"); const isMuslFromFilesystem = () => { try { - return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl') + return readFileSync("/usr/bin/ldd", "utf-8").includes("musl"); } catch { - return null + return null; } -} +}; const isMuslFromReport = () => { - let report = null - if (typeof process.report?.getReport === 'function') { - process.report.excludeNetwork = true - report = process.report.getReport() + let report = null; + if (typeof process.report?.getReport === "function") { + process.report.excludeNetwork = true; + report = process.report.getReport(); } if (!report) { - return null + return null; } if (report.header && report.header.glibcVersionRuntime) { - return false + return false; } if (Array.isArray(report.sharedObjects)) { if (report.sharedObjects.some(isFileMusl)) { - return true + return true; } } - return false -} + return false; +}; const isMuslFromChildProcess = () => { try { - return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl') + return require("child_process") + .execSync("ldd --version", { encoding: "utf8" }) + .includes("musl"); } catch (e) { // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false - return false + return false; } -} +}; function requireNative() { if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) { try { nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH); } catch (err) { - loadErrors.push(err) + loadErrors.push(err); } - } else if (process.platform === 'android') { - if (process.arch === 'arm64') { + } else if (process.platform === "android") { + if (process.arch === "arm64") { try { - return require('./sdk-napi.android-arm64.node') + return require("./sdk-napi.android-arm64.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-android-arm64') + return require("@bitwarden/sdk-napi-android-arm64"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - } else if (process.arch === 'arm') { + } else if (process.arch === "arm") { try { - return require('./sdk-napi.android-arm-eabi.node') + return require("./sdk-napi.android-arm-eabi.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-android-arm-eabi') + return require("@bitwarden/sdk-napi-android-arm-eabi"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { - loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`)) + loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`)); } - } else if (process.platform === 'win32') { - if (process.arch === 'x64') { + } else if (process.platform === "win32") { + if (process.arch === "x64") { try { - return require('./sdk-napi.win32-x64-msvc.node') + return require("./sdk-napi.win32-x64-msvc.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-win32-x64-msvc') + return require("@bitwarden/sdk-napi-win32-x64-msvc"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - } else if (process.arch === 'ia32') { + } else if (process.arch === "ia32") { try { - return require('./sdk-napi.win32-ia32-msvc.node') + return require("./sdk-napi.win32-ia32-msvc.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-win32-ia32-msvc') + return require("@bitwarden/sdk-napi-win32-ia32-msvc"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - } else if (process.arch === 'arm64') { + } else if (process.arch === "arm64") { try { - return require('./sdk-napi.win32-arm64-msvc.node') + return require("./sdk-napi.win32-arm64-msvc.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-win32-arm64-msvc') + return require("@bitwarden/sdk-napi-win32-arm64-msvc"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { - loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`)) + loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`)); } - } else if (process.platform === 'darwin') { + } else if (process.platform === "darwin") { try { - return require('./sdk-napi.darwin-universal.node') + return require("./sdk-napi.darwin-universal.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-darwin-universal') + return require("@bitwarden/sdk-napi-darwin-universal"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - if (process.arch === 'x64') { + if (process.arch === "x64") { try { - return require('./sdk-napi.darwin-x64.node') + return require("./sdk-napi.darwin-x64.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-darwin-x64') + return require("@bitwarden/sdk-napi-darwin-x64"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - } else if (process.arch === 'arm64') { + } else if (process.arch === "arm64") { try { - return require('./sdk-napi.darwin-arm64.node') + return require("./sdk-napi.darwin-arm64.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-darwin-arm64') + return require("@bitwarden/sdk-napi-darwin-arm64"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { - loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`)) + loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`)); } - } else if (process.platform === 'freebsd') { - if (process.arch === 'x64') { + } else if (process.platform === "freebsd") { + if (process.arch === "x64") { try { - return require('./sdk-napi.freebsd-x64.node') + return require("./sdk-napi.freebsd-x64.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-freebsd-x64') + return require("@bitwarden/sdk-napi-freebsd-x64"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - } else if (process.arch === 'arm64') { + } else if (process.arch === "arm64") { try { - return require('./sdk-napi.freebsd-arm64.node') + return require("./sdk-napi.freebsd-arm64.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-freebsd-arm64') + return require("@bitwarden/sdk-napi-freebsd-arm64"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { - loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`)) + loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`)); } - } else if (process.platform === 'linux') { - if (process.arch === 'x64') { + } else if (process.platform === "linux") { + if (process.arch === "x64") { if (isMusl()) { try { - return require('./sdk-napi.linux-x64-musl.node') + return require("./sdk-napi.linux-x64-musl.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-x64-musl') + return require("@bitwarden/sdk-napi-linux-x64-musl"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { try { - return require('./sdk-napi.linux-x64-gnu.node') + return require("./sdk-napi.linux-x64-gnu.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-x64-gnu') + return require("@bitwarden/sdk-napi-linux-x64-gnu"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } - } else if (process.arch === 'arm64') { + } else if (process.arch === "arm64") { if (isMusl()) { try { - return require('./sdk-napi.linux-arm64-musl.node') + return require("./sdk-napi.linux-arm64-musl.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-arm64-musl') + return require("@bitwarden/sdk-napi-linux-arm64-musl"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { try { - return require('./sdk-napi.linux-arm64-gnu.node') + return require("./sdk-napi.linux-arm64-gnu.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-arm64-gnu') + return require("@bitwarden/sdk-napi-linux-arm64-gnu"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } - } else if (process.arch === 'arm') { + } else if (process.arch === "arm") { if (isMusl()) { try { - return require('./sdk-napi.linux-arm-musleabihf.node') + return require("./sdk-napi.linux-arm-musleabihf.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-arm-musleabihf') + return require("@bitwarden/sdk-napi-linux-arm-musleabihf"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { try { - return require('./sdk-napi.linux-arm-gnueabihf.node') + return require("./sdk-napi.linux-arm-gnueabihf.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-arm-gnueabihf') + return require("@bitwarden/sdk-napi-linux-arm-gnueabihf"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } - } else if (process.arch === 'riscv64') { + } else if (process.arch === "riscv64") { if (isMusl()) { try { - return require('./sdk-napi.linux-riscv64-musl.node') + return require("./sdk-napi.linux-riscv64-musl.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-riscv64-musl') + return require("@bitwarden/sdk-napi-linux-riscv64-musl"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { try { - return require('./sdk-napi.linux-riscv64-gnu.node') + return require("./sdk-napi.linux-riscv64-gnu.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-riscv64-gnu') + return require("@bitwarden/sdk-napi-linux-riscv64-gnu"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } - } else if (process.arch === 'ppc64') { + } else if (process.arch === "ppc64") { try { - return require('./sdk-napi.linux-ppc64-gnu.node') + return require("./sdk-napi.linux-ppc64-gnu.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-ppc64-gnu') + return require("@bitwarden/sdk-napi-linux-ppc64-gnu"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - } else if (process.arch === 's390x') { + } else if (process.arch === "s390x") { try { - return require('./sdk-napi.linux-s390x-gnu.node') + return require("./sdk-napi.linux-s390x-gnu.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-s390x-gnu') + return require("@bitwarden/sdk-napi-linux-s390x-gnu"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { - loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`)) + loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`)); } - } else if (process.platform === 'openharmony') { - if (process.arch === 'arm64') { + } else if (process.platform === "openharmony") { + if (process.arch === "arm64") { try { - return require('./sdk-napi.linux-arm64-ohos.node') + return require("./sdk-napi.linux-arm64-ohos.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-arm64-ohos') + return require("@bitwarden/sdk-napi-linux-arm64-ohos"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - } else if (process.arch === 'x64') { + } else if (process.arch === "x64") { try { - return require('./sdk-napi.linux-x64-ohos.node') + return require("./sdk-napi.linux-x64-ohos.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-x64-ohos') + return require("@bitwarden/sdk-napi-linux-x64-ohos"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } - } else if (process.arch === 'arm') { + } else if (process.arch === "arm") { try { - return require('./sdk-napi.linux-arm-ohos.node') + return require("./sdk-napi.linux-arm-ohos.node"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } try { - return require('@bitwarden/sdk-napi-linux-arm-ohos') + return require("@bitwarden/sdk-napi-linux-arm-ohos"); } catch (e) { - loadErrors.push(e) + loadErrors.push(e); } } else { - loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`)) + loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`)); } } else { - loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`)) + loadErrors.push( + new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`), + ); } } -nativeBinding = requireNative() +nativeBinding = requireNative(); if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { try { - nativeBinding = require('./sdk-napi.wasi.cjs') + nativeBinding = require("./sdk-napi.wasi.cjs"); } catch (err) { if (process.env.NAPI_RS_FORCE_WASI) { - loadErrors.push(err) + loadErrors.push(err); } } if (!nativeBinding) { try { - nativeBinding = require('@bitwarden/sdk-napi-wasm32-wasi') + nativeBinding = require("@bitwarden/sdk-napi-wasm32-wasi"); } catch (err) { if (process.env.NAPI_RS_FORCE_WASI) { - loadErrors.push(err) + loadErrors.push(err); } } } @@ -385,13 +389,13 @@ if (!nativeBinding) { throw new Error( `Cannot find native binding. ` + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + - 'Please try `npm i` again after removing both package-lock.json and node_modules directory.', - { cause: loadErrors } - ) + "Please try `npm i` again after removing both package-lock.json and node_modules directory.", + { cause: loadErrors }, + ); } - throw new Error(`Failed to load native binding`) + throw new Error(`Failed to load native binding`); } -module.exports = nativeBinding -module.exports.BitwardenClient = nativeBinding.BitwardenClient -module.exports.LogLevel = nativeBinding.LogLevel +module.exports = nativeBinding; +module.exports.BitwardenClient = nativeBinding.BitwardenClient; +module.exports.LogLevel = nativeBinding.LogLevel;