pushwork 1.1.3 → 1.1.5
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/cli/commands.d.ts +71 -0
- package/dist/cli/commands.d.ts.map +1 -0
- package/dist/cli/commands.js +794 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +19 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/index.d.ts +71 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +314 -0
- package/dist/config/index.js.map +1 -0
- package/dist/core/change-detection.d.ts +1 -1
- package/dist/core/change-detection.d.ts.map +1 -1
- package/dist/core/change-detection.js +16 -6
- package/dist/core/change-detection.js.map +1 -1
- package/dist/core/sync-engine.d.ts +7 -1
- package/dist/core/sync-engine.d.ts.map +1 -1
- package/dist/core/sync-engine.js +27 -10
- package/dist/core/sync-engine.js.map +1 -1
- package/dist/utils/content-similarity.d.ts +53 -0
- package/dist/utils/content-similarity.d.ts.map +1 -0
- package/dist/utils/content-similarity.js +155 -0
- package/dist/utils/content-similarity.js.map +1 -0
- package/dist/utils/node-polyfills.d.ts +9 -0
- package/dist/utils/node-polyfills.d.ts.map +1 -0
- package/dist/utils/node-polyfills.js +9 -0
- package/dist/utils/node-polyfills.js.map +1 -0
- package/package.json +1 -1
- package/src/core/change-detection.ts +21 -6
- package/src/core/sync-engine.ts +28 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-similarity.js","sourceRoot":"","sources":["../../src/utils/content-similarity.ts"],"names":[],"mappings":";;;AAAA,6BAA4C;AAE5C;;GAEG;AACH,MAAa,iBAAiB;IAK5B;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAC9B,QAA6B,EAC7B,QAA6B;QAE7B,yCAAyC;QACzC,IAAI,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAA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APIs required by @automerge/automerge-subduction.
|
|
3
|
+
* Must be imported before any subduction code.
|
|
4
|
+
*
|
|
5
|
+
* The Subduction WASM module uses IndexedDB for key persistence
|
|
6
|
+
* (via WebCryptoSigner). In Node.js we provide a fake-indexeddb polyfill.
|
|
7
|
+
*/
|
|
8
|
+
import "fake-indexeddb/auto";
|
|
9
|
+
//# sourceMappingURL=node-polyfills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-polyfills.d.ts","sourceRoot":"","sources":["../../src/utils/node-polyfills.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Polyfills for browser APIs required by @automerge/automerge-subduction.
|
|
3
|
+
* Must be imported before any subduction code.
|
|
4
|
+
*
|
|
5
|
+
* The Subduction WASM module uses IndexedDB for key persistence
|
|
6
|
+
* (via WebCryptoSigner). In Node.js we provide a fake-indexeddb polyfill.
|
|
7
|
+
*/
|
|
8
|
+
import "fake-indexeddb/auto";
|
|
9
|
+
//# sourceMappingURL=node-polyfills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-polyfills.js","sourceRoot":"","sources":["../../src/utils/node-polyfills.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -25,6 +25,11 @@ import {
|
|
|
25
25
|
import {isContentEqual, contentHash} from "../utils/content"
|
|
26
26
|
import {out} from "../utils/output"
|
|
27
27
|
|
|
28
|
+
const isDebug = !!process.env.DEBUG
|
|
29
|
+
function debug(...args: any[]) {
|
|
30
|
+
if (isDebug) console.error("[pushwork:change-detection]", ...args)
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
/**
|
|
29
34
|
* Change detection engine
|
|
30
35
|
*/
|
|
@@ -50,7 +55,7 @@ export class ChangeDetector {
|
|
|
50
55
|
/**
|
|
51
56
|
* Detect all changes between local filesystem and snapshot
|
|
52
57
|
*/
|
|
53
|
-
async detectChanges(snapshot: SyncSnapshot): Promise<DetectedChange[]> {
|
|
58
|
+
async detectChanges(snapshot: SyncSnapshot, excludePaths?: Set<string>): Promise<DetectedChange[]> {
|
|
54
59
|
const changes: DetectedChange[] = []
|
|
55
60
|
|
|
56
61
|
// Get current filesystem state
|
|
@@ -65,7 +70,7 @@ export class ChangeDetector {
|
|
|
65
70
|
changes.push(...remoteChanges)
|
|
66
71
|
|
|
67
72
|
// Check for new remote documents not in snapshot (critical for clone scenarios)
|
|
68
|
-
const newRemoteDocuments = await this.detectNewRemoteDocuments(snapshot)
|
|
73
|
+
const newRemoteDocuments = await this.detectNewRemoteDocuments(snapshot, excludePaths)
|
|
69
74
|
changes.push(...newRemoteDocuments)
|
|
70
75
|
|
|
71
76
|
return changes
|
|
@@ -337,7 +342,8 @@ export class ChangeDetector {
|
|
|
337
342
|
* This is critical for clone scenarios where local snapshot is empty
|
|
338
343
|
*/
|
|
339
344
|
private async detectNewRemoteDocuments(
|
|
340
|
-
snapshot: SyncSnapshot
|
|
345
|
+
snapshot: SyncSnapshot,
|
|
346
|
+
excludePaths?: Set<string>
|
|
341
347
|
): Promise<DetectedChange[]> {
|
|
342
348
|
const changes: DetectedChange[] = []
|
|
343
349
|
|
|
@@ -352,7 +358,8 @@ export class ChangeDetector {
|
|
|
352
358
|
snapshot.rootDirectoryUrl,
|
|
353
359
|
"",
|
|
354
360
|
snapshot,
|
|
355
|
-
changes
|
|
361
|
+
changes,
|
|
362
|
+
excludePaths
|
|
356
363
|
)
|
|
357
364
|
} catch (error) {
|
|
358
365
|
out.taskLine(`Failed to discover remote documents: ${error}`, true)
|
|
@@ -368,7 +375,8 @@ export class ChangeDetector {
|
|
|
368
375
|
directoryUrl: AutomergeUrl,
|
|
369
376
|
currentPath: string,
|
|
370
377
|
snapshot: SyncSnapshot,
|
|
371
|
-
changes: DetectedChange[]
|
|
378
|
+
changes: DetectedChange[],
|
|
379
|
+
excludePaths?: Set<string>
|
|
372
380
|
): Promise<void> {
|
|
373
381
|
try {
|
|
374
382
|
// Find and wait for document to be available (retries on "unavailable")
|
|
@@ -387,6 +395,12 @@ export class ChangeDetector {
|
|
|
387
395
|
: entry.name
|
|
388
396
|
|
|
389
397
|
if (entry.type === "file") {
|
|
398
|
+
// Skip files that were deliberately deleted during this sync cycle
|
|
399
|
+
if (excludePaths?.has(entryPath)) {
|
|
400
|
+
debug(`skipping deleted path during re-detection: ${entryPath}`)
|
|
401
|
+
continue
|
|
402
|
+
}
|
|
403
|
+
|
|
390
404
|
// Check if this file is already tracked in the snapshot
|
|
391
405
|
const existingEntry = snapshot.files.get(entryPath)
|
|
392
406
|
|
|
@@ -470,7 +484,8 @@ export class ChangeDetector {
|
|
|
470
484
|
entry.url,
|
|
471
485
|
entryPath,
|
|
472
486
|
snapshot,
|
|
473
|
-
changes
|
|
487
|
+
changes,
|
|
488
|
+
excludePaths
|
|
474
489
|
)
|
|
475
490
|
}
|
|
476
491
|
}
|
package/src/core/sync-engine.ts
CHANGED
|
@@ -125,7 +125,7 @@ export class SyncEngine {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* Get the appropriate URL for a directory entry.
|
|
128
|
+
* Get the appropriate URL for a file's directory entry.
|
|
129
129
|
* Artifact paths get versioned URLs (with heads) for exact version fetching.
|
|
130
130
|
* Non-artifact paths get plain URLs for collaborative editing.
|
|
131
131
|
*/
|
|
@@ -136,6 +136,15 @@ export class SyncEngine {
|
|
|
136
136
|
return getPlainUrl(handle.url)
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Get the appropriate URL for a subdirectory's directory entry.
|
|
141
|
+
* Always uses plain URLs — versioned URLs on directories can cause
|
|
142
|
+
* issues where consumers see a version without the docs array.
|
|
143
|
+
*/
|
|
144
|
+
private getDirEntryUrl(handle: DocHandle<unknown>): AutomergeUrl {
|
|
145
|
+
return getPlainUrl(handle.url)
|
|
146
|
+
}
|
|
147
|
+
|
|
139
148
|
/**
|
|
140
149
|
* Set the root directory URL in the snapshot
|
|
141
150
|
*/
|
|
@@ -224,12 +233,8 @@ export class SyncEngine {
|
|
|
224
233
|
result.errors.push(...commitResult.errors)
|
|
225
234
|
result.warnings.push(...commitResult.warnings)
|
|
226
235
|
|
|
227
|
-
//
|
|
228
|
-
|
|
229
|
-
result.filesChanged > 0 || result.directoriesChanged > 0
|
|
230
|
-
if (hasChanges) {
|
|
231
|
-
await this.touchRootDirectory(snapshot)
|
|
232
|
-
}
|
|
236
|
+
// Always touch root directory after commit
|
|
237
|
+
await this.touchRootDirectory(snapshot)
|
|
233
238
|
|
|
234
239
|
// Save updated snapshot
|
|
235
240
|
await this.snapshotManager.save(snapshot)
|
|
@@ -433,6 +438,8 @@ export class SyncEngine {
|
|
|
433
438
|
// Detect all changes
|
|
434
439
|
debug("sync: detecting changes")
|
|
435
440
|
out.update("Detecting local and remote changes")
|
|
441
|
+
// Capture pre-push snapshot file paths to detect deletions after push
|
|
442
|
+
const prePushFilePaths = new Set(snapshot.files.keys())
|
|
436
443
|
const changes = await this.changeDetector.detectChanges(snapshot)
|
|
437
444
|
|
|
438
445
|
// Detect moves
|
|
@@ -560,8 +567,18 @@ export class SyncEngine {
|
|
|
560
567
|
}
|
|
561
568
|
|
|
562
569
|
// Re-detect changes after network sync for fresh state
|
|
570
|
+
// Compute paths deleted during push so they aren't resurrected during pull
|
|
571
|
+
const deletedPaths = new Set<string>()
|
|
572
|
+
for (const p of prePushFilePaths) {
|
|
573
|
+
if (!snapshot.files.has(p)) {
|
|
574
|
+
deletedPaths.add(p)
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (deletedPaths.size > 0) {
|
|
578
|
+
debug(`sync: excluding ${deletedPaths.size} deleted paths from re-detection`)
|
|
579
|
+
}
|
|
563
580
|
debug("sync: re-detecting changes after network sync")
|
|
564
|
-
const freshChanges = await this.changeDetector.detectChanges(snapshot)
|
|
581
|
+
const freshChanges = await this.changeDetector.detectChanges(snapshot, deletedPaths)
|
|
565
582
|
const freshRemoteChanges = freshChanges.filter(
|
|
566
583
|
c =>
|
|
567
584
|
c.changeType === ChangeType.REMOTE_ONLY ||
|
|
@@ -862,7 +879,7 @@ export class SyncEngine {
|
|
|
862
879
|
)
|
|
863
880
|
subdirUpdates.push({
|
|
864
881
|
name: childName,
|
|
865
|
-
url: this.
|
|
882
|
+
url: this.getDirEntryUrl(childHandle),
|
|
866
883
|
})
|
|
867
884
|
}
|
|
868
885
|
}
|
|
@@ -1362,7 +1379,7 @@ export class SyncEngine {
|
|
|
1362
1379
|
this.handlesByPath.set(directoryPath, childDirHandle)
|
|
1363
1380
|
|
|
1364
1381
|
// Get appropriate URL for directory entry
|
|
1365
|
-
const entryUrl = this.
|
|
1382
|
+
const entryUrl = this.getDirEntryUrl(childDirHandle)
|
|
1366
1383
|
|
|
1367
1384
|
// Update snapshot with discovered directory
|
|
1368
1385
|
this.snapshotManager.updateDirectoryEntry(snapshot, directoryPath, {
|
|
@@ -1393,7 +1410,7 @@ export class SyncEngine {
|
|
|
1393
1410
|
const dirHandle = this.repo.create(dirDoc)
|
|
1394
1411
|
|
|
1395
1412
|
// Get appropriate URL for directory entry
|
|
1396
|
-
const dirEntryUrl = this.
|
|
1413
|
+
const dirEntryUrl = this.getDirEntryUrl(dirHandle)
|
|
1397
1414
|
|
|
1398
1415
|
// Add this directory to its parent
|
|
1399
1416
|
// Use plain URL for mutable handle
|