From 9931b3cfaa317b3f8001cccf91fafa7adbcd1fb3 Mon Sep 17 00:00:00 2001 From: Simon Gagnon Date: Sun, 9 Aug 2026 23:35:56 -0400 Subject: [PATCH] feat: add Vite cedarPgDev panel and status/studio CLI Give Vite+ consumers a lease status panel and shortcuts (d/p), plus cedarpg status/studio for non-Vite hosts, without acquiring inside the plugin. --- CHANGELOG.md | 6 ++ README.md | 17 ++++- package.json | 9 +++ pnpm-lock.yaml | 3 + src/adapters/studio.ts | 117 ++++++++++++++++++++++++++++++++ src/adapters/vite-dev-plugin.ts | 99 +++++++++++++++++++++++++++ src/adapters/vite-plus.ts | 11 ++- src/cli.ts | 82 ++++++++++++++++++++++ src/core/status.ts | 63 +++++++++++++++++ src/index.ts | 9 +++ tests/status.test.ts | 67 ++++++++++++++++++ tests/studio.test.ts | 81 ++++++++++++++++++++++ tests/vite-dev-plugin.test.ts | 56 +++++++++++++++ tests/vite-plus.test.ts | 6 ++ 14 files changed, 622 insertions(+), 4 deletions(-) create mode 100644 src/adapters/studio.ts create mode 100644 src/adapters/vite-dev-plugin.ts create mode 100644 src/core/status.ts create mode 100644 tests/status.test.ts create mode 100644 tests/studio.test.ts create mode 100644 tests/vite-dev-plugin.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index e1fa0f0..846f6f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +### Added + +- Vite plugin `cedarPgDev()` (`@cedarjs/pg/vite-plus`): status panel on listen + shortcuts `d` (status) / `p` (Prisma or Drizzle Studio) +- CLI: `cedarpg status` (human + `--json`) and `cedarpg studio` (`--prisma` / `--drizzle`) +- Public `resolveDevStatus` / `formatDevStatus` for scripting + ### Fixed - TEMPLATE `cloneWorkerDatabase`: default clone name is unique per call (`__