@serenity-js/local-server 3.0.0-rc.33 → 3.0.0-rc.35
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/CHANGELOG.md +16 -0
- package/lib/screenplay/abilities/ManageALocalServer.d.ts +2 -2
- package/lib/screenplay/abilities/ManageALocalServer.d.ts.map +1 -1
- package/lib/screenplay/abilities/ManageALocalServer.js +13 -13
- package/lib/screenplay/abilities/ManageALocalServer.js.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0-rc.35](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.34...v3.0.0-rc.35) (2022-11-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @serenity-js/local-server
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.0.0-rc.34](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.33...v3.0.0-rc.34) (2022-11-21)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @serenity-js/local-server
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [3.0.0-rc.33](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.32...v3.0.0-rc.33) (2022-11-07)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @serenity-js/local-server
|
|
@@ -103,13 +103,13 @@ export declare class ManageALocalServer implements Ability {
|
|
|
103
103
|
* [`http.createServer`](https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener)
|
|
104
104
|
* or [`https.createServer`](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener).
|
|
105
105
|
*/
|
|
106
|
-
export
|
|
106
|
+
export type RequestListener = (request: http.IncomingMessage, response: http.ServerResponse) => void;
|
|
107
107
|
/**
|
|
108
108
|
* A {@apilink net.Server} with an added shutdown method.
|
|
109
109
|
*
|
|
110
110
|
* @see https://www.npmjs.com/package/http-shutdown
|
|
111
111
|
*/
|
|
112
|
-
export
|
|
112
|
+
export type ServerWithShutdown = net.Server & {
|
|
113
113
|
shutdown: (callback: (error?: Error) => void) => void;
|
|
114
114
|
forceShutdown: (callback: (error?: Error) => void) => void;
|
|
115
115
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageALocalServer.d.ts","sourceRoot":"","sources":["../../../src/screenplay/abilities/ManageALocalServer.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,OAAO,EAAsB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAG3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,kBAAmB,YAAW,OAAO;IAqDlC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAnDrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,GAAG,CAAC,MAAM,GAAG,kBAAkB;IAQvF;;;;;;;;OAQG;IACH,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,GAAE,KAAK,CAAC,aAAkB,GAAG,kBAAkB;IAQ7H;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,kBAAkB;IAInD;;;;;;;;OAQG;gBAC0B,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,GAAG,CAAC,MA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AAW,SAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBhE;;;;OAIG;IACH,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,kBAAkB,KAAK,CAAC,GAAG,CAAC;CAG1F;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC;AAErG;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,GAAG;IAC1C,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,KAAK,IAAI,CAAC;IACtD,aAAa,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF;;;;;GAKG;AACH,oBAAY,kBAAkB;IAC1B,IAAI,SAAS;IACb,KAAK,UAAU;CAClB"}
|
|
@@ -70,19 +70,6 @@ const portfinder_1 = require("portfinder");
|
|
|
70
70
|
* @group Abilities
|
|
71
71
|
*/
|
|
72
72
|
class ManageALocalServer {
|
|
73
|
-
/**
|
|
74
|
-
* @param protocol
|
|
75
|
-
* Protocol to be used when communicating with the running server; `http` or `https`
|
|
76
|
-
*
|
|
77
|
-
* @param server
|
|
78
|
-
* A Node.js server requestListener, with support for [server shutdown](https://www.npmjs.com/package/http-shutdown).
|
|
79
|
-
*
|
|
80
|
-
* @see https://www.npmjs.com/package/http-shutdown
|
|
81
|
-
*/
|
|
82
|
-
constructor(protocol, server) {
|
|
83
|
-
this.protocol = protocol;
|
|
84
|
-
this.server = withShutdownSupport(server);
|
|
85
|
-
}
|
|
86
73
|
/**
|
|
87
74
|
* An {@apilink Ability} to manage a Node.js HTTP server using the provided `requestListener`.
|
|
88
75
|
*
|
|
@@ -118,6 +105,19 @@ class ManageALocalServer {
|
|
|
118
105
|
static as(actor) {
|
|
119
106
|
return actor.abilityTo(ManageALocalServer);
|
|
120
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* @param protocol
|
|
110
|
+
* Protocol to be used when communicating with the running server; `http` or `https`
|
|
111
|
+
*
|
|
112
|
+
* @param server
|
|
113
|
+
* A Node.js server requestListener, with support for [server shutdown](https://www.npmjs.com/package/http-shutdown).
|
|
114
|
+
*
|
|
115
|
+
* @see https://www.npmjs.com/package/http-shutdown
|
|
116
|
+
*/
|
|
117
|
+
constructor(protocol, server) {
|
|
118
|
+
this.protocol = protocol;
|
|
119
|
+
this.server = withShutdownSupport(server);
|
|
120
|
+
}
|
|
121
121
|
/**
|
|
122
122
|
* Starts the server on the first free port between `preferredPort` and `highestPort`, inclusive.
|
|
123
123
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageALocalServer.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/ManageALocalServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA+E;AAC/E,2CAA6B;AAC7B,qDAAsD;AACtD,6CAA+B;AAE/B,2CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"ManageALocalServer.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/ManageALocalServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA+E;AAC/E,2CAA6B;AAC7B,qDAAsD;AACtD,6CAA+B;AAE/B,2CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,kBAAkB;IAI3B;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CAAC,QAAsC;QAC9D,MAAM,MAAM,GAAG,OAAO,QAAQ,KAAK,UAAU;YACzC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OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YAExC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE;gBACvC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;gBAElD,OAAO,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC,CAAC;IACZ,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAI,EAAoE;QAC/E,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;CACJ;AA/FD,gDA+FC;AAmBD;;;;;GAKG;AACH,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,mCAAa,CAAA;IACb,qCAAe,CAAA;AACnB,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/local-server",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.35",
|
|
4
4
|
"description": "Enables Serenity/JS Actors to manage local Node.js test servers, such as Express, Koa or Restify",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -49,29 +49,29 @@
|
|
|
49
49
|
"npm": "^6 || ^7 || ^8"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@serenity-js/core": "3.0.0-rc.
|
|
52
|
+
"@serenity-js/core": "3.0.0-rc.35",
|
|
53
53
|
"http-shutdown": "^1.2.2",
|
|
54
54
|
"portfinder": "^1.0.32"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@hapi/hapi": "^
|
|
57
|
+
"@hapi/hapi": "^21.0.0",
|
|
58
58
|
"@integration/testing-tools": "3.0.0",
|
|
59
|
-
"@serenity-js/assertions": "3.0.0-rc.
|
|
60
|
-
"@serenity-js/rest": "3.0.0-rc.
|
|
61
|
-
"@types/chai": "^4.3.
|
|
59
|
+
"@serenity-js/assertions": "3.0.0-rc.35",
|
|
60
|
+
"@serenity-js/rest": "3.0.0-rc.35",
|
|
61
|
+
"@types/chai": "^4.3.4",
|
|
62
62
|
"@types/express": "^4.17.14",
|
|
63
63
|
"@types/hapi": "^18.0.7",
|
|
64
|
-
"@types/mocha": "^
|
|
64
|
+
"@types/mocha": "^10.0.0",
|
|
65
65
|
"@types/restify": "^8.5.5",
|
|
66
66
|
"axios": "^0.27.2",
|
|
67
|
-
"express": "^4.18.
|
|
67
|
+
"express": "^4.18.2",
|
|
68
68
|
"koa": "^2.13.4",
|
|
69
|
-
"mocha": "^10.
|
|
69
|
+
"mocha": "^10.1.0",
|
|
70
70
|
"nyc": "15.1.0",
|
|
71
|
-
"restify": "^
|
|
71
|
+
"restify": "^9.0.0",
|
|
72
72
|
"semver": "^7.3.8",
|
|
73
73
|
"ts-node": "^10.9.1",
|
|
74
|
-
"typescript": "^4.
|
|
74
|
+
"typescript": "^4.9.3"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "632f7c62c31321cfb7641ee834b5636e1eefa442"
|
|
77
77
|
}
|