fix(cli): point bin to dist/cli.js instead of src/cli.ts #234

Merged
xingyue merged 2 commits from fix/cli-bin-path into main 2026-05-13 08:43:42 +00:00
Owner

What

Fix uncaged-workflow CLI not working after global install.

Why

bin in package.json pointed to src/cli.ts but only dist/ is included in the published package, causing:

Cannot find module './cli-dispatch.js' from '.../src/cli.ts'

Changes

  • packages/cli-workflow/package.json: Changed bin entry from src/cli.tsdist/cli.js
## What Fix `uncaged-workflow` CLI not working after global install. ## Why `bin` in package.json pointed to `src/cli.ts` but only `dist/` is included in the published package, causing: ``` Cannot find module './cli-dispatch.js' from '.../src/cli.ts' ``` ## Changes - `packages/cli-workflow/package.json`: Changed bin entry from `src/cli.ts` → `dist/cli.js`
xingyue added 2 commits 2026-05-13 08:39:10 +00:00
What: Fix three non-blocking issues from PR #232 review.

Why: Code quality — unhandled promise rejection risk, type safety,
and project convention compliance.

Changes:
- packages/workflow-dashboard/src/components/workflow-graph/types.ts:
  add elkLabelX/elkLabelY fields to ConditionEdgeData type (number | null,
  not optional — per project no-optional-properties rule)
- packages/workflow-dashboard/src/components/workflow-graph/use-layout.ts:
  remove 'as ConditionEdgeData' type assertion (now unnecessary),
  add .catch() to computeLayout promise
- packages/workflow-dashboard/src/components/workflow-graph/condition-edge.tsx:
  remove redundant inline type extension, use ConditionEdgeData directly

Ref: PR #232 review comments
The bin entry pointed to src/cli.ts but only dist/ is published,
causing 'Cannot find module cli-dispatch.js' on global install.
xingyue added 1 commit 2026-05-13 08:43:12 +00:00
The actual issue was that 'files' only included dist/, so src/ was
excluded from the published package. bun can run .ts natively — no
need to point bin at compiled dist/cli.js.

Fix: add 'src' to files array so it ships with the package.
xingyue merged commit d4bb4a9324 into main 2026-05-13 08:43:42 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#234