-
-
Notifications
You must be signed in to change notification settings - Fork 140
Add manual connection string setup option for Neon database #495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add manual connection string setup option for Neon database #495
Conversation
🦋 Changeset detectedLatest commit: a3f1850 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Warning Rate limit exceeded@tomer-yechiel has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 11 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughIntroduces a manual Neon setup path in the CLI, switching env writing to accept a direct connection string. Updates prompts and control flow accordingly. Adjusts writeEnvFile signature and call sites. Adds a changeset entry documenting the minor change and updates .gitignore to include .idea. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant CLI as CLI (neon-setup)
participant P as Prompt
participant FS as FileSystem
participant N as neonctl (optional)
U->>CLI: Run Neon setup
CLI->>P: Ask setup method (neonctl or manual)
alt Manual
CLI->>P: Prompt for connection string
P-->>CLI: Connection string or cancel
alt Provided
CLI->>FS: writeEnvFile(projectDir, connectionString)
FS-->>CLI: Env written
else Cancelled/Empty
CLI-->>U: Exit via cancellation/default handling
end
else neonctl
CLI->>N: Perform automated setup
N-->>CLI: Returns connection details
CLI->>FS: writeEnvFile(projectDir, connectionString)
FS-->>CLI: Env written
end
CLI-->>U: Setup complete
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
8ec8c81
to
b0edcfc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/cli/src/helpers/database-providers/neon-setup.ts (1)
219-231
: LGTM! Manual setup flow implemented correctly with minor formatting issue.The manual setup implementation properly handles user input validation, cancellation, and integrates well with existing patterns. However, there's inconsistent indentation using spaces instead of tabs on lines 227, 229-230.
- if (isCancel(connectionString)) return exitCancelled("Operation cancelled"); + if (isCancel(connectionString)) return exitCancelled("Operation cancelled"); - await fs.ensureDir(path.join(projectDir, "apps/server")); - await writeEnvFile(projectDir, connectionString); + await fs.ensureDir(path.join(projectDir, "apps/server")); + await writeEnvFile(projectDir, connectionString);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.changeset/fair-streets-nail.md
(1 hunks).gitignore
(1 hunks)apps/cli/src/helpers/database-providers/neon-setup.ts
(4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/cli/src/helpers/database-providers/neon-setup.ts (2)
apps/cli/src/helpers/project-generation/env-setup.ts (1)
EnvVariable
(6-10)apps/cli/src/utils/errors.ts (1)
exitCancelled
(10-13)
🔇 Additional comments (5)
.changeset/fair-streets-nail.md (1)
1-6
: LGTM! Changeset correctly documents the new feature.The changeset properly follows the standard format and accurately describes the addition of manual Neon setup functionality as a minor version change.
.gitignore (1)
40-40
: LGTM! Standard IDE configuration exclusion.Adding
.idea
to the gitignore is a best practice to exclude JetBrains IDE configuration files from version control.apps/cli/src/helpers/database-providers/neon-setup.ts (3)
96-110
: LGTM! Function signature simplified appropriately.The change from accepting a
NeonConfig
object to a simpleconnectionString?: string
parameter is a good simplification that makes the function more flexible and removes the dependency on the removedNeonConfig
type.
170-174
: LGTM! New manual setup option follows established patterns.The new manual setup option is properly structured with clear labeling and helpful hint text, consistent with the existing options.
216-216
: LGTM! Call site correctly updated for new function signature.The call to
writeEnvFile
properly extractsneonConfig.connectionString
instead of passing the entire config object, correctly adapting to the simplified function signature.
b0edcfc
to
fad35ea
Compare
fad35ea
to
a3f1850
Compare
@tomer-yechiel, I'm here to help! I see you've made changes to add manual connection string setup for Neon database. Would you like me to review these changes, or is there something specific you'd like assistance with? ✅ Actions performedReview triggered.
|
Thanks for the PR. Will do some refactoring to it 👍 |
I can help |
enable to use neon with existing db
Summary by CodeRabbit
New Features
Chores