@beyondwork/wb-cli 0.1.10 → 0.1.12
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/out/extension.js +191 -87
- package/out/lib/workblock.js +7 -8
- package/out/lib/workblock.js.map +1 -1
- package/package.json +2 -2
package/out/extension.js
CHANGED
|
@@ -85,14 +85,22 @@ async function connectToHost(host, context, treeDataProvider) {
|
|
|
85
85
|
throw new Error(`Failed to retrieve token for ${host}.`);
|
|
86
86
|
}
|
|
87
87
|
const newClient = new client_1.BeyondWorkClient();
|
|
88
|
-
newClient.addStreamHandler((message) => {
|
|
88
|
+
newClient.addStreamHandler(async (message) => {
|
|
89
89
|
treeDataProvider.setStreamsForHost(host, message);
|
|
90
|
-
treeDataProvider.updateConnectionStatus(host,
|
|
90
|
+
treeDataProvider.updateConnectionStatus(host, "connected");
|
|
91
91
|
streamsByHost[host] = message;
|
|
92
92
|
hostsByStream = {};
|
|
93
93
|
for (const stream of message) {
|
|
94
94
|
hostsByStream[stream.id] = host;
|
|
95
95
|
}
|
|
96
|
+
try {
|
|
97
|
+
// Attempt automatic binding of streams to directories based on manifest.yaml id matches
|
|
98
|
+
await autoBindStreams(message, context, treeDataProvider);
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
outputChannel.appendLine(`${e}`);
|
|
102
|
+
vscode.window.showErrorMessage(`Beyond Work: ${e}`);
|
|
103
|
+
}
|
|
96
104
|
Promise.all(message.map(async (stream) => {
|
|
97
105
|
return await newClient.getWorkblock(stream.id);
|
|
98
106
|
})).then((workblocks) => {
|
|
@@ -108,7 +116,8 @@ async function connectToHost(host, context, treeDataProvider) {
|
|
|
108
116
|
newClient.addEventHandler(async (message) => {
|
|
109
117
|
for (const msg of message) {
|
|
110
118
|
if (msg.type == "workblock") {
|
|
111
|
-
if (syncStreams[msg.stream_id] !== undefined &&
|
|
119
|
+
if (syncStreams[msg.stream_id] !== undefined &&
|
|
120
|
+
msg.work_block?.work_block) {
|
|
112
121
|
await storeWorkblockFiles(syncStreams[msg.stream_id], msg.work_block?.work_block, newClient);
|
|
113
122
|
}
|
|
114
123
|
await onWorkblockChange(msg.stream_id, msg.work_block?.work_block, treeDataProvider, host);
|
|
@@ -124,7 +133,7 @@ async function connectToHost(host, context, treeDataProvider) {
|
|
|
124
133
|
});
|
|
125
134
|
}
|
|
126
135
|
else {
|
|
127
|
-
streamsByHost[host] = streamsByHost[host].filter(s => s.id !== msg.stream?.stream?.id);
|
|
136
|
+
streamsByHost[host] = streamsByHost[host].filter((s) => s.id !== msg.stream?.stream?.id);
|
|
128
137
|
}
|
|
129
138
|
streamsByHost[host] = streamsByHost[host].sort((a, b) => a.title.localeCompare(b.title));
|
|
130
139
|
treeDataProvider.setStreamsForHost(host, streamsByHost[host]);
|
|
@@ -132,24 +141,29 @@ async function connectToHost(host, context, treeDataProvider) {
|
|
|
132
141
|
}
|
|
133
142
|
});
|
|
134
143
|
newClient.addOnDisconnect(() => {
|
|
135
|
-
treeDataProvider.updateConnectionStatus(host,
|
|
144
|
+
treeDataProvider.updateConnectionStatus(host, "disconnected");
|
|
145
|
+
});
|
|
146
|
+
newClient.addErrorHandler((msg) => {
|
|
147
|
+
outputChannel.appendLine(`[ws] ${msg}`);
|
|
148
|
+
vscode.window.showErrorMessage(`Beyond Work: ${msg}`);
|
|
136
149
|
});
|
|
137
150
|
newClient.connect(host, token, context);
|
|
138
151
|
clientsByHost[host] = newClient;
|
|
139
|
-
context.globalState.update(
|
|
152
|
+
context.globalState.update("bw_current_connection", host);
|
|
140
153
|
return newClient;
|
|
141
154
|
}
|
|
142
155
|
function activate(context) {
|
|
143
|
-
diagnosticCollection =
|
|
144
|
-
|
|
156
|
+
diagnosticCollection =
|
|
157
|
+
vscode.languages.createDiagnosticCollection("validation");
|
|
158
|
+
outputChannel = vscode.window.createOutputChannel("Beyond Work");
|
|
145
159
|
outputLogger = new lib_1.VSCodeLogger(outputChannel);
|
|
146
|
-
streamsByDir = context.globalState.get(
|
|
147
|
-
syncStreams = context.globalState.get(
|
|
160
|
+
streamsByDir = context.globalState.get("bw_streams_dir") ?? {};
|
|
161
|
+
syncStreams = context.globalState.get("bw_sync_streams") ?? {};
|
|
148
162
|
hostsByStream = {};
|
|
149
163
|
streamsByHost = {};
|
|
150
164
|
latestWorkblocks = {};
|
|
151
165
|
const treeDataProvider = new tree_data_provider_1.BeyondWorkTreeDataProvider(context, streamsByDir, syncStreams);
|
|
152
|
-
const treeView = vscode.window.createTreeView(
|
|
166
|
+
const treeView = vscode.window.createTreeView("beyondworkConnections", {
|
|
153
167
|
treeDataProvider: treeDataProvider,
|
|
154
168
|
showCollapseAll: false,
|
|
155
169
|
canSelectMany: true,
|
|
@@ -157,8 +171,8 @@ function activate(context) {
|
|
|
157
171
|
const stringContentProvider = new StringDocumentContentProvider();
|
|
158
172
|
const providerReg = vscode.workspace.registerTextDocumentContentProvider("bw-manifest", stringContentProvider);
|
|
159
173
|
const onFileChange = async (uri, sync) => {
|
|
160
|
-
const ignorePatterns = [
|
|
161
|
-
if (ignorePatterns.some((pattern) => uri.
|
|
174
|
+
const ignorePatterns = ["node_modules/", ".git/"];
|
|
175
|
+
if (ignorePatterns.some((pattern) => uri.path.includes(pattern))) {
|
|
162
176
|
return;
|
|
163
177
|
}
|
|
164
178
|
for (const [streamId, dir] of Object.entries(streamsByDir)) {
|
|
@@ -167,7 +181,6 @@ function activate(context) {
|
|
|
167
181
|
if (host) {
|
|
168
182
|
if (syncStreams[streamId] !== undefined && sync) {
|
|
169
183
|
await setWorkblock(dir, host, streamId).then(() => {
|
|
170
|
-
;
|
|
171
184
|
treeDataProvider.setSyncStatus(host, streamId, false);
|
|
172
185
|
});
|
|
173
186
|
}
|
|
@@ -178,34 +191,34 @@ function activate(context) {
|
|
|
178
191
|
}
|
|
179
192
|
}
|
|
180
193
|
};
|
|
181
|
-
const addConnectionCmd = vscode.commands.registerCommand(
|
|
194
|
+
const addConnectionCmd = vscode.commands.registerCommand("beyondwork.beyondwork.addConnection", async () => {
|
|
182
195
|
let host = await vscode.window.showInputBox({
|
|
183
|
-
prompt:
|
|
184
|
-
placeHolder:
|
|
196
|
+
prompt: "Enter the hostname you want to connect to",
|
|
197
|
+
placeHolder: "Hostname (eg. acme.prod-eu1.bworker.ai)",
|
|
185
198
|
validateInput: (value) => {
|
|
186
199
|
try {
|
|
187
|
-
new URL(`${value.startsWith(
|
|
188
|
-
return
|
|
200
|
+
new URL(`${value.startsWith("https://") ? "" : "https://"}${value}`);
|
|
201
|
+
return undefined; // valid
|
|
189
202
|
}
|
|
190
203
|
catch {
|
|
191
|
-
return
|
|
204
|
+
return "Please enter a valid hostname";
|
|
192
205
|
}
|
|
193
|
-
}
|
|
206
|
+
},
|
|
194
207
|
});
|
|
195
208
|
if (!host) {
|
|
196
209
|
return;
|
|
197
210
|
}
|
|
198
211
|
treeDataProvider.addConnection({
|
|
199
212
|
host,
|
|
200
|
-
status:
|
|
213
|
+
status: "disconnected",
|
|
201
214
|
});
|
|
202
215
|
});
|
|
203
|
-
const connectToTenantCmd = vscode.commands.registerCommand(
|
|
204
|
-
tenant.status =
|
|
205
|
-
treeDataProvider.updateConnectionStatus(tenant.host,
|
|
216
|
+
const connectToTenantCmd = vscode.commands.registerCommand("beyondwork.beyondwork.connectToTenant", async (tenant) => {
|
|
217
|
+
tenant.status = "connecting";
|
|
218
|
+
treeDataProvider.updateConnectionStatus(tenant.host, "connecting");
|
|
206
219
|
await connectToHost(tenant.host, context, treeDataProvider);
|
|
207
220
|
});
|
|
208
|
-
const clearConnectionsCmd = vscode.commands.registerCommand(
|
|
221
|
+
const clearConnectionsCmd = vscode.commands.registerCommand("beyondwork.beyondwork.clearConnections", () => {
|
|
209
222
|
// Clear from tree, and remove all token references
|
|
210
223
|
(0, auth_1.clearApiTokens)(context);
|
|
211
224
|
treeDataProvider.clear();
|
|
@@ -214,9 +227,9 @@ function activate(context) {
|
|
|
214
227
|
clientsByHost[host].disconnect();
|
|
215
228
|
delete clientsByHost[host];
|
|
216
229
|
}
|
|
217
|
-
vscode.window.showInformationMessage(
|
|
230
|
+
vscode.window.showInformationMessage("All connections cleared.");
|
|
218
231
|
});
|
|
219
|
-
const removeConnectionCmd = vscode.commands.registerCommand(
|
|
232
|
+
const removeConnectionCmd = vscode.commands.registerCommand("beyondwork.beyondwork.removeConnection", async (item) => {
|
|
220
233
|
let connection;
|
|
221
234
|
if (item) {
|
|
222
235
|
connection = item.connection;
|
|
@@ -224,16 +237,20 @@ function activate(context) {
|
|
|
224
237
|
if (!connection) {
|
|
225
238
|
const all = treeDataProvider.getConnections();
|
|
226
239
|
if (all.length === 0) {
|
|
227
|
-
vscode.window.showInformationMessage(
|
|
240
|
+
vscode.window.showInformationMessage("No connections to remove.");
|
|
228
241
|
return;
|
|
229
242
|
}
|
|
230
|
-
const picked = await vscode.window.showQuickPick(all.map(c => ({
|
|
243
|
+
const picked = await vscode.window.showQuickPick(all.map((c) => ({
|
|
244
|
+
label: c.host,
|
|
245
|
+
description: c.status,
|
|
246
|
+
connection: c,
|
|
247
|
+
})), { placeHolder: "Select a connection to remove" });
|
|
231
248
|
connection = picked?.connection;
|
|
232
249
|
}
|
|
233
250
|
if (!connection)
|
|
234
251
|
return;
|
|
235
|
-
const yesNo = await vscode.window.showWarningMessage(`Are you sure you want to remove the connection to ${connection.host}?`,
|
|
236
|
-
if (yesNo ===
|
|
252
|
+
const yesNo = await vscode.window.showWarningMessage(`Are you sure you want to remove the connection to ${connection.host}?`, "Yes", "No");
|
|
253
|
+
if (yesNo === "Yes") {
|
|
237
254
|
// Disconnect & remove from tree
|
|
238
255
|
if (clientsByHost[connection.host]) {
|
|
239
256
|
clientsByHost[connection.host].disconnect();
|
|
@@ -242,13 +259,13 @@ function activate(context) {
|
|
|
242
259
|
treeDataProvider.removeConnection(connection);
|
|
243
260
|
}
|
|
244
261
|
});
|
|
245
|
-
const bindStream = vscode.commands.registerCommand(
|
|
262
|
+
const bindStream = vscode.commands.registerCommand("beyondwork.beyondwork.bindStream", async (stream, dir) => {
|
|
246
263
|
outputChannel.appendLine(`Binding stream ${stream.id} ${dir}`);
|
|
247
264
|
const opts = {
|
|
248
265
|
canSelectFolders: true,
|
|
249
266
|
canSelectFiles: false,
|
|
250
267
|
canSelectMany: false,
|
|
251
|
-
openLabel:
|
|
268
|
+
openLabel: "Select folder for the workblock",
|
|
252
269
|
};
|
|
253
270
|
if (dir) {
|
|
254
271
|
opts.defaultUri = vscode.Uri.file(dir);
|
|
@@ -258,104 +275,126 @@ function activate(context) {
|
|
|
258
275
|
return;
|
|
259
276
|
}
|
|
260
277
|
streamsByDir[stream.id] = baseDir[0].fsPath;
|
|
261
|
-
context.globalState.update(
|
|
278
|
+
context.globalState.update("bw_streams_dir", streamsByDir);
|
|
262
279
|
treeDataProvider.refresh();
|
|
280
|
+
// Immediately fetch remote workblock into selected directory (enhanced behavior)
|
|
281
|
+
try {
|
|
282
|
+
const host = hostsByStream[stream.id];
|
|
283
|
+
if (host) {
|
|
284
|
+
const client = clientsByHost[host];
|
|
285
|
+
const wb = await client.getWorkblock(stream.id);
|
|
286
|
+
if (wb) {
|
|
287
|
+
await storeWorkblockFiles(baseDir[0].fsPath, wb, client);
|
|
288
|
+
latestWorkblocks[host + stream.id] = wb;
|
|
289
|
+
await onWorkblockChange(stream.id, wb, treeDataProvider, host);
|
|
290
|
+
outputChannel.appendLine(`Fetched remote workblock for ${stream.id} into ${baseDir[0].fsPath}`);
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
outputChannel.appendLine(`No remote workblock present for ${stream.id}`);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
catch (e) {
|
|
298
|
+
outputChannel.appendLine(`Failed to fetch remote workblock for ${stream.id}: ${e?.message ?? e}`);
|
|
299
|
+
}
|
|
263
300
|
});
|
|
264
|
-
const getWB = vscode.commands.registerCommand(
|
|
301
|
+
const getWB = vscode.commands.registerCommand("beyondwork.beyondwork.get", async (item) => {
|
|
265
302
|
outputChannel.appendLine(`Getting workblock ${item.stream}`);
|
|
266
303
|
if (!item.dir) {
|
|
267
|
-
vscode.window.showErrorMessage(
|
|
304
|
+
vscode.window.showErrorMessage("Please bind a directory to the stream first");
|
|
268
305
|
return;
|
|
269
306
|
}
|
|
270
307
|
const client = clientsByHost[item.connection.host];
|
|
271
308
|
const wb = await client.getWorkblock(item.stream.id);
|
|
272
309
|
outputChannel.appendLine(`Got workblock ${wb}`);
|
|
273
310
|
if (!wb) {
|
|
274
|
-
vscode.window.showErrorMessage(
|
|
311
|
+
vscode.window.showErrorMessage("No workblock in workspace");
|
|
275
312
|
return;
|
|
276
313
|
}
|
|
277
|
-
storeWorkblockFiles(item.dir, wb, client);
|
|
314
|
+
await storeWorkblockFiles(item.dir, wb, client);
|
|
278
315
|
});
|
|
279
|
-
const setWB = vscode.commands.registerCommand(
|
|
316
|
+
const setWB = vscode.commands.registerCommand("beyondwork.beyondwork.set", async (item) => {
|
|
280
317
|
outputChannel.appendLine(`Setting workblock ${item.stream}`);
|
|
281
318
|
if (!item.dir) {
|
|
282
|
-
vscode.window.showErrorMessage(
|
|
319
|
+
vscode.window.showErrorMessage("Please bind a directory to the stream first");
|
|
283
320
|
return;
|
|
284
321
|
}
|
|
285
|
-
setWorkblock(item.dir, item.connection.host, item.stream.id);
|
|
322
|
+
await setWorkblock(item.dir, item.connection.host, item.stream.id);
|
|
286
323
|
});
|
|
287
324
|
const compareChanges = async (item) => {
|
|
288
325
|
const wb = await (0, lib_1.assembleWorkblock)(item.dir, outputLogger);
|
|
289
326
|
const stored = await clientsByHost[item.connection.host].getWorkblock(item.stream.id);
|
|
290
|
-
const file1 = vscode.Uri.parse(
|
|
291
|
-
const file2 = vscode.Uri.parse(
|
|
327
|
+
const file1 = vscode.Uri.parse("bw-manifest:local.yaml");
|
|
328
|
+
const file2 = vscode.Uri.parse("bw-manifest:stored.yaml");
|
|
292
329
|
if (wb) {
|
|
293
330
|
stringContentProvider.setContent(file1, (0, yaml_1.stringify)((0, lib_1.trimWorkblock)(wb)));
|
|
294
331
|
}
|
|
295
332
|
if (stored) {
|
|
296
333
|
stringContentProvider.setContent(file2, (0, yaml_1.stringify)((0, lib_1.trimWorkblock)(stored)));
|
|
297
334
|
}
|
|
298
|
-
vscode.commands.executeCommand(
|
|
335
|
+
vscode.commands.executeCommand("vscode.diff", file1, file2, "Local vs stored workblock");
|
|
299
336
|
};
|
|
300
|
-
const streamOptions = vscode.commands.registerCommand(
|
|
337
|
+
const streamOptions = vscode.commands.registerCommand("beyondwork.beyondwork.showStreamOptions", async (item) => {
|
|
301
338
|
outputChannel.appendLine(`Stream options ${item}`);
|
|
302
|
-
const dirOpt = item.dir
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
];
|
|
339
|
+
const dirOpt = item.dir
|
|
340
|
+
? `Change directory from ${item.dir}`
|
|
341
|
+
: "Choose a directory for the workspace";
|
|
342
|
+
const options = [dirOpt];
|
|
306
343
|
if (item.dir) {
|
|
307
|
-
options.push(
|
|
308
|
-
options.push(
|
|
309
|
-
options.push(
|
|
344
|
+
options.push("Remove directory binding");
|
|
345
|
+
options.push("Get workblock from workspace");
|
|
346
|
+
options.push("Store workblock to workspace");
|
|
310
347
|
if (syncStreams[item.stream.id] === undefined) {
|
|
311
|
-
options.push(
|
|
348
|
+
options.push("Enable sync");
|
|
312
349
|
}
|
|
313
350
|
else {
|
|
314
|
-
options.push(
|
|
351
|
+
options.push("Disable sync");
|
|
315
352
|
}
|
|
316
353
|
if (item.modified) {
|
|
317
|
-
options.push(
|
|
354
|
+
options.push("Compare changes");
|
|
318
355
|
}
|
|
319
356
|
}
|
|
320
|
-
vscode.window
|
|
321
|
-
|
|
322
|
-
|
|
357
|
+
vscode.window
|
|
358
|
+
.showQuickPick(options, {
|
|
359
|
+
placeHolder: "Select an action",
|
|
360
|
+
})
|
|
361
|
+
.then((selection) => {
|
|
323
362
|
if (selection) {
|
|
324
363
|
switch (selection) {
|
|
325
364
|
case dirOpt:
|
|
326
|
-
vscode.commands.executeCommand(
|
|
365
|
+
vscode.commands.executeCommand("beyondwork.beyondwork.bindStream", item.stream, item.dir);
|
|
327
366
|
break;
|
|
328
|
-
case
|
|
329
|
-
vscode.commands.executeCommand(
|
|
367
|
+
case "Get workblock from workspace":
|
|
368
|
+
vscode.commands.executeCommand("beyondwork.beyondwork.get", item);
|
|
330
369
|
break;
|
|
331
|
-
case
|
|
332
|
-
vscode.commands.executeCommand(
|
|
370
|
+
case "Store workblock to workspace":
|
|
371
|
+
vscode.commands.executeCommand("beyondwork.beyondwork.set", item);
|
|
333
372
|
break;
|
|
334
|
-
case
|
|
373
|
+
case "Enable sync":
|
|
335
374
|
syncStreams[item.stream.id] = item.dir;
|
|
336
|
-
context.globalState.update(
|
|
375
|
+
context.globalState.update("bw_sync_streams", syncStreams);
|
|
337
376
|
treeDataProvider.refresh();
|
|
338
377
|
break;
|
|
339
|
-
case
|
|
378
|
+
case "Disable sync":
|
|
340
379
|
delete syncStreams[item.stream.id];
|
|
341
|
-
context.globalState.update(
|
|
380
|
+
context.globalState.update("bw_sync_streams", syncStreams);
|
|
342
381
|
treeDataProvider.refresh();
|
|
343
382
|
break;
|
|
344
|
-
case
|
|
383
|
+
case "Compare changes":
|
|
345
384
|
compareChanges(item);
|
|
346
385
|
break;
|
|
347
|
-
case
|
|
386
|
+
case "Remove directory binding":
|
|
348
387
|
delete streamsByDir[item.stream.id];
|
|
349
388
|
delete syncStreams[item.stream.id];
|
|
350
|
-
context.globalState.update(
|
|
389
|
+
context.globalState.update("bw_streams_dir", streamsByDir);
|
|
351
390
|
treeDataProvider.refresh();
|
|
352
391
|
break;
|
|
353
392
|
}
|
|
354
393
|
}
|
|
355
394
|
});
|
|
356
395
|
});
|
|
357
|
-
const syncSelected = vscode.commands.registerCommand(
|
|
358
|
-
const items = treeView.selection.filter(item => item.contextValue ===
|
|
396
|
+
const syncSelected = vscode.commands.registerCommand("beyondwork.beyondwork.storeSelected", async () => {
|
|
397
|
+
const items = treeView.selection.filter((item) => item.contextValue === "beyondwork.stream");
|
|
359
398
|
for (const item of items) {
|
|
360
399
|
const si = item;
|
|
361
400
|
if (si.dir) {
|
|
@@ -363,8 +402,8 @@ function activate(context) {
|
|
|
363
402
|
}
|
|
364
403
|
}
|
|
365
404
|
});
|
|
366
|
-
const help = vscode.commands.registerCommand(
|
|
367
|
-
const panel = vscode.window.createWebviewPanel(
|
|
405
|
+
const help = vscode.commands.registerCommand("beyondwork.beyondwork.help", async () => {
|
|
406
|
+
const panel = vscode.window.createWebviewPanel("help", "Beyond Work Help", vscode.ViewColumn.One, {
|
|
368
407
|
enableCommandUris: true,
|
|
369
408
|
});
|
|
370
409
|
const md = new markdown_it_1.default({
|
|
@@ -429,13 +468,12 @@ Base dir/
|
|
|
429
468
|
</pre>
|
|
430
469
|
`);
|
|
431
470
|
});
|
|
432
|
-
let prevHost = context.globalState.get(
|
|
471
|
+
let prevHost = context.globalState.get("bw_current_connection", "");
|
|
433
472
|
if (prevHost) {
|
|
434
|
-
treeDataProvider.updateConnectionStatus(prevHost,
|
|
435
|
-
connectToHost(prevHost, context, treeDataProvider).then(() => {
|
|
436
|
-
});
|
|
473
|
+
treeDataProvider.updateConnectionStatus(prevHost, "connecting");
|
|
474
|
+
connectToHost(prevHost, context, treeDataProvider).then(() => { });
|
|
437
475
|
}
|
|
438
|
-
const watcher = vscode.workspace.createFileSystemWatcher(
|
|
476
|
+
const watcher = vscode.workspace.createFileSystemWatcher("**/*");
|
|
439
477
|
watcher.onDidChange(async (uri) => {
|
|
440
478
|
await onFileChange(uri, false);
|
|
441
479
|
});
|
|
@@ -457,7 +495,7 @@ function deactivate() {
|
|
|
457
495
|
}
|
|
458
496
|
}
|
|
459
497
|
async function setWorkblock(dir, host, streamId) {
|
|
460
|
-
console.log(
|
|
498
|
+
console.log("Setting workblock", dir, host, streamId);
|
|
461
499
|
const client = clientsByHost[host];
|
|
462
500
|
if (!client) {
|
|
463
501
|
vscode.window.showErrorMessage(`Not connected to ${host}`);
|
|
@@ -468,13 +506,30 @@ async function setWorkblock(dir, host, streamId) {
|
|
|
468
506
|
if (!wb) {
|
|
469
507
|
return;
|
|
470
508
|
}
|
|
471
|
-
|
|
509
|
+
// Use client-level error handling & timeout; just await and surface validation
|
|
510
|
+
let validation = [];
|
|
511
|
+
try {
|
|
512
|
+
validation = await client.setWorkblock(streamId, wb);
|
|
513
|
+
}
|
|
514
|
+
catch (e) {
|
|
515
|
+
const message = String(e?.message ?? e);
|
|
516
|
+
outputChannel.appendLine(`[set_work_block] Backend error: ${message}`);
|
|
517
|
+
const diagnostics = [];
|
|
518
|
+
const range = new vscode.Range(0, 0, 0, 0);
|
|
519
|
+
diagnostics.push([
|
|
520
|
+
vscode.Uri.file(mf),
|
|
521
|
+
[new vscode.Diagnostic(range, message, vscode.DiagnosticSeverity.Error)],
|
|
522
|
+
]);
|
|
523
|
+
diagnosticCollection.set(diagnostics);
|
|
524
|
+
vscode.window.showErrorMessage('Backend error while setting workblock. See "Beyond Work" output for details.');
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
472
527
|
if (validation.length > 0) {
|
|
473
528
|
outputChannel.appendLine(`Validation errors: ${JSON.stringify(validation)}`);
|
|
474
529
|
const diagnostics = [];
|
|
475
530
|
for (const err of validation) {
|
|
476
531
|
if (err.library) {
|
|
477
|
-
const uri = vscode.Uri.file(path.join(dir,
|
|
532
|
+
const uri = vscode.Uri.file(path.join(dir, "library.py"));
|
|
478
533
|
const range = new vscode.Range(0, 0, 0, 0);
|
|
479
534
|
const diag = new vscode.Diagnostic(range, err.library.error, vscode.DiagnosticSeverity.Error);
|
|
480
535
|
diagnostics.push([uri, [diag]]);
|
|
@@ -536,7 +591,7 @@ async function storeWorkblockFiles(dir, wb, client) {
|
|
|
536
591
|
const name = (0, lib_1.normalizedFilename)(task.name);
|
|
537
592
|
fs.mkdirSync(path.join(moduleDir, name), { recursive: true });
|
|
538
593
|
const taskDir = path.join(moduleDir, name);
|
|
539
|
-
const taskPath = await (0, lib_1.locateFile)(taskDir,
|
|
594
|
+
const taskPath = await (0, lib_1.locateFile)(taskDir, ".py", `${name}.py`);
|
|
540
595
|
promises.push(resolve(taskPath, task.action.value));
|
|
541
596
|
if (task.assets) {
|
|
542
597
|
fs.mkdirSync(path.join(moduleDir, name, "assets"), { recursive: true });
|
|
@@ -559,16 +614,16 @@ async function storeWorkblockFiles(dir, wb, client) {
|
|
|
559
614
|
}
|
|
560
615
|
}
|
|
561
616
|
if (wb.library) {
|
|
562
|
-
const libPath = path.join(dir,
|
|
617
|
+
const libPath = path.join(dir, "library.py");
|
|
563
618
|
promises.push(resolve(libPath, wb.library));
|
|
564
619
|
}
|
|
565
620
|
if (wb.logo) {
|
|
566
|
-
const logoPath = path.join(dir,
|
|
621
|
+
const logoPath = path.join(dir, "logo.svg");
|
|
567
622
|
promises.push(resolve(logoPath, wb.logo));
|
|
568
623
|
}
|
|
569
624
|
if (wb.react_components) {
|
|
570
625
|
for (const [key, asset] of Object.entries(wb.react_components)) {
|
|
571
|
-
const assetPath = path.join(dir,
|
|
626
|
+
const assetPath = path.join(dir, "react_components", key);
|
|
572
627
|
if (asset.data) {
|
|
573
628
|
promises.push(resolve(assetPath, asset.data));
|
|
574
629
|
delete asset.data;
|
|
@@ -592,6 +647,55 @@ async function storeWorkblockFiles(dir, wb, client) {
|
|
|
592
647
|
delete out.react_components;
|
|
593
648
|
fs.writeFileSync(mf, (0, yaml_1.stringify)(out));
|
|
594
649
|
}
|
|
650
|
+
// Automatically bind streams to directories by scanning for manifest.yaml files containing matching id
|
|
651
|
+
async function autoBindStreams(streams, context, treeDataProvider) {
|
|
652
|
+
// Collect all manifest.yaml files in open workspace folders
|
|
653
|
+
const manifestUris = await vscode.workspace.findFiles("**/manifest.yaml", "**/{node_modules,.git}/**");
|
|
654
|
+
if (!manifestUris.length) {
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
const manifestById = {};
|
|
658
|
+
for (const uri of manifestUris) {
|
|
659
|
+
try {
|
|
660
|
+
const doc = await vscode.workspace.openTextDocument(uri);
|
|
661
|
+
const text = doc.getText();
|
|
662
|
+
let parsed;
|
|
663
|
+
try {
|
|
664
|
+
parsed = (0, yaml_1.parse)(text);
|
|
665
|
+
}
|
|
666
|
+
catch {
|
|
667
|
+
continue; // skip invalid yaml
|
|
668
|
+
}
|
|
669
|
+
const id = parsed?.id;
|
|
670
|
+
if (id && typeof id === "string") {
|
|
671
|
+
manifestById[id] = path.dirname(uri.fsPath);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
catch (e) {
|
|
675
|
+
// ignore individual read errors
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
let updated = false;
|
|
679
|
+
const existingDirs = new Set(Object.values(streamsByDir));
|
|
680
|
+
for (const s of streams) {
|
|
681
|
+
if (!s.editing || !s.current_work_block) {
|
|
682
|
+
continue;
|
|
683
|
+
}
|
|
684
|
+
if (!streamsByDir[s.id] && manifestById[s.id]) {
|
|
685
|
+
const candidateDir = manifestById[s.current_work_block];
|
|
686
|
+
// Skip if directory already bound to a different stream to avoid accidental collisions
|
|
687
|
+
if (!existingDirs.has(candidateDir)) {
|
|
688
|
+
streamsByDir[s.id] = candidateDir;
|
|
689
|
+
existingDirs.add(candidateDir);
|
|
690
|
+
updated = true;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
if (updated) {
|
|
695
|
+
context.globalState.update("bw_streams_dir", streamsByDir);
|
|
696
|
+
treeDataProvider.refresh();
|
|
697
|
+
}
|
|
698
|
+
}
|
|
595
699
|
class StringDocumentContentProvider {
|
|
596
700
|
_onDidChange = new vscode.EventEmitter();
|
|
597
701
|
_content = "";
|
package/out/lib/workblock.js
CHANGED
|
@@ -89,10 +89,10 @@ function normalizedFilename(name) {
|
|
|
89
89
|
return name.toLowerCase().replaceAll(' ', '_');
|
|
90
90
|
}
|
|
91
91
|
async function assembleWorkblock(dir, log) {
|
|
92
|
-
const
|
|
92
|
+
const { fileTypeFromFile } = await import('file-type');
|
|
93
93
|
const mf = await locateManifest(dir);
|
|
94
94
|
if (!fs.existsSync(mf)) {
|
|
95
|
-
log.
|
|
95
|
+
log.error(`Manifest file ${mf} not found`);
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
const data = fs.readFileSync(mf, 'utf8');
|
|
@@ -102,19 +102,19 @@ async function assembleWorkblock(dir, log) {
|
|
|
102
102
|
for (const module of wb.modules ?? []) {
|
|
103
103
|
const moduleDir = path.join(dir, normalizedFilename(module.name));
|
|
104
104
|
if (!fs.existsSync(moduleDir)) {
|
|
105
|
-
log.
|
|
105
|
+
log.error(`Module directory ${moduleDir} not found`);
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
for (const task of module.tasks ?? []) {
|
|
109
109
|
const name = normalizedFilename(task.name);
|
|
110
110
|
const taskDir = path.join(moduleDir, name);
|
|
111
111
|
if (!fs.existsSync(taskDir)) {
|
|
112
|
-
log.
|
|
112
|
+
log.error(`Task directory ${taskDir} not found`);
|
|
113
113
|
continue;
|
|
114
114
|
}
|
|
115
115
|
const taskPath = await locateFile(taskDir, '.py', `${name}.py`);
|
|
116
116
|
if (!fs.existsSync(taskPath)) {
|
|
117
|
-
log.
|
|
117
|
+
log.error(`Task file ${taskPath} not found`);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
120
|
task.action.value = fs.readFileSync(taskPath, 'utf8');
|
|
@@ -131,7 +131,7 @@ async function assembleWorkblock(dir, log) {
|
|
|
131
131
|
if (await isFileGitIgnored(assetPath, log)) {
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
|
-
let fileType = (await
|
|
134
|
+
let fileType = (await fileTypeFromFile(assetPath))?.mime;
|
|
135
135
|
if (!fileType) {
|
|
136
136
|
fileType = mime.lookup(asset) || 'text/plain';
|
|
137
137
|
}
|
|
@@ -142,7 +142,6 @@ async function assembleWorkblock(dir, log) {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
;
|
|
146
145
|
}
|
|
147
146
|
if (fs.existsSync(path.join(dir, 'library.py'))) {
|
|
148
147
|
wb.library = fs.readFileSync(path.join(dir, 'library.py'), 'utf8');
|
|
@@ -170,7 +169,7 @@ async function assembleWorkblock(dir, log) {
|
|
|
170
169
|
await addReactComponentsRecursively(assetPath, relPath);
|
|
171
170
|
continue;
|
|
172
171
|
}
|
|
173
|
-
let fileType = (await
|
|
172
|
+
let fileType = (await fileTypeFromFile(assetPath))?.mime;
|
|
174
173
|
if (!fileType) {
|
|
175
174
|
fileType = mime.lookup(asset) || 'text/plain';
|
|
176
175
|
}
|
package/out/lib/workblock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workblock.js","sourceRoot":"","sources":["../../src/lib/workblock.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,sCAuBC;AAED,wCAEC;AAED,gCAcC;AAGD,gDAEC;AAED,8CAuGC;AAED,4CAkBC;AAED,4CAmBC;AA3MD,uCAAyB;AAEzB,iDAAmC;AACnC,2CAA6B;AAC7B,+BAA6B;AAC7B,oDAA4B;AAI5B,SAAgB,aAAa,CAAC,EAAuB;IACjD,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IAC7G,MAAM,GAAG,GAAwB,EAAE,CAAA;IACnC,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QAC/B,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,IA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;QACb,GAAG,CAAC,GAAG,CAAC,oCAAoC,KAAK,EAAE,CAAC,CAAC;QACrD,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publisher": "beyondwork",
|
|
4
4
|
"displayName": "Beyond Work",
|
|
5
5
|
"description": "Beyond Work is a tool for managing your work in a way that is easy to use and understand.",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.12",
|
|
7
7
|
"engines": {
|
|
8
8
|
"vscode": "^1.94.0",
|
|
9
9
|
"node": ">=16.0.0"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@types/markdown-it": "^14.1.2",
|
|
88
88
|
"@types/mocha": "^10.0.9",
|
|
89
|
-
"@types/node": "~20.
|
|
89
|
+
"@types/node": "~20.19.0",
|
|
90
90
|
"@types/vscode": "^1.94.0",
|
|
91
91
|
"@types/ws": "^8.5.12",
|
|
92
92
|
"@typescript-eslint/eslint-plugin": "^8.8.1",
|