1
0
mirror of https://github.com/bitwarden/cli synced 2025-12-25 04:33:13 +00:00

Fix/lowdb no cache (#443)

* Add jslib prettier commit to client ignore hashes

* Remove lowdb caching

* Fix state service remove being set to null

* Await in-memory key retrieval

* Fix key loading and unlock requests.

* Linter fixes

* linter fixes

* linter fixes
This commit is contained in:
Matt Gibson
2022-01-13 12:03:19 -05:00
committed by GitHub
parent b962af303a
commit 3b1ccb409e
4 changed files with 38 additions and 31 deletions

View File

@@ -26,7 +26,11 @@ export class NodeEnvSecureStorageService implements StorageService {
}
async save(key: string, obj: any): Promise<any> {
if (typeof obj !== "string") {
if (obj == null) {
return this.remove(key);
}
if (obj !== null && typeof obj !== "string") {
throw new Error("Only string storage is allowed.");
}
const protectedObj = await this.encrypt(obj);