pushwork 2.0.0-preview.2 → 2.0.0-preview.4

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.
Files changed (131) hide show
  1. package/dist/cli/commands.d.ts +71 -0
  2. package/dist/cli/commands.d.ts.map +1 -0
  3. package/dist/cli/commands.js +794 -0
  4. package/dist/cli/commands.js.map +1 -0
  5. package/dist/cli/index.d.ts +2 -0
  6. package/dist/cli/index.d.ts.map +1 -0
  7. package/dist/cli/index.js +19 -0
  8. package/dist/cli/index.js.map +1 -0
  9. package/dist/cli.js +63 -103
  10. package/dist/cli.js.map +1 -1
  11. package/dist/commands.d.ts +58 -0
  12. package/dist/commands.d.ts.map +1 -0
  13. package/dist/commands.js +975 -0
  14. package/dist/commands.js.map +1 -0
  15. package/dist/config/index.d.ts +71 -0
  16. package/dist/config/index.d.ts.map +1 -0
  17. package/dist/config/index.js +314 -0
  18. package/dist/config/index.js.map +1 -0
  19. package/dist/config.d.ts +1 -2
  20. package/dist/config.d.ts.map +1 -1
  21. package/dist/config.js +1 -2
  22. package/dist/config.js.map +1 -1
  23. package/dist/core/change-detection.d.ts +80 -0
  24. package/dist/core/change-detection.d.ts.map +1 -0
  25. package/dist/core/change-detection.js +560 -0
  26. package/dist/core/change-detection.js.map +1 -0
  27. package/dist/core/config.d.ts +81 -0
  28. package/dist/core/config.d.ts.map +1 -0
  29. package/dist/core/config.js +304 -0
  30. package/dist/core/config.js.map +1 -0
  31. package/dist/core/index.d.ts +6 -0
  32. package/dist/core/index.d.ts.map +1 -0
  33. package/dist/core/index.js +22 -0
  34. package/dist/core/index.js.map +1 -0
  35. package/dist/core/move-detection.d.ts +34 -0
  36. package/dist/core/move-detection.d.ts.map +1 -0
  37. package/dist/core/move-detection.js +128 -0
  38. package/dist/core/move-detection.js.map +1 -0
  39. package/dist/core/snapshot.d.ts +105 -0
  40. package/dist/core/snapshot.d.ts.map +1 -0
  41. package/dist/core/snapshot.js +254 -0
  42. package/dist/core/snapshot.js.map +1 -0
  43. package/dist/core/sync-engine.d.ts +177 -0
  44. package/dist/core/sync-engine.d.ts.map +1 -0
  45. package/dist/core/sync-engine.js +1471 -0
  46. package/dist/core/sync-engine.js.map +1 -0
  47. package/dist/index.d.ts +3 -4
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +4 -14
  50. package/dist/index.js.map +1 -1
  51. package/dist/pushwork.d.ts +36 -68
  52. package/dist/pushwork.d.ts.map +1 -1
  53. package/dist/pushwork.js +233 -569
  54. package/dist/pushwork.js.map +1 -1
  55. package/dist/snarf.d.ts +21 -0
  56. package/dist/snarf.d.ts.map +1 -0
  57. package/dist/snarf.js +117 -0
  58. package/dist/snarf.js.map +1 -0
  59. package/dist/stash.d.ts +0 -2
  60. package/dist/stash.d.ts.map +1 -1
  61. package/dist/stash.js +0 -1
  62. package/dist/stash.js.map +1 -1
  63. package/dist/types/config.d.ts +102 -0
  64. package/dist/types/config.d.ts.map +1 -0
  65. package/dist/types/config.js +10 -0
  66. package/dist/types/config.js.map +1 -0
  67. package/dist/types/documents.d.ts +88 -0
  68. package/dist/types/documents.d.ts.map +1 -0
  69. package/dist/types/documents.js +23 -0
  70. package/dist/types/documents.js.map +1 -0
  71. package/dist/types/index.d.ts +4 -0
  72. package/dist/types/index.d.ts.map +1 -0
  73. package/dist/types/index.js +20 -0
  74. package/dist/types/index.js.map +1 -0
  75. package/dist/types/snapshot.d.ts +64 -0
  76. package/dist/types/snapshot.d.ts.map +1 -0
  77. package/dist/types/snapshot.js +3 -0
  78. package/dist/types/snapshot.js.map +1 -0
  79. package/dist/utils/content-similarity.d.ts +53 -0
  80. package/dist/utils/content-similarity.d.ts.map +1 -0
  81. package/dist/utils/content-similarity.js +155 -0
  82. package/dist/utils/content-similarity.js.map +1 -0
  83. package/dist/utils/content.d.ts +10 -0
  84. package/dist/utils/content.d.ts.map +1 -0
  85. package/dist/utils/content.js +35 -0
  86. package/dist/utils/content.js.map +1 -0
  87. package/dist/utils/directory.d.ts +24 -0
  88. package/dist/utils/directory.d.ts.map +1 -0
  89. package/dist/utils/directory.js +56 -0
  90. package/dist/utils/directory.js.map +1 -0
  91. package/dist/utils/fs.d.ts +74 -0
  92. package/dist/utils/fs.d.ts.map +1 -0
  93. package/dist/utils/fs.js +298 -0
  94. package/dist/utils/fs.js.map +1 -0
  95. package/dist/utils/index.d.ts +5 -0
  96. package/dist/utils/index.d.ts.map +1 -0
  97. package/dist/utils/index.js +21 -0
  98. package/dist/utils/index.js.map +1 -0
  99. package/dist/utils/mime-types.d.ts +13 -0
  100. package/dist/utils/mime-types.d.ts.map +1 -0
  101. package/dist/utils/mime-types.js +247 -0
  102. package/dist/utils/mime-types.js.map +1 -0
  103. package/dist/utils/network-sync.d.ts +30 -0
  104. package/dist/utils/network-sync.d.ts.map +1 -0
  105. package/dist/utils/network-sync.js +391 -0
  106. package/dist/utils/network-sync.js.map +1 -0
  107. package/dist/utils/node-polyfills.d.ts +9 -0
  108. package/dist/utils/node-polyfills.d.ts.map +1 -0
  109. package/dist/utils/node-polyfills.js +9 -0
  110. package/dist/utils/node-polyfills.js.map +1 -0
  111. package/dist/utils/output.d.ts +129 -0
  112. package/dist/utils/output.d.ts.map +1 -0
  113. package/dist/utils/output.js +375 -0
  114. package/dist/utils/output.js.map +1 -0
  115. package/dist/utils/repo-factory.d.ts +15 -0
  116. package/dist/utils/repo-factory.d.ts.map +1 -0
  117. package/dist/utils/repo-factory.js +156 -0
  118. package/dist/utils/repo-factory.js.map +1 -0
  119. package/dist/utils/string-similarity.d.ts +14 -0
  120. package/dist/utils/string-similarity.d.ts.map +1 -0
  121. package/dist/utils/string-similarity.js +43 -0
  122. package/dist/utils/string-similarity.js.map +1 -0
  123. package/dist/utils/text-diff.d.ts +37 -0
  124. package/dist/utils/text-diff.d.ts.map +1 -0
  125. package/dist/utils/text-diff.js +131 -0
  126. package/dist/utils/text-diff.js.map +1 -0
  127. package/dist/utils/trace.d.ts +19 -0
  128. package/dist/utils/trace.d.ts.map +1 -0
  129. package/dist/utils/trace.js +68 -0
  130. package/dist/utils/trace.js.map +1 -0
  131. package/package.json +1 -1
