monoidentity 0.18.0 → 0.19.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/dist/+client.d.ts CHANGED
@@ -3,5 +3,5 @@ export { getLoginRecognized, relog, getVerification, getStorage, getScopedFS, co
3
3
  export type { SyncStrategy } from "./storage/utils-storage.js";
4
4
  export { retrieveVerification } from "./verification-client.js";
5
5
  export { attest as rawAttest } from "./verification/attest.js";
6
- export { syncFinished, readyUp } from "./readyup.js";
6
+ export { readyUp } from "./readyup.js";
7
7
  export { default as Monoidentity } from "./Monoidentity.svelte";
package/dist/+client.js CHANGED
@@ -2,5 +2,5 @@ export * from "./+common.js";
2
2
  export { getLoginRecognized, relog, getVerification, getStorage, getScopedFS, completeSync, } from "./storage.js";
3
3
  export { retrieveVerification } from "./verification-client.js";
4
4
  export { attest as rawAttest } from "./verification/attest.js";
5
- export { syncFinished, readyUp } from "./readyup.js";
5
+ export { readyUp } from "./readyup.js";
6
6
  export { default as Monoidentity } from "./Monoidentity.svelte";
package/dist/readyup.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  import { type Intent } from "./utils-transport.js";
2
2
  import type { SyncStrategy } from "./storage/utils-storage.js";
3
- export declare const syncFinished: Promise<void>;
4
3
  export declare const readyUp: (app: string, intents: Intent[], getSyncStrategy: (path: string) => SyncStrategy, requestBackup: (startBackup: () => void) => void) => void;
package/dist/readyup.js CHANGED
@@ -2,14 +2,10 @@ import {} from "./utils-transport.js";
2
2
  // import { createLocalStorage } from "./storage/createlocalstorage.js";
3
3
  // import { wrapBackup } from "./storage/wrapbackup.js";
4
4
  // import { wrapCloud } from "./storage/wrapcloud.js";
5
- import { conf, setLoginRecognized } from "./storage.js";
5
+ import { addToSync, conf, setLoginRecognized } from "./storage.js";
6
6
  import { backupLocally } from "./storage/backuplocally.js";
7
7
  import { backupCloud } from "./storage/backupcloud.js";
8
8
  import { switchToHub } from "./utils-hub.js";
9
- let resolveSyncFinished;
10
- export const syncFinished = new Promise((resolve) => {
11
- resolveSyncFinished = resolve;
12
- });
13
9
  export const readyUp = (app, intents, getSyncStrategy, requestBackup) => {
14
10
  conf(app);
15
11
  let setup = localStorage["monoidentity-x/setup"]
@@ -36,13 +32,12 @@ export const readyUp = (app, intents, getSyncStrategy, requestBackup) => {
36
32
  setLoginRecognized(provision.createLoginRecognized);
37
33
  }
38
34
  }
39
- (async () => {
35
+ addToSync((async () => {
40
36
  if (setup.method == "localStorage") {
41
37
  await backupLocally(getSyncStrategy, requestBackup);
42
38
  }
43
39
  if (setup.method == "cloud") {
44
40
  await backupCloud(getSyncStrategy, setup);
45
41
  }
46
- resolveSyncFinished();
47
- })();
42
+ })());
48
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monoidentity",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "license": "ISC",
5
5
  "repository": "KTibow/monoidentity",
6
6
  "author": {