@hpcc-js/comms 3.13.0 → 3.14.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/comms",
3
- "version": "3.13.0",
3
+ "version": "3.14.0",
4
4
  "description": "hpcc-js - Communications",
5
5
  "type": "module",
6
6
  "main": "./dist/node/index.cjs",
@@ -76,9 +76,7 @@
76
76
  "dependencies": {
77
77
  "@hpcc-js/util": "^3.4.4",
78
78
  "@xmldom/xmldom": "0.9.8",
79
- "abort-controller": "3.0.0",
80
- "node-fetch": "3.3.2",
81
- "undici": "7.16.0"
79
+ "undici": "7.18.2"
82
80
  },
83
81
  "devDependencies": {
84
82
  "@hpcc-js/ddl-shim": "^3.2.3",
@@ -112,5 +110,5 @@
112
110
  "esp",
113
111
  "HPCC-Platform"
114
112
  ],
115
- "gitHead": "70194f16ed27ea1167af126b35cbf4af5f181be9"
113
+ "gitHead": "4b76aa36763923096cd3ff7afed75e054ea33197"
116
114
  }
@@ -326,6 +326,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
326
326
  get FileAccessCost(): number { return this.get("FileAccessCost"); }
327
327
  get NoAccess(): boolean { return this.get("NoAccess"); }
328
328
  get ECLWUProcessList(): WsWorkunits.ECLWUProcessList { return this.get("ECLWUProcessList"); }
329
+ get CostSavingPotential(): number { return this.get("CostSavingPotential"); }
329
330
 
330
331
  // Factories ---
331
332
  static create(optsConnection: IOptions | IConnection): Promise<Workunit> {
package/src/index.node.ts CHANGED
@@ -3,38 +3,22 @@ import { root } from "@hpcc-js/util";
3
3
  import { DOMParser } from "@xmldom/xmldom";
4
4
  root.DOMParser = DOMParser;
5
5
 
6
- // fetch polyfill ---
7
- import fetch, { Headers, Request, Response, } from "node-fetch";
8
-
6
+ // fetch setup for Node.js ---
9
7
  import * as https from "node:https";
10
8
  import { Buffer } from "node:buffer";
11
9
  import { Agent, setGlobalDispatcher } from "undici";
12
10
 
13
- if (typeof root.fetch === "undefined") {
14
- // NodeJS < v18 ---
15
- root.fetch = fetch;
16
- root.Headers = Headers;
17
- root.Request = Request;
18
- root.Response = Response;
19
- root.fetch.__rejectUnauthorizedAgent = new https.Agent({
20
- rejectUnauthorized: false
21
- });
22
- } else {
23
- // NodeJS >= v18 ---
24
- root.fetch.__defaultAgent = new Agent();
25
- root.fetch.__rejectUnauthorizedAgent = new Agent({
26
- connect: {
27
- rejectUnauthorized: false
28
- }
29
- });
30
- root.fetch.__setGlobalDispatcher = setGlobalDispatcher;
31
- }
32
-
33
- // AbortController polyfill ---
34
- import AbortController from "abort-controller";
35
- if (typeof root.AbortController === "undefined") {
36
- root.AbortController = AbortController;
11
+ // NodeJS >= v18 has native fetch ---
12
+ if (root.fetch === undefined) {
13
+ throw new Error("@hpcc-js/comms requires Node.js >= 18.0.0 for native fetch support");
37
14
  }
15
+ root.fetch.__defaultAgent = new Agent();
16
+ root.fetch.__rejectUnauthorizedAgent = new Agent({
17
+ connect: {
18
+ rejectUnauthorized: false
19
+ }
20
+ });
21
+ root.fetch.__setGlobalDispatcher = setGlobalDispatcher;
38
22
 
39
23
  import { trustwave } from "./pem/trustwave.ts";
40
24
 
@@ -1,5 +1,5 @@
1
1
  import { timeParse } from "d3-time-format";
2
- import { SMCServiceBase, WsSMC } from "./wsdl/WsSMC/v1.28/WsSMC.ts";
2
+ import { SMCServiceBase, WsSMC } from "./wsdl/WsSMC/v1.29/WsSMC.ts";
3
3
  import { IOptions } from "../connection.ts";
4
4
 
5
5
  export {
@@ -1,5 +1,5 @@
1
1
  import { deepMixin, xml2json, XMLNode } from "@hpcc-js/util";
2
- import { WsWorkunits, WorkunitsServiceBase } from "./wsdl/WsWorkunits/v2.02/WsWorkunits.ts";
2
+ import { WsWorkunits, WorkunitsServiceBase } from "./wsdl/WsWorkunits/v2.03/WsWorkunits.ts";
3
3
  import { IConnection, IOptions } from "../connection.ts";
4
4
 
5
5
  export {