@serenity-js/serenity-bdd 3.7.0 → 3.7.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/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.7.2](https://github.com/serenity-js/serenity-js/compare/v3.7.1...v3.7.2) (2023-07-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @serenity-js/serenity-bdd
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.7.1](https://github.com/serenity-js/serenity-js/compare/v3.7.0...v3.7.1) (2023-07-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **serenity-bdd:** corrected downloading Serenity BDD jar using HTTP Proxy Agent ([48f79b9](https://github.com/serenity-js/serenity-js/commit/48f79b950b596e124afc415cab4a72279e50b367)), closes [#1795](https://github.com/serenity-js/serenity-js/issues/1795)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [3.7.0](https://github.com/serenity-js/serenity-js/compare/v3.6.1...v3.7.0) (2023-07-20)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @serenity-js/serenity-bdd
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../src/cli/io/axiosClient.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,aAAa,EAAwC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../src/cli/io/axiosClient.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,aAAa,EAAwC,MAAM,OAAO,CAAC;AAKjF,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;GAEG;AACH,wBAAgB,WAAW,CACvB,UAAU,EAAE,GAAG,EACf,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAC9B,cAAc,CAAC,EAAE,WAAW,GAC7B,aAAa,CAmCf;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAuBjG;AA8DD,KAAK,MAAM,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -31,8 +31,8 @@ const core_1 = require("@serenity-js/core");
|
|
|
31
31
|
const axios_1 = __importDefault(require("axios"));
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
const https = __importStar(require("https"));
|
|
34
|
+
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
34
35
|
const url_1 = require("url");
|
|
35
|
-
const HttpsProxyAgent = require('https-proxy-agent'); // eslint-disable-line @typescript-eslint/no-var-requires
|
|
36
36
|
/**
|
|
37
37
|
* @package
|
|
38
38
|
*/
|
|
@@ -46,12 +46,12 @@ function axiosClient(repository, ignoreSsl, env, repositoryAuth) {
|
|
|
46
46
|
const options = {
|
|
47
47
|
baseURL: repository.toString(),
|
|
48
48
|
adapter: ['http'],
|
|
49
|
-
auth: repositoryAuth,
|
|
49
|
+
auth: repositoryAuth.toJSON(),
|
|
50
50
|
};
|
|
51
51
|
if (isHttps(repository.protocol)) {
|
|
52
52
|
options.proxy = false;
|
|
53
53
|
options.httpsAgent = shouldProxy(repository, configuredProxy, configuredNoProxy)
|
|
54
|
-
? proxiedHttpsAgent(
|
|
54
|
+
? proxiedHttpsAgent(configuredProxy.value, configuredCa, rejectUnauthorized)
|
|
55
55
|
: httpsAgent(configuredCa, rejectUnauthorized);
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
@@ -89,9 +89,6 @@ function shouldProxy(url, configuredProxy, configuredNoProxy) {
|
|
|
89
89
|
}
|
|
90
90
|
exports.shouldProxy = shouldProxy;
|
|
91
91
|
function proxyConfigFrom(proxyUrl) {
|
|
92
|
-
if (!proxyUrl || !proxyUrl.value) {
|
|
93
|
-
return undefined;
|
|
94
|
-
}
|
|
95
92
|
let parsed;
|
|
96
93
|
try {
|
|
97
94
|
parsed = new url_1.URL(proxyUrl.value);
|
|
@@ -118,8 +115,8 @@ function shouldRejectUnauthorizedCertificates(env, ignoreSsl) {
|
|
|
118
115
|
return !ignoreSsl
|
|
119
116
|
|| env.npm_config_strict_ssl === 'true';
|
|
120
117
|
}
|
|
121
|
-
function proxiedHttpsAgent(
|
|
122
|
-
return new HttpsProxyAgent({ ca, rejectUnauthorized
|
|
118
|
+
function proxiedHttpsAgent(configuredProxy, ca, rejectUnauthorized) {
|
|
119
|
+
return new https_proxy_agent_1.HttpsProxyAgent(configuredProxy, { ca, rejectUnauthorized });
|
|
123
120
|
}
|
|
124
121
|
function httpsAgent(ca, rejectUnauthorized) {
|
|
125
122
|
return new https.Agent({ ca, rejectUnauthorized, });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axiosClient.js","sourceRoot":"","sources":["../../../src/cli/io/axiosClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAuD;AAEvD,kDAA0B;AAC1B,uCAAyB;AACzB,6CAA+B;AAC/B,6BAA0B;AAI1B
|
|
1
|
+
{"version":3,"file":"axiosClient.js","sourceRoot":"","sources":["../../../src/cli/io/axiosClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAuD;AAEvD,kDAA0B;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version": "3.7.2",
|
|
4
4
|
"description": "Serenity BDD reporter for Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"node": "^16.13 || ^18.12 || ^20"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@serenity-js/assertions": "3.7.
|
|
49
|
-
"@serenity-js/core": "3.7.
|
|
50
|
-
"@serenity-js/rest": "3.7.
|
|
48
|
+
"@serenity-js/assertions": "3.7.2",
|
|
49
|
+
"@serenity-js/core": "3.7.2",
|
|
50
|
+
"@serenity-js/rest": "3.7.2",
|
|
51
51
|
"ansi-regex": "^5.0.1",
|
|
52
52
|
"axios": "^1.4.0",
|
|
53
53
|
"chalk": "^4.1.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/chai": "^4.3.5",
|
|
64
64
|
"@types/mocha": "^10.0.1",
|
|
65
65
|
"@types/progress": "^2.0.5",
|
|
66
|
-
"c8": "8.0.
|
|
66
|
+
"c8": "8.0.1",
|
|
67
67
|
"if-env": "^1.0.4",
|
|
68
68
|
"memfs": "^4.2.0",
|
|
69
69
|
"mocha": "^10.2.0",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"ts-node": "^10.9.1",
|
|
72
72
|
"typescript": "^5.1.6"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "1803ef1287e21b4b6239f0800788483fe4e9d580"
|
|
75
75
|
}
|
|
@@ -3,12 +3,11 @@ import type { AxiosInstance, AxiosProxyConfig, AxiosRequestConfig } from 'axios'
|
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import * as fs from 'fs';
|
|
5
5
|
import * as https from 'https';
|
|
6
|
+
import { HttpsProxyAgent } from 'https-proxy-agent';
|
|
6
7
|
import { URL } from 'url';
|
|
7
8
|
|
|
8
9
|
import type { Credentials } from '../model';
|
|
9
10
|
|
|
10
|
-
const HttpsProxyAgent = require('https-proxy-agent'); // eslint-disable-line @typescript-eslint/no-var-requires
|
|
11
|
-
|
|
12
11
|
/**
|
|
13
12
|
* @package
|
|
14
13
|
*/
|
|
@@ -32,13 +31,13 @@ export function axiosClient(
|
|
|
32
31
|
const options: AxiosRequestConfig = {
|
|
33
32
|
baseURL: repository.toString(),
|
|
34
33
|
adapter: [ 'http' ],
|
|
35
|
-
auth: repositoryAuth,
|
|
34
|
+
auth: repositoryAuth.toJSON() as { username: string, password: string },
|
|
36
35
|
};
|
|
37
36
|
|
|
38
37
|
if (isHttps(repository.protocol)) {
|
|
39
38
|
options.proxy = false;
|
|
40
39
|
options.httpsAgent = shouldProxy(repository, configuredProxy, configuredNoProxy)
|
|
41
|
-
? proxiedHttpsAgent(
|
|
40
|
+
? proxiedHttpsAgent(configuredProxy.value, configuredCa, rejectUnauthorized)
|
|
42
41
|
: httpsAgent(configuredCa, rejectUnauthorized);
|
|
43
42
|
}
|
|
44
43
|
else {
|
|
@@ -84,10 +83,6 @@ export function shouldProxy(url: URL, configuredProxy: EnvVar, configuredNoProxy
|
|
|
84
83
|
|
|
85
84
|
function proxyConfigFrom(proxyUrl: EnvVar): AxiosProxyConfig | undefined {
|
|
86
85
|
|
|
87
|
-
if (! proxyUrl || ! proxyUrl.value) {
|
|
88
|
-
return undefined;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
86
|
let parsed: URL;
|
|
92
87
|
|
|
93
88
|
try {
|
|
@@ -120,8 +115,8 @@ function shouldRejectUnauthorizedCertificates(env: { [key: string]: string }, ig
|
|
|
120
115
|
|| env.npm_config_strict_ssl === 'true'
|
|
121
116
|
}
|
|
122
117
|
|
|
123
|
-
function proxiedHttpsAgent(
|
|
124
|
-
return new HttpsProxyAgent({ ca, rejectUnauthorized
|
|
118
|
+
function proxiedHttpsAgent(configuredProxy: string, ca: string, rejectUnauthorized: boolean) {
|
|
119
|
+
return new HttpsProxyAgent(configuredProxy, { ca, rejectUnauthorized });
|
|
125
120
|
}
|
|
126
121
|
|
|
127
122
|
function httpsAgent(ca: string, rejectUnauthorized: boolean): https.Agent {
|