@decocms/runtime 1.1.0 → 1.1.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/package.json +4 -4
- package/src/index.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/runtime",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"check": "tsc --noEmit",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@cloudflare/workers-types": "^4.20250617.0",
|
|
11
|
-
"@decocms/bindings": "1.0.
|
|
11
|
+
"@decocms/bindings": "1.0.7",
|
|
12
12
|
"@modelcontextprotocol/sdk": "1.25.1",
|
|
13
|
-
"@ai-sdk/provider": "^
|
|
13
|
+
"@ai-sdk/provider": "^3.0.0",
|
|
14
14
|
"hono": "^4.10.7",
|
|
15
15
|
"jose": "^6.0.11",
|
|
16
16
|
"zod": "^4.0.0"
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
}
|
|
37
|
-
}
|
|
37
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -105,6 +105,7 @@ export interface RequestContext<
|
|
|
105
105
|
}) => User | undefined;
|
|
106
106
|
callerApp?: string;
|
|
107
107
|
connectionId?: string;
|
|
108
|
+
organizationId?: string;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
const withDefaultBindings = ({
|
|
@@ -183,6 +184,7 @@ export const withBindings = <TEnv>({
|
|
|
183
184
|
state?: Record<string, unknown>;
|
|
184
185
|
meshUrl?: string;
|
|
185
186
|
connectionId?: string;
|
|
187
|
+
organizationId?: string;
|
|
186
188
|
}) ?? {};
|
|
187
189
|
|
|
188
190
|
context = {
|
|
@@ -191,6 +193,8 @@ export const withBindings = <TEnv>({
|
|
|
191
193
|
token: tokenOrContext,
|
|
192
194
|
meshUrl: (decoded.meshUrl as string) ?? metadata.meshUrl,
|
|
193
195
|
connectionId: (decoded.connectionId as string) ?? metadata.connectionId,
|
|
196
|
+
organizationId:
|
|
197
|
+
(decoded.organizationId as string) ?? metadata.organizationId,
|
|
194
198
|
ensureAuthenticated: AUTHENTICATED(decoded.user ?? decoded.sub),
|
|
195
199
|
} as RequestContext<any>;
|
|
196
200
|
} else if (typeof tokenOrContext === "object") {
|