redweb 0.4.5 → 0.4.6

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/index.d.ts +3 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'redweb' {
2
- import { IncomingMessage, ServerResponse } from 'http';
2
+ import { Request, Response } from 'express';
3
3
  import { Server as HTTPServer } from 'http';
4
4
  import { Server as HTTPSServer } from 'https';
5
5
  import WebSocket from 'ws';
@@ -15,7 +15,7 @@ declare module 'redweb' {
15
15
  export interface Service {
16
16
  serviceName: string;
17
17
  method: 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options' | 'head';
18
- function: (req: IncomingMessage, res: ServerResponse) => void;
18
+ function: (req: Request, res: Response) => void;
19
19
  }
20
20
 
21
21
  /**
@@ -97,7 +97,7 @@ declare module 'redweb' {
97
97
 
98
98
  constructor(server: HTTPServer | HTTPSServer, options?: SocketServerOptions);
99
99
 
100
- handleConnection(socket: WebSocket, req: IncomingMessage): void;
100
+ handleConnection(socket: WebSocket, req: Request): void;
101
101
  handleMessage(socket: WebSocket, message: string, ip: string): void;
102
102
  handleClose(socket: WebSocket, ip: string): void;
103
103
  handleError(socket: WebSocket, error: Error, ip: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redweb",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "A way to quickly set up an express server",
5
5
  "main": "index.js",
6
6
  "scripts": {