Add instant.config.ts for self-hosted create-instant-app - #2844
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe dashboard now passes self-hosted API and dashboard URIs to project creation. The CLI forwards these values to ChangesSelf-hosted backend configuration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Home
participant AppStart
participant getSteps
participant create_instant_app
participant applyBackendConfig
Home->>AppStart: pass self-hosted apiURI and dashURI
AppStart->>getSteps: pass backend configuration
getSteps->>create_instant_app: prepend shell-quoted backend environment variables
create_instant_app->>applyBackendConfig: pass API and dashboard URIs
applyBackendConfig->>create_instant_app: write instant.config.ts
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
|
View Vercel preview at instant-www-js-wire-self-host-uri-jsv.vercel.app. |
367cedd to
8c61217
Compare
I noticed when using
create-instant-appin a self-hosted setup the LLM would first try to useinstant-cliwithout specifyingINSTANT_CLI_API_URIwhich cause an error since the app doesn't exist in production. The LLM would be able to inspect the app and figure out it needs to add this env variable but I thought it would be nicer to remove that schlep.This PR makes it so when you use
create-instant-appwith a customINSTANT_CLI_API_URIwe'll create aninstant.config.tsfile that our CLI will pick up and avoid the error from before.As a bonus, in the self-hosted dashboard we'll also update the
create-instant-appcommand to include both self hosted api and dash uris