sable 0.5.16 → 0.5.17

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/types/index.d.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sable",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "description": "Starts a server and a file watcher",
5
5
  "author": {
6
6
  "name": "Kei Ito",
package/types/index.d.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  import * as http from "node:http";
2
- import { type HandleFunction } from "connect";
3
2
  import * as staticLivereload from "middleware-static-livereload";
4
3
  export { LogLevel } from "middleware-static-livereload";
4
+ type NextFunction = (err?: unknown) => void;
5
+ export type SimpleHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse) => void;
6
+ export type NextHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
7
+ export type ErrorHandleFunction = (err: unknown, req: http.IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
8
+ export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
5
9
  export interface SableOptions extends Partial<staticLivereload.MiddlewareOptions> {
6
10
  port?: number;
7
11
  host?: string;