lingo.dev
lingo.dev copied to clipboard
feat(cli): Update header docs link to be conditional for CI environments
Summary
Updated the CLI header to display environment-aware documentation links based on the runtime environment (CI/CD vs Default).
Changes
- Created a local
isCIhelper function inpackages/cli/src/cli/utils/ui.tsto detect CI environments without external package dependencies. - Updated the
renderHerofunction to conditionally set the documentation link. - Changed the link from the static
https://lingo.dev/go/docsto dynamic paths:https://lingo.dev/ci(in CI) andhttps://lingo.dev/cli(default).
Testing
Business logic tests added:
- [x] Verified locally that running
node bin/cli.mjs logindisplayshttps://lingo.dev/cliin the header by default. - [x] Verified locally that running
CI=true node bin/cli.mjs logindisplayshttps://lingo.dev/ciin the header. - [x] All tests pass locally
Visuals
Required for UI/UX changes:
- [x] Screenshots showing the issue is fixed attached
CLI Mode -
CI Mode -
Checklist
- [x] No breaking changes (or documented below)
Closes #1078