@hpcc-js/comms 2.84.3 → 2.84.5

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.
Files changed (43) hide show
  1. package/dist/index.es6.js +127 -164
  2. package/dist/index.es6.js.map +1 -1
  3. package/dist/index.js +207 -208
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist/index.node.js +141 -178
  8. package/dist/index.node.js.map +1 -1
  9. package/dist/index.node.min.js +1 -1
  10. package/dist/index.node.min.js.map +1 -1
  11. package/lib-es6/__package__.js +2 -2
  12. package/lib-es6/ecl/dfuWorkunit.js +2 -2
  13. package/lib-es6/ecl/dfuWorkunit.js.map +1 -1
  14. package/lib-es6/ecl/workunit.js +6 -1
  15. package/lib-es6/ecl/workunit.js.map +1 -1
  16. package/lib-es6/services/fileSpray.js +3 -0
  17. package/lib-es6/services/fileSpray.js.map +1 -1
  18. package/lib-es6/services/wsLogaccess.js +17 -70
  19. package/lib-es6/services/wsLogaccess.js.map +1 -1
  20. package/lib-es6/services/wsdl/ws_logaccess/v1.05/ws_logaccess.js +88 -0
  21. package/lib-es6/services/wsdl/ws_logaccess/v1.05/ws_logaccess.js.map +1 -0
  22. package/package.json +11 -11
  23. package/src/__package__.ts +2 -2
  24. package/src/ecl/dfuWorkunit.ts +4 -4
  25. package/src/ecl/workunit.ts +4 -0
  26. package/src/services/fileSpray.ts +4 -0
  27. package/src/services/wsLogaccess.ts +27 -80
  28. package/src/services/wsdl/ws_logaccess/v1.05/ws_logaccess.ts +219 -0
  29. package/types/__package__.d.ts +2 -2
  30. package/types/ecl/dfuWorkunit.d.ts +2 -2
  31. package/types/ecl/dfuWorkunit.d.ts.map +1 -1
  32. package/types/ecl/workunit.d.ts.map +1 -1
  33. package/types/services/fileSpray.d.ts +1 -0
  34. package/types/services/fileSpray.d.ts.map +1 -1
  35. package/types/services/wsLogaccess.d.ts +13 -11
  36. package/types/services/wsLogaccess.d.ts.map +1 -1
  37. package/types/services/wsdl/ws_logaccess/v1.05/ws_logaccess.d.ts +175 -0
  38. package/types/services/wsdl/ws_logaccess/v1.05/ws_logaccess.d.ts.map +1 -0
  39. package/types-3.4/__package__.d.ts +2 -2
  40. package/types-3.4/ecl/dfuWorkunit.d.ts +2 -2
  41. package/types-3.4/services/fileSpray.d.ts +1 -0
  42. package/types-3.4/services/wsLogaccess.d.ts +13 -11
  43. package/types-3.4/services/wsdl/ws_logaccess/v1.05/ws_logaccess.d.ts +175 -0
