Repository navigation
Set deploy's entry file in prisma.config.ts, not on the command line - #387
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
ADR-0003, ADR-0049 and ADR-0050 are amended: the entry path is `entry` in the composer section of prisma.config.ts, resolved against that file's directory, and `--entry` (or an operation's `entry` input) overrides it, resolved against the working directory. The commands take no positional entry. The entry is an input to the tool, like the ORM section's schema path, not an application fact; application facts stay in code. ADR-0044 lists CONFIG.ENTRY_MISSING. deploy-cli.md, local-dev.md, core-model.md, the glossary and the ADR index show the new commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…y to override
The composer section takes an optional `entry`, checked as a non-empty
string and resolved against the directory of prisma.config.ts.
`prisma deploy` and `prisma dev` drop their positional entry and take
`--entry <path>`, resolved against the working directory, as the
operations' now-optional `entry` input is. With neither, the run fails
before any work with CONFIG.ENTRY_MISSING, naming both. The entry is
resolved in one place, so the generated stack file always gets an
absolute path. A leftover positional (`prisma deploy module.ts`) is
refused by the CLI engine itself with CLI.INVALID_ARGUMENTS ("Too many
arguments"), before the handler runs. The dev help also shows a full
address.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Each example's, the website's and the local-dev fixture's prisma.config.ts sets `entry: './module.ts'`, and their package scripts, the deploy-verify-destroy action and the docs workflow run `prisma deploy` with no positional. The action no longer passes an entry to destroy-guard.sh. scripts/composer-destroy.ts takes an optional `--entry` instead of a positional. Its test passes --no-install under bun, so a directory without node_modules no longer auto-installs the published package. The guides, the skill, gotchas.md, the store README, the dev operations' fix text and the integration tests use the new form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
COMPOSE.ENTRY_UNLOADABLE now carries a fix that names the path's source: `entry` in the declaring prisma.config.ts, relative to that file, or the `--entry` path (the `entry` input in code), relative to the current directory. CONFIG.ENTRY_MISSING's fix names the `entry` input for @prisma/composer/control callers as well as `--entry`. The composer-destroy.ts header says how each entry resolves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
ADR-0024, ADR-0041, ADR-0053 and ADR-0056 gain an amendment note that the commands take no positional entry, and the ADR-0024 and ADR-0041 index entries say so. ADR-0050's note gives the optional `entry` input to all four operations. The deploying guide drops the last `deploy module.ts`, as does the skill, says `prisma dev` keeps its local state in the directory it runs in, and adds an upgrade note for the "Too many arguments" error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
|
✅ Gizmo reviewed 9efe5f5 — posted 0 inline comment(s) this pass. Open findings: none Change walkthroughThis PR moves Composer's entry file from a required CLI argument ( Core types (app-config.ts) — Pipeline and operations — the CLI pipeline forwards a Docs, guides and examples — the local-dev domain doc, Tests — coverage spans the command boundary (new |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
commit: |
…ld on Windows The resolveEntryPath tests hard-coded POSIX absolute paths, which Windows resolves to drive-letter paths. They now build every input and expected path with path.resolve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…steps through env Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…-config Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> # Conflicts: # docs/design/10-domains/local-dev.md # docs/guides/running-locally.md # examples/store/README.md
Brings in dev servers (#381), full node addresses (#384, ADR-0057), the deploy entry in prisma.config.ts (#387) and prisma deploy list (#388). The secrets decision becomes ADR-0058, and every reference to it moves with it. A dev server gets its environment from materializeEnv, so it receives the same per-service secret values from process.env, an unset optional secret is absent, and a changed value restarts it; the serve test now covers both. The docs that described placeholders for dev servers now describe reading secrets before the dev server starts. Tests and expected error text use full addresses. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The decision: the entry file is set in
prisma.config.tsThe entry file is the TypeScript file whose default export is the app's root module.
prisma deployandprisma devused to take its path as a required argument on every run. Now it is a field of thecomposersection ofprisma.config.ts, and the commands take no argument for it.--entry <path>replaces the config's value for one run.This follows how the Prisma ORM treats its own inputs. The ORM's section of the same file holds the paths the tool reads, and the commands don't ask for them each time. The entry path is the same kind of thing: an input to the tool, not a fact about the app. Facts about the app, such as its name and its services, stay in code.
How the path resolves
entryis relative to the folder that holdsprisma.config.ts. Prisma's CLI engine resolves path fields in that file the same way, soprisma deployworks from any folder below it.--entryis relative to the folder the command runs in, as Prisma's other path flags are.CONFIG.ENTRY_MISSING. The message names both ways to supply an entry.COMPOSE.ENTRY_UNLOADABLEnow says where the path came from (the config file, or--entry) and what it is relative to.prisma devreads the entry the same way. It still keeps its local state in the folder it runs in, so runprisma dev,dev urlanddev stopfrom the same folder each time.What existing users see
After upgrading,
prisma deploy module.tsfails with Prisma's own error:A command that takes no arguments never sees the extra one, so it can't explain where the entry moved. The deploying guide has an upgrade note naming this error and the fix: add
entry: './module.ts'to thecomposersection, or pass--entry module.ts.Code that calls the operations on
@prisma/composer/control(deploy,destroy,dev,log) doesn't change. Theirentryinput still works and is now optional. When it is given, it replaces the config's value, the same as--entry.What else changed
scripts/composer-destroy.ts(now--entry), the guides, the agent skill and the tests use the config'sentry.CONFIG.ENTRY_MISSING.How we know it works
QA (
qa.md) usedexamples/storageon the real platform:prisma deploywith no entry argument deployed the app, and the service stored and returned a file. The same command from a subfolder updated the same app.prisma deploy --entrywith a second module file deployed that module instead.prisma dev --detach,prisma dev urlandprisma dev stopran from the config's entry and left nothing running.Every test project was deleted. Typecheck, lint, the CLI tests, the script tests and the local-dev integration tests pass.
Alternatives considered
prisma deploycould be read as either a file or a subcommand. That matters onceprisma deploy listexists.Agent: victoria-52
🤖 Generated with Claude Code