forked from CringeStudios/element-desktop
Test keytar-forked
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
a46985d91e
commit
6ae09710c6
@ -1 +1 @@
|
||||
v22.13.1
|
||||
v22.14.0
|
2
knip.ts
2
knip.ts
@ -5,7 +5,7 @@ export default {
|
||||
project: ["**/*.{js,ts}"],
|
||||
ignoreDependencies: [
|
||||
// Brought in via hak scripts
|
||||
"keytar",
|
||||
"keytar-forked",
|
||||
"matrix-seshat",
|
||||
// Required for `action-validator`
|
||||
"@action-validator/*",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "module",
|
||||
"files": [],
|
||||
"engines": {
|
||||
"node": ">=18.0.0 <=22.13.1 || >22"
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint",
|
||||
@ -112,7 +112,7 @@
|
||||
},
|
||||
"hakDependencies": {
|
||||
"matrix-seshat": "^4.0.1",
|
||||
"keytar": "^7.9.0"
|
||||
"keytar-forked": "^7.9.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/node": "18.19.76",
|
||||
|
2
src/@types/keytar.d.ts
vendored
2
src/@types/keytar.d.ts
vendored
@ -2,7 +2,7 @@
|
||||
// Definitions by: Milan Burda <https://github.com/miniak>, Brendan Forster <https://github.com/shiftkey>, Hari Juturu <https://github.com/juturu>
|
||||
// Adapted from DefinitelyTyped: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/keytar/index.d.ts
|
||||
|
||||
declare module "keytar" {
|
||||
declare module "keytar-forked" {
|
||||
/**
|
||||
* Get the stored password for the service and account.
|
||||
*
|
||||
|
@ -5,11 +5,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import type * as Keytar from "keytar"; // Hak dependency type
|
||||
import type * as Keytar from "keytar-forked"; // Hak dependency type
|
||||
|
||||
let keytar: typeof Keytar | undefined;
|
||||
try {
|
||||
({ default: keytar } = await import("keytar"));
|
||||
({ default: keytar } = await import("keytar-forked"));
|
||||
} catch (e) {
|
||||
if ((<NodeJS.ErrnoException>e).code === "MODULE_NOT_FOUND") {
|
||||
console.log("Keytar isn't installed; secure key storage is disabled.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user