@hpcc-js/comms 2.101.3 → 2.102.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/dist/index.js CHANGED
@@ -648,8 +648,8 @@
648
648
  }
649
649
 
650
650
  var PKG_NAME = "@hpcc-js/comms";
651
- var PKG_VERSION = "2.101.3";
652
- var BUILD_VERSION = "2.108.4";
651
+ var PKG_VERSION = "2.102.1";
652
+ var BUILD_VERSION = "2.108.6";
653
653
 
654
654
  /******************************************************************************
655
655
  Copyright (c) Microsoft Corporation.
@@ -1935,6 +1935,45 @@
1935
1935
  DFUService.prototype.DFUFile = function (request) {
1936
1936
  return this._connection.send("DFUDefFile", request, "text");
1937
1937
  };
1938
+ DFUService.prototype.recursiveFetchLogicalFiles = function (superFiles) {
1939
+ return __awaiter(this, void 0, void 0, function () {
1940
+ var childSuperFiles, logicalFiles, _a, _b, _c;
1941
+ var _this = this;
1942
+ return __generator(this, function (_d) {
1943
+ switch (_d.label) {
1944
+ case 0:
1945
+ childSuperFiles = [];
1946
+ logicalFiles = [];
1947
+ return [4 /*yield*/, Promise.all(superFiles.map(function (superFile) {
1948
+ return _this.DFUInfo({ Cluster: superFile.NodeGroup, Name: superFile.Name, IncludeJsonTypeInfo: false, IncludeBinTypeInfo: false, ForceIndexInfo: false })
1949
+ .then(function (response) {
1950
+ var _a, _b, _c, _d, _e, _f;
1951
+ for (var _i = 0, _g = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.FileDetail) === null || _a === void 0 ? void 0 : _a.Superfiles) === null || _b === void 0 ? void 0 : _b.DFULogicalFile) !== null && _c !== void 0 ? _c : []; _i < _g.length; _i++) {
1952
+ var child = _g[_i];
1953
+ childSuperFiles.push(child);
1954
+ }
1955
+ for (var _h = 0, _j = (_f = (_e = (_d = response === null || response === void 0 ? void 0 : response.FileDetail) === null || _d === void 0 ? void 0 : _d.subfiles) === null || _e === void 0 ? void 0 : _e.Item) !== null && _f !== void 0 ? _f : []; _h < _j.length; _h++) {
1956
+ var child = _j[_h];
1957
+ logicalFiles.push(child);
1958
+ }
1959
+ });
1960
+ }))];
1961
+ case 1:
1962
+ _d.sent();
1963
+ _b = (_a = logicalFiles).concat;
1964
+ if (!childSuperFiles.length) return [3 /*break*/, 3];
1965
+ return [4 /*yield*/, this.recursiveFetchLogicalFiles(childSuperFiles)];
1966
+ case 2:
1967
+ _c = _d.sent();
1968
+ return [3 /*break*/, 4];
1969
+ case 3:
1970
+ _c = [];
1971
+ _d.label = 4;
1972
+ case 4: return [2 /*return*/, _b.apply(_a, [_c])];
1973
+ }
1974
+ });
1975
+ });
1976
+ };
1938
1977
  return DFUService;
1939
1978
  }(DfuServiceBase));
1940
1979
 
@@ -7983,7 +8022,8 @@
7983
8022
  LogicalFile.prototype.fetchInfo = function () {
7984
8023
  var _this = this;
7985
8024
  return this.connection.DFUInfo({ Cluster: this.Cluster, Name: this.Name }).then(function (response) {
7986
- _this.set(__assign({ Cluster: _this.Cluster }, response.FileDetail));
8025
+ var _a, _b;
8026
+ _this.set(__assign(__assign({ Cluster: _this.Cluster }, response.FileDetail), { ProtectList: (_b = (_a = response === null || response === void 0 ? void 0 : response.FileDetail) === null || _a === void 0 ? void 0 : _a.ProtectList) !== null && _b !== void 0 ? _b : { DFUFileProtect: [] } }));
7987
8027
  return response.FileDetail;
7988
8028
  }).catch(function (e) {
7989
8029
  // deleted ---
@@ -8005,6 +8045,9 @@
8005
8045
  LogicalFile.prototype.fetchDefFile = function (format) {
8006
8046
  return this.connection.DFUFile({ Name: this.Name, Format: format });
8007
8047
  };
8048
+ LogicalFile.prototype.fetchAllLogicalFiles = function () {
8049
+ return this.connection.recursiveFetchLogicalFiles([this]);
8050
+ };
8008
8051
  LogicalFile.prototype.fetchListHistory = function () {
8009
8052
  return this.connection.ListHistory({ Name: this.Name }).then(function (response) {
8010
8053
  var _a;