sliftutils 0.64.0 → 0.65.0

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.
package/index.d.ts CHANGED
@@ -574,6 +574,7 @@ declare module "sliftutils/storage/CBORStorage" {
574
574
  size: number;
575
575
  lastModified: number;
576
576
  } | undefined>;
577
+ watchResync(callback: () => void): void;
577
578
  reset(): Promise<void>;
578
579
  }
579
580
 
@@ -858,6 +859,7 @@ declare module "sliftutils/storage/JSONStorage" {
858
859
  size: number;
859
860
  lastModified: number;
860
861
  } | undefined>;
862
+ watchResync(callback: () => void): void;
861
863
  reset(): Promise<void>;
862
864
  }
863
865
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sliftutils",
3
- "version": "0.64.0",
3
+ "version": "0.65.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -12,5 +12,6 @@ export declare class CBORStorage<T> implements IStorage<T> {
12
12
  size: number;
13
13
  lastModified: number;
14
14
  } | undefined>;
15
+ watchResync(callback: () => void): void;
15
16
  reset(): Promise<void>;
16
17
  }
@@ -30,6 +30,11 @@ export class CBORStorage<T> implements IStorage<T> {
30
30
  return await this.storage.getInfo(key);
31
31
  }
32
32
 
33
+
34
+ public watchResync(callback: () => void): void {
35
+ this.storage.watchResync?.(callback);
36
+ }
37
+
33
38
  public async reset() {
34
39
  await this.storage.reset();
35
40
  }
@@ -12,5 +12,6 @@ export declare class JSONStorage<T> implements IStorage<T> {
12
12
  size: number;
13
13
  lastModified: number;
14
14
  } | undefined>;
15
+ watchResync(callback: () => void): void;
15
16
  reset(): Promise<void>;
16
17
  }
@@ -27,7 +27,9 @@ export class JSONStorage<T> implements IStorage<T> {
27
27
  }
28
28
 
29
29
 
30
-
30
+ public watchResync(callback: () => void): void {
31
+ this.storage.watchResync?.(callback);
32
+ }
31
33
 
32
34
  public async reset() {
33
35
  await this.storage.reset();