@rljson/fs-agent 0.0.45 → 0.0.46

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.
Files changed (2) hide show
  1. package/dist/fs-agent.js +8 -2
  2. package/package.json +1 -1
package/dist/fs-agent.js CHANGED
@@ -2425,6 +2425,9 @@ ${err.stack}` : String(err);
2425
2425
  `[FsAgent] syncFromDb: equivalent content, skipping restore (incoming=${incomingFiles.size} entries, current=${currentFiles.size} entries, ref=${treeRef.slice(0, 8)}…)`
2426
2426
  );
2427
2427
  this._adoptAppliedRef(connector, treeRef);
2428
+ this._currentRef = treeRef;
2429
+ this._persistCurrentRef(treeRef);
2430
+ this._lastSentContentKey = this._contentKeyFromTree(currentTree);
2428
2431
  return;
2429
2432
  }
2430
2433
  if (this._resolveConflicts && this._currentRef && predecessorRefs && predecessorRefs.length > 0) {
@@ -2474,10 +2477,13 @@ ${err.stack}` : String(err);
2474
2477
  previous
2475
2478
  });
2476
2479
  this._adoptAppliedRef(connector, treeRef);
2477
- this._lastSentRef = postRestoreRef;
2478
- this._lastSentContentKey = this._contentKeyFromTree(postRestoreTree);
2479
2480
  this._currentRef = postRestoreRef;
2480
2481
  this._persistCurrentRef(postRestoreRef);
2482
+ const postRestoreKey = this._contentKeyFromTree(postRestoreTree);
2483
+ if (postRestoreKey === this._contentKeyFromTree(incomingTree)) {
2484
+ this._lastSentRef = postRestoreRef;
2485
+ this._lastSentContentKey = postRestoreKey;
2486
+ }
2481
2487
  return;
2482
2488
  } catch (err) {
2483
2489
  if (err instanceof MassDeleteRefusedError) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/fs-agent",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "Rljson fs-agent description",
5
5
  "homepage": "https://github.com/rljson/fs-agent",
6
6
  "bugs": "https://github.com/rljson/fs-agent/issues",