@serenity-js/local-server 3.32.1 → 3.32.3
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
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.32.3](https://github.com/serenity-js/serenity-js/compare/v3.32.2...v3.32.3) (2025-07-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** use 'node:' prefix for core node module imports ([b1775d5](https://github.com/serenity-js/serenity-js/commit/b1775d51f8e19e9ae0b140ec67aa07dd1391234d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [3.32.2](https://github.com/serenity-js/serenity-js/compare/v3.32.1...v3.32.2) (2025-06-21)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @serenity-js/local-server
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [3.32.1](https://github.com/serenity-js/serenity-js/compare/v3.32.0...v3.32.1) (2025-06-20)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @serenity-js/local-server
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalServer.d.ts","sourceRoot":"","sources":["../../../src/screenplay/questions/LocalServer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LocalServer.d.ts","sourceRoot":"","sources":["../../../src/screenplay/questions/LocalServer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMzD;;GAEG;AACH,qBAAa,WAAW;IAEpB;;;OAGG;IACH,MAAM,CAAC,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC;IAwBrC;;;OAGG;IACH,MAAM,CAAC,IAAI,IAAI,eAAe,CAAC,MAAM,CAAC;CAOzC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LocalServer = void 0;
|
|
4
|
+
const node_url_1 = require("node:url");
|
|
4
5
|
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const url_1 = require("url");
|
|
6
6
|
const abilities_1 = require("../abilities");
|
|
7
7
|
/**
|
|
8
8
|
* @group Questions
|
|
@@ -39,7 +39,7 @@ class LocalServer {
|
|
|
39
39
|
static port() {
|
|
40
40
|
return core_1.Question.about(`local server port number`, async (actor) => {
|
|
41
41
|
const url = await actor.answer(LocalServer.url());
|
|
42
|
-
return Number.parseInt(new
|
|
42
|
+
return Number.parseInt(new node_url_1.URL(url).port, 10);
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalServer.js","sourceRoot":"","sources":["../../../src/screenplay/questions/LocalServer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"LocalServer.js","sourceRoot":"","sources":["../../../src/screenplay/questions/LocalServer.ts"],"names":[],"mappings":";;;AAAA,uCAA+B;AAG/B,4CAAyD;AAGzD,4CAAkD;AAElD;;GAEG;AACH,MAAa,WAAW;IAEpB;;;OAGG;IACH,MAAM,CAAC,GAAG;QACN,OAAO,eAAQ,CAAC,KAAK,CAAS,6BAA6B,EAAE,KAAK,CAAC,EAAE;YACjE,OAAO,8BAAkB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE;gBACjE,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;gBAE9B,IAAI,CAAE,IAAI,EAAE,CAAC;oBACT,MAAM,IAAI,iBAAU,CAAC,qCAAqC,CAAC,CAAC;gBAChE,CAAC;gBAED,IAAI,CAAE,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;oBACxB,MAAM,IAAI,iBAAU,CAAC,yDAAyD,CAAC,CAAC;gBACpF,CAAC;gBAED,OAAO;oBACH,QAAQ;oBACR,KAAK;oBACL,GAAI,IAAI,CAAC,MAAO,EAAE,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,IAAK,IAAI,CAAC,OAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO;oBAClF,GAAG;oBACH,IAAI,CAAC,IAAI;iBACZ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,IAAI;QACP,OAAO,eAAQ,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE;YAC5D,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;YAElD,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,cAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAzCD,kCAyCC;AAED;;;GAGG;AACH,SAAS,aAAa,CAAC,gBAAsC;IACzD,OAAO,OAAO,gBAAgB,KAAK,QAAQ;WACpC,CAAC,CAAE,gBAAgB,CAAC,OAAO;WAC3B,CAAC,CAAE,gBAAgB,CAAC,MAAM;WAC1B,CAAC,CAAE,gBAAgB,CAAC,IAAI,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/local-server",
|
|
3
|
-
"version": "3.32.
|
|
3
|
+
"version": "3.32.3",
|
|
4
4
|
"description": "Serenity/JS Screenplay Pattern library for managing local Node.js test servers, including Express, Koa, Hapi, and Restify, to support comprehensive integration testing",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"node": "^18.12 || ^20 || ^22"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@serenity-js/core": "3.32.
|
|
60
|
+
"@serenity-js/core": "3.32.3",
|
|
61
61
|
"http-shutdown": "1.2.2",
|
|
62
62
|
"portfinder": "1.0.37"
|
|
63
63
|
},
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@hapi/hapi": "21.4.0",
|
|
86
86
|
"@integration/testing-tools": "3.0.0",
|
|
87
|
-
"@serenity-js/assertions": "3.32.
|
|
88
|
-
"@serenity-js/rest": "3.32.
|
|
87
|
+
"@serenity-js/assertions": "3.32.3",
|
|
88
|
+
"@serenity-js/rest": "3.32.3",
|
|
89
89
|
"@types/chai": "4.3.20",
|
|
90
90
|
"@types/express": "5.0.3",
|
|
91
91
|
"@types/hapi": "18.0.14",
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"c8": "10.1.3",
|
|
96
96
|
"express": "5.1.0",
|
|
97
97
|
"koa": "3.0.0",
|
|
98
|
-
"mocha": "11.7.
|
|
98
|
+
"mocha": "11.7.1",
|
|
99
99
|
"mocha-multi": "1.1.7",
|
|
100
100
|
"restify": "11.1.0",
|
|
101
101
|
"semver": "7.7.2",
|
|
102
102
|
"ts-node": "10.9.2",
|
|
103
103
|
"typescript": "5.8.3"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "3f999fb373b9c9df526391780c6295f067dd0e20"
|
|
106
106
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { URL } from 'node:url';
|
|
2
|
+
|
|
1
3
|
import type { QuestionAdapter } from '@serenity-js/core';
|
|
2
4
|
import { LogicError, Question } from '@serenity-js/core';
|
|
3
5
|
import type { AddressInfo } from 'net';
|
|
4
|
-
import { URL } from 'url';
|
|
5
6
|
|
|
6
7
|
import { ManageALocalServer } from '../abilities';
|
|
7
8
|
|