Merge pull request 'fix: bin entry point to dist/cli.js for node compatibility' (#524) from fix/523-bin-entry-point into main

This commit is contained in:
2026-05-25 15:51:18 +00:00
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
], ],
"type": "module", "type": "module",
"bin": { "bin": {
"uwf": "./src/cli.ts" "uwf": "./dist/cli.js"
}, },
"dependencies": { "dependencies": {
"@uncaged/json-cas": "^0.5.3", "@uncaged/json-cas": "^0.5.3",
+4 -4
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env bun #!/usr/bin/env node
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@uncaged/workflow-protocol";
import { Command } from "commander"; import { Command } from "commander";
@@ -181,11 +181,11 @@ function parseStatusFilter(status: string | undefined): ThreadStatus[] | null {
if (raw === "active") return ["idle", "running"]; if (raw === "active") return ["idle", "running"];
const parts = raw.split(",").map((s) => s.trim()); const parts = raw.split(",").map((s) => s.trim());
const validStatuses: ThreadStatus[] = ["idle", "running", "completed"]; const validStatuses: ThreadStatus[] = ["idle", "running", "completed", "cancelled"];
for (const part of parts) { for (const part of parts) {
if (!validStatuses.includes(part as ThreadStatus)) { if (!validStatuses.includes(part as ThreadStatus)) {
process.stderr.write( process.stderr.write(
`Invalid status: ${part}. Must be one of: idle, running, completed, active\n`, `Invalid status: ${part}. Must be one of: idle, running, completed, cancelled, active\n`,
); );
process.exit(1); process.exit(1);
} }
@@ -238,7 +238,7 @@ thread
.description("List threads") .description("List threads")
.option( .option(
"--status <status>", "--status <status>",
"Filter by status: idle, running, completed, active (idle+running), or comma-separated values", "Filter by status: idle, running, completed, cancelled, active (idle+running), or comma-separated values",
) )
.option("--after <date>", "Filter threads created after this date (ISO or relative like '7d')") .option("--after <date>", "Filter threads created after this date (ISO or relative like '7d')")
.option("--before <date>", "Filter threads created before this date (ISO or relative like '7d')") .option("--before <date>", "Filter threads created before this date (ISO or relative like '7d')")