-
Notifications
You must be signed in to change notification settings - Fork 25
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
Hub DB; turbo generator #3686
Hub DB; turbo generator #3686
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
This PR extracts the DB layer from
apps/hub
in the same fashion as I did recently for metaforecast.This will allow us to write internal packages that use hub's db without keeping all code in
apps/hub
under next.js control (which creates problems, e.g. for squiggle build script).I'm not 100% sure this will be necessary for evals or not, but using the same pattern for both apps will reduce the burden of maintenance, and I remember having some trouble with esbuild setup in
apps/hub
previously, so this seems safer.One minor downside of this approach is that you'll need to keep
DATABASE_URL=...
in.env
both forapps/hub
and forinternal-packages/hub-db
. But I think it's not that big of a deal.This PR also introduces a top-level
turbo/generators
package, which allows you to doturbo gen internal-package -a NAME
(see https://turbo.build/repo/docs/guides/generating-code#custom-generators).I expect that we'll make significantly more internal packages in the future, so it's good to encode our current practices and patterns for new packages in code.