Repository navigation
Add CLI output presenter - #6743
Conversation
🦋 Changeset detectedLatest commit: 7c68f6b The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughCLI output handling now uses a scoped ChangesCLI output presentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant Command
participant GlobalFlag
participant Presenter as CliOutput.Presenter
participant Formatter
participant Console
CLI->>Command: invoke command
Command->>Presenter: present Help or InvalidInvocation
CLI->>GlobalFlag: process --help or --version
GlobalFlag->>Presenter: present Help or Version
Presenter->>Formatter: format event output
Formatter-->>Presenter: formatted text
Presenter->>Console: write log or error output
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Comment |
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
Co-authored-by: Maxwell Brown <[email protected]>
ff8bf60 to
7c68f6b
Compare
Summary
CliOutput.Presenterservice with structured help, invalid-invocation, and version eventsCommand.runWithhelp failures through the presenterrenderErrors: false, invalid invocations are presented as implicit help so error rendering stays with the hostCommand.runWithtest covering requested help, version, invalid invocation, and implicit help events through a custom presenterTesting
pnpm lintpnpm circularpnpm checkfrompackages/effectpnpm vitest run packages/effect/test/clipnpm doctest run packages/effect/src/cliCloses #6313
Closes EFF-2846
Summary by CodeRabbit