@opentap/runner-client 4.0.0 → 4.1.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/dist/cjs/BaseClient.d.ts +3 -0
- package/dist/cjs/BaseClient.js +6 -0
- package/dist/cjs/DTOs.d.ts +2 -0
- package/dist/cjs/DTOs.js +5 -3
- package/dist/cjs/RunnerClient.d.ts +2 -1
- package/dist/cjs/RunnerClient.js +6 -2
- package/dist/mjs/BaseClient.d.ts +3 -0
- package/dist/mjs/BaseClient.js +3 -0
- package/dist/mjs/DTOs.d.ts +2 -0
- package/dist/mjs/DTOs.js +3 -1
- package/dist/mjs/RunnerClient.d.ts +2 -1
- package/dist/mjs/RunnerClient.js +5 -2
- package/package.json +1 -1
package/dist/cjs/BaseClient.d.ts
CHANGED
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -128,6 +128,12 @@ var BaseClient = /** @class */ (function () {
|
|
|
128
128
|
return [2 /*return*/, Promise.reject("".concat(subject, ": Connection has been closed! Please reconnect!"))];
|
|
129
129
|
data = this.encode(payload);
|
|
130
130
|
headers = this.buildHeaders();
|
|
131
|
+
if (options === null || options === void 0 ? void 0 : options.headers) {
|
|
132
|
+
Object.entries(options.headers).forEach(function (_a) {
|
|
133
|
+
var key = _a[0], value = _a[1];
|
|
134
|
+
return headers.append(key, value);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
131
137
|
timeout = (options === null || options === void 0 ? void 0 : options.timeout) || this.timeout;
|
|
132
138
|
replySubject = (_b = (_a = options === null || options === void 0 ? void 0 : options.publishOptions) === null || _a === void 0 ? void 0 : _a.reply) !== null && _b !== void 0 ? _b : "".concat(subject, ".Reply.").concat((0, uuid_1.v4)());
|
|
133
139
|
serverMaxPayload = (_d = (_c = this.connection) === null || _c === void 0 ? void 0 : _c.info) === null || _d === void 0 ? void 0 : _d.max_payload;
|
package/dist/cjs/DTOs.d.ts
CHANGED
|
@@ -832,6 +832,7 @@ export declare class RunStatus implements IRunStatus {
|
|
|
832
832
|
failedToStart?: boolean;
|
|
833
833
|
sessionState?: SessionState;
|
|
834
834
|
executingSteps?: string[] | undefined;
|
|
835
|
+
createdAt?: string | undefined;
|
|
835
836
|
constructor(data?: IRunStatus);
|
|
836
837
|
init(_data?: any): void;
|
|
837
838
|
static fromJS(data: any): RunStatus;
|
|
@@ -844,6 +845,7 @@ export interface IRunStatus {
|
|
|
844
845
|
failedToStart?: boolean;
|
|
845
846
|
sessionState?: SessionState;
|
|
846
847
|
executingSteps?: string[] | undefined;
|
|
848
|
+
createdAt?: string | undefined;
|
|
847
849
|
}
|
|
848
850
|
export declare class EditStatus implements IEditStatus {
|
|
849
851
|
undoBufferSize?: number;
|
package/dist/cjs/DTOs.js
CHANGED
|
@@ -2350,7 +2350,7 @@ var RunStatus = /** @class */ (function () {
|
|
|
2350
2350
|
}
|
|
2351
2351
|
}
|
|
2352
2352
|
RunStatus.prototype.init = function (_data) {
|
|
2353
|
-
var _a;
|
|
2353
|
+
var _a, _b;
|
|
2354
2354
|
if (_data) {
|
|
2355
2355
|
this.sessionId = _data['SessionId'];
|
|
2356
2356
|
this.verdict = _data['Verdict'];
|
|
@@ -2359,11 +2359,12 @@ var RunStatus = /** @class */ (function () {
|
|
|
2359
2359
|
this.sessionState = (_a = _data['SessionState']) !== null && _a !== void 0 ? _a : _data['sessionState'];
|
|
2360
2360
|
if (Array.isArray(_data['ExecutingSteps'])) {
|
|
2361
2361
|
this.executingSteps = [];
|
|
2362
|
-
for (var _i = 0,
|
|
2363
|
-
var item =
|
|
2362
|
+
for (var _i = 0, _c = _data['ExecutingSteps']; _i < _c.length; _i++) {
|
|
2363
|
+
var item = _c[_i];
|
|
2364
2364
|
this.executingSteps.push(item);
|
|
2365
2365
|
}
|
|
2366
2366
|
}
|
|
2367
|
+
this.createdAt = (_b = _data['CreatedAt']) !== null && _b !== void 0 ? _b : undefined;
|
|
2367
2368
|
}
|
|
2368
2369
|
};
|
|
2369
2370
|
RunStatus.fromJS = function (data) {
|
|
@@ -2386,6 +2387,7 @@ var RunStatus = /** @class */ (function () {
|
|
|
2386
2387
|
data['ExecutingSteps'].push(item);
|
|
2387
2388
|
}
|
|
2388
2389
|
}
|
|
2390
|
+
data['CreatedAt'] = this.createdAt;
|
|
2389
2391
|
return data;
|
|
2390
2392
|
};
|
|
2391
2393
|
return RunStatus;
|
|
@@ -54,9 +54,10 @@ export declare class RunnerClient extends BaseClient {
|
|
|
54
54
|
/**
|
|
55
55
|
* Shut down a session
|
|
56
56
|
* @param sessionId the ID of the session to shut down
|
|
57
|
+
* @param force When true, the Runner terminates the session subprocess immediately without attempting a graceful shutdown.
|
|
57
58
|
* @returns {{Promise<void>}}
|
|
58
59
|
*/
|
|
59
|
-
shutdownSession(sessionId: string): Promise<void>;
|
|
60
|
+
shutdownSession(sessionId: string, force?: boolean): Promise<void>;
|
|
60
61
|
/**
|
|
61
62
|
* Start a session
|
|
62
63
|
* @returns {{Promise<Session>}}
|
package/dist/cjs/RunnerClient.js
CHANGED
|
@@ -221,11 +221,15 @@ var RunnerClient = /** @class */ (function (_super) {
|
|
|
221
221
|
/**
|
|
222
222
|
* Shut down a session
|
|
223
223
|
* @param sessionId the ID of the session to shut down
|
|
224
|
+
* @param force When true, the Runner terminates the session subprocess immediately without attempting a graceful shutdown.
|
|
224
225
|
* @returns {{Promise<void>}}
|
|
225
226
|
*/
|
|
226
|
-
RunnerClient.prototype.shutdownSession = function (sessionId) {
|
|
227
|
+
RunnerClient.prototype.shutdownSession = function (sessionId, force) {
|
|
228
|
+
if (force === void 0) { force = false; }
|
|
227
229
|
return (sessionId === null || sessionId === void 0 ? void 0 : sessionId.length) > 0
|
|
228
|
-
? this.request('ShutdownSession', sessionId)
|
|
230
|
+
? this.request('ShutdownSession', sessionId, force ? { headers: { Force: 'true' } } : undefined)
|
|
231
|
+
.then(this.success())
|
|
232
|
+
.catch(this.error())
|
|
229
233
|
: Promise.reject('sessionId is not defined');
|
|
230
234
|
};
|
|
231
235
|
/**
|
package/dist/mjs/BaseClient.d.ts
CHANGED
package/dist/mjs/BaseClient.js
CHANGED
|
@@ -72,6 +72,9 @@ export class BaseClient {
|
|
|
72
72
|
return Promise.reject(`${subject}: Connection has been closed! Please reconnect!`);
|
|
73
73
|
const data = this.encode(payload);
|
|
74
74
|
const headers = this.buildHeaders();
|
|
75
|
+
if (options === null || options === void 0 ? void 0 : options.headers) {
|
|
76
|
+
Object.entries(options.headers).forEach(([key, value]) => headers.append(key, value));
|
|
77
|
+
}
|
|
75
78
|
const timeout = (options === null || options === void 0 ? void 0 : options.timeout) || this.timeout;
|
|
76
79
|
// Generate a unique reply subject that we can subscribe to
|
|
77
80
|
const replySubject = (_b = (_a = options === null || options === void 0 ? void 0 : options.publishOptions) === null || _a === void 0 ? void 0 : _a.reply) !== null && _b !== void 0 ? _b : `${subject}.Reply.${uuidv4()}`;
|
package/dist/mjs/DTOs.d.ts
CHANGED
|
@@ -832,6 +832,7 @@ export declare class RunStatus implements IRunStatus {
|
|
|
832
832
|
failedToStart?: boolean;
|
|
833
833
|
sessionState?: SessionState;
|
|
834
834
|
executingSteps?: string[] | undefined;
|
|
835
|
+
createdAt?: string | undefined;
|
|
835
836
|
constructor(data?: IRunStatus);
|
|
836
837
|
init(_data?: any): void;
|
|
837
838
|
static fromJS(data: any): RunStatus;
|
|
@@ -844,6 +845,7 @@ export interface IRunStatus {
|
|
|
844
845
|
failedToStart?: boolean;
|
|
845
846
|
sessionState?: SessionState;
|
|
846
847
|
executingSteps?: string[] | undefined;
|
|
848
|
+
createdAt?: string | undefined;
|
|
847
849
|
}
|
|
848
850
|
export declare class EditStatus implements IEditStatus {
|
|
849
851
|
undoBufferSize?: number;
|
package/dist/mjs/DTOs.js
CHANGED
|
@@ -2057,7 +2057,7 @@ export class RunStatus {
|
|
|
2057
2057
|
}
|
|
2058
2058
|
}
|
|
2059
2059
|
init(_data) {
|
|
2060
|
-
var _a;
|
|
2060
|
+
var _a, _b;
|
|
2061
2061
|
if (_data) {
|
|
2062
2062
|
this.sessionId = _data['SessionId'];
|
|
2063
2063
|
this.verdict = _data['Verdict'];
|
|
@@ -2069,6 +2069,7 @@ export class RunStatus {
|
|
|
2069
2069
|
for (const item of _data['ExecutingSteps'])
|
|
2070
2070
|
this.executingSteps.push(item);
|
|
2071
2071
|
}
|
|
2072
|
+
this.createdAt = (_b = _data['CreatedAt']) !== null && _b !== void 0 ? _b : undefined;
|
|
2072
2073
|
}
|
|
2073
2074
|
}
|
|
2074
2075
|
static fromJS(data) {
|
|
@@ -2089,6 +2090,7 @@ export class RunStatus {
|
|
|
2089
2090
|
for (const item of this.executingSteps)
|
|
2090
2091
|
data['ExecutingSteps'].push(item);
|
|
2091
2092
|
}
|
|
2093
|
+
data['CreatedAt'] = this.createdAt;
|
|
2092
2094
|
return data;
|
|
2093
2095
|
}
|
|
2094
2096
|
}
|
|
@@ -54,9 +54,10 @@ export declare class RunnerClient extends BaseClient {
|
|
|
54
54
|
/**
|
|
55
55
|
* Shut down a session
|
|
56
56
|
* @param sessionId the ID of the session to shut down
|
|
57
|
+
* @param force When true, the Runner terminates the session subprocess immediately without attempting a graceful shutdown.
|
|
57
58
|
* @returns {{Promise<void>}}
|
|
58
59
|
*/
|
|
59
|
-
shutdownSession(sessionId: string): Promise<void>;
|
|
60
|
+
shutdownSession(sessionId: string, force?: boolean): Promise<void>;
|
|
60
61
|
/**
|
|
61
62
|
* Start a session
|
|
62
63
|
* @returns {{Promise<Session>}}
|
package/dist/mjs/RunnerClient.js
CHANGED
|
@@ -161,11 +161,14 @@ export class RunnerClient extends BaseClient {
|
|
|
161
161
|
/**
|
|
162
162
|
* Shut down a session
|
|
163
163
|
* @param sessionId the ID of the session to shut down
|
|
164
|
+
* @param force When true, the Runner terminates the session subprocess immediately without attempting a graceful shutdown.
|
|
164
165
|
* @returns {{Promise<void>}}
|
|
165
166
|
*/
|
|
166
|
-
shutdownSession(sessionId) {
|
|
167
|
+
shutdownSession(sessionId, force = false) {
|
|
167
168
|
return (sessionId === null || sessionId === void 0 ? void 0 : sessionId.length) > 0
|
|
168
|
-
? this.request('ShutdownSession', sessionId)
|
|
169
|
+
? this.request('ShutdownSession', sessionId, force ? { headers: { Force: 'true' } } : undefined)
|
|
170
|
+
.then(this.success())
|
|
171
|
+
.catch(this.error())
|
|
169
172
|
: Promise.reject('sessionId is not defined');
|
|
170
173
|
}
|
|
171
174
|
/**
|