@hpcc-js/comms 2.96.0 → 2.97.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/index.js CHANGED
@@ -648,8 +648,8 @@
648
648
  }
649
649
 
650
650
  var PKG_NAME = "@hpcc-js/comms";
651
- var PKG_VERSION = "2.96.0";
652
- var BUILD_VERSION = "2.106.9";
651
+ var PKG_VERSION = "2.97.0";
652
+ var BUILD_VERSION = "2.106.11";
653
653
 
654
654
  /******************************************************************************
655
655
  Copyright (c) Microsoft Corporation.
@@ -746,7 +746,7 @@
746
746
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
747
747
  };
748
748
 
749
- var logger$4 = util.scopedLogger("comms/connection.ts");
749
+ var logger$5 = util.scopedLogger("comms/connection.ts");
750
750
  function instanceOfIOptions(object) {
751
751
  return "baseUrl" in object;
752
752
  }
@@ -848,12 +848,12 @@
848
848
  respondedTimeout -= respondedTick;
849
849
  if (respondedTimeout <= 0) {
850
850
  clearInterval(progress);
851
- logger$4.error("Request timeout: " + script.src);
851
+ logger$5.error("Request timeout: " + script.src);
852
852
  doCallback();
853
853
  reject(Error("Request timeout: " + script.src));
854
854
  }
855
855
  else {
856
- logger$4.debug("Request pending (" + respondedTimeout / 1000 + " sec): " + script.src);
856
+ logger$5.debug("Request pending (" + respondedTimeout / 1000 + " sec): " + script.src);
857
857
  }
858
858
  }
859
859
  }, respondedTick);
@@ -2099,7 +2099,7 @@
2099
2099
  return LogaccessServiceBase;
2100
2100
  }(Service));
2101
2101
 
2102
- var logger$3 = util.scopedLogger("@hpcc-js/comms/services/wsLogaccess.ts");
2102
+ var logger$4 = util.scopedLogger("@hpcc-js/comms/services/wsLogaccess.ts");
2103
2103
  var LogaccessService = /** @class */ (function (_super) {
2104
2104
  __extends(LogaccessService, _super);
2105
2105
  function LogaccessService() {
@@ -2130,7 +2130,12 @@
2130
2130
  var _a;
2131
2131
  var retVal = {};
2132
2132
  for (var key in columnMap) {
2133
- retVal[key] = (_a = line === null || line === void 0 ? void 0 : line.fields[0][columnMap[key]]) !== null && _a !== void 0 ? _a : "";
2133
+ if (line === null || line === void 0 ? void 0 : line.fields) {
2134
+ retVal[key] = (_a = Object.assign.apply(Object, __spreadArray([{}], line.fields, false))[columnMap[key]]) !== null && _a !== void 0 ? _a : "";
2135
+ }
2136
+ else {
2137
+ retVal[key] = "";
2138
+ }
2134
2139
  }
2135
2140
  return retVal;
2136
2141
  };
@@ -2288,10 +2293,11 @@
2288
2293
  switch (logInfo.RemoteLogManagerType) {
2289
2294
  case "azureloganalyticscurl":
2290
2295
  case "elasticstack":
2296
+ case "grafanacurl":
2291
2297
  lines = (_b = (_a = logLines.lines) === null || _a === void 0 ? void 0 : _a.map(convertLogLine)) !== null && _b !== void 0 ? _b : [];
2292
2298
  break;
2293
2299
  default:
2294
- logger$3.warning("Unknown RemoteLogManagerType: ".concat(logInfo.RemoteLogManagerType));
2300
+ logger$4.warning("Unknown RemoteLogManagerType: ".concat(logInfo.RemoteLogManagerType));
2295
2301
  lines = [];
2296
2302
  }
2297
2303
  return {
@@ -2300,7 +2306,7 @@
2300
2306
  };
2301
2307
  }
2302
2308
  catch (e) {
2303
- logger$3.error(e);
2309
+ logger$4.error(e);
2304
2310
  }
2305
2311
  return {
2306
2312
  lines: [],
@@ -5915,7 +5921,7 @@
5915
5921
  }
5916
5922
  return null;
5917
5923
  }
