@hpcc-js/comms 2.84.2 → 2.84.4

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.
Files changed (47) hide show
  1. package/dist/index.es6.js +127 -164
  2. package/dist/index.es6.js.map +1 -1
  3. package/dist/index.js +207 -208
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist/index.node.js +141 -178
  8. package/dist/index.node.js.map +1 -1
  9. package/dist/index.node.min.js +1 -1
  10. package/dist/index.node.min.js.map +1 -1
  11. package/lib-es6/__package__.js +2 -2
  12. package/lib-es6/ecl/dfuWorkunit.js +2 -2
  13. package/lib-es6/ecl/dfuWorkunit.js.map +1 -1
  14. package/lib-es6/ecl/workunit.js +6 -1
  15. package/lib-es6/ecl/workunit.js.map +1 -1
  16. package/lib-es6/services/fileSpray.js +3 -0
  17. package/lib-es6/services/fileSpray.js.map +1 -1
  18. package/lib-es6/services/wsLogaccess.js +16 -69
  19. package/lib-es6/services/wsLogaccess.js.map +1 -1
  20. package/lib-es6/services/wsTopology.js +1 -1
  21. package/lib-es6/services/wsdl/WsTopology/v1.32/WsTopology.js +83 -0
  22. package/lib-es6/services/wsdl/WsTopology/v1.32/WsTopology.js.map +1 -0
  23. package/package.json +11 -11
  24. package/src/__package__.ts +2 -2
  25. package/src/ecl/dfuWorkunit.ts +4 -4
  26. package/src/ecl/workunit.ts +4 -0
  27. package/src/services/fileSpray.ts +4 -0
  28. package/src/services/wsLogaccess.ts +24 -79
  29. package/src/services/wsTopology.ts +1 -1
  30. package/src/services/wsdl/WsTopology/v1.32/WsTopology.ts +885 -0
  31. package/types/__package__.d.ts +2 -2
  32. package/types/ecl/dfuWorkunit.d.ts +2 -2
  33. package/types/ecl/dfuWorkunit.d.ts.map +1 -1
  34. package/types/ecl/workunit.d.ts.map +1 -1
  35. package/types/services/fileSpray.d.ts +1 -0
  36. package/types/services/fileSpray.d.ts.map +1 -1
  37. package/types/services/wsLogaccess.d.ts +10 -10
  38. package/types/services/wsLogaccess.d.ts.map +1 -1
  39. package/types/services/wsTopology.d.ts +1 -1
  40. package/types/services/wsdl/WsTopology/v1.32/WsTopology.d.ts +716 -0
  41. package/types/services/wsdl/WsTopology/v1.32/WsTopology.d.ts.map +1 -0
  42. package/types-3.4/__package__.d.ts +2 -2
  43. package/types-3.4/ecl/dfuWorkunit.d.ts +2 -2
  44. package/types-3.4/services/fileSpray.d.ts +1 -0
  45. package/types-3.4/services/wsLogaccess.d.ts +10 -10
  46. package/types-3.4/services/wsTopology.d.ts +1 -1
  47. package/types-3.4/services/wsdl/WsTopology/v1.32/WsTopology.d.ts +716 -0
@@ -214,7 +214,7 @@ export class DFUWorkunit extends StateObject<UDFUWorkunitState, IDFUWorkunitStat
214
214
  return this;
215
215
  }
216
216
 
217
- fetchXML(callback?: void): Promise<FileSpray.DFUWUFileResponse> {
217
+ fetchXML(callback?: void): Promise<string> {
218
218
  return this.DFUWUFile();
219
219
  }
220
220
 
@@ -239,14 +239,14 @@ export class DFUWorkunit extends StateObject<UDFUWorkunitState, IDFUWorkunitStat
239
239
  return retVal;
240
240
  }
241
241
 