package/dist/index.js CHANGED
@@ -4,17 +4,20 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/comms"] = {}, global["@hpcc-js/util"]));
5
5
  })(this, (function (exports, util) { 'use strict';
6
6
 
7
- var global =
7
+ /* eslint-disable no-prototype-builtins */
8
+ var g =
8
9
  (typeof globalThis !== 'undefined' && globalThis) ||
9
10
  (typeof self !== 'undefined' && self) ||
10
- (typeof global !== 'undefined' && global);
11
+ // eslint-disable-next-line no-undef
12
+ (typeof global !== 'undefined' && global) ||
13
+ {};
11
14
 
12
15
  var support = {
13
- searchParams: 'URLSearchParams' in global,
14
- iterable: 'Symbol' in global && 'iterator' in Symbol,
16
+ searchParams: 'URLSearchParams' in g,
17
+ iterable: 'Symbol' in g && 'iterator' in Symbol,
15
18
  blob:
16
- 'FileReader' in global &&
17
- 'Blob' in global &&
19
+ 'FileReader' in g &&
20
+ 'Blob' in g &&
18
21
  (function() {
19
22
  try {
20
23
  new Blob();
@@ -23,8 +26,8 @@
23
26
  return false
24
27
  }
25
28
  })(),
26
- formData: 'FormData' in global,
27
- arrayBuffer: 'ArrayBuffer' in global
29
+ formData: 'FormData' in g,
30
+ arrayBuffer: 'ArrayBuffer' in g
28
31
  };
29
32
 
30
33
  function isDataView(obj) {
@@ -95,6 +98,9 @@
95
98
  }, this);
96
99
  } else if (Array.isArray(headers)) {
97
100
  headers.forEach(function(header) {
101
+ if (header.length != 2) {
102
+ throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
103
+ }
98
104
  this.append(header[0], header[1]);
99
105
  }, this);
100
106
  } else if (headers) {
@@ -165,6 +171,7 @@
165
171
  }
166
172
 
167
173
  function consumed(body) {
174
+ if (body._noBody) return
168
175
  if (body.bodyUsed) {
169
176
  return Promise.reject(new TypeError('Already read'))
170
177
  }
@@ -192,7 +199,9 @@
192
199
  function readBlobAsText(blob) {
193
200
  var reader = new FileReader();
194
201
  var promise = fileReaderReady(reader);
195
- reader.readAsText(blob);
202
+ var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
203
+ var encoding = match ? match[1] : 'utf-8';
204
+ reader.readAsText(blob, encoding);
196
205
  return promise
197
206
  }
198
207
 
@@ -230,9 +239,11 @@
230
239
  semantic of setting Request.bodyUsed in the constructor before
231
240
  _initBody is called.
232
241
  */
242
+ // eslint-disable-next-line no-self-assign
233
243
  this.bodyUsed = this.bodyUsed;
234
244
  this._bodyInit = body;
235
245
  if (!body) {
246
+ this._noBody = true;
236
247
  this._bodyText = '';
237
248
  } else if (typeof body === 'string') {
238
249
  this._bodyText = body;
@@ -280,28 +291,29 @@
280
291
  return Promise.resolve(new Blob([this._bodyText]))
281
292
  }
282
293
  };
294
+ }
283
295
 
284
- this.arrayBuffer = function() {
285
- if (this._bodyArrayBuffer) {
286
- var isConsumed = consumed(this);
287
- if (isConsumed) {
288
- return isConsumed
289
- }
290
- if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
291
- return Promise.resolve(
292
- this._bodyArrayBuffer.buffer.slice(
293
- this._bodyArrayBuffer.byteOffset,
294
- this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
295
- )
296
+ this.arrayBuffer = function() {
297
+ if (this._bodyArrayBuffer) {
298
+ var isConsumed = consumed(this);
299
+ if (isConsumed) {
300
+ return isConsumed
301
+ } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
302
+ return Promise.resolve(
303
+ this._bodyArrayBuffer.buffer.slice(
304
+ this._bodyArrayBuffer.byteOffset,
305
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
296
306
  )
297
- } else {
298
- return Promise.resolve(this._bodyArrayBuffer)
299
- }
307
+ )
300
308
  } else {
301
- return this.blob().then(readBlobAsArrayBuffer)
309
+ return Promise.resolve(this._bodyArrayBuffer)
302
310
  }
303
- };
304
- }
311
+ } else if (support.blob) {
312
+ return this.blob().then(readBlobAsArrayBuffer)
313
+ } else {
314
+ throw new Error('could not read as ArrayBuffer')
315
+ }
316
+ };
305
317
 
306
318
  this.text = function() {
307
319
  var rejected = consumed(this);
@@ -334,7 +346,7 @@
334
346
  }
335
347
 
336
348
  // HTTP methods whose capitalization should be normalized
337
- var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
349
+ var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];
338
350
 
339
351
  function normalizeMethod(method) {
340
352
  var upcased = method.toUpperCase();
@@ -375,7 +387,12 @@
375
387
  }
376
388
  this.method = normalizeMethod(options.method || this.method || 'GET');
377
389
  this.mode = options.mode || this.mode || null;
378
- this.signal = options.signal || this.signal;
390
+ this.signal = options.signal || this.signal || (function () {
391
+ if ('AbortController' in g) {
392
+ var ctrl = new AbortController();
393
+ return ctrl.signal;
394
+ }
395
+ }());
379
396
  this.referrer = null;
380
397
 
381
398
  if ((this.method === 'GET' || this.method === 'HEAD') && body) {
@@ -437,7 +454,11 @@
437
454
  var key = parts.shift().trim();
438
455
  if (key) {
439
456
  var value = parts.join(':').trim();
440
- headers.append(key, value);
457
+ try {
458
+ headers.append(key, value);
459
+ } catch (error) {
460
+ console.warn('Response ' + error.message);
461
+ }
441
462
  }
442
463
  });
