Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/product/command-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ No current branch command uses `use`; branch targeting follows explicit flags or

Build and release an app into a target branch.

### `dev`

Run a built Composer app locally, including its local databases, without cloud
credentials. Both published CLI packages (`prisma` and `@prisma/cli`) include
`@prisma/dev` as a runtime dependency for local Postgres. Composer resolves
the runtime from the project's installation; starting local dev must not
require an extra emulator dependency in the app or a global installation.

### `init`

Prepare the current repository for Prisma development, entirely locally: add the `postinstall` script that keeps the Prisma agent skills in sync (`prisma skills sync || exit 0`), add `prisma` to `devDependencies` at the CLI's exact version when no dependency field declares it, scaffold a `prisma.config.ts` recording which agents get skills, then sync the skills once now.
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ npx prisma-cli project env list --role preview
The beta package exposes `prisma-cli` so it can coexist with the existing
`prisma` executable.

Both CLI packages include `@prisma/dev`, the runtime used by Composer's local
Postgres emulator. It is a CLI dependency, not an extra dependency to add to
your application or install globally.

---

## Commands
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@prisma/cli-engine": "workspace:0.4.0",
"@prisma/composer-cli": "0.20.0",
"@prisma/compute-sdk": "0.42.0",
"@prisma/dev": "0.25.2",
"@prisma/management-api-sdk": "1.69.0",
"@prisma/orm-toolchain": "8.0.0-rc.11",
"@vercel/detect-agent": "^1.2.3",
Expand Down
11 changes: 9 additions & 2 deletions packages/cli/scripts/conformance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,15 @@ async function importPurity(): Promise<readonly Finding[]> {
label: "@prisma/cli",
output: await sweepBuiltOutput(join(CLI_DIR, "dist")),
manifest: await manifest(CLI_DIR),
// Composer resolves the local Postgres runtime from the installed CLI.
allowedUnimported: ["@prisma/dev"],
requiredSpecifiers: ["@prisma/cli-engine", "@prisma/composer-cli/family"],
});
const unscoped = checkImportPurity({
label: "prisma",
output: await sweepBuiltOutput(join(PRISMA_DIR, "dist")),
manifest: await manifest(PRISMA_DIR),
allowedUnimported: ["@prisma/dev"],
requiredSpecifiers: ["@prisma/cli-engine", "@prisma/composer-cli/family"],
});
const engine = checkImportPurity({
Expand Down Expand Up @@ -97,8 +100,12 @@ async function tarball(): Promise<readonly Finding[]> {
return checkTarball(
{
packages: [
{ name: "@prisma/cli", dir: CLI_DIR },
{ name: "prisma", dir: PRISMA_DIR },
{
name: "@prisma/cli",
dir: CLI_DIR,
allowedUnimported: ["@prisma/dev"],
},
{ name: "prisma", dir: PRISMA_DIR, allowedUnimported: ["@prisma/dev"] },
{
name: "@prisma/cli-engine",
dir: ENGINE_DIR,
Expand Down
1 change: 1 addition & 0 deletions packages/cli/tests/manifest-pins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe("the prisma wrapper's manifest", () => {
it("declares exactly @prisma/cli's runtime dependencies", async () => {
const cli = await dependencies(CLI_DIR);
const wrapper = await dependencies(join(CLI_DIR, "..", "prisma"));
expect(cli).toHaveProperty("@prisma/dev");
expect(wrapper).toEqual(cli);
});
});
1 change: 1 addition & 0 deletions packages/cli/tests/v8-conformance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ describe("conformance: import purity", () => {
label: "@prisma/cli",
output,
manifest,
allowedUnimported: ["@prisma/dev"],
// Anti-vacuity, and more: these two are the engine boundary this
// package exists to compose, so a build that stopped importing
// either one is a broken shell rather than a tidy one.
Expand Down
4 changes: 4 additions & 0 deletions packages/prisma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ npx prisma git connect git@github.com:owner/repo.git

Deployments start from pushing the connected repository, the Console, or `prisma deploy`.

The CLI includes `@prisma/dev`, the runtime used by Composer's local Postgres
emulator. It is a CLI dependency, not an extra dependency to add to your
application or install globally.

With `pnpm`:

```bash
Expand Down
1 change: 1 addition & 0 deletions packages/prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@prisma/cli-engine": "workspace:0.4.0",
"@prisma/composer-cli": "0.20.0",
"@prisma/compute-sdk": "0.42.0",
"@prisma/dev": "0.25.2",
"@prisma/management-api-sdk": "1.69.0",
"@prisma/orm-toolchain": "8.0.0-rc.11",
"@vercel/detect-agent": "^1.2.3",
Expand Down
Loading
Loading