http-request-manager 18.15.17 → 18.15.18
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.
|
@@ -6127,13 +6127,18 @@ class DbService extends Dexie {
|
|
|
6127
6127
|
return schema;
|
|
6128
6128
|
}
|
|
6129
6129
|
deleteAndReinitialize() {
|
|
6130
|
-
return from(
|
|
6131
|
-
|
|
6132
|
-
|
|
6130
|
+
return from(this.delete({ disableAutoOpen: false }).then(async () => {
|
|
6131
|
+
console.log('[DB] Database deleted. Reopening...');
|
|
6132
|
+
try {
|
|
6133
|
+
await this.open();
|
|
6134
|
+
this.dbReady = Promise.resolve();
|
|
6135
|
+
console.log(`[DB] Reopened database. Version: ${this.verno}, Tables: ${this.getTables.join(', ')}`);
|
|
6136
|
+
return this.isOpen();
|
|
6137
|
+
}
|
|
6138
|
+
catch (openErr) {
|
|
6139
|
+
console.error('[DB] Failed to reopen after delete:', openErr);
|
|
6140
|
+
return false;
|
|
6133
6141
|
}
|
|
6134
|
-
this.dbReady = this.init();
|
|
6135
|
-
await this.dbReady;
|
|
6136
|
-
return this.isOpen();
|
|
6137
6142
|
})).pipe(catchError((err) => {
|
|
6138
6143
|
console.error('[DB] deleteAndReinitialize failed:', err);
|
|
6139
6144
|
return of(false);
|