@rljson/fs-agent 0.0.52 → 0.0.54
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.js +5 -2
- package/package.json +1 -1
package/dist/fs-agent.js
CHANGED
|
@@ -2505,12 +2505,15 @@ ${err.stack}` : String(err);
|
|
|
2505
2505
|
const ancestryExpected = this._resolveConflicts;
|
|
2506
2506
|
const declaresAncestry = (predecessorRefs?.length ?? 0) > 0;
|
|
2507
2507
|
const ancestryIsCarried = connector.syncConfig?.causalOrdering === true;
|
|
2508
|
-
const
|
|
2508
|
+
const statesIAmIn = [this._currentRef, this._lastAppliedRef].filter(
|
|
2509
|
+
(r) => r !== void 0
|
|
2510
|
+
);
|
|
2511
|
+
const senderSawMyState = !ancestryIsCarried || !declaresAncestry || statesIAmIn.some((r) => predecessorRefs.includes(r));
|
|
2509
2512
|
const withholdPrune = restoreOptions?.cleanTarget && (ancestryExpected && !declaresAncestry || !senderSawMyState);
|
|
2510
2513
|
const applyOptions = withholdPrune ? { ...restoreOptions, cleanTarget: false } : restoreOptions;
|
|
2511
2514
|
if (applyOptions !== restoreOptions) {
|
|
2512
2515
|
console.warn(
|
|
2513
|
-
`[FsAgent] ref=${treeRef.slice(0, 8)}… ` + (declaresAncestry ? `descends from ${predecessorRefs?.map((r) => r.slice(0, 8)).join(", ")}, not from
|
|
2516
|
+
`[FsAgent] ref=${treeRef.slice(0, 8)}… ` + (declaresAncestry ? `descends from ${predecessorRefs?.map((r) => r.slice(0, 8)).join(", ")}, not from a state this node is in (${statesIAmIn.map((r) => r.slice(0, 8)).join(", ") || "none"})` : "declares no ancestry") + ` — applying additively, not pruning.`
|
|
2514
2517
|
);
|
|
2515
2518
|
}
|
|
2516
2519
|
if (restoreOptions?.cleanTarget) {
|