@@ -0,0 +1,37 @@
1
+ import * as A from "@automerge/automerge";
2
+ /**
3
+ * Read content from an Automerge document, normalizing legacy ImmutableString
4
+ * values to plain strings for backwards compatibility.
5
+ *
6
+ * Old documents may store text as ImmutableString. This helper ensures callers
7
+ * always get back `string | Uint8Array | null`.
8
+ */
9
+ export declare function readDocContent(content: unknown): string | Uint8Array | null;
10
+ /**
11
+ * Update text content on an Automerge document property inside a change
12
+ * callback.
13
+ *
14
+ * If the existing value is already a collaborative text string, we diff and
15
+ * splice for minimal CRDT operations. If the existing value is a legacy
16
+ * ImmutableString we can't splice into it, so we assign the whole string
17
+ * which converts the field to a collaborative text CRDT going forward.
18
+ *
19
+ * @param doc - The mutable Automerge document (inside a change callback)
20
+ * @param path - Property path to the text field, e.g. ["content"]
21
+ * @param newContent - The desired new text value
22
+ */
23
+ export declare function updateTextContent(doc: any, path: A.Prop[], newContent: string): void;
24
+ /**
25
+ * Apply a text diff between oldContent and newContent as Automerge splice
26
+ * operations on the given document property path.
27
+ *
28
+ * This preserves the collaborative text CRDT structure by making minimal
29
+ * character-level edits rather than replacing the entire string.
30
+ *
31
+ * @param doc - The Automerge document (inside a change callback)
32
+ * @param path - The property path to the text field, e.g. ["content"]
33
+ * @param oldContent - The previous text content
34
+ * @param newContent - The desired new text content
35
+ */
36
+ export declare function spliceText(doc: any, path: A.Prop[], oldContent: string, newContent: string): void;
37
+ //# sourceMappingURL=text-diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-diff.d.ts","sourceRoot":"","sources":["../../src/utils/text-diff.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,sBAAsB,CAAA;AAGzC;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,IAAI,CAO3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAChC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EACd,UAAU,EAAE,MAAM,GAChB,IAAI,CAeN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACzB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAChB,IAAI,CA8BN"}
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.readDocContent = readDocContent;
37
+ exports.updateTextContent = updateTextContent;
38
+ exports.spliceText = spliceText;
39
+ const A = __importStar(require("@automerge/automerge"));
40
+ const diffLib = __importStar(require("diff"));
41
+ /**
42
+ * Read content from an Automerge document, normalizing legacy ImmutableString
43
+ * values to plain strings for backwards compatibility.
44
+ *
45
+ * Old documents may store text as ImmutableString. This helper ensures callers
46
+ * always get back `string | Uint8Array | null`.
47
+ */
48
+ function readDocContent(content) {
49
+ if (content == null)
50
+ return null;
51
+ if (typeof content === "string")
52
+ return content;
53
+ if (content instanceof Uint8Array)
54
+ return content;
55
+ // Legacy ImmutableString — convert to plain string
56
+ if (A.isImmutableString(content))
57
+ return content.toString();
58
+ return null;
59
+ }
60
+ /**
61
+ * Update text content on an Automerge document property inside a change
62
+ * callback.
63
+ *
64
+ * If the existing value is already a collaborative text string, we diff and
65
+ * splice for minimal CRDT operations. If the existing value is a legacy
66
+ * ImmutableString we can't splice into it, so we assign the whole string
67
+ * which converts the field to a collaborative text CRDT going forward.
68
+ *
69
+ * @param doc - The mutable Automerge document (inside a change callback)
70
+ * @param path - Property path to the text field, e.g. ["content"]
71
+ * @param newContent - The desired new text value
72
+ */
73
+ function updateTextContent(doc, path, newContent) {
74
+ const target = path.reduce((obj, key) => obj?.[key], doc);
75
+ if (typeof target === "string") {
76
+ // Already a collaborative text string — diff and splice
77
+ spliceText(doc, path, target, newContent);
78
+ }
79
+ else {
80
+ // Legacy ImmutableString, undefined, or other — assign directly.
81
+ // This converts the field to a collaborative text CRDT.
82
+ let obj = doc;
83
+ for (let i = 0; i < path.length - 1; i++) {
84
+ obj = obj[path[i]];
85
+ }
86
+ obj[path[path.length - 1]] = newContent;
87
+ }
88
+ }
89
+ /**
90
+ * Apply a text diff between oldContent and newContent as Automerge splice
91
+ * operations on the given document property path.
92
+ *
93
+ * This preserves the collaborative text CRDT structure by making minimal
94
+ * character-level edits rather than replacing the entire string.
95
+ *
96
+ * @param doc - The Automerge document (inside a change callback)
97
+ * @param path - The property path to the text field, e.g. ["content"]
98
+ * @param oldContent - The previous text content
99
+ * @param newContent - The desired new text content
100
+ */
101
+ function spliceText(doc, path, oldContent, newContent) {
102
+ if (oldContent === newContent)
103
+ return;
104
+ // Fast path: if old is empty, just insert everything
105
+ if (oldContent === "") {
106
+ A.splice(doc, path, 0, 0, newContent);
107
+ return;
108
+ }
109
+ // Fast path: if new is empty, just delete everything
110
+ if (newContent === "") {
111
+ A.splice(doc, path, 0, oldContent.length);
112
+ return;
113
+ }
114
+ const changes = diffLib.diffChars(oldContent, newContent);
115
+ let pos = 0;
116
+ for (const part of changes) {
117
+ if (part.removed) {
118
+ A.splice(doc, path, pos, part.value.length);
119
+ // Don't advance pos — text shifted left after deletion
120
+ }
121
+ else if (part.added) {
122
+ A.splice(doc, path, pos, 0, part.value);
123
+ pos += part.value.length;
124
+ }
125
+ else {
126
+ // Unchanged text — just advance the cursor
127
+ pos += part.value.length;
128
+ }
129
+ }
130
+ }
131
+ //# sourceMappingURL=text-diff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-diff.js","sourceRoot":"","sources":["../../src/utils/text-diff.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Enable or disable tracing
3
+ */
4
+ export declare function setTracingEnabled(enabled: boolean): void;
5
+ /**
6
+ * Check if tracing is enabled
7
+ */
8
+ export declare function isTracingEnabled(): boolean;
9
+ /**
10
+ * Trace a span of work by outputting to console
11
+ * Works for both sync and async functions
12
+ * Only outputs if tracing is enabled
13
+ *
14
+ * Usage:
15
+ * await span("operation", async () => { ... })
16
+ * span("operation", () => { ... })
17
+ */
18
+ export declare function span<T>(name: string, fn: () => T | Promise<T>): T | Promise<T>;
19
+ //# sourceMappingURL=trace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/utils/trace.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAExD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GACvB,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAqBhB"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setTracingEnabled = setTracingEnabled;
4
+ exports.isTracingEnabled = isTracingEnabled;
5
+ exports.span = span;
6
+ const output_1 = require("./output");
7
+ /**
8
+ * Global tracing state
9
+ */
10
+ let tracingEnabled = false;
11
+ /**
12
+ * Enable or disable tracing
13
+ */
14
+ function setTracingEnabled(enabled) {
15
+ tracingEnabled = enabled;
16
+ }
17
+ /**
18
+ * Check if tracing is enabled
19
+ */
20
+ function isTracingEnabled() {
21
+ return tracingEnabled;
22
+ }
23
+ /**
24
+ * Trace a span of work by outputting to console
25
+ * Works for both sync and async functions
26
+ * Only outputs if tracing is enabled
27
+ *
28
+ * Usage:
29
+ * await span("operation", async () => { ... })
30
+ * span("operation", () => { ... })
31
+ */
32
+ function span(name, fn) {
33
+ if (!tracingEnabled) {
34
+ return fn();
35
+ }
36
+ const start = performance.now();
37
+ const result = fn();
38
+ // Check if it's a promise (async)
39
+ if (result instanceof Promise) {
40
+ return result.then((value) => {
41
+ const duration = performance.now() - start;
42
+ output_1.out.taskLine(`${name} (${formatDuration(duration)})`, true);
43
+ return value;
44
+ });
45
+ }
46
+ // Sync case
47
+ const duration = performance.now() - start;
48
+ output_1.out.taskLine(`${name} (${formatDuration(duration)})`, true);
49
+ return result;
50
+ }
51
+ /**
52
+ * Format duration for display
53
+ */
54
+ function formatDuration(ms) {
55
+ if (ms < 1) {
56
+ return `${ms.toFixed(2)}ms`;
57
+ }
58
+ else if (ms < 1000) {
59
+ return `${Math.round(ms)}ms`;
60
+ }
61
+ else if (ms < 2000) {
62
+ return `${(ms / 1000).toFixed(2)}s`;
63
+ }
64
+ else {
65
+ return `${(ms / 1000).toFixed(1)}s`;
66
+ }
67
+ }
68
+ //# sourceMappingURL=trace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace.js","sourceRoot":"","sources":["../../src/utils/trace.ts"],"names":[],"mappings":";;AAUA,8CAEC;AAKD,4CAEC;AAWD,oBAwBC;AAtDD,qCAA+B;AAE/B;;GAEG;AACH,IAAI,cAAc,GAAG,KAAK,CAAC;AAE3B;;GAEG;AACH,SAAgB,iBAAiB,CAAC,OAAgB;IAChD,cAAc,GAAG,OAAO,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,IAAI,CAClB,IAAY,EACZ,EAAwB;IAExB,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,EAAE,EAAE,CAAC;IAEpB,kCAAkC;IAClC,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;YAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;YAC3C,YAAG,CAAC,QAAQ,CAAC,GAAG,IAAI,KAAK,cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC5D,OAAO,KAAK,CAAC;QACf,CAAC,CAAM,CAAC;IACV,CAAC;IAED,YAAY;IACZ,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;IAC3C,YAAG,CAAC,QAAQ,CAAC,GAAG,IAAI,KAAK,cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC5D,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,EAAU;IAChC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACX,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9B,CAAC;SAAM,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC;QACrB,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC;IAC/B,CAAC;SAAM,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACtC,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pushwork",
3
- "version": "2.0.0-preview.2",
3
+ "version": "2.0.0-preview.4",
4
4
  "description": "Bidirectional directory synchronization using Automerge CRDTs",
5
5
  "main": "dist/index.js",
6
6
  "exports": {