@shivaedev/identity 0.25.0 → 0.26.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/CHANGELOG.md +10 -0
- package/dist/accountPreferences.d.ts +13 -13
- package/dist/accountPreferences.d.ts.map +1 -1
- package/dist/sessions.d.ts +4 -4
- package/dist/sessions.d.ts.map +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.26.0 - 2026-11-04
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `betterAuthMount` accepts `{ clientIp: "railway" }` to select `X-Real-IP` for session addresses and auth rate limiting, ignoring `X-Forwarded-For` and overriding `AUTH_CLIENT_IP_HEADER`. Forwarded addresses still require a peer allowed by `TRUSTED_PROXY`; otherwise, or without `X-Real-IP`, the connection address is used.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Require Effect 4.0.7 and its matching companion packages. Install the 4.0.7 Effect stack together.
|
|
12
|
+
|
|
3
13
|
## 0.25.0 - 2026-11-04
|
|
4
14
|
|
|
5
15
|
### Added
|
|
@@ -76,18 +76,6 @@ export declare const AccountPreferences: import("@shivaedev/contract/contract.ts
|
|
|
76
76
|
error: Schema.Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>;
|
|
77
77
|
middleware: Effect.Effect<import("#subject.ts").SubjectMiddleware<never, never>, never, import("#subject.ts").SubjectResolver>;
|
|
78
78
|
};
|
|
79
|
-
}, never> | import("effect/rpc/Rpc").Rpc<"identity.accountPreferences.set", Schema.Struct<{
|
|
80
|
-
readonly locale: Schema.NonEmptyString;
|
|
81
|
-
readonly timezone: Schema.String;
|
|
82
|
-
readonly units: Schema.Literals<readonly ["metric", "imperial"]>;
|
|
83
|
-
}>, Schema.Void, Schema.Union<readonly (typeof AuthUnavailable)[]>, import("effect/rpc/RpcMiddleware").ServiceClass<import("@shivaedev/contract/internal/subjectMiddleware.ts").SubjectMiddleware<{
|
|
84
|
-
error: Schema.Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>;
|
|
85
|
-
middleware: Effect.Effect<import("#subject.ts").SubjectMiddleware<never, never>, never, import("#subject.ts").SubjectResolver>;
|
|
86
|
-
}>, `@shivaedev/contract/Subject/${string}`, import("./identity.ts").Identity | import("./identity.ts").SessionUser | import("#subject.ts").Subject, Schema.Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, never, never, false> & {
|
|
87
|
-
"@shivaedev/contract/SubjectDeclaration": {
|
|
88
|
-
error: Schema.Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>;
|
|
89
|
-
middleware: Effect.Effect<import("#subject.ts").SubjectMiddleware<never, never>, never, import("#subject.ts").SubjectResolver>;
|
|
90
|
-
};
|
|
91
79
|
}, never> | import("effect/rpc/Rpc").Rpc<"identity.accountPreferences.get", Schema.Void, Schema.Struct<{
|
|
92
80
|
readonly locale: Schema.NonEmptyString;
|
|
93
81
|
readonly timezone: Schema.String;
|
|
@@ -108,5 +96,17 @@ export declare const AccountPreferences: import("@shivaedev/contract/contract.ts
|
|
|
108
96
|
error: Schema.Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>;
|
|
109
97
|
middleware: Effect.Effect<import("#subject.ts").SubjectMiddleware<never, never>, never, import("#subject.ts").SubjectResolver>;
|
|
110
98
|
};
|
|
111
|
-
}), never
|
|
99
|
+
}), never> | import("effect/rpc/Rpc").Rpc<"identity.accountPreferences.set", Schema.Struct<{
|
|
100
|
+
readonly locale: Schema.NonEmptyString;
|
|
101
|
+
readonly timezone: Schema.String;
|
|
102
|
+
readonly units: Schema.Literals<readonly ["metric", "imperial"]>;
|
|
103
|
+
}>, Schema.Void, Schema.Union<readonly (typeof AuthUnavailable)[]>, import("effect/rpc/RpcMiddleware").ServiceClass<import("@shivaedev/contract/internal/subjectMiddleware.ts").SubjectMiddleware<{
|
|
104
|
+
error: Schema.Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>;
|
|
105
|
+
middleware: Effect.Effect<import("#subject.ts").SubjectMiddleware<never, never>, never, import("#subject.ts").SubjectResolver>;
|
|
106
|
+
}>, `@shivaedev/contract/Subject/${string}`, import("./identity.ts").Identity | import("./identity.ts").SessionUser | import("#subject.ts").Subject, Schema.Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, never, never, false> & {
|
|
107
|
+
"@shivaedev/contract/SubjectDeclaration": {
|
|
108
|
+
error: Schema.Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>;
|
|
109
|
+
middleware: Effect.Effect<import("#subject.ts").SubjectMiddleware<never, never>, never, import("#subject.ts").SubjectResolver>;
|
|
110
|
+
};
|
|
111
|
+
}, never>, readonly [], undefined>;
|
|
112
112
|
//# sourceMappingURL=accountPreferences.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountPreferences.d.ts","sourceRoot":"","sources":["../src/accountPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAI1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,eAAO,MAAM,eAAe,eAE3B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;EAIlC,CAAC;AAEH,eAAO,MAAM,qBAAqB,8GAA2D,CAAC;AAE9F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"accountPreferences.d.ts","sourceRoot":"","sources":["../src/accountPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAI1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,eAAO,MAAM,eAAe,eAE3B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;EAIlC,CAAC;AAEH,eAAO,MAAM,qBAAqB,8GAA2D,CAAC;AAE9F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAsB7B,CAAC"}
|
package/dist/sessions.d.ts
CHANGED
|
@@ -108,7 +108,9 @@ export declare const Sessions: import("@shivaedev/contract/contract.ts").Contrac
|
|
|
108
108
|
"~ClientError": never;
|
|
109
109
|
error: Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired]>;
|
|
110
110
|
requiredForClient: false;
|
|
111
|
-
}), never> | import("effect/rpc/Rpc").Rpc<"identity.sessions.
|
|
111
|
+
}), never> | import("effect/rpc/Rpc").Rpc<"identity.sessions.revoke", Schema.Struct<{
|
|
112
|
+
id: Schema.String;
|
|
113
|
+
}>, Schema.Void, Schema.Union<readonly (typeof NotFound | typeof Forbidden | typeof AuthUnavailable)[]>, typeof SessionsPermission, never> | import("effect/rpc/Rpc").Rpc<"identity.sessions.list", Schema.Struct<{
|
|
112
114
|
readonly cursor: Schema.optionalKey<Schema.Struct<{
|
|
113
115
|
readonly id: Schema.String;
|
|
114
116
|
readonly lastActivityAt: Schema.DateTimeUtcFromString;
|
|
@@ -138,7 +140,5 @@ export declare const Sessions: import("@shivaedev/contract/contract.ts").Contrac
|
|
|
138
140
|
"~ClientError": never;
|
|
139
141
|
error: Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired]>;
|
|
140
142
|
requiredForClient: false;
|
|
141
|
-
}), never
|
|
142
|
-
id: Schema.String;
|
|
143
|
-
}>, Schema.Void, Schema.Union<readonly (typeof NotFound | typeof Forbidden | typeof AuthUnavailable)[]>, typeof SessionsPermission, never>, readonly [], undefined>;
|
|
143
|
+
}), never>, readonly [], undefined>;
|
|
144
144
|
//# sourceMappingURL=sessions.d.ts.map
|
package/dist/sessions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../src/sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIxC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAI5D,eAAO,MAAM,eAAe;;;;;;;;;;EAM1B,CAAC;AAEH,eAAO,MAAM,aAAa;;;EAAqF,CAAC;AAChH,eAAO,MAAM,gBAAgB;;;;;;EAG3B,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAA2G,CAAC;AAEpI,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../src/sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIxC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAI5D,eAAO,MAAM,eAAe;;;;;;;;;;EAM1B,CAAC;AAEH,eAAO,MAAM,aAAa;;;EAAqF,CAAC;AAChH,eAAO,MAAM,gBAAgB;;;;;;EAG3B,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAA2G,CAAC;AAEpI,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAiBY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/identity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Request identity, sessions, transport trust and permission enforcement for Effect RPC servers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"effect"
|
|
@@ -45,34 +45,34 @@
|
|
|
45
45
|
"README.md"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@shivaedev/access": "0.5.
|
|
49
|
-
"@shivaedev/changes": "0.10.
|
|
50
|
-
"@shivaedev/contract": "0.36.
|
|
51
|
-
"@shivaedev/errors": "0.9.
|
|
52
|
-
"@shivaedev/rate-limit": "0.5.
|
|
53
|
-
"@shivaedev/service": "0.7.
|
|
54
|
-
"@shivaedev/sql": "0.
|
|
48
|
+
"@shivaedev/access": "0.5.1",
|
|
49
|
+
"@shivaedev/changes": "0.10.1",
|
|
50
|
+
"@shivaedev/contract": "0.36.1",
|
|
51
|
+
"@shivaedev/errors": "0.9.1",
|
|
52
|
+
"@shivaedev/rate-limit": "0.5.1",
|
|
53
|
+
"@shivaedev/service": "0.7.1",
|
|
54
|
+
"@shivaedev/sql": "0.39.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@better-auth/oauth-provider": "1.7.14",
|
|
58
|
-
"@effect/platform-node": "4.0.
|
|
59
|
-
"@effect/sql-pg": "4.0.
|
|
60
|
-
"@shivaedev/admin": "0.20.
|
|
61
|
-
"@shivaedev/quality": "0.61.
|
|
62
|
-
"@shivaedev/server": "0.24.
|
|
63
|
-
"@shivaedev/test-kits": "0.
|
|
64
|
-
"@shivaedev/test-sql": "0.21.
|
|
65
|
-
"@shivaedev/test-story": "0.39.
|
|
58
|
+
"@effect/platform-node": "4.0.7",
|
|
59
|
+
"@effect/sql-pg": "4.0.7",
|
|
60
|
+
"@shivaedev/admin": "0.20.2",
|
|
61
|
+
"@shivaedev/quality": "0.61.1",
|
|
62
|
+
"@shivaedev/server": "0.24.2",
|
|
63
|
+
"@shivaedev/test-kits": "0.4.0",
|
|
64
|
+
"@shivaedev/test-sql": "0.21.1",
|
|
65
|
+
"@shivaedev/test-story": "0.39.1",
|
|
66
66
|
"@types/node": "24.19.2",
|
|
67
67
|
"better-auth": "1.7.14",
|
|
68
|
-
"effect": "4.0.
|
|
68
|
+
"effect": "4.0.7",
|
|
69
69
|
"typescript": "7.0.2",
|
|
70
70
|
"vitest": "5.0.5"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@better-auth/oauth-provider": "1.7.14",
|
|
74
74
|
"better-auth": "1.7.14",
|
|
75
|
-
"effect": "4.0.
|
|
75
|
+
"effect": "4.0.7"
|
|
76
76
|
},
|
|
77
77
|
"peerDependenciesMeta": {
|
|
78
78
|
"@better-auth/oauth-provider": {
|