@haibun/web-server-express 1.1.0 → 1.8.1
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/defs.d.ts +2 -2
- package/build/defs.d.ts.map +1 -1
- package/build/defs.js +1 -2
- package/build/defs.js.map +1 -1
- package/build/server-express.d.ts +2 -1
- package/build/server-express.d.ts.map +1 -1
- package/build/server-express.js +15 -15
- package/build/server-express.js.map +1 -1
- package/build/web-server-stepper-route.test.js +15 -15
- package/build/web-server-stepper-route.test.js.map +1 -1
- package/build/web-server-stepper.d.ts +40 -3
- package/build/web-server-stepper.d.ts.map +1 -1
- package/build/web-server-stepper.js +24 -17
- package/build/web-server-stepper.js.map +1 -1
- package/build/web-server-stepper.test.js +6 -9
- package/build/web-server-stepper.test.js.map +1 -1
- package/package.json +3 -5
package/build/defs.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare const WEBSERVER = "webserver";
|
|
2
|
-
export declare const WEBSERVER_STEPPER = "WebServerStepper";
|
|
3
2
|
export declare const CHECK_LISTENER = "CHECK_LISTENER";
|
|
4
3
|
import * as express from 'express';
|
|
5
4
|
export interface IWebServer {
|
|
6
5
|
addStaticFolder(subdir: string): Promise<string | undefined>;
|
|
7
6
|
addKnownStaticFolder(subdir: string, mountAt?: string): Promise<string | undefined>;
|
|
8
|
-
listen(
|
|
7
|
+
listen(): Promise<IWebServer>;
|
|
8
|
+
close(): Promise<void>;
|
|
9
9
|
addRoute(type: TRouteType, path: string, route: TRequestHandler): void;
|
|
10
10
|
}
|
|
11
11
|
export declare type TRouteType = 'get';
|
package/build/defs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../src/defs.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../src/defs.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,WAAW,UAAU;IACzB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7D,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpF,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;CACxE;AAED,oBAAY,UAAU,GAAG,KAAK,CAAC;AAE/B,oBAAY,QAAQ,GAAG,OAAO,OAAO,CAAC,OAAO,CAAC;AAE9C,oBAAY,SAAS,GAAG,OAAO,OAAO,CAAC,QAAQ,CAAC;AAEhD,oBAAY,eAAe,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,KAAK,IAAI,CAAC"}
|
package/build/defs.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHECK_LISTENER = exports.
|
|
3
|
+
exports.CHECK_LISTENER = exports.WEBSERVER = void 0;
|
|
4
4
|
exports.WEBSERVER = 'webserver';
|
|
5
|
-
exports.WEBSERVER_STEPPER = 'WebServerStepper';
|
|
6
5
|
exports.CHECK_LISTENER = 'CHECK_LISTENER';
|
|
7
6
|
//# sourceMappingURL=defs.js.map
|
package/build/defs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../src/defs.ts"],"names":[],"mappings":";;;AACa,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,
|
|
1
|
+
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../src/defs.ts"],"names":[],"mappings":";;;AACa,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,cAAc,GAAG,gBAAgB,CAAC"}
|
|
@@ -14,7 +14,8 @@ export declare class ServerExpress implements IWebServer {
|
|
|
14
14
|
port: number;
|
|
15
15
|
constructor(logger: ILogger, base: string, port?: number);
|
|
16
16
|
listen(): Promise<IWebServer>;
|
|
17
|
-
addRoute(type: TRouteType, path: string, route: RequestHandler): Promise<
|
|
17
|
+
addRoute(type: TRouteType, path: string, route: RequestHandler): Promise<void>;
|
|
18
|
+
addMounted(path: string, what: string): Promise<void>;
|
|
18
19
|
addStaticFolder(relativeFolder: string, mountAt?: string): Promise<string | undefined>;
|
|
19
20
|
addKnownStaticFolder(folder: string, mountAt?: string): Promise<string | undefined>;
|
|
20
21
|
doAddStaticFolder(folder: string, mountAt?: string): Promise<string | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-express.d.ts","sourceRoot":"","sources":["../src/server-express.ts"],"names":[],"mappings":"AACA,OAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAEjE,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,qBAAa,aAAc,YAAW,UAAU;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,SAAS,EAAE,OAAO,CAAS;IAClC,QAAQ,EAAE,GAAG,CAAC;IACd,GAAG,8CAAa;IAChB,MAAM,CAAC,OAAO,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,C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M,EAAE,OAAO,GAAE,MAAY,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAwB3F,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAWpD,KAAK;CAIZ"}
|
package/build/server-express.js
CHANGED
|
@@ -10,11 +10,11 @@ const cookie_parser_1 = __importDefault(require("cookie-parser"));
|
|
|
10
10
|
exports.DEFAULT_PORT = 8123;
|
|
11
11
|
class ServerExpress {
|
|
12
12
|
constructor(logger, base, port = exports.DEFAULT_PORT) {
|
|
13
|
-
this.app = express_1.default();
|
|
13
|
+
this.app = (0, express_1.default)();
|
|
14
14
|
this.logger = logger;
|
|
15
15
|
this.base = base;
|
|
16
16
|
this.port = port;
|
|
17
|
-
this.app.use(cookie_parser_1.default());
|
|
17
|
+
this.app.use((0, cookie_parser_1.default)());
|
|
18
18
|
}
|
|
19
19
|
async listen() {
|
|
20
20
|
if (!ServerExpress.listening) {
|
|
@@ -36,15 +36,22 @@ class ServerExpress {
|
|
|
36
36
|
try {
|
|
37
37
|
const alreadyMounted = this.checkMountBadOrMounted(path, route.toString());
|
|
38
38
|
if (alreadyMounted) {
|
|
39
|
+
this.logger.debug(`already mount ${path}`);
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
catch (e) {
|
|
43
|
-
|
|
44
|
+
throw (e);
|
|
44
45
|
}
|
|
45
46
|
this.logger.log(`serving route from ${path}`);
|
|
46
47
|
await this.app[type](path, route);
|
|
47
|
-
await this.
|
|
48
|
+
await this.addMounted(path, route.toString());
|
|
49
|
+
}
|
|
50
|
+
async addMounted(path, what) {
|
|
51
|
+
ServerExpress.mounted[path] = what;
|
|
52
|
+
if (!this.listener) {
|
|
53
|
+
await this.listen();
|
|
54
|
+
}
|
|
48
55
|
}
|
|
49
56
|
// add a static folder restricted to relative paths from files
|
|
50
57
|
async addStaticFolder(relativeFolder, mountAt = '/') {
|
|
@@ -63,32 +70,25 @@ class ServerExpress {
|
|
|
63
70
|
const alreadyMounted = this.checkMountBadOrMounted(mountAt, folder);
|
|
64
71
|
if (alreadyMounted) {
|
|
65
72
|
// FIXME
|
|
66
|
-
|
|
73
|
+
return;
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
catch (e) {
|
|
70
77
|
return e.message;
|
|
71
78
|
}
|
|
72
|
-
if (!fs_1.existsSync(folder)) {
|
|
79
|
+
if (!(0, fs_1.existsSync)(folder)) {
|
|
73
80
|
throw Error(`"${folder}" doesn't exist`);
|
|
74
81
|
}
|
|
75
|
-
const stat = fs_1.statSync(folder);
|
|
82
|
+
const stat = (0, fs_1.statSync)(folder);
|
|
76
83
|
if (!stat.isDirectory()) {
|
|
77
84
|
throw Error(`"${folder}" is not a directory`);
|
|
78
85
|
}
|
|
79
|
-
ServerExpress.mounted[mountAt] = folder;
|
|
80
86
|
this.logger.info(`serving files from ${folder} at ${mountAt}`);
|
|
81
87
|
await this.app.use(mountAt, express_1.default.static(folder));
|
|
82
|
-
await this.
|
|
88
|
+
await this.addMounted(mountAt, folder);
|
|
83
89
|
return;
|
|
84
90
|
}
|
|
85
91
|
checkMountBadOrMounted(loc, what) {
|
|
86
|
-
if (!ServerExpress.listening) {
|
|
87
|
-
throw Error(`listen must be called before mount`);
|
|
88
|
-
}
|
|
89
|
-
if (!loc) {
|
|
90
|
-
throw Error(`missing mount location`);
|
|
91
|
-
}
|
|
92
92
|
const alreadyMounted = ServerExpress.mounted[loc];
|
|
93
93
|
if (alreadyMounted === what) {
|
|
94
94
|
this.logger.log(`${alreadyMounted} already mounted at ${loc}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-express.js","sourceRoot":"","sources":["../src/server-express.ts"],"names":[],"mappings":";;;;;;AAAA,2BAA0C;AAC1C,sDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"server-express.js","sourceRoot":"","sources":["../src/server-express.ts"],"names":[],"mappings":";;;;;;AAAA,2BAA0C;AA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AC,KAAK;QACT,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACnC,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC/B,CAAC;;AA7GH,sCA8GC;AA5GQ,uBAAS,GAAY,KAAK,CAAC;AAG3B,qBAAO,GAAgC,EAAE,CAAC"}
|
|
@@ -3,41 +3,41 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const web_http_1 = __importDefault(require("@haibun/web-http/build/web-http"));
|
|
7
7
|
const util_1 = require("@haibun/core/build/lib/util");
|
|
8
|
-
const defs_1 = require("
|
|
8
|
+
const defs_1 = require("@haibun/core/build/lib/defs");
|
|
9
|
+
const defs_2 = require("./defs");
|
|
9
10
|
const web_server_stepper_1 = __importDefault(require("./web-server-stepper"));
|
|
11
|
+
const defs_3 = require("@haibun/core/build/lib/defs");
|
|
10
12
|
const lib_1 = require("@haibun/core/src/lib/test/lib");
|
|
13
|
+
const web_server_stepper_2 = __importDefault(require("./web-server-stepper"));
|
|
11
14
|
describe('route mount', () => {
|
|
12
15
|
it('mounts a route', async () => {
|
|
13
|
-
const TestRoute = class TestRoute {
|
|
14
|
-
constructor(
|
|
16
|
+
const TestRoute = class TestRoute extends defs_3.AStepper {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
15
19
|
this.steps = {
|
|
16
20
|
addRoute: {
|
|
17
21
|
gwta: 'serve test route to {loc}',
|
|
18
22
|
action: async ({ loc }) => {
|
|
19
23
|
const route = (req, res) => res.status(200).send('ok');
|
|
20
|
-
const webserver = await util_1.getFromRuntime(this.
|
|
24
|
+
const webserver = await (0, util_1.getFromRuntime)(this.getWorld().runtime, defs_2.WEBSERVER);
|
|
21
25
|
await webserver.addRoute('get', loc, route);
|
|
22
|
-
|
|
23
|
-
return util_1.actionOK();
|
|
26
|
+
return (0, util_1.actionOK)();
|
|
24
27
|
},
|
|
25
28
|
},
|
|
26
29
|
};
|
|
27
|
-
this.world = world;
|
|
28
30
|
}
|
|
29
31
|
};
|
|
30
|
-
const
|
|
31
|
-
const {
|
|
32
|
-
|
|
32
|
+
const wss = new web_server_stepper_2.default();
|
|
33
|
+
const feature = { path: '/features/test.feature', content: `serve test route to /test\nwebserver is listening\nfetch from http://localhost:8124/test is "ok"` };
|
|
34
|
+
const result = await (0, lib_1.testWithDefaults)([feature], [web_server_stepper_1.default, TestRoute, web_http_1.default], {
|
|
35
|
+
options: { DEST: defs_1.DEFAULT_DEST, },
|
|
33
36
|
extraOptions: {
|
|
34
|
-
[
|
|
37
|
+
[(0, util_1.getStepperOptionName)(wss, 'PORT')]: '8124',
|
|
35
38
|
},
|
|
36
39
|
});
|
|
37
40
|
expect(result.ok).toBe(true);
|
|
38
|
-
const content = await node_fetch_1.default('http://localhost:8123/test');
|
|
39
|
-
expect(await content.text()).toEqual('ok');
|
|
40
|
-
util_1.findStepper(steppers, defs_1.WEBSERVER_STEPPER).close();
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
//# sourceMappingURL=web-server-stepper-route.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-server-stepper-route.test.js","sourceRoot":"","sources":["../src/web-server-stepper-route.test.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"web-server-stepper-route.test.js","sourceRoot":"","sources":["../src/web-server-stepper-route.test.ts"],"names":[],"mappings":";;;;;AACA,+EAAsD;AACtD,sDAA6F;AAC7F,sDAA2D;AAC3D,iCAAoE;AAEpE,8EAA0C;AAC1C,sDAA+D;AAC/D,uDAAiE;AACjE,8EAAoD;AAEpD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC9B,M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amed, TOptions, AStepper } from '@haibun/core/build/lib/defs';
|
|
2
2
|
import { IWebServer } from './defs';
|
|
3
|
-
|
|
3
|
+
import { ServerExpress } from './server-express';
|
|
4
|
+
declare const WebServerStepper: {
|
|
5
|
+
new (): {
|
|
6
|
+
webserver: ServerExpress | undefined;
|
|
7
|
+
options: {
|
|
8
|
+
PORT: {
|
|
9
|
+
desc: string;
|
|
10
|
+
parse: (port: string) => {
|
|
11
|
+
error: string;
|
|
12
|
+
result?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
result: number;
|
|
15
|
+
error?: undefined;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
setWorld(world: TWorld, steppers: AStepper[]): void;
|
|
20
|
+
close(): Promise<void>;
|
|
21
|
+
steps: {
|
|
22
|
+
isListening: {
|
|
23
|
+
gwta: string;
|
|
24
|
+
action: () => Promise<import("@haibun/core/build/lib/defs").TOKActionResult>;
|
|
25
|
+
};
|
|
26
|
+
showMounts: {
|
|
27
|
+
gwta: string;
|
|
28
|
+
action: () => Promise<import("@haibun/core/build/lib/defs").TOKActionResult>;
|
|
29
|
+
};
|
|
30
|
+
serveFiles: {
|
|
31
|
+
gwta: string;
|
|
32
|
+
action: ({ loc }: TNamed) => Promise<import("@haibun/core/build/lib/defs").TOKActionResult | import("@haibun/core/build/lib/defs").TNotOKActionResult>;
|
|
33
|
+
build: ({ loc }: TNamed) => Promise<import("@haibun/core/build/lib/defs").TOKActionResult>;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
world?: TWorld | undefined;
|
|
37
|
+
endFeature?(): void;
|
|
38
|
+
onFailure?(result: import("@haibun/core/build/lib/defs").TStepResult): void;
|
|
39
|
+
getWorld(): TWorld;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
4
42
|
export default WebServerStepper;
|
|
5
43
|
export declare type ICheckListener = (options: TOptions, webserver: IWebServer) => void;
|
|
6
44
|
export interface IWebServerStepper {
|
|
7
45
|
webserver: IWebServer;
|
|
8
46
|
close: () => void;
|
|
9
|
-
checkListener: ICheckListener;
|
|
10
47
|
}
|
|
11
48
|
//# sourceMappingURL=web-server-stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-server-stepper.d.ts","sourceRoot":"","sources":["../src/web-server-stepper.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"web-server-stepper.d.ts","sourceRoot":"","sources":["../src/web-server-stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAElG,OAAO,EAAE,UAAU,EAAc,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AAE/D,QAAA,MAAM,gBAAgB;;mBACT,aAAa,GAAG,SAAS;;;;8BAKlB,MAAM;;;;;;;;;wBAIR,MAAM,YAAY,QAAQ,EAAE;;;;;;;;;;;;;kCA8BhB,MAAM;iCAOP,MAAM;;;;;;;;CAMlC,CAAC;AACF,eAAe,gBAAgB,CAAC;AAEhC,oBAAY,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,KAAK,IAAI,CAAC;AAChF,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,UAAU,CAAC;IACtB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB"}
|
|
@@ -4,49 +4,56 @@ const defs_1 = require("@haibun/core/build/lib/defs");
|
|
|
4
4
|
const util_1 = require("@haibun/core/build/lib/util");
|
|
5
5
|
const defs_2 = require("./defs");
|
|
6
6
|
const server_express_1 = require("./server-express");
|
|
7
|
-
const WebServerStepper = class WebServerStepper {
|
|
8
|
-
constructor(
|
|
7
|
+
const WebServerStepper = class WebServerStepper extends defs_1.AStepper {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
9
10
|
this.options = {
|
|
10
11
|
PORT: {
|
|
11
12
|
desc: `change web server port from ${server_express_1.DEFAULT_PORT}`,
|
|
12
|
-
parse: (port) =>
|
|
13
|
+
parse: (port) => (0, util_1.intOrError)(port)
|
|
13
14
|
},
|
|
14
15
|
};
|
|
15
16
|
this.steps = {
|
|
16
17
|
isListening: {
|
|
17
18
|
gwta: 'webserver is listening',
|
|
18
19
|
action: async () => {
|
|
19
|
-
await this.
|
|
20
|
+
await this.webserver.listen();
|
|
21
|
+
return defs_1.OK;
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
showMounts: {
|
|
25
|
+
gwta: 'show mounts',
|
|
26
|
+
action: async () => {
|
|
27
|
+
const mounts = server_express_1.ServerExpress.mounted;
|
|
28
|
+
this.getWorld().logger.info(`mounts: ${JSON.stringify(mounts)}`);
|
|
20
29
|
return defs_1.OK;
|
|
21
30
|
},
|
|
22
31
|
},
|
|
23
32
|
serveFiles: {
|
|
24
33
|
gwta: 'serve files from {loc}',
|
|
25
34
|
action: async ({ loc }) => {
|
|
26
|
-
const ws = await this.
|
|
27
|
-
await ws.listen(8123);
|
|
35
|
+
const ws = await (0, util_1.getFromRuntime)(this.getWorld().runtime, defs_2.WEBSERVER);
|
|
28
36
|
const error = await ws.addStaticFolder(loc);
|
|
29
|
-
this.
|
|
30
|
-
return error === undefined ? defs_1.OK : util_1.actionNotOK(error);
|
|
37
|
+
this.getWorld().shared.set('file_location', loc);
|
|
38
|
+
return error === undefined ? defs_1.OK : (0, util_1.actionNotOK)(error);
|
|
31
39
|
},
|
|
32
40
|
build: async ({ loc }) => {
|
|
33
|
-
this.
|
|
41
|
+
this.getWorld().shared.set('file_location', loc);
|
|
34
42
|
return defs_1.OK;
|
|
35
43
|
}
|
|
36
44
|
},
|
|
37
45
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
}
|
|
47
|
+
setWorld(world, steppers) {
|
|
48
|
+
super.setWorld(world, steppers);
|
|
41
49
|
// this.world.runtime[CHECK_LISTENER] = WebServerStepper.checkListener;
|
|
50
|
+
const port = parseInt((0, util_1.getStepperOption)(this, 'PORT', world.extraOptions)) || server_express_1.DEFAULT_PORT;
|
|
51
|
+
this.webserver = new server_express_1.ServerExpress(world.logger, [process.cwd(), 'files'].join('/'), port);
|
|
52
|
+
world.runtime[defs_2.WEBSERVER] = this.webserver;
|
|
42
53
|
}
|
|
43
|
-
async
|
|
54
|
+
async close() {
|
|
44
55
|
await this.webserver?.close();
|
|
45
56
|
}
|
|
46
|
-
async checkListener(options) {
|
|
47
|
-
const port = options[`HAIBUN_O_${defs_2.WEBSERVER_STEPPER.toUpperCase()}_PORT`];
|
|
48
|
-
await this.webserver.listen();
|
|
49
|
-
}
|
|
50
57
|
};
|
|
51
58
|
exports.default = WebServerStepper;
|
|
52
59
|
//# sourceMappingURL=web-server-stepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-server-stepper.js","sourceRoot":"","sources":["../src/web-server-stepper.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"web-server-stepper.js","sourceRoot":"","sources":["../src/web-server-stepper.ts"],"names":[],"mappings":";;AAAA,sDAAkG;AAClG,sDAAwG;AACxG,iCAAgD;AAChD,qDAA+D;AAE/D,MAAM,gBAAgB,GAAG,MAAM,gBAAiB,SAAQ,eAAQ;IAAvC;;QAGvB,YAAO,GAAG;YACR,IAAI,EAAE;gBACJ,IAAI,EAAE,+BAA+B,6BAAY,EAAE;gBACnD,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAA,iBAAU,EAAC,IAAI,CAAC;aAC1C;SACF,CAAC;QAcF,UAAK,GAAG;YACN,WAAW,EAAE;gBACX,IAAI,EAAE,wBAAwB;gBAC9B,MAAM,EAAE,KAAK,IAAI,EAAE;oBACjB,MAAM,IAAI,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC;oBAC/B,OAAO,SAAE,CAAC;gBACZ,CAAC;aACF;YACD,UAAU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Y,CAAC,CAAC,IAAI,6BAAY,CAAC;QAC1F,IAAI,CAAC,SAAS,GAAG,IAAI,8BAAa,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;QAC3F,KAAK,CAAC,OAAO,CAAC,gBAAS,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;IAChC,CAAC;CAiCF,CAAC;AACF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -3,31 +3,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
7
6
|
const lib_1 = require("@haibun/core/build/lib/test/lib");
|
|
7
|
+
const web_http_1 = __importDefault(require("@haibun/web-http/build/web-http"));
|
|
8
8
|
const web_server_stepper_1 = __importDefault(require("./web-server-stepper"));
|
|
9
|
-
const serverLoc = [process.cwd(), 'build', 'web-server-stepper'].join('/');
|
|
10
9
|
describe('static mount', () => {
|
|
11
10
|
it('serves files', async () => {
|
|
12
|
-
const feature = { path: '/features/test.feature', content: `serve files from test\
|
|
13
|
-
const
|
|
11
|
+
const feature = { path: '/features/test.feature', content: `serve files from test\nfetch from http://localhost:8123/testfile is "content"` };
|
|
12
|
+
const result = await (0, lib_1.testWithDefaults)([feature], [web_server_stepper_1.default, web_http_1.default]);
|
|
14
13
|
expect(result.ok).toBe(true);
|
|
15
|
-
const content = await node_fetch_1.default('http://localhost:8123/testfile');
|
|
16
|
-
expect(await content.text()).toEqual('content');
|
|
17
14
|
});
|
|
18
15
|
it('restricts characters used in static mount folder name', async () => {
|
|
19
16
|
const feature = { path: '/features/test.feature', content: `serve files from l*(*$\n` };
|
|
20
|
-
const
|
|
17
|
+
const result = await (0, lib_1.testWithDefaults)([feature], [web_server_stepper_1.default]);
|
|
21
18
|
expect(result.ok).toBe(false);
|
|
22
19
|
});
|
|
23
20
|
it("doesn't re-mount same static mount", async () => {
|
|
24
21
|
const feature = { path: '/features/test.feature', content: `serve files from test\nserve files from test\n` };
|
|
25
|
-
const
|
|
22
|
+
const result = await (0, lib_1.testWithDefaults)([feature], [web_server_stepper_1.default]);
|
|
26
23
|
expect(result.ok).toBe(true);
|
|
27
24
|
});
|
|
28
25
|
it("doesn't permit different static mount", async () => {
|
|
29
26
|
const feature = { path: '/features/test.feature', content: `serve files from test\nserve files from fails\n` };
|
|
30
|
-
const
|
|
27
|
+
const result = await (0, lib_1.testWithDefaults)([feature], [web_server_stepper_1.default]);
|
|
31
28
|
expect(result.ok).toBe(false);
|
|
32
29
|
});
|
|
33
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-server-stepper.test.js","sourceRoot":"","sources":["../src/web-server-stepper.test.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"web-server-stepper.test.js","sourceRoot":"","sources":["../src/web-server-stepper.test.ts"],"names":[],"mappings":";;;;;AAAA,yDAAmE;AACnE,+EAAsD;AAEtD,8EAA0C;AAE1C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE;QAC5B,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,+EAA+E,EAAE,CAAC;QAC7I,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAgB,EAAC,CAAC,OAAO,CAAC,EAAE,CAAC,4BAAM,EAAE,kBAAO,CAAC,CAAC,CAAC;QAEpE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IA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+
"version": "1.8.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/web-server-stepper.js",
|
|
6
6
|
"files": [
|
|
@@ -16,10 +16,8 @@
|
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@types/cookie-parser": "^1.4.2",
|
|
19
|
-
"@types/node-fetch": "^2.5.10",
|
|
20
19
|
"cookie-parser": "^1.4.5",
|
|
21
|
-
"express": "^4.17.1"
|
|
22
|
-
"node-fetch": "^2.6.1"
|
|
20
|
+
"express": "^4.17.1"
|
|
23
21
|
},
|
|
24
22
|
"devDependencies": {
|
|
25
23
|
"@types/express": "^4.17.12",
|
|
@@ -39,4 +37,4 @@
|
|
|
39
37
|
"ts-node": "^10.0.0",
|
|
40
38
|
"tslint": "^6.1.3"
|
|
41
39
|
}
|
|
42
|
-
}
|
|
40
|
+
}
|