chore: setup logger facade#7928
Merged
Merged
Conversation
Adds interactive template + project-name selection when args are omitted, graceful Ctrl-C handling, a gated end-to-end test (scaffold -> install -> build), the README, and the release changeset.
…eat/create-ui-3-cli
…eat/create-ui-3-cli
…eat/create-ui-3-cli
…eat/create-ui-3-cli
@coveo/atomic
@coveo/atomic-hosted-page
@coveo/atomic-legacy
@coveo/atomic-react
@coveo/auth
@coveo/bueno
@coveo/create-atomic
@coveo/create-atomic-component
@coveo/create-atomic-component-project
@coveo/create-atomic-result-component
@coveo/create-atomic-rollup-plugin
@coveo/headless
@coveo/headless-react
@coveo/shopify
commit: |
Contributor
alexprudhomme
previously approved these changes
Jul 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a logging facade for the @coveo/create-ui CLI so “business logic” emits output via a local log wrapper instead of importing @clack/prompts directly, and refactors main into an explicit “resolve inputs” phase followed by the execution phase.
Changes:
- Added
packages/create-ui/src/log.tsas a facade over@clack/promptsoutput helpers and removed the ad-hoclogfromutils.ts. - Refactored
mainto useresolveTemplate+resolveInputs, and changedscaffoldto accept aScaffoldOptionsobject. - Added an oxlint
no-restricted-importsoverride to prevent@clack/promptsimports outsidelog.tsandprompt.ts, and updated tests to capture stdout writes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/create-ui/src/utils.ts | Removes the legacy console-based log helper. |
| packages/create-ui/src/log.ts | Adds the log facade that delegates to @clack/prompts output helpers. |
| packages/create-ui/src/index.ts | Uses the new log facade and introduces a two-phase resolveInputs → scaffold flow. |
| packages/create-ui/src/index.test.ts | Updates tests to capture CLI output via process.stdout.write. |
| .oxlintrc.json | Adds restricted-imports rules to enforce the “prompt vs emit” boundary. |
alexprudhomme
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Log facade over
@clack/promptsNew
log.tswraps clack's output helpers (info/step/success/warn/error/note). Business logic importslog, never@clack/promptsdirectly.ADR 003 §3 draws the line at solicit vs. emit: clack's styled output is fair game everywhere, but prompts stay confined to
prompt.ts. An oxlintno-restricted-importsrule guards this. Onlylog.tsandprompt.tsmay import the toolkit.Bonus
Also extracts
resolveInputsandresolveTemplatefrommain. This makes the ADR 003 two-phase boundary a named, visible seam in the code:resolveInputsreturns a fully resolvedScaffoldOptionsobject (the interactive phase), thenscaffoldconsumes it (execution phase). Keeps the boundary harder to accidentally erode as the code grows.