@cosmicdrift/kumiko-framework 0.79.0 → 0.79.3

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": "@cosmicdrift/kumiko-framework",
3
- "version": "0.79.0",
3
+ "version": "0.79.3",
4
4
  "description": "Framework core — engine, pipeline, API, DB, and every other bit that makes Kumiko go.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -181,7 +181,7 @@
181
181
  "zod": "^4.4.3"
182
182
  },
183
183
  "devDependencies": {
184
- "@cosmicdrift/kumiko-dispatcher-live": "0.79.0",
184
+ "@cosmicdrift/kumiko-dispatcher-live": "0.79.3",
185
185
  "bun-types": "^1.3.13",
186
186
  "pino-pretty": "^13.1.3"
187
187
  },
@@ -88,6 +88,14 @@ export type RequestHelper = {
88
88
  user: SessionUser,
89
89
  extraHeaders: Record<string, string>,
90
90
  ) => Promise<Response>;
91
+ /** query + additional HTTP headers (e.g. X-Forwarded-For). Returns the raw
92
+ * Response so callers can assert on status + headers + body as needed. */
93
+ queryWithHeaders: (
94
+ type: string,
95
+ payload: unknown,
96
+ user: SessionUser,
97
+ extraHeaders: Record<string, string>,
98
+ ) => Promise<Response>;
91
99
  };
92
100
 
93
101
  export function createRequestHelper(app: Hono, jwt: JwtHelper): RequestHelper {
@@ -203,5 +211,10 @@ export function createRequestHelper(app: Hono, jwt: JwtHelper): RequestHelper {
203
211
  const authHeaders = await authHeader(user);
204
212
  return req("POST", "/api/write", { type, payload }, { ...authHeaders, ...extraHeaders });
205
213
  },
214
+
215
+ async queryWithHeaders(type, payload, user, extraHeaders) {
216
+ const authHeaders = await authHeader(user);
217
+ return req("POST", "/api/query", { type, payload }, { ...authHeaders, ...extraHeaders });
218
+ },
206
219
  };
207
220
  }