@haibun/web-server-express 1.45.0 → 1.46.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.
- package/package.json +3 -3
- package/build/defs.d.ts +0 -27
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haibun/web-server-express",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.46.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "build/web-server-stepper.js",
|
|
7
7
|
"files": ["build/**"],
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"author": "",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@haibun/core": "1.
|
|
21
|
+
"@haibun/core": "1.46.0",
|
|
22
22
|
"cookie-parser": "^1.4.5",
|
|
23
23
|
"express": "^4.17.1",
|
|
24
24
|
"serve-index": "^1.9.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@haibun/web-http": "1.
|
|
27
|
+
"@haibun/web-http": "1.46.0",
|
|
28
28
|
"@types/cookie-parser": "^1.4.2",
|
|
29
29
|
"@types/express": "^4.17.15"
|
|
30
30
|
},
|
package/build/defs.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const WEBSERVER = "webserver";
|
|
2
|
-
import * as express from 'express';
|
|
3
|
-
export interface IWebServer {
|
|
4
|
-
checkAddStaticFolder(subdir: string, loc: string, options?: TStaticFolderOptions): undefined | string;
|
|
5
|
-
checkAddIndexFolder(subdir: string, loc: string): undefined | string;
|
|
6
|
-
addKnownStaticFolder(subdir: string, mountAt?: string): undefined | string;
|
|
7
|
-
listen(): Promise<unknown>;
|
|
8
|
-
close(): Promise<void>;
|
|
9
|
-
mounted: TRouteMap;
|
|
10
|
-
addRoute(type: TRouteTypes, path: string, ...routes: TRequestHandler[]): void;
|
|
11
|
-
addKnownRoute(type: TRouteTypes, path: string, ...routes: TRequestHandler[]): void;
|
|
12
|
-
use(middleware: express.RequestHandler): void;
|
|
13
|
-
}
|
|
14
|
-
export declare const ROUTE_TYPES: readonly ["get", "post", "put", "delete", "head", "options"];
|
|
15
|
-
export type TRouteTypes = (typeof ROUTE_TYPES)[number];
|
|
16
|
-
export type TRouteMap = {
|
|
17
|
-
[K in TRouteTypes]: {
|
|
18
|
-
[path: string]: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export type IRequest = typeof express.request;
|
|
22
|
-
export type IResponse = typeof express.response;
|
|
23
|
-
export type TRequestHandler = (req: IRequest, res: IResponse, next: () => void) => void;
|
|
24
|
-
export type TStaticFolderOptions = {
|
|
25
|
-
setHeaders?: (res: any, filePath: any, stat: any) => void;
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=defs.d.ts.map
|