@hpcc-js/comms 3.7.7 → 3.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/comms",
3
- "version": "3.7.7",
3
+ "version": "3.8.1",
4
4
  "description": "hpcc-js - Communications",
5
5
  "type": "module",
6
6
  "main": "./dist/node/index.cjs",
@@ -72,15 +72,15 @@
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.9",
75
+ "@hpcc-js/util": "^3.3.11",
76
76
  "@xmldom/xmldom": "0.9.8",
77
77
  "abort-controller": "3.0.0",
78
78
  "node-fetch": "3.3.2",
79
- "undici": "7.12.0"
79
+ "undici": "7.16.0"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@hpcc-js/ddl-shim": "^3.0.0",
83
- "@hpcc-js/esbuild-plugins": "^1.4.9",
83
+ "@hpcc-js/esbuild-plugins": "^1.5.1",
84
84
  "@kubernetes/client-node": "1.3.0",
85
85
  "@types/d3-request": "1.0.9",
86
86
  "@types/d3-time-format": "2.3.4",
@@ -91,8 +91,8 @@
91
91
  "d3-time-format": "^2",
92
92
  "data-uri-to-buffer": "6.0.2",
93
93
  "safe-buffer": "5.2.1",
94
- "soap": "1.2.0",
95
- "tmp": "0.2.3",
94
+ "soap": "1.4.1",
95
+ "tmp": "0.2.5",
96
96
  "typescript-formatter": "^7.2.2"
97
97
  },
98
98
  "repository": {
@@ -112,5 +112,5 @@
112
112
  "esp",
113
113
  "HPCC-Platform"
114
114
  ],
115
- "gitHead": "92489547b0e57f479a691236b1a47e977b43cf2e"
115
+ "gitHead": "111cb62ebdf2ab518e094f321223ca3ebdc628bd"
116
116
  }
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/comms";
2
- export const PKG_VERSION = "3.7.7";
3
- export const BUILD_VERSION = "3.9.1";
2
+ export const PKG_VERSION = "3.8.1";
3
+ export const BUILD_VERSION = "3.11.2";
package/src/ecl/result.ts CHANGED
@@ -47,6 +47,7 @@ export type UResulState = ECLResultEx & WsDfu.DFULogicalFile;
47
47
  export type IResulState = ECLResultEx | WsDfu.DFULogicalFile;
48
48
  export class Result extends StateObject<UResulState, IResulState> implements ECLResultEx {
49
49
  protected connection: WorkunitsService;
50
+ protected _bypassCache: boolean = false;
50
51
  get BaseUrl() { return this.connection.baseUrl; }
51
52
  protected xsdSchema: XSDSchema;
52
53
 
@@ -145,6 +146,12 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
145
146
  return this.Total !== -1;
146
147
  }
147
148
 
149
+ bypassCache(bypass?: boolean): boolean | this {
150
+ if (bypass === undefined) return this._bypassCache;
151
+ this._bypassCache = bypass;
152
+ return this;
153
+ }
154
+
148
155
  private _fetchXMLSchemaPromise: Promise<XSDSchema | null>;
149
156
  fetchXMLSchema(refresh = false): Promise<XSDSchema | null> {
150
157
  if (!this._fetchXMLSchemaPromise || refresh) {
@@ -164,8 +171,9 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
164
171
  return this;
165
172
  }
166
173
 
167
- fetchRows(from: number = 0, count: number = -1, includeSchema: boolean = false, filter: ResultFilter = {}, abortSignal?: AbortSignal): Promise<any[]> {
168
- return this.WUResult(from, count, !includeSchema, filter, abortSignal).then((response) => {
174
+ fetchRows(from: number = 0, count: number = -1, includeSchema: boolean = false, filter: ResultFilter = {}, abortSignal?: AbortSignal, bypassCache?: boolean): Promise<any[]> {
175
+ const shouldBypassCache = bypassCache ?? this._bypassCache;
176
+ return this.WUResult(from, count, !includeSchema, filter, abortSignal, shouldBypassCache).then((response) => {
169
177
  const result: any = response.Result;
170
178
  delete response.Result; // Do not want it in "set"
171
179
  this.set({
@@ -193,7 +201,7 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
193
201
  return this.xsdSchema.root.children();
194
202
  }
195
203
 
196
- protected WUResult(start: number = 0, count: number = 1, suppressXmlSchema: boolean = false, filter: { [key: string]: string | number } = {}, abortSignal?: AbortSignal): Promise<WUResultResponseEx> {
204
+ protected WUResult(start: number = 0, count: number = 1, suppressXmlSchema: boolean = false, filter: { [key: string]: string | number } = {}, abortSignal?: AbortSignal, bypassCache: boolean = false): Promise<WUResultResponseEx> {
197
205
  const FilterBy = {
198
206
  NamedValue: {
199
207
  itemcount: 0
@@ -221,6 +229,7 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
221
229
  request.Start = start;
222
230
  request.Count = count;
223
231
  request.SuppressXmlSchema = suppressXmlSchema;
232
+ request.BypassCachedResult = bypassCache;
224
233
  return this.connection.WUResult(request, abortSignal).then((response: unknown) => {
225
234
  return response as WUResultResponseEx;
226
235
  });
@@ -1,3 +1,3 @@
1
1
  export declare const PKG_NAME = "@hpcc-js/comms";
2
- export declare const PKG_VERSION = "3.7.6";
3
- export declare const BUILD_VERSION = "3.9.0";
2
+ export declare const PKG_VERSION = "3.8.0";
3
+ export declare const BUILD_VERSION = "3.11.1";
@@ -44,6 +44,7 @@ export type UResulState = ECLResultEx & WsDfu.DFULogicalFile;
44
44
  export type IResulState = ECLResultEx | WsDfu.DFULogicalFile;
45
45
  export declare class Result extends StateObject<UResulState, IResulState> implements ECLResultEx {
46
46
  protected connection: WorkunitsService;
47
+ protected _bypassCache: boolean;
47
48
  get BaseUrl(): string;
48
49
  protected xsdSchema: XSDSchema;
49
50
  get properties(): WsWorkunits.ECLResult;
@@ -72,15 +73,16 @@ export declare class Result extends StateObject<UResulState, IResulState> implem
72
73
  private constructor();
73
74
  private constructor();
74
75
  isComplete(): boolean;
76
+ bypassCache(bypass?: boolean): boolean | this;
75
77
  private _fetchXMLSchemaPromise;
76
78
  fetchXMLSchema(refresh?: boolean): Promise<XSDSchema | null>;
77
79
  refresh(): Promise<this>;
78
- fetchRows(from?: number, count?: number, includeSchema?: boolean, filter?: ResultFilter, abortSignal?: AbortSignal): Promise<any[]>;
80
+ fetchRows(from?: number, count?: number, includeSchema?: boolean, filter?: ResultFilter, abortSignal?: AbortSignal, bypassCache?: boolean): Promise<any[]>;
79
81
  rootField(): XSDXMLNode | null;
80
82
  fields(): XSDXMLNode[];
81
83
  protected WUResult(start?: number, count?: number, suppressXmlSchema?: boolean, filter?: {
82
84
  [key: string]: string | number;
83
- }, abortSignal?: AbortSignal): Promise<WUResultResponseEx>;
85
+ }, abortSignal?: AbortSignal, bypassCache?: boolean): Promise<WUResultResponseEx>;
84
86
  }
85
87
  export declare class ResultCache extends Cache<WsWorkunits.ECLResult, Result> {
86
88
  constructor();