drizzle-multitenant 1.2.0 → 1.3.1

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
@@ -24,10 +24,13 @@
24
24
  | Feature | Description |
25
25
  |---------|-------------|
26
26
  | **Schema Isolation** | PostgreSQL schema-per-tenant with automatic LRU pool management |
27
- | **Context Propagation** | AsyncLocalStorage-based tenant context across your entire stack |
27
+ | **Shared Schema** | Full support for shared schema migrations and seeding (plans, roles, permissions) |
28
28
  | **Parallel Migrations** | Apply migrations to all tenants concurrently with progress tracking |
29
29
  | **Cross-Schema Queries** | Type-safe joins between tenant and shared tables |
30
- | **Connection Retry** | Automatic retry with exponential backoff for transient failures |
30
+ | **Schema Linting** | Validate schemas with 8 configurable rules (naming, conventions, security) |
31
+ | **Scaffolding** | Generate schemas, seeds, and migrations from templates |
32
+ | **Export/Import** | Export to JSON Schema, TypeScript types, or Mermaid ERD diagrams |
33
+ | **Observability** | Built-in Prometheus exporter with Express/Fastify integrations |
31
34
  | **Framework Support** | First-class Express, Fastify, and NestJS integrations |
32
35
 
33
36
  <br />
@@ -78,11 +81,23 @@ const users = await db.select().from(schema.users);
78
81
  ## CLI Commands
79
82
 
80
83
  ```bash
81
- npx drizzle-multitenant init # Interactive setup wizard
82
- npx drizzle-multitenant generate --name=users # Generate migration
84
+ # Setup & Migrations
85
+ npx drizzle-multitenant init --template=full # Enhanced setup wizard
86
+ npx drizzle-multitenant generate --name=users # Generate tenant migration
87
+ npx drizzle-multitenant generate:shared --name=plans # Generate shared migration
83
88
  npx drizzle-multitenant migrate --all # Apply to all tenants
89
+ npx drizzle-multitenant migrate:shared # Apply shared migrations
90
+
91
+ # Developer Tools
92
+ npx drizzle-multitenant scaffold:schema orders # Generate schema file
93
+ npx drizzle-multitenant lint # Validate schemas
94
+ npx drizzle-multitenant doctor # Diagnose configuration
95
+ npx drizzle-multitenant export --format=mermaid # Export ERD diagram
96
+
97
+ # Tenant Management
84
98
  npx drizzle-multitenant status # Check migration status
85
99
  npx drizzle-multitenant tenant:create --id=acme # Create new tenant
100
+ npx drizzle-multitenant seed:all # Seed shared + tenants
86
101
  ```
87
102
 
88
103
  <br />
@@ -168,14 +183,19 @@ export class UserService {
168
183
  <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/cli">CLI Commands</a></td>
169
184
  </tr>
170
185
  <tr>
171
- <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/frameworks/express">Express</a></td>
172
- <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/frameworks/fastify">Fastify</a></td>
173
- <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/frameworks/nestjs">NestJS</a></td>
186
+ <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/shared-schema">Shared Schema</a></td>
187
+ <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/scaffold">Scaffolding</a></td>
188
+ <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/schema-linting">Schema Linting</a></td>
174
189
  </tr>
175
190
  <tr>
191
+ <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/export-import">Export & Import</a></td>
176
192
  <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/cross-schema">Cross-Schema Queries</a></td>
177
193
  <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/advanced">Advanced Features</a></td>
178
- <td><a href="https://mateusflorez.github.io/drizzle-multitenant/api/reference">API Reference</a></td>
194
+ </tr>
195
+ <tr>
196
+ <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/frameworks/express">Express</a></td>
197
+ <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/frameworks/fastify">Fastify</a></td>
198
+ <td><a href="https://mateusflorez.github.io/drizzle-multitenant/guide/frameworks/nestjs">NestJS</a></td>
179
199
  </tr>
180
200
  </table>
181
201