-
Notifications
You must be signed in to change notification settings - Fork 60
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
feat(web): get Env from API endpoint #678
Conversation
🦋 Changeset detectedLatest commit: d80e5ea 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Skipped Deployments
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #678 +/- ##
==========================================
+ Coverage 88.57% 88.81% +0.23%
==========================================
Files 162 163 +1
Lines 11060 11073 +13
Branches 1208 1208
==========================================
+ Hits 9796 9834 +38
+ Misses 1264 1239 -25 ☔ View full report in Codecov by Sentry. |
📦 Next.js Bundle Analysis for @blobscan/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
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.
Looking good.
I left some comments with some changes we should do.
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.
Left some more comments.
* feat(web): fetch env from API endpoint in client side * feat(web): adapt server side sentry env config for any environment * fix(web): limit to '1' env query * refactor(web): reset 'server' and 'edge' sentry config * refactor(web): move env endpoint from API package to Next API * feat: remove default env value * feat(web): use Next env api endpoint to init sentry in clientside * chore(web): remove unnecessary export * refactor(web): remove unnecessary env fetch utils file * feat(web): validate env API request json parsing * chore(web): update changeset * refactor(web): infer clien env zod schema in Env provider * feat(web): update client vars schema * feat(web): update client env var references after name refactor * style(web): type provider env vars * chore: update `pnpm-lock` * chore(web): remove `NEXT` prefix env vars * chore(web): parse env vars fetched from api * chore(web): use type casting instead of Zod schema parsing on client as env vars are already parsed on the server * chore(web): fix blobscan version info --------- Co-authored-by: PJColombo <[email protected]>
Checklist
Description
The environment variables on the client side are now obtained from an
api
endpoint when the app initializes. This way, you should be able to change their values without redeploying for future deployment changes.Related Issue (Optional)
Closes #87