feat: add Prisma Composer workflow - #53
Merged
Merged
Conversation
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
PR preview published
|
Write emitted contract JSON and types to a generated directory so TypeScript does not resolve contract.d.ts to the adjacent contract.ts source file. Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Use the aligned RC2 package for init, authentication, and Composer commands so package-manager tag caches cannot resolve an older CLI without the ORM command. Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Keep SvelteKit on adapter-node while asking Vite to inline the application runtime packages required by the self-contained Composer build artifact. Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Use Vite noExternal for the full server dependency graph so the adapter-node build is self-contained for Composer. Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
4 tasks
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
AmanVarshney01
marked this pull request as ready for review
August 18, 2026 15:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create-prisma@nextchannelprisma@nextCLI for ORM and Composer commands instead of the separateprisma-nextbinary or a pinned CLI RCDeploy to Prisma now?, with Yes selected by defaultsrc/prisma/seed.ts, invoked on the first server-side database read through the Composer bindingdb:seedworkflow,starter-data.ts, and the directdotenvdependency/importsdefinePrismaConfigfor the consolidated top-level Prisma configStacking
This PR is stacked on #37 and targets its
aman/create-prisma-nextbranch. It intentionally changes only Prisma 8; it does not change the Prisma 7create-prisma@latestchannel.Upstream status
prisma/prisma-cli#183, credential refresh before delegated Composer runs, is merged.prisma/prisma-cli#184, structured delegated output, is merged.prisma/composer#235, the temporary framework compatibility layer for Compute, is merged and released in Composer 0.7/0.8/0.9..js/extensionless-to-TypeScript relative-import resolver fixes fromprisma/composer#238.prisma@next; the tag currently resolves to 8.0.0-rc.5.Two upstream release issues still block a truthful end-to-end verification of the current stack:
prisma@next contract emitemits the contract and then exits withCLI.UNEXPECTED:validateContractDeps()passes the relative path./src/prisma/package.jsonto Node'screateRequire(), which requires an absolute path. This must be fixed in ORM toolchain; create-prisma does not work around it.prisma@nextmounts ORM toolchain rc.3, while@prisma/composer-prisma-cloud@0.9.0still has an exact@prisma/orm-postgres@8.0.0-rc.1peer and its own ORM toolchain rc.1 dependency. Composer Cloud needs a release aligned with the consolidated CLI's ORM family.prisma@next orm initalso still emits the deprecated CLI-enginedefineConfigname and addsdotenv. The templates correct those generated files todefinePrismaConfigand Composer-owned runtime configuration; no deployment or contract-emission workaround is included.Seeding behavior
Composer has no framework-wide
composer seedcommand today. The templates therefore use the same temporary service-runtime pattern as Composer's examples:src/prisma/seed.tscontains the starter rows and idempotent writesseed()through the hydrated Composer database bindingdb:seedscript, child process, URL probing,.prisma-composerstate read, or direct production credential handlingData that must be applied as part of deployment should be authored as a Prisma 8 data migration with an invariant rather than placed in this starter seed.
Verification
create-prisma@0.4.2-pr.53.198.1, generated, built, deployed, queried, and destroyed all nine TypeScript + PostgreSQL + Bun templates: 9/9 passedprisma@nextclean-install E2E reachescontract emitand then fails on the upstream relative-createRequire()bug described above; the current stack is not claimed as end-to-end greenTemporary Composer compatibility
Composer #235 handles the current provider gaps without changing generated framework output:
@sveltejs/adapter-node; the temporary Compute bootstrap handles the Bun URL inspect incompatibilityThese are temporary compatibility fixes. The future Alchemy Prisma provider should own framework packaging, after which this Composer compatibility layer can be removed. Deployment routing/readiness remains a platform responsibility.
Before merge
createRequire()failure and moveprisma@nextto the fixed release.prisma@next.prisma@nexttag.