@zerotal/tenancy 1.7.4 → 1.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerotal/tenancy",
3
- "version": "1.7.4",
3
+ "version": "1.8.0",
4
4
  "license": "MIT",
5
5
  "maturity": "stable",
6
6
  "private": false,
@@ -30,8 +30,8 @@
30
30
  "typecheck": "tsc --noEmit"
31
31
  },
32
32
  "dependencies": {
33
- "@zerotal/core": "1.7.4",
34
- "@zerotal/orm": "1.7.4"
33
+ "@zerotal/core": "1.8.0",
34
+ "@zerotal/orm": "1.8.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "typescript": "^5.8.0"
@@ -4,14 +4,16 @@
4
4
  * 1. Binds the tenancy config to the container under the `'tenancy'` key.
5
5
  * 2. Configures TenancyMiddleware with the resolved config so it can resolve
6
6
  * tenants without needing the container on every request.
7
+ * 3. Registers that middleware globally. Apps never do this themselves —
8
+ * TenancyMiddleware is not exported, and one registered twice would resolve
9
+ * the tenant twice. Gate individual routes with EnsureTenancyMiddleware.
7
10
  *
8
11
  * @example
9
12
  * // bootstrap/app.ts
10
13
  * import { TenancyProvider } from '@zerotal/tenancy';
11
14
  *
12
15
  * Application.create()
13
- * .register([TenancyProvider, /* … *\/])
14
- * .use([TenancyMiddleware]); // or attach per-route-group
16
+ * .register([TenancyProvider, /* … *\/]);
15
17
  */
16
18
 
17
19
  import { ServiceProvider } from "@zerotal/core";