@rljson/fs-agent 0.0.17 → 0.0.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.
- package/dist/fs-agent.d.ts +6 -0
- package/dist/fs-agent.js +11 -0
- package/package.json +3 -3
package/dist/fs-agent.d.ts
CHANGED
|
@@ -133,6 +133,12 @@ export declare class FsAgent {
|
|
|
133
133
|
private _stopSync?;
|
|
134
134
|
private _stopSyncFromDb?;
|
|
135
135
|
private _lastSentRef?;
|
|
136
|
+
/**
|
|
137
|
+
* The incoming ref most recently applied. Retired from the connector's dedup
|
|
138
|
+
* sets when the next one supersedes it, so a peer returning the tree to that
|
|
139
|
+
* state can still reach this agent.
|
|
140
|
+
*/
|
|
141
|
+
private _lastAppliedRef?;
|
|
136
142
|
/** Content fingerprint of the last tree we broadcasted (paths+blobIds) */
|
|
137
143
|
private _lastSentContentKey?;
|
|
138
144
|
private _timeouts;
|
package/dist/fs-agent.js
CHANGED
|
@@ -933,6 +933,12 @@ class FsAgent {
|
|
|
933
933
|
_stopSync;
|
|
934
934
|
_stopSyncFromDb;
|
|
935
935
|
_lastSentRef;
|
|
936
|
+
/**
|
|
937
|
+
* The incoming ref most recently applied. Retired from the connector's dedup
|
|
938
|
+
* sets when the next one supersedes it, so a peer returning the tree to that
|
|
939
|
+
* state can still reach this agent.
|
|
940
|
+
*/
|
|
941
|
+
_lastAppliedRef;
|
|
936
942
|
/** Content fingerprint of the last tree we broadcasted (paths+blobIds) */
|
|
937
943
|
_lastSentContentKey;
|
|
938
944
|
_timeouts;
|
|
@@ -1119,6 +1125,7 @@ ${err.stack}` : String(err);
|
|
|
1119
1125
|
* via an explicit send, which pre-empts the Connector's db-observer path.
|
|
1120
1126
|
*/
|
|
1121
1127
|
async _sendRef(connector, ref, predecessorRefs) {
|
|
1128
|
+
connector.invalidateSent?.(ref);
|
|
1122
1129
|
if (this._resolveConflicts) {
|
|
1123
1130
|
connector.setPredecessors(predecessorRefs ?? []);
|
|
1124
1131
|
}
|
|
@@ -1870,6 +1877,10 @@ ${err.stack}` : String(err);
|
|
|
1870
1877
|
skipNotification: true,
|
|
1871
1878
|
previous
|
|
1872
1879
|
});
|
|
1880
|
+
if (this._lastAppliedRef && this._lastAppliedRef !== treeRef) {
|
|
1881
|
+
connector.invalidateSent?.(this._lastAppliedRef);
|
|
1882
|
+
}
|
|
1883
|
+
this._lastAppliedRef = treeRef;
|
|
1873
1884
|
this._lastSentRef = postRestoreRef;
|
|
1874
1885
|
this._lastSentContentKey = this._contentKeyFromTree(postRestoreTree);
|
|
1875
1886
|
this._currentRef = postRestoreRef;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rljson/fs-agent",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"updateGoldens": "cross-env UPDATE_GOLDENS=true pnpm test"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@rljson/server": "^0.0.
|
|
31
|
+
"@rljson/server": "^0.0.43",
|
|
32
32
|
"@types/node": "^25.3.1",
|
|
33
33
|
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
34
34
|
"@typescript-eslint/parser": "^8.56.1",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@rljson/bs": "^0.0.21",
|
|
54
|
-
"@rljson/db": "^0.0.
|
|
54
|
+
"@rljson/db": "^0.0.30",
|
|
55
55
|
"@rljson/hash": "^0.0.18",
|
|
56
56
|
"@rljson/io": "^0.0.66",
|
|
57
57
|
"@rljson/json": "^0.0.23",
|