Skip to content

Commit 9fe9554

Browse files
authored
Merge pull request #84 from stainless-api/cj/hono
feat(hono): change server context
2 parents c769f76 + 72721d2 commit 9fe9554

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/hono/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stl-api/hono",
3-
"version": "0.1.0",
3+
"version": "0.1.3",
44
"license": "ISC",
55
"description": "hono plugin for stainless api",
66
"author": "[email protected]",

packages/hono/src/honoPlugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { HonoRequest } from "hono";
1+
import { Context } from "hono";
22
import { createMiddleware } from "hono/factory";
33
import { StatusCode } from "hono/utils/http-status";
44
import qs from "qs";
@@ -13,7 +13,7 @@ import { isValidRouteMatch, makeRouteMatcher } from "./routeMatcher";
1313

1414
export type HonoServerContext = {
1515
type: "hono";
16-
args: [HonoRequest, Response];
16+
args: [Context];
1717
};
1818

1919
declare module "stainless" {
@@ -65,7 +65,7 @@ function makeHandler(endpoints: AnyEndpoint[], options?: StlAppOptions) {
6565
const [endpoint, path] = match[0][0];
6666
const server: HonoServerContext = {
6767
type: "hono",
68-
args: [c.req, c.res],
68+
args: [c],
6969
};
7070

7171
const context = stl.initContext({

0 commit comments

Comments
 (0)