feat: add welcome message and update check on no arguments in CLI#89
Open
Shubhdeep12 wants to merge 4 commits intoresend:mainfrom
Open
feat: add welcome message and update check on no arguments in CLI#89Shubhdeep12 wants to merge 4 commits intoresend:mainfrom
Shubhdeep12 wants to merge 4 commits intoresend:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
4 issues found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="tests/welcome.test.ts">
<violation number="1" location="tests/welcome.test.ts:18">
P2: `execFileSync('npx', ...)` runs without a shell. On Windows `npx` is a `.cmd` shim, and Node requires `shell: true` to execute `.cmd`/`.bat` files after the CVE-2024-27980 changes. This will fail the test on Windows regardless of CLI behavior. Add a Windows-only shell or wrap with `cmd.exe`/`npx.cmd`.</violation>
</file>
<file name="src/cli.ts">
<violation number="1" location="src/cli.ts:108">
P2: No-argument CLI path makes update-check failures fatal, unlike the existing best-effort updater behavior.</violation>
<violation number="2" location="src/cli.ts:109">
P2: Forced `process.exit(0)` after welcome/update output can truncate pending stdout/stderr writes.</violation>
</file>
<file name="src/lib/logo.ts">
<violation number="1" location="src/lib/logo.ts:40">
P2: Welcome-screen command hints misuse `|` as “or”, causing copy/pasted examples to execute as invalid shell pipelines.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| const hints: [string, string][] = [ | ||
| ['resend --help', 'Display help and commands'], | ||
| ['resend login | logout', 'Authenticate with Resend'], |
Contributor
There was a problem hiding this comment.
P2: Welcome-screen command hints misuse | as “or”, causing copy/pasted examples to execute as invalid shell pipelines.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/lib/logo.ts, line 40:
<comment>Welcome-screen command hints misuse `|` as “or”, causing copy/pasted examples to execute as invalid shell pipelines.</comment>
<file context>
@@ -0,0 +1,67 @@
+
+ const hints: [string, string][] = [
+ ['resend --help', 'Display help and commands'],
+ ['resend login | logout', 'Authenticate with Resend'],
+ ['resend auth list | switch | remove', 'Manage profiles'],
+ ['resend emails send | batch | receiving', 'Send and manage emails'],
</file context>
Contributor
Author
|
i think we can add some branding in CLI. wdyt about this @felipefreitag ? |
Contributor
|
Thanks, I'll check with the team |
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.
related #88
Summary by cubic
Show a friendly welcome when the CLI runs with no arguments. It prints the ASCII logo and command hints, runs the update check, and exits 0.
New Features
src/lib/logo.tswithprintWelcomeusingpicocolors, tests for logo/welcome, andwelcome_errorhandling.updateruns.Refactors
process.exitin the CLI and improved test exec options for stability.Written for commit 9080aa6. Summary will update on new commits.