fulmine.js 5.14.0 → 5.15.0

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/package.json +1 -1
  2. package/src/types.d.ts +19 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulmine.js",
3
- "version": "5.14.0",
3
+ "version": "5.15.0",
4
4
  "description": "Drop-in Express 5 replacement on uWebSockets.js. Your existing middleware keeps working.",
5
5
  "main": "src/index.js",
6
6
  "exports": {
package/src/types.d.ts CHANGED
@@ -200,6 +200,25 @@ declare module "fulmine.js" {
200
200
  listen(port: number | string, callback?: (error?: Error) => void): FulmineServer;
201
201
  listen(port: number | string, host: string, callback?: (error?: Error) => void): FulmineServer;
202
202
  listen(port: number | string, host: string, backlog: number, callback?: (error?: Error) => void): FulmineServer;
203
+ /**
204
+ * What listen() hands back is the app itself, and it answers as an `http.Server` so a
205
+ * shutdown wrapper or a library testing what it was given recognises it. These are the
206
+ * members of that surface Express's own Application does not have; the readme's
207
+ * "Differences from Express" says which of them do something here and which are inert.
208
+ */
209
+ close(callback?: (error?: Error) => void): this;
210
+ address(): { address: string; family: string; port: number } | null;
211
+ readonly listening: boolean;
212
+ getConnections(callback: (error: Error | null, count: number) => void): void;
213
+ ref(): this;
214
+ unref(): this;
215
+ setTimeout(msecs?: number, callback?: () => void): this;
216
+ timeout: number;
217
+ keepAliveTimeout: number;
218
+ headersTimeout: number;
219
+ requestTimeout: number;
220
+ maxHeadersCount: number | null;
221
+ maxRequestsPerSocket: number;
203
222
  ws(path: string, behavior: WebSocketBehavior): this;
204
223
  publish(topic: string, message: string | ArrayBuffer | Buffer, isBinary?: boolean, compress?: boolean): boolean;
205
224
  numSubscribers(topic: string): number;