@serenity-js/rest 3.10.3 → 3.11.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/CHANGELOG.md +20 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/screenplay/abilities/AxiosRequestConfigDefaults.d.ts +14 -0
- package/lib/screenplay/abilities/AxiosRequestConfigDefaults.d.ts.map +1 -0
- package/lib/screenplay/abilities/AxiosRequestConfigDefaults.js +3 -0
- package/lib/screenplay/abilities/AxiosRequestConfigDefaults.js.map +1 -0
- package/lib/screenplay/abilities/CallAnApi.d.ts +297 -38
- package/lib/screenplay/abilities/CallAnApi.d.ts.map +1 -1
- package/lib/screenplay/abilities/CallAnApi.js +353 -44
- package/lib/screenplay/abilities/CallAnApi.js.map +1 -1
- package/lib/screenplay/abilities/index.d.ts +1 -0
- package/lib/screenplay/abilities/index.d.ts.map +1 -1
- package/lib/screenplay/abilities/index.js +1 -0
- package/lib/screenplay/abilities/index.js.map +1 -1
- package/lib/screenplay/abilities/proxy/ProxyAgent.d.ts +55 -0
- package/lib/screenplay/abilities/proxy/ProxyAgent.d.ts.map +1 -0
- package/lib/screenplay/abilities/proxy/ProxyAgent.js +107 -0
- package/lib/screenplay/abilities/proxy/ProxyAgent.js.map +1 -0
- package/lib/screenplay/abilities/proxy/axiosProxyOverridesFor.d.ts +12 -0
- package/lib/screenplay/abilities/proxy/axiosProxyOverridesFor.d.ts.map +1 -0
- package/lib/screenplay/abilities/proxy/axiosProxyOverridesFor.js +35 -0
- package/lib/screenplay/abilities/proxy/axiosProxyOverridesFor.js.map +1 -0
- package/lib/screenplay/abilities/proxy/createUrl.d.ts +10 -0
- package/lib/screenplay/abilities/proxy/createUrl.d.ts.map +1 -0
- package/lib/screenplay/abilities/proxy/createUrl.js +30 -0
- package/lib/screenplay/abilities/proxy/createUrl.js.map +1 -0
- package/lib/screenplay/abilities/proxy/index.d.ts +2 -0
- package/lib/screenplay/abilities/proxy/index.d.ts.map +1 -0
- package/lib/screenplay/abilities/proxy/index.js +18 -0
- package/lib/screenplay/abilities/proxy/index.js.map +1 -0
- package/lib/screenplay/index.d.ts +1 -0
- package/lib/screenplay/index.d.ts.map +1 -1
- package/lib/screenplay/index.js +1 -0
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/interactions/Send.d.ts +3 -3
- package/lib/screenplay/interactions/Send.js +3 -3
- package/lib/{models → screenplay/models}/DeleteRequest.d.ts +1 -1
- package/lib/screenplay/models/DeleteRequest.d.ts.map +1 -0
- package/lib/{models → screenplay/models}/DeleteRequest.js +1 -1
- package/lib/screenplay/models/DeleteRequest.js.map +1 -0
- package/lib/{models → screenplay/models}/GetRequest.d.ts +1 -1
- package/lib/screenplay/models/GetRequest.d.ts.map +1 -0
- package/lib/{models → screenplay/models}/GetRequest.js +1 -1
- package/lib/screenplay/models/GetRequest.js.map +1 -0
- package/lib/screenplay/models/HTTPRequest.d.ts.map +1 -0
- package/lib/screenplay/models/HTTPRequest.js.map +1 -0
- package/lib/{models → screenplay/models}/HeadRequest.d.ts +1 -1
- package/lib/screenplay/models/HeadRequest.d.ts.map +1 -0
- package/lib/{models → screenplay/models}/HeadRequest.js +1 -1
- package/lib/screenplay/models/HeadRequest.js.map +1 -0
- package/lib/{models → screenplay/models}/OptionsRequest.d.ts +1 -1
- package/lib/screenplay/models/OptionsRequest.d.ts.map +1 -0
- package/lib/{models → screenplay/models}/OptionsRequest.js +1 -1
- package/lib/screenplay/models/OptionsRequest.js.map +1 -0
- package/lib/{models → screenplay/models}/PatchRequest.d.ts +1 -1
- package/lib/screenplay/models/PatchRequest.d.ts.map +1 -0
- package/lib/{models → screenplay/models}/PatchRequest.js +1 -1
- package/lib/screenplay/models/PatchRequest.js.map +1 -0
- package/lib/{models → screenplay/models}/PostRequest.d.ts +1 -1
- package/lib/screenplay/models/PostRequest.d.ts.map +1 -0
- package/lib/{models → screenplay/models}/PostRequest.js +1 -1
- package/lib/screenplay/models/PostRequest.js.map +1 -0
- package/lib/{models → screenplay/models}/PutRequest.d.ts +2 -2
- package/lib/screenplay/models/PutRequest.d.ts.map +1 -0
- package/lib/{models → screenplay/models}/PutRequest.js +2 -2
- package/lib/screenplay/models/PutRequest.js.map +1 -0
- package/lib/screenplay/models/index.d.ts.map +1 -0
- package/lib/screenplay/models/index.js.map +1 -0
- package/lib/screenplay/questions/LastResponse.d.ts +2 -2
- package/lib/screenplay/questions/LastResponse.js +2 -2
- package/package.json +11 -6
- package/src/index.ts +0 -1
- package/src/screenplay/abilities/AxiosRequestConfigDefaults.ts +15 -0
- package/src/screenplay/abilities/CallAnApi.ts +355 -48
- package/src/screenplay/abilities/index.ts +1 -0
- package/src/screenplay/abilities/proxy/ProxyAgent.ts +129 -0
- package/src/screenplay/abilities/proxy/axiosProxyOverridesFor.ts +39 -0
- package/src/screenplay/abilities/proxy/createUrl.ts +39 -0
- package/src/screenplay/abilities/proxy/index.ts +1 -0
- package/src/screenplay/index.ts +1 -0
- package/src/screenplay/interactions/Send.ts +3 -3
- package/src/{models → screenplay/models}/DeleteRequest.ts +1 -1
- package/src/{models → screenplay/models}/GetRequest.ts +1 -1
- package/src/{models → screenplay/models}/HeadRequest.ts +1 -1
- package/src/{models → screenplay/models}/OptionsRequest.ts +1 -1
- package/src/{models → screenplay/models}/PatchRequest.ts +1 -1
- package/src/{models → screenplay/models}/PostRequest.ts +1 -1
- package/src/{models → screenplay/models}/PutRequest.ts +2 -2
- package/src/screenplay/questions/LastResponse.ts +2 -2
- package/lib/models/DeleteRequest.d.ts.map +0 -1
- package/lib/models/DeleteRequest.js.map +0 -1
- package/lib/models/GetRequest.d.ts.map +0 -1
- package/lib/models/GetRequest.js.map +0 -1
- package/lib/models/HTTPRequest.d.ts.map +0 -1
- package/lib/models/HTTPRequest.js.map +0 -1
- package/lib/models/HeadRequest.d.ts.map +0 -1
- package/lib/models/HeadRequest.js.map +0 -1
- package/lib/models/OptionsRequest.d.ts.map +0 -1
- package/lib/models/OptionsRequest.js.map +0 -1
- package/lib/models/PatchRequest.d.ts.map +0 -1
- package/lib/models/PatchRequest.js.map +0 -1
- package/lib/models/PostRequest.d.ts.map +0 -1
- package/lib/models/PostRequest.js.map +0 -1
- package/lib/models/PutRequest.d.ts.map +0 -1
- package/lib/models/PutRequest.js.map +0 -1
- package/lib/models/index.d.ts.map +0 -1
- package/lib/models/index.js.map +0 -1
- /package/lib/{models → screenplay/models}/HTTPRequest.d.ts +0 -0
- /package/lib/{models → screenplay/models}/HTTPRequest.js +0 -0
- /package/lib/{models → screenplay/models}/index.d.ts +0 -0
- /package/lib/{models → screenplay/models}/index.js +0 -0
- /package/src/{models → screenplay/models}/HTTPRequest.ts +0 -0
- /package/src/{models → screenplay/models}/index.ts +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ProxyAgent = void 0;
|
|
27
|
+
const core_1 = require("@serenity-js/core");
|
|
28
|
+
const agent_base_1 = require("agent-base");
|
|
29
|
+
const http = __importStar(require("http"));
|
|
30
|
+
const http_proxy_agent_1 = require("http-proxy-agent");
|
|
31
|
+
const https = __importStar(require("https"));
|
|
32
|
+
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
33
|
+
const lru_cache_1 = require("lru-cache");
|
|
34
|
+
const proxy_from_env_1 = require("proxy-from-env");
|
|
35
|
+
const protocols = [
|
|
36
|
+
...http_proxy_agent_1.HttpProxyAgent.protocols,
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* A simplified version of the original
|
|
40
|
+
* [`ProxyAgent`](https://github.com/TooTallNate/proxy-agents/blob/5923589c2e5206504772c250ac4f20fc31122d3b/packages/proxy-agent/src/index.ts)
|
|
41
|
+
* with fewer dependencies.
|
|
42
|
+
*
|
|
43
|
+
* Delegates requests to the appropriate `Agent` subclass based on the "proxy"
|
|
44
|
+
* environment variables, or the provided `agentOptions.getProxyForUrl` callback.
|
|
45
|
+
*
|
|
46
|
+
* Uses an LRU cache to prevent unnecessary creation of proxy `http.Agent` instances.
|
|
47
|
+
*/
|
|
48
|
+
class ProxyAgent extends agent_base_1.Agent {
|
|
49
|
+
constructor(agentOptions) {
|
|
50
|
+
super(agentOptions);
|
|
51
|
+
this.agentOptions = agentOptions;
|
|
52
|
+
/**
|
|
53
|
+
* Cache for `Agent` instances.
|
|
54
|
+
*/
|
|
55
|
+
this.cache = new lru_cache_1.LRUCache({
|
|
56
|
+
max: 20,
|
|
57
|
+
dispose: (value, key) => value.destroy(),
|
|
58
|
+
});
|
|
59
|
+
this.httpAgent = agentOptions?.httpAgent || new http.Agent(agentOptions);
|
|
60
|
+
this.httpsAgent = agentOptions?.httpsAgent || new https.Agent(agentOptions);
|
|
61
|
+
this.getProxyForUrl = agentOptions?.getProxyForUrl || proxy_from_env_1.getProxyForUrl;
|
|
62
|
+
}
|
|
63
|
+
async connect(request, options) {
|
|
64
|
+
const { secureEndpoint } = options;
|
|
65
|
+
const isWebSocket = request.getHeader('upgrade') === 'websocket';
|
|
66
|
+
const protocol = secureEndpoint
|
|
67
|
+
? (isWebSocket ? 'wss:' : 'https:')
|
|
68
|
+
: (isWebSocket ? 'ws:' : 'http:');
|
|
69
|
+
const host = request.getHeader('host');
|
|
70
|
+
const url = new URL(request.path, `${protocol}//${host}`).href;
|
|
71
|
+
const proxy = this.getProxyForUrl(url);
|
|
72
|
+
if (!proxy) {
|
|
73
|
+
return secureEndpoint
|
|
74
|
+
? this.httpsAgent
|
|
75
|
+
: this.httpAgent;
|
|
76
|
+
}
|
|
77
|
+
// attempt to get a cached `http.Agent` instance first
|
|
78
|
+
const cacheKey = `${protocol}+${proxy}`;
|
|
79
|
+
let agent = this.cache.get(cacheKey);
|
|
80
|
+
if (!agent) {
|
|
81
|
+
agent = this.createAgent(new URL(proxy), secureEndpoint || isWebSocket);
|
|
82
|
+
this.cache.set(cacheKey, agent);
|
|
83
|
+
}
|
|
84
|
+
return agent;
|
|
85
|
+
}
|
|
86
|
+
createAgent(proxyUrl, requiresTls) {
|
|
87
|
+
const protocol = proxyUrl.protocol.replace(':', '');
|
|
88
|
+
if (!this.isValidProtocol(protocol)) {
|
|
89
|
+
throw new core_1.ConfigurationError(`Unsupported protocol for proxy URL: ${proxyUrl}`);
|
|
90
|
+
}
|
|
91
|
+
const ctor = ProxyAgent.proxyAgents[protocol][requiresTls ? 1 : 0];
|
|
92
|
+
return new ctor(proxyUrl, this.agentOptions);
|
|
93
|
+
}
|
|
94
|
+
isValidProtocol(v) {
|
|
95
|
+
return protocols.includes(v);
|
|
96
|
+
}
|
|
97
|
+
destroy() {
|
|
98
|
+
this.cache.clear();
|
|
99
|
+
super.destroy();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.ProxyAgent = ProxyAgent;
|
|
103
|
+
ProxyAgent.proxyAgents = {
|
|
104
|
+
http: [http_proxy_agent_1.HttpProxyAgent, https_proxy_agent_1.HttpsProxyAgent],
|
|
105
|
+
https: [http_proxy_agent_1.HttpProxyAgent, https_proxy_agent_1.HttpsProxyAgent],
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=ProxyAgent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProxyAgent.js","sourceRoot":"","sources":["../../../../src/screenplay/abilities/proxy/ProxyAgent.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type * as http from 'http';
|
|
3
|
+
import type { AxiosRequestConfigDefaults } from '../AxiosRequestConfigDefaults';
|
|
4
|
+
/**
|
|
5
|
+
* @param options
|
|
6
|
+
*/
|
|
7
|
+
export declare function axiosProxyOverridesFor<Data = any>(options: AxiosRequestConfigDefaults<Data>): {
|
|
8
|
+
proxy: false;
|
|
9
|
+
httpAgent: http.Agent;
|
|
10
|
+
httpsAgent: http.Agent;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=axiosProxyOverridesFor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axiosProxyOverridesFor.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/abilities/proxy/axiosProxyOverridesFor.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,IAAI,MAAM,MAAM,CAAC;AAGlC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAIhF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,GAAG,GAAG,EAAE,OAAO,EAAE,0BAA0B,CAAC,IAAI,CAAC,GAAG;IAC3F,KAAK,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC;IAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAA;CAC9D,CA0BA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.axiosProxyOverridesFor = void 0;
|
|
4
|
+
const tiny_types_1 = require("tiny-types");
|
|
5
|
+
const createUrl_1 = require("./createUrl");
|
|
6
|
+
const ProxyAgent_1 = require("./ProxyAgent");
|
|
7
|
+
/**
|
|
8
|
+
* @param options
|
|
9
|
+
*/
|
|
10
|
+
function axiosProxyOverridesFor(options) {
|
|
11
|
+
const envProxyOverride = options.proxy
|
|
12
|
+
&& (0, createUrl_1.createUrl)({
|
|
13
|
+
username: options.proxy?.auth?.username,
|
|
14
|
+
password: options.proxy?.auth?.password,
|
|
15
|
+
protocol: options.proxy?.protocol,
|
|
16
|
+
hostname: (0, tiny_types_1.ensure)('proxy.host', options.proxy?.host, (0, tiny_types_1.isDefined)()),
|
|
17
|
+
port: options.proxy?.port
|
|
18
|
+
}).toString();
|
|
19
|
+
const agent = new ProxyAgent_1.ProxyAgent({
|
|
20
|
+
httpAgent: options.httpAgent,
|
|
21
|
+
httpsAgent: options.httpsAgent,
|
|
22
|
+
// if there's a specific proxy override configured, use it
|
|
23
|
+
// if not - detect proxy automatically based on env variables
|
|
24
|
+
getProxyForUrl: envProxyOverride
|
|
25
|
+
? (url_) => envProxyOverride
|
|
26
|
+
: undefined,
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
proxy: false,
|
|
30
|
+
httpAgent: agent,
|
|
31
|
+
httpsAgent: agent,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.axiosProxyOverridesFor = axiosProxyOverridesFor;
|
|
35
|
+
//# sourceMappingURL=axiosProxyOverridesFor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axiosProxyOverridesFor.js","sourceRoot":"","sources":["../../../../src/screenplay/abilities/proxy/axiosProxyOverridesFor.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAG/C,2CAAwC;AACxC,6CAA0C;AAE1C;;GAEG;AACH,SAAgB,sBAAsB,CAAa,OAAyC;IAGxF,MAAM,gBAAgB,GAAmB,OAAO,CAAC,KAAK;WAC/C,IAAA,qBAAS,EAAC;YACT,QAAQ,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ;YACvC,QAAQ,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ;YACvC,QAAQ,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ;YACjC,QAAQ,EAAE,IAAA,mBAAM,EAAC,YAAY,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,IAAA,sBAAS,GAAE,CAAC;YAChE,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI;SAC5B,CAAC,CAAC,QAAQ,EAAE,CAAC;IAElB,MAAM,KAAK,GAAG,IAAI,uBAAU,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;QAE9B,0DAA0D;QAC1D,6DAA6D;QAC7D,cAAc,EAAE,gBAAgB;YAC5B,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,gBAAgB;YACpC,CAAC,CAAC,SAAS;KAClB,CAAC,CAAC;IAEH,OAAO;QACH,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,KAAK;KACpB,CAAC;AACN,CAAC;AA5BD,wDA4BC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export interface CreateUrlOptions {
|
|
3
|
+
protocol?: string;
|
|
4
|
+
hostname: string;
|
|
5
|
+
port?: string | number;
|
|
6
|
+
username?: string;
|
|
7
|
+
password?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function createUrl(options: CreateUrlOptions): URL;
|
|
10
|
+
//# sourceMappingURL=createUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createUrl.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/abilities/proxy/createUrl.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,GAAG,CAYxD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createUrl = void 0;
|
|
4
|
+
const tiny_types_1 = require("tiny-types");
|
|
5
|
+
function createUrl(options) {
|
|
6
|
+
const hostname = (0, tiny_types_1.ensure)('hostname', options?.hostname, (0, tiny_types_1.isString)(), (0, tiny_types_1.isNotBlank)()).trim();
|
|
7
|
+
const port = options?.port
|
|
8
|
+
? ':' + options?.port
|
|
9
|
+
: (options?.protocol ? undefined : ':80');
|
|
10
|
+
return new URL([
|
|
11
|
+
options?.protocol && protocolFrom(options?.protocol),
|
|
12
|
+
(options?.username || options?.password) && credentialsFrom(options.username, options.password),
|
|
13
|
+
hostname,
|
|
14
|
+
port,
|
|
15
|
+
].filter(Boolean).join(''));
|
|
16
|
+
}
|
|
17
|
+
exports.createUrl = createUrl;
|
|
18
|
+
function protocolFrom(protocol) {
|
|
19
|
+
const protocolName = protocol.match(/([A-Za-z]+)[/:]*/)[1];
|
|
20
|
+
(0, tiny_types_1.ensure)('hostname', protocolName, (0, tiny_types_1.isDefined)());
|
|
21
|
+
return protocolName + '://';
|
|
22
|
+
}
|
|
23
|
+
function credentialsFrom(username, password) {
|
|
24
|
+
return [
|
|
25
|
+
username && encodeURIComponent(username),
|
|
26
|
+
password && ':' + encodeURIComponent(password),
|
|
27
|
+
'@'
|
|
28
|
+
].filter(Boolean).join('');
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=createUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createUrl.js","sourceRoot":"","sources":["../../../../src/screenplay/abilities/proxy/createUrl.ts"],"names":[],"mappings":";;;AAAA,2CAAqE;AAUrE,SAAgB,SAAS,CAAC,OAAyB;IAC/C,MAAM,QAAQ,GAAI,IAAA,mBAAM,EAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAA,qBAAQ,GAAE,EAAE,IAAA,uBAAU,GAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACzF,MAAM,IAAI,GAAQ,OAAO,EAAE,IAAI;QAC3B,CAAC,CAAC,GAAG,GAAG,OAAO,EAAE,IAAI;QACrB,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,IAAI,GAAG,CAAC;QACX,OAAO,EAAE,QAAQ,IAAI,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC;QACpD,CAAC,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC;QAC/F,QAAQ;QACR,IAAI;KACP,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAChC,CAAC;AAZD,8BAYC;AAED,SAAS,YAAY,CAAC,QAAiB;IACnC,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3D,IAAA,mBAAM,EAAC,UAAU,EAAE,YAAY,EAAE,IAAA,sBAAS,GAAE,CAAC,CAAC;IAE9C,OAAO,YAAY,GAAG,KAAK,CAAC;AAChC,CAAC;AAED,SAAS,eAAe,CAAC,QAAiB,EAAE,QAAiB;IACzD,OAAO;QACH,QAAQ,IAAI,kBAAkB,CAAC,QAAQ,CAAC;QACxC,QAAQ,IAAI,GAAG,GAAG,kBAAkB,CAAC,QAAQ,CAAC;QAC9C,GAAG;KACN,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/abilities/proxy/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./axiosProxyOverridesFor"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screenplay/abilities/proxy/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screenplay/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screenplay/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
package/lib/screenplay/index.js
CHANGED
|
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./abilities"), exports);
|
|
18
18
|
__exportStar(require("./interactions"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
19
20
|
__exportStar(require("./questions"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/screenplay/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/screenplay/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,2CAAyB;AACzB,8CAA4B"}
|
|
@@ -2,7 +2,7 @@ import type { Answerable, AnswersQuestions, CollectsArtifacts, UsesAbilities } f
|
|
|
2
2
|
import { Interaction } from '@serenity-js/core';
|
|
3
3
|
import type { AxiosRequestConfig } from 'axios';
|
|
4
4
|
/**
|
|
5
|
-
* Sends a {@apilink HTTPRequest} to a specified
|
|
5
|
+
* Sends a {@apilink HTTPRequest} to a specified URL.
|
|
6
6
|
*
|
|
7
7
|
* The response to the request is made available via {@apilink LastResponse}.
|
|
8
8
|
*
|
|
@@ -13,7 +13,7 @@ import type { AxiosRequestConfig } from 'axios';
|
|
|
13
13
|
* import { CallAnApi, GetRequest, LastResponse, Send } from '@serenity-js/rest'
|
|
14
14
|
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
15
15
|
*
|
|
16
|
-
* await actorCalled('
|
|
16
|
+
* await actorCalled('Apisitt')
|
|
17
17
|
* .whoCan(CallAnApi.at('https://api.example.org/'))
|
|
18
18
|
* .attemptsTo(
|
|
19
19
|
* Send.a(GetRequest.to('/books/0-688-00230-7')),
|
|
@@ -29,7 +29,7 @@ export declare class Send extends Interaction {
|
|
|
29
29
|
* Instantiates a new {@apilink Interaction|interaction} to {@apilink Send}.
|
|
30
30
|
*
|
|
31
31
|
* #### Learn more
|
|
32
|
-
* - [AxiosRequestConfig](https://
|
|
32
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
33
33
|
*
|
|
34
34
|
* @param request
|
|
35
35
|
*/
|
|
@@ -6,7 +6,7 @@ const model_1 = require("@serenity-js/core/lib/model");
|
|
|
6
6
|
const axios_1 = require("axios");
|
|
7
7
|
const abilities_1 = require("../abilities");
|
|
8
8
|
/**
|
|
9
|
-
* Sends a {@apilink HTTPRequest} to a specified
|
|
9
|
+
* Sends a {@apilink HTTPRequest} to a specified URL.
|
|
10
10
|
*
|
|
11
11
|
* The response to the request is made available via {@apilink LastResponse}.
|
|
12
12
|
*
|
|
@@ -17,7 +17,7 @@ const abilities_1 = require("../abilities");
|
|
|
17
17
|
* import { CallAnApi, GetRequest, LastResponse, Send } from '@serenity-js/rest'
|
|
18
18
|
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
19
19
|
*
|
|
20
|
-
* await actorCalled('
|
|
20
|
+
* await actorCalled('Apisitt')
|
|
21
21
|
* .whoCan(CallAnApi.at('https://api.example.org/'))
|
|
22
22
|
* .attemptsTo(
|
|
23
23
|
* Send.a(GetRequest.to('/books/0-688-00230-7')),
|
|
@@ -32,7 +32,7 @@ class Send extends core_1.Interaction {
|
|
|
32
32
|
* Instantiates a new {@apilink Interaction|interaction} to {@apilink Send}.
|
|
33
33
|
*
|
|
34
34
|
* #### Learn more
|
|
35
|
-
* - [AxiosRequestConfig](https://
|
|
35
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
36
36
|
*
|
|
37
37
|
* @param request
|
|
38
38
|
*/
|
|
@@ -56,7 +56,7 @@ export declare class DeleteRequest extends HTTPRequest {
|
|
|
56
56
|
* #### Learn more
|
|
57
57
|
* - {@apilink Answerable}
|
|
58
58
|
* - {@apilink WithAnswerableProperties}
|
|
59
|
-
* - [AxiosRequestConfig](https://
|
|
59
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
60
60
|
*
|
|
61
61
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
62
62
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteRequest.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/DeleteRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAE1C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,aAAa;IAIzD;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,GAAG,aAAa;CAGzF"}
|
|
@@ -60,7 +60,7 @@ class DeleteRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
60
60
|
* #### Learn more
|
|
61
61
|
* - {@apilink Answerable}
|
|
62
62
|
* - {@apilink WithAnswerableProperties}
|
|
63
|
-
* - [AxiosRequestConfig](https://
|
|
63
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
64
64
|
*
|
|
65
65
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
66
66
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteRequest.js","sourceRoot":"","sources":["../../../src/screenplay/models/DeleteRequest.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAG7C,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAa,aAAc,SAAQ,yBAAW;IAE1C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAgE;QAClE,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACvF,CAAC;CACJ;AAhCD,sCAgCC"}
|
|
@@ -63,7 +63,7 @@ export declare class GetRequest extends HTTPRequest {
|
|
|
63
63
|
* #### Learn more
|
|
64
64
|
* - {@apilink Answerable}
|
|
65
65
|
* - {@apilink WithAnswerableProperties}
|
|
66
|
-
* - [AxiosRequestConfig](https://
|
|
66
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
67
67
|
*
|
|
68
68
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
69
69
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetRequest.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/GetRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,qBAAa,UAAW,SAAQ,WAAW;IAEvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,UAAU;IAItD;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,GAAG,UAAU;CAGtF"}
|
|
@@ -67,7 +67,7 @@ class GetRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
67
67
|
* #### Learn more
|
|
68
68
|
* - {@apilink Answerable}
|
|
69
69
|
* - {@apilink WithAnswerableProperties}
|
|
70
|
-
* - [AxiosRequestConfig](https://
|
|
70
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
71
71
|
*
|
|
72
72
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
73
73
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetRequest.js","sourceRoot":"","sources":["../../../src/screenplay/models/GetRequest.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAG7C,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAa,UAAW,SAAQ,yBAAW;IAEvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAgE;QAClE,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACpF,CAAC;CACJ;AAhCD,gCAgCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HTTPRequest.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/HTTPRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD;;;;;GAKG;AACH,8BAAsB,WAAY,SAAQ,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAgBvE,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC;IACnD,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC;IACzC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IAhBxF,OAAO,CAAC,OAAO,CAAS;IAExB;;;;;;;;;;OAUG;IACH,SAAS,aACc,WAAW,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,EAChC,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EACtB,MAAM,CAAC,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IAMxF;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA0BhF;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKlC;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAO7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HTTPRequest.js","sourceRoot":"","sources":["../../../src/screenplay/models/HTTPRequest.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAC7C,iDAA6C;AAG7C;;;;;GAKG;AACH,MAAsB,WAAY,SAAQ,eAAqC;IAI3E;;;;;;;;;;OAUG;IACH,YACuB,WAAgC,EAChC,IAAsB,EACtB,MAAiE;QAEpF,KAAK,EAAE,CAAC;QAJW,gBAAW,GAAX,WAAW,CAAqB;QAChC,SAAI,GAAJ,IAAI,CAAkB;QACtB,WAAM,GAAN,MAAM,CAA2D;QAGpF,IAAI,CAAC,OAAO,GAAG,GAAI,IAAI,CAAC,kBAAkB,EAAG,OAAQ,IAAA,MAAC,EAAA,GAAI,IAAI,CAAC,WAAY,EAAG,EAAE,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,KAAuC;QAC9C,OAAO,OAAO,CAAC,GAAG,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC7E,IAAI,CAAC,MAAM,CAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAQ,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YACzE,IAAI,CAAC,IAAI,CAAQ,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAU,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;SAChF,CAAC;YACF,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAEzB,MAAM,CAAC,MAAM,CACT,EAAE,EACF,EAAE,GAAG,EAAE,IAAI,EAAE,EACb,MAAM,EACN,EAAE,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,CACpC,CACJ;YACD,IAAI,CAAC,MAAM,CAAC,EAAE;QACV,8DAA8D;QAC9D,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YACpC,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,EAAG;gBACpD,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;aAC1B;YACD,OAAO,GAAG,CAAC;QACf,CAAC,EAAE,EAAE,CAAC,CACT,CAAC;IACN,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,QAAQ;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;;OAGG;IACK,cAAc;QAClB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACtE,CAAC;IAED;;OAEG;IACK,kBAAkB;QACtB,MACI,MAAM,GAAG,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAE,EACpC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAEnC,OAAO,GAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAI,IAAK,MAAO,UAAU,CAAC;IAC9E,CAAC;CACJ;AAtFD,kCAsFC"}
|
|
@@ -48,7 +48,7 @@ export declare class HeadRequest extends HTTPRequest {
|
|
|
48
48
|
* #### Learn more
|
|
49
49
|
* - {@apilink Answerable}
|
|
50
50
|
* - {@apilink WithAnswerableProperties}
|
|
51
|
-
* - [AxiosRequestConfig](https://
|
|
51
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
52
52
|
*
|
|
53
53
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
54
54
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadRequest.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/HeadRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAExC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,WAAW;IAIvD;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,GAAG,WAAW;CAGvF"}
|
|
@@ -52,7 +52,7 @@ class HeadRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
52
52
|
* #### Learn more
|
|
53
53
|
* - {@apilink Answerable}
|
|
54
54
|
* - {@apilink WithAnswerableProperties}
|
|
55
|
-
* - [AxiosRequestConfig](https://
|
|
55
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
56
56
|
*
|
|
57
57
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
58
58
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadRequest.js","sourceRoot":"","sources":["../../../src/screenplay/models/HeadRequest.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAG7C,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,WAAY,SAAQ,yBAAW;IAExC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAgE;QAClE,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACrF,CAAC;CACJ;AAhCD,kCAgCC"}
|
|
@@ -51,7 +51,7 @@ export declare class OptionsRequest extends HTTPRequest {
|
|
|
51
51
|
* #### Learn more
|
|
52
52
|
* - {@apilink Answerable}
|
|
53
53
|
* - {@apilink WithAnswerableProperties}
|
|
54
|
-
* - [AxiosRequestConfig](https://
|
|
54
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
55
55
|
*
|
|
56
56
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
57
57
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionsRequest.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/OptionsRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAE3C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,cAAc;IAI1D;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,GAAG,cAAc;CAG1F"}
|
|
@@ -55,7 +55,7 @@ class OptionsRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
55
55
|
* #### Learn more
|
|
56
56
|
* - {@apilink Answerable}
|
|
57
57
|
* - {@apilink WithAnswerableProperties}
|
|
58
|
-
* - [AxiosRequestConfig](https://
|
|
58
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
59
59
|
*
|
|
60
60
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
61
61
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionsRequest.js","sourceRoot":"","sources":["../../../src/screenplay/models/OptionsRequest.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAG7C,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,cAAe,SAAQ,yBAAW;IAE3C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAgE;QAClE,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACxF,CAAC;CACJ;AAhCD,wCAgCC"}
|
|
@@ -55,7 +55,7 @@ export declare class PatchRequest extends HTTPRequest {
|
|
|
55
55
|
* #### Learn more
|
|
56
56
|
* - {@apilink Answerable}
|
|
57
57
|
* - {@apilink WithAnswerableProperties}
|
|
58
|
-
* - [AxiosRequestConfig](https://
|
|
58
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
59
59
|
*
|
|
60
60
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
61
61
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PatchRequest.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PatchRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAEzC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY;IAIxD;;;;;OAKG;IACH,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,YAAY;IAIzC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,GAAG,YAAY;CAGxF"}
|
|
@@ -61,7 +61,7 @@ class PatchRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
61
61
|
* #### Learn more
|
|
62
62
|
* - {@apilink Answerable}
|
|
63
63
|
* - {@apilink WithAnswerableProperties}
|
|
64
|
-
* - [AxiosRequestConfig](https://
|
|
64
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
65
65
|
*
|
|
66
66
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
67
67
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PatchRequest.js","sourceRoot":"","sources":["../../../src/screenplay/models/PatchRequest.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAG7C,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,YAAa,SAAQ,yBAAW;IAEzC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,YAAY,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,IAAqB;QACtB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAgE;QAClE,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACtF,CAAC;CACJ;AA1CD,oCA0CC"}
|
|
@@ -95,7 +95,7 @@ export declare class PostRequest extends HTTPRequest {
|
|
|
95
95
|
* #### Learn more
|
|
96
96
|
* - {@apilink Answerable}
|
|
97
97
|
* - {@apilink WithAnswerableProperties}
|
|
98
|
-
* - [AxiosRequestConfig](https://
|
|
98
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
99
99
|
*
|
|
100
100
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
101
101
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostRequest.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PostRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAExC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,WAAW;IAIvD;;;;;OAKG;IACH,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,WAAW;IAIxC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,GAAG,WAAW;CAGvF"}
|
|
@@ -101,7 +101,7 @@ class PostRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
101
101
|
* #### Learn more
|
|
102
102
|
* - {@apilink Answerable}
|
|
103
103
|
* - {@apilink WithAnswerableProperties}
|
|
104
|
-
* - [AxiosRequestConfig](https://
|
|
104
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
105
105
|
*
|
|
106
106
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
107
107
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostRequest.js","sourceRoot":"","sources":["../../../src/screenplay/models/PostRequest.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAG7C,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,MAAa,WAAY,SAAQ,yBAAW;IAExC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,IAAqB;QACtB,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAgE;QAClE,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACrF,CAAC;CACJ;AA1CD,kCA0CC"}
|
|
@@ -20,7 +20,7 @@ import { HTTPRequest } from './HTTPRequest';
|
|
|
20
20
|
* import { CallAnApi, LastResponse, PutRequest, Send } from '@serenity-js/rest';
|
|
21
21
|
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
22
22
|
*
|
|
23
|
-
* await actorCalled('
|
|
23
|
+
* await actorCalled('Apisitt')
|
|
24
24
|
* .whoCan(CallAnApi.at('https://api.example.org/'))
|
|
25
25
|
* .attemptsTo(
|
|
26
26
|
* Send.a(PutRequest.to('/books/0-688-00230-7').with({
|
|
@@ -65,7 +65,7 @@ export declare class PutRequest extends HTTPRequest {
|
|
|
65
65
|
* #### Learn more
|
|
66
66
|
* - {@apilink Answerable}
|
|
67
67
|
* - {@apilink WithAnswerableProperties}
|
|
68
|
-
* - [AxiosRequestConfig](https://
|
|
68
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
69
69
|
*
|
|
70
70
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
71
71
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PutRequest.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PutRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,qBAAa,UAAW,SAAQ,WAAW;IAEvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,UAAU;IAItD;;;;;OAKG;IACH,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU;IAIvC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,GAAG,UAAU;CAGtF"}
|
|
@@ -22,7 +22,7 @@ const HTTPRequest_1 = require("./HTTPRequest");
|
|
|
22
22
|
* import { CallAnApi, LastResponse, PutRequest, Send } from '@serenity-js/rest';
|
|
23
23
|
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
24
24
|
*
|
|
25
|
-
* await actorCalled('
|
|
25
|
+
* await actorCalled('Apisitt')
|
|
26
26
|
* .whoCan(CallAnApi.at('https://api.example.org/'))
|
|
27
27
|
* .attemptsTo(
|
|
28
28
|
* Send.a(PutRequest.to('/books/0-688-00230-7').with({
|
|
@@ -71,7 +71,7 @@ class PutRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
71
71
|
* #### Learn more
|
|
72
72
|
* - {@apilink Answerable}
|
|
73
73
|
* - {@apilink WithAnswerableProperties}
|
|
74
|
-
* - [AxiosRequestConfig](https://
|
|
74
|
+
* - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
|
|
75
75
|
*
|
|
76
76
|
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
77
77
|
* Axios request configuration overrides
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PutRequest.js","sourceRoot":"","sources":["../../../src/screenplay/models/PutRequest.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAG7C,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAa,UAAW,SAAQ,yBAAW;IAEvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,IAAqB;QACtB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAgE;QAClE,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACpF,CAAC;CACJ;AA1CD,gCA0CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,+CAA6B;AAC7B,gDAA8B;AAC9B,gDAA8B;AAC9B,mDAAiC;AACjC,iDAA+B;AAC/B,gDAA8B;AAC9B,+CAA6B"}
|
|
@@ -16,7 +16,7 @@ import type { RawAxiosResponseHeaders } from 'axios';
|
|
|
16
16
|
* author: string;
|
|
17
17
|
* }
|
|
18
18
|
*
|
|
19
|
-
* await actorCalled('
|
|
19
|
+
* await actorCalled('Apisitt')
|
|
20
20
|
* .whoCan(CallAnApi.at('https://api.example.org/'))
|
|
21
21
|
* .attemptsTo(
|
|
22
22
|
* Send.a(GetRequest.to('/books/0-688-00230-7')),
|
|
@@ -58,7 +58,7 @@ import type { RawAxiosResponseHeaders } from 'axios';
|
|
|
58
58
|
* ```
|
|
59
59
|
*
|
|
60
60
|
* ## Learn more
|
|
61
|
-
* - [AxiosResponse](https://
|
|
61
|
+
* - [AxiosResponse](https://axios-http.com/docs/res_schema)
|
|
62
62
|
*
|
|
63
63
|
* @group Questions
|
|
64
64
|
*/
|