@hpcc-js/comms 3.5.0 → 3.5.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.
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
4
4
  import { scopedLogger, join, promiseTimeout, exists, deepMixin, xml2json, StateObject, Cache, Graph, Subgraph as Subgraph$1, Vertex as Vertex$1, Edge as Edge$1, SAXStackParser, Stack, espTime2Seconds as espTime2Seconds$1, deepMixinT, XMLNode, debounce, Message, Dispatch } from "@hpcc-js/util";
5
- const PKG_NAME = "@hpcc-js/comms", PKG_VERSION = "3.4.0", BUILD_VERSION = "3.4.0", logger$5 = scopedLogger("comms/connection.ts");
5
+ const PKG_NAME = "@hpcc-js/comms", PKG_VERSION = "3.5.0", BUILD_VERSION = "3.6.0", logger$5 = scopedLogger("comms/connection.ts");
6
6
  function instanceOfIOptions(object) {
7
7
  return "baseUrl" in object;
8
8
  }
@@ -4071,7 +4071,11 @@ class Workunit extends StateObject {
4071
4071
  if (scope && scope.Id && scope.Properties && scope.Properties.Property)
4072
4072
  for (const key in scope.Properties.Property) {
4073
4073
  const scopeProperty = scope.Properties.Property[key];
4074
- switch (scopeProperty.Measure === "ns" && (scopeProperty.Measure = "s"), columns[scopeProperty.Name] = { ...scopeProperty }, safeDelete(columns, scopeProperty.Name, "RawValue"), safeDelete(columns, scopeProperty.Name, "Formatted"), scopeProperty.Measure) {
4074
+ if (scopeProperty.Measure === "ns" && (scopeProperty.Measure = "s"), scopeProperty.Name === "Kind") {
4075
+ const rawValue = parseInt(scopeProperty.RawValue, 10);
4076
+ scopeProperty.Formatted = meta.Activities.Activity.filter((a) => a.Kind === rawValue)[0].Name ?? scopeProperty.RawValue;
4077
+ }
4078
+ switch (columns[scopeProperty.Name] = { ...scopeProperty }, safeDelete(columns, scopeProperty.Name, "RawValue"), safeDelete(columns, scopeProperty.Name, "Formatted"), scopeProperty.Measure) {
4075
4079
  case "bool":
4076
4080
  props[scopeProperty.Name] = !!+scopeProperty.RawValue;
4077
4081
  break;
@@ -4293,7 +4297,7 @@ class Workunit extends StateObject {
4293
4297
  WUQuery(_request = {}) {
4294
4298
  return this.connection.WUQuery({ ..._request, Wuid: this.Wuid }).then((response) => (this.set(response.Workunits.ECLWorkunit[0]), response)).catch((e) => {
4295
4299
  if (!e.Exception.some((exception) => exception.Code === 20081 ? (this.clearState(this.Wuid), this.set("StateID", WUStateID.NotFound), !0) : !1))
4296
- throw logger$3.warning("Unexpected exception: "), e;
4300
+ throw logger$3.warning(`Unexpected ESP exception: ${e.message}`), e;
4297
4301
  return {};
4298
4302
  });
4299
4303
  }
@@ -4312,7 +4316,7 @@ class Workunit extends StateObject {
4312
4316
  ResultViews: response.ResultViews
4313
4317
  }), response)).catch((e) => {
4314
4318
  if (!e.Exception.some((exception) => exception.Code === 20080 ? (this.clearState(this.Wuid), this.set("StateID", WUStateID.NotFound), !0) : !1))
4315
- throw logger$3.warning("Unexpected exception: "), e;
4319
+ throw logger$3.warning(`Unexpected ESP exception: ${e.message}`), e;
4316
4320
  return {};
4317
4321
  });
4318
4322
  }
@@ -4797,7 +4801,7 @@ class LogicalFile extends StateObject {
4797
4801
  ...response.FileDetail
4798
4802
  }), response.FileDetail)).catch((e) => {
4799
4803
  if (!e.Exception.some((exception) => exception.Code === 20038 ? (this.set("Name", this.Name + " (Deleted)"), this.set("StateID", 999), !0) : !1))
4800
- throw logger$2.warning("Unexpected exception: "), e;
4804
+ throw logger$2.warning(`Unexpected ESP exception: ${e.message}`), e;
4801
4805
  return {};
4802
4806
  });
4803
4807
  }
@@ -5488,9 +5492,9 @@ class QueryGraph {
5488
5492
  if (edge._sourceActivity || edge._targetActivity) {
5489
5493
  edge._isSpill = !0;
5490
5494
  const source = edge.getSource();
5491
- source._isSpill = !0;
5495
+ source && (source._isSpill = !0);
5492
5496
  const target = edge.getTarget();
5493
- target._isSpill = !0;
5497
+ target && (target._isSpill = !0);
5494
5498
  }
5495
5499
  }
5496
5500
  }
@@ -6193,7 +6197,7 @@ class DFUWorkunit extends StateObject {
6193
6197
  999
6194
6198
  /* NotFound */
6195
6199
  ), !0) : !1))
6196
- throw logger.warning("Unexpected exception: "), e;
6200
+ throw logger.warning(`Unexpected ESP exception: ${e.message}`), e;
6197
6201
  return {};
6198
6202
  });
6199
6203
  }