@workflow-code/cli 0.2.4-20260929001 → 0.2.4-20261010001.codex-cli-web
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/{chunk-SGW3CIWG.js → chunk-7WEXRL5A.js} +64 -22
- package/dist/{chunk-PI54SAI5.js → chunk-BP2VDZQV.js} +17 -17
- package/dist/{chunk-VMFPUXPG.js → chunk-G7PZDTYW.js} +1 -1
- package/dist/{chunk-PCNMKSS4.js → chunk-J2JMC4MZ.js} +1 -1
- package/dist/{local-ISDXTMSA.js → chunk-T4FXQ7AQ.js} +8 -7
- package/dist/index.js +12 -6
- package/dist/local-7HMZSBG2.js +28 -0
- package/dist/{mcp-O6PS2QTB.js → mcp-5H6U7H4S.js} +5 -5
- package/dist/web/codicons/codicon.css +708 -0
- package/dist/web/codicons/codicon.csv +536 -0
- package/dist/web/codicons/codicon.html +12111 -0
- package/dist/web/codicons/codicon.svg +1 -0
- package/dist/web/codicons/codicon.ttf +0 -0
- package/dist/web/codicons/codiconsLibrary.ts +659 -0
- package/dist/web/codicons/metadata.json +2682 -0
- package/dist/web/theme.css +72 -0
- package/dist/web/worker.mjs +208 -0
- package/dist/web/workflow-ui.css +1710 -0
- package/dist/web/workflow-ui.js +5337 -0
- package/dist/web-U23BFLG4.js +1523 -0
- package/dist/{workspace-I4I5VJI3.js → workspace-G7SB6MS5.js} +78 -7
- package/package.json +10 -5
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
prepareCliInvocation
|
|
4
|
+
} from "./chunk-J2JMC4MZ.js";
|
|
2
5
|
import {
|
|
3
6
|
clearCliAuthConfig,
|
|
4
7
|
isWorkflowAuthExpiringSoon,
|
|
@@ -6,19 +9,16 @@ import {
|
|
|
6
9
|
readCliAuthConfigSync,
|
|
7
10
|
writeCliAuthConfig
|
|
8
11
|
} from "./chunk-PGM3IPWA.js";
|
|
9
|
-
import {
|
|
10
|
-
prepareCliInvocation
|
|
11
|
-
} from "./chunk-PCNMKSS4.js";
|
|
12
12
|
import {
|
|
13
13
|
isWorkflowUuid,
|
|
14
14
|
readWorkflowProjectInfo,
|
|
15
15
|
resolveWorkflowRelatedProjectAccess
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BP2VDZQV.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentLocale,
|
|
19
19
|
i18n,
|
|
20
20
|
translateWorkflowCodeError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7WEXRL5A.js";
|
|
22
22
|
import {
|
|
23
23
|
__commonJS,
|
|
24
24
|
__toESM
|
|
@@ -487,7 +487,7 @@ var require_ignore = __commonJS({
|
|
|
487
487
|
import { spawn } from "child_process";
|
|
488
488
|
import { createHash, randomUUID } from "crypto";
|
|
489
489
|
import { existsSync as existsSync2 } from "fs";
|
|
490
|
-
import { copyFile as copyFile2, mkdir as mkdir2, readFile as readFile2, readdir as readdir2, rename, rm, writeFile } from "fs/promises";
|
|
490
|
+
import { copyFile as copyFile2, mkdir as mkdir2, readFile as readFile2, readdir as readdir2, rename, rm, stat, writeFile } from "fs/promises";
|
|
491
491
|
import path3 from "path";
|
|
492
492
|
import { fileURLToPath, pathToFileURL } from "url";
|
|
493
493
|
|
|
@@ -546,6 +546,7 @@ var import_ignore = __toESM(require_ignore(), 1);
|
|
|
546
546
|
var KANBAN_MANIFEST_FILE = "kanban.json";
|
|
547
547
|
var KANBAN_ENTRY_FILE = "index.html";
|
|
548
548
|
var KANBAN_ARTIFACT_DIR = ".";
|
|
549
|
+
var KANBAN_FILE_MAX_BYTES = 50 * 1024 * 1024;
|
|
549
550
|
function readPackageProjectType(value) {
|
|
550
551
|
if (!isRecord(value)) return void 0;
|
|
551
552
|
const workflowCode = value["workflowCode"];
|
|
@@ -992,7 +993,9 @@ function dependencyError(key, message, values) {
|
|
|
992
993
|
|
|
993
994
|
// src/workspace.ts
|
|
994
995
|
import {
|
|
995
|
-
inspectLocalWorkflowStructure
|
|
996
|
+
inspectLocalWorkflowStructure,
|
|
997
|
+
parseWorkflowFileReferences,
|
|
998
|
+
RemoteWorkflowFileStore
|
|
996
999
|
} from "workflow-code";
|
|
997
1000
|
|
|
998
1001
|
// src/env.ts
|
|
@@ -1066,6 +1069,15 @@ async function main(argv = process.argv.slice(2), options = {}) {
|
|
|
1066
1069
|
case "upload":
|
|
1067
1070
|
await commandUpload(parsed);
|
|
1068
1071
|
return;
|
|
1072
|
+
case "file-upload":
|
|
1073
|
+
await commandFileUpload(parsed);
|
|
1074
|
+
return;
|
|
1075
|
+
case "file-download":
|
|
1076
|
+
await commandFileDownload(parsed);
|
|
1077
|
+
return;
|
|
1078
|
+
case "file-delete":
|
|
1079
|
+
await commandFileDelete(parsed);
|
|
1080
|
+
return;
|
|
1069
1081
|
case "preparation":
|
|
1070
1082
|
await commandPreparation(parsed);
|
|
1071
1083
|
return;
|
|
@@ -1376,6 +1388,59 @@ async function commandRun(parsed) {
|
|
|
1376
1388
|
printApiResponse(result);
|
|
1377
1389
|
assertApiOk(result);
|
|
1378
1390
|
}
|
|
1391
|
+
async function commandFileUpload(parsed) {
|
|
1392
|
+
requireLogin(parsed);
|
|
1393
|
+
if (!parsed.options.file) throw new Error(i18n.t("fileUploadRequiresFile", { ns: "cli" }));
|
|
1394
|
+
const workflowId = await resolveRemoteWorkflowId(parsed);
|
|
1395
|
+
const filePath = path3.resolve(parsed.options.file);
|
|
1396
|
+
const info = await stat(filePath);
|
|
1397
|
+
if (!info.isFile() || info.size > 50 * 1024 * 1024) {
|
|
1398
|
+
throw new Error(i18n.t("invalidUploadFile", { ns: "cli" }));
|
|
1399
|
+
}
|
|
1400
|
+
const [source] = parseWorkflowFileReferences(filePath);
|
|
1401
|
+
const store = new RemoteWorkflowFileStore({
|
|
1402
|
+
serverUrl: parsed.options.server,
|
|
1403
|
+
token: parsed.options.token,
|
|
1404
|
+
workflowName: workflowId
|
|
1405
|
+
});
|
|
1406
|
+
const file = await store.createFile({
|
|
1407
|
+
name: path3.basename(filePath),
|
|
1408
|
+
mimeType: parsed.options.mimeType ?? source.mimeType,
|
|
1409
|
+
buffer: await readFile2(filePath)
|
|
1410
|
+
});
|
|
1411
|
+
printApiResponse({ errCode: 0, errMessage: "", data: file });
|
|
1412
|
+
}
|
|
1413
|
+
async function commandFileDownload(parsed) {
|
|
1414
|
+
requireLogin(parsed);
|
|
1415
|
+
const fileId = requirePositional(parsed, 0, "file-id");
|
|
1416
|
+
if (!parsed.options.output) throw new Error(i18n.t("fileDownloadRequiresOutput", { ns: "cli" }));
|
|
1417
|
+
const response = await fetch(
|
|
1418
|
+
`${trimTrailingSlash(parsed.options.server)}/api/workflows/files/${encodeURIComponent(fileId)}`,
|
|
1419
|
+
{ headers: { Authorization: `Bearer ${parsed.options.token}` }, redirect: "error" }
|
|
1420
|
+
);
|
|
1421
|
+
if (!response.ok) {
|
|
1422
|
+
const result = await response.json();
|
|
1423
|
+
printApiResponse(result);
|
|
1424
|
+
assertApiOk(result.errCode === 0 ? { errCode: response.status, errMessage: response.statusText } : result);
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1427
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
1428
|
+
const output = path3.resolve(parsed.options.output);
|
|
1429
|
+
await writeFile(output, buffer, { flag: "wx" });
|
|
1430
|
+
printApiResponse({ errCode: 0, errMessage: "", data: { id: fileId, output, size: buffer.byteLength } });
|
|
1431
|
+
}
|
|
1432
|
+
async function commandFileDelete(parsed) {
|
|
1433
|
+
requireLogin(parsed);
|
|
1434
|
+
const fileId = requirePositional(parsed, 0, "file-id");
|
|
1435
|
+
const result = await fetchApi({
|
|
1436
|
+
server: parsed.options.server,
|
|
1437
|
+
token: parsed.options.token,
|
|
1438
|
+
path: `/api/workflows/files/${encodeURIComponent(fileId)}`,
|
|
1439
|
+
method: "DELETE"
|
|
1440
|
+
});
|
|
1441
|
+
printApiResponse(result);
|
|
1442
|
+
assertApiOk(result);
|
|
1443
|
+
}
|
|
1379
1444
|
async function commandDebugNode(parsed) {
|
|
1380
1445
|
requireLogin(parsed);
|
|
1381
1446
|
const workflowId = await resolveRemoteWorkflowId(parsed);
|
|
@@ -2368,6 +2433,9 @@ function parseArgs(argv) {
|
|
|
2368
2433
|
case "--file":
|
|
2369
2434
|
options.file = requireValue(rest, index += 1, "--file");
|
|
2370
2435
|
break;
|
|
2436
|
+
case "--mime-type":
|
|
2437
|
+
options.mimeType = requireValue(rest, index += 1, "--mime-type");
|
|
2438
|
+
break;
|
|
2371
2439
|
case "--output":
|
|
2372
2440
|
options.output = requireValue(rest, index += 1, "--output");
|
|
2373
2441
|
break;
|
|
@@ -2437,6 +2505,9 @@ function parseArgs(argv) {
|
|
|
2437
2505
|
if (command === "upload" && options.noWait === true && options.releaseLog !== void 0) {
|
|
2438
2506
|
throw new Error(i18n.t("noWaitReleaseLogConflict", { ns: "cli" }));
|
|
2439
2507
|
}
|
|
2508
|
+
if (options.mimeType !== void 0 && command !== "file-upload") {
|
|
2509
|
+
throw new Error(i18n.t("mimeTypeCommandUnsupported", { ns: "cli" }));
|
|
2510
|
+
}
|
|
2440
2511
|
if (options.noWait === true && command !== "upload") {
|
|
2441
2512
|
throw new Error(i18n.t("noWaitCommandUnsupported", { ns: "cli" }));
|
|
2442
2513
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workflow-code/cli",
|
|
3
|
-
"version": "0.2.4-
|
|
3
|
+
"version": "0.2.4-20261010001.codex-cli-web",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"workflow-code": "./dist/index.js"
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
18
18
|
"dotenv": "^17.4.2",
|
|
19
|
+
"import-meta-resolve": "4.2.0",
|
|
19
20
|
"tsx": "^4.21.0",
|
|
20
21
|
"zod": "4.4.3"
|
|
21
22
|
},
|
|
@@ -23,6 +24,10 @@
|
|
|
23
24
|
"workflow-code": "0.2.4-20260929001"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
27
|
+
"@vscode/codicons": "0.0.45",
|
|
28
|
+
"dompurify": "3.3.1",
|
|
29
|
+
"marked": "17.0.1",
|
|
30
|
+
"esbuild": "0.28.2",
|
|
26
31
|
"@types/node": "^25.6.0",
|
|
27
32
|
"@vitest/coverage-v8": "^4.1.7",
|
|
28
33
|
"semver": "^7.7.4",
|
|
@@ -32,21 +37,21 @@
|
|
|
32
37
|
"workflow-code": "0.2.4-20260929001",
|
|
33
38
|
"@workflow-code/auth-config": "0.1.0",
|
|
34
39
|
"@workflow-code/execution-targets": "0.1.0",
|
|
35
|
-
"@workflow-code/i18n": "0.1.0",
|
|
36
40
|
"@workflow-code/openai-responses": "0.1.0",
|
|
37
41
|
"@workflow-code/project-dependencies": "0.1.0",
|
|
42
|
+
"@workflow-code/i18n": "0.1.0",
|
|
38
43
|
"@workflow-code/project-info": "0.1.0",
|
|
39
|
-
"@workflow-code/runtime-compatibility": "0.1.0",
|
|
40
44
|
"@workflow-code/project-upload": "0.1.0",
|
|
41
45
|
"@workflow-code/workflow-ids": "0.1.0",
|
|
42
|
-
"@workflow-code/workflow-mcp": "0.1.0"
|
|
46
|
+
"@workflow-code/workflow-mcp": "0.1.0",
|
|
47
|
+
"@workflow-code/runtime-compatibility": "0.1.0"
|
|
43
48
|
},
|
|
44
49
|
"scripts": {
|
|
45
50
|
"bootstrap": "node scripts/bootstrap.mjs",
|
|
46
51
|
"pnpm:devPreinstall": "node scripts/install-guard.mjs",
|
|
47
52
|
"check:boundaries": "node scripts/check-repository-boundaries.mjs",
|
|
48
53
|
"dev": "node scripts/dev.mjs",
|
|
49
|
-
"build": "tsup --config tsup.config.ts",
|
|
54
|
+
"build": "tsup --config tsup.config.ts && node scripts/build-web.mjs",
|
|
50
55
|
"typecheck": "tsc --noEmit",
|
|
51
56
|
"test": "pnpm build && vitest run",
|
|
52
57
|
"coverage": "pnpm build && vitest run --coverage",
|