Skip to content

Commit

Permalink
feat(hono): change server context
Browse files Browse the repository at this point in the history
  • Loading branch information
cjquines committed Dec 18, 2024
1 parent c769f76 commit 72721d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/hono/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stl-api/hono",
"version": "0.1.0",
"version": "0.1.3",
"license": "ISC",
"description": "hono plugin for stainless api",
"author": "[email protected]",
Expand Down
6 changes: 3 additions & 3 deletions packages/hono/src/honoPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HonoRequest } from "hono";
import { Context } from "hono";
import { createMiddleware } from "hono/factory";
import { StatusCode } from "hono/utils/http-status";
import qs from "qs";
Expand All @@ -13,7 +13,7 @@ import { isValidRouteMatch, makeRouteMatcher } from "./routeMatcher";

export type HonoServerContext = {
type: "hono";
args: [HonoRequest, Response];
args: [Context];
};

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

const context = stl.initContext({
Expand Down

0 comments on commit 72721d2

Please sign in to comment.