@zap-socket/server 0.0.8 → 0.0.10

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.
Files changed (2) hide show
  1. package/dist/events.d.ts +3 -2
  2. package/package.json +1 -1
package/dist/events.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  import { z } from "zod";
2
2
  import type { EventInput, Context, ZapEvent, ZapStream, ZapServerEvent, MiddlewareType } from "@zap-socket/types";
3
+ import { ZapServer } from "./server";
3
4
  export declare const zapEvent: <T extends EventInput, R>(eventObj: T extends z.ZodTypeAny ? {
4
5
  input: T;
5
6
  middleware?: MiddlewareType[];
6
- process: (input: z.infer<T>, ctx: Context) => R;
7
+ process: (input: z.infer<T>, ctx: ZapServer<any> & Context) => R;
7
8
  } : {
8
9
  middleware?: MiddlewareType[];
9
- process: (ctx: Context) => R;
10
+ process: (ctx: ZapServer<any> & Context) => R;
10
11
  }) => ZapEvent<T, R>;
11
12
  export declare const zapStream: <T extends EventInput, R>(eventObj: T extends z.ZodTypeAny ? {
12
13
  input: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zap-socket/server",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "A fully typesafe tRPC-inspired WebSocket library with Zod validation, req-res model, and native subscriptions.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",