pushwork 2.0.0-preview.4 → 2.0.0-preview.6
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/branches.d.ts +2 -1
- package/dist/branches.d.ts.map +1 -1
- package/dist/branches.js +23 -4
- package/dist/branches.js.map +1 -1
- package/dist/checkpoints.d.ts +41 -0
- package/dist/checkpoints.d.ts.map +1 -0
- package/dist/checkpoints.js +210 -0
- package/dist/checkpoints.js.map +1 -0
- package/dist/stash.d.ts +2 -0
- package/dist/stash.d.ts.map +1 -1
- package/dist/stash.js +1 -0
- package/dist/stash.js.map +1 -1
- package/package.json +5 -5
- package/dist/cli/commands.d.ts +0 -71
- package/dist/cli/commands.d.ts.map +0 -1
- package/dist/cli/commands.js +0 -794
- package/dist/cli/commands.js.map +0 -1
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -19
- package/dist/cli/index.js.map +0 -1
- package/dist/commands.d.ts +0 -58
- package/dist/commands.d.ts.map +0 -1
- package/dist/commands.js +0 -975
- package/dist/commands.js.map +0 -1
- package/dist/config/index.d.ts +0 -71
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -314
- package/dist/config/index.js.map +0 -1
- package/dist/core/change-detection.d.ts +0 -80
- package/dist/core/change-detection.d.ts.map +0 -1
- package/dist/core/change-detection.js +0 -560
- package/dist/core/change-detection.js.map +0 -1
- package/dist/core/config.d.ts +0 -81
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/config.js +0 -304
- package/dist/core/config.js.map +0 -1
- package/dist/core/index.d.ts +0 -6
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -22
- package/dist/core/index.js.map +0 -1
- package/dist/core/move-detection.d.ts +0 -34
- package/dist/core/move-detection.d.ts.map +0 -1
- package/dist/core/move-detection.js +0 -128
- package/dist/core/move-detection.js.map +0 -1
- package/dist/core/snapshot.d.ts +0 -105
- package/dist/core/snapshot.d.ts.map +0 -1
- package/dist/core/snapshot.js +0 -254
- package/dist/core/snapshot.js.map +0 -1
- package/dist/core/sync-engine.d.ts +0 -177
- package/dist/core/sync-engine.d.ts.map +0 -1
- package/dist/core/sync-engine.js +0 -1471
- package/dist/core/sync-engine.js.map +0 -1
- package/dist/types/config.d.ts +0 -102
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/config.js +0 -10
- package/dist/types/config.js.map +0 -1
- package/dist/types/documents.d.ts +0 -88
- package/dist/types/documents.d.ts.map +0 -1
- package/dist/types/documents.js +0 -23
- package/dist/types/documents.js.map +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -20
- package/dist/types/index.js.map +0 -1
- package/dist/types/snapshot.d.ts +0 -64
- package/dist/types/snapshot.d.ts.map +0 -1
- package/dist/types/snapshot.js +0 -3
- package/dist/types/snapshot.js.map +0 -1
- package/dist/utils/content-similarity.d.ts +0 -53
- package/dist/utils/content-similarity.d.ts.map +0 -1
- package/dist/utils/content-similarity.js +0 -155
- package/dist/utils/content-similarity.js.map +0 -1
- package/dist/utils/content.d.ts +0 -10
- package/dist/utils/content.d.ts.map +0 -1
- package/dist/utils/content.js +0 -35
- package/dist/utils/content.js.map +0 -1
- package/dist/utils/directory.d.ts +0 -24
- package/dist/utils/directory.d.ts.map +0 -1
- package/dist/utils/directory.js +0 -56
- package/dist/utils/directory.js.map +0 -1
- package/dist/utils/fs.d.ts +0 -74
- package/dist/utils/fs.d.ts.map +0 -1
- package/dist/utils/fs.js +0 -298
- package/dist/utils/fs.js.map +0 -1
- package/dist/utils/index.d.ts +0 -5
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -21
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/mime-types.d.ts +0 -13
- package/dist/utils/mime-types.d.ts.map +0 -1
- package/dist/utils/mime-types.js +0 -247
- package/dist/utils/mime-types.js.map +0 -1
- package/dist/utils/network-sync.d.ts +0 -30
- package/dist/utils/network-sync.d.ts.map +0 -1
- package/dist/utils/network-sync.js +0 -391
- package/dist/utils/network-sync.js.map +0 -1
- package/dist/utils/node-polyfills.d.ts +0 -9
- package/dist/utils/node-polyfills.d.ts.map +0 -1
- package/dist/utils/node-polyfills.js +0 -9
- package/dist/utils/node-polyfills.js.map +0 -1
- package/dist/utils/output.d.ts +0 -129
- package/dist/utils/output.d.ts.map +0 -1
- package/dist/utils/output.js +0 -375
- package/dist/utils/output.js.map +0 -1
- package/dist/utils/repo-factory.d.ts +0 -15
- package/dist/utils/repo-factory.d.ts.map +0 -1
- package/dist/utils/repo-factory.js +0 -156
- package/dist/utils/repo-factory.js.map +0 -1
- package/dist/utils/string-similarity.d.ts +0 -14
- package/dist/utils/string-similarity.d.ts.map +0 -1
- package/dist/utils/string-similarity.js +0 -43
- package/dist/utils/string-similarity.js.map +0 -1
- package/dist/utils/text-diff.d.ts +0 -37
- package/dist/utils/text-diff.d.ts.map +0 -1
- package/dist/utils/text-diff.js +0 -131
- package/dist/utils/text-diff.js.map +0 -1
- package/dist/utils/trace.d.ts +0 -19
- package/dist/utils/trace.d.ts.map +0 -1
- package/dist/utils/trace.js +0 -68
- package/dist/utils/trace.js.map +0 -1
- package/patches/@automerge__automerge-repo@2.6.0-subduction.15.patch +0 -26
package/dist/utils/output.js
DELETED
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
-
};
|
|
10
|
-
var _Output_instances, _Output_updateTaskDisplay, _Output_stopTask;
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.out = exports.Output = void 0;
|
|
13
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
14
|
-
const ora_1 = __importDefault(require("ora"));
|
|
15
|
-
/**
|
|
16
|
-
* Clean terminal output manager (Singleton)
|
|
17
|
-
* - Progress stays on one line (spinner updates in place)
|
|
18
|
-
* - No emojis
|
|
19
|
-
* - Background colors for section headers
|
|
20
|
-
* - Minimal output
|
|
21
|
-
* - Supports scrolling task lines (max-lines)
|
|
22
|
-
*/
|
|
23
|
-
class Output {
|
|
24
|
-
constructor() {
|
|
25
|
-
_Output_instances.add(this);
|
|
26
|
-
this.spinner = null;
|
|
27
|
-
this.taskStartTime = null;
|
|
28
|
-
this.taskOriginalMessage = null; // Original task message for done()
|
|
29
|
-
this.taskCurrentMessage = null; // Current display message (can be updated)
|
|
30
|
-
this.taskLines = []; // Lines written during active task
|
|
31
|
-
this.taskMaxLines = 0; // 0 = unlimited
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Get the singleton instance
|
|
35
|
-
*/
|
|
36
|
-
static getInstance() {
|
|
37
|
-
if (!Output.instance) {
|
|
38
|
-
Output.instance = new Output();
|
|
39
|
-
}
|
|
40
|
-
return Output.instance;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Reset the singleton (useful for testing)
|
|
44
|
-
*/
|
|
45
|
-
static reset() {
|
|
46
|
-
if (Output.instance?.spinner) {
|
|
47
|
-
Output.instance.spinner.stop();
|
|
48
|
-
Output.instance.spinner.clear();
|
|
49
|
-
}
|
|
50
|
-
Output.instance = null;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Start a task with spinner - updates in place
|
|
54
|
-
* Completes any previous task before starting the new one
|
|
55
|
-
* @param message - The task message
|
|
56
|
-
* @param maxLines - Maximum number of task lines to show (0 = unlimited, lines scroll)
|
|
57
|
-
*/
|
|
58
|
-
task(message, maxLines = 0) {
|
|
59
|
-
// Complete any existing task first
|
|
60
|
-
if (this.spinner) {
|
|
61
|
-
this.done();
|
|
62
|
-
}
|
|
63
|
-
this.taskStartTime = Date.now();
|
|
64
|
-
this.taskOriginalMessage = message;
|
|
65
|
-
this.taskCurrentMessage = message;
|
|
66
|
-
this.taskMaxLines = maxLines;
|
|
67
|
-
this.taskLines = [];
|
|
68
|
-
this.spinner = (0, ora_1.default)(message).start();
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Update spinner text (stays on same line)
|
|
72
|
-
*/
|
|
73
|
-
update(message) {
|
|
74
|
-
if (this.spinner) {
|
|
75
|
-
this.taskCurrentMessage = message;
|
|
76
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_updateTaskDisplay).call(this);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Add a line to the active task (appears below spinner, scrolls if max-lines set)
|
|
81
|
-
* Lines are dimmed and temporary - they disappear when task completes unless kept
|
|
82
|
-
* If no task is active, displays as a regular log message
|
|
83
|
-
*/
|
|
84
|
-
taskLine(message, keepOnComplete = false) {
|
|
85
|
-
if (!this.spinner) {
|
|
86
|
-
// No active task, just log normally as regular output
|
|
87
|
-
this.info(message);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
// Add to task lines buffer with keep flag
|
|
91
|
-
this.taskLines.push(keepOnComplete ? `[keep]${message}` : message);
|
|
92
|
-
// If max lines set, trim from the start (scroll)
|
|
93
|
-
if (this.taskMaxLines > 0 && this.taskLines.length > this.taskMaxLines) {
|
|
94
|
-
this.taskLines = this.taskLines.slice(-this.taskMaxLines);
|
|
95
|
-
}
|
|
96
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_updateTaskDisplay).call(this);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Clear all task lines (useful when you want to reset the scrolling window)
|
|
100
|
-
*/
|
|
101
|
-
clearTaskLines() {
|
|
102
|
-
this.taskLines = [];
|
|
103
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_updateTaskDisplay).call(this);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Complete task with optional duration display
|
|
107
|
-
* Defaults to showing the original task message with duration
|
|
108
|
-
* Task lines marked with keepOnComplete will be preserved, others are cleared
|
|
109
|
-
*/
|
|
110
|
-
done(message, showTime = true) {
|
|
111
|
-
if (!this.spinner)
|
|
112
|
-
return;
|
|
113
|
-
let text = message || this.taskOriginalMessage || "done";
|
|
114
|
-
if (showTime && this.taskStartTime) {
|
|
115
|
-
const durationMs = Date.now() - this.taskStartTime;
|
|
116
|
-
const durationText = (() => {
|
|
117
|
-
switch (true) {
|
|
118
|
-
case durationMs < 1000:
|
|
119
|
-
return `${durationMs}ms`;
|
|
120
|
-
case durationMs < 2000:
|
|
121
|
-
return `${(durationMs / 1000).toFixed(2)}s`;
|
|
122
|
-
default:
|
|
123
|
-
return `${(durationMs / 1000).toFixed(1)}s`;
|
|
124
|
-
}
|
|
125
|
-
})();
|
|
126
|
-
text += chalk_1.default.dim(` (${durationText})`);
|
|
127
|
-
}
|
|
128
|
-
// Clear multiline text and set to just completion message
|
|
129
|
-
this.spinner.text = text;
|
|
130
|
-
this.spinner.succeed();
|
|
131
|
-
this.spinner = null;
|
|
132
|
-
// Print kept task lines after completion
|
|
133
|
-
const keptLines = this.taskLines.filter((line) => line.startsWith("[keep]"));
|
|
134
|
-
for (const line of keptLines) {
|
|
135
|
-
console.log(chalk_1.default.dim(` ${line.slice(6)}`));
|
|
136
|
-
}
|
|
137
|
-
this.taskStartTime = null;
|
|
138
|
-
this.taskOriginalMessage = null;
|
|
139
|
-
this.taskCurrentMessage = null;
|
|
140
|
-
this.taskLines = [];
|
|
141
|
-
this.taskMaxLines = 0;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Show an object as a table of key-value pairs
|
|
145
|
-
* Filters out undefined values and applies optional transforms
|
|
146
|
-
* Automatically calculates key padding from max key length
|
|
147
|
-
*/
|
|
148
|
-
obj(obj, keyTransform, valueTransform) {
|
|
149
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
150
|
-
// Filter out undefined values and apply key transform
|
|
151
|
-
const entries = [];
|
|
152
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
153
|
-
if (value === undefined)
|
|
154
|
-
continue;
|
|
155
|
-
const displayKey = keyTransform ? keyTransform(key) : key;
|
|
156
|
-
entries.push([key, displayKey, value]);
|
|
157
|
-
}
|
|
158
|
-
// Calculate max key length for padding
|
|
159
|
-
const maxKeyLength = Math.max(...entries.map(([, displayKey]) => displayKey.length));
|
|
160
|
-
// Print each entry
|
|
161
|
-
for (const [key, displayKey, value] of entries) {
|
|
162
|
-
const displayValue = valueTransform
|
|
163
|
-
? valueTransform(value, key)
|
|
164
|
-
: String(value);
|
|
165
|
-
const keyFormatted = chalk_1.default.dim(displayKey.padEnd(maxKeyLength + 2));
|
|
166
|
-
console.log(`${keyFormatted}${displayValue}`);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Display array as bulleted list
|
|
171
|
-
* Each item shown with dim bullet and white text
|
|
172
|
-
*/
|
|
173
|
-
arr(items) {
|
|
174
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
175
|
-
for (const item of items) {
|
|
176
|
-
const bullet = chalk_1.default.dim("• ");
|
|
177
|
-
console.log(`${bullet}${String(item)}`);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Show plain message with optional color
|
|
182
|
-
*/
|
|
183
|
-
log(message, color) {
|
|
184
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
185
|
-
if (color) {
|
|
186
|
-
const colorFn = color === "dim" ? chalk_1.default.dim : chalk_1.default[color];
|
|
187
|
-
console.log(colorFn(message));
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
console.log(message);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Show success message (green text)
|
|
195
|
-
*/
|
|
196
|
-
success(message) {
|
|
197
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
198
|
-
console.log(chalk_1.default.green(message));
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Show success block (green background label + optional message)
|
|
202
|
-
*/
|
|
203
|
-
successBlock(label, message = "") {
|
|
204
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
205
|
-
console.log(`\n${chalk_1.default.bgGreen.black(` ${label} `)}${message && ` ${message}`}`);
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Show success message (green text)
|
|
209
|
-
*/
|
|
210
|
-
spicy(message) {
|
|
211
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
212
|
-
console.log(chalk_1.default.cyan(message));
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Show success block (green background label + optional message)
|
|
216
|
-
*/
|
|
217
|
-
spicyBlock(label, message = "") {
|
|
218
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
219
|
-
console.log(`\n${chalk_1.default.bgCyan.black(` ${label} `)}${message && ` ${message}`}`);
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Show message with rainbow gradient
|
|
223
|
-
*/
|
|
224
|
-
rainbow(message) {
|
|
225
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
226
|
-
// Rainbow colors in order
|
|
227
|
-
const colors = [
|
|
228
|
-
chalk_1.default.red,
|
|
229
|
-
chalk_1.default.rgb(255, 165, 0), // orange
|
|
230
|
-
chalk_1.default.yellow,
|
|
231
|
-
chalk_1.default.green,
|
|
232
|
-
chalk_1.default.cyan,
|
|
233
|
-
chalk_1.default.blue,
|
|
234
|
-
chalk_1.default.magenta,
|
|
235
|
-
];
|
|
236
|
-
const chars = message.split("");
|
|
237
|
-
const colorCount = colors.length;
|
|
238
|
-
// Spread colors across the string
|
|
239
|
-
const rainbow = chars
|
|
240
|
-
.map((char, i) => {
|
|
241
|
-
// Calculate which color to use based on position
|
|
242
|
-
const colorIndex = Math.floor((i / chars.length) * colorCount);
|
|
243
|
-
const color = colors[Math.min(colorIndex, colorCount - 1)];
|
|
244
|
-
return color(char);
|
|
245
|
-
})
|
|
246
|
-
.join("");
|
|
247
|
-
console.log(rainbow);
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Show info message (dim text)
|
|
251
|
-
*/
|
|
252
|
-
info(message) {
|
|
253
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
254
|
-
console.log(chalk_1.default.dim(message));
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Show info block (grey background label + optional message)
|
|
258
|
-
*/
|
|
259
|
-
infoBlock(label, message = "") {
|
|
260
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
261
|
-
console.log(`\n${chalk_1.default.bgGrey.white(` ${label} `)}${message && ` ${message}`}`);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Show error message (red text) - fails spinner if running
|
|
265
|
-
*/
|
|
266
|
-
error(message) {
|
|
267
|
-
if (this.spinner) {
|
|
268
|
-
this.spinner.fail("failed");
|
|
269
|
-
this.spinner = null;
|
|
270
|
-
this.taskStartTime = null;
|
|
271
|
-
this.taskOriginalMessage = null;
|
|
272
|
-
this.taskCurrentMessage = null;
|
|
273
|
-
}
|
|
274
|
-
console.error(chalk_1.default.red(message instanceof Error
|
|
275
|
-
? message.message
|
|
276
|
-
: message instanceof Object
|
|
277
|
-
? JSON.stringify(message)
|
|
278
|
-
: String(message)));
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Show error block (red background label + optional message) - fails spinner if running
|
|
282
|
-
*/
|
|
283
|
-
errorBlock(label, message = "") {
|
|
284
|
-
if (this.spinner) {
|
|
285
|
-
this.spinner.fail("failed");
|
|
286
|
-
this.spinner = null;
|
|
287
|
-
this.taskStartTime = null;
|
|
288
|
-
this.taskOriginalMessage = null;
|
|
289
|
-
this.taskCurrentMessage = null;
|
|
290
|
-
}
|
|
291
|
-
console.error(`\n${chalk_1.default.bgRed.white(` ${label} `)}${message && ` ${message}`}`);
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Show warning message (yellow text)
|
|
295
|
-
*/
|
|
296
|
-
warn(message) {
|
|
297
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
298
|
-
console.log(chalk_1.default.yellow(message));
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Show warning block (yellow background label + optional message)
|
|
302
|
-
*/
|
|
303
|
-
warnBlock(label, message = "") {
|
|
304
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
305
|
-
console.log(`\n${chalk_1.default.bgYellow.black(` ${label} `)}${message && ` ${message}`}`);
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Show detailed error information and exit the program
|
|
309
|
-
* Use this when an unexpected/unrecoverable error occurs
|
|
310
|
-
* Shows error message and stack trace, then exits
|
|
311
|
-
*/
|
|
312
|
-
crash(error, exitCode = 1) {
|
|
313
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
314
|
-
if (error instanceof Error) {
|
|
315
|
-
// Error type and message
|
|
316
|
-
console.error(chalk_1.default.red(`${error.name}: ${error.message}`));
|
|
317
|
-
// Stack trace
|
|
318
|
-
if (error.stack) {
|
|
319
|
-
console.error("");
|
|
320
|
-
console.error(chalk_1.default.dim("Stack trace:"));
|
|
321
|
-
const stackLines = error.stack.split("\n").slice(1); // Skip first line (error message)
|
|
322
|
-
stackLines.forEach((line) => console.error(chalk_1.default.dim(` ${line.trim()}`)));
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
console.error(chalk_1.default.red(String(error)));
|
|
327
|
-
}
|
|
328
|
-
process.exit(exitCode);
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* Exit with code
|
|
332
|
-
*/
|
|
333
|
-
exit(code) {
|
|
334
|
-
__classPrivateFieldGet(this, _Output_instances, "m", _Output_stopTask).call(this);
|
|
335
|
-
process.exit(code || 0);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
exports.Output = Output;
|
|
339
|
-
_Output_instances = new WeakSet(), _Output_updateTaskDisplay = function _Output_updateTaskDisplay() {
|
|
340
|
-
if (!this.spinner)
|
|
341
|
-
return;
|
|
342
|
-
const currentText = this.taskCurrentMessage || this.spinner.text.split("\n")[0] || "";
|
|
343
|
-
// If no task lines, show just the spinner message
|
|
344
|
-
if (this.taskLines.length === 0) {
|
|
345
|
-
this.spinner.text = currentText;
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
// Build multiline text: spinner message + task lines below
|
|
349
|
-
const taskLinesText = this.taskLines
|
|
350
|
-
.map((line) => {
|
|
351
|
-
const cleanLine = line.startsWith("[keep]") ? line.slice(6) : line;
|
|
352
|
-
return chalk_1.default.dim(` ${cleanLine}`);
|
|
353
|
-
})
|
|
354
|
-
.join("\n");
|
|
355
|
-
// Set spinner text to include task lines (ora handles multiline rendering)
|
|
356
|
-
this.spinner.text = `${currentText}\n${taskLinesText}`;
|
|
357
|
-
}, _Output_stopTask = function _Output_stopTask() {
|
|
358
|
-
if (this.spinner) {
|
|
359
|
-
this.spinner.stop();
|
|
360
|
-
this.spinner.clear();
|
|
361
|
-
this.spinner = null;
|
|
362
|
-
}
|
|
363
|
-
this.taskStartTime = null;
|
|
364
|
-
this.taskOriginalMessage = null;
|
|
365
|
-
this.taskCurrentMessage = null;
|
|
366
|
-
this.taskLines = [];
|
|
367
|
-
this.taskMaxLines = 0;
|
|
368
|
-
};
|
|
369
|
-
Output.instance = null;
|
|
370
|
-
/**
|
|
371
|
-
* Global singleton output instance
|
|
372
|
-
* Import and use this anywhere in your code
|
|
373
|
-
*/
|
|
374
|
-
exports.out = Output.getInstance();
|
|
375
|
-
//# sourceMappingURL=output.js.map
|
package/dist/utils/output.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0B;AAC1B,8CAA+B;AAE/B;;;;;;;GAOG;AACH,MAAa,MAAM;IASjB;;QAPQ,YAAO,GAAe,IAAI,CAAC;QAC3B,kBAAa,GAAkB,IAAI,CAAC;QACpC,wBAAmB,GAAkB,IAAI,CAAC,CAAC,mCAAmC;QAC9E,uBAAkB,GAAkB,IAAI,CAAC,CAAC,2CAA2C;QACrF,cAAS,GAAa,EAAE,CAAC,CAAC,mCAAmC;QAC7D,iBAAY,GAAW,CAAC,CAAC,CAAC,gBAAgB;IAE3B,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;QACjC,CAAC;QACD,OAAO,MAAM,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK;QACV,IAAI,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC7B,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAClC,CAAC;QACD,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAED;;;;;OAKG;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AAQ,GAAkB,IAAI,AAAtB,CAAuB;AAibhD;;;GAGG;AACU,QAAA,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Repo } from "@automerge/automerge-repo";
|
|
2
|
-
import { DirectoryConfig } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Create an Automerge repository with configuration-based setup.
|
|
5
|
-
*
|
|
6
|
-
* When `sub` is true, uses the Subduction sync backend built into
|
|
7
|
-
* automerge-repo. The Repo manages its own SubductionSource internally —
|
|
8
|
-
* we just pass `subductionWebsocketEndpoints` and the Repo handles
|
|
9
|
-
* connection management, sync, and retries.
|
|
10
|
-
*
|
|
11
|
-
* When `sub` is false (default), uses the traditional WebSocket network
|
|
12
|
-
* adapter for sync via the automerge sync server.
|
|
13
|
-
*/
|
|
14
|
-
export declare function createRepo(workingDir: string, config: DirectoryConfig, sub?: boolean): Promise<Repo>;
|
|
15
|
-
//# sourceMappingURL=repo-factory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repo-factory.d.ts","sourceRoot":"","sources":["../../src/utils/repo-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,IAAI,EAGT,MAAM,2BAA2B,CAAA;AAIlC,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AA0ExC;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAC/B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,eAAe,EACvB,GAAG,GAAE,OAAe,GAClB,OAAO,CAAC,IAAI,CAAC,CA+Cf"}
|
|
@@ -1,156 +0,0 @@
|
|
|
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.createRepo = createRepo;
|
|
37
|
-
const automerge_repo_storage_nodefs_1 = require("@automerge/automerge-repo-storage-nodefs");
|
|
38
|
-
const fs = __importStar(require("fs/promises"));
|
|
39
|
-
const path = __importStar(require("path"));
|
|
40
|
-
/**
|
|
41
|
-
* Perform a real ESM dynamic import that tsc won't rewrite to require().
|
|
42
|
-
*
|
|
43
|
-
* TypeScript with `"module": "commonjs"` compiles `await import("x")` to
|
|
44
|
-
* `require("x")`, which resolves CJS entries instead of ESM entries. The
|
|
45
|
-
* Wasm module instance is different between the CJS and ESM module graphs,
|
|
46
|
-
* so initializing via CJS require() doesn't help the ESM /slim imports
|
|
47
|
-
* inside automerge-repo.
|
|
48
|
-
*
|
|
49
|
-
* This helper uses `new Function` to create a real `import()` expression
|
|
50
|
-
* that Node.js evaluates as ESM, sharing the same module graph as the
|
|
51
|
-
* Repo's internal imports.
|
|
52
|
-
*/
|
|
53
|
-
const dynamicImport = new Function("specifier", "return import(specifier)");
|
|
54
|
-
/**
|
|
55
|
-
* Initialize the Subduction Wasm module and return the Repo constructor.
|
|
56
|
-
*
|
|
57
|
-
* The Repo constructor calls set_subduction_logger() and new MemorySigner()
|
|
58
|
-
* from @automerge/automerge-subduction/slim, which require the Wasm module
|
|
59
|
-
* to be initialized first. automerge-repo exports initSubduction() to
|
|
60
|
-
* handle this — it dynamically imports the non-/slim entry (which
|
|
61
|
-
* auto-initializes the Wasm as a side effect).
|
|
62
|
-
*
|
|
63
|
-
* Both the Repo and initSubduction must be loaded via ESM dynamic import()
|
|
64
|
-
* so they share the same module graph as the Repo's internal /slim imports.
|
|
65
|
-
*/
|
|
66
|
-
let cachedRepoClass;
|
|
67
|
-
async function getRepoClass() {
|
|
68
|
-
if (cachedRepoClass)
|
|
69
|
-
return cachedRepoClass;
|
|
70
|
-
// Import Repo and initialize Subduction Wasm via automerge-repo's
|
|
71
|
-
// initSubduction() helper. This must happen before new Repo() because
|
|
72
|
-
// the constructor calls set_subduction_logger() and new MemorySigner()
|
|
73
|
-
// which require the Wasm module to be ready.
|
|
74
|
-
//
|
|
75
|
-
// Both imports use the ESM dynamic import wrapper so they share the
|
|
76
|
-
// same module graph as the Repo's internal /slim imports.
|
|
77
|
-
const repoMod = await dynamicImport("@automerge/automerge-repo");
|
|
78
|
-
await repoMod.initSubduction();
|
|
79
|
-
cachedRepoClass = repoMod.Repo;
|
|
80
|
-
return cachedRepoClass;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Scan a directory tree for 0-byte files, which indicate incomplete writes
|
|
84
|
-
* from a previous run (process exited before storage flushed). Returns true
|
|
85
|
-
* if any are found.
|
|
86
|
-
*/
|
|
87
|
-
async function hasCorruptStorage(dir) {
|
|
88
|
-
try {
|
|
89
|
-
await fs.access(dir);
|
|
90
|
-
}
|
|
91
|
-
catch {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
95
|
-
for (const entry of entries) {
|
|
96
|
-
const fullPath = path.join(dir, entry.name);
|
|
97
|
-
if (entry.isDirectory()) {
|
|
98
|
-
if (await hasCorruptStorage(fullPath))
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
else if (entry.isFile()) {
|
|
102
|
-
const stat = await fs.stat(fullPath);
|
|
103
|
-
if (stat.size === 0)
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Create an Automerge repository with configuration-based setup.
|
|
111
|
-
*
|
|
112
|
-
* When `sub` is true, uses the Subduction sync backend built into
|
|
113
|
-
* automerge-repo. The Repo manages its own SubductionSource internally —
|
|
114
|
-
* we just pass `subductionWebsocketEndpoints` and the Repo handles
|
|
115
|
-
* connection management, sync, and retries.
|
|
116
|
-
*
|
|
117
|
-
* When `sub` is false (default), uses the traditional WebSocket network
|
|
118
|
-
* adapter for sync via the automerge sync server.
|
|
119
|
-
*/
|
|
120
|
-
async function createRepo(workingDir, config, sub = false) {
|
|
121
|
-
const RepoClass = await getRepoClass();
|
|
122
|
-
const syncToolDir = path.join(workingDir, ".pushwork");
|
|
123
|
-
const automergeDir = path.join(syncToolDir, "automerge");
|
|
124
|
-
// Detect and recover from corrupt local storage (0-byte files left by
|
|
125
|
-
// incomplete writes from a previous run). Wipe the cache so the Repo
|
|
126
|
-
// hydrates cleanly from the sync server.
|
|
127
|
-
if (await hasCorruptStorage(automergeDir)) {
|
|
128
|
-
console.warn("[pushwork] Corrupt local storage detected, clearing cache...");
|
|
129
|
-
await fs.rm(automergeDir, { recursive: true, force: true });
|
|
130
|
-
await fs.mkdir(automergeDir, { recursive: true });
|
|
131
|
-
}
|
|
132
|
-
const storage = new automerge_repo_storage_nodefs_1.NodeFSStorageAdapter(automergeDir);
|
|
133
|
-
if (sub) {
|
|
134
|
-
const endpoints = [];
|
|
135
|
-
if (config.sync_enabled && config.sync_server) {
|
|
136
|
-
endpoints.push(config.sync_server);
|
|
137
|
-
}
|
|
138
|
-
return new RepoClass({ storage, subductionWebsocketEndpoints: endpoints });
|
|
139
|
-
}
|
|
140
|
-
// Default: WebSocket sync adapter
|
|
141
|
-
const repoConfig = { storage };
|
|
142
|
-
if (config.sync_enabled && config.sync_server) {
|
|
143
|
-
// Load the WebSocket adapter via ESM dynamic import to stay in the
|
|
144
|
-
// same module graph as the Repo.
|
|
145
|
-
const wsMod = await dynamicImport("@automerge/automerge-repo-network-websocket");
|
|
146
|
-
// The websocket adapter package (subduction.8) hasn't updated its
|
|
147
|
-
// NetworkAdapter base-class types to match the repo's new
|
|
148
|
-
// NetworkAdapterInterface (which added state() and stricter
|
|
149
|
-
// EventEmitter generics). At runtime the adapter has all required
|
|
150
|
-
// methods; this is purely a declaration mismatch.
|
|
151
|
-
const networkAdapter = new wsMod.BrowserWebSocketClientAdapter(config.sync_server);
|
|
152
|
-
repoConfig.network = [networkAdapter];
|
|
153
|
-
}
|
|
154
|
-
return new RepoClass(repoConfig);
|
|
155
|
-
}
|
|
156
|
-
//# sourceMappingURL=repo-factory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repo-factory.js","sourceRoot":"","sources":["../../src/utils/repo-factory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA,gCAmDC;AA3ID,4FAA6E;AAC7E,gDAAiC;AACjC,2CAA4B;AAG5B;;;;;;;;;;;;GAYG;AAC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EAAmE;QACnE,iCAAiC;QACjC,MAAM,KAAK,GAAG,MAAM,aAAa,CAChC,6CAA6C,CAC7C,CAAA;QACD,kEAAkE;QAClE,0DAA0D;QAC1D,4DAA4D;QAC5D,kEAAkE;QAClE,kDAAkD;QAClD,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,6BAA6B,CAC7D,MAAM,CAAC,WAAW,CACoB,CAAA;QACvC,UAAU,CAAC,OAAO,GAAG,CAAC,cAAc,CAAC,CAAA;IACtC,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,UAAU,CAAC,CAAA;AACjC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
* Calculate similarity between two strings
|
|
4
|
-
|
|
5
|
-
* @param {string} str1 First string to match
|
|
6
|
-
* @param {string} str2 Second string to match
|
|
7
|
-
* @param {number} [substringLength=2] Optional. Length of substring to be used in calculating similarity. Default 2.
|
|
8
|
-
* @param {boolean} [caseSensitive=false] Optional. Whether you want to consider case in string matching. Default false;
|
|
9
|
-
|
|
10
|
-
* @returns Number between 0 and 1, with 0 being a low match score.
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
export declare const stringSimilarity: (str1: string, str2: string, substringLength?: number, caseSensitive?: boolean) => number;
|
|
14
|
-
//# sourceMappingURL=string-similarity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string-similarity.d.ts","sourceRoot":"","sources":["../../src/utils/string-similarity.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,kBAAiB,MAAU,EAC3B,gBAAe,OAAe,WAkC/B,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* Based on the Sørensen–Dice coefficient, code from https://github.com/stephenjjbrown/string-similarity-js */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.stringSimilarity = void 0;
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
* Calculate similarity between two strings
|
|
8
|
-
|
|
9
|
-
* @param {string} str1 First string to match
|
|
10
|
-
* @param {string} str2 Second string to match
|
|
11
|
-
* @param {number} [substringLength=2] Optional. Length of substring to be used in calculating similarity. Default 2.
|
|
12
|
-
* @param {boolean} [caseSensitive=false] Optional. Whether you want to consider case in string matching. Default false;
|
|
13
|
-
|
|
14
|
-
* @returns Number between 0 and 1, with 0 being a low match score.
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
const stringSimilarity = (str1, str2, substringLength = 2, caseSensitive = false) => {
|
|
18
|
-
if (str1 === str2)
|
|
19
|
-
return 1;
|
|
20
|
-
if (!caseSensitive) {
|
|
21
|
-
str1 = str1.toLowerCase();
|
|
22
|
-
str2 = str2.toLowerCase();
|
|
23
|
-
}
|
|
24
|
-
if (str1.length < substringLength || str2.length < substringLength)
|
|
25
|
-
return 0;
|
|
26
|
-
const map = new Map();
|
|
27
|
-
for (let i = 0; i < str1.length - (substringLength - 1); i++) {
|
|
28
|
-
const substr1 = str1.substring(i, i + substringLength);
|
|
29
|
-
map.set(substr1, map.has(substr1) ? map.get(substr1) + 1 : 1);
|
|
30
|
-
}
|
|
31
|
-
let match = 0;
|
|
32
|
-
for (let j = 0; j < str2.length - (substringLength - 1); j++) {
|
|
33
|
-
const substr2 = str2.substring(j, j + substringLength);
|
|
34
|
-
const count = map.has(substr2) ? map.get(substr2) : 0;
|
|
35
|
-
if (count > 0) {
|
|
36
|
-
map.set(substr2, count - 1);
|
|
37
|
-
match++;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return (match * 2) / (str1.length + str2.length - (substringLength - 1) * 2);
|
|
41
|
-
};
|
|
42
|
-
exports.stringSimilarity = stringSimilarity;
|
|
43
|
-
//# sourceMappingURL=string-similarity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-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