@hpcc-js/comms 3.5.0 → 3.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/comms",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "description": "hpcc-js - Communications",
5
5
  "type": "module",
6
6
  "main": "./dist/node/index.cjs",
@@ -25,7 +25,7 @@
25
25
  "./dist/*": "./dist/*",
26
26
  "./package.json": "./package.json"
27
27
  },
28
- "types": "./types/index.browser.d.ts",
28
+ "types": "./types/index.node.d.ts",
29
29
  "files": [
30
30
  "dist/*",
31
31
  "src/*",
@@ -72,18 +72,18 @@
72
72
  "wsdl-all": "npm-run-all --aggregate-output -c --serial build --parallel wsdl-*"
73
73
  },
74
74
  "dependencies": {
75
- "@hpcc-js/util": "^3.3.0",
76
- "@xmldom/xmldom": "0.9.5",
75
+ "@hpcc-js/util": "^3.3.1",
76
+ "@xmldom/xmldom": "0.9.8",
77
77
  "abort-controller": "3.0.0",
78
78
  "data-uri-to-buffer": "6.0.2",
79
79
  "node-fetch": "3.3.2",
80
80
  "safe-buffer": "5.2.1",
81
81
  "tmp": "0.2.3",
82
- "undici": "6.21.0"
82
+ "undici": "6.21.2"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@hpcc-js/ddl-shim": "^3.0.0",
86
- "@hpcc-js/esbuild-plugins": "^1.4.0",
86
+ "@hpcc-js/esbuild-plugins": "^1.4.1",
87
87
  "@types/d3-request": "1.0.9",
88
88
  "@types/d3-time-format": "2.3.4",
89
89
  "@types/node": "^18",
@@ -91,7 +91,7 @@
91
91
  "d3-array": "^1",
92
92
  "d3-format": "^1",
93
93
  "d3-time-format": "^2",
94
- "soap": "1.1.5",
94
+ "soap": "1.1.10",
95
95
  "typescript-formatter": "^7.2.2"
96
96
  },
97
97
  "repository": {
@@ -111,5 +111,5 @@
111
111
  "esp",
112
112
  "HPCC-Platform"
113
113
  ],
114
- "gitHead": "220704148d2a9cc72a4bfa5160107d6fdf37c914"
114
+ "gitHead": "c93b72a99c4a1f6db5d08a6c17b85d436c68da55"
115
115
  }
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/comms";
2
- export const PKG_VERSION = "3.5.0";
3
- export const BUILD_VERSION = "3.5.0";
2
+ export const PKG_VERSION = "3.5.2";
3
+ export const BUILD_VERSION = "3.6.2";
@@ -390,8 +390,12 @@ export class ClientTools {
390
390
  attachWorkspace(this.cwd),
391
391
  this.execFile(this.eclccPath, this.cwd, this.args(["-M", filePath]), "eclcc", `Cannot find ${this.eclccPath}`)
392
392
  ]).then(([metaWorkspace, execFileResponse]: [Workspace, IExecFile]) => {
393
- if (execFileResponse && execFileResponse.stdout && execFileResponse.stdout.length) {
394
- metaWorkspace.parseMetaXML(execFileResponse.stdout);
393
+ try {
394
+ if (execFileResponse && execFileResponse.stdout && execFileResponse.stdout.length) {
395
+ metaWorkspace.parseMetaXML(execFileResponse.stdout);
396
+ }
397
+ } catch (e: any) {
398
+ logger.error(`fetchMeta: Error parsing XML - ${e?.message ?? "unknown"}`);
395
399
  }
396
400
  return metaWorkspace;
397
401
  });
@@ -403,8 +407,12 @@ export class ClientTools {
403
407
  this.execFile(this.eclccPath, this.cwd, this.args([...args, "-M", filePath]), "eclcc", `Cannot find ${this.eclccPath}`)
404
408
  ]).then(([metaWorkspace, execFileResponse]: [Workspace, IExecFile]) => {
405
409
  let checked: string[] = [];
406
- if (execFileResponse && execFileResponse.stdout && execFileResponse.stdout.length) {
407
- checked = metaWorkspace.parseMetaXML(execFileResponse.stdout);
410
+ try {
411
+ if (execFileResponse && execFileResponse.stdout && execFileResponse.stdout.length) {
412
+ checked = metaWorkspace.parseMetaXML(execFileResponse.stdout);
413
+ }
414
+ } catch (e: any) {
415
+ logger.error(`syntaxCheck: Error parsing XML - ${e?.message ?? "unknown"}`);
408
416
  }
409
417
  return new EclccErrors(execFileResponse ? execFileResponse.stderr : "", checked);
410
418
  });
@@ -355,7 +355,7 @@ export class DFUWorkunit extends StateObject<UDFUWorkunitState, IDFUWorkunitStat
355
355
  return false;
356
356
  });
