peta-orm 0.1.4 → 0.1.5
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 +9 -0
- package/bin/peta +3 -0
- package/dist/index-k44fz2f4.js +9062 -0
- package/dist/index-vnnmp06s.js +7534 -0
- package/dist/index-z1w83f81.js +4 -0
- package/dist/index.js +541 -17627
- package/dist/migrations/cli.d.ts +2 -0
- package/dist/migrations/cli.d.ts.map +1 -0
- package/dist/migrations/config.d.ts +5 -0
- package/dist/migrations/config.d.ts.map +1 -0
- package/dist/migrations/generator.d.ts +9 -0
- package/dist/migrations/generator.d.ts.map +1 -0
- package/dist/migrations/index.d.ts +5 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +2369 -0
- package/dist/migrations/runner.d.ts +12 -0
- package/dist/migrations/runner.d.ts.map +1 -0
- package/dist/migrations/types.d.ts +26 -0
- package/dist/migrations/types.d.ts.map +1 -0
- package/dist/paginator-haxz1c66.js +8 -0
- package/package.json +20 -10
package/README.md
CHANGED
|
@@ -285,6 +285,13 @@ All self-contained (inline SQLite, run directly):
|
|
|
285
285
|
bun run examples/01-basic-setup.ts
|
|
286
286
|
bun run examples/04-relations.ts
|
|
287
287
|
bun run examples/07-soft-deletes.ts
|
|
288
|
+
|
|
289
|
+
# CLI — manage migrations
|
|
290
|
+
bun run bin/peta --help
|
|
291
|
+
bun run bin/peta migrate:init
|
|
292
|
+
bun run bin/peta migrate:generate CreateUsers
|
|
293
|
+
bun run bin/peta migrate:up
|
|
294
|
+
bun run bin/peta migrate:status
|
|
288
295
|
```
|
|
289
296
|
|
|
290
297
|
| # | Example | Topic |
|
|
@@ -309,6 +316,7 @@ bun run examples/07-soft-deletes.ts
|
|
|
309
316
|
| 18 | [advanced-queries](./examples/18-advanced-queries.ts) | groupBy/having, sum/avg/min/max, chunk, toSQL, updateMany |
|
|
310
317
|
| 19 | [collections-deep](./examples/19-collections-deep.ts) | full Collection + Paginator API |
|
|
311
318
|
| 20 | [advanced-relations](./examples/20-advanced-relations.ts) | HasManyThrough, polymorphic morphs, pivot extras |
|
|
319
|
+
| 21 | [migrations](./examples/21-migrations.ts) | MigrationRunner, MigrationGenerator, CLI |
|
|
312
320
|
|
|
313
321
|
---
|
|
314
322
|
|
|
@@ -325,6 +333,7 @@ bun run examples/07-soft-deletes.ts
|
|
|
325
333
|
| **Hooks** | `HookManager`, `on()`, `off()`, `trigger()` | `src/hooks/lifecycle.ts` |
|
|
326
334
|
| **Paginator** | `Paginator`, `.paginate()` | `src/pagination/Paginator.ts` |
|
|
327
335
|
| **Errors** | `ModelNotFoundError`, `RelationNotFoundError`, `ValidationError`, `DatabaseError` | `src/errors/errors.ts` |
|
|
336
|
+
| **Migrations** | `MigrationRunner`, `MigrationGenerator`, `defineConfig`, CLI (`peta migrate:*`) | `src/migrations/index.ts` (import from `peta-orm/migrator`) |
|
|
328
337
|
|
|
329
338
|
---
|
|
330
339
|
|
package/bin/peta
ADDED