@hpcc-js/comms 2.86.0 → 2.87.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.
Files changed (91) hide show
  1. package/dist/index.es6.js +207 -36
  2. package/dist/index.es6.js.map +1 -1
  3. package/dist/index.js +208 -36
  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 +206 -35
  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/clienttools/eclMeta.js.map +1 -1
  13. package/lib-es6/clienttools/eclcc.js.map +1 -1
  14. package/lib-es6/connection.js.map +1 -1
  15. package/lib-es6/ecl/activity.js.map +1 -1
  16. package/lib-es6/ecl/dfuWorkunit.js.map +1 -1
  17. package/lib-es6/ecl/graph.js.map +1 -1
  18. package/lib-es6/ecl/logicalFile.js.map +1 -1
  19. package/lib-es6/ecl/machine.js.map +1 -1
  20. package/lib-es6/ecl/query.js.map +1 -1
  21. package/lib-es6/ecl/resource.js.map +1 -1
  22. package/lib-es6/ecl/result.js.map +1 -1
  23. package/lib-es6/ecl/scope.js.map +1 -1
  24. package/lib-es6/ecl/sourceFile.js.map +1 -1
  25. package/lib-es6/ecl/store.js.map +1 -1
  26. package/lib-es6/ecl/targetCluster.js.map +1 -1
  27. package/lib-es6/ecl/timer.js.map +1 -1
  28. package/lib-es6/ecl/topology.js.map +1 -1
  29. package/lib-es6/ecl/workunit.js +106 -3
  30. package/lib-es6/ecl/workunit.js.map +1 -1
  31. package/lib-es6/ecl/xsdParser.js.map +1 -1
  32. package/lib-es6/espConnection.js.map +1 -1
  33. package/lib-es6/index.node.js.map +1 -1
  34. package/lib-es6/services/wsAccount.js.map +1 -1
  35. package/lib-es6/services/wsCloud.js.map +1 -1
  36. package/lib-es6/services/wsDFUXRef.js.map +1 -1
  37. package/lib-es6/services/wsEcl.js.map +1 -1
  38. package/lib-es6/services/wsLogaccess.js.map +1 -1
  39. package/lib-es6/services/wsSMC.js +9 -34
  40. package/lib-es6/services/wsSMC.js.map +1 -1
  41. package/lib-es6/services/wsStore.js.map +1 -1
  42. package/lib-es6/services/wsTopology.js.map +1 -1
  43. package/lib-es6/services/wsWorkunits.js.map +1 -1
  44. package/lib-es6/services/wsdl/FileSpray/v1.23/FileSpray.js.map +1 -1
  45. package/lib-es6/services/wsdl/FileSpray/v1.25/FileSpray.js.map +1 -1
  46. package/lib-es6/services/wsdl/WsCloud/v1/WsCloud.js.map +1 -1
  47. package/lib-es6/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.js.map +1 -1
  48. package/lib-es6/services/wsdl/WsDali/v1.04/WsDali.js.map +1 -1
  49. package/lib-es6/services/wsdl/WsDfu/v1.62/WsDfu.js.map +1 -1
  50. package/lib-es6/services/wsdl/WsDfu/v1.63/WsDfu.js.map +1 -1
  51. package/lib-es6/services/wsdl/WsDfu/v1.65/WsDfu.js.map +1 -1
  52. package/lib-es6/services/wsdl/WsFileIO/v1.01/WsFileIO.js.map +1 -1
  53. package/lib-es6/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.js.map +1 -1
  54. package/lib-es6/services/wsdl/WsResources/v1.01/WsResources.js.map +1 -1
  55. package/lib-es6/services/wsdl/WsSMC/v1.24/WsSMC.js.map +1 -1
  56. package/lib-es6/services/wsdl/WsSMC/v1.27/WsSMC.js +99 -0
  57. package/lib-es6/services/wsdl/WsSMC/v1.27/WsSMC.js.map +1 -0
  58. package/lib-es6/services/wsdl/WsTopology/v1.31/WsTopology.js.map +1 -1
  59. package/lib-es6/services/wsdl/WsTopology/v1.32/WsTopology.js.map +1 -1
  60. package/lib-es6/services/wsdl/WsWorkunits/v1.88/WsWorkunits.js.map +1 -1
  61. package/lib-es6/services/wsdl/WsWorkunits/v1.94/WsWorkunits.js.map +1 -1
  62. package/lib-es6/services/wsdl/WsWorkunits/v1.95/WsWorkunits.js.map +1 -1
  63. package/lib-es6/services/wsdl/ws_access/v1.16/ws_access.js.map +1 -1
  64. package/lib-es6/services/wsdl/ws_access/v1.17/ws_access.js.map +1 -1
  65. package/lib-es6/services/wsdl/ws_account/v1.05/ws_account.js.map +1 -1
  66. package/lib-es6/services/wsdl/ws_codesign/v1.1/ws_codesign.js.map +1 -1
  67. package/lib-es6/services/wsdl/ws_elk/v1/ws_elk.js.map +1 -1
  68. package/lib-es6/services/wsdl/ws_logaccess/v1/ws_logaccess.js.map +1 -1
  69. package/lib-es6/services/wsdl/ws_logaccess/v1.02/ws_logaccess.js.map +1 -1
  70. package/lib-es6/services/wsdl/ws_logaccess/v1.03/ws_logaccess.js.map +1 -1
  71. package/lib-es6/services/wsdl/ws_logaccess/v1.04/ws_logaccess.js.map +1 -1
  72. package/lib-es6/services/wsdl/ws_logaccess/v1.05/ws_logaccess.js.map +1 -1
  73. package/lib-es6/services/wsdl/ws_machine/v1.17/ws_machine.js.map +1 -1
  74. package/lib-es6/services/wsdl/wsstore/v1.02/wsstore.js.map +1 -1
  75. package/package.json +7 -7
  76. package/src/__package__.ts +2 -2
  77. package/src/ecl/activity.ts +2 -2
  78. package/src/ecl/workunit.ts +148 -6
  79. package/src/services/wsSMC.ts +8 -604
  80. package/src/services/wsdl/WsSMC/v1.27/WsSMC.ts +670 -0
  81. package/types/__package__.d.ts +2 -2
  82. package/types/ecl/workunit.d.ts +17 -1
  83. package/types/ecl/workunit.d.ts.map +1 -1
  84. package/types/services/wsSMC.d.ts +5 -489
  85. package/types/services/wsSMC.d.ts.map +1 -1
  86. package/types/services/wsdl/WsSMC/v1.27/WsSMC.d.ts +519 -0
  87. package/types/services/wsdl/WsSMC/v1.27/WsSMC.d.ts.map +1 -0
  88. package/types-3.4/__package__.d.ts +2 -2
  89. package/types-3.4/ecl/workunit.d.ts +17 -1
  90. package/types-3.4/services/wsSMC.d.ts +5 -489
  91. package/types-3.4/services/wsdl/WsSMC/v1.27/WsSMC.d.ts +519 -0
