@smuzi/http-server 0.0.1 → 0.0.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/build/router.d.ts CHANGED
@@ -48,4 +48,5 @@ export declare function contactPaths(path1: PathParam, path2: PathParam): PathPa
48
48
  export declare function toStartWithPattern(input: PathParam): RegExp;
49
49
  export declare function methodFromString(method: string): Option<HttpMethod>;
50
50
  export declare function CreateHttpRouter<Resp extends THttpResponse, GR extends Router<Resp>>(groupRoute: GroupRoute, notFound: Action<Resp>): Router<Resp>;
51
+ export declare function CreateHttp1Router(groupRoute: GroupRoute, notFound?: Action<ServerResponse>): Http1Router;
51
52
  export {};
package/build/router.js CHANGED
@@ -96,12 +96,9 @@ export function CreateHttpRouter(groupRoute, notFound) {
96
96
  }
97
97
  };
98
98
  }
99
- // export function CreateHttp1Router(
100
- // groupRoute: GroupRoute,
101
- // notFound: Action<ServerResponse> = http1NotFoundHandler,
102
- // ): Http1Router {
103
- // return CreateHttpRouter<ServerResponse, Http1Router>(groupRoute, notFound);
104
- // }
99
+ export function CreateHttp1Router(groupRoute, notFound = http1NotFoundHandler) {
100
+ return CreateHttpRouter(groupRoute, notFound);
101
+ }
105
102
  // export function CreateHttp2Router(
106
103
  // groupRoute: GroupRoute,
107
104
  // notFound: Action<ServerHttp2Stream> = http2NotFoundHandler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smuzi/http-server",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "HTTP server and routing for JavaScript and TypeScript",
5
5
  "scripts": {
6
6
  "test": "tsx tests/index.ts",