443
464
  return headers
@@ -455,6 +476,9 @@
455
476
 
456
477
  this.type = 'default';
457
478
  this.status = options.status === undefined ? 200 : options.status;
479
+ if (this.status < 200 || this.status > 599) {
480
+ throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
481
+ }
458
482
  this.ok = this.status >= 200 && this.status < 300;
459
483
  this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
460
484
  this.headers = new Headers(options.headers);
@@ -474,7 +498,8 @@
474
498
  };
475
499
 
476
500
  Response.error = function() {
477
- var response = new Response(null, {status: 0, statusText: ''});
501
+ var response = new Response(null, {status: 200, statusText: ''});
502
+ response.status = 0;
478
503
  response.type = 'error';
479
504
  return response
480
505
  };
@@ -489,7 +514,7 @@
489
514
  return new Response(null, {status: status, headers: {location: url}})
490
515
  };
491
516
 
492
- var DOMException = global.DOMException;
517
+ var DOMException = g.DOMException;
493
518
  try {
494
519
  new DOMException();
495
520
  } catch (err) {
@@ -519,10 +544,16 @@
519
544
 
520
545
  xhr.onload = function() {
521
546
  var options = {
522
- status: xhr.status,
523
547
  statusText: xhr.statusText,
524
548
  headers: parseHeaders(xhr.getAllResponseHeaders() || '')
525
549
  };
550
+ // This check if specifically for when a user fetches a file locally from the file system
551
+ // Only if the status is out of a normal range
552
+ if (request.url.startsWith('file://') && (xhr.status < 200 || xhr.status > 599)) {
553
+ options.status = 200;
554
+ } else {
555
+ options.status = xhr.status;
556
+ }
526
557
  options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
527
558
  var body = 'response' in xhr ? xhr.response : xhr.responseText;
528
559
  setTimeout(function() {
@@ -538,7 +569,7 @@
538
569
 
539
570
  xhr.ontimeout = function() {
540
571
  setTimeout(function() {
541
- reject(new TypeError('Network request failed'));
572
+ reject(new TypeError('Network request timed out'));
542
573
  }, 0);
543
574
  };
544
575
 
@@ -550,7 +581,7 @@
550
581
 
551
582
  function fixUrl(url) {
552
583
  try {
553
- return url === '' && global.location.href ? global.location.href : url
584
+ return url === '' && g.location.href ? g.location.href : url
554
585
  } catch (e) {
555
586
  return url
556
587
  }
@@ -568,18 +599,23 @@
568
599
  if (support.blob) {
569
600
  xhr.responseType = 'blob';
570
601
  } else if (
571
- support.arrayBuffer &&
572
- request.headers.get('Content-Type') &&
573
- request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1
602
+ support.arrayBuffer
574
603
  ) {
575
604
  xhr.responseType = 'arraybuffer';
576
605
  }
577
606
  }
578
607
 
579
- if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {
608
+ if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
609
+ var names = [];
580
610
  Object.getOwnPropertyNames(init.headers).forEach(function(name) {
611
+ names.push(normalizeName(name));
581
612
  xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
582
613
  });
614
+ request.headers.forEach(function(value, name) {
615
+ if (names.indexOf(name) === -1) {
616
+ xhr.setRequestHeader(name, value);
617
+ }
618
+ });
583
619
  } else {
584
620
  request.headers.forEach(function(value, name) {
585
621
  xhr.setRequestHeader(name, value);
@@ -603,107 +639,112 @@
603
639
 
604
640
  fetch$1.polyfill = true;
605
641
 
606
- if (!global.fetch) {
607
- global.fetch = fetch$1;
608
- global.Headers = Headers;
609
- global.Request = Request;
610
- global.Response = Response;
642
+ if (!g.fetch) {
643
+ g.fetch = fetch$1;
644
+ g.Headers = Headers;
645
+ g.Request = Request;
646
+ g.Response = Response;
611
647
  }
612
648
 
613
649
  var PKG_NAME = "@hpcc-js/comms";
614
- var PKG_VERSION = "2.84.3";
615
- var BUILD_VERSION = "2.104.29";
616
-
617
- /******************************************************************************
618
- Copyright (c) Microsoft Corporation.
619
-
620
- Permission to use, copy, modify, and/or distribute this software for any
621
- purpose with or without fee is hereby granted.
622
-
623
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
624
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
625
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
626
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
627
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
628
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
629
- PERFORMANCE OF THIS SOFTWARE.
630
- ***************************************************************************** */
631
- /* global Reflect, Promise */
632
-
633
- var extendStatics = function(d, b) {
634
- extendStatics = Object.setPrototypeOf ||
635
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
636
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
637
- return extendStatics(d, b);
638
- };
639
-
640
- function __extends(d, b) {
641
- if (typeof b !== "function" && b !== null)
642
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
643
- extendStatics(d, b);
644
- function __() { this.constructor = d; }
645
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
646
- }
647
-
648
- var __assign = function() {
649
- __assign = Object.assign || function __assign(t) {
650
- for (var s, i = 1, n = arguments.length; i < n; i++) {
651
- s = arguments[i];
652
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
653
- }
654
- return t;
655
- };
656
- return __assign.apply(this, arguments);
657
- };
658
-
659
- function __awaiter(thisArg, _arguments, P, generator) {
660
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
661
- return new (P || (P = Promise))(function (resolve, reject) {
662
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
663
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
664
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
665
- step((generator = generator.apply(thisArg, _arguments || [])).next());
666
- });
667
- }
668
-
669
- function __generator(thisArg, body) {
670
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
671
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
672
- function verb(n) { return function (v) { return step([n, v]); }; }
673
- function step(op) {
674
- if (f) throw new TypeError("Generator is already executing.");
675
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
676
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
677
- if (y = 0, t) op = [op[0] & 2, t.value];
678
- switch (op[0]) {
679
- case 0: case 1: t = op; break;
680
- case 4: _.label++; return { value: op[1], done: false };
681
- case 5: _.label++; y = op[1]; op = [0]; continue;
682
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
683
- default:
684
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
685
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
686
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
687
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
688
- if (t[2]) _.ops.pop();
689
- _.trys.pop(); continue;
690
- }
691
- op = body.call(thisArg, _);
692
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
693
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
694
- }
695
- }
696
-
697
- function __spreadArray(to, from, pack) {
698
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
699
- if (ar || !(i in from)) {
700
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
701
- ar[i] = from[i];
702
- }
703
- }
704
- return to.concat(ar || Array.prototype.slice.call(from));
650
+ var PKG_VERSION = "2.84.5";
651
+ var BUILD_VERSION = "2.104.31";
652
+
653
+ /******************************************************************************
654
+ Copyright (c) Microsoft Corporation.
655
+
656
+ Permission to use, copy, modify, and/or distribute this software for any
657
+ purpose with or without fee is hereby granted.
658
+
659
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
660
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
661
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
662
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
663
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
664
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
665
+ PERFORMANCE OF THIS SOFTWARE.
666
+ ***************************************************************************** */
667
+ /* global Reflect, Promise, SuppressedError, Symbol */
668
+
669
+ var extendStatics = function(d, b) {
670
+ extendStatics = Object.setPrototypeOf ||
671
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
672
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
673
+ return extendStatics(d, b);
674
+ };
675
+
676
+ function __extends(d, b) {
677
+ if (typeof b !== "function" && b !== null)
678
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
679
+ extendStatics(d, b);
680
+ function __() { this.constructor = d; }
681
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
682
+ }
683
+
684
+ var __assign = function() {
685
+ __assign = Object.assign || function __assign(t) {
686
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
687
+ s = arguments[i];
688
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
689
+ }
690
+ return t;
691
+ };
692
+ return __assign.apply(this, arguments);
693
+ };
694
+
695
+ function __awaiter(thisArg, _arguments, P, generator) {
696
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
697
+ return new (P || (P = Promise))(function (resolve, reject) {
698
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
699
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
700
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
701
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
702
+ });
705
703
  }
706
704
 
705
+ function __generator(thisArg, body) {
706
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
707
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
708
+ function verb(n) { return function (v) { return step([n, v]); }; }
709
+ function step(op) {
710
+ if (f) throw new TypeError("Generator is already executing.");
711
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
712
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
713
+ if (y = 0, t) op = [op[0] & 2, t.value];
714
+ switch (op[0]) {
715
+ case 0: case 1: t = op; break;
716
+ case 4: _.label++; return { value: op[1], done: false };
717
+ case 5: _.label++; y = op[1]; op = [0]; continue;
718
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
719
+ default:
720
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
721
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
722
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
723
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
724
+ if (t[2]) _.ops.pop();
725
+ _.trys.pop(); continue;
726
+ }
727
+ op = body.call(thisArg, _);
728
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
729
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
730
+ }
731
+ }
732
+
733
+ function __spreadArray(to, from, pack) {
734
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
735
+ if (ar || !(i in from)) {
736
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
737
+ ar[i] = from[i];
738
+ }
739
+ }
740
+ return to.concat(ar || Array.prototype.slice.call(from));
741
+ }
742
+
743
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
744
+ var e = new Error(message);
745
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
746
+ };
747
+
707
748
  var logger$4 = util.scopedLogger("comms/connection.ts");
708
749
  function instanceOfIOptions(object) {
709
750
  return "baseUrl" in object;
@@ -1214,6 +1255,9 @@
1214
1255
  function FileSprayService() {
1215
1256
  return _super !== null && _super.apply(this, arguments) || this;
1216
1257
  }
1258
+ FileSprayService.prototype.DFUWUFileEx = function (request) {
1259
+ return this._connection.send("DFUWUFile", request, "text");
1260
+ };
1217
1261
  FileSprayService.prototype.SprayFixedEx = function (request) {
1218
1262
  return this._connection.send("SprayFixed", request);
1219
1263
  };
@@ -1939,6 +1983,7 @@
1939
1983
  LogColumnType["processid"] = "processid";
1940
1984
  LogColumnType["threadid"] = "threadid";
1941
1985
  LogColumnType["timestamp"] = "timestamp";
1986
+ LogColumnType["pod"] = "pod";
1942
1987
  })(WsLogaccess.LogColumnType || (WsLogaccess.LogColumnType = {}));
1943
1988
  (function (LogColumnValueType) {
1944
1989
  LogColumnValueType["string"] = "string";
@@ -1955,6 +2000,7 @@
1955
2000
  LogAccessType[LogAccessType["BySourceInstance"] = 5] = "BySourceInstance";
1956
2001
  LogAccessType[LogAccessType["BySourceNode"] = 6] = "BySourceNode";
1957
2002
  LogAccessType[LogAccessType["ByFieldName"] = 7] = "ByFieldName";
2003
+ LogAccessType[LogAccessType["ByPod"] = 8] = "ByPod";
1958
2004
  })(WsLogaccess.LogAccessType || (WsLogaccess.LogAccessType = {}));
1959
2005
  (function (LogAccessFilterOperator) {
1960
2006
  LogAccessFilterOperator[LogAccessFilterOperator["NONE"] = 0] = "NONE";
@@ -1976,6 +2022,7 @@
1976
2022
  SortColumType[SortColumType["BySourceInstance"] = 5] = "BySourceInstance";
1977
2023
  SortColumType[SortColumType["BySourceNode"] = 6] = "BySourceNode";
1978
2024
  SortColumType[SortColumType["ByFieldName"] = 7] = "ByFieldName";
2025
+ SortColumType[SortColumType["ByPod"] = 8] = "ByPod";
1979
2026
  })(WsLogaccess.SortColumType || (WsLogaccess.SortColumType = {}));
1980
2027
  (function (SortDirection) {
1981
2028
  SortDirection[SortDirection["ASC"] = 0] = "ASC";
@@ -1985,7 +2032,7 @@
1985
2032
  var LogaccessServiceBase = /** @class */ (function (_super) {
1986
2033
  __extends(LogaccessServiceBase, _super);
1987
2034
  function LogaccessServiceBase(optsConnection) {
1988
- return _super.call(this, optsConnection, "ws_logaccess", "1.04") || this;
2035
+ return _super.call(this, optsConnection, "ws_logaccess", "1.05") || this;
1989
2036
  }
1990
2037
  LogaccessServiceBase.prototype.GetLogAccessInfo = function (request) {
1991
2038
  return this._connection.send("GetLogAccessInfo", request, "json", false, undefined, "GetLogAccessInfoResponse");
@@ -2000,58 +2047,6 @@
2000
2047
  }(Service));
2001
2048
 
2002
2049
  var logger$3 = util.scopedLogger("@hpcc-js/comms/services/wsLogaccess.ts");
2003
- var ElasticKnownColumns;
2004
- (function (ElasticKnownColumns) {
2005
- ElasticKnownColumns["audience"] = "hpcc.log.audience";
2006
- ElasticKnownColumns["class"] = "hpcc.log.class";
2007
- ElasticKnownColumns["containerName"] = "kubernetes.container.name";
2008
- ElasticKnownColumns["jobId"] = "hpcc.log.jobid";
2009
- ElasticKnownColumns["message"] = "hpcc.log.message";
2010
- ElasticKnownColumns["procId"] = "hpcc.log.procid";
2011
- ElasticKnownColumns["sequence"] = "hpcc.log.sequence";
2012
- ElasticKnownColumns["threadId"] = "hpcc.log.threadid";
2013
- ElasticKnownColumns["timestamp"] = "hpcc.log.timestamp";
2014
- })(ElasticKnownColumns || (ElasticKnownColumns = {}));
2015
- var RElasticKnownColumns = {};
2016
- for (var key in ElasticKnownColumns) {
2017
- if (ElasticKnownColumns.hasOwnProperty(key)) {
2018
- RElasticKnownColumns[ElasticKnownColumns[key]] = key;
2019
- }
2020
- }
2021
- var elasticToLogLine = function (line) {
2022
- var retVal = {};
2023
- for (var key in RElasticKnownColumns) {
2024
- retVal[RElasticKnownColumns[key]] = line === null || line === void 0 ? void 0 : line.fields[0][key];
2025
- }
2026
- return retVal;
2027
- };
2028
- var AzureKnownColumns;
2029
- (function (AzureKnownColumns) {
2030
- AzureKnownColumns["audience"] = "hpcc_log_audience";
2031
- AzureKnownColumns["class"] = "hpcc_log_class";
2032
- AzureKnownColumns["containerID"] = "ContainerID";
2033
- AzureKnownColumns["containerName"] = "ContainerID";
2034
- AzureKnownColumns["jobId"] = "hpcc_log_jobid";
2035
- AzureKnownColumns["message"] = "hpcc_log_message";
2036
- AzureKnownColumns["procId"] = "";
2037
- AzureKnownColumns["sequence"] = "hpcc_log_sequence";
2038
- AzureKnownColumns["threadId"] = "hpcc_log_threadid";
2039
- AzureKnownColumns["timestamp"] = "hpcc_log_timestamp";
2040
- })(AzureKnownColumns || (AzureKnownColumns = {}));
2041
- var RAzureKnownColumns = {};
2042
- for (var key in AzureKnownColumns) {
2043
- if (AzureKnownColumns.hasOwnProperty(key)) {
2044
- RAzureKnownColumns[AzureKnownColumns[key]] = key;
2045
- }
2046
- }
2047
- var azureToLogLine = function (line) {
2048
- var _a;
2049
- var retVal = {};
2050
- for (var key in RAzureKnownColumns) {
2051
- retVal[RAzureKnownColumns[key]] = (_a = line === null || line === void 0 ? void 0 : line.fields[0][key]) !== null && _a !== void 0 ? _a : "";
2052
- }
2053
- return retVal;
2054
- };
2055
2050
  var LogaccessService = /** @class */ (function (_super) {
2056
2051
  __extends(LogaccessService, _super);
2057
2052
  function LogaccessService() {
@@ -2070,12 +2065,22 @@
2070
2065
  LogaccessService.prototype.GetLogsEx = function (request) {
2071
2066
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
2072
2067
  return __awaiter(this, void 0, void 0, function () {
2073
- var logInfo, getLogsRequest, filters, _loop_1, key, binaryLogFilter_1;
2068
+ var logInfo, columnMap, convertLogLine, getLogsRequest, filters, _loop_1, key, binaryLogFilter_1;
2074
2069
  return __generator(this, function (_l) {
2075
2070
  switch (_l.label) {
2076
2071
  case 0: return [4 /*yield*/, this.GetLogAccessInfo()];
2077
2072
  case 1:
2078
2073
  logInfo = _l.sent();
2074
+ columnMap = {};
2075
+ logInfo.Columns.Column.forEach(function (column) { return columnMap[column.LogType] = column.Name; });
2076
+ convertLogLine = function (line) {
2077
+ var _a;
2078
+ var retVal = {};
2079
+ for (var key in columnMap) {
2080
+ retVal[key] = (_a = line === null || line === void 0 ? void 0 : line.fields[0][columnMap[key]]) !== null && _a !== void 0 ? _a : "";
2081
+ }
2082
+ return retVal;
2083
+ };
2079
2084
  getLogsRequest = {
2080
2085
  Filter: {
2081
2086
  leftBinaryFilter: {
@@ -2097,17 +2102,8 @@
2097
2102
  filters = [];
2098
2103
  _loop_1 = function (key) {
2099
2104
  var searchField;
2100
- switch (logInfo.RemoteLogManagerType) {
2101
- case "azureloganalyticscurl":
2102
- if (key in AzureKnownColumns) {
2103
- searchField = AzureKnownColumns[key];
2104
- }
2105
- break;
2106
- case "elasticstack":
2107
- if (key in ElasticKnownColumns) {
2108
- searchField = ElasticKnownColumns[key];
2109
- }
2110
- break;
2105
+ if (key in columnMap) {
2106
+ searchField = columnMap[key];
2111
2107
  }
2112
2108
  if (searchField) {
2113
2109
  if (Array.isArray(request[key])) {
@@ -2189,16 +2185,14 @@
2189
2185
  getLogsRequest.Range.EndDate = request.EndDate.toISOString();
2190
2186
  }
2191
2187
  return [2 /*return*/, this.GetLogs(getLogsRequest).then(function (response) {
2192
- var _a, _b, _c, _d, _e;
2188
+ var _a, _b, _c;
2193
2189
  try {
2194
2190
  var logLines = JSON.parse(response.LogLines);
2195
2191
  var lines = [];
2196
2192
  switch (logInfo.RemoteLogManagerType) {
2197
2193
  case "azureloganalyticscurl":
2198
- lines = (_b = (_a = logLines.lines) === null || _a === void 0 ? void 0 : _a.map(azureToLogLine)) !== null && _b !== void 0 ? _b : [];
2199
- break;
2200
2194
  case "elasticstack":
2201
- lines = (_d = (_c = logLines.lines) === null || _c === void 0 ? void 0 : _c.map(elasticToLogLine)) !== null && _d !== void 0 ? _d : [];
2195
+ lines = (_b = (_a = logLines.lines) === null || _a === void 0 ? void 0 : _a.map(convertLogLine)) !== null && _b !== void 0 ? _b : [];
2202
2196
  break;
2203
2197
  default:
2204
2198
  logger$3.warning("Unknown RemoteLogManagerType: ".concat(logInfo.RemoteLogManagerType));
@@ -2206,7 +2200,7 @@
2206
2200
  }
2207
2201
  return {
2208
2202
  lines: lines,
2209
- total: (_e = response.TotalLogLinesAvailable) !== null && _e !== void 0 ? _e : 10000
2203
+ total: (_c = response.TotalLogLinesAvailable) !== null && _c !== void 0 ? _c : 10000
2210
2204
  };
2211
2205
  }
2212
2206
  catch (e) {
@@ -6343,7 +6337,12 @@
6343
6337
  case 0: return [4 /*yield*/, this.WUQuery()];
6344
6338
  case 1:
6345
6339
  _a.sent();
6346
- return [2 /*return*/, this];
6340
+ if (!(this.StateID === WUStateID.Compiled && !this.ActionEx && !this._submitAction)) return [3 /*break*/, 3];
6341
+ return [4 /*yield*/, this.refreshInfo()];
6342
+ case 2:
6343
+ _a.sent();
6344
+ _a.label = 3;
6345
+ case 3: return [2 /*return*/, this];
6347
6346
  }
6348
6347
  });
6349
6348
  });
@@ -9015,11 +9014,11 @@
9015
9014
  };
9016
9015
  DFUWorkunit.prototype.DFUWUFile = function (_request) {
9017
9016
  if (_request === void 0) { _request = {}; }
9018
- return this.connection.DFUWUFile(__assign(__assign({}, _request), { Wuid: this.ID })).then(function (response) {
9017
+ return this.connection.DFUWUFileEx(__assign(__assign({}, _request), { Wuid: this.ID })).then(function (response) {
9019
9018
  //TODO: additional processing?
9020
9019
  return response;
9021
9020
  }).catch(function (e) {
9022
- return {};
9021
+ return "";
9023
9022
  });
9024
9023
  };
9025
9024
  DFUWorkunit.prototype.DFUWUAction = function (actionType) {