@api-client/core 0.7.5 → 0.7.8
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 +1 -1
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/src/cookies/CookieParser.d.ts +11 -0
- package/build/src/cookies/CookieParser.js +39 -26
- package/build/src/cookies/CookieParser.js.map +1 -1
- package/build/src/events/BaseEvents.d.ts +6 -1
- package/build/src/events/BaseEvents.js.map +1 -1
- package/build/src/events/EventTypes.d.ts +3 -4
- package/build/src/events/Events.d.ts +3 -4
- package/build/src/events/transport/TransportEventTypes.d.ts +3 -4
- package/build/src/events/transport/TransportEventTypes.js +3 -7
- package/build/src/events/transport/TransportEventTypes.js.map +1 -1
- package/build/src/events/transport/TransportEvents.d.ts +32 -14
- package/build/src/events/transport/TransportEvents.js +33 -22
- package/build/src/events/transport/TransportEvents.js.map +1 -1
- package/build/src/lib/transformers/PayloadSerializer.js +1 -0
- package/build/src/lib/transformers/PayloadSerializer.js.map +1 -1
- package/build/src/models/HttpResponse.js.map +1 -1
- package/build/src/models/ProjectRequest.js.map +1 -1
- package/build/src/models/Request.js.map +1 -1
- package/build/src/models/legacy/DataExport.d.ts +69 -0
- package/build/src/models/legacy/Normalizer.d.ts +1 -1
- package/build/src/models/legacy/Normalizer.js +1 -1
- package/package.json +1 -1
- package/src/cookies/CookieParser.ts +40 -26
- package/src/events/BaseEvents.ts +6 -1
- package/src/events/transport/TransportEventTypes.ts +4 -8
- package/src/events/transport/TransportEvents.ts +51 -24
- package/src/lib/transformers/PayloadSerializer.ts +1 -0
- package/src/models/HttpResponse.ts +2 -2
- package/src/models/ProjectRequest.ts +8 -8
- package/src/models/Request.ts +7 -7
- package/src/models/legacy/DataExport.ts +77 -0
- package/src/models/legacy/Normalizer.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectRequest.js","sourceRoot":"","sources":["../../../src/models/ProjectRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAgB,IAAI,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAChC,OAAO,EAAY,OAAO,EAAE,MAAM,cAAc,CAAC;AAGjD,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAwB1C;;;;;;GAMG;AACH,MAAM,OAAO,cAAe,SAAQ,OAAO;IACzC,IAAI,GAAG,IAAI,CAAC;IACZ;;OAEG;IACH,GAAG,GAAG,EAAE,CAAC;IACT;;OAEG;IACH,OAAO,CAAc;IACrB;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAc;QACpC,MAAM,KAAK,GAAG,KAAwB,CAAC;QACvC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE;YACjC,OAAO,KAAK,CAAC;SACd;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,OAAqB;QAC/C,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC7C;QACD,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"ProjectRequest.js","sourceRoot":"","sources":["../../../src/models/ProjectRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAgB,IAAI,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAChC,OAAO,EAAY,OAAO,EAAE,MAAM,cAAc,CAAC;AAGjD,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAwB1C;;;;;;GAMG;AACH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AC;IAC5B,CAAC;IAED;;;OAGG;IACH,UAAU;QACR,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,eAAe;QACb,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACvB,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,SAAS;QACP,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;SACnC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,GAAgB;QACrB,MAAM,IAAI,GAAgB,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QACpD,IAAI,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -123,6 +123,21 @@ export interface EncryptionOptions {
|
|
|
123
123
|
*/
|
|
124
124
|
passphrase?: string;
|
|
125
125
|
}
|
|
126
|
+
export interface ProviderOptions {
|
|
127
|
+
/**
|
|
128
|
+
* Export file name or path to render in the save dialog or file name
|
|
129
|
+
* in the cloud provider.
|
|
130
|
+
*/
|
|
131
|
+
file: string;
|
|
132
|
+
/**
|
|
133
|
+
* The folder where to put the file.
|
|
134
|
+
*/
|
|
135
|
+
parent?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Content's mime type
|
|
138
|
+
*/
|
|
139
|
+
contentType?: string;
|
|
140
|
+
}
|
|
126
141
|
/**
|
|
127
142
|
* @deprecated
|
|
128
143
|
*/
|
|
@@ -151,14 +166,23 @@ export interface ExportOptionsInternal extends ExportOptions {
|
|
|
151
166
|
*/
|
|
152
167
|
appVersion: string;
|
|
153
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* @deprecated
|
|
171
|
+
*/
|
|
154
172
|
export interface ArcExportProcessedData {
|
|
155
173
|
key: keyof ArcNativeDataExport;
|
|
156
174
|
data: any[];
|
|
157
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated
|
|
178
|
+
*/
|
|
158
179
|
export interface ArcExportClientCertificateData {
|
|
159
180
|
item: ARCCertificateIndex;
|
|
160
181
|
data: ARCRequestCertificate;
|
|
161
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* @deprecated
|
|
185
|
+
*/
|
|
162
186
|
export interface ArcNativeDataExport {
|
|
163
187
|
authdata?: boolean | ARCAuthData[];
|
|
164
188
|
clientcertificates?: boolean;
|
|
@@ -171,3 +195,48 @@ export interface ArcNativeDataExport {
|
|
|
171
195
|
websocketurlhistory?: boolean | ARCWebsocketUrlHistory[];
|
|
172
196
|
urlhistory?: boolean | ARCUrlHistory[];
|
|
173
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated
|
|
200
|
+
*/
|
|
201
|
+
export declare const ExportKey: keyof ArcNativeDataExport;
|
|
202
|
+
/**
|
|
203
|
+
* @deprecated
|
|
204
|
+
*/
|
|
205
|
+
export interface ArcLegacyNativeDataExport extends ArcNativeDataExport {
|
|
206
|
+
'websocket-url-history': boolean | ARCWebsocketUrlHistory[];
|
|
207
|
+
'auth-data': boolean | ARCAuthData[];
|
|
208
|
+
'url-history': boolean | ARCUrlHistory[];
|
|
209
|
+
'host-rules': boolean | ARCHostRule[];
|
|
210
|
+
'client-certificates': boolean | ARCVariable[];
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* @deprecated
|
|
214
|
+
*/
|
|
215
|
+
export interface ArcExportResult {
|
|
216
|
+
/**
|
|
217
|
+
* Whether an export operation was a success
|
|
218
|
+
*/
|
|
219
|
+
success: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Whether the operation was interrupted by the user.
|
|
222
|
+
*/
|
|
223
|
+
interrupted: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* With the cloud based export this is the ID of parent folder.
|
|
226
|
+
* For file export it is the path of the file.
|
|
227
|
+
*/
|
|
228
|
+
parentId: string;
|
|
229
|
+
/**
|
|
230
|
+
* The generated file id.
|
|
231
|
+
* With the cloud based export this is the ID of created file entry.
|
|
232
|
+
* For file export it is the file name that the user provided in the save dialog.
|
|
233
|
+
*/
|
|
234
|
+
fileId: string;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Options interface for file import
|
|
238
|
+
* @deprecated
|
|
239
|
+
*/
|
|
240
|
+
export interface FileImportOptions {
|
|
241
|
+
driveId?: string;
|
|
242
|
+
}
|
|
@@ -6,7 +6,7 @@ export declare class Normalizer {
|
|
|
6
6
|
static generateHistoryId(request: ARCHistoryRequest): string;
|
|
7
7
|
static normalizeAuthorization<T>(request: T): T;
|
|
8
8
|
/**
|
|
9
|
-
* Transforms the `TransformedPayload` object to its original data type.
|
|
9
|
+
* Transforms the legacy `TransformedPayload` object to its original data type.
|
|
10
10
|
*/
|
|
11
11
|
static restoreTransformedPayload(body: string | ArrayBuffer | Buffer | LegacyTransformedPayload): string | Buffer | ArrayBuffer | undefined;
|
|
12
12
|
}
|
|
@@ -75,7 +75,7 @@ export class Normalizer {
|
|
|
75
75
|
return copy;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* Transforms the `TransformedPayload` object to its original data type.
|
|
78
|
+
* Transforms the legacy `TransformedPayload` object to its original data type.
|
|
79
79
|
*/
|
|
80
80
|
static restoreTransformedPayload(body) {
|
|
81
81
|
if (!body) {
|
package/package.json
CHANGED
|
@@ -71,19 +71,20 @@ export class CookieParser {
|
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Parses the `set-cookie` header value and creates a list of cookies.
|
|
74
|
-
* The cookie configuration must match the `url`. This means that if the cookie has a `host` property
|
|
75
|
-
* this must match the request URL (browsers do not allow setting cookies from one domain for another).
|
|
76
74
|
*
|
|
77
|
-
*
|
|
75
|
+
* Notes:
|
|
76
|
+
* - This does not check whether the cookie should be stored in the Cookie Jar based on the request URL, use `parse()` instead
|
|
77
|
+
* - This will fill up cookies' `domain` and `path` when `requestUrl` is provided. Otherwise it will leave these fields empty which makes the cookie invalid. Use `parse()` instead
|
|
78
78
|
*
|
|
79
|
-
* @param requestUrl The HTTP request URL. Cookies must match this URL or will be ignored.
|
|
80
79
|
* @param setCookie The value of the `set-cookie` string.
|
|
80
|
+
* @param requestUrl The HTTP request URL.
|
|
81
81
|
*/
|
|
82
|
-
static
|
|
82
|
+
static parseRelaxed(setCookie?: string, requestUrl?: string): HttpCookie[] {
|
|
83
83
|
const result: HttpCookie[] = [];
|
|
84
84
|
if (!setCookie || typeof setCookie !== 'string') {
|
|
85
85
|
return result;
|
|
86
86
|
}
|
|
87
|
+
|
|
87
88
|
const blocks = setCookie.split(';').map(i => i.trim());
|
|
88
89
|
blocks.forEach((part, index) => {
|
|
89
90
|
// Consider the following set-cookie string:
|
|
@@ -153,28 +154,41 @@ export class CookieParser {
|
|
|
153
154
|
}
|
|
154
155
|
});
|
|
155
156
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
if (requestUrl) {
|
|
158
|
+
const url = new URL(requestUrl);
|
|
159
|
+
const domain = this.canonicalDomain(url.host);
|
|
160
|
+
const path = this.getPath(url);
|
|
161
|
+
|
|
162
|
+
result.forEach((cookie) => {
|
|
163
|
+
if (!cookie.path) {
|
|
164
|
+
cookie.path = path;
|
|
165
|
+
}
|
|
166
|
+
if (!cookie.domain) {
|
|
167
|
+
// point 6. of https://tools.ietf.org/html/rfc6265#section-5.3
|
|
168
|
+
cookie.domain = domain;
|
|
169
|
+
cookie.hostOnly = true;
|
|
170
|
+
} else if (cookie.domain[0] !== '.') {
|
|
171
|
+
// https://stackoverflow.com/a/1063760/1127848
|
|
172
|
+
cookie.domain = `.${cookie.domain}`;
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
163
178
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
return this.filterCookies(result, requestUrl);
|
|
179
|
+
/**
|
|
180
|
+
* Parses the `set-cookie` header value and creates a list of cookies.
|
|
181
|
+
* The cookie configuration must match the `url`. This means that if the cookie has a `host` property
|
|
182
|
+
* this must match the request URL (browsers do not allow setting cookies from one domain for another).
|
|
183
|
+
*
|
|
184
|
+
* When `host` or `path` part is missing from the cookie, the URL values are used.
|
|
185
|
+
*
|
|
186
|
+
* @param requestUrl The HTTP request URL. Cookies must match this URL or will be ignored.
|
|
187
|
+
* @param setCookie The value of the `set-cookie` string.
|
|
188
|
+
*/
|
|
189
|
+
static parse(requestUrl: string, setCookie?: string): HttpCookie[] {
|
|
190
|
+
const cookies = this.parseRelaxed(setCookie, requestUrl);
|
|
191
|
+
return this.filterCookies(cookies, requestUrl);
|
|
178
192
|
}
|
|
179
193
|
|
|
180
194
|
/**
|
package/src/events/BaseEvents.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import CustomEvent from './CustomEvent.js';
|
|
2
|
+
import { IQueryResponse } from '../models/store/Backend.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Base event detail definition for the events that returns a `result`
|
|
@@ -318,6 +319,10 @@ export interface ContextListOptions {
|
|
|
318
319
|
* A string that should be used with the pagination.
|
|
319
320
|
*/
|
|
320
321
|
nextPageToken?: string;
|
|
322
|
+
/**
|
|
323
|
+
* Optional parent for the query.
|
|
324
|
+
*/
|
|
325
|
+
parent?: string;
|
|
321
326
|
}
|
|
322
327
|
|
|
323
328
|
export class ContextListEvent<T> extends ContextEvent<ContextListOptions, ContextListResult<T>> {
|
|
@@ -363,7 +368,7 @@ export interface IQueryDetail {
|
|
|
363
368
|
* The implementation should not assume pagination and return enough results for the user to find what they were looking for
|
|
364
369
|
* or to redefine the query. Suggested limit is `50` which in many cases is equivalent of 2 pages of results.
|
|
365
370
|
*/
|
|
366
|
-
export class ContextQueryEvent<T = unknown> extends ContextEvent<IQueryDetail, T
|
|
371
|
+
export class ContextQueryEvent<T = unknown> extends ContextEvent<IQueryDetail, IQueryResponse<T>> {
|
|
367
372
|
/**
|
|
368
373
|
* An event dispatched to the context store to perform a query operation.
|
|
369
374
|
* If the context store supports the query operation, it should use the definition of `IQueryDetail` to perform the query.
|
|
@@ -3,9 +3,11 @@ export const TransportEventTypes = Object.freeze({
|
|
|
3
3
|
* Transport via the CoreEngine.
|
|
4
4
|
*/
|
|
5
5
|
Core: Object.freeze({
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
request: 'transportcorerequest',
|
|
7
|
+
httpProject: 'transportcorehttpproject',
|
|
8
|
+
appProject: 'transportcoreappproject',
|
|
8
9
|
}),
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* Transport via the native platform's bindings.
|
|
11
13
|
*/
|
|
@@ -13,12 +15,6 @@ export const TransportEventTypes = Object.freeze({
|
|
|
13
15
|
send: 'httptransportsend',
|
|
14
16
|
}),
|
|
15
17
|
|
|
16
|
-
// project runner
|
|
17
|
-
Project: Object.freeze({
|
|
18
|
-
// for both a request or a folder (since it's all single configuration.)
|
|
19
|
-
send: 'transportprojectsend',
|
|
20
|
-
}),
|
|
21
|
-
|
|
22
18
|
// web sockets.
|
|
23
19
|
Ws: Object.freeze({
|
|
24
20
|
/**
|
|
@@ -5,6 +5,7 @@ import { IHttpRequest } from "../../models/HttpRequest.js";
|
|
|
5
5
|
import { IRequestBaseConfig } from "../../models/RequestConfig.js";
|
|
6
6
|
import { IRequestLog } from '../../models/RequestLog.js';
|
|
7
7
|
import { HttpProject } from "../../models/HttpProject.js";
|
|
8
|
+
import { AppProject } from "../../models/AppProject.js";
|
|
8
9
|
import { ContextEvent } from "../BaseEvents.js";
|
|
9
10
|
import { TransportEventTypes } from "./TransportEventTypes.js";
|
|
10
11
|
import { IProjectRunnerOptions } from "../../runtime/node/InteropInterfaces.js";
|
|
@@ -21,11 +22,25 @@ export interface IHttpRequestDetail {
|
|
|
21
22
|
init?: RequestInit;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
export interface
|
|
25
|
+
export interface IHttpRequestResult {
|
|
26
|
+
log: IRequestLog;
|
|
27
|
+
/**
|
|
28
|
+
* The variables evaluated during the run.
|
|
29
|
+
* These variables have values set by request HTTP flows.
|
|
30
|
+
*/
|
|
31
|
+
variables: Record<string, string>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IHttpProjectRequestDetail {
|
|
25
35
|
project: HttpProject | string;
|
|
26
36
|
opts: IProjectRunnerOptions;
|
|
27
37
|
}
|
|
28
38
|
|
|
39
|
+
export interface IAppProjectRequestDetail {
|
|
40
|
+
project: AppProject | string;
|
|
41
|
+
opts: IProjectRunnerOptions;
|
|
42
|
+
}
|
|
43
|
+
|
|
29
44
|
/* eslint-disable no-unused-vars */
|
|
30
45
|
export const TransportEvent = Object.freeze({
|
|
31
46
|
/**
|
|
@@ -39,10 +54,10 @@ export const TransportEvent = Object.freeze({
|
|
|
39
54
|
* @param request The request definition
|
|
40
55
|
* @param authorization When known, a list of authorization configuration to apply to the request.
|
|
41
56
|
* @param config Optional request configuration.
|
|
42
|
-
* @returns The execution log or `undefined` when the event was not handled.
|
|
57
|
+
* @returns The execution log with the variables evaluated during the run or `undefined` when the event was not handled.
|
|
43
58
|
*/
|
|
44
|
-
|
|
45
|
-
const e = new ContextEvent<ICoreRequestDetail,
|
|
59
|
+
request: async (request: IHttpRequest, authorization?: IRequestAuthorization[], config?: IRequestBaseConfig, target: EventTarget = window): Promise<IHttpRequestResult | undefined> => {
|
|
60
|
+
const e = new ContextEvent<ICoreRequestDetail, IHttpRequestResult>(TransportEventTypes.Core.request, {
|
|
46
61
|
request,
|
|
47
62
|
authorization,
|
|
48
63
|
config
|
|
@@ -50,6 +65,38 @@ export const TransportEvent = Object.freeze({
|
|
|
50
65
|
target.dispatchEvent(e);
|
|
51
66
|
return e.detail.result;
|
|
52
67
|
},
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* For both the project or a folder (since it's all single configuration.)
|
|
71
|
+
*
|
|
72
|
+
* @param target The events target
|
|
73
|
+
* @param project The instance of a project or an id of the project to execute. The current user has to be already authenticated.
|
|
74
|
+
* @param opts The project execution options.
|
|
75
|
+
*/
|
|
76
|
+
httpProject: async (project: HttpProject | string, opts: IProjectRunnerOptions, target: EventTarget = window): Promise<IProjectExecutionLog | undefined> => {
|
|
77
|
+
const e = new ContextEvent<IHttpProjectRequestDetail, IProjectExecutionLog>(TransportEventTypes.Core.httpProject, {
|
|
78
|
+
project,
|
|
79
|
+
opts,
|
|
80
|
+
});
|
|
81
|
+
target.dispatchEvent(e);
|
|
82
|
+
return e.detail.result;
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* For both the project or a folder (since it's all single configuration.)
|
|
87
|
+
*
|
|
88
|
+
* @param target The events target
|
|
89
|
+
* @param project The instance of a project or an id of the project to execute. The current user has to be already authenticated.
|
|
90
|
+
* @param opts The project execution options.
|
|
91
|
+
*/
|
|
92
|
+
appProject: async (project: AppProject | string, opts: IProjectRunnerOptions, target: EventTarget = window): Promise<IProjectExecutionLog | undefined> => {
|
|
93
|
+
const e = new ContextEvent<IAppProjectRequestDetail, IProjectExecutionLog>(TransportEventTypes.Core.appProject, {
|
|
94
|
+
project,
|
|
95
|
+
opts,
|
|
96
|
+
});
|
|
97
|
+
target.dispatchEvent(e);
|
|
98
|
+
return e.detail.result;
|
|
99
|
+
},
|
|
53
100
|
}),
|
|
54
101
|
/**
|
|
55
102
|
* Transport via the native platform's bindings.
|
|
@@ -74,26 +121,6 @@ export const TransportEvent = Object.freeze({
|
|
|
74
121
|
},
|
|
75
122
|
}),
|
|
76
123
|
|
|
77
|
-
// project runner
|
|
78
|
-
Project: Object.freeze({
|
|
79
|
-
/**
|
|
80
|
-
* For both a request or a folder (since it's all single configuration.)
|
|
81
|
-
*
|
|
82
|
-
* @param target The events target
|
|
83
|
-
* @param project The instance of a project or an id of the project to execute. The current user has to be already authenticated.
|
|
84
|
-
* @param opts The project execution options.
|
|
85
|
-
* @returns
|
|
86
|
-
*/
|
|
87
|
-
send: async (project: HttpProject | string, opts: IProjectRunnerOptions, target: EventTarget = window): Promise<IProjectExecutionLog | undefined> => {
|
|
88
|
-
const e = new ContextEvent<IProjectRequestDetail, IProjectExecutionLog>(TransportEventTypes.Project.send, {
|
|
89
|
-
project,
|
|
90
|
-
opts,
|
|
91
|
-
});
|
|
92
|
-
target.dispatchEvent(e);
|
|
93
|
-
return e.detail.result;
|
|
94
|
-
},
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
124
|
// web sockets.
|
|
98
125
|
Ws: Object.freeze({
|
|
99
126
|
/**
|
|
@@ -154,6 +154,7 @@ export class PayloadSerializer {
|
|
|
154
154
|
const result = await PayloadSerializer.stringifyFormData(payload);
|
|
155
155
|
return result;
|
|
156
156
|
} catch (e: unknown) {
|
|
157
|
+
// eslint-disable-next-line no-console
|
|
157
158
|
console.warn(`Unable to transform FormData: ${(e as Error).message}`);
|
|
158
159
|
}
|
|
159
160
|
}
|
|
@@ -72,7 +72,7 @@ export class HttpResponse extends SerializablePayload {
|
|
|
72
72
|
/**
|
|
73
73
|
* @param input The response definition used to restore the state.
|
|
74
74
|
*/
|
|
75
|
-
constructor(input?: string|IHttpResponse) {
|
|
75
|
+
constructor(input?: string | IHttpResponse) {
|
|
76
76
|
super();
|
|
77
77
|
let init: IHttpResponse;
|
|
78
78
|
if (typeof input === 'string') {
|
|
@@ -97,7 +97,7 @@ export class HttpResponse extends SerializablePayload {
|
|
|
97
97
|
if (!HttpResponse.isHttpResponse(init)) {
|
|
98
98
|
throw new Error(`Not a response.`);
|
|
99
99
|
}
|
|
100
|
-
const { status, statusText, headers, payload, kind=Kind } = init;
|
|
100
|
+
const { status, statusText, headers, payload, kind = Kind } = init;
|
|
101
101
|
this.kind = kind;
|
|
102
102
|
this.status = status;
|
|
103
103
|
this.statusText = statusText;
|
|
@@ -70,7 +70,7 @@ export class ProjectRequest extends Request implements ProjectDefinitionProperty
|
|
|
70
70
|
if (!project) {
|
|
71
71
|
throw new Error(`The project is required.`);
|
|
72
72
|
}
|
|
73
|
-
const now:number = Date.now();
|
|
73
|
+
const now: number = Date.now();
|
|
74
74
|
const request = new ProjectRequest(project, {
|
|
75
75
|
key: v4(),
|
|
76
76
|
kind: Kind,
|
|
@@ -100,7 +100,7 @@ export class ProjectRequest extends Request implements ProjectDefinitionProperty
|
|
|
100
100
|
if (!project) {
|
|
101
101
|
throw new Error(`The project is required.`);
|
|
102
102
|
}
|
|
103
|
-
const now:number = Date.now();
|
|
103
|
+
const now: number = Date.now();
|
|
104
104
|
const request = new ProjectRequest(project, {
|
|
105
105
|
key: v4(),
|
|
106
106
|
kind: Kind,
|
|
@@ -130,7 +130,7 @@ export class ProjectRequest extends Request implements ProjectDefinitionProperty
|
|
|
130
130
|
if (!project) {
|
|
131
131
|
throw new Error(`The project is required.`);
|
|
132
132
|
}
|
|
133
|
-
const now:number = Date.now();
|
|
133
|
+
const now: number = Date.now();
|
|
134
134
|
const request = new ProjectRequest(project, {
|
|
135
135
|
key: v4(),
|
|
136
136
|
kind: Kind,
|
|
@@ -160,8 +160,8 @@ export class ProjectRequest extends Request implements ProjectDefinitionProperty
|
|
|
160
160
|
const result = new ProjectRequest(project, init);
|
|
161
161
|
return result;
|
|
162
162
|
}
|
|
163
|
-
|
|
164
|
-
constructor(project: HttpProject, input?: string|IProjectRequest | IAppProjectRequest) {
|
|
163
|
+
|
|
164
|
+
constructor(project: HttpProject, input?: string | IProjectRequest | IAppProjectRequest) {
|
|
165
165
|
super(input);
|
|
166
166
|
this.project = project;
|
|
167
167
|
let init: IProjectRequest | IAppProjectRequest;
|
|
@@ -170,7 +170,7 @@ export class ProjectRequest extends Request implements ProjectDefinitionProperty
|
|
|
170
170
|
} else if (typeof input === 'object') {
|
|
171
171
|
init = input;
|
|
172
172
|
} else {
|
|
173
|
-
const now:number = Date.now();
|
|
173
|
+
const now: number = Date.now();
|
|
174
174
|
init = {
|
|
175
175
|
key: v4(),
|
|
176
176
|
kind: Kind,
|
|
@@ -192,7 +192,7 @@ export class ProjectRequest extends Request implements ProjectDefinitionProperty
|
|
|
192
192
|
|
|
193
193
|
new(init: IProjectRequest | IAppProjectRequest): void {
|
|
194
194
|
super.new(init);
|
|
195
|
-
|
|
195
|
+
|
|
196
196
|
const { key } = init;
|
|
197
197
|
this.key = key || v4();
|
|
198
198
|
}
|
|
@@ -224,7 +224,7 @@ export class ProjectRequest extends Request implements ProjectDefinitionProperty
|
|
|
224
224
|
/**
|
|
225
225
|
* @returns The instance of the HttpProject or a ProjectFolder that is a closes parent of this instance.
|
|
226
226
|
*/
|
|
227
|
-
getParent(): ProjectFolder|HttpProject|undefined {
|
|
227
|
+
getParent(): ProjectFolder | HttpProject | undefined {
|
|
228
228
|
const { project, key } = this;
|
|
229
229
|
return project.findParent(key);
|
|
230
230
|
}
|
package/src/models/Request.ts
CHANGED
|
@@ -117,7 +117,7 @@ export class Request {
|
|
|
117
117
|
* @param url The Request URL.
|
|
118
118
|
*/
|
|
119
119
|
static fromUrl(url: string): Request {
|
|
120
|
-
const now:number = Date.now();
|
|
120
|
+
const now: number = Date.now();
|
|
121
121
|
const request = new Request({
|
|
122
122
|
kind: Kind,
|
|
123
123
|
created: now,
|
|
@@ -141,7 +141,7 @@ export class Request {
|
|
|
141
141
|
* @param name The Request name.
|
|
142
142
|
*/
|
|
143
143
|
static fromName(name: string): Request {
|
|
144
|
-
const now:number = Date.now();
|
|
144
|
+
const now: number = Date.now();
|
|
145
145
|
const request = new Request({
|
|
146
146
|
kind: Kind,
|
|
147
147
|
created: now,
|
|
@@ -165,7 +165,7 @@ export class Request {
|
|
|
165
165
|
* @param info The request data.
|
|
166
166
|
*/
|
|
167
167
|
static fromHttpRequest(info: IHttpRequest): Request {
|
|
168
|
-
const now:number = Date.now();
|
|
168
|
+
const now: number = Date.now();
|
|
169
169
|
const request = new Request({
|
|
170
170
|
kind: Kind,
|
|
171
171
|
created: now,
|
|
@@ -185,12 +185,12 @@ export class Request {
|
|
|
185
185
|
return request;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
static async fromLegacy(request: ARCSavedRequest|ARCHistoryRequest): Promise<Request> {
|
|
188
|
+
static async fromLegacy(request: ARCSavedRequest | ARCHistoryRequest): Promise<Request> {
|
|
189
189
|
const normalized = Normalizer.normalizeRequest(request) as ARCSavedRequest;
|
|
190
190
|
if (!normalized) {
|
|
191
191
|
throw new Error(`Unknown object.`);
|
|
192
192
|
}
|
|
193
|
-
const init:IRequest = {
|
|
193
|
+
const init: IRequest = {
|
|
194
194
|
kind: Kind,
|
|
195
195
|
expects: {
|
|
196
196
|
kind: HttpRequestKind,
|
|
@@ -312,14 +312,14 @@ export class Request {
|
|
|
312
312
|
return this.defaultMidnight();
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
constructor(input?: string|IRequest) {
|
|
315
|
+
constructor(input?: string | IRequest) {
|
|
316
316
|
let init: IRequest;
|
|
317
317
|
if (typeof input === 'string') {
|
|
318
318
|
init = JSON.parse(input);
|
|
319
319
|
} else if (typeof input === 'object') {
|
|
320
320
|
init = input;
|
|
321
321
|
} else {
|
|
322
|
-
const now:number = Date.now();
|
|
322
|
+
const now: number = Date.now();
|
|
323
323
|
init = {
|
|
324
324
|
kind: Kind,
|
|
325
325
|
created: now,
|