5918
- var logger$2 = util.scopedLogger("workunit.ts");
5924
+ var logger$3 = util.scopedLogger("workunit.ts");
5919
5925
  var WorkunitCache = /** @class */ (function (_super) {
5920
5926
  __extends(WorkunitCache, _super);
5921
5927
  function WorkunitCache() {
@@ -6821,7 +6827,7 @@
6821
6827
  });
6822
6828
  }
6823
6829
  catch (e) {
6824
- logger$2.error("Unexpected \"DefinitionList\": ".concat(normalizedScope[DEFINITION_LIST]));
6830
+ logger$3.error("Unexpected \"DefinitionList\": ".concat(normalizedScope[DEFINITION_LIST]));
6825
6831
  }
6826
6832
  }
6827
6833
  var dedup = {};
@@ -7085,7 +7091,7 @@
7085
7091
  return false;
7086
7092
  });
7087
7093
  if (!wuMissing) {
7088
- logger$2.warning("Unexpected exception: ");
7094
+ logger$3.warning("Unexpected exception: ");
7089
7095
  throw e;
7090
7096
  }
7091
7097
  return {};
@@ -7122,7 +7128,7 @@
7122
7128
  return false;
7123
7129
  });
7124
7130
  if (!wuMissing) {
7125
- logger$2.warning("Unexpected exception: ");
7131
+ logger$3.warning("Unexpected exception: ");
7126
7132
  throw e;
7127
7133
  }
7128
7134
  return {};
@@ -7216,7 +7222,7 @@
7216
7222
  }
7217
7223
  return new util.XMLNode(command);
7218
7224
  }).catch(function (_) {
7219
- logger$2.error(_);
7225
+ logger$3.error(_);
7220
7226
  return Promise.resolve(new util.XMLNode(command));
7221
7227
  });
7222
7228
  };
@@ -7516,6 +7522,7 @@
7516
7522
  return Activity;
7517
7523
  }(util.StateObject));
7518
7524
 
7525
+ var logger$2 = util.scopedLogger("logicalFile.ts");
7519
7526
  var LogicalFileCache = /** @class */ (function (_super) {
7520
7527
  __extends(LogicalFileCache, _super);
7521
7528
  function LogicalFileCache() {
@@ -7807,6 +7814,11 @@
7807
7814
  enumerable: false,
7808
7815
  configurable: true
7809
7816
  });
7817
+ Object.defineProperty(LogicalFile.prototype, "StateID", {
7818
+ get: function () { return this.get("StateID"); },
7819
+ enumerable: false,
7820
+ configurable: true
7821
+ });
7810
7822
  Object.defineProperty(LogicalFile.prototype, "ExpirationDate", {
7811
7823
  get: function () { return this.get("ExpirationDate"); },
7812
7824
  enumerable: false,
@@ -7861,6 +7873,21 @@
7861
7873
  return this.connection.DFUInfo({ Cluster: this.Cluster, Name: this.Name }).then(function (response) {
7862
7874
  _this.set(__assign({ Cluster: _this.Cluster }, response.FileDetail));
7863
7875
  return response.FileDetail;
7876
+ }).catch(function (e) {
7877
+ // deleted ---
7878
+ var fileMissing = e.Exception.some(function (exception) {
7879
+ if (exception.Code === 20038) {
7880
+ _this.set("Name", _this.Name + " (Deleted)");
7881
+ _this.set("StateID", 999);
7882
+ return true;
7883
+ }
7884
+ return false;
7885
+ });
7886
+ if (!fileMissing) {
7887
+ logger$2.warning("Unexpected exception: ");
7888
+ throw e;
7889
+ }
7890
+ return {};
7864
7891
  });
7865
7892
  };
7866
7893
  LogicalFile.prototype.fetchDefFile = function (format) {