@rljson/fs-agent 0.0.62 → 0.0.64
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/fs-agent.d.ts +0 -10
- package/dist/fs-agent.js +2 -16
- package/package.json +1 -1
package/dist/fs-agent.d.ts
CHANGED
|
@@ -793,16 +793,6 @@ export declare class FsAgent {
|
|
|
793
793
|
* @returns True when every declared parent is a state this node has left.
|
|
794
794
|
*/
|
|
795
795
|
private _senderIsBehind;
|
|
796
|
-
/**
|
|
797
|
-
* Marks an incoming tree's files as known to the network.
|
|
798
|
-
*
|
|
799
|
-
* A union, not a replacement: {@link _rememberAnnounced} answers "what this
|
|
800
|
-
* node has told the network", and this answers "what the network has told
|
|
801
|
-
* this node". Both make a file prunable; neither alone is the whole set, and
|
|
802
|
-
* treating the first as the whole set is what made deletions vanish.
|
|
803
|
-
* @param tree - The tree just applied.
|
|
804
|
-
*/
|
|
805
|
-
private _rememberReceived;
|
|
806
796
|
private _rememberAnnounced;
|
|
807
797
|
private _adoptAppliedRef;
|
|
808
798
|
/**
|
package/dist/fs-agent.js
CHANGED
|
@@ -2052,11 +2052,12 @@ ${err.stack}` : String(err);
|
|
|
2052
2052
|
const initialIsNew = initialParentRef !== void 0 && initialTree.rootHash !== initialParentRef;
|
|
2053
2053
|
const initialPrevious = initialIsNew ? await this._ancestryPrevious(db, treeKey, [initialParentRef]) : void 0;
|
|
2054
2054
|
const isSilentJoiner = initialParentRef === void 0 && this._treeIsEmpty(initialTree);
|
|
2055
|
+
const resumingUnchanged = initialParentRef !== void 0 && initialTree.rootHash === initialParentRef;
|
|
2055
2056
|
const initialRef = await FsAgent._withTimeout(
|
|
2056
2057
|
new FsDbAdapter(db, treeKey).storeFsTree(initialTree, {
|
|
2057
2058
|
...options,
|
|
2058
2059
|
previous: initialPrevious,
|
|
2059
|
-
skipNotification: isSilentJoiner ? true : options?.skipNotification
|
|
2060
|
+
skipNotification: isSilentJoiner || resumingUnchanged ? true : options?.skipNotification
|
|
2060
2061
|
}),
|
|
2061
2062
|
this._timeouts.fetchTree,
|
|
2062
2063
|
`syncToDb → initial storeFsTree(${treeKey})`
|
|
@@ -2454,20 +2455,6 @@ ${err.stack}` : String(err);
|
|
|
2454
2455
|
(ref) => ref !== this._currentRef && ref !== this._lastAppliedRef && this._stateHistory.includes(ref)
|
|
2455
2456
|
);
|
|
2456
2457
|
}
|
|
2457
|
-
/**
|
|
2458
|
-
* Marks an incoming tree's files as known to the network.
|
|
2459
|
-
*
|
|
2460
|
-
* A union, not a replacement: {@link _rememberAnnounced} answers "what this
|
|
2461
|
-
* node has told the network", and this answers "what the network has told
|
|
2462
|
-
* this node". Both make a file prunable; neither alone is the whole set, and
|
|
2463
|
-
* treating the first as the whole set is what made deletions vanish.
|
|
2464
|
-
* @param tree - The tree just applied.
|
|
2465
|
-
*/
|
|
2466
|
-
_rememberReceived(tree) {
|
|
2467
|
-
for (const path of this._getFileContentMap(tree).keys()) {
|
|
2468
|
-
this._announcedFiles.add(join(this._rootPath, path));
|
|
2469
|
-
}
|
|
2470
|
-
}
|
|
2471
2458
|
_rememberAnnounced(tree) {
|
|
2472
2459
|
this._announcedFiles.clear();
|
|
2473
2460
|
for (const path of this._getFileContentMap(tree).keys()) {
|
|
@@ -2677,7 +2664,6 @@ ${err.stack}` : String(err);
|
|
|
2677
2664
|
this._adoptAppliedRef(connector, treeRef);
|
|
2678
2665
|
this._currentRef = postRestoreRef;
|
|
2679
2666
|
this._persistCurrentRef(postRestoreRef);
|
|
2680
|
-
this._rememberReceived(incomingTree);
|
|
2681
2667
|
const postRestoreFiles = this._getFileContentMap(postRestoreTree);
|
|
2682
2668
|
const incomingFiles = this._getFileContentMap(incomingTree);
|
|
2683
2669
|
let hasNewsOfOurOwn = false;
|