allow setting apiUri in instant.config.ts (#2793) [bump v1.0.52] - #2793
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CLI now reads ChangesCLI API origin resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/packages/cli/src/lib/http.ts`:
- Around line 136-145: Update the instantConfig.apiURI handling in the HTTP
configuration flow to accept only non-empty string values, ignoring null,
numbers, and empty strings. Before returning a valid explicit origin, normalize
it by removing trailing slashes so downstream path concatenation does not
produce double slashes; preserve the existing setEnv and dev/default fallback
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ccfb6858-6a82-40e3-9824-3eb7e25bb7b8
📒 Files selected for processing (5)
client/packages/cli/src/context/currentApp.tsclient/packages/cli/src/lib/http.tsclient/packages/cli/src/lib/pushSchema.tsclient/packages/cli/src/old.jsclient/packages/cli/src/util/instantConfig.ts
|
View Vercel preview at instant-www-js-drewh-ict-set-baseurl-jsv.vercel.app. |
stopachka
left a comment
There was a problem hiding this comment.
SGTM! Maybe we should update docs to explain this?
bebcd82 to
27e2d11
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/www/app/docs/self-hosting/page.md`:
- Around line 183-190: Update the apiURI example in the instant.config.ts
snippet to use the documented local self-hosting endpoint http://localhost:8888,
unless the surrounding documentation explicitly establishes when port 18987 is
required.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6af93fbb-66da-440a-9f13-ef1aa06c919d
📒 Files selected for processing (1)
client/www/app/docs/self-hosting/page.md
Allows you to set apiURI in the instant.config.ts file to make it easier to use self hosted installations of instantdb