You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/product/command-spec.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ Out of scope for the current beta:
58
58
non-TTY stderr, and when `NO_UPDATE_NOTIFIER` is set. When shown, update
59
59
notifications are stderr-only human output and do not change the original
60
60
command result.
61
-
- Public Beta does not read or write committed config files such as `prisma.config.ts` or `.prisma/settings.json` for Project -> Branch resolution. `.prisma/local.json` is a gitignored local pin/cache, not a declarative repo config file. `prisma.app.json` is legacy and no longer read or written. `prisma.compute.ts` supplies typed `app deploy` defaults (app name, app root, framework, entrypoint, HTTP port, env inputs) and never selects Project or Branch scope.
61
+
- Public Beta does not read or write committed config files such as `prisma.config.ts` or `.prisma/settings.json` for Project -> Branch resolution. `.prisma/local.json` is a gitignored local pin/cache, not a declarative repo config file. `prisma.app.json` is legacy and no longer read or written. `prisma.compute.ts` supplies typed `app deploy` defaults (app name, app region, app root, framework, entrypoint, HTTP port, env inputs) and never selects Project or Branch scope.
62
62
- Remote commands do not silently change local context.
63
63
64
64
## Authentication
@@ -126,6 +126,9 @@ multiple targets, no argument, and nothing inferred from the invocation
126
126
directory, they fall back to the selection order above — except step 7;
127
127
management commands never create apps or mutate remote state to resolve one.
128
128
129
+
Config `region` and `--region` are not app selectors. They are used only when
130
+
`app deploy` creates a new app; existing apps keep their current region.
131
+
129
132
`.prisma/local.json` pins the directory to a Workspace and Project only. It does
130
133
not pin an App ID. App services are branch-scoped; a service ID from `main`
131
134
must not be reused automatically when the user deploys from `feat/billing`.
@@ -927,7 +930,7 @@ prisma-cli app run --build-type bun --entry server.ts --port 3000
-`apps` — a multi-app or monorepo repository, keyed by deploy target name
946
-
- each app accepts `name`, `root`, `framework`, `entry`, `httpPort`, `env`, and `build`:
949
+
- each app accepts `name`, `region`, `root`, `framework`, `entry`, `httpPort`, `env`, and `build`:
950
+
-`region` is the Compute region id used when deploy creates a new app; existing apps keep their current region
947
951
-`env` is a dotenv file path, or `{ file, vars }` with file path(s) and inline assignments
948
952
-`build` is `{ command, outputDirectory, entrypoint }`; all fields are optional except where a framework requires enough information to stage a runnable artifact, and `command: null` skips the build step
949
953
-`build.entrypoint` is the built artifact entrypoint when `outputDirectory` is set, and is the source entrypoint for Bun/Hono configs that do not set an output directory
@@ -959,14 +963,15 @@ with ORM config keys, and `database.schema` will become unnecessary once the
959
963
unified file's own `schema` field is in scope. Project, branch, and
960
964
production targeting stay out of committed config in the unified file for the
961
965
same reasons they are excluded today.
962
-
- config values are deploy defaults; explicit flags always win: `--framework`, `--entry`, `--http-port` override per value, and any `--env` flag replaces the config env inputs entirely
966
+
- config values are deploy defaults; explicit flags always win: `--framework`, `--entry`, `--http-port`, and `--region` override per value, and any `--env` flag replaces the config env inputs entirely
963
967
- the config `name` (or the `apps` key when `name` is absent) selects the app like `--app`, but ranks below both `--app` and `PRISMA_APP_ID`
968
+
-`--region` and config `region` apply only when the resolved app does not exist yet and deploy creates it; `--app` and `PRISMA_APP_ID` still control which app is selected
964
969
-`root` is a relative path inside the repository; framework detection, entrypoint resolution, build settings, and the build/upload run in that directory while Project binding and the local pin stay in the config file's directory
965
970
-`prisma.compute.ts` never selects Project or Branch scope; project resolution is unchanged
966
971
- the `[app]` argument selects an `apps` target by key:
967
972
- without an `[app]` argument, a command run from inside a target's `root` selects that target, so `cd apps/api && prisma-cli app deploy` deploys `api`; the deepest matching root wins and an ambiguous tie selects nothing
968
973
- with multiple `apps` entries, no `[app]` argument, and no target inferred from the invocation directory, deploy deploys every target sequentially in declaration order — the config declares the system, and a bare `prisma-cli app deploy` ships it
969
-
- deploying all targets rejects per-app inputs (`--app`, `--framework`, `--entry`, `--http-port`, `--env`, `PRISMA_APP_ID`) with a usage error; project- and branch-level flags (`--project`, `--create-project`, `--branch`, `--db`, `--no-db`, `--prod`, `--yes`) apply to the whole run, with `--create-project` creating and binding the Project once before the first target
974
+
- deploying all targets rejects per-app inputs (`--app`, `--framework`, `--entry`, `--http-port`, `--region`, `--env`, `PRISMA_APP_ID`) with a usage error; project- and branch-level flags (`--project`, `--create-project`, `--branch`, `--db`, `--no-db`, `--prod`, `--yes`) apply to the whole run, with `--create-project` creating and binding the Project once before the first target
970
975
- a deploy-all run stops at the first failure and reports the targets already live; `--json` output aggregates one full deploy result per target
971
976
-`app build` and `app run` still require a target in multi-app configs and fail with `COMPUTE_CONFIG_TARGET_REQUIRED` (a dev server cannot run N apps at once; build keeps the same shape)
972
977
- an `[app]` argument that matches no target fails with `COMPUTE_CONFIG_TARGET_UNKNOWN`
@@ -983,6 +988,7 @@ import { defineComputeConfig } from "@prisma/compute-sdk/config";
Copy file name to clipboardExpand all lines: docs/product/resource-model.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,7 @@ Rules:
104
104
- the runtime app service is scoped by branch in the platform model
105
105
- the app may be selected or created as part of app deployment workflows
106
106
- app selection is local CLI state when needed for the beta package
107
+
- app region is set at app creation time; `prisma.compute.ts` can provide the new-app default, but deploys to existing apps do not move them between regions
107
108
- app build settings live in the `build` block of `prisma.compute.ts` (`command`, `outputDirectory`, `entrypoint`); `prisma.app.json` is legacy and no longer read
0 commit comments