core-3nweb-client-lib 0.42.12 → 0.42.13

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.
@@ -66,13 +66,7 @@ class Core {
66
66
  this.idManager = idManager;
67
67
  return this.idManager.getId();
68
68
  });
69
- const coreAppsInit = coreInit.then(async () => {
70
- // XXX This should be removed, at some point, as there will be no more
71
- // users with very old data folders.
72
- await this.performDataMigrationsAtInit();
73
- await this.initCoreApps(emitBootEvent);
74
- this.isInitialized = true;
75
- });
69
+ const coreAppsInit = coreInit.then(() => this.initCoreApps(emitBootEvent));
76
70
  return { coreInit, coreAppsInit, capsForStartup };
77
71
  }
78
72
  ;
@@ -81,9 +75,11 @@ class Core {
81
75
  const { watchBoot, emitBootEvent } = makeForBootEvents();
82
76
  const keyOpened = await this.initForExistingUserWithCache(userId, async () => storageKey, midDone, emitBootEvent);
83
77
  if (keyOpened) {
84
- const coreInit = midPromise.then(idManager => {
78
+ const coreInit = midPromise
79
+ .then(idManager => {
85
80
  this.idManager = idManager;
86
- });
81
+ })
82
+ .then(() => this.initCoreApps(emitBootEvent));
87
83
  return { coreInit, watchBoot };
88
84
  }
89
85
  }
@@ -317,6 +313,9 @@ class Core {
317
313
  }
318
314
  async initCoreApps(emitBootEvent) {
319
315
  var _a;
316
+ // XXX This should be removed, at some point, as there will be no more
317
+ // users with very old data folders.
318
+ await this.performDataMigrationsAtInit();
320
319
  try {
321
320
  const address = this.idManager.getId();
322
321
  const getSigner = this.idManager.getSigner;
@@ -336,6 +335,7 @@ class Core {
336
335
  throw (0, error_1.errWithCause)(err, 'Failed to initialize core apps');
337
336
  }
338
337
  emitBootEvent(true);
338
+ this.isInitialized = true;
339
339
  }
340
340
  getStorages() {
341
341
  return this.storages.wrap();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.42.12",
3
+ "version": "0.42.13",
4
4
  "description": "3NWeb client core library, embeddable into different environments",
5
5
  "main": "build/lib-index.js",
6
6
  "types": "build/lib-index.d.ts",