prisma 8.0.0-rc.15-dev.106 → 8.0.0-rc.15-dev.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/prisma.js
CHANGED
|
@@ -5339,6 +5339,13 @@ function installWaitFailedError(repository, installUrl, inspectableInstallationC
|
|
|
5339
5339
|
//#endregion
|
|
5340
5340
|
//#region ../cli/src/commands/git/connect.ts
|
|
5341
5341
|
/** The `git connect` command. */
|
|
5342
|
+
/** Where the deploy workflow's inputs and the minimal file are documented. */
|
|
5343
|
+
const WORKFLOW_DOCS_URL = "https://github.com/prisma/cloud-deploy-action#readme";
|
|
5344
|
+
/** The platform never builds on push; the repository's own Actions workflow
|
|
5345
|
+
* does, so a connection without one deploys nothing. Console import writes
|
|
5346
|
+
* the file through a setup pull request; this command does not. */
|
|
5347
|
+
const WORKFLOW_DETAIL = "Deploys run from the repository's GitHub Actions workflow (prisma/cloud-deploy-action), which must exist on each pushed branch; the platform does not build on push.";
|
|
5348
|
+
const WORKFLOW_NEXT_STEP = "If the repository has no .github/workflows/prisma-deploy.yml yet, add one running prisma/cloud-deploy-action@v1 with `id-token: write`; a push of any branch that lacks the file deploys nothing.";
|
|
5342
5349
|
/** The legacy wait line, printed once before the poll loop. */
|
|
5343
5350
|
const WAIT_MESSAGE = "Waiting for GitHub App installation or repository access approval...";
|
|
5344
5351
|
/**
|
|
@@ -5375,12 +5382,21 @@ async function resolveInstalledRepository(ctx, api, workspaceId, repository) {
|
|
|
5375
5382
|
if (match === null) throw installWaitFailedError(repository, installUrl, inspectableInstallationCount);
|
|
5376
5383
|
return match;
|
|
5377
5384
|
}
|
|
5385
|
+
/** The connect result in every mode: the connection card, plus the
|
|
5386
|
+
* workflow step the platform will not do for you. */
|
|
5378
5387
|
function connectPresentations(result) {
|
|
5379
5388
|
const connection = result.repositoryConnection;
|
|
5380
5389
|
return {
|
|
5381
5390
|
stdout: () => [],
|
|
5382
5391
|
json: () => result,
|
|
5383
|
-
next: () => [
|
|
5392
|
+
next: () => [{
|
|
5393
|
+
kind: "edit-file",
|
|
5394
|
+
label: WORKFLOW_NEXT_STEP
|
|
5395
|
+
}, {
|
|
5396
|
+
kind: "open-url",
|
|
5397
|
+
label: "Workflow reference (prisma/cloud-deploy-action)",
|
|
5398
|
+
url: WORKFLOW_DOCS_URL
|
|
5399
|
+
}],
|
|
5384
5400
|
human: () => [
|
|
5385
5401
|
{
|
|
5386
5402
|
kind: "summary",
|
|
@@ -5410,7 +5426,7 @@ function connectPresentations(result) {
|
|
|
5410
5426
|
},
|
|
5411
5427
|
{
|
|
5412
5428
|
kind: "list",
|
|
5413
|
-
items: [formatGitConnectionDetail(connection.status)]
|
|
5429
|
+
items: [formatGitConnectionDetail(connection.status), WORKFLOW_DETAIL]
|
|
5414
5430
|
}
|
|
5415
5431
|
]
|
|
5416
5432
|
};
|
|
@@ -5424,8 +5440,8 @@ const gitConnectCommand = defineCommand({
|
|
|
5424
5440
|
flags: { project: projectFlag$2 }
|
|
5425
5441
|
},
|
|
5426
5442
|
help: {
|
|
5427
|
-
summary: "Connect a project to a GitHub repository so every push
|
|
5428
|
-
description: "
|
|
5443
|
+
summary: "Connect a project to a GitHub repository so its deploy workflow deploys every push",
|
|
5444
|
+
description: "Links the repository to the project. Once connected, the repository's prisma/cloud-deploy-action workflow authenticates each run through GitHub's OIDC token and deploys every pushed branch to a matching Platform Branch, an isolated environment with its own services, databases, and buckets. The platform does not build on push itself: a repository without the workflow must add .github/workflows/prisma-deploy.yml (importing in the Console opens a pull request that adds it). If the Prisma GitHub App does not cover the repository yet, the command opens the install page and waits. Run without a URL to use this repository's origin remote.",
|
|
5429
5445
|
examples: [
|
|
5430
5446
|
"git connect",
|
|
5431
5447
|
"git connect git@github.com:prisma/prisma-cli.git",
|
|
@@ -13086,7 +13102,7 @@ const cliGroups = {
|
|
|
13086
13102
|
},
|
|
13087
13103
|
{
|
|
13088
13104
|
run: "git connect",
|
|
13089
|
-
brief: "Connect GitHub
|
|
13105
|
+
brief: "Connect GitHub; branches carrying the deploy workflow deploy on push"
|
|
13090
13106
|
},
|
|
13091
13107
|
{
|
|
13092
13108
|
run: "project env add KEY=value --role preview",
|
|
@@ -13144,8 +13160,8 @@ const cliGroups = {
|
|
|
13144
13160
|
description: "A Branch maps to a Git branch of the connected repository. Each is an isolated environment with its own services, databases, buckets, and environment variables: the production branch serves live traffic, every other branch is a preview."
|
|
13145
13161
|
},
|
|
13146
13162
|
git: {
|
|
13147
|
-
brief: "Manage the GitHub connection
|
|
13148
|
-
description: "Connecting a GitHub repository turns on deploy-on-push:
|
|
13163
|
+
brief: "Manage the GitHub connection behind deploy-on-push. Connect or disconnect a repository",
|
|
13164
|
+
description: "Connecting a GitHub repository turns on deploy-on-push: the repository's prisma/cloud-deploy-action workflow authenticates through the connection and deploys every pushed branch to a matching Platform Branch. The platform does not build on push; the workflow does. Disconnecting stops push deploys without touching anything already deployed."
|
|
13149
13165
|
},
|
|
13150
13166
|
service: {
|
|
13151
13167
|
brief: "Manage deployed services. Logs, versions, promote and rollback releases, custom domains",
|
|
@@ -13326,7 +13342,7 @@ function buildCli() {
|
|
|
13326
13342
|
},
|
|
13327
13343
|
{
|
|
13328
13344
|
run: "git connect",
|
|
13329
|
-
brief: "Connect GitHub
|
|
13345
|
+
brief: "Connect GitHub; branches carrying the deploy workflow deploy on push"
|
|
13330
13346
|
},
|
|
13331
13347
|
{
|
|
13332
13348
|
run: "deploy",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prisma",
|
|
3
|
-
"version": "8.0.0-rc.15-dev.
|
|
3
|
+
"version": "8.0.0-rc.15-dev.107",
|
|
4
4
|
"description": "The Prisma CLI: one binary for the ORM, Composer, and the Prisma Developer Platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@manypkg/tools": "^2.1.2",
|
|
47
47
|
"@prisma/cli-engine": "0.4.0",
|
|
48
|
-
"@prisma/composer-cli": "0.20.0-dev.
|
|
48
|
+
"@prisma/composer-cli": "0.20.0-dev.5",
|
|
49
49
|
"@prisma/compute-sdk": "0.42.0",
|
|
50
50
|
"@prisma/management-api-sdk": "1.69.0",
|
|
51
|
-
"@prisma/orm-toolchain": "8.0.0-rc.11-dev.
|
|
51
|
+
"@prisma/orm-toolchain": "8.0.0-rc.11-dev.13",
|
|
52
52
|
"@vercel/detect-agent": "^1.2.3",
|
|
53
53
|
"better-result": "^2.9.2",
|
|
54
54
|
"cross-spawn": "^7.0.6",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"open": "^11.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@prisma/cli": "8.0.0-rc.15-dev.
|
|
60
|
+
"@prisma/cli": "8.0.0-rc.15-dev.107",
|
|
61
61
|
"@prisma/credentials-store": "^7.8.0",
|
|
62
|
-
"@repo/cli-telemetry": "8.0.0-rc.15-dev.
|
|
63
|
-
"@repo/tsconfig": "8.0.0-rc.15-dev.
|
|
62
|
+
"@repo/cli-telemetry": "8.0.0-rc.15-dev.107",
|
|
63
|
+
"@repo/tsconfig": "8.0.0-rc.15-dev.107",
|
|
64
64
|
"@types/node": "^22.19.19",
|
|
65
65
|
"tsdown": "^0.21.10",
|
|
66
66
|
"typescript": "^6.0.3",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
name: prisma-platform-core-concepts
|
|
3
3
|
metadata:
|
|
4
4
|
library: "prisma"
|
|
5
|
-
library_version: "8.0.0-rc.15-dev.
|
|
6
|
-
version: 2026.9.
|
|
5
|
+
library_version: "8.0.0-rc.15-dev.107"
|
|
6
|
+
version: 2026.9.2
|
|
7
7
|
description: >-
|
|
8
8
|
Use when hosting, deploying, or operating an app on the Prisma Platform:
|
|
9
9
|
projects, branches, preview environments, services and their versions,
|
|
@@ -119,8 +119,9 @@ another project or branch explicitly.
|
|
|
119
119
|
There is no separate "preview environment" object to create or configure. The
|
|
120
120
|
branch is the environment, and branches come into being by deploying to them:
|
|
121
121
|
|
|
122
|
-
1. **Push a git branch** (with the GitHub integration connected
|
|
123
|
-
|
|
122
|
+
1. **Push a git branch** (with the GitHub integration connected and the
|
|
123
|
+
deploy workflow in the repository): the workflow builds and deploys, and
|
|
124
|
+
the platform creates the branch environment on the fly.
|
|
124
125
|
2. **Deploy a stage from the CLI**: `prisma deploy module.ts --stage pr-42`
|
|
125
126
|
creates a branch named `pr-42` and deploys the identical app graph into
|
|
126
127
|
it. A stage name must be a valid git ref name; an invalid name is a hard
|
|
@@ -142,13 +143,48 @@ Preview lifecycle rules:
|
|
|
142
143
|
|
|
143
144
|
## Two ways to deploy
|
|
144
145
|
|
|
145
|
-
**GitHub (recommended).**
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
**GitHub (recommended).** Two pieces, both required: the Prisma GitHub App
|
|
147
|
+
connected to the repository, and a GitHub Actions workflow in the repository
|
|
148
|
+
that runs `prisma/cloud-deploy-action`. The platform does not build on push.
|
|
149
|
+
The workflow builds in the repository's own Actions and deploys with a
|
|
150
|
+
short-lived credential exchanged from the run's OIDC token; the connection
|
|
151
|
+
is what authorises that exchange, and it also tears a preview down when its
|
|
152
|
+
git branch is deleted. Importing the repository in the Console opens a setup
|
|
153
|
+
pull request that adds the workflow. `prisma git connect` only creates the
|
|
154
|
+
connection, so a repository connected from the CLI adds the workflow itself.
|
|
155
|
+
The minimal `.github/workflows/prisma-deploy.yml`:
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
name: prisma-deploy
|
|
159
|
+
on:
|
|
160
|
+
push:
|
|
161
|
+
permissions:
|
|
162
|
+
contents: read
|
|
163
|
+
id-token: write
|
|
164
|
+
jobs:
|
|
165
|
+
deploy:
|
|
166
|
+
if: github.ref_type == 'branch'
|
|
167
|
+
runs-on: ubuntu-latest
|
|
168
|
+
steps:
|
|
169
|
+
- uses: actions/checkout@v4
|
|
170
|
+
- uses: actions/setup-node@v4
|
|
171
|
+
with:
|
|
172
|
+
node-version: 24
|
|
173
|
+
- uses: oven-sh/setup-bun@v2
|
|
174
|
+
- uses: prisma/cloud-deploy-action@v1
|
|
175
|
+
with:
|
|
176
|
+
build-command: npm run build
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
From then on, every push of a branch that carries the workflow file runs
|
|
180
|
+
it; GitHub reads workflows from the pushed commit, so a branch created
|
|
181
|
+
before the file was added deploys nothing until it contains the file. A
|
|
182
|
+
push to the default branch deploys production; a push to any other branch
|
|
183
|
+
creates or updates that branch's preview environment, so previews come free
|
|
184
|
+
with every branch.
|
|
185
|
+
Opening a pull request does not itself deploy anything; previews track
|
|
186
|
+
branch pushes. A connected repository without the workflow gets branch
|
|
187
|
+
bookkeeping and preview teardown from the platform, and no builds.
|
|
152
188
|
|
|
153
189
|
**CLI.** `prisma deploy module.ts` deploys production directly; add
|
|
154
190
|
`--stage <name>` for a preview. Authenticate once with `prisma auth login`
|
|
@@ -324,6 +360,12 @@ Windows is not supported for the local stack yet.
|
|
|
324
360
|
10. **A deployed service errors on its first timestamp read
|
|
325
361
|
(`RUNTIME.TEMPORAL_UNAVAILABLE`).** The runtime has no global
|
|
326
362
|
`Temporal`; see the Compute runtime section for the polyfill.
|
|
363
|
+
11. **The repository is connected, but a push built nothing.** The platform
|
|
364
|
+
does not build on push; the repository's own workflow does. Make sure
|
|
365
|
+
`.github/workflows/prisma-deploy.yml` exists on the pushed branch and
|
|
366
|
+
that a run appears under the repository's Actions tab. A connected
|
|
367
|
+
repository with no workflow records the branch and deploys nothing, and
|
|
368
|
+
no error is raised anywhere.
|
|
327
369
|
|
|
328
370
|
## What the platform doesn't do yet
|
|
329
371
|
|
|
@@ -340,6 +382,9 @@ Name the gap instead of inventing an API:
|
|
|
340
382
|
enough to name here.
|
|
341
383
|
4. **No bucket rename** and no bucket-to-branch re-association after
|
|
342
384
|
creation; re-create instead.
|
|
385
|
+
5. **No build on push without a workflow.** The GitHub connection authorises
|
|
386
|
+
deploys and tears previews down; it never starts a build. The
|
|
387
|
+
`prisma/cloud-deploy-action` workflow is the build.
|
|
343
388
|
|
|
344
389
|
For anything else missing, run the nearest group with `--help` before
|
|
345
390
|
concluding it does not exist, and route requests with `prisma feedback`
|