@voltro/plugin-multitenancy 0.83.1 → 0.85.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.
@@ -5,66 +5,10 @@ property of its respective copyright holders and is used under the terms of
5
5
  its license. This file is provided for attribution; it grants no rights in
6
6
  @voltro/plugin-multitenancy itself, which is proprietary (see LICENSE).
7
7
 
8
- Generated from the resolved runtime dependency closure (7 packages).
8
+ Generated from the resolved runtime dependency closure (5 packages).
9
9
 
10
10
  ---
11
11
 
12
- ## @effect/experimental@0.61.1
13
-
14
- License: MIT
15
-
16
- ```
17
- MIT License
18
-
19
- Copyright (c) 2023-present The Contributors
20
-
21
- Permission is hereby granted, free of charge, to any person obtaining a copy
22
- of this software and associated documentation files (the "Software"), to deal
23
- in the Software without restriction, including without limitation the rights
24
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25
- copies of the Software, and to permit persons to whom the Software is
26
- furnished to do so, subject to the following conditions:
27
-
28
- The above copyright notice and this permission notice shall be included in all
29
- copies or substantial portions of the Software.
30
-
31
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
- SOFTWARE.
38
- ```
39
-
40
- ## @effect/sql@0.52.1
41
-
42
- License: MIT
43
-
44
- ```
45
- MIT License
46
-
47
- Copyright (c) 2023-present The Contributors
48
-
49
- Permission is hereby granted, free of charge, to any person obtaining a copy
50
- of this software and associated documentation files (the "Software"), to deal
51
- in the Software without restriction, including without limitation the rights
52
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53
- copies of the Software, and to permit persons to whom the Software is
54
- furnished to do so, subject to the following conditions:
55
-
56
- The above copyright notice and this permission notice shall be included in all
57
- copies or substantial portions of the Software.
58
-
59
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
65
- SOFTWARE.
66
- ```
67
-
68
12
  ## jose@6.2.12
69
13
 
70
14
  License: MIT
package/dist/guard.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Schema } from 'effect';
2
2
  import { Subject } from '@voltro/protocol';
3
+ import { YieldableError } from 'effect/Cause';
3
4
 
4
5
  /**
5
6
  * Guard a tenant-scoped mutation against cross-tenant spoofing. Throws
@@ -44,11 +45,9 @@ export declare const assertOwnTenant: (inputTenantId: string, subject: Subject)
44
45
  export declare class TenantMismatch extends TenantMismatch_base {
45
46
  }
46
47
 
47
- declare const TenantMismatch_base: Schema.TaggedErrorClass<TenantMismatch, "TenantMismatch", {
48
- readonly _tag: Schema.tag<"TenantMismatch">;
49
- } & {
48
+ declare const TenantMismatch_base: Schema.Class<TenantMismatch, Schema.TaggedStruct<"TenantMismatch", {
50
49
  /** The tenant the input claimed. */
51
- inputTenantId: typeof Schema.String;
50
+ readonly inputTenantId: Schema.String;
52
51
  /**
53
52
  * The tenant the resolved subject actually belongs to. Empty
54
53
  * string for anonymous subjects that have no tenant scope at all —
@@ -57,7 +56,7 @@ declare const TenantMismatch_base: Schema.TaggedErrorClass<TenantMismatch, "Tena
57
56
  * the error schema is a flat struct of strings — easier on the
58
57
  * wire encoder.)
59
58
  */
60
- subjectTenantId: typeof Schema.String;
61
- }>;
59
+ readonly subjectTenantId: Schema.String;
60
+ }>, YieldableError>;
62
61
 
63
62
  export { }
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { MixinDefinition } from '@voltro/database';
4
4
  import { MixinFields } from '@voltro/database';
5
5
  import { Schema } from 'effect';
6
6
  import { Subject } from '@voltro/protocol';
7
+ import { YieldableError } from 'effect/Cause';
7
8
 
8
9
  /**
9
10
  * Guard a tenant-scoped mutation against cross-tenant spoofing. Throws
@@ -54,11 +55,9 @@ declare type TenantFields = {
54
55
  export declare class TenantMismatch extends TenantMismatch_base {
55
56
  }
56
57
 
57
- declare const TenantMismatch_base: Schema.TaggedErrorClass<TenantMismatch, "TenantMismatch", {
58
- readonly _tag: Schema.tag<"TenantMismatch">;
59
- } & {
58
+ declare const TenantMismatch_base: Schema.Class<TenantMismatch, Schema.TaggedStruct<"TenantMismatch", {
60
59
  /** The tenant the input claimed. */
61
- inputTenantId: typeof Schema.String;
60
+ readonly inputTenantId: Schema.String;
62
61
  /**
63
62
  * The tenant the resolved subject actually belongs to. Empty
64
63
  * string for anonymous subjects that have no tenant scope at all —
@@ -67,7 +66,7 @@ declare const TenantMismatch_base: Schema.TaggedErrorClass<TenantMismatch, "Tena
67
66
  * the error schema is a flat struct of strings — easier on the
68
67
  * wire encoder.)
69
68
  */
70
- subjectTenantId: typeof Schema.String;
71
- }>;
69
+ readonly subjectTenantId: Schema.String;
70
+ }>, YieldableError>;
72
71
 
73
72
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/plugin-multitenancy",
3
- "version": "0.83.1",
3
+ "version": "0.85.0",
4
4
  "description": "Multi-tenancy plugin — ships the `tenant()` schema mixin (auto-scopes reads, fills tenantId on inserts) plus the `assertOwnTenant` write-guard and `TenantMismatch` typed error.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -43,12 +43,12 @@
43
43
  "node": ">=24.0.0"
44
44
  },
45
45
  "dependencies": {
46
- "@voltro/database": "0.83.1",
47
- "@voltro/plugin-audit": "0.83.1",
48
- "@voltro/protocol": "0.83.1"
46
+ "@voltro/database": "0.85.0",
47
+ "@voltro/plugin-audit": "0.85.0",
48
+ "@voltro/protocol": "0.85.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "effect": "^3.22.2"
51
+ "effect": "4.0.1"
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public"