@opentap/runner-client 2.3.3-alpha.1.1 → 2.3.4-alpha.1.1
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/lib/BaseClient.js +3 -2
- package/package.json +1 -1
package/lib/BaseClient.js
CHANGED
|
@@ -48,6 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
import { ComponentSettingsBase, ComponentSettingsIdentifier, ComponentSettingsListItem, DataGridControl, ErrorResponse, FileDescriptor, ListItemType, ProfileGroup, } from './DTOs';
|
|
49
49
|
import { Empty, ErrorCode, JSONCodec, StringCodec, connect, headers, } from 'nats.ws';
|
|
50
50
|
import { EventEmitter } from 'events';
|
|
51
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
51
52
|
var DEFAULT_TIMEOUT = 40000; // default timeout of 40 seconds
|
|
52
53
|
var Events;
|
|
53
54
|
(function (Events) {
|
|
@@ -125,11 +126,11 @@ var BaseClient = /** @class */ (function () {
|
|
|
125
126
|
data = this.encode(payload);
|
|
126
127
|
headers = this.buildHeaders();
|
|
127
128
|
timeout = (options === null || options === void 0 ? void 0 : options.timeout) || this.timeout;
|
|
128
|
-
replySubject =
|
|
129
|
+
replySubject = uuidv4();
|
|
129
130
|
chunkSize = ((_c = (_b = (_a = this.connection) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.max_payload) !== null && _c !== void 0 ? _c : 512000) - 2000;
|
|
130
131
|
// The Session and the Client need to agree on the chunk size. Put it in a header.
|
|
131
132
|
headers.append('ChunkSize', chunkSize.toString());
|
|
132
|
-
requestId =
|
|
133
|
+
requestId = uuidv4();
|
|
133
134
|
headers.append('RequestId', requestId);
|
|
134
135
|
opts = __assign(__assign({}, options === null || options === void 0 ? void 0 : options.publishOptions), { headers: headers, reply: replySubject });
|
|
135
136
|
fileDescriptor = new FileDescriptor(data.length, chunkSize);
|