@beyondwork/wb-cli 0.1.20 → 0.1.22
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/CHANGELOG.md +4 -0
- package/out/extension.js +240 -126
- package/out/lib/workblock.js +229 -112
- package/out/lib/workblock.js.map +1 -1
- package/out/lib/workblock.test.js +519 -0
- package/out/lib/workblock.test.js.map +1 -0
- package/out/types.js +3 -0
- package/package.json +18 -3
|
@@ -0,0 +1,519 @@
|
|
|
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
|
+
const assert = __importStar(require("assert"));
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const os = __importStar(require("os"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const yaml_1 = require("yaml");
|
|
41
|
+
const workblock_1 = require("./workblock");
|
|
42
|
+
const logger_1 = require("./logger");
|
|
43
|
+
const logger = new logger_1.ConsoleLogger();
|
|
44
|
+
const identityBlobClient = {
|
|
45
|
+
getBlob: async (key) => key,
|
|
46
|
+
};
|
|
47
|
+
function makeTmpDir() {
|
|
48
|
+
return fs.mkdtempSync(path.join(os.tmpdir(), "wb-test-"));
|
|
49
|
+
}
|
|
50
|
+
function basicWorkblock() {
|
|
51
|
+
return {
|
|
52
|
+
id: "11111111-1111-1111-1111-111111111111",
|
|
53
|
+
name: "Test WB",
|
|
54
|
+
modules: [
|
|
55
|
+
{
|
|
56
|
+
id: "22222222-2222-2222-2222-222222222222",
|
|
57
|
+
name: "Module One",
|
|
58
|
+
tasks: [
|
|
59
|
+
{
|
|
60
|
+
id: "55555555-5555-5555-5555-555555555555",
|
|
61
|
+
name: "Task Alpha",
|
|
62
|
+
action: {
|
|
63
|
+
type: "code",
|
|
64
|
+
value: "print('hello')\n",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
async function roundTrip(wb) {
|
|
73
|
+
const dir = makeTmpDir();
|
|
74
|
+
try {
|
|
75
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
76
|
+
const out = await (0, workblock_1.assembleWorkblock)(dir, logger);
|
|
77
|
+
if (!out)
|
|
78
|
+
throw new Error("assembleWorkblock returned undefined");
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
describe("normalizedFilename", () => {
|
|
86
|
+
const cases = [
|
|
87
|
+
["Hello World", "hello_world"],
|
|
88
|
+
["hello_world", "hello_world"],
|
|
89
|
+
["a b c", "a_b_c"],
|
|
90
|
+
["a@b#c", "a_b_c"],
|
|
91
|
+
["___", "file"],
|
|
92
|
+
["...test", "test"],
|
|
93
|
+
["", "file"],
|
|
94
|
+
["Verify Output", "verify_output"],
|
|
95
|
+
["Verify_Output", "verify_output"],
|
|
96
|
+
["My File.txt", "my_file.txt"],
|
|
97
|
+
["trailing___", "trailing"],
|
|
98
|
+
["../etc/passwd", "passwd"],
|
|
99
|
+
];
|
|
100
|
+
for (const [input, expected] of cases) {
|
|
101
|
+
it(`normalizes ${JSON.stringify(input)} to ${JSON.stringify(expected)}`, () => {
|
|
102
|
+
assert.strictEqual((0, workblock_1.normalizedFilename)(input), expected);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
describe("safeAssetPath", () => {
|
|
107
|
+
it("joins base and a safe relative path", () => {
|
|
108
|
+
assert.strictEqual((0, workblock_1.safeAssetPath)("base", "foo/bar.txt"), "base/foo/bar.txt");
|
|
109
|
+
});
|
|
110
|
+
it("collapses internal parent references that stay within base", () => {
|
|
111
|
+
assert.strictEqual((0, workblock_1.safeAssetPath)("base", "foo/../bar"), "base/bar");
|
|
112
|
+
});
|
|
113
|
+
it("supports nested base directories", () => {
|
|
114
|
+
assert.strictEqual((0, workblock_1.safeAssetPath)("base/sub", "leaf.txt"), "base/sub/leaf.txt");
|
|
115
|
+
});
|
|
116
|
+
it("rejects traversal via ../", () => {
|
|
117
|
+
assert.throws(() => (0, workblock_1.safeAssetPath)("base", "../etc/passwd"), /invalid asset path/);
|
|
118
|
+
});
|
|
119
|
+
it("rejects absolute paths", () => {
|
|
120
|
+
assert.throws(() => (0, workblock_1.safeAssetPath)("base", "/absolute"), /invalid asset path/);
|
|
121
|
+
});
|
|
122
|
+
it("rejects a bare parent reference", () => {
|
|
123
|
+
assert.throws(() => (0, workblock_1.safeAssetPath)("base", ".."), /invalid asset path/);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
describe("findTaskCodePath", () => {
|
|
127
|
+
it("prefers exact {name}.py when present", () => {
|
|
128
|
+
const dir = makeTmpDir();
|
|
129
|
+
try {
|
|
130
|
+
fs.writeFileSync(path.join(dir, "task_alpha.py"), "exact");
|
|
131
|
+
fs.writeFileSync(path.join(dir, "other.py"), "other");
|
|
132
|
+
assert.strictEqual((0, workblock_1.findTaskCodePath)(dir, "task_alpha"), path.join(dir, "task_alpha.py"));
|
|
133
|
+
}
|
|
134
|
+
finally {
|
|
135
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
it("falls back to any .py file when exact name is missing", () => {
|
|
139
|
+
const dir = makeTmpDir();
|
|
140
|
+
try {
|
|
141
|
+
fs.writeFileSync(path.join(dir, "renamed.py"), "content");
|
|
142
|
+
assert.strictEqual((0, workblock_1.findTaskCodePath)(dir, "task_alpha"), path.join(dir, "renamed.py"));
|
|
143
|
+
}
|
|
144
|
+
finally {
|
|
145
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
it("returns null when directory has no .py files", () => {
|
|
149
|
+
const dir = makeTmpDir();
|
|
150
|
+
try {
|
|
151
|
+
fs.writeFileSync(path.join(dir, "readme.txt"), "nope");
|
|
152
|
+
assert.strictEqual((0, workblock_1.findTaskCodePath)(dir, "task_alpha"), null);
|
|
153
|
+
}
|
|
154
|
+
finally {
|
|
155
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
it("returns null when directory does not exist", () => {
|
|
159
|
+
assert.strictEqual((0, workblock_1.findTaskCodePath)(path.join(os.tmpdir(), "definitely-missing"), "task"), null);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
describe("storeWorkblockFiles (disassembly)", () => {
|
|
163
|
+
it("writes task code to {moduleDir}/{taskDir}/{taskName}.py", async () => {
|
|
164
|
+
const dir = makeTmpDir();
|
|
165
|
+
try {
|
|
166
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, basicWorkblock(), identityBlobClient);
|
|
167
|
+
const codePath = path.join(dir, "module_one", "task_alpha", "task_alpha.py");
|
|
168
|
+
assert.ok(fs.existsSync(codePath));
|
|
169
|
+
assert.strictEqual(fs.readFileSync(codePath, "utf8"), "print('hello')\n");
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
it("writes task assets under assets/ and strips them from manifest", async () => {
|
|
176
|
+
const dir = makeTmpDir();
|
|
177
|
+
try {
|
|
178
|
+
const wb = basicWorkblock();
|
|
179
|
+
wb.modules[0].tasks[0].assets = {
|
|
180
|
+
"data.csv": { content_type: "text/csv", text: "a,b\n1,2\n" },
|
|
181
|
+
};
|
|
182
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
183
|
+
const assetPath = path.join(dir, "module_one", "task_alpha", "assets", "data.csv");
|
|
184
|
+
assert.ok(fs.existsSync(assetPath));
|
|
185
|
+
assert.strictEqual(fs.readFileSync(assetPath, "utf8"), "a,b\n1,2\n");
|
|
186
|
+
const manifest = (0, yaml_1.parse)(fs.readFileSync(path.join(dir, "manifest.yaml"), "utf8"));
|
|
187
|
+
assert.strictEqual(manifest.modules[0].tasks[0].assets, undefined);
|
|
188
|
+
}
|
|
189
|
+
finally {
|
|
190
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
it("writes task/module/root design docs to correct subdirs", async () => {
|
|
194
|
+
const dir = makeTmpDir();
|
|
195
|
+
try {
|
|
196
|
+
const wb = basicWorkblock();
|
|
197
|
+
wb.modules[0].tasks[0].design_docs = {
|
|
198
|
+
"task.md": { content_type: "text/markdown", text: "# Task\n" },
|
|
199
|
+
};
|
|
200
|
+
wb.modules[0].design_docs = {
|
|
201
|
+
"module.md": { content_type: "text/markdown", text: "# Module\n" },
|
|
202
|
+
};
|
|
203
|
+
wb.design_docs = {
|
|
204
|
+
"root.md": { content_type: "text/markdown", text: "# Root\n" },
|
|
205
|
+
};
|
|
206
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
207
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "module_one", "task_alpha", "design_docs", "task.md"), "utf8"), "# Task\n");
|
|
208
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "module_one", "design_docs", "module.md"), "utf8"), "# Module\n");
|
|
209
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "design_docs", "root.md"), "utf8"), "# Root\n");
|
|
210
|
+
}
|
|
211
|
+
finally {
|
|
212
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
it("writes module tests to {moduleDir}/tests/{normalized}.py", async () => {
|
|
216
|
+
const dir = makeTmpDir();
|
|
217
|
+
try {
|
|
218
|
+
const wb = basicWorkblock();
|
|
219
|
+
wb.modules[0].tests = [
|
|
220
|
+
{
|
|
221
|
+
id: "33333333-3333-3333-3333-333333333333",
|
|
222
|
+
name: "Verify Output",
|
|
223
|
+
type: "pytest",
|
|
224
|
+
value: "def test_output():\n assert True\n",
|
|
225
|
+
},
|
|
226
|
+
];
|
|
227
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
228
|
+
const testPath = path.join(dir, "module_one", "tests", "verify_output.py");
|
|
229
|
+
assert.ok(fs.existsSync(testPath));
|
|
230
|
+
assert.strictEqual(fs.readFileSync(testPath, "utf8"), "def test_output():\n assert True\n");
|
|
231
|
+
const manifest = (0, yaml_1.parse)(fs.readFileSync(path.join(dir, "manifest.yaml"), "utf8"));
|
|
232
|
+
assert.strictEqual(manifest.modules[0].tests[0].value, undefined);
|
|
233
|
+
assert.strictEqual(manifest.modules[0].tests[0].name, "Verify Output");
|
|
234
|
+
}
|
|
235
|
+
finally {
|
|
236
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
it("writes library.py, logo.svg, schema.yaml verbatim", async () => {
|
|
240
|
+
const dir = makeTmpDir();
|
|
241
|
+
try {
|
|
242
|
+
const wb = basicWorkblock();
|
|
243
|
+
wb.library = "def helper():\n pass\n";
|
|
244
|
+
wb.logo = "<svg></svg>";
|
|
245
|
+
wb.schema = "$defs:\n Order:\n type: object\n";
|
|
246
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
247
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "library.py"), "utf8"), wb.library);
|
|
248
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "logo.svg"), "utf8"), wb.logo);
|
|
249
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "schema.yaml"), "utf8"), wb.schema);
|
|
250
|
+
const manifest = fs.readFileSync(path.join(dir, "manifest.yaml"), "utf8");
|
|
251
|
+
assert.ok(!manifest.includes("$defs"));
|
|
252
|
+
assert.ok(!manifest.includes("def helper"));
|
|
253
|
+
}
|
|
254
|
+
finally {
|
|
255
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
it("writes nested react_components and python paths", async () => {
|
|
259
|
+
const dir = makeTmpDir();
|
|
260
|
+
try {
|
|
261
|
+
const wb = basicWorkblock();
|
|
262
|
+
wb.react_components = {
|
|
263
|
+
"main.tsx": { content_type: "text/plain", text: "// main\n" },
|
|
264
|
+
"nested/widget.tsx": { content_type: "text/plain", text: "// widget\n" },
|
|
265
|
+
};
|
|
266
|
+
wb.python = {
|
|
267
|
+
"types.py": { content_type: "text/plain", text: "# types\n" },
|
|
268
|
+
"utils/helpers.py": { content_type: "text/plain", text: "# helpers\n" },
|
|
269
|
+
};
|
|
270
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
271
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "react_components", "main.tsx"), "utf8"), "// main\n");
|
|
272
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "react_components", "nested", "widget.tsx"), "utf8"), "// widget\n");
|
|
273
|
+
assert.strictEqual(fs.readFileSync(path.join(dir, "python", "utils", "helpers.py"), "utf8"), "# helpers\n");
|
|
274
|
+
}
|
|
275
|
+
finally {
|
|
276
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
it("strips transient fields from manifest", async () => {
|
|
280
|
+
const dir = makeTmpDir();
|
|
281
|
+
try {
|
|
282
|
+
const wb = basicWorkblock();
|
|
283
|
+
wb.state = "published";
|
|
284
|
+
wb.actor = "44444444-4444-4444-4444-444444444444";
|
|
285
|
+
wb.branch_user =
|
|
286
|
+
"77777777-7777-7777-7777-777777777777";
|
|
287
|
+
wb.storing = true;
|
|
288
|
+
wb.updated_at = "2024-01-01T00:00:00Z";
|
|
289
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
290
|
+
const manifest = fs.readFileSync(path.join(dir, "manifest.yaml"), "utf8");
|
|
291
|
+
assert.ok(!manifest.includes("state:"));
|
|
292
|
+
assert.ok(!manifest.includes("actor:"));
|
|
293
|
+
assert.ok(!manifest.includes("branch_user:"));
|
|
294
|
+
assert.ok(!manifest.includes("storing: true"));
|
|
295
|
+
assert.ok(!manifest.includes("updated_at:"));
|
|
296
|
+
}
|
|
297
|
+
finally {
|
|
298
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
it("rejects duplicate normalized test names", async () => {
|
|
302
|
+
const dir = makeTmpDir();
|
|
303
|
+
try {
|
|
304
|
+
const wb = basicWorkblock();
|
|
305
|
+
wb.modules[0].tests = [
|
|
306
|
+
{
|
|
307
|
+
id: "a",
|
|
308
|
+
name: "Verify Output",
|
|
309
|
+
type: "pytest",
|
|
310
|
+
value: "# a",
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: "b",
|
|
314
|
+
name: "Verify_Output",
|
|
315
|
+
type: "pytest",
|
|
316
|
+
value: "# b",
|
|
317
|
+
},
|
|
318
|
+
];
|
|
319
|
+
await assert.rejects(() => (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient), /duplicate normalized test filename/);
|
|
320
|
+
}
|
|
321
|
+
finally {
|
|
322
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
it("rejects path traversal in asset names", async () => {
|
|
326
|
+
const dir = makeTmpDir();
|
|
327
|
+
try {
|
|
328
|
+
const wb = basicWorkblock();
|
|
329
|
+
wb.modules[0].tasks[0].assets = {
|
|
330
|
+
"../../etc/passwd": { content_type: "text/plain", text: "evil" },
|
|
331
|
+
};
|
|
332
|
+
await assert.rejects(() => (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient), /invalid asset path/);
|
|
333
|
+
}
|
|
334
|
+
finally {
|
|
335
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
it("decodes base64 `data` fields back to raw bytes on disk", async () => {
|
|
339
|
+
const dir = makeTmpDir();
|
|
340
|
+
try {
|
|
341
|
+
const pngBytes = Buffer.from([
|
|
342
|
+
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
|
|
343
|
+
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
|
|
344
|
+
0x08, 0x06, 0x00, 0x00, 0x00,
|
|
345
|
+
]);
|
|
346
|
+
const wb = basicWorkblock();
|
|
347
|
+
wb.modules[0].tasks[0].assets = {
|
|
348
|
+
"image.png": {
|
|
349
|
+
content_type: "image/png",
|
|
350
|
+
data: pngBytes.toString("base64"),
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
wb.design_docs = {
|
|
354
|
+
"logo.png": {
|
|
355
|
+
content_type: "image/png",
|
|
356
|
+
data: pngBytes.toString("base64"),
|
|
357
|
+
},
|
|
358
|
+
};
|
|
359
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
360
|
+
const taskAssetPath = path.join(dir, "module_one", "task_alpha", "assets", "image.png");
|
|
361
|
+
const rootDocPath = path.join(dir, "design_docs", "logo.png");
|
|
362
|
+
assert.deepStrictEqual(fs.readFileSync(taskAssetPath), pngBytes);
|
|
363
|
+
assert.deepStrictEqual(fs.readFileSync(rootDocPath), pngBytes);
|
|
364
|
+
}
|
|
365
|
+
finally {
|
|
366
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
it("round-trips binary assets byte-for-byte through store + assemble", async () => {
|
|
370
|
+
const pngBytes = Buffer.from([
|
|
371
|
+
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
|
|
372
|
+
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
|
|
373
|
+
0x08, 0x06, 0x00, 0x00, 0x00,
|
|
374
|
+
]);
|
|
375
|
+
const wb = basicWorkblock();
|
|
376
|
+
wb.design_docs = {
|
|
377
|
+
"logo.png": {
|
|
378
|
+
content_type: "image/png",
|
|
379
|
+
data: pngBytes.toString("base64"),
|
|
380
|
+
},
|
|
381
|
+
};
|
|
382
|
+
const out = await roundTrip(wb);
|
|
383
|
+
const reassembled = out.design_docs["logo.png"];
|
|
384
|
+
assert.strictEqual(reassembled.content_type, "image/png");
|
|
385
|
+
assert.strictEqual(reassembled.text, undefined);
|
|
386
|
+
assert.strictEqual(reassembled.data, pngBytes.toString("base64"));
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
describe("assembleWorkblock (round-trip)", () => {
|
|
390
|
+
it("round-trips task code", async () => {
|
|
391
|
+
const wb = basicWorkblock();
|
|
392
|
+
const out = await roundTrip(wb);
|
|
393
|
+
assert.strictEqual(out.modules[0].tasks[0].action.value, "print('hello')\n");
|
|
394
|
+
});
|
|
395
|
+
it("round-trips library, logo, and schema as raw strings", async () => {
|
|
396
|
+
const wb = basicWorkblock();
|
|
397
|
+
wb.library = "def helper():\n pass\n";
|
|
398
|
+
wb.logo = "<svg></svg>";
|
|
399
|
+
wb.schema = "$defs:\n Order:\n type: object\n";
|
|
400
|
+
const out = await roundTrip(wb);
|
|
401
|
+
assert.strictEqual(out.library, wb.library);
|
|
402
|
+
assert.strictEqual(out.logo, wb.logo);
|
|
403
|
+
assert.strictEqual(typeof out.schema, "string");
|
|
404
|
+
assert.strictEqual(out.schema, wb.schema);
|
|
405
|
+
});
|
|
406
|
+
it("round-trips task assets and design docs", async () => {
|
|
407
|
+
const wb = basicWorkblock();
|
|
408
|
+
wb.modules[0].tasks[0].assets = {
|
|
409
|
+
"data.csv": { content_type: "text/csv", text: "a,b\n1,2\n" },
|
|
410
|
+
};
|
|
411
|
+
wb.modules[0].tasks[0].design_docs = {
|
|
412
|
+
"task.md": { content_type: "text/markdown", text: "# Task\n" },
|
|
413
|
+
};
|
|
414
|
+
wb.modules[0].design_docs = {
|
|
415
|
+
"module.md": { content_type: "text/markdown", text: "# Module\n" },
|
|
416
|
+
};
|
|
417
|
+
wb.design_docs = {
|
|
418
|
+
"root.md": { content_type: "text/markdown", text: "# Root\n" },
|
|
419
|
+
};
|
|
420
|
+
const out = await roundTrip(wb);
|
|
421
|
+
assert.strictEqual(out.modules[0].tasks[0].assets["data.csv"].text, "a,b\n1,2\n");
|
|
422
|
+
assert.strictEqual(out.modules[0].tasks[0].design_docs["task.md"].text, "# Task\n");
|
|
423
|
+
assert.strictEqual(out.modules[0].design_docs["module.md"].text, "# Module\n");
|
|
424
|
+
assert.strictEqual(out.design_docs["root.md"].text, "# Root\n");
|
|
425
|
+
});
|
|
426
|
+
it("round-trips module tests with their values", async () => {
|
|
427
|
+
const wb = basicWorkblock();
|
|
428
|
+
wb.modules[0].tests = [
|
|
429
|
+
{
|
|
430
|
+
id: "a",
|
|
431
|
+
name: "Verify Output",
|
|
432
|
+
type: "pytest",
|
|
433
|
+
value: "def test_output():\n assert True\n",
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: "b",
|
|
437
|
+
name: "Check Format",
|
|
438
|
+
type: "pytest",
|
|
439
|
+
value: "def test_format():\n pass\n",
|
|
440
|
+
},
|
|
441
|
+
];
|
|
442
|
+
const out = await roundTrip(wb);
|
|
443
|
+
assert.strictEqual(out.modules[0].tests.length, 2);
|
|
444
|
+
assert.strictEqual(out.modules[0].tests[0].value, "def test_output():\n assert True\n");
|
|
445
|
+
assert.strictEqual(out.modules[0].tests[1].value, "def test_format():\n pass\n");
|
|
446
|
+
});
|
|
447
|
+
it("round-trips nested react_components and python paths", async () => {
|
|
448
|
+
const wb = basicWorkblock();
|
|
449
|
+
wb.react_components = {
|
|
450
|
+
"main.tsx": { content_type: "text/plain", text: "// main\n" },
|
|
451
|
+
"nested/widget.tsx": { content_type: "text/plain", text: "// widget\n" },
|
|
452
|
+
};
|
|
453
|
+
wb.python = {
|
|
454
|
+
"types.py": { content_type: "text/plain", text: "# types\n" },
|
|
455
|
+
"utils/helpers.py": { content_type: "text/plain", text: "# helpers\n" },
|
|
456
|
+
};
|
|
457
|
+
const out = await roundTrip(wb);
|
|
458
|
+
assert.strictEqual(out.react_components["main.tsx"].text, "// main\n");
|
|
459
|
+
assert.strictEqual(out.react_components["nested/widget.tsx"].text, "// widget\n");
|
|
460
|
+
assert.strictEqual(out.python["types.py"].text, "# types\n");
|
|
461
|
+
assert.strictEqual(out.python["utils/helpers.py"].text, "# helpers\n");
|
|
462
|
+
});
|
|
463
|
+
it("rejects duplicate normalized test names on assembly", async () => {
|
|
464
|
+
const dir = makeTmpDir();
|
|
465
|
+
try {
|
|
466
|
+
const wb = basicWorkblock();
|
|
467
|
+
wb.modules[0].tests = [
|
|
468
|
+
{ id: "a", name: "Verify Output", type: "pytest" },
|
|
469
|
+
];
|
|
470
|
+
await (0, workblock_1.storeWorkblockFiles)(dir, wb, identityBlobClient);
|
|
471
|
+
// Inject a duplicate by editing the manifest directly on disk.
|
|
472
|
+
const manifestPath = path.join(dir, "manifest.yaml");
|
|
473
|
+
const manifest = (0, yaml_1.parse)(fs.readFileSync(manifestPath, "utf8"));
|
|
474
|
+
manifest.modules[0].tests.push({
|
|
475
|
+
id: "b",
|
|
476
|
+
name: "Verify_Output",
|
|
477
|
+
type: "pytest",
|
|
478
|
+
});
|
|
479
|
+
fs.writeFileSync(manifestPath, (0, yaml_1.stringify)(manifest));
|
|
480
|
+
await assert.rejects(() => (0, workblock_1.assembleWorkblock)(dir, logger), /duplicate normalized test filename/);
|
|
481
|
+
}
|
|
482
|
+
finally {
|
|
483
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
describe("assembleWorkblock (binary assets)", () => {
|
|
488
|
+
it("stores non-UTF-8 files in `data` as base64 and UTF-8 files in `text`", async () => {
|
|
489
|
+
const dir = makeTmpDir();
|
|
490
|
+
try {
|
|
491
|
+
fs.mkdirSync(path.join(dir, "design_docs"), { recursive: true });
|
|
492
|
+
const pngBytes = Buffer.from([
|
|
493
|
+
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
|
|
494
|
+
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
|
|
495
|
+
0x08, 0x06, 0x00, 0x00, 0x00,
|
|
496
|
+
]);
|
|
497
|
+
fs.writeFileSync(path.join(dir, "design_docs", "binary.png"), pngBytes);
|
|
498
|
+
fs.writeFileSync(path.join(dir, "design_docs", "overview.md"), "# Overview\n");
|
|
499
|
+
fs.writeFileSync(path.join(dir, "manifest.yaml"), (0, yaml_1.stringify)({
|
|
500
|
+
id: "11111111-1111-1111-1111-111111111111",
|
|
501
|
+
name: "Bin WB",
|
|
502
|
+
modules: [],
|
|
503
|
+
}));
|
|
504
|
+
const wb = await (0, workblock_1.assembleWorkblock)(dir, logger);
|
|
505
|
+
assert.ok(wb);
|
|
506
|
+
const binary = wb.design_docs["binary.png"];
|
|
507
|
+
assert.strictEqual(binary.content_type, "image/png");
|
|
508
|
+
assert.strictEqual(binary.text, undefined);
|
|
509
|
+
assert.strictEqual(binary.data, pngBytes.toString("base64"));
|
|
510
|
+
const overview = wb.design_docs["overview.md"];
|
|
511
|
+
assert.strictEqual(overview.text, "# Overview\n");
|
|
512
|
+
assert.strictEqual(overview.data, undefined);
|
|
513
|
+
}
|
|
514
|
+
finally {
|
|
515
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
});
|
|
519
|
+
//# sourceMappingURL=workblock.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workblock.test.js","sourceRoot":"","sources":["../../src/lib/workblock.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,+BAAwC;AAExC,2CAOqB;AAErB,qCAAyC;AAEzC,MAAM,MAAM,GAAG,IAAI,sBAAa,EAAE,CAAC;AAEnC,MAAM,kBA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
EventType["StoreWorkblock"] = "store_work_block";
|
|
8
8
|
EventType["PublishWorkblock"] = "publish_workblock";
|
|
9
9
|
EventType["SetWorkblock"] = "set_work_block";
|
|
10
|
+
EventType["SetWorkblockV2"] = "set_work_block_v2";
|
|
10
11
|
EventType["BatchGetEvents"] = "batch_get_events";
|
|
11
12
|
EventType["GetEvents"] = "get_events";
|
|
12
13
|
EventType["GetWorkblock"] = "get_workblock";
|
|
13
14
|
EventType["ListWorkblockDefinitions"] = "list_workblock_definitions";
|
|
15
|
+
EventType["ListWorkblockBranches"] = "list_workblock_branches";
|
|
14
16
|
EventType["Events"] = "events";
|
|
15
17
|
EventType["SendMessage"] = "send_message";
|
|
16
18
|
EventType["Typing"] = "typing";
|
|
@@ -18,6 +20,7 @@ var EventType;
|
|
|
18
20
|
EventType["CreateStream"] = "create_stream";
|
|
19
21
|
EventType["CloseStream"] = "close_stream";
|
|
20
22
|
EventType["GetEditStream"] = "get_edit_stream";
|
|
23
|
+
EventType["SwitchStreamBranch"] = "switch_stream_branch";
|
|
21
24
|
})(EventType || (exports.EventType = EventType = {}));
|
|
22
25
|
var ActionType;
|
|
23
26
|
(function (ActionType) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publisher": "beyondwork",
|
|
4
4
|
"displayName": "Beyond Work",
|
|
5
5
|
"description": "Tool for interacting with Beyond Work workblocks from VS Code and CLI.",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.22",
|
|
7
7
|
"icon": "media/icon.png",
|
|
8
8
|
"engines": {
|
|
9
9
|
"vscode": "^1.94.0",
|
|
@@ -15,6 +15,20 @@
|
|
|
15
15
|
"bin": {
|
|
16
16
|
"beyondwork": "./out/cli.js"
|
|
17
17
|
},
|
|
18
|
+
"activationEvents": [
|
|
19
|
+
"onView:beyondworkConnections",
|
|
20
|
+
"onCommand:beyondwork.beyondwork.addConnection",
|
|
21
|
+
"onCommand:beyondwork.beyondwork.clearConnections",
|
|
22
|
+
"onCommand:beyondwork.beyondwork.removeConnection",
|
|
23
|
+
"onCommand:beyondwork.beyondwork.storeWorkblock",
|
|
24
|
+
"onCommand:beyondwork.beyondwork.help",
|
|
25
|
+
"onCommand:beyondwork.beyondwork.storeSelected",
|
|
26
|
+
"onCommand:beyondwork.beyondwork.connectToTenant",
|
|
27
|
+
"onCommand:beyondwork.beyondwork.bindStream",
|
|
28
|
+
"onCommand:beyondwork.beyondwork.get",
|
|
29
|
+
"onCommand:beyondwork.beyondwork.set",
|
|
30
|
+
"onCommand:beyondwork.beyondwork.showStreamOptions"
|
|
31
|
+
],
|
|
18
32
|
"files": [
|
|
19
33
|
"out/lib/**/*",
|
|
20
34
|
"out/cli.js",
|
|
@@ -109,7 +123,7 @@
|
|
|
109
123
|
"@vscode/test-cli": "^0.0.12",
|
|
110
124
|
"@vscode/test-electron": "^2.4.1",
|
|
111
125
|
"@vscode/vsce": "^3.3.2",
|
|
112
|
-
"esbuild": "^0.
|
|
126
|
+
"esbuild": "^0.27.0",
|
|
113
127
|
"eslint": "^9.12.0",
|
|
114
128
|
"npm": "^10.7.0",
|
|
115
129
|
"typescript": "^5.6.3"
|
|
@@ -143,6 +157,7 @@
|
|
|
143
157
|
"package": "pnpm run check-types && node esbuild.js --production && pnpm run build-webview",
|
|
144
158
|
"vsix": "bazel build //src/vscode/beyondwork:package",
|
|
145
159
|
"build-webview": "esbuild ./src/webview/main.ts --bundle --outfile=extension/out/webview/main.js --format=iife --platform=browser",
|
|
146
|
-
"build-lib": "tsc -p tsconfig.json"
|
|
160
|
+
"build-lib": "tsc -p tsconfig.json",
|
|
161
|
+
"test": "pnpm run build-lib && mocha 'out/lib/**/*.test.js'"
|
|
147
162
|
}
|
|
148
163
|
}
|