@bungres/kit 0.1.1 → 0.4.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
@@ -19,18 +19,15 @@ bun add -d @bungres/kit
19
19
  Create a `bungres.config.ts` file at the root of your project:
20
20
 
21
21
  ```ts
22
- import type { BungresKitConfig } from "@bungres/kit";
23
-
24
- const config: BungresKitConfig = {
25
- // dbUrl: "postgres://...", // or set DATABASE_URL env var
26
- schema: "src/db/schema/**/*.ts",
27
- migrationsDir: "./migrations",
28
- outDir: "./src/db/generated",
29
- dbSchema: "public",
30
- verbose: false,
31
- };
32
-
33
- export default config;
22
+ import { defineConfig } from "@bungres/kit";
23
+
24
+ export default defineConfig({
25
+ schema: "./src/db/schema.ts",
26
+ out: "./bungres", // Directory for migrations & generated files
27
+ dbCredentials: {
28
+ url: process.env.DATABASE_URL!,
29
+ },
30
+ });
34
31
  ```
35
32
 
36
33
  ## Commands Overview
@@ -48,6 +45,11 @@ bun run bungres --help
48
45
  | `bungres push` | Apply schema directly to DB — no files (great for dev/prototyping) |
49
46
  | `bungres pull` | Introspect the DB and generate TypeScript schema |
50
47
  | `bungres status` | Show applied vs pending migrations |
48
+ | `bungres fresh` | Drop all tables and re-run all migrations from scratch |
49
+ | `bungres refresh` | Truncate all tables to quickly reset data without dropping schema |
50
+ | `bungres seed` | Execute the seed script to populate the database |
51
+ | `bungres studio` | Start a local web interface to browse database data |
52
+ | `bungres tusky` | Boot up a Node REPL connected to the database with schema loaded |
51
53
  | `bungres drop` | Drop all tables defined in the schema (prompts for confirmation) |
52
54
 
53
55
  ### Usage Examples
@@ -58,6 +60,11 @@ bun run bungres migrate
58
60
  bun run bungres push
59
61
  bun run bungres pull
60
62
  bun run bungres status
63
+ bun run bungres fresh
64
+ bun run bungres refresh
65
+ bun run bungres seed
66
+ bun run bungres studio
67
+ bun run bungres tusky
61
68
  bun run bungres drop --force # skip confirmation
62
69
  ```
63
70