@hpcc-js/comms 3.1.0 → 3.2.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.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "hpcc-js - Communications",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,7 +25,6 @@
25
25
  "gen-types": "tsc --project tsconfig.json",
26
26
  "gen-types-watch": "npm run gen-types -- --watch",
27
27
  "build": "run-p gen-types bundle",
28
- "stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
29
28
  "lint": "eslint ./src",
30
29
  "lint-fix": "eslint --fix src/**/*.ts",
31
30
  "docs": "typedoc --options tdoptions.json .",
@@ -58,17 +57,18 @@
58
57
  "wsdl-all": "npm-run-all --aggregate-output -c --serial build --parallel wsdl-*"
59
58
  },
60
59
  "dependencies": {
61
- "@hpcc-js/ddl-shim": "^2.22.0",
62
- "@hpcc-js/util": "^3.1.0",
63
- "@xmldom/xmldom": "0.9.4",
60
+ "@hpcc-js/util": "^3.2.0",
61
+ "@xmldom/xmldom": "0.9.5",
64
62
  "abort-controller": "3.0.0",
63
+ "data-uri-to-buffer": "6.0.2",
65
64
  "node-fetch": "3.3.2",
66
65
  "safe-buffer": "5.2.1",
67
66
  "tmp": "0.2.3",
68
- "undici": "5.28.4"
67
+ "undici": "6.21.0"
69
68
  },
70
69
  "devDependencies": {
71
- "@hpcc-js/esbuild-plugins": "^1.2.0",
70
+ "@hpcc-js/ddl-shim": "^3.0.0",
71
+ "@hpcc-js/esbuild-plugins": "^1.3.0",
72
72
  "@types/d3-request": "1.0.9",
73
73
  "@types/d3-time-format": "2.3.4",
74
74
  "@types/node": "^18",
@@ -90,5 +90,5 @@
90
90
  "url": "https://github.com/hpcc-systems/Visualization/issues"
91
91
  },
92
92
  "homepage": "https://github.com/hpcc-systems/Visualization",
93
- "gitHead": "3f6146539f487dca08a35cdd5f94ca29609b4343"
93
+ "gitHead": "658c50fd965a7744ba8db675ba6878607c44d5e2"
94
94
  }
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/comms";
2
- export const PKG_VERSION = "3.1.0";
3
- export const BUILD_VERSION = "2.107.0";
2
+ export const PKG_VERSION = "3.2.0";
3
+ export const BUILD_VERSION = "3.2.0";
@@ -41,9 +41,7 @@ export class Activity extends StateObject<UActivityState, IActivityState> implem
41
41
  _activity = new Activity(optsConnection);
42
42
  }
43
43
  if (state) {
44
- _activity.set({
45
- ...state
46
- });
44
+ _activity.set(state);
47
45
  }
48
46
  return _activity;
49
47
  }
@@ -91,10 +91,13 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme
91
91
 
92
92
  get properties(): FileDetailEx { return this.get(); }
93
93
 
94
- static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string): LogicalFile {
94
+ static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string, state?: FileDetailEx): LogicalFile {
95
95
  const retVal: LogicalFile = _store.get({ BaseUrl: optsConnection.baseUrl, Cluster, Name }, () => {
96
96
  return new LogicalFile(optsConnection, Cluster, Name);
97
97
  });
98
+ if (state) {
99
+ retVal.set(state);
100
+ }
98
101
  return retVal;
99
102
  }
100
103
 
package/src/ecl/query.ts CHANGED
@@ -78,10 +78,13 @@ export class Query extends StateObject<QueryEx, QueryEx> implements QueryEx {
78
78
  } as QueryEx);
79
79
  }
80
80
 
81
- static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string): Query {
81
+ static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string, state?: QueryEx): Query {
82
82
  const retVal: Query = _queries.get({ BaseUrl: optsConnection.baseUrl, QuerySet: querySet, QueryId: queryId } as QueryEx, () => {
83
83
  return new Query(optsConnection, querySet, queryId);
84
84
  });
85
+ if (state) {
86
+ retVal.set(state);
87
+ }
85
88
  return retVal;
86
89
  }
87
90
 
@@ -43,9 +43,7 @@ export class TargetCluster extends StateObject<UTargetClusterState, ITargetClust
43
43
  return new TargetCluster(optsConnection, name);
44
44
  });
45
45
  if (state) {
46
- retVal.set({
47
- ...state
48
- });
46
+ retVal.set(state);
49
47
  }
50
48
  return retVal;
51
49
  }
@@ -30,10 +30,13 @@ export class Topology extends StateObject<TopologyStateEx, TopologyStateEx> impl
30
30
  get LogicalClusters(): WsTopology.TpLogicalCluster[] { return this.get("LogicalClusters"); }
31
31
  get Services(): WsTopology.ServiceList { return this.get("Services"); }
32
32
 
