@usebetterdev/tenant 0.5.0 → 0.5.2

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.
Files changed (2) hide show
  1. package/README.md +9 -5
  2. package/package.json +9 -8
package/README.md CHANGED
@@ -24,12 +24,16 @@ npm install -D @usebetterdev/tenant-cli
24
24
  npx @usebetterdev/tenant-cli init --database-url $DATABASE_URL
25
25
  ```
26
26
 
27
- This detects your tables and creates `better-tenant.config.json` interactively. Or create it manually:
27
+ This detects your tables and creates `better.config.ts` interactively. Or create it manually:
28
28
 
29
- ```json
30
- {
31
- "tenantTables": ["projects", "tasks"]
32
- }
29
+ ```ts
30
+ import { defineBetterConfig } from "@usebetterdev/plugin/config";
31
+
32
+ export default defineBetterConfig({
33
+ tenant: {
34
+ tenantTables: ["projects", "tasks"],
35
+ },
36
+ });
33
37
  ```
34
38
 
35
39
  ### 2. Generate and apply migration
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@usebetterdev/tenant",
3
3
  "description": "Multi-tenancy for Postgres in minutes. RLS-based tenant isolation, framework adapters (Hono, Express, Next.js), Drizzle and Prisma ORM support.",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
5
5
  "keywords": [
6
6
  "multi-tenancy",
7
7
  "postgres",
@@ -67,17 +67,18 @@
67
67
  "README.md"
68
68
  ],
69
69
  "dependencies": {
70
- "@usebetterdev/tenant-core": "0.5.0",
71
- "@usebetterdev/tenant-drizzle": "0.5.0",
72
- "@usebetterdev/tenant-express": "0.5.0",
73
- "@usebetterdev/tenant-hono": "0.5.0",
74
- "@usebetterdev/tenant-next": "0.5.0",
75
- "@usebetterdev/tenant-prisma": "0.5.0"
70
+ "@usebetterdev/tenant-core": "0.5.2",
71
+ "@usebetterdev/tenant-drizzle": "0.5.2",
72
+ "@usebetterdev/tenant-express": "0.5.2",
73
+ "@usebetterdev/tenant-hono": "0.5.2",
74
+ "@usebetterdev/tenant-next": "0.5.2",
75
+ "@usebetterdev/tenant-prisma": "0.5.2"
76
76
  },
77
77
  "devDependencies": {
78
78
  "tsup": "^8.3.5",
79
79
  "typescript": "~5.7.2",
80
- "vitest": "^2.1.6"
80
+ "vitest": "^2.1.6",
81
+ "@usebetterdev/test-utils": "^0.5.2"
81
82
  },
82
83
  "engines": {
83
84
  "node": ">=22"