package/dist/index.js CHANGED
@@ -499,6 +499,7 @@
499
499
 
500
500
  Response.error = function() {
501
501
  var response = new Response(null, {status: 200, statusText: ''});
502
+ response.ok = false;
502
503
  response.status = 0;
503
504
  response.type = 'error';
504
505
  return response
@@ -549,7 +550,7 @@
549
550
  };
550
551
  // This check if specifically for when a user fetches a file locally from the file system
551
552
  // Only if the status is out of a normal range
552
- if (request.url.startsWith('file://') && (xhr.status < 200 || xhr.status > 599)) {
553
+ if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
553
554
  options.status = 200;
554
555
  } else {
555
556
  options.status = xhr.status;
@@ -647,8 +648,8 @@
647
648
  }
648
649
 
649
650
  var PKG_NAME = "@hpcc-js/comms";
650
- var PKG_VERSION = "2.86.0";
651
- var BUILD_VERSION = "2.104.34";
651
+ var PKG_VERSION = "2.87.0";
652
+ var BUILD_VERSION = "2.104.36";
652
653
 
653
654
  /******************************************************************************
654
655
  Copyright (c) Microsoft Corporation.
@@ -2501,49 +2502,117 @@
2501
2502
  return ResourcesService;
2502
2503
  }(ResourcesServiceBase));
2503
2504
 
2504
- var SMCService = /** @class */ (function () {
2505
- function SMCService(optsConnection) {
2506
- this._connection = new ESPConnection(optsConnection, "WsSMC", "1.24");
2505
+ exports.WsSMC = void 0;
2506
+ (function (WsSMC) {
2507
+ (function (LockModes) {
2508
+ LockModes["ALL"] = "ALL";
2509
+ LockModes["READ"] = "READ";
2510
+ LockModes["WRITE"] = "WRITE";
2511
+ LockModes["HOLD"] = "HOLD";
2512
+ LockModes["SUB"] = "SUB";
2513
+ })(WsSMC.LockModes || (WsSMC.LockModes = {}));
2514
+ (function (RoxieControlCmdType) {
2515
+ RoxieControlCmdType["Attach"] = "Attach";
2516
+ RoxieControlCmdType["Detach"] = "Detach";
2517
+ RoxieControlCmdType["State"] = "State";
2518
+ RoxieControlCmdType["Reload"] = "Reload";
2519
+ RoxieControlCmdType["ReloadRetry"] = "ReloadRetry";
2520
+ RoxieControlCmdType["MemLock"] = "MemLock";
2521
+ RoxieControlCmdType["MemUnlock"] = "MemUnlock";
2522
+ RoxieControlCmdType["GetMemLocked"] = "GetMemLocked";
2523
+ })(WsSMC.RoxieControlCmdType || (WsSMC.RoxieControlCmdType = {}));
2524
+ })(exports.WsSMC || (exports.WsSMC = {}));
2525
+ var SMCServiceBase = /** @class */ (function (_super) {
2526
+ __extends(SMCServiceBase, _super);
2527
+ function SMCServiceBase(optsConnection) {
2528
+ return _super.call(this, optsConnection, "WsSMC", "1.27") || this;
2507
2529
  }
2508
- SMCService.prototype.connectionOptions = function () {
2509
- return this._connection.opts();
2530
+ SMCServiceBase.prototype.Activity = function (request) {
2531
+ return this._connection.send("Activity", request, "json", false, undefined, "ActivityResponse");
2510
2532
  };
2511
- SMCService.prototype.Activity = function (request) {
2512
- return this._connection.send("Activity", request).then(function (response) {
2513
- return __assign({ Running: {
2514
- ActiveWorkunit: []
2515
- } }, response);
2516
- });
2533
+ SMCServiceBase.prototype.BrowseResources = function (request) {
2534
+ return this._connection.send("BrowseResources", request, "json", false, undefined, "BrowseResourcesResponse");
2535
+ };
2536
+ SMCServiceBase.prototype.ClearQueue = function (request) {
2537
+ return this._connection.send("ClearQueue", request, "json", false, undefined, "SMCQueueResponse");
2538
+ };
2539
+ SMCServiceBase.prototype.GetBuildInfo = function (request) {
2540
+ return this._connection.send("GetBuildInfo", request, "json", false, undefined, "GetBuildInfoResponse");
2541
+ };
2542
+ SMCServiceBase.prototype.GetStatusServerInfo = function (request) {
2543
+ return this._connection.send("GetStatusServerInfo", request, "json", false, undefined, "GetStatusServerInfoResponse");
2544
+ };
2545
+ SMCServiceBase.prototype.GetThorQueueAvailability = function (request) {
2546
+ return this._connection.send("GetThorQueueAvailability", request, "json", false, undefined, "GetThorQueueAvailabilityResponse");
2547
+ };
2548
+ SMCServiceBase.prototype.Index = function (request) {
2549
+ return this._connection.send("Index", request, "json", false, undefined, "SMCIndexResponse");
2550
+ };
2551
+ SMCServiceBase.prototype.LockQuery = function (request) {
2552
+ return this._connection.send("LockQuery", request, "json", false, undefined, "LockQueryResponse");
2553
+ };
2554
+ SMCServiceBase.prototype.MoveJobBack = function (request) {
2555
+ return this._connection.send("MoveJobBack", request, "json", false, undefined, "SMCJobResponse");
2556
+ };
2557
+ SMCServiceBase.prototype.MoveJobDown = function (request) {
2558
+ return this._connection.send("MoveJobDown", request, "json", false, undefined, "SMCJobResponse");
2517
2559
  };
2518
- SMCService.prototype.BrowseResources = function (request) {
2519
- return this._connection.send("BrowseResources", request);
2560
+ SMCServiceBase.prototype.MoveJobFront = function (request) {
2561
+ return this._connection.send("MoveJobFront", request, "json", false, undefined, "SMCJobResponse");
2520
2562
  };
2521
- SMCService.prototype.GetBuildInfo = function (request) {
2522
- return this._connection.send("GetBuildInfo", request);
2563
+ SMCServiceBase.prototype.MoveJobUp = function (request) {
2564
+ return this._connection.send("MoveJobUp", request, "json", false, undefined, "SMCJobResponse");
2523
2565
  };
2524
- SMCService.prototype.GetStatusServerInfo = function (request) {
2525
- return this._connection.send("GetStatusServerInfo", request);
2566
+ SMCServiceBase.prototype.NotInCommunityEdition = function (request) {
2567
+ return this._connection.send("NotInCommunityEdition", request, "json", false, undefined, "NotInCommunityEditionResponse");
2526
2568
  };
2527
- SMCService.prototype.GetThorQueueAvailability = function (request) {
2528
- return this._connection.send("GetThorQueueAvailability", request);
2569
+ SMCServiceBase.prototype.PauseQueue = function (request) {
2570
+ return this._connection.send("PauseQueue", request, "json", false, undefined, "SMCQueueResponse");
2529
2571
  };
2530
- SMCService.prototype.LockQuery = function (request) {
2531
- return this._connection.send("LockQuery", request);
2572
+ SMCServiceBase.prototype.Ping = function (request) {
2573
+ return this._connection.send("Ping", request, "json", false, undefined, "WsSMCPingResponse");
2532
2574
  };
2533
- SMCService.prototype.NotInCommunityEdition = function (request) {
2534
- return this._connection.send("NotInCommunityEdition", request);
2575
+ SMCServiceBase.prototype.RemoveJob = function (request) {
2576
+ return this._connection.send("RemoveJob", request, "json", false, undefined, "SMCJobResponse");
2535
2577
  };
2536
- SMCService.prototype.RoxieControlCmd = function (request) {
2537
- return this._connection.send("RoxieControlCmd", request);
2578
+ SMCServiceBase.prototype.ResumeQueue = function (request) {
2579
+ return this._connection.send("ResumeQueue", request, "json", false, undefined, "SMCQueueResponse");
2538
2580
  };
2539
- SMCService.prototype.SetBanner = function (request) {
2540
- return this._connection.send("SetBanner", request);
2581
+ SMCServiceBase.prototype.RoxieControlCmd = function (request) {
2582
+ return this._connection.send("RoxieControlCmd", request, "json", false, undefined, "RoxieControlCmdResponse");
2541
2583
  };
2542
- SMCService.prototype.SMCJob = function (request) {
2543
- return this._connection.send("SMCJob", request);
2584
+ SMCServiceBase.prototype.RoxieXrefCmd = function (request) {
2585
+ return this._connection.send("RoxieXrefCmd", request, "json", false, undefined, "RoxieXrefCmdResponse");
2586
+ };
2587
+ SMCServiceBase.prototype.SetBanner = function (request) {
2588
+ return this._connection.send("SetBanner", request, "json", false, undefined, "SetBannerResponse");
2589
+ };
2590
+ SMCServiceBase.prototype.SetJobPriority = function (request) {
2591
+ return this._connection.send("SetJobPriority", request, "json", false, undefined, "SMCPriorityResponse");
2592
+ };
2593
+ SMCServiceBase.prototype.StopQueue = function (request) {
2594
+ return this._connection.send("StopQueue", request, "json", false, undefined, "SMCQueueResponse");
2595
+ };
2596
+ return SMCServiceBase;
2597
+ }(Service));
2598
+
2599
+ var SMCService = /** @class */ (function (_super) {
2600
+ __extends(SMCService, _super);
2601
+ function SMCService() {
2602
+ return _super !== null && _super.apply(this, arguments) || this;
2603
+ }
2604
+ SMCService.prototype.connectionOptions = function () {
2605
+ return this._connection.opts();
2606
+ };
2607
+ SMCService.prototype.Activity = function (request) {
2608
+ return _super.prototype.Activity.call(this, request).then(function (response) {
2609
+ return __assign({ Running: {
2610
+ ActiveWorkunit: []
2611
+ } }, response);
2612
+ });
2544
2613
  };
2545
2614
  return SMCService;
2546
- }());
2615
+ }(SMCServiceBase));
2547
2616
 
2548
2617
  var StoreService = /** @class */ (function (_super) {
2549
2618
  __extends(StoreService, _super);
@@ -5645,6 +5714,76 @@
5645
5714
  }
5646
5715
  return num;
5647
5716
  }
5717
+ var DEFINITION_LIST = "DefinitionList";
5718
+ var definitionRegex = /([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/;
5719
+ var extendedProps = ["Avg", "Min", "Max", "Delta", "StdDev"];
5720
+ var relatedProps = ["SkewMin", "SkewMax", "NodeMin", "NodeMax"];
5721
+ var metricKeyRegex = /[A-Z][a-z]*/g;
5722
+ function _splitLabel(fullLabel) {
5723
+ // Related properties ---
5724
+ for (var _i = 0, relatedProps_1 = relatedProps; _i < relatedProps_1.length; _i++) {
5725
+ var relProp = relatedProps_1[_i];
5726
+ var index = fullLabel.indexOf(relProp);
5727
+ if (index === 0) {
5728
+ var measure = "";
5729
+ var label = fullLabel.slice(index + relProp.length);
5730
+ return { measure: measure, ext: relProp, label: label };
5731
+ }
5732
+ }
5733
+ // Primary properties ---
5734
+ var labelParts = fullLabel.match(metricKeyRegex);
5735
+ if (labelParts === null || labelParts === void 0 ? void 0 : labelParts.length) {
5736
+ var measure = labelParts.shift();
5737
+ var label = labelParts.join("");
5738
+ for (var _a = 0, extendedProps_1 = extendedProps; _a < extendedProps_1.length; _a++) {
5739
+ var ext = extendedProps_1[_a];
5740
+ var index = label.indexOf(ext);
5741
+ if (index === 0) {
5742
+ label = label.slice(index + ext.length);
5743
+ return { measure: measure, ext: ext, label: label };
5744
+ }
5745
+ }
5746
+ // Not an aggregate property ---
5747
+ return { measure: measure, ext: "", label: label };
5748
+ }
5749
+ // No match found ---
5750
+ return { measure: "", ext: "", label: fullLabel };
5751
+ }
5752
+ var splitLabelCache = {};
5753
+ function splitLabel(key) {
5754
+ var retVal = splitLabelCache[key];
5755
+ if (!retVal) {
5756
+ retVal = _splitLabel(key);
5757
+ splitLabelCache[key] = retVal;
5758
+ }
5759
+ return retVal;
5760
+ }
5761
+ function formatValue(item, key) {
5762
+ var _a, _b, _c;
5763
+ return (_c = (_b = (_a = item.__formattedProps) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : item[key]) !== null && _c !== void 0 ? _c : "";
5764
+ }
5765
+ function formatValues(item, key, dedup) {
5766
+ var keyParts = splitLabel(key);
5767
+ if (!dedup[keyParts.measure]) {
5768
+ dedup[keyParts.label] = true;
5769
+ return {
5770
+ Key: "".concat(keyParts.measure).concat(keyParts.label),
5771
+ Value: formatValue(item, "".concat(keyParts.measure).concat(keyParts.label)),
5772
+ // Extended properties ---
5773
+ Avg: formatValue(item, "".concat(keyParts.measure, "Avg").concat(keyParts.label)),
5774
+ Min: formatValue(item, "".concat(keyParts.measure, "Min").concat(keyParts.label)),
5775
+ Max: formatValue(item, "".concat(keyParts.measure, "Max").concat(keyParts.label)),
5776
+ Delta: formatValue(item, "".concat(keyParts.measure, "Delta").concat(keyParts.label)),
5777
+ StdDev: formatValue(item, "".concat(keyParts.measure, "StdDev").concat(keyParts.label)),
5778
+ // Related properties ---
5779
+ SkewMin: formatValue(item, "SkewMin".concat(keyParts.label)),
5780
+ SkewMax: formatValue(item, "SkewMax".concat(keyParts.label)),
5781
+ NodeMin: formatValue(item, "NodeMin".concat(keyParts.label)),
5782
+ NodeMax: formatValue(item, "NodeMax".concat(keyParts.label))
5783
+ };
5784
+ }
5785
+ return null;
5786
+ }
5648
5787
  var logger$2 = util.scopedLogger("workunit.ts");
5649
5788
  var WUStateID = exports.WUStateID;
5650
5789
  var WorkunitCache = /** @class */ (function (_super) {
@@ -6483,8 +6622,7 @@
6483
6622
  }
6484
6623
  };
6485
6624
  var data = [];
6486
- for (var _i = 0, scopes_1 = scopes; _i < scopes_1.length; _i++) {
6487
- var scope = scopes_1[_i];
6625
+ var _loop_1 = function (scope) {
6488
6626
  var props = {};
6489
6627
  var formattedProps = {};
6490
6628
  if (scope && scope.Id && scope.Properties && scope.Properties.Property) {
@@ -6533,8 +6671,42 @@
6533
6671
  }
6534
6672
  formattedProps[scopeProperty.Name] = formatNum((_a = scopeProperty.Formatted) !== null && _a !== void 0 ? _a : props[scopeProperty.Name]);
6535
6673
  }
6674
+ // Other properties ---
6675
+ }
6676
+ var normalizedScope = __assign({ id: scope.Id, name: scope.ScopeName, type: scope.ScopeType, Kind: scope["Kind"], Label: scope["Label"], __formattedProps: formattedProps, __groupedProps: {} }, props);
6677
+ if (normalizedScope[DEFINITION_LIST]) {
6678
+ try {
6679
+ var definitionList = JSON.parse(normalizedScope[DEFINITION_LIST].split("\\").join("\\\\"));
6680
+ normalizedScope[DEFINITION_LIST] = [];
6681
+ definitionList.forEach(function (definition, idx) {
6682
+ var _a;
6683
+ var matches = definition.match(definitionRegex);
6684
+ if (matches) {
6685
+ var filePath = ((_a = matches[1]) !== null && _a !== void 0 ? _a : "") + matches[2] + matches[3];
6686
+ var line = parseInt(matches[5]);
6687
+ var col = parseInt(matches[6]);
6688
+ normalizedScope[DEFINITION_LIST].push({ filePath: filePath, line: line, col: col });
6689
+ }
6690
+ });
6691
+ }
6692
+ catch (e) {
6693
+ logger$2.error("Unexpected \"DefinitionList\": ".concat(normalizedScope[DEFINITION_LIST]));
6694
+ }
6695
+ }
6696
+ var dedup = {};
6697
+ for (var key in normalizedScope) {
6698
+ if (key.indexOf("__") !== 0) {
6699
+ var row = formatValues(normalizedScope, key, dedup);
6700
+ if (row) {
6701
+ normalizedScope.__groupedProps[row.Key] = row;
6702
+ }
6703
+ }
6536
6704
  }
6537
- data.push(__assign({ id: scope.Id, name: scope.ScopeName, type: scope.ScopeType, __formattedProps: formattedProps }, props));
6705
+ data.push(normalizedScope);
6706
+ };
6707
+ for (var _i = 0, scopes_1 = scopes; _i < scopes_1.length; _i++) {
6708
+ var scope = scopes_1[_i];
6709
+ _loop_1(scope);
6538
6710
  }
6539
6711
  return {
6540
6712
  meta: meta,