33
- static attach(optsConnection: IOptions | IConnection | TopologyService) {
33
+ static attach(optsConnection: IOptions | IConnection | TopologyService, state?: TopologyStateEx): Topology {
34
34
  const retVal: Topology = _topology.get({ BaseUrl: optsConnection.baseUrl }, () => {
35
35
  return new Topology(optsConnection);
36
36
  });
37
+ if (state) {
38
+ retVal.set(state);
39
+ }
37
40
  return retVal;
38
41
  }
39
42
 
@@ -161,4 +161,12 @@ export class Service {
161
161
  constructor(optsConnection: IOptions | IConnection, service: string, version: string) {
162
162
  this._connection = new ESPConnection(optsConnection, service, version);
163
163
  }
164
+
165
+ opts() {
166
+ return this._connection.opts();
167
+ }
168
+
169
+ connection(): ESPConnection {
170
+ return this._connection.clone();
171
+ }
164
172
  }
@@ -1,4 +1,4 @@
1
- import { DDL2 } from "@hpcc-js/ddl-shim";
1
+ import type { DDL2 } from "@hpcc-js/ddl-shim";
2
2
  import { IConnection, IOptions } from "../connection.ts";
3
3
  import { ESPExceptions, Service } from "../espConnection.ts";
4
4
 
@@ -67,14 +67,6 @@ export class WorkunitsService extends WorkunitsServiceBase {
67
67
  super(optsConnection);
68
68
  }
69
69
 
70
- opts() {
71
- return this._connection.opts();
72
- }
73
-
74
- connection(): ESPConnection {
75
- return this._connection.clone();
76
- }
77
-
78
70
  Ping(): Promise<WsWorkunits.WsWorkunitsPingResponse> {
79
71
  return this._connection.send("Ping", {}, "json", false, undefined, "WsWorkunitsPingResponse").then((response) => {
80
72
  return { result: true };
@@ -1,3 +1,3 @@
1
1
  export declare const PKG_NAME = "@hpcc-js/comms";
2
- export declare const PKG_VERSION = "3.1.0";
3
- export declare const BUILD_VERSION = "2.107.0";
2
+ export declare const PKG_VERSION = "3.2.0";
3
+ export declare const BUILD_VERSION = "3.2.0";
@@ -78,7 +78,7 @@ export declare class LogicalFile extends StateObject<FileDetailEx, FileDetailEx>
78
78
  get ExpirationDate(): string;
79
79
  get ExtendedIndexInfo(): WsDfu.ExtendedIndexInfo;
80
80
  get properties(): FileDetailEx;
81
- static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string): LogicalFile;
81
+ static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string, state?: FileDetailEx): LogicalFile;
82
82
  protected constructor(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string);
83
83
  filePartsOnCluster(): WsDfu.DFUFilePartsOnCluster[];
84
84
  fileParts(): DFUPartEx[];
@@ -42,7 +42,7 @@ export declare class Query extends StateObject<QueryEx, QueryEx> implements Quer
42
42
  get WUTimers(): WsWorkunits.WUTimers;
43
43
  get PriorityID(): number;
44
44
  private constructor();
45
- static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string): Query;
45
+ static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string, state?: QueryEx): Query;
46
46
  private _eclService;
47
47
  protected wsEclService(): Promise<EclService | undefined>;
48
48
  private fetchDetails;
@@ -20,7 +20,7 @@ export declare class Topology extends StateObject<TopologyStateEx, TopologyState
20
20
  get CTargetClusters(): TargetCluster[];
21
21
  get LogicalClusters(): WsTopology.TpLogicalCluster[];
22
22
  get Services(): WsTopology.ServiceList;
23
- static attach(optsConnection: IOptions | IConnection | TopologyService): Topology;
23
+ static attach(optsConnection: IOptions | IConnection | TopologyService, state?: TopologyStateEx): Topology;
24
24
  protected constructor(optsConnection: IOptions | IConnection | TopologyService);
25
25
  GetESPServiceBaseURL(type?: string): Promise<string>;
26
26
  fetchTargetClusters(): Promise<TargetCluster[]>;
@@ -38,4 +38,6 @@ export declare class Service {
38
38
  protected _connection: ESPConnection;
39
39
  get baseUrl(): string;
40
40
  constructor(optsConnection: IOptions | IConnection, service: string, version: string);
41
+ opts(): IOptions;
42
+ connection(): ESPConnection;
41
43
  }
@@ -1,4 +1,4 @@
1
- import { DDL2 } from "@hpcc-js/ddl-shim";
1
+ import type { DDL2 } from "@hpcc-js/ddl-shim";
2
2
  import { IConnection, IOptions } from "../connection.ts";
3
3
  import { Service } from "../espConnection.ts";
4
4
  export type IFieldType = DDL2.IFieldType;
@@ -1,7 +1,6 @@
1
1
  import { XMLNode } from "@hpcc-js/util";
2
2
  import { WsWorkunits, WorkunitsServiceBase } from "./wsdl/WsWorkunits/v2/WsWorkunits.ts";
3
3
  import { IConnection, IOptions } from "../connection.ts";
4
- import { ESPConnection } from "../espConnection.ts";
5
4
  export { WsWorkunits };
6
5
  export declare enum WUStateID {
7
6
  Unknown = 0,
@@ -43,8 +42,6 @@ export declare function isWUQueryECLWorkunit(_: WsWorkunits.ECLWorkunit | WsWork
43
42
  export declare function isWUInfoWorkunit(_: WsWorkunits.ECLWorkunit | WsWorkunits.Workunit): _ is WsWorkunits.Workunit;
44
43
  export declare class WorkunitsService extends WorkunitsServiceBase {
45
44
  constructor(optsConnection: IOptions | IConnection);
46
- opts(): IOptions;
47
- connection(): ESPConnection;
48
45
  Ping(): Promise<WsWorkunits.WsWorkunitsPingResponse>;
49
46
  WUQuery(request?: Partial<WsWorkunits.WUQuery>, abortSignal?: AbortSignal): Promise<WsWorkunits.WUQueryResponse>;
50
47
  WUInfo(_request: Partial<WsWorkunits.WUInfo>): Promise<WsWorkunits.WUInfoResponse>;