From f550ec9917069328c52e0802407d74ddd2666299 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:28:35 +0000 Subject: [PATCH 1/3] [deps]: Update @napi-rs/cli to v2.18.4 --- apps/desktop/desktop_native/napi/package.json | 2 +- package-lock.json | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/desktop/desktop_native/napi/package.json b/apps/desktop/desktop_native/napi/package.json index 70e472b3952f..ded839508a07 100644 --- a/apps/desktop/desktop_native/napi/package.json +++ b/apps/desktop/desktop_native/napi/package.json @@ -11,7 +11,7 @@ "author": "", "license": "GPL-3.0", "devDependencies": { - "@napi-rs/cli": "2.16.2" + "@napi-rs/cli": "2.18.4" }, "napi": { "name": "desktop_napi", diff --git a/package-lock.json b/package-lock.json index 941839c6f418..fdcd2488eab8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -241,7 +241,7 @@ "version": "0.1.0", "license": "GPL-3.0", "devDependencies": { - "@napi-rs/cli": "2.16.2" + "@napi-rs/cli": "2.18.4" } }, "apps/web": { @@ -6348,10 +6348,11 @@ } }, "node_modules/@napi-rs/cli": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-2.16.2.tgz", - "integrity": "sha512-U2aZfnr0s9KkXpZlYC0l5WxWCXL7vJUNpCnWMwq3T9GG9rhYAAUM9CTZsi1Z+0iR2LcHbfq9EfMgoqnuTyUjfg==", + "version": "2.18.4", + "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-2.18.4.tgz", + "integrity": "sha512-SgJeA4df9DE2iAEpr3M2H0OKl/yjtg1BnRI5/JyowS71tUWhrfSu2LT0V3vlHET+g1hBVlrO60PmEXwUEKp8Mg==", "dev": true, + "license": "MIT", "bin": { "napi": "scripts/index.js" }, From a4f6dbc257d364eb2ce8c6ebd984af26aef4c861 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Wed, 2 Oct 2024 13:59:22 +0200 Subject: [PATCH 2/3] fix: update desktop/src/package-lock.json to reflect sub-package dependencies --- apps/desktop/src/package-lock.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/package-lock.json b/apps/desktop/src/package-lock.json index e7496714416b..82e0672d5128 100644 --- a/apps/desktop/src/package-lock.json +++ b/apps/desktop/src/package-lock.json @@ -9,7 +9,7 @@ "version": "2024.8.2", "license": "GPL-3.0", "dependencies": { - "@bitwarden/desktop-napi": "file:../desktop_native", + "@bitwarden/desktop-napi": "file:../desktop_native/napi", "argon2": "0.40.1" } }, @@ -21,8 +21,15 @@ "@napi-rs/cli": "2.16.2" } }, + "../desktop_native/napi": { + "version": "0.1.0", + "license": "GPL-3.0", + "devDependencies": { + "@napi-rs/cli": "2.18.4" + } + }, "node_modules/@bitwarden/desktop-napi": { - "resolved": "../desktop_native", + "resolved": "../desktop_native/napi", "link": true }, "node_modules/@phc/format": { From 5393a2f747164d2f40877c5b71b272625698ef5a Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Wed, 2 Oct 2024 14:06:28 +0200 Subject: [PATCH 3/3] feat: apply changes after running napi-rs/cli --- apps/desktop/desktop_native/napi/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/desktop/desktop_native/napi/index.d.ts b/apps/desktop/desktop_native/napi/index.d.ts index deaf6b8e57fc..ff28e49cb781 100644 --- a/apps/desktop/desktop_native/napi/index.d.ts +++ b/apps/desktop/desktop_native/napi/index.d.ts @@ -3,7 +3,7 @@ /* auto-generated by NAPI-RS */ -export namespace passwords { +export declare namespace passwords { /** Fetch the stored password from the keychain. */ export function getPassword(service: string, account: string): Promise /** Fetch the stored password from the keychain that was stored with Keytar. */ @@ -14,7 +14,7 @@ export namespace passwords { export function deletePassword(service: string, account: string): Promise export function isAvailable(): Promise } -export namespace biometrics { +export declare namespace biometrics { export function prompt(hwnd: Buffer, message: string): Promise export function available(): Promise export function setBiometricSecret(service: string, account: string, secret: string, keyMaterial: KeyMaterial | undefined | null, ivB64: string): Promise @@ -38,16 +38,16 @@ export namespace biometrics { ivB64: string } } -export namespace clipboards { +export declare namespace clipboards { export function read(): Promise export function write(text: string, password: boolean): Promise } -export namespace processisolations { +export declare namespace processisolations { export function disableCoredumps(): Promise export function isCoreDumpingDisabled(): Promise export function disableMemoryAccess(): Promise } -export namespace powermonitors { +export declare namespace powermonitors { export function onLock(callback: (err: Error | null, ) => any): Promise export function isLockMonitorAvailable(): Promise }