@mindline/sync 1.0.108 → 1.0.109
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/.vs/VSWorkspaceState.json +1 -0
- package/.vs/slnx.sqlite +0 -0
- package/.vs/sync.slnx/FileContentIndex/{13d6a28d-932f-4eb6-818c-efea35f24838.vsidx → 233f16f5-9502-4eee-892d-94508f320b43.vsidx} +0 -0
- package/.vs/sync.slnx/FileContentIndex/88b226f1-9afd-4cf3-bdb6-5db742bb7e8d.vsidx +0 -0
- package/.vs/sync.slnx/FileContentIndex/f109c15d-d422-45e9-a5df-0b391ae0a643.vsidx +0 -0
- package/.vs/sync.slnx/v18/.wsuo +0 -0
- package/.vs/sync.slnx/v18/DocumentLayout.backup.json +20 -3
- package/.vs/sync.slnx/v18/DocumentLayout.json +35 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/sync.es.js +430 -427
- package/dist/sync.es.js.map +1 -1
- package/dist/sync.umd.js +5 -5
- package/dist/sync.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +13 -3
- package/.vs/sync.slnx/FileContentIndex/75bd0095-9fc3-4f35-90e9-f4022b8e4b55.vsidx +0 -0
- package/.vs/sync.slnx/FileContentIndex/92b75297-fe76-448d-80d4-cbf5ef4fcd60.vsidx +0 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -933,13 +933,18 @@ export class BatchArray {
|
|
|
933
933
|
this.init(config, syncPortalGlobalState, bClearLocalStorage);
|
|
934
934
|
this.pb_startTS = 0;
|
|
935
935
|
this.pb_progress = 0;
|
|
936
|
-
this.pb_increment =
|
|
936
|
+
this.pb_increment = .25;
|
|
937
937
|
this.pb_timer = null;
|
|
938
938
|
this.pb_idle = 0;
|
|
939
939
|
this.pb_idleMax = 0;
|
|
940
940
|
this.pb_total = 0;
|
|
941
941
|
this.milestoneArray = new MilestoneArray(false);
|
|
942
942
|
}
|
|
943
|
+
clearStoredBatchIds(): void {
|
|
944
|
+
if (storageAvailable()) {
|
|
945
|
+
localStorage.setItem("BatchIdArray", "[]");
|
|
946
|
+
}
|
|
947
|
+
}
|
|
943
948
|
// populate tenantNodes based on config tenants
|
|
944
949
|
init(
|
|
945
950
|
config: SyncConfig | null | undefined,
|
|
@@ -1038,6 +1043,7 @@ export class BatchArray {
|
|
|
1038
1043
|
this.pb_progress = 100;
|
|
1039
1044
|
setSyncProgress(this.pb_progress);
|
|
1040
1045
|
setIdleText(`Complete. [max idle: ${this.pb_idleMax}]`);
|
|
1046
|
+
this.clearStoredBatchIds();
|
|
1041
1047
|
}
|
|
1042
1048
|
else {
|
|
1043
1049
|
// if we've gone 60 seconds without a signalR message, finish the sync
|
|
@@ -1258,6 +1264,7 @@ export class BatchArray {
|
|
|
1258
1264
|
this.milestoneArray.write(setMilestones);
|
|
1259
1265
|
connection.stop();
|
|
1260
1266
|
setConfigSyncResult("nothing to sync");
|
|
1267
|
+
this.clearStoredBatchIds();
|
|
1261
1268
|
console.log(`Setting config sync result: "nothing to sync"`);
|
|
1262
1269
|
}
|
|
1263
1270
|
else {
|
|
@@ -1281,6 +1288,7 @@ export class BatchArray {
|
|
|
1281
1288
|
this.milestoneArray.write(setMilestones);
|
|
1282
1289
|
connection.stop();
|
|
1283
1290
|
setConfigSyncResult("sync complete");
|
|
1291
|
+
this.clearStoredBatchIds();
|
|
1284
1292
|
console.log(`Setting config sync result: "complete"`);
|
|
1285
1293
|
}
|
|
1286
1294
|
// if not, has writing even started?
|
|
@@ -2187,7 +2195,9 @@ export async function configsRefresh(instance: IPublicClientApplication, authori
|
|
|
2187
2195
|
// console.log("Init Info-----------", currentConfig.id)
|
|
2188
2196
|
// tag components with workspaceIDs
|
|
2189
2197
|
ii.tagWithWorkspaces();
|
|
2190
|
-
|
|
2198
|
+
// IMPORTANT:
|
|
2199
|
+
// Do not clear BatchIdArray here. It is used by the UI to restore an in-flight sync
|
|
2200
|
+
// after refresh/re-login. BatchIdArray should be cleared when the sync completes.
|
|
2191
2201
|
return result;
|
|
2192
2202
|
} else {
|
|
2193
2203
|
// workspace not found
|
|
@@ -4176,4 +4186,4 @@ export async function readerStats(
|
|
|
4176
4186
|
console.log(error.message);
|
|
4177
4187
|
}
|
|
4178
4188
|
return result;
|
|
4179
|
-
}
|
|
4189
|
+
}
|
|
Binary file
|