@thednp/rpc 0.3.1 → 0.3.2
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 +12 -0
- package/dist/express/express.d.mts +4 -4
- package/dist/express/express.d.mts.map +1 -1
- package/dist/fastify/fastify.d.mts +5 -5
- package/dist/fastify/fastify.d.mts.map +1 -1
- package/dist/h3/h3.d.mts +5 -5
- package/dist/h3/h3.d.mts.map +1 -1
- package/dist/hono/hono.d.mts +4 -4
- package/dist/hono/hono.d.mts.map +1 -1
- package/dist/koa/koa.d.mts +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.2] - 2026-08-25
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **Adapter framework type re-exports** (`src/{express,fastify,h3,hono,koa}/types.d.ts`): each adapter now re-exports its framework's core types so consumers can annotate apps/handlers without a direct `express`/`fastify`/`h3`/`hono`/`koa` devDependency — `Express`/`ExpressRequest`/`ExpressResponse`/`ExpressNext` (`src/express/types.d.ts:84`), `Fastify`/`FastifyRequest`/`FastifyReply` (`src/fastify/types.d.ts:73`), `H3`/`H3Event`/`H3Middleware` (`src/h3/types.d.ts:44`), `Hono`/`HonoContext`/`HonoMiddlewareHandler` (`src/hono/types.d.ts:35`), `KoaContext`/`KoaNext` (`src/koa/types.d.ts:46`). Rebuilt `dist/*/*.d.mts` updated; no runtime change, pure type ergonomics
|
|
8
|
+
|
|
9
|
+
### Chores
|
|
10
|
+
|
|
11
|
+
- Bump version to `0.3.2` (`package.json`, `deno.json`)
|
|
12
|
+
- Dep bumps: `hono ^4.13.3` → `^4.13.4`, `@types/node ^26.2.0` → `^26.3.0`; `pnpm-workspace.yaml` adds `@types/node@26.3.0` to `minimumReleaseAgeExclude`
|
|
13
|
+
- `pnpm-lock.yaml` / `deno.lock` refreshed; `dist/*/*.d.mts.map` rebuilt
|
|
14
|
+
|
|
3
15
|
## [0.3.1] - 2026-08-21
|
|
4
16
|
|
|
5
17
|
### Breaking Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Connect, ViteDevServer } from "vite";
|
|
2
2
|
import { BodyResult, JsonValue, MiddlewareOptions, RpcPluginOptions } from "@thednp/rpc";
|
|
3
3
|
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "node:http";
|
|
4
|
-
import { Express, NextFunction, Request, Response } from "express";
|
|
4
|
+
import { Express, Express as Express$1, NextFunction, NextFunction as ExpressNext, Request, Request as ExpressRequest, Response, Response as ExpressResponse } from "express";
|
|
5
5
|
//#region src/express/types.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Express-specific middleware options, constrained to the `"express"` adapter.
|
|
@@ -82,13 +82,13 @@ declare const createRPCMiddleware: ExpressMiddlewareFn;
|
|
|
82
82
|
* Dynamically imports loadRPCConfig and creates the middleware with loaded options.
|
|
83
83
|
* @param app - Express application instance
|
|
84
84
|
*/
|
|
85
|
-
declare function attachRPC(app: Express): Promise<void>;
|
|
85
|
+
declare function attachRPC(app: Express$1): Promise<void>;
|
|
86
86
|
/**
|
|
87
87
|
* Attaches Vite's dev server middlewares to an Express app for development mode.
|
|
88
88
|
* @param app - Express application instance
|
|
89
89
|
* @param vite - Running Vite dev server
|
|
90
90
|
*/
|
|
91
|
-
declare function attachVite(app: Express, vite: ViteDevServer): void;
|
|
91
|
+
declare function attachVite(app: Express$1, vite: ViteDevServer): void;
|
|
92
92
|
/**
|
|
93
93
|
* Reads and parses the HTTP request body from an Express or Node IncomingMessage.
|
|
94
94
|
* If a body parser middleware (e.g. express.json()) already consumed the stream,
|
|
@@ -143,5 +143,5 @@ declare const getRequestDetails: (request: Request | IncomingMessage) => Request
|
|
|
143
143
|
*/
|
|
144
144
|
declare const getResponseDetails: (response: Response | ServerResponse) => ResponseDetails;
|
|
145
145
|
//#endregion
|
|
146
|
-
export { type ExpressMiddlewareFn, type ExpressMiddlewareHooks, type ExpressMiddlewareOptions, type RequestDetails, type ResponseDetails, attachRPC, attachVite, createMiddleware, createRPCMiddleware, getRequestDetails, getResponseDetails, hasPreParsedBody, isExpressRequest, isExpressResponse, readBody, redirect };
|
|
146
|
+
export { type Express, type ExpressMiddlewareFn, type ExpressMiddlewareHooks, type ExpressMiddlewareOptions, type ExpressNext, type ExpressRequest, type ExpressResponse, type RequestDetails, type ResponseDetails, attachRPC, attachVite, createMiddleware, createRPCMiddleware, getRequestDetails, getResponseDetails, hasPreParsedBody, isExpressRequest, isExpressResponse, readBody, redirect };
|
|
147
147
|
//# sourceMappingURL=express.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"express.d.mts","names":[],"sources":["../../src/express/types.d.ts","../../src/express/createMiddleware.ts","../../src/express/helpers.ts"],"mappings":";;;;;;;;KAgBY,2BAA2B;;;;;KAM3B,uBACV,UAAU,yCAEV,iBAAiB,QAAQ,8BACtB;;;;UAKY;;;;;;;EAOf,UACE,KAAK,kBAAkB,SACvB,KAAK,iBAAiB,UACtB,MAAM,QAAQ,eAAe,iBAC1B;;;;;;KAOK;;EAEV;;EAEA,YAAY,cAAc;;EAE1B;;EAEA,gBAAgB;;EAEhB,eAAe,cAAc,QAAQ;;;;;KAM3B;;EAEV;;EAEA;;EAEA,cAAc;;EAEd,SAAS;;EAET;;;;;;;;;;;cCrBW,kBAAkB;;;;;;;;;;cAiFlB,qBAAqB;;;;;;;;iBCpHZ,UAAU,KAAK,
|
|
1
|
+
{"version":3,"file":"express.d.mts","names":[],"sources":["../../src/express/types.d.ts","../../src/express/createMiddleware.ts","../../src/express/helpers.ts"],"mappings":";;;;;;;;KAgBY,2BAA2B;;;;;KAM3B,uBACV,UAAU,yCAEV,iBAAiB,QAAQ,8BACtB;;;;UAKY;;;;;;;EAOf,UACE,KAAK,kBAAkB,SACvB,KAAK,iBAAiB,UACtB,MAAM,QAAQ,eAAe,iBAC1B;;;;;;KAOK;;EAEV;;EAEA,YAAY,cAAc;;EAE1B;;EAEA,gBAAgB;;EAEhB,eAAe,cAAc,QAAQ;;;;;KAM3B;;EAEV;;EAEA;;EAEA,cAAc;;EAEd,SAAS;;EAET;;;;;;;;;;;cCrBW,kBAAkB;;;;;;;;;;cAiFlB,qBAAqB;;;;;;;;iBCpHZ,UAAU,KAAK,YAAO;;;;;;iBAc5B,WAAW,KAAK,WAAS,MAAM;;;;;;;;cAWlC,WAAQ,KACd,UAAiB,oBACrB,QAAQ;;;;;;cAqFE,mBAAgB,KACtB,kBAAkB,YACtB,OAAO;;;;;;cASG,oBAAiB,KACvB,iBAAiB,aACrB,OAAO;;;;;;;;;;;;cAeG,WAAQ,KACd,iBAAiB,UAAe,kBACrB;;;;;;;cAkBL,mBAAgB,KACtB,kBAAkB,YACtB,OAAO;;;;;;;cAUG,oBAAiB,SACnB,UAAiB,oBACzB;;;;;;;cAqBU,qBAAkB,UACnB,WAAkB,mBAC3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fp from "fastify-plugin";
|
|
2
|
-
import { FastifyInstance, FastifyReply, FastifyRequest, HookHandlerDoneFunction } from "fastify";
|
|
2
|
+
import { FastifyInstance, FastifyInstance as Fastify, FastifyReply, FastifyReply as FastifyReply$1, FastifyRequest, FastifyRequest as FastifyRequest$1, HookHandlerDoneFunction } from "fastify";
|
|
3
3
|
import { MiddlewareOptions, RpcPluginOptions } from "@thednp/rpc";
|
|
4
4
|
import { ViteDevServer } from "vite";
|
|
5
5
|
import "express";
|
|
@@ -48,7 +48,7 @@ interface FastifyMiddlewareHooks {
|
|
|
48
48
|
* @param res - Fastify reply object
|
|
49
49
|
* @param done - Fastify hook completion callback
|
|
50
50
|
*/
|
|
51
|
-
handler: (req: FastifyRequest, res: FastifyReply, done: HookHandlerDoneFunction) => Promise<void>;
|
|
51
|
+
handler: (req: FastifyRequest$1, res: FastifyReply$1, done: HookHandlerDoneFunction) => Promise<void>;
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/fastify/createMiddleware.d.ts
|
|
@@ -125,7 +125,7 @@ declare function attachVite(app: FastifyInstance, vite: ViteDevServer): void;
|
|
|
125
125
|
* @param req - Fastify request object
|
|
126
126
|
* @returns A promise resolving to the parsed body with its content type
|
|
127
127
|
*/
|
|
128
|
-
declare const readBody: (req: FastifyRequest) => Promise<BodyResult>;
|
|
128
|
+
declare const readBody: (req: FastifyRequest$1) => Promise<BodyResult>;
|
|
129
129
|
/**
|
|
130
130
|
* Issues an HTTP redirect on a Fastify reply using the native
|
|
131
131
|
* `reply.redirect(location, status)` API (Fastify v5 signature: destination
|
|
@@ -135,7 +135,7 @@ declare const readBody: (req: FastifyRequest) => Promise<BodyResult>;
|
|
|
135
135
|
* @param location - The URL to redirect to
|
|
136
136
|
* @param status - HTTP status code, defaults to 303
|
|
137
137
|
*/
|
|
138
|
-
declare const redirect: (reply: FastifyReply, location: string, status?: number) => void;
|
|
138
|
+
declare const redirect: (reply: FastifyReply$1, location: string, status?: number) => void;
|
|
139
139
|
//#endregion
|
|
140
|
-
export { type FastifyMiddlewareFn, type FastifyMiddlewareHooks, type FastifyMiddlewareOptions, type FastifyPlugin, type FastifyRPCPlugin, type RegisteredFastifyRPCPlugin, type RpcFastifyPluginOptions, attachRPC, attachVite, createMiddleware, createRPCMiddleware, readBody, redirect };
|
|
140
|
+
export { type Fastify, type FastifyMiddlewareFn, type FastifyMiddlewareHooks, type FastifyMiddlewareOptions, type FastifyPlugin, type FastifyRPCPlugin, type FastifyReply, type FastifyRequest, type RegisteredFastifyRPCPlugin, type RpcFastifyPluginOptions, attachRPC, attachVite, createMiddleware, createRPCMiddleware, readBody, redirect };
|
|
141
141
|
//# sourceMappingURL=fastify.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastify.d.mts","names":[],"sources":["../../src/fastify/types.d.ts","../../src/fastify/createMiddleware.ts","../../src/types.d.ts","../../src/fastify/helpers.ts"],"mappings":";;;;;;;;;;;;;;;KAYY,oBACV,SAAS,iBACT,gBAAgB,QAAQ,+BACxB;;;;KAMU,uBAAuB;;;;KAKvB,6BAA6B,WAAW;;;;KAKxC,0BAA0B;;EAEpC;;;;;KAMU,2BAA2B;;;;;KAM3B,uBACV,UAAU,yCAEV,iBAAiB,QAAQ,8BACtB;;;;UAKY;;;;;;;EAOf,UACE,KAAK,
|
|
1
|
+
{"version":3,"file":"fastify.d.mts","names":[],"sources":["../../src/fastify/types.d.ts","../../src/fastify/createMiddleware.ts","../../src/types.d.ts","../../src/fastify/helpers.ts"],"mappings":";;;;;;;;;;;;;;;KAYY,oBACV,SAAS,iBACT,gBAAgB,QAAQ,+BACxB;;;;KAMU,uBAAuB;;;;KAKvB,6BAA6B,WAAW;;;;KAKxC,0BAA0B;;EAEpC;;;;;KAMU,2BAA2B;;;;;KAM3B,uBACV,UAAU,yCAEV,iBAAiB,QAAQ,8BACtB;;;;UAKY;;;;;;;EAOf,UACE,KAAK,kBACL,KAAK,gBACL,MAAM,4BACH;;;;;;;;;;cClBM,kBAAkB;;;;;;;;cAuFlB,qBAAqB;;;;;;KCtDtB;EACN;EAAiC,MAAM;;EACvC;EAA2B;;EAE7B;EACA,MAAM;;EAEJ;EAAoC,MAAM;;;;;;KAmCpC;;;;KAIA;GAAgB,cAAc,YAAY;;;;;KAI1C,aAAa,WAAW;;;;KAIxB,YAAY,gBAAgB,YAAY;;;;;;;;iBCzH9B,UAAU,KAAK,kBAAe;;;;;;;iBAepC,WAAW,KAAK,iBAAiB,MAAM;;;;;;;cAgB1C,WAAQ,KACd,qBACJ,QAAQ;;;;;;;;;;cAoFE,WAAQ,OACZ,gBAAY,kBACH"}
|
package/dist/h3/h3.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H3, H3Event, HTTPResponse, Middleware } from "h3";
|
|
1
|
+
import { H3, H3 as H3$1, H3Event, H3Event as H3Event$1, HTTPResponse, Middleware, Middleware as H3Middleware } from "h3";
|
|
2
2
|
import { BodyResult, MiddlewareOptions, RpcPluginOptions } from "@thednp/rpc";
|
|
3
3
|
import { ViteDevServer } from "vite";
|
|
4
4
|
//#region src/h3/types.d.ts
|
|
@@ -25,11 +25,11 @@ type H3MiddlewareFn = <A extends RpcPluginOptions["adapter"] = "h3">(initialOpti
|
|
|
25
25
|
/**
|
|
26
26
|
* h3 application reference used by helpers that attach middleware to an app.
|
|
27
27
|
*/
|
|
28
|
-
type H3App = H3;
|
|
28
|
+
type H3App = H3$1;
|
|
29
29
|
/**
|
|
30
30
|
* h3 event extended with an optional pre-parsed body.
|
|
31
31
|
*/
|
|
32
|
-
type H3EventWithBody = H3Event & {
|
|
32
|
+
type H3EventWithBody = H3Event$1 & {
|
|
33
33
|
body?: unknown;
|
|
34
34
|
};
|
|
35
35
|
//#endregion
|
|
@@ -79,7 +79,7 @@ declare const viteMiddleware: (vite: ViteDevServer) => Middleware;
|
|
|
79
79
|
* @param event - h3 event object
|
|
80
80
|
* @returns A promise resolving to the parsed body with its content type
|
|
81
81
|
*/
|
|
82
|
-
declare const readBody: (event: H3Event) => Promise<BodyResult>;
|
|
82
|
+
declare const readBody: (event: H3Event$1) => Promise<BodyResult>;
|
|
83
83
|
/**
|
|
84
84
|
* Issues an HTTP redirect. h3's `redirect()` returns an `HTTPResponse`
|
|
85
85
|
* object that the handler must return (it never writes directly). Defaults
|
|
@@ -90,5 +90,5 @@ declare const readBody: (event: H3Event) => Promise<BodyResult>;
|
|
|
90
90
|
*/
|
|
91
91
|
declare const redirect: (location: string, status?: number) => HTTPResponse;
|
|
92
92
|
//#endregion
|
|
93
|
-
export { type H3App, type H3EventWithBody, type H3MiddlewareFn, type H3MiddlewareHooks, type H3MiddlewareOptions, attachRPC, attachVite, createMiddleware, createRPCMiddleware, readBody, redirect, viteMiddleware };
|
|
93
|
+
export { type H3, type H3App, type H3Event, type H3EventWithBody, type H3Middleware, type H3MiddlewareFn, type H3MiddlewareHooks, type H3MiddlewareOptions, attachRPC, attachVite, createMiddleware, createRPCMiddleware, readBody, redirect, viteMiddleware };
|
|
94
94
|
//# sourceMappingURL=h3.d.mts.map
|
package/dist/h3/h3.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h3.d.mts","names":[],"sources":["../../src/h3/types.d.ts","../../src/h3/createMiddleware.ts","../../src/h3/helpers.ts"],"mappings":";;;;;;;KAOY,sBAAsB;;;;UAKjB;;;;;;EAMf,SAAS;;;;;;KAOC,kBAAkB,UAAU,oCACtC,iBAAiB,QAAQ,yBACtB;;;;KAKO,QAAQ;;;;KAKR,kBAAkB;EAAY;;;;;;;;;;;cCG7B,kBAAkB;;;;;;;;cA4ElB,qBAAqB;;;;;;;;iBCtGZ,UAAU,KAAK,QAAK;;;;;;;cAgB7B,aAAU,KAAS,OAAK,MAAQ;;;;;;;;cAWhC,iBAAc,MAAU,kBAAgB;;;;;;;cA6ExC,WAAQ,OAAiB,
|
|
1
|
+
{"version":3,"file":"h3.d.mts","names":[],"sources":["../../src/h3/types.d.ts","../../src/h3/createMiddleware.ts","../../src/h3/helpers.ts"],"mappings":";;;;;;;KAOY,sBAAsB;;;;UAKjB;;;;;;EAMf,SAAS;;;;;;KAOC,kBAAkB,UAAU,oCACtC,iBAAiB,QAAQ,yBACtB;;;;KAKO,QAAQ;;;;KAKR,kBAAkB;EAAY;;;;;;;;;;;cCG7B,kBAAkB;;;;;;;;cA4ElB,qBAAqB;;;;;;;;iBCtGZ,UAAU,KAAK,QAAK;;;;;;;cAgB7B,aAAU,KAAS,OAAK,MAAQ;;;;;;;;cAWhC,iBAAc,MAAU,kBAAgB;;;;;;;cA6ExC,WAAQ,OAAiB,cAAU,QAAQ;;;;;;;;;cAmC3C,WAAQ,kBACH,oBAEf"}
|
package/dist/hono/hono.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMiddleware as createMiddleware$1 } from "hono/factory";
|
|
2
|
-
import { Context, Hono, MiddlewareHandler } from "hono";
|
|
2
|
+
import { Context, Context as HonoContext, Hono, Hono as Hono$1, MiddlewareHandler, MiddlewareHandler as HonoMiddlewareHandler } from "hono";
|
|
3
3
|
import { IncomingMessage } from "node:http";
|
|
4
4
|
import { BodyResult, MiddlewareOptions, RpcPluginOptions } from "@thednp/rpc";
|
|
5
5
|
import { HttpBindings } from "@hono/node-server";
|
|
@@ -53,14 +53,14 @@ declare const createRPCMiddleware: HonoMiddlewareFn;
|
|
|
53
53
|
* Dynamically imports loadRPCConfig and registers the middleware.
|
|
54
54
|
* @param app - Hono application instance
|
|
55
55
|
*/
|
|
56
|
-
declare function attachRPC(app: Hono): Promise<void>;
|
|
56
|
+
declare function attachRPC(app: Hono$1): Promise<void>;
|
|
57
57
|
/**
|
|
58
58
|
* Attaches Vite's dev server middlewares to a Hono app for development mode.
|
|
59
59
|
* Uses the viteMiddleware wrapper to bridge Vite's Connect-compatible stack into Hono.
|
|
60
60
|
* @param app - Hono application instance
|
|
61
61
|
* @param vite - Running Vite dev server
|
|
62
62
|
*/
|
|
63
|
-
declare const attachVite: (app: Hono, vite: ViteDevServer) => void;
|
|
63
|
+
declare const attachVite: (app: Hono$1, vite: ViteDevServer) => void;
|
|
64
64
|
/**
|
|
65
65
|
* Creates a Hono-compatible middleware from a Vite dev server middleware stack.
|
|
66
66
|
* Bridges the Connect/Express middleware interface to Hono's context-based request/response model.
|
|
@@ -91,5 +91,5 @@ declare const readBody: (c: Context) => Promise<BodyResult>;
|
|
|
91
91
|
*/
|
|
92
92
|
declare const redirect: (c: Context, location: string, status?: RedirectStatusCode) => Response;
|
|
93
93
|
//#endregion
|
|
94
|
-
export { type HonoMiddlewareFn, type HonoMiddlewareHooks, type HonoMiddlewareOptions, type IncomingWithBody, attachRPC, attachVite, createMiddleware, createRPCMiddleware, readBody, redirect, viteMiddleware };
|
|
94
|
+
export { type Hono, type HonoContext, type HonoMiddlewareFn, type HonoMiddlewareHandler, type HonoMiddlewareHooks, type HonoMiddlewareOptions, type IncomingWithBody, attachRPC, attachVite, createMiddleware, createRPCMiddleware, readBody, redirect, viteMiddleware };
|
|
95
95
|
//# sourceMappingURL=hono.d.mts.map
|
package/dist/hono/hono.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hono.d.mts","names":[],"sources":["../../src/hono/types.d.ts","../../src/hono/createMiddleware.ts","../../src/hono/helpers.ts"],"mappings":";;;;;;;;;;;KAOY,mBAAmB;EAAoB;;;;;KAKvC,wBAAwB;;;;UAKnB;;EAEf,SAAS;;;;;;KAOC,oBAAoB,UAAU,sCACxC,iBAAiB,QAAQ,kBAAkB,QACxC;;;;;;;;;;cCkBQ,kBAAkB;;;;;;;;cAgFlB,qBAAqB;;;;;;;;iBC3GZ,UAAU,KAAK,
|
|
1
|
+
{"version":3,"file":"hono.d.mts","names":[],"sources":["../../src/hono/types.d.ts","../../src/hono/createMiddleware.ts","../../src/hono/helpers.ts"],"mappings":";;;;;;;;;;;KAOY,mBAAmB;EAAoB;;;;;KAKvC,wBAAwB;;;;UAKnB;;EAEf,SAAS;;;;;;KAOC,oBAAoB,UAAU,sCACxC,iBAAiB,QAAQ,kBAAkB,QACxC;;;;;;;;;;cCkBQ,kBAAkB;;;;;;;;cAgFlB,qBAAqB;;;;;;;;iBC3GZ,UAAU,KAAK,SAAI;;;;;;;cAgB5B,aAAU,KAAS,QAAI,MAAQ;;;;;;;;;cAY/B,iBAAc,MACnB,kBACL,kBAAkB;EAAmB,UAAU;;;;;;;;cAgDrC,WAAQ,GAChB,YACF,QAAQ;;;;;;;;;;;cA4DE,WAAQ,GAChB,SAAO,kBACM,SACR,uBACP"}
|
package/dist/koa/koa.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Koa, { Context, Next } from "koa";
|
|
1
|
+
import Koa, { Context, Next, Next as KoaNext } from "koa";
|
|
2
2
|
import { BodyResult, JsonValue, MiddlewareOptions, RpcPluginOptions } from "@thednp/rpc";
|
|
3
3
|
import { ViteDevServer } from "vite";
|
|
4
4
|
//#region src/koa/types.d.ts
|
|
@@ -85,5 +85,5 @@ declare const readBody: (ctx: KoaContext) => Promise<BodyResult>;
|
|
|
85
85
|
*/
|
|
86
86
|
declare const redirect: (ctx: KoaContext, location: string, status?: number) => void;
|
|
87
87
|
//#endregion
|
|
88
|
-
export { type Koa, type KoaContext, type KoaMiddlewareFn, type KoaMiddlewareHooks, type KoaMiddlewareOptions, attachRPC, attachVite, createMiddleware, createRPCMiddleware, readBody, redirect };
|
|
88
|
+
export { type Koa, type KoaContext, type KoaMiddlewareFn, type KoaMiddlewareHooks, type KoaMiddlewareOptions, type KoaNext, attachRPC, attachVite, createMiddleware, createRPCMiddleware, readBody, redirect };
|
|
89
89
|
//# sourceMappingURL=koa.d.mts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thednp/rpc",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "thednp",
|
|
6
6
|
"description": "⚡ A Vite plugin for creating server functions with automatic Remote Procedure Calls (RPC)",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"fastify": "^5.12.1",
|
|
89
89
|
"fastify-plugin": "^6.0.0",
|
|
90
90
|
"h3": "2.0.1-rc.29",
|
|
91
|
-
"hono": "^4.13.
|
|
91
|
+
"hono": "^4.13.4",
|
|
92
92
|
"koa": "^3.2.1",
|
|
93
93
|
"vite": "^8.2.2"
|
|
94
94
|
},
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@hono/node-server": "^2.1.1",
|
|
97
97
|
"@types/express": "^5.0.6",
|
|
98
98
|
"@types/koa": "^3.0.3",
|
|
99
|
-
"@types/node": "^26.
|
|
99
|
+
"@types/node": "^26.3.0",
|
|
100
100
|
"@vitest/coverage-istanbul": "^4.1.11",
|
|
101
101
|
"@vitest/ui": "^4.1.11",
|
|
102
102
|
"tsdown": "^0.22.14",
|