@bungres/kit 0.6.1 → 0.7.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 +12 -3
- package/dist/cli.js +2508 -1151
- package/dist/commands/drop.d.ts.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/rollback.d.ts +3 -0
- package/dist/commands/rollback.d.ts.map +1 -0
- package/dist/commands/seed.d.ts.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/studio.d.ts.map +1 -1
- package/dist/commands/template.d.ts +2 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/commands/tusky.d.ts.map +1 -1
- package/dist/index.js +1754 -145
- package/package.json +4 -2
- package/dist/utils/colors.d.ts +0 -2
- package/dist/utils/colors.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -41,14 +41,15 @@ bun run bungres --help
|
|
|
41
41
|
| Command | Description |
|
|
42
42
|
|---|---|
|
|
43
43
|
| `bungres init` | Initialize bungres project with config file and db folder structure |
|
|
44
|
-
| `bungres generate` | Write a timestamped `.sql` migration file
|
|
45
|
-
| `bungres migrate` | Run pending `.sql`
|
|
44
|
+
| `bungres generate` | Write a single timestamped `.sql` migration file with UP/DOWN sections |
|
|
45
|
+
| `bungres migrate` | Run pending `.sql` UP sections, track applied in `__bungres_migrations` |
|
|
46
|
+
| `bungres rollback` | Automatically revert the last applied migration using its DOWN section |
|
|
46
47
|
| `bungres push` | Apply schema directly to DB — no files (great for dev/prototyping) |
|
|
47
48
|
| `bungres pull` | Introspect the DB and generate TypeScript schema |
|
|
48
49
|
| `bungres status` | Show applied vs pending migrations |
|
|
49
50
|
| `bungres fresh` | Drop all tables and re-run all migrations from scratch |
|
|
50
51
|
| `bungres refresh` | Truncate all tables to quickly reset data without dropping schema |
|
|
51
|
-
| `bungres seed` | Execute the seed script
|
|
52
|
+
| `bungres seed` | Execute the seed script, or run the Auto-Seeder using `@faker-js/faker` |
|
|
52
53
|
| `bungres studio` | Start a local web interface to browse database data |
|
|
53
54
|
| `bungres tusky` | Boot up a Node REPL connected to the database with schema loaded |
|
|
54
55
|
| `bungres drop` | Drop all tables defined in the schema (prompts for confirmation) |
|
|
@@ -59,6 +60,7 @@ bun run bungres --help
|
|
|
59
60
|
bun run bungres init
|
|
60
61
|
bun run bungres generate
|
|
61
62
|
bun run bungres migrate
|
|
63
|
+
bun run bungres rollback
|
|
62
64
|
bun run bungres push
|
|
63
65
|
bun run bungres pull
|
|
64
66
|
bun run bungres status
|
|
@@ -70,5 +72,12 @@ bun run bungres tusky
|
|
|
70
72
|
bun run bungres drop --force # skip confirmation
|
|
71
73
|
```
|
|
72
74
|
|
|
75
|
+
## Features ✨
|
|
76
|
+
|
|
77
|
+
- **Interactive UI**: Enjoy beautiful, interactive terminal prompts and spinners powered by `@clack/prompts`.
|
|
78
|
+
- **Drizzle-Style Diffs**: Before applying or generating migrations, visually inspect exactly what tables and columns will be added, dropped, or altered.
|
|
79
|
+
- **Rollbacks**: Single file migrations with `-- ==== UP ====` and `-- ==== DOWN ====` sections allow you to rollback your schema effortlessly.
|
|
80
|
+
- **Auto-Seeder**: Run `bungres seed` without a custom script to automatically generate mock data for your database using `@faker-js/faker`, resolving foreign key dependencies automatically!
|
|
81
|
+
|
|
73
82
|
## License
|
|
74
83
|
MIT
|