┌────────────────────────────────────────────────────────────────────────────┐
│ VS Code Extension │
│ packages/vscode/src/extension.ts │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌───────────┐ │
│ │ Language Server │ │ Prisma Postgres │ │ Prisma Studio │ │ AI Tools │ │
│ │ Plugin │ │ Manager │ │ Plugin │ │ Plugin │ │
│ └────────┬────────┘ └────────┬─────┬──┘ └───────────────┬─┘ └───────────┘ │
│ │ HTTP │ │ │ │
│ │ LSP over IPC │ │ fork() │ HTTP (webview) │
└───────────┼───────────────────┼─────┼────────────────────┼─────────────────┘
│ │ │ │
│ │ └─────────────┐ ┌─┴──────────────────────┐
▼ ▼ ▼ ▼ ▼
┌───────────────────────────┐ ┌ ─ ─ ─ ─ ─ ┐ ┌─────────────────────────┐ ┌ ─ ─ ─ ─ ─ ─ ─ ┐
│ Language Server │ Prisma │ PPG Dev Server Worker │ Remote Prisma
│ packages/language-server │ │ HTTP API │ │ dist/workers/ │ │ Postgres │
│ /src/server.ts │ (Cloud) │ ppgDevServer.js │ (Cloud)
│ │ └ ─ ─ ─ ─ ─ ┘ │ │ └ ─ ─ ─ ─ ─ ─ ─ ┘
│ ┌─────────────────────┐ │ │ ┌───────────────────┐ │
│ │ MessageHandler │ │ │ │ @prisma/dev │ │
│ │ Dispatches LSP │ │ │ │ Local PPG server │ │
│ │ requests │ │ │ │ │ │
│ └──────────┬──────────┘ │ │ │ ┌─────────────┐ │ │
│ │ │ │ │ │ pglite │ │ │
│ ▼ │ │ │ │ In-process │ │ │
│ ┌─────────────────────┐ │ │ │ │ PostgreSQL │ │ │
│ │ prisma-schema-wasm │ │ │ │ └─────────────┘ │ │
│ │ WASM module for │ │ │ └───────────────────┘ │
│ │ parsing/formatting │ │ │ │
│ └─────────────────────┘ │ │ • Detached process │
└───────────────────────────┘ │ • IPC communication │
│ • Survives restarts │
└─────────────────────────┘
The VS Code extension uses esbuild to bundle the extension, language server, and worker processes into optimized JavaScript bundles. See Build System for details on the bundling configuration and why certain assets cannot be bundled.
These are internal Prisma packages that provide core functionality:
| Package | Purpose | Bundled? |
|---|---|---|
@prisma/prisma-schema-wasm |
WASM module for parsing/formatting/linting | Partial¹ |
@prisma/schema-files-loader |
Handles loading multi-file Prisma schemas | Yes |
@prisma/config |
Loads prisma.config.ts configuration |
Yes |
@prisma/studio-core-licensed |
Prisma Studio UI (webview) | No² |
@prisma/dev |
Local Prisma Postgres development server | Partial³ |
prisma-6-language-server |
Pinned Prisma 6 language server | No⁴ |
¹ JS is bundled; WASM binary is copied separately (loaded at runtime via
__dirname)
² Served as static files to the webview at runtime; cannot be inlined into a bundle
³ Bundled into separate worker (dist/workers/ppgDevServer.js); PGlite
assets (pglite.data, pglite.wasm) are copied separately
⁴ Kept separate to support runtime switching between Prisma 6 and latest
language servers via the prisma.pinToPrisma6 setting
Note: These dependencies are updated by
.github/workflows/bump_prisma.yml, which pins them to a given Prisma CLI version and pushes the change.check_for_prisma_update.ymldispatches it when npm has a newer CLI, but its cron schedule is currently disabled, so both are manual dispatches today.release.ymlonly publishes; it never changes dependencies. See CI/CD.
packages/
├── language-server/
│ └── src/
│ ├── __test__/ # Tests and fixtures
│ │ ├── __fixtures__/ # .prisma test files
│ │ └── *.test.ts # Test files
│ ├── lib/
│ │ ├── ast/ # AST utilities
│ │ ├── code-actions/ # Quick fixes
│ │ ├── completions/ # Completion providers
│ │ ├── prisma-schema-wasm/ # WASM wrapper functions
│ │ ├── MessageHandler.ts # Main LSP request dispatcher
│ │ └── Schema.ts # PrismaSchema class
│ └── server.ts # LSP server entry point
│
└── vscode/
└── src/
├── __test__/ # Extension tests
├── plugins/ # Plugin modules
│ ├── ai-tools/
│ ├── prisma-language-server/
│ ├── prisma-postgres-manager/
│ └── prisma-studio/
├── workers/ # Separate process entry points
│ └── ppgDevServer.ts # Prisma Postgres local dev server
├── extension.ts # Extension entry point
└── util.ts # Shared utilities