357
357
  if (!wuMissing) {
358
- logger.warning("Unexpected exception: ");
358
+ logger.warning(`Unexpected ESP exception: ${e.message}`);
359
359
  throw e;
360
360
  }
361
361
  return {} as FileSpray.GetDFUWorkunitResponse;
@@ -165,7 +165,7 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme
165
165
  return false;
166
166
  });
167
167
  if (!fileMissing) {
168
- logger.warning("Unexpected exception: ");
168
+ logger.warning(`Unexpected ESP exception: ${e.message}`);
169
169
  throw e;
170
170
  }
171
171
  return {} as FileDetailEx;
@@ -753,9 +753,13 @@ export class QueryGraph {
753
753
  } else if (edge._sourceActivity || edge._targetActivity) {
754
754
  edge._isSpill = true;
755
755
  const source = edge.getSource();
756
- source._isSpill = true;
756
+ if (source) {
757
+ source._isSpill = true;
758
+ }
757
759
  const target = edge.getTarget();
758
- target._isSpill = true;
760
+ if (target) {
761
+ target._isSpill = true;
762
+ }
759
763
  }
760
764
  retVal.addEdge(edge);
761
765
  break;
@@ -685,6 +685,10 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
685
685
  if (scopeProperty.Measure === "ns") {
686
686
  scopeProperty.Measure = "s";
687
687
  }
688
+ if (scopeProperty.Name === "Kind") {
689
+ const rawValue = parseInt(scopeProperty.RawValue, 10);
690
+ scopeProperty.Formatted = meta.Activities.Activity.filter(a => a.Kind === rawValue)[0].Name ?? scopeProperty.RawValue;
691
+ }
688
692
  columns[scopeProperty.Name] = { ...scopeProperty };
689
693
  safeDelete(columns, scopeProperty.Name, "RawValue");
690
694
  safeDelete(columns, scopeProperty.Name, "Formatted");
@@ -995,7 +999,13 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
995
999
  // WsWorkunits passthroughs ---
996
1000
  protected WUQuery(_request: Partial<WsWorkunits.WUQuery> = {}): Promise<WsWorkunits.WUQueryResponse> {
997
1001
  return this.connection.WUQuery({ ..._request, Wuid: this.Wuid }).then((response) => {
998
- this.set(response.Workunits.ECLWorkunit[0]);
1002
+ if (response.Workunits.ECLWorkunit.length === 0) {
1003
+ // deleted ---
1004
+ this.clearState(this.Wuid);
1005
+ this.set("StateID", WUStateID.NotFound);
1006
+ } else {
1007
+ this.set(response.Workunits.ECLWorkunit[0]);
1008
+ }
999
1009
  return response;
1000
1010
  }).catch((e: ESPExceptions) => {
1001
1011
  // deleted ---
@@ -1008,7 +1018,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
1008
1018
  return false;
1009
1019
  });
1010
1020
  if (!wuMissing) {
1011
- logger.warning("Unexpected exception: ");
1021
+ logger.warning(`Unexpected ESP exception: ${e.message}`);
1012
1022
  throw e;
1013
1023
  }
1014
1024
  return {} as WsWorkunits.WUQueryResponse;
@@ -1050,7 +1060,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
1050
1060
  return false;
1051
1061
  });
1052
1062
  if (!wuMissing) {
1053
- logger.warning("Unexpected exception: ");
1063
+ logger.warning(`Unexpected ESP exception: ${e.message}`);
1054
1064
  throw e;
1055
1065
  }
1056
1066
  return {} as WsWorkunits.WUInfoResponse;
@@ -1,3 +1,3 @@
1
1
  export declare const PKG_NAME = "@hpcc-js/comms";
2
- export declare const PKG_VERSION = "3.4.0";
3
- export declare const BUILD_VERSION = "3.4.0";
2
+ export declare const PKG_VERSION = "3.5.1";
3
+ export declare const BUILD_VERSION = "3.6.1";