favalib 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,7 +51,7 @@ declare class PersistentStorageManager {
|
|
|
51
51
|
*/
|
|
52
52
|
private getLockedRepresentation;
|
|
53
53
|
/**
|
|
54
|
-
* Sets the save function for the library.
|
|
54
|
+
* Sets the save function for the library.
|
|
55
55
|
* @param saveFunction - The save function to set.
|
|
56
56
|
*/
|
|
57
57
|
setSaveFunction(saveFunction: SaveFunction): void;
|
|
@@ -82,7 +82,7 @@ class PersistentStorageManager {
|
|
|
82
82
|
return JSON.stringify(lockedRepresentation);
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* Sets the save function for the library.
|
|
85
|
+
* Sets the save function for the library.
|
|
86
86
|
* @param saveFunction - The save function to set.
|
|
87
87
|
*/
|
|
88
88
|
setSaveFunction(saveFunction) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type TwoFaLibMediator from '../TwoFaLibMediator.mjs';
|
|
2
2
|
import type { Passphrase } from '../interfaces/CryptoLib.mjs';
|
|
3
|
+
import type SaveFunction from '../interfaces/SaveFunction.mjs';
|
|
3
4
|
/**
|
|
4
5
|
* Manages the public operations related to the vault storage
|
|
5
6
|
*/
|
|
@@ -26,5 +27,10 @@ declare class StorageOperationsManager {
|
|
|
26
27
|
* @throws {AuthenticationError} If the provided old passphrase is incorrect.
|
|
27
28
|
*/
|
|
28
29
|
changePassphrase(oldPassphrase: Passphrase, newPassphrase: Passphrase): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the save function for the library.
|
|
32
|
+
* @param saveFunction - The save function to set.
|
|
33
|
+
*/
|
|
34
|
+
setSaveFunction(saveFunction: SaveFunction): void;
|
|
29
35
|
}
|
|
30
36
|
export default StorageOperationsManager;
|
|
@@ -31,5 +31,12 @@ class StorageOperationsManager {
|
|
|
31
31
|
async changePassphrase(oldPassphrase, newPassphrase) {
|
|
32
32
|
return this.persistentStorage.changePassphrase(oldPassphrase, newPassphrase);
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Sets the save function for the library.
|
|
36
|
+
* @param saveFunction - The save function to set.
|
|
37
|
+
*/
|
|
38
|
+
setSaveFunction(saveFunction) {
|
|
39
|
+
this.persistentStorage.setSaveFunction(saveFunction);
|
|
40
|
+
}
|
|
34
41
|
}
|
|
35
42
|
export default StorageOperationsManager;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "favalib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@types/qrcode": "^1.5.5",
|
|
29
29
|
"@types/uuid": "^10.0.0",
|
|
30
30
|
"@types/whatwg-url": "^13.0.0",
|
|
31
|
-
"@vitest/coverage-v8": "^3.1.
|
|
32
|
-
"eslint": "^9.
|
|
33
|
-
"type-fest": "^4.
|
|
34
|
-
"vitest": "^3.1.
|
|
31
|
+
"@vitest/coverage-v8": "^3.1.4",
|
|
32
|
+
"eslint": "^9.27.0",
|
|
33
|
+
"type-fest": "^4.41.0",
|
|
34
|
+
"vitest": "^3.1.4",
|
|
35
35
|
"vitest-websocket-mock": "^0.5.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"jpake-ts": "^1.0.1",
|
|
44
44
|
"jsqr": "^1.4.0",
|
|
45
45
|
"node-forge": "^1.3.1",
|
|
46
|
-
"openpgp": "^6.1.
|
|
46
|
+
"openpgp": "^6.1.1",
|
|
47
47
|
"qrcode": "^1.5.4",
|
|
48
48
|
"totp-generator": "^1.0.0",
|
|
49
49
|
"typescript-event-target": "^1.1.1",
|
|
50
50
|
"uint8array-extras": "^1.4.0",
|
|
51
|
-
"unws": "^0.3.
|
|
51
|
+
"unws": "^0.3.2",
|
|
52
52
|
"uuid": "^11.1.0",
|
|
53
53
|
"whatwg-url": "^14.2.0",
|
|
54
|
-
"ws": "^8.18.
|
|
54
|
+
"ws": "^8.18.2"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=20"
|