@rljson/fs-agent 0.0.65 → 0.0.66
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 -9
- package/dist/fs-agent.js +6 -16
- package/package.json +1 -1
package/dist/fs-agent.d.ts
CHANGED
|
@@ -327,15 +327,6 @@ export declare class FsAgent {
|
|
|
327
327
|
* tree that lacks it is not deleting it — it simply predates it.
|
|
328
328
|
*/
|
|
329
329
|
private readonly _announcedFiles;
|
|
330
|
-
/**
|
|
331
|
-
* Files this node wrote because a peer sent them.
|
|
332
|
-
*
|
|
333
|
-
* Permission only: it is never consulted to decide whether the prune gate is
|
|
334
|
-
* armed, only to answer "may this particular file be pruned". A file the
|
|
335
|
-
* network handed us is one the network knows about, so the peer that sent it
|
|
336
|
-
* may later take it away.
|
|
337
|
-
*/
|
|
338
|
-
private readonly _restoredFiles;
|
|
339
330
|
/**
|
|
340
331
|
* Files this restore DELETED.
|
|
341
332
|
*
|
package/dist/fs-agent.js
CHANGED
|
@@ -1207,15 +1207,6 @@ class FsAgent {
|
|
|
1207
1207
|
* tree that lacks it is not deleting it — it simply predates it.
|
|
1208
1208
|
*/
|
|
1209
1209
|
_announcedFiles = /* @__PURE__ */ new Set();
|
|
1210
|
-
/**
|
|
1211
|
-
* Files this node wrote because a peer sent them.
|
|
1212
|
-
*
|
|
1213
|
-
* Permission only: it is never consulted to decide whether the prune gate is
|
|
1214
|
-
* armed, only to answer "may this particular file be pruned". A file the
|
|
1215
|
-
* network handed us is one the network knows about, so the peer that sent it
|
|
1216
|
-
* may later take it away.
|
|
1217
|
-
*/
|
|
1218
|
-
_restoredFiles = /* @__PURE__ */ new Set();
|
|
1219
1210
|
/**
|
|
1220
1211
|
* Files this restore DELETED.
|
|
1221
1212
|
*
|
|
@@ -1564,11 +1555,6 @@ ${err.stack}` : String(err);
|
|
|
1564
1555
|
target,
|
|
1565
1556
|
target === this._rootPath
|
|
1566
1557
|
);
|
|
1567
|
-
if (this._restoreSkipped > 0 || this._restorePruned > 0) {
|
|
1568
|
-
console.log(
|
|
1569
|
-
`[FsAgent] restore: wrote ${this._restoreWritten}, left ${this._restoreSkipped} already-correct file${this._restoreSkipped === 1 ? "" : "s"} untouched` + (this._restorePruned > 0 ? `, DELETED ${this._restorePruned}` : "")
|
|
1570
|
-
);
|
|
1571
|
-
}
|
|
1572
1558
|
if (options?.cleanTarget) {
|
|
1573
1559
|
let wouldPrune = 0;
|
|
1574
1560
|
for (const existing of preRestore) {
|
|
@@ -1597,6 +1583,11 @@ ${err.stack}` : String(err);
|
|
|
1597
1583
|
preRestore
|
|
1598
1584
|
);
|
|
1599
1585
|
}
|
|
1586
|
+
if (this._restoreSkipped > 0 || this._restorePruned > 0) {
|
|
1587
|
+
console.log(
|
|
1588
|
+
`[FsAgent] restore: wrote ${this._restoreWritten}, left ${this._restoreSkipped} already-correct file${this._restoreSkipped === 1 ? "" : "s"} untouched` + (this._restorePruned > 0 ? `, DELETED ${this._restorePruned}` : "")
|
|
1589
|
+
);
|
|
1590
|
+
}
|
|
1600
1591
|
if (this._restoreLocked.length > 0) {
|
|
1601
1592
|
throw new PartialRestoreError([...this._restoreLocked]);
|
|
1602
1593
|
}
|
|
@@ -1671,7 +1662,6 @@ ${err.stack}` : String(err);
|
|
|
1671
1662
|
try {
|
|
1672
1663
|
await FsAgent._atomicWriteFile(filePath, fileBlob.content);
|
|
1673
1664
|
this._restoreWritten++;
|
|
1674
|
-
this._restoredFiles.add(filePath);
|
|
1675
1665
|
if (meta.mtime) {
|
|
1676
1666
|
const mtime = new Date(meta.mtime);
|
|
1677
1667
|
await utimes(filePath, mtime, mtime);
|
|
@@ -2026,7 +2016,7 @@ ${err.stack}` : String(err);
|
|
|
2026
2016
|
}
|
|
2027
2017
|
}
|
|
2028
2018
|
} else if (!expectedFiles.has(fullPath) && preRestore.has(fullPath)) {
|
|
2029
|
-
if (this._announcedFiles.size > 0 && !this._announcedFiles.has(fullPath)
|
|
2019
|
+
if (this._announcedFiles.size > 0 && !this._announcedFiles.has(fullPath)) {
|
|
2030
2020
|
continue;
|
|
2031
2021
|
}
|
|
2032
2022
|
await rm(fullPath, { force: true });
|