242
- protected DFUWUFile(_request: Partial<FileSpray.DFUWUFileRequest> = {}): Promise<FileSpray.DFUWUFileResponse> {
243
- return this.connection.DFUWUFile({
242
+ protected DFUWUFile(_request: Partial<FileSpray.DFUWUFileRequest> = {}): Promise<string> {
243
+ return this.connection.DFUWUFileEx({
244
244
  ..._request, Wuid: this.ID
245
245
  }).then(response => {
246
246
  //TODO: additional processing?
247
247
  return response;
248
248
  }).catch((e: ESPExceptions) => {
249
- return {} as FileSpray.DFUWUFileResponse;
249
+ return "";
250
250
  });
251
251
  }
252
252
 
@@ -424,6 +424,10 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
424
424
 
425
425
  async refreshState(): Promise<this> {
426
426
  await this.WUQuery();
427
+ // Ensure "isComplete" is correct for WUs that are only "Compiled".
428
+ if (this.StateID === WUStateID.Compiled && !this.ActionEx && !this._submitAction) {
429
+ await this.refreshInfo();
430
+ }
427
431
  return this;
428
432
  }
429
433
 
@@ -13,6 +13,10 @@ export interface UpdateDFUWorkunitEx extends UpdateDFUWorkunitMinusWU {
13
13
 
14
14
  export class FileSprayService extends FileSprayServiceBase {
15
15
 
16
+ DFUWUFileEx(request: FileSpray.DFUWUFileRequest): Promise<string> {
17
+ return this._connection.send("DFUWUFile", request, "text");
18
+ }
19
+
16
20
  SprayFixedEx(request: Partial<FileSpray.SprayFixed>): Promise<FileSpray.SprayFixedResponse> {
17
21
  return this._connection.send("SprayFixed", request);
18
22
  }
@@ -10,13 +10,13 @@ export {
10
10
  export interface GetLogsExRequest {
11
11
  audience?: string;
12
12
  class?: string[];
13
- jobId?: string;
13
+ workunits?: string;
14
14
  message?: string;
15
- procId?: string;
16
- sequence?: string;
17
- threadId?: string;
15
+ processid?: string;
16
+ logid?: string;
17
+ threadid?: string;
18
18
  timestamp?: string;
19
- containerName?: string;
19
+ components?: string;
20
20
  StartDate?: Date;
21
21
  EndDate?: Date;
22
22
  LogLineStartFrom: number,
@@ -39,73 +39,19 @@ export const enum TargetAudience {
39
39
  Audit = "ADT"
40
40
  }
41
41
 
42
+ //properties here are "LogType" values in Ws_logaccess.GetLogAccessInfo
42
43
  export interface LogLine {
43
44
  audience?: string;
44
45
  class?: string;
45
- jobId?: string;
46
+ workunits?: string;
46
47
  message?: string;
47
- procId?: number;
48
- sequence?: string;
49
- threadId?: number;
48
+ processid?: number;
49
+ logid?: string;
50
+ threadid?: number;
50
51
  timestamp?: string;
51
- containerName?: string;
52
+ components?: string;
52
53
  }
53
54
 
54
- enum ElasticKnownColumns {
55
- audience = "hpcc.log.audience",
56
- class = "hpcc.log.class",
57
- containerName = "kubernetes.container.name",
58
- jobId = "hpcc.log.jobid",
59
- message = "hpcc.log.message",
60
- procId = "hpcc.log.procid",
61
- sequence = "hpcc.log.sequence",
62
- threadId = "hpcc.log.threadid",
63
- timestamp = "hpcc.log.timestamp",
64
- }
65
-
66
- const RElasticKnownColumns: { [key: string]: string } = {};
67
- for (const key in ElasticKnownColumns) {
68
- if (ElasticKnownColumns.hasOwnProperty(key)) {
69
- RElasticKnownColumns[ElasticKnownColumns[key]] = key;
70
- }
71
- }
72
-
73
- const elasticToLogLine = (line?: any): LogLine => {
74
- const retVal: LogLine = {};
75
- for (const key in RElasticKnownColumns) {
76
- retVal[RElasticKnownColumns[key]] = line?.fields[0][key];
77
- }
78
- return retVal;
79
- };
80
-
81
- enum AzureKnownColumns {
82
- audience = "hpcc_log_audience", // #Target Audience
83
- class = "hpcc_log_class", // #Log Entry type
84
- containerID = "ContainerID",
85
- containerName = "ContainerID",
86
- jobId = "hpcc_log_jobid",
87
- message = "hpcc_log_message", // #The log message
88
- procId = "",
89
- sequence = "hpcc_log_sequence",
90
- threadId = "hpcc_log_threadid",
91
- timestamp = "hpcc_log_timestamp"
92
- }
93
-
94
- const RAzureKnownColumns: { [key: string]: string } = {};
95
- for (const key in AzureKnownColumns) {
96
- if (AzureKnownColumns.hasOwnProperty(key)) {
97
- RAzureKnownColumns[AzureKnownColumns[key]] = key;
98
- }
99
- }
100
-
101
- const azureToLogLine = (line?: any): LogLine => {
102
- const retVal: LogLine = {};
103
- for (const key in RAzureKnownColumns) {
104
- retVal[RAzureKnownColumns[key]] = line?.fields[0][key] ?? "";
105
- }
106
- return retVal;
107
- };
108
-
109
55
  export interface GetLogsExResponse {
110
56
  lines: LogLine[],
111
57
  total: number,
@@ -128,6 +74,16 @@ export class LogaccessService extends LogaccessServiceBase {
128
74
 
129
75
  async GetLogsEx(request: GetLogsExRequest): Promise<GetLogsExResponse> {
130
76
  const logInfo = await this.GetLogAccessInfo();
77
+ const columnMap = {};
78
+ logInfo.Columns.Column.forEach(column => columnMap[column.LogType] = column.Name);
79
+
80
+ const convertLogLine = (line: any) => {
81
+ const retVal: LogLine = {};
82
+ for (const key in columnMap) {
83
+ retVal[key] = line?.fields[0][columnMap[key]] ?? "";
84
+ }
85
+ return retVal;
86
+ };
131
87
 
132
88
  const getLogsRequest: WsLogaccess.GetLogsRequest = {
133
89
  Filter: {
@@ -151,17 +107,8 @@ export class LogaccessService extends LogaccessServiceBase {
151
107
  const filters: WsLogaccess.leftFilter[] = [];
152
108
  for (const key in request) {
153
109
  let searchField;
154
- switch (logInfo.RemoteLogManagerType) {
155
- case "azureloganalyticscurl":
156
- if (key in AzureKnownColumns) {
157
- searchField = AzureKnownColumns[key];
158
- }
159
- break;
160
- case "elasticstack":
161
- if (key in ElasticKnownColumns) {
162
- searchField = ElasticKnownColumns[key];
163
- }
164
- break;
110
+ if (key in columnMap) {
111
+ searchField = columnMap[key];
165
112
  }
166
113
  if (searchField) {
167
114
  if (Array.isArray(request[key])) {
@@ -244,10 +191,8 @@ export class LogaccessService extends LogaccessServiceBase {
244
191
  let lines = [];
245
192
  switch (logInfo.RemoteLogManagerType) {
246
193
  case "azureloganalyticscurl":
247
- lines = logLines.lines?.map(azureToLogLine) ?? [];
248
- break;
249
194
  case "elasticstack":
250
- lines = logLines.lines?.map(elasticToLogLine) ?? [];
195
+ lines = logLines.lines?.map(convertLogLine) ?? [];
251
196
  break;
252
197
  default:
253
198
  logger.warning(`Unknown RemoteLogManagerType: ${logInfo.RemoteLogManagerType}`);
@@ -1,5 +1,5 @@
1
1
  import { IOptions } from "../connection";
2
- import { TopologyServiceBase, WsTopology } from "./wsdl/WsTopology/v1.31/WsTopology";
2
+ import { TopologyServiceBase, WsTopology } from "./wsdl/WsTopology/v1.32/WsTopology";
3
3
 
4
4
  export {
5
5
  WsTopology