@api-client/core 0.3.12 → 0.4.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/build/browser.d.ts +4 -5
- package/build/browser.js +4 -5
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +5 -6
- package/build/index.js +5 -6
- package/build/index.js.map +1 -1
- package/build/src/data/JmesparthReader.d.ts +1 -1
- package/build/src/data/JmesparthReader.js +1 -1
- package/build/src/events/models/ProjectEvents.d.ts +1 -1
- package/build/src/events/models/ProjectEvents.js +1 -2
- package/build/src/events/models/ProjectEvents.js.map +1 -1
- package/build/src/lib/transformers/PayloadSerializer.d.ts +2 -2
- package/build/src/lib/transformers/PayloadSerializer.js +3 -3
- package/build/src/lib/transformers/PayloadSerializer.js.map +1 -1
- package/build/src/mocking/ProjectMock.d.ts +1 -1
- package/build/src/mocking/lib/Request.d.ts +2 -2
- package/build/src/mocking/lib/Request.js +3 -2
- package/build/src/mocking/lib/Request.js.map +1 -1
- package/build/src/mocking/lib/Response.d.ts +6 -6
- package/build/src/mocking/lib/Response.js +6 -6
- package/build/src/mocking/lib/Response.js.map +1 -1
- package/build/src/mocking/lib/User.js +3 -0
- package/build/src/mocking/lib/User.js.map +1 -1
- package/build/src/models/AuthorizationData.d.ts +2 -2
- package/build/src/models/AuthorizationData.js +2 -2
- package/build/src/models/ClientCertificate.d.ts +1 -1
- package/build/src/models/Environment.d.ts +3 -3
- package/build/src/models/Environment.js +3 -3
- package/build/src/models/Environment.js.map +1 -1
- package/build/src/models/ErrorResponse.d.ts +1 -1
- package/build/src/models/ErrorResponse.js +1 -1
- package/build/src/models/HistoryIndex.d.ts +3 -1
- package/build/src/models/HistoryIndex.js +3 -0
- package/build/src/models/HistoryIndex.js.map +1 -1
- package/build/src/models/HostRule.d.ts +4 -4
- package/build/src/models/HostRule.js +4 -4
- package/build/src/models/HostRule.js.map +1 -1
- package/build/src/models/HttpHistory.d.ts +1 -1
- package/build/src/models/HttpHistory.js +1 -1
- package/build/src/models/HttpHistory.js.map +1 -1
- package/build/src/models/HttpProject.d.ts +4 -5
- package/build/src/models/HttpProject.js +3 -3
- package/build/src/models/HttpProject.js.map +1 -1
- package/build/src/models/HttpProjectListItem.d.ts +1 -1
- package/build/src/models/HttpProjectListItem.js +1 -1
- package/build/src/models/HttpProjectListItem.js.map +1 -1
- package/build/src/models/HttpRequest.d.ts +2 -2
- package/build/src/models/HttpRequest.js +2 -2
- package/build/src/models/HttpRequest.js.map +1 -1
- package/build/src/models/HttpResponse.d.ts +2 -2
- package/build/src/models/HttpResponse.js +3 -3
- package/build/src/models/HttpResponse.js.map +1 -1
- package/build/src/models/License.d.ts +3 -3
- package/build/src/models/License.js +3 -3
- package/build/src/models/License.js.map +1 -1
- package/build/src/models/ProjectFolder.d.ts +2 -2
- package/build/src/models/ProjectFolder.js +3 -3
- package/build/src/models/ProjectFolder.js.map +1 -1
- package/build/src/models/ProjectItem.d.ts +1 -1
- package/build/src/models/ProjectItem.js +2 -2
- package/build/src/models/ProjectItem.js.map +1 -1
- package/build/src/models/ProjectRequest.d.ts +2 -2
- package/build/src/models/ProjectRequest.js +1 -1
- package/build/src/models/ProjectRequest.js.map +1 -1
- package/build/src/models/ProjectSchema.d.ts +2 -2
- package/build/src/models/ProjectSchema.js +1 -1
- package/build/src/models/ProjectSchema.js.map +1 -1
- package/build/src/models/Property.d.ts +4 -4
- package/build/src/models/Property.js +4 -4
- package/build/src/models/Property.js.map +1 -1
- package/build/src/models/Provider.d.ts +3 -3
- package/build/src/models/Provider.js +3 -3
- package/build/src/models/Provider.js.map +1 -1
- package/build/src/models/Request.d.ts +2 -2
- package/build/src/models/Request.js +3 -3
- package/build/src/models/Request.js.map +1 -1
- package/build/src/models/RequestActions.d.ts +2 -4
- package/build/src/models/RequestActions.js +2 -4
- package/build/src/models/RequestActions.js.map +1 -1
- package/build/src/models/RequestAuthorization.d.ts +3 -5
- package/build/src/models/RequestAuthorization.js +2 -4
- package/build/src/models/RequestAuthorization.js.map +1 -1
- package/build/src/models/RequestConfig.d.ts +3 -5
- package/build/src/models/RequestConfig.js +1 -3
- package/build/src/models/RequestConfig.js.map +1 -1
- package/build/src/models/RequestLog.d.ts +6 -8
- package/build/src/models/RequestLog.js +4 -6
- package/build/src/models/RequestLog.js.map +1 -1
- package/build/src/models/RequestTime.d.ts +4 -6
- package/build/src/models/RequestTime.js +2 -4
- package/build/src/models/RequestTime.js.map +1 -1
- package/build/src/models/RequestUiMeta.d.ts +5 -5
- package/build/src/models/RequestUiMeta.js +2 -2
- package/build/src/models/RequestUiMeta.js.map +1 -1
- package/build/src/models/RequestsSize.d.ts +1 -3
- package/build/src/models/RequestsSize.js +1 -3
- package/build/src/models/RequestsSize.js.map +1 -1
- package/build/src/models/{ArcResponse.d.ts → Response.d.ts} +7 -9
- package/build/src/models/{ArcResponse.js → Response.js} +4 -6
- package/build/src/models/Response.js.map +1 -0
- package/build/src/models/ResponseAuthorization.d.ts +3 -3
- package/build/src/models/ResponseAuthorization.js +3 -3
- package/build/src/models/ResponseAuthorization.js.map +1 -1
- package/build/src/models/ResponseRedirect.d.ts +3 -5
- package/build/src/models/ResponseRedirect.js +1 -3
- package/build/src/models/ResponseRedirect.js.map +1 -1
- package/build/src/models/RevisionInfo.d.ts +1 -1
- package/build/src/models/RevisionInfo.js +1 -1
- package/build/src/models/RevisionInfo.js.map +1 -1
- package/build/src/models/SentRequest.d.ts +2 -4
- package/build/src/models/SentRequest.js +1 -3
- package/build/src/models/SentRequest.js.map +1 -1
- package/build/src/models/Server.d.ts +3 -3
- package/build/src/models/Server.js +3 -3
- package/build/src/models/Server.js.map +1 -1
- package/build/src/models/Thing.d.ts +3 -3
- package/build/src/models/Thing.js +3 -3
- package/build/src/models/Thing.js.map +1 -1
- package/build/src/models/Url.d.ts +2 -4
- package/build/src/models/Url.js +2 -4
- package/build/src/models/Url.js.map +1 -1
- package/build/src/models/User.d.ts +2 -1
- package/build/src/models/User.js +1 -1
- package/build/src/models/User.js.map +1 -1
- package/build/src/models/WebApi.d.ts +1 -1
- package/build/src/models/WebApi.js +1 -1
- package/build/src/models/WebApi.js.map +1 -1
- package/build/src/models/WebApiIndex.d.ts +1 -1
- package/build/src/models/WebApiIndex.js +1 -1
- package/build/src/models/WebApiIndex.js.map +1 -1
- package/build/src/models/Workspace.d.ts +4 -4
- package/build/src/models/Workspace.js +4 -4
- package/build/src/models/Workspace.js.map +1 -1
- package/build/src/models/actions/Action.d.ts +2 -2
- package/build/src/models/actions/Action.js +1 -1
- package/build/src/models/actions/Action.js.map +1 -1
- package/build/src/models/actions/Condition.d.ts +2 -2
- package/build/src/models/actions/Condition.js +1 -1
- package/build/src/models/actions/Condition.js.map +1 -1
- package/build/src/models/actions/RunnableAction.d.ts +1 -1
- package/build/src/models/actions/RunnableAction.js +1 -1
- package/build/src/models/actions/RunnableAction.js.map +1 -1
- package/build/src/models/actions/runnable/DeleteCookieAction.d.ts +2 -2
- package/build/src/models/actions/runnable/DeleteCookieAction.js +1 -1
- package/build/src/models/actions/runnable/DeleteCookieAction.js.map +1 -1
- package/build/src/models/actions/runnable/SetCookieAction.d.ts +2 -2
- package/build/src/models/actions/runnable/SetCookieAction.js +1 -1
- package/build/src/models/actions/runnable/SetCookieAction.js.map +1 -1
- package/build/src/models/actions/runnable/SetVariableAction.d.ts +2 -2
- package/build/src/models/actions/runnable/SetVariableAction.js +1 -1
- package/build/src/models/actions/runnable/SetVariableAction.js.map +1 -1
- package/build/src/models/transformers/ImportUtils.d.ts +1 -1
- package/build/src/models/transformers/ImportUtils.js +1 -1
- package/build/src/models/transformers/PostmanBackupTransformer.js +2 -1
- package/build/src/models/transformers/PostmanBackupTransformer.js.map +1 -1
- package/build/src/models/transformers/PostmanV21Transformer.js +2 -1
- package/build/src/models/transformers/PostmanV21Transformer.js.map +1 -1
- package/build/src/models/transformers/PostmanV2Transformer.js +2 -1
- package/build/src/models/transformers/PostmanV2Transformer.js.map +1 -1
- package/build/src/runtime/actions/RunnableCondition.d.ts +6 -7
- package/build/src/runtime/actions/RunnableCondition.js +4 -5
- package/build/src/runtime/actions/RunnableCondition.js.map +1 -1
- package/build/src/runtime/http-engine/{ArcEngine.d.ts → CoreEngine.d.ts} +3 -3
- package/build/src/runtime/http-engine/{ArcEngine.js → CoreEngine.js} +8 -8
- package/build/src/runtime/http-engine/CoreEngine.js.map +1 -0
- package/build/src/runtime/http-engine/HttpEngine.d.ts +3 -3
- package/build/src/runtime/http-engine/HttpEngine.js +3 -20
- package/build/src/runtime/http-engine/HttpEngine.js.map +1 -1
- package/build/src/runtime/modules/BasicAuthCache.js +2 -5
- package/build/src/runtime/modules/BasicAuthCache.js.map +1 -1
- package/build/src/runtime/modules/RequestCookies.d.ts +1 -1
- package/build/src/runtime/modules/RequestCookies.js +3 -2
- package/build/src/runtime/modules/RequestCookies.js.map +1 -1
- package/build/src/runtime/node/RequestFactory.d.ts +1 -1
- package/build/src/runtime/node/RequestFactory.js +3 -3
- package/build/src/runtime/node/RequestFactory.js.map +1 -1
- package/build/src/runtime/reporters/ProjectRunCliReporter.js.map +1 -1
- package/build/src/runtime/reporters/Reporter.js.map +1 -1
- package/build/src/runtime/store/StoreSdk.js +4 -2
- package/build/src/runtime/store/StoreSdk.js.map +1 -1
- package/package.json +3 -3
- package/readme.md +5 -5
- package/src/data/JmesparthReader.ts +1 -1
- package/src/events/models/ProjectEvents.ts +2 -2
- package/src/events/readme.md +1 -1
- package/src/lib/transformers/PayloadSerializer.ts +3 -3
- package/src/mocking/ProjectMock.ts +1 -1
- package/src/mocking/lib/Request.ts +5 -5
- package/src/mocking/lib/Response.ts +10 -10
- package/src/mocking/lib/User.ts +2 -1
- package/src/models/AuthorizationData.ts +2 -2
- package/src/models/ClientCertificate.ts +1 -1
- package/src/models/Environment.ts +4 -4
- package/src/models/ErrorResponse.ts +1 -1
- package/src/models/HistoryIndex.ts +6 -1
- package/src/models/HostRule.ts +5 -5
- package/src/models/HttpHistory.ts +1 -1
- package/src/models/HttpProject.ts +5 -6
- package/src/models/HttpProjectListItem.ts +1 -1
- package/src/models/HttpRequest.ts +2 -2
- package/src/models/HttpResponse.ts +3 -3
- package/src/models/License.ts +4 -4
- package/src/models/ProjectFolder.ts +3 -3
- package/src/models/ProjectItem.ts +2 -2
- package/src/models/ProjectRequest.ts +2 -2
- package/src/models/ProjectSchema.ts +2 -2
- package/src/models/Property.ts +5 -5
- package/src/models/Provider.ts +4 -4
- package/src/models/README.md +2 -2
- package/src/models/Request.ts +4 -4
- package/src/models/RequestActions.ts +2 -4
- package/src/models/RequestAuthorization.ts +3 -5
- package/src/models/RequestConfig.ts +3 -5
- package/src/models/RequestLog.ts +8 -10
- package/src/models/RequestTime.ts +4 -6
- package/src/models/RequestUiMeta.ts +5 -5
- package/src/models/RequestsSize.ts +1 -3
- package/src/models/{ArcResponse.ts → Response.ts} +12 -14
- package/src/models/ResponseAuthorization.ts +4 -4
- package/src/models/ResponseRedirect.ts +3 -5
- package/src/models/RevisionInfo.ts +1 -1
- package/src/models/SentRequest.ts +2 -4
- package/src/models/Server.ts +4 -4
- package/src/models/Thing.ts +4 -4
- package/src/models/Url.ts +2 -4
- package/src/models/User.ts +2 -1
- package/src/models/WebApi.ts +1 -1
- package/src/models/WebApiIndex.ts +1 -1
- package/src/models/Workspace.ts +5 -5
- package/src/models/actions/Action.ts +2 -2
- package/src/models/actions/Condition.ts +2 -2
- package/src/models/actions/RunnableAction.ts +1 -1
- package/src/models/actions/runnable/DeleteCookieAction.ts +2 -2
- package/src/models/actions/runnable/SetCookieAction.ts +2 -2
- package/src/models/actions/runnable/SetVariableAction.ts +2 -2
- package/src/models/transformers/ImportUtils.ts +1 -1
- package/src/models/transformers/PostmanBackupTransformer.ts +2 -1
- package/src/models/transformers/PostmanV21Transformer.ts +2 -1
- package/src/models/transformers/PostmanV2Transformer.ts +2 -1
- package/src/runtime/actions/RunnableCondition.ts +6 -7
- package/src/runtime/http-engine/{ArcEngine.ts → CoreEngine.ts} +7 -7
- package/src/runtime/http-engine/HttpEngine.ts +5 -24
- package/src/runtime/modules/BasicAuthCache.ts +2 -6
- package/src/runtime/modules/RequestCookies.ts +6 -5
- package/src/runtime/node/RequestFactory.ts +3 -3
- package/src/runtime/reporters/ProjectRunCliReporter.ts +2 -2
- package/src/runtime/reporters/Reporter.ts +4 -4
- package/src/runtime/store/StoreSdk.ts +4 -4
- package/build/src/models/ArcResponse.js.map +0 -1
- package/build/src/models/HistoryRequest.d.ts +0 -13
- package/build/src/models/HistoryRequest.js +0 -25
- package/build/src/models/HistoryRequest.js.map +0 -1
- package/build/src/runtime/http-engine/ArcEngine.js.map +0 -1
- package/build/src/runtime/http-engine/NodeEngine.d.ts +0 -154
- package/build/src/runtime/http-engine/NodeEngine.js +0 -766
- package/build/src/runtime/http-engine/NodeEngine.js.map +0 -1
- package/build/src/runtime/http-engine/NodeEngineDirect.d.ts +0 -113
- package/build/src/runtime/http-engine/NodeEngineDirect.js +0 -449
- package/build/src/runtime/http-engine/NodeEngineDirect.js.map +0 -1
- package/src/models/HistoryRequest.ts +0 -28
- package/src/runtime/http-engine/NodeEngine.ts +0 -792
- package/src/runtime/http-engine/NodeEngineDirect.ts +0 -482
|
@@ -2,13 +2,13 @@ import { IHttpResponse, HttpResponse, Kind as ResponseKind } from './HttpRespons
|
|
|
2
2
|
import { IRequestTime, RequestTime } from './RequestTime.js';
|
|
3
3
|
import { ResponseRedirect as LegacyRedirect } from './legacy/request/ArcResponse.js';
|
|
4
4
|
|
|
5
|
-
export const Kind = '
|
|
5
|
+
export const Kind = 'Core#HttpResponseRedirect';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* An information about a redirect
|
|
9
9
|
*/
|
|
10
10
|
export interface IResponseRedirect {
|
|
11
|
-
kind:
|
|
11
|
+
kind: typeof Kind;
|
|
12
12
|
/**
|
|
13
13
|
* Redirection response
|
|
14
14
|
*/
|
|
@@ -33,7 +33,7 @@ export interface IResponseRedirect {
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
export class ResponseRedirect {
|
|
36
|
-
kind = Kind;
|
|
36
|
+
kind: typeof Kind = Kind;
|
|
37
37
|
/**
|
|
38
38
|
* Redirection response
|
|
39
39
|
*/
|
|
@@ -119,8 +119,6 @@ export class ResponseRedirect {
|
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Creates a new redirect clearing anything that is so far defined.
|
|
122
|
-
*
|
|
123
|
-
* Note, this throws an error when the object is not an ARC redirect.
|
|
124
122
|
*/
|
|
125
123
|
new(init: IResponseRedirect): void {
|
|
126
124
|
const { response, timings, startTime=0, endTime=0, url='', kind=Kind } = init;
|
|
@@ -21,7 +21,7 @@ export interface IBaseSentRequest extends IBaseHttpRequest {
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* An interface describing a request made by the HTTP transport.
|
|
24
|
-
* Each transport used by
|
|
24
|
+
* Each transport used by API Client must return this structure in the response event.
|
|
25
25
|
* This is not a replacement for the editor request that also has to be returned.
|
|
26
26
|
*
|
|
27
27
|
* Another difference is that this headers contains a final list of headers sent to the
|
|
@@ -103,9 +103,7 @@ export class SentRequest extends HttpRequest {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
* Creates a new request clearing anything that is so far defined.
|
|
107
|
-
*
|
|
108
|
-
* Note, this throws an error when the object is not an ARC request.
|
|
106
|
+
* Creates a new sent request clearing anything that is so far defined.
|
|
109
107
|
*/
|
|
110
108
|
new(init: ISentRequest): void {
|
|
111
109
|
super.new(init);
|
package/src/models/Server.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const Kind = '
|
|
1
|
+
export const Kind = 'Core#Server';
|
|
2
2
|
|
|
3
3
|
export interface IServer {
|
|
4
|
-
kind:
|
|
4
|
+
kind: typeof Kind;
|
|
5
5
|
/**
|
|
6
6
|
* The base URI of the server.
|
|
7
7
|
*
|
|
@@ -85,11 +85,11 @@ export class Server {
|
|
|
85
85
|
/**
|
|
86
86
|
* Creates a new server clearing anything that is so far defined.
|
|
87
87
|
*
|
|
88
|
-
* Note, this throws an error when the server is not
|
|
88
|
+
* Note, this throws an error when the server is not a server.
|
|
89
89
|
*/
|
|
90
90
|
new(init: IServer): void {
|
|
91
91
|
if (!Server.isServer(init)) {
|
|
92
|
-
throw new Error(`Not
|
|
92
|
+
throw new Error(`Not a server.`);
|
|
93
93
|
}
|
|
94
94
|
const { uri, description, protocol, basePath } = init;
|
|
95
95
|
this.kind = Kind;
|
package/src/models/Thing.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const Kind = '
|
|
1
|
+
export const Kind = 'Core#Thing';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* An interface describing a base metadata of a thing.
|
|
@@ -7,7 +7,7 @@ export declare interface IThing {
|
|
|
7
7
|
/**
|
|
8
8
|
* The data kind. The application ignores the input with an unknown `kind`, unless it can be determined from the context.
|
|
9
9
|
*/
|
|
10
|
-
kind?:
|
|
10
|
+
kind?: typeof Kind;
|
|
11
11
|
/**
|
|
12
12
|
* The name of the thing.
|
|
13
13
|
*/
|
|
@@ -68,11 +68,11 @@ export class Thing {
|
|
|
68
68
|
/**
|
|
69
69
|
* Creates a new thing clearing anything that is so far defined.
|
|
70
70
|
*
|
|
71
|
-
* Note, this throws an error when the server is not
|
|
71
|
+
* Note, this throws an error when the server is not a thing.
|
|
72
72
|
*/
|
|
73
73
|
new(init: IThing): void {
|
|
74
74
|
if (!Thing.isThing(init)) {
|
|
75
|
-
throw new Error(`Not
|
|
75
|
+
throw new Error(`Not a thing.`);
|
|
76
76
|
}
|
|
77
77
|
const { description, name, version } = init;
|
|
78
78
|
this.kind = Kind;
|
package/src/models/Url.ts
CHANGED
|
@@ -41,7 +41,7 @@ export class Url {
|
|
|
41
41
|
midnight?: number;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* @param input The
|
|
44
|
+
* @param input The URL definition used to restore the state.
|
|
45
45
|
*/
|
|
46
46
|
constructor(input: string|IUrl) {
|
|
47
47
|
let init: IUrl;
|
|
@@ -60,9 +60,7 @@ export class Url {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* Creates a new
|
|
64
|
-
*
|
|
65
|
-
* Note, this throws an error when the environment is not an ARC environment.
|
|
63
|
+
* Creates a new URL clearing anything that is so far defined.
|
|
66
64
|
*/
|
|
67
65
|
new(init: IUrl): void {
|
|
68
66
|
const { url='', cnt=0, time = Date.now(), midnight } = init;
|
package/src/models/User.ts
CHANGED
package/src/models/WebApi.ts
CHANGED
package/src/models/Workspace.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AccessControlLevel } from "./User.js";
|
|
|
2
2
|
import { IThing, Thing, Kind as ThingKind } from './Thing.js';
|
|
3
3
|
import v4 from '../lib/uuid.js';
|
|
4
4
|
|
|
5
|
-
export const Kind = '
|
|
5
|
+
export const Kind = 'Core#Space';
|
|
6
6
|
/**
|
|
7
7
|
* A definition of the working space for users.
|
|
8
8
|
*
|
|
@@ -10,7 +10,7 @@ export const Kind = 'ARC#Space';
|
|
|
10
10
|
* created by the system users, where they can store their projects and other data.
|
|
11
11
|
*/
|
|
12
12
|
export interface IWorkspace {
|
|
13
|
-
kind:
|
|
13
|
+
kind: typeof Kind;
|
|
14
14
|
/**
|
|
15
15
|
* The space identifier.
|
|
16
16
|
*/
|
|
@@ -75,7 +75,7 @@ export class Workspace {
|
|
|
75
75
|
*/
|
|
76
76
|
projects: string[] = [];
|
|
77
77
|
/**
|
|
78
|
-
* Only set when the object was created from the data received by the
|
|
78
|
+
* Only set when the object was created from the data received by the API Client backend.
|
|
79
79
|
* Level access of the current user to the space.
|
|
80
80
|
* Note, this information is never serialized with the object.
|
|
81
81
|
*/
|
|
@@ -127,11 +127,11 @@ export class Workspace {
|
|
|
127
127
|
/**
|
|
128
128
|
* Creates a new environment clearing anything that is so far defined.
|
|
129
129
|
*
|
|
130
|
-
* Note, this throws an error when the environment is not
|
|
130
|
+
* Note, this throws an error when the environment is not a space.
|
|
131
131
|
*/
|
|
132
132
|
new(init: IWorkspace | IUserWorkspace): void {
|
|
133
133
|
if (!Workspace.isWorkspace(init)) {
|
|
134
|
-
throw new Error(`Not
|
|
134
|
+
throw new Error(`Not a space.`);
|
|
135
135
|
}
|
|
136
136
|
const { key = v4(), projects = [], info, owner = DefaultOwner, users } = init;
|
|
137
137
|
this.kind = Kind;
|
|
@@ -5,13 +5,13 @@ import { Kind as SetCookieKind, SetCookieAction, ISetCookieAction } from './runn
|
|
|
5
5
|
import { Kind as SetVariableKind, SetVariableAction, ISetVariableAction } from './runnable/SetVariableAction.js';
|
|
6
6
|
import { Action as LegacyAction, SetCookieConfig, SetVariableConfig, DeleteCookieConfig } from '../legacy/actions/Actions.js';
|
|
7
7
|
|
|
8
|
-
export const Kind = '
|
|
8
|
+
export const Kind = 'Core#Action';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* An interface representing a single action.
|
|
12
12
|
*/
|
|
13
13
|
export interface IAction {
|
|
14
|
-
kind?:
|
|
14
|
+
kind?: typeof Kind;
|
|
15
15
|
/**
|
|
16
16
|
* Action name.
|
|
17
17
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActionTypeEnum, RequestDataSourceEnum, ResponseDataSourceEnum, OperatorEnum } from './Enums.js';
|
|
2
2
|
import { Condition as LegacyCondition } from '../legacy/actions/Actions.js';
|
|
3
3
|
|
|
4
|
-
export const Kind = '
|
|
4
|
+
export const Kind = 'Core#Condition';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A base interface describing a configuration to extract data from a request or a response.
|
|
@@ -33,7 +33,7 @@ export interface IDataSource {
|
|
|
33
33
|
* Describes action's condition configuration.
|
|
34
34
|
*/
|
|
35
35
|
export interface ICondition extends IDataSource {
|
|
36
|
-
kind:
|
|
36
|
+
kind: typeof Kind,
|
|
37
37
|
/**
|
|
38
38
|
* The comparison operator.
|
|
39
39
|
*/
|
|
@@ -2,7 +2,7 @@ import { ICondition, Condition } from './Condition.js';
|
|
|
2
2
|
import { IAction, Action } from './Action.js';
|
|
3
3
|
import { RunnableAction as LegacyRunnable } from '../legacy/actions/Actions.js';
|
|
4
4
|
|
|
5
|
-
export const Kind = '
|
|
5
|
+
export const Kind = 'Core#RunnableAction';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* An interface representing a runnable set of action in a condition.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DeleteCookieConfig } from '../../legacy/actions/Actions.js';
|
|
2
2
|
import { Runnable, IRunnable } from './Runnable.js';
|
|
3
3
|
|
|
4
|
-
export const Kind = '
|
|
4
|
+
export const Kind = 'Core#DeleteCookieAction';
|
|
5
5
|
|
|
6
6
|
export interface IDeleteCookieAction extends IRunnable {
|
|
7
|
-
kind?:
|
|
7
|
+
kind?: typeof Kind;
|
|
8
8
|
/**
|
|
9
9
|
* When set it uses request URL instead of defined URL in the action.
|
|
10
10
|
*/
|
|
@@ -3,10 +3,10 @@ import { Runnable, IRunnable } from './Runnable.js';
|
|
|
3
3
|
import { IDataSource } from '../Condition.js';
|
|
4
4
|
import { RequestDataSourceEnum } from '../Enums.js';
|
|
5
5
|
|
|
6
|
-
export const Kind = '
|
|
6
|
+
export const Kind = 'Core#SetCookieAction';
|
|
7
7
|
|
|
8
8
|
export interface ISetCookieAction extends IRunnable {
|
|
9
|
-
kind?:
|
|
9
|
+
kind?: typeof Kind;
|
|
10
10
|
/**
|
|
11
11
|
* Name of the cookie
|
|
12
12
|
*/
|
|
@@ -3,10 +3,10 @@ import { Runnable, IRunnable } from './Runnable.js';
|
|
|
3
3
|
import { IDataSource } from '../Condition.js';
|
|
4
4
|
import { RequestDataSourceEnum } from '../Enums.js';
|
|
5
5
|
|
|
6
|
-
export const Kind = '
|
|
6
|
+
export const Kind = 'Core#SetVariableAction';
|
|
7
7
|
|
|
8
8
|
export interface ISetVariableAction extends IRunnable {
|
|
9
|
-
kind?:
|
|
9
|
+
kind?: typeof Kind;
|
|
10
10
|
/**
|
|
11
11
|
* Name of the variable to set
|
|
12
12
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
2
|
/* eslint-disable no-plusplus */
|
|
3
3
|
/**
|
|
4
|
-
* User can export single request in ARC. In this case
|
|
4
|
+
* User can export single request in ARC. In this case the app opens new tab
|
|
5
5
|
* rather actually imports the data. This function tests if this is the case.
|
|
6
6
|
* @param data Normalized import data
|
|
7
7
|
*/
|
|
@@ -5,6 +5,7 @@ import { ProjectFolder } from '../ProjectFolder.js';
|
|
|
5
5
|
import { ProjectRequest } from '../ProjectRequest.js';
|
|
6
6
|
import { IMultipartBody } from '../../lib/transformers/PayloadSerializer.js';
|
|
7
7
|
import { Environment } from '../Environment.js';
|
|
8
|
+
import { Kind as ThingKind } from '../Thing.js';
|
|
8
9
|
|
|
9
10
|
interface PostmanBackupV1 {
|
|
10
11
|
version: number;
|
|
@@ -147,7 +148,7 @@ export class PostmanBackupTransformer extends PostmanTransformer {
|
|
|
147
148
|
definitions: {},
|
|
148
149
|
environments: [],
|
|
149
150
|
info: {
|
|
150
|
-
kind:
|
|
151
|
+
kind: ThingKind,
|
|
151
152
|
name,
|
|
152
153
|
},
|
|
153
154
|
items: [],
|
|
@@ -6,6 +6,7 @@ import { ProjectRequest } from '../ProjectRequest.js';
|
|
|
6
6
|
import { IMultipartBody } from '../../lib/transformers/PayloadSerializer.js';
|
|
7
7
|
import v4 from '../../lib/uuid.js';
|
|
8
8
|
import { Environment } from '../Environment.js';
|
|
9
|
+
import { Kind as ThingKind } from '../Thing.js';
|
|
9
10
|
|
|
10
11
|
export const currentItemValue = Symbol('currentItemValue');
|
|
11
12
|
|
|
@@ -134,7 +135,7 @@ export class PostmanV21Transformer extends PostmanTransformer {
|
|
|
134
135
|
definitions: {},
|
|
135
136
|
environments: [],
|
|
136
137
|
info: {
|
|
137
|
-
kind:
|
|
138
|
+
kind: ThingKind,
|
|
138
139
|
name: info.name || 'Unnamed Postman project',
|
|
139
140
|
},
|
|
140
141
|
items: [],
|
|
@@ -6,6 +6,7 @@ import { ProjectRequest } from '../ProjectRequest.js';
|
|
|
6
6
|
import { IMultipartBody } from '../../lib/transformers/PayloadSerializer.js';
|
|
7
7
|
import v4 from '../../lib/uuid.js';
|
|
8
8
|
import { Environment } from '../Environment.js';
|
|
9
|
+
import { Kind as ThingKind } from '../Thing.js';
|
|
9
10
|
|
|
10
11
|
export const currentItemValue = Symbol('currentItemValue');
|
|
11
12
|
|
|
@@ -131,7 +132,7 @@ export class PostmanV2Transformer extends PostmanTransformer {
|
|
|
131
132
|
definitions: {},
|
|
132
133
|
environments: [],
|
|
133
134
|
info: {
|
|
134
|
-
kind:
|
|
135
|
+
kind: ThingKind,
|
|
135
136
|
name: info.name || 'Unnamed Postman project',
|
|
136
137
|
},
|
|
137
138
|
items: [],
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { IRunnableAction, RunnableAction } from '../../models/actions/RunnableAction.js';
|
|
2
2
|
import { IHttpRequest } from '../../models/HttpRequest.js';
|
|
3
|
-
import {
|
|
3
|
+
import { IResponse } from '../../models/Response.js';
|
|
4
4
|
import { ISentRequest } from '../../models/SentRequest.js';
|
|
5
5
|
import { IErrorResponse } from '../../models/ErrorResponse.js';
|
|
6
6
|
import { RequestDataExtractor } from '../../data/RequestDataExtractor.js';
|
|
7
7
|
import { checkCondition } from './ConditionRunner.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* A class that represents
|
|
10
|
+
* A class that represents API Client condition that runs actions when the condition is met.
|
|
11
11
|
*/
|
|
12
12
|
export class RunnableCondition extends RunnableAction {
|
|
13
13
|
/**
|
|
14
14
|
* Tests whether the condition is satisfied for request and/or response.
|
|
15
15
|
*
|
|
16
|
-
* @param request The
|
|
17
|
-
* @param
|
|
18
|
-
* @param response The ARC response object, if available.
|
|
16
|
+
* @param request The API Client request object.
|
|
17
|
+
* @param response The API Client response object, if available.
|
|
19
18
|
* @return True when the condition is satisfied.
|
|
20
19
|
*/
|
|
21
|
-
async satisfied(request: IHttpRequest | ISentRequest, response?:
|
|
20
|
+
async satisfied(request: IHttpRequest | ISentRequest, response?: IResponse | IErrorResponse): Promise<boolean> {
|
|
22
21
|
if (this.enabled === false) {
|
|
23
22
|
return false;
|
|
24
23
|
}
|
|
@@ -38,7 +37,7 @@ export class RunnableCondition extends RunnableAction {
|
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
39
|
* Maps runnables interface to
|
|
41
|
-
* If an item is not an instance of `
|
|
40
|
+
* If an item is not an instance of `RunnableCondition` then it creates an instance of it
|
|
42
41
|
* by passing the map as an argument.
|
|
43
42
|
*
|
|
44
43
|
* @param value Passed list of actions.
|
|
@@ -5,7 +5,7 @@ import https from 'https';
|
|
|
5
5
|
import { HttpEngine, HttpEngineOptions, HeadersReceivedDetail } from './HttpEngine.js';
|
|
6
6
|
import { IRequestLog } from 'src/models/RequestLog.js';
|
|
7
7
|
import { IHttpRequest } from '../../models/HttpRequest.js';
|
|
8
|
-
import {
|
|
8
|
+
import { Response } from '../../models/Response.js';
|
|
9
9
|
import { SerializableError } from '../../models/SerializableError.js';
|
|
10
10
|
import { Headers } from '../../lib/headers/Headers.js';
|
|
11
11
|
import { PayloadSupport } from './PayloadSupport.js';
|
|
@@ -34,11 +34,11 @@ interface ResponseInfo {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* API Client's HTTP engine.
|
|
38
38
|
* An HTTP 1.1 engine working directly on the socket. It communicates with the remote machine and
|
|
39
39
|
* collects stats about the request and response.
|
|
40
40
|
*/
|
|
41
|
-
export class
|
|
41
|
+
export class CoreEngine extends HttpEngine {
|
|
42
42
|
state = RequestState.Status;
|
|
43
43
|
rawHeaders?: Buffer;
|
|
44
44
|
_hostTestReg = /^\s*host\s*:/im;
|
|
@@ -119,7 +119,7 @@ export class ArcEngine extends HttpEngine {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* Prepares an HTTP message from
|
|
122
|
+
* Prepares an HTTP message from API Client's request object.
|
|
123
123
|
*
|
|
124
124
|
* @returns Resolved promise to an `ArrayBuffer`.
|
|
125
125
|
*/
|
|
@@ -539,7 +539,7 @@ export class ArcEngine extends HttpEngine {
|
|
|
539
539
|
* @return Redirect response object
|
|
540
540
|
*/
|
|
541
541
|
async _createRedirectResponse(location: string): Promise<ResponseRedirect> {
|
|
542
|
-
const { currentResponse = new
|
|
542
|
+
const { currentResponse = new Response() } = this;
|
|
543
543
|
this.currentResponse = currentResponse;
|
|
544
544
|
if (!this.currentResponse.payload) {
|
|
545
545
|
if (this._rawBody) {
|
|
@@ -626,7 +626,7 @@ export class ArcEngine extends HttpEngine {
|
|
|
626
626
|
if (this.aborted) {
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
629
|
-
const response =
|
|
629
|
+
const response = Response.fromValues(0);
|
|
630
630
|
response.loadingTime = 0;
|
|
631
631
|
this.currentResponse = response;
|
|
632
632
|
if (!data) {
|
|
@@ -1000,7 +1000,7 @@ export class ArcEngine extends HttpEngine {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
if (res.statusCode === 401) {
|
|
1002
1002
|
this.currentHeaders = new Headers(res.headers);
|
|
1003
|
-
const currentResponse =
|
|
1003
|
+
const currentResponse = Response.fromValues(res.statusCode, res.statusMessage, this.currentHeaders.toString());
|
|
1004
1004
|
currentResponse.loadingTime = 0;
|
|
1005
1005
|
this.currentResponse = currentResponse;
|
|
1006
1006
|
if (head.length) {
|
|
@@ -12,7 +12,7 @@ import { IRequestAuthorization } from '../../models/RequestAuthorization.js';
|
|
|
12
12
|
import { HostRule } from '../../models/HostRule.js';
|
|
13
13
|
import { IRequestCertificate } from '../../models/ClientCertificate.js';
|
|
14
14
|
import { SentRequest } from '../../models/SentRequest.js';
|
|
15
|
-
import {
|
|
15
|
+
import { Response } from '../../models/Response.js';
|
|
16
16
|
import { ErrorResponse } from '../../models/ErrorResponse.js';
|
|
17
17
|
import { RequestsSize } from '../../models/RequestsSize.js';
|
|
18
18
|
import { HttpResponse } from '../../models/HttpResponse.js';
|
|
@@ -154,7 +154,7 @@ export abstract class HttpEngine extends EventEmitter {
|
|
|
154
154
|
/**
|
|
155
155
|
* The response object build during the execution.
|
|
156
156
|
*/
|
|
157
|
-
currentResponse?:
|
|
157
|
+
currentResponse?: Response;
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* @return True if following redirects is allowed.
|
|
@@ -470,7 +470,7 @@ export abstract class HttpEngine extends EventEmitter {
|
|
|
470
470
|
* @return Redirect response object
|
|
471
471
|
*/
|
|
472
472
|
async _createRedirectResponse(location: string): Promise<ResponseRedirect> {
|
|
473
|
-
const { currentResponse = new
|
|
473
|
+
const { currentResponse = new Response() } = this;
|
|
474
474
|
|
|
475
475
|
const response = HttpResponse.fromValues(
|
|
476
476
|
currentResponse.status,
|
|
@@ -498,7 +498,7 @@ export abstract class HttpEngine extends EventEmitter {
|
|
|
498
498
|
*
|
|
499
499
|
* @return A response object.
|
|
500
500
|
*/
|
|
501
|
-
async _createResponse(): Promise<
|
|
501
|
+
async _createResponse(): Promise<Response | undefined> {
|
|
502
502
|
if (this.aborted) {
|
|
503
503
|
return;
|
|
504
504
|
}
|
|
@@ -513,36 +513,17 @@ It means that the successful connection wasn't made.
|
|
|
513
513
|
Check your request parameters.`);
|
|
514
514
|
}
|
|
515
515
|
const body = await this.decompress(this._rawBody);
|
|
516
|
-
const response =
|
|
516
|
+
const response = Response.fromValues(
|
|
517
517
|
status,
|
|
518
518
|
currentResponse.statusText,
|
|
519
519
|
currentResponse.headers,
|
|
520
520
|
);
|
|
521
521
|
response.timings = this._computeStats(this.stats);
|
|
522
522
|
response.loadingTime = response.timings.total();
|
|
523
|
-
|
|
524
|
-
// const response = /** @type ArcResponse */ ({
|
|
525
|
-
// size: {
|
|
526
|
-
// request: 0,
|
|
527
|
-
// response: 0,
|
|
528
|
-
// },
|
|
529
|
-
// });
|
|
530
|
-
|
|
531
523
|
if (body) {
|
|
532
524
|
await response.writePayload(body);
|
|
533
525
|
currentResponse.payload = response.payload;
|
|
534
526
|
}
|
|
535
|
-
// if (body) {
|
|
536
|
-
// response.payload = body;
|
|
537
|
-
// currentResponse.payload = body;
|
|
538
|
-
// response.size.response = body.length;
|
|
539
|
-
// }
|
|
540
|
-
// if (this.sentRequest.httpMessage) {
|
|
541
|
-
// response.size.request = Buffer.from(this.sentRequest.httpMessage).length;
|
|
542
|
-
// }
|
|
543
|
-
// if (opts.includeRedirects && this.redirects.length) {
|
|
544
|
-
// response.redirects = Array.from(this.redirects);
|
|
545
|
-
// }
|
|
546
527
|
if (status === 401) {
|
|
547
528
|
response.auth = this._getAuth();
|
|
548
529
|
}
|
|
@@ -2,7 +2,7 @@ import { Headers } from '../../lib/headers/Headers.js';
|
|
|
2
2
|
import { IHttpRequest } from '../../models/HttpRequest.js';
|
|
3
3
|
import { INtlmAuthorization, IBasicAuthorization } from '../../models/Authorization.js';
|
|
4
4
|
import { ExecutionContext } from './ModulesRegistry.js';
|
|
5
|
-
import { IRequestAuthorization } from '../../models/RequestAuthorization.js';
|
|
5
|
+
import { IRequestAuthorization, Kind as RequestAuthorizationKind } from '../../models/RequestAuthorization.js';
|
|
6
6
|
|
|
7
7
|
const cache: any = {};
|
|
8
8
|
|
|
@@ -89,16 +89,12 @@ export function applyRequestBasicAuthData(request: IHttpRequest, data: IBasicAut
|
|
|
89
89
|
* but whole NTLM configuration object.
|
|
90
90
|
*
|
|
91
91
|
* Applied the `auth` object to the event's `detail.auth` object.
|
|
92
|
-
*
|
|
93
|
-
* @param {ArcBaseRequest} request The event's detail object. Changes made here will be propagated to
|
|
94
|
-
* the event.
|
|
95
|
-
* @param {NtlmAuthorization} values The authorization data to apply.
|
|
96
92
|
*/
|
|
97
93
|
function applyRequestNtlmAuthData(authorization: IRequestAuthorization[], values: INtlmAuthorization): void {
|
|
98
94
|
let ntlm: IRequestAuthorization | undefined = authorization.find(((method) => method.type === 'ntlm'));
|
|
99
95
|
if (!ntlm) {
|
|
100
96
|
ntlm = {
|
|
101
|
-
kind:
|
|
97
|
+
kind: RequestAuthorizationKind,
|
|
102
98
|
enabled: true,
|
|
103
99
|
type: 'ntlm',
|
|
104
100
|
config: {},
|
|
@@ -4,10 +4,11 @@ import { Headers } from '../../lib/headers/Headers.js';
|
|
|
4
4
|
import { IHttpRequest } from '../../models/HttpRequest.js';
|
|
5
5
|
import { ExecutionContext } from './ModulesRegistry.js';
|
|
6
6
|
import { IResponseRedirect } from '../../models/ResponseRedirect.js';
|
|
7
|
-
import {
|
|
7
|
+
import { IResponse } from '../../models/Response.js';
|
|
8
8
|
import { IErrorResponse } from '../../models/ErrorResponse.js';
|
|
9
9
|
import { IRequestLog } from '../../models/RequestLog.js';
|
|
10
10
|
import { HttpCookie } from '../../models/HttpCookie.js';
|
|
11
|
+
import { Kind as RequestConfigKind } from '../../models/RequestConfig.js';
|
|
11
12
|
import { Cookie } from '../../lib/cookies/Cookie.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -51,7 +52,7 @@ function applyCookieHeader(header: string, request: IHttpRequest): void {
|
|
|
51
52
|
* @param redirects List of redirect responses
|
|
52
53
|
* @returns An object with `cookies` and `expired` arrays of cookies.
|
|
53
54
|
*/
|
|
54
|
-
function extract(response:
|
|
55
|
+
function extract(response: IResponse, url: string, redirects?: IResponseRedirect[]): Record<'expired'|'cookies', Cookie[]> {
|
|
55
56
|
let expired: Cookie[] = [];
|
|
56
57
|
let parser;
|
|
57
58
|
let exp;
|
|
@@ -100,7 +101,7 @@ function extract(response: IArcResponse, url: string, redirects?: IResponseRedir
|
|
|
100
101
|
*
|
|
101
102
|
* Unregister this module when the application settings change to not to use session storage.
|
|
102
103
|
*
|
|
103
|
-
* In
|
|
104
|
+
* In electron the session storage is a chrome persistent partition with a session shared with the "log in to a web service".
|
|
104
105
|
* This way cookies can be acquired in through the browser login and store in the application to use them with the request.
|
|
105
106
|
*/
|
|
106
107
|
export async function processRequestCookies(request: IHttpRequest, context: ExecutionContext): Promise<void> {
|
|
@@ -126,7 +127,7 @@ export async function processResponseCookies(log: IRequestLog, context: Executio
|
|
|
126
127
|
return;
|
|
127
128
|
}
|
|
128
129
|
const config = context.config || {
|
|
129
|
-
kind:
|
|
130
|
+
kind: RequestConfigKind,
|
|
130
131
|
enabled: false,
|
|
131
132
|
};
|
|
132
133
|
let ignore = false;
|
|
@@ -137,7 +138,7 @@ export async function processResponseCookies(log: IRequestLog, context: Executio
|
|
|
137
138
|
if (ignore) {
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
|
-
const typedResponse = log.response as
|
|
141
|
+
const typedResponse = log.response as IResponse;
|
|
141
142
|
const result = extract(typedResponse, log.request.url, log.redirects);
|
|
142
143
|
if (result.cookies.length) {
|
|
143
144
|
await CookieEvents.updateBulk(context.eventsTarget, result.cookies.map(c => HttpCookie.fromCookieParser(c).toJSON()));
|
|
@@ -11,14 +11,14 @@ import { Action } from '../../models/actions/Action.js';
|
|
|
11
11
|
import { RunnableCondition } from '../actions/RunnableCondition.js';
|
|
12
12
|
import { ActionRunner } from '../actions/ActionRunner.js';
|
|
13
13
|
import { HttpEngineOptions } from '../http-engine/HttpEngine.js';
|
|
14
|
-
import {
|
|
14
|
+
import { CoreEngine } from '../http-engine/CoreEngine.js';
|
|
15
15
|
import { ModulesRegistry, RegisteredRequestModule, RegisteredResponseModule, ExecutionContext, RegistryPermission } from '../modules/ModulesRegistry.js';
|
|
16
16
|
import { ExecutionResponse } from '../modules/ExecutionResponse.js';
|
|
17
17
|
import { Events } from '../../events/Events.js';
|
|
18
18
|
import { Logger } from '../../lib/logging/Logger.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* The main class to make HTTP requests in the API Client
|
|
21
|
+
* The main class to make HTTP requests in the API Client.
|
|
22
22
|
* This factory includes all logic components to perform the entire HTTP request lifecycle. This includes:
|
|
23
23
|
*
|
|
24
24
|
* - variables evaluation on the request object
|
|
@@ -294,7 +294,7 @@ export class RequestFactory {
|
|
|
294
294
|
*/
|
|
295
295
|
async executeRequest(request: IHttpRequest): Promise<IRequestLog> {
|
|
296
296
|
const opts = await this.prepareEngineConfig();
|
|
297
|
-
const engine = new
|
|
297
|
+
const engine = new CoreEngine(request, opts);
|
|
298
298
|
return engine.send();
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Table } from 'console-table-printer';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { ErrorResponse, IErrorResponse } from '../../models/ErrorResponse.js';
|
|
4
|
-
import {
|
|
4
|
+
import { IResponse } from '../../models/Response.js';
|
|
5
5
|
import { ISerializedError } from '../../models/SerializableError.js';
|
|
6
6
|
import { Reporter } from './Reporter.js';
|
|
7
7
|
|
|
@@ -70,7 +70,7 @@ export class ProjectRunCliReporter extends Reporter {
|
|
|
70
70
|
process.stdout.write('Request not executed.\n');
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const response = log.response as
|
|
73
|
+
const response = log.response as IResponse;
|
|
74
74
|
process.stdout.write(`${prefix} Status code is: ${response.status}\n`);
|
|
75
75
|
});
|
|
76
76
|
process.stdout.write('\n\n');
|