@opentap/runner-client 2.0.0-alpha.2.12 → 2.0.0-alpha.2.13
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 +19 -19
- package/package.json +1 -1
package/lib/BaseClient.js
CHANGED
|
@@ -261,26 +261,26 @@ var BaseClient = /** @class */ (function () {
|
|
|
261
261
|
opts = __assign(__assign({}, options), { timeout: this.timeout, headers: headers });
|
|
262
262
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
263
263
|
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
264
|
-
var
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
264
|
+
var numberOfChunks = 9999;
|
|
265
|
+
var combinedResult = new Uint8Array([]);
|
|
266
|
+
var received = 0;
|
|
267
|
+
var subscription = _this.connection.subscribe(replySubject);
|
|
268
|
+
subscription.callback = function (error, message) {
|
|
269
|
+
if (error) {
|
|
270
|
+
reject(error);
|
|
271
|
+
}
|
|
272
|
+
combinedResult = new Uint8Array(__spreadArray(__spreadArray([], Array.from(combinedResult), true), Array.from(message === null || message === void 0 ? void 0 : message.data), true));
|
|
273
|
+
received++;
|
|
274
|
+
message.respond(Empty);
|
|
275
|
+
if (received === numberOfChunks) {
|
|
276
|
+
resolve(combinedResult);
|
|
277
|
+
}
|
|
278
|
+
};
|
|
270
279
|
return _this.request(subject, replySubject, opts).then(function (fileDescriptor) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
reject(error);
|
|
276
|
-
}
|
|
277
|
-
combinedResult = new Uint8Array(__spreadArray(__spreadArray([], Array.from(combinedResult), true), Array.from(message === null || message === void 0 ? void 0 : message.data), true));
|
|
278
|
-
received++;
|
|
279
|
-
message.respond(Empty);
|
|
280
|
-
if (received === fileDescriptor.numberOfChunks) {
|
|
281
|
-
resolve(combinedResult);
|
|
282
|
-
}
|
|
283
|
-
};
|
|
280
|
+
numberOfChunks = fileDescriptor.numberOfChunks;
|
|
281
|
+
if (received === numberOfChunks) {
|
|
282
|
+
resolve(combinedResult);
|
|
283
|
+
}
|
|
284
284
|
});
|
|
285
285
|
}).then(function (byteArray) {
|
|
286
286
|
var jsonCodec = JSONCodec();
|