prisma-pglite-bridge 0.7.0 → 1.0.0

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/README.md CHANGED
@@ -18,15 +18,15 @@ TypeScript users also need `@types/pg`.
18
18
  ## Quickstart
19
19
 
20
20
  ```typescript
21
- import { PGlite } from '@electric-sql/pglite';
22
- import { createPGliteBridge, pushMigrations } from 'prisma-pglite-bridge';
21
+ import { PGliteBridge, pushMigrations } from 'prisma-pglite-bridge';
23
22
  import { PrismaClient } from '@prisma/client';
24
23
  import seed from './seed.ts'; // user-provided: (prisma: PrismaClient) => Promise<void>
25
24
 
26
- const pglite = new PGlite();
27
- await pushMigrations(pglite, { migrationsPath: './prisma/migrations' });
25
+ const bridge = new PGliteBridge();
26
+ // Have prisma/migrations/? Use pushMigrations (shown).
27
+ // Only schema.prisma? Use pushSchema instead — see docs/api.md.
28
+ await pushMigrations(bridge.pglite, { migrationsPath: './prisma/migrations' });
28
29
 
29
- const bridge = await createPGliteBridge({ pglite });
30
30
  const prisma = new PrismaClient({ adapter: bridge.adapter });
31
31
  await seed(prisma);
32
32
  await bridge.snapshotDb();
@@ -49,6 +49,10 @@ fixtures, prototypes), see [Populating the
49
49
  database](./docs/api.md#populating-the-database) for the
50
50
  `pushSchema` alternative.
51
51
 
52
+ Running the Prisma CLI against this bridge (shadow DB for
53
+ `migrate dev`, `psql`, SQL GUIs)? See
54
+ [`PGliteServer`](./docs/server.md) for the TCP/Unix-socket front.
55
+
52
56
  ## Documentation
53
57
 
54
58
  - **[API reference](./docs/api.md)** — exports, options, return