@hpcc-js/comms 2.99.5 → 2.101.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.es6.js +110 -12
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +110 -12
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.node.js +110 -12
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.min.js +1 -1
- package/dist/index.node.min.js.map +1 -1
- package/lib-es6/__package__.js +2 -2
- package/lib-es6/__package__.js.map +1 -1
- package/lib-es6/services/wsCloud.js +55 -3
- package/lib-es6/services/wsCloud.js.map +1 -1
- package/lib-es6/services/wsDali.js +30 -1
- package/lib-es6/services/wsDali.js.map +1 -1
- package/lib-es6/services/wsLogaccess.js +1 -1
- package/lib-es6/services/wsWorkunits.js +1 -1
- package/lib-es6/services/wsWorkunits.js.map +1 -1
- package/lib-es6/services/wsdl/WsCloud/v1.02/WsCloud.js +20 -0
- package/lib-es6/services/wsdl/WsCloud/v1.02/WsCloud.js.map +1 -0
- package/lib-es6/services/wsdl/WsWorkunits/v2.02/WsWorkunits.js +376 -0
- package/lib-es6/services/wsdl/WsWorkunits/v2.02/WsWorkunits.js.map +1 -0
- package/lib-es6/services/wsdl/ws_logaccess/v1.08/ws_logaccess.js +104 -0
- package/lib-es6/services/wsdl/ws_logaccess/v1.08/ws_logaccess.js.map +1 -0
- package/package.json +4 -3
- package/src/__package__.ts +2 -2
- package/src/services/wsCloud.ts +59 -6
- package/src/services/wsDali.ts +32 -0
- package/src/services/wsLogaccess.ts +1 -1
- package/src/services/wsWorkunits.ts +1 -1
- package/src/services/wsdl/WsCloud/v1.02/WsCloud.ts +77 -0
- package/src/services/wsdl/WsWorkunits/v2.02/WsWorkunits.ts +3157 -0
- package/src/services/wsdl/ws_logaccess/v1.08/ws_logaccess.ts +267 -0
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types/services/wsCloud.d.ts +3 -3
- package/types/services/wsCloud.d.ts.map +1 -1
- package/types/services/wsDali.d.ts +9 -0
- package/types/services/wsDali.d.ts.map +1 -1
- package/types/services/wsLogaccess.d.ts +1 -1
- package/types/services/wsWorkunits.d.ts +1 -1
- package/types/services/wsWorkunits.d.ts.map +1 -1
- package/types/services/wsdl/WsCloud/v1.02/WsCloud.d.ts +47 -0
- package/types/services/wsdl/WsCloud/v1.02/WsCloud.d.ts.map +1 -0
- package/types/services/wsdl/WsWorkunits/v2.02/WsWorkunits.d.ts +2553 -0
- package/types/services/wsdl/WsWorkunits/v2.02/WsWorkunits.d.ts.map +1 -0
- package/types/services/wsdl/ws_logaccess/v1.08/ws_logaccess.d.ts +211 -0
- package/types/services/wsdl/ws_logaccess/v1.08/ws_logaccess.d.ts.map +1 -0
- package/types-3.4/__package__.d.ts +2 -2
- package/types-3.4/services/wsCloud.d.ts +2 -2
- package/types-3.4/services/wsDali.d.ts +9 -0
- package/types-3.4/services/wsLogaccess.d.ts +1 -1
- package/types-3.4/services/wsWorkunits.d.ts +1 -1
- package/types-3.4/services/wsdl/WsCloud/v1.02/WsCloud.d.ts +47 -0
- package/types-3.4/services/wsdl/WsWorkunits/v2.02/WsWorkunits.d.ts +2553 -0
- package/types-3.4/services/wsdl/ws_logaccess/v1.08/ws_logaccess.d.ts +211 -0
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.
|
|
652
|
-
var BUILD_VERSION = "2.
|
|
651
|
+
var PKG_VERSION = "2.101.1";
|
|
652
|
+
var BUILD_VERSION = "2.108.2";
|
|
653
653
|
|
|
654
654
|
/******************************************************************************
|
|
655
655
|
Copyright (c) Microsoft Corporation.
|
|
@@ -746,7 +746,7 @@
|
|
|
746
746
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
747
747
|
};
|
|
748
748
|
|
|
749
|
-
var logger$
|
|
749
|
+
var logger$6 = util.scopedLogger("comms/connection.ts");
|
|
750
750
|
function instanceOfIOptions(object) {
|
|
751
751
|
return "baseUrl" in object;
|
|
752
752
|
}
|
|
@@ -848,12 +848,12 @@
|
|
|
848
848
|
respondedTimeout -= respondedTick;
|
|
849
849
|
if (respondedTimeout <= 0) {
|
|
850
850
|
clearInterval(progress);
|
|
851
|
-
logger$
|
|
851
|
+
logger$6.error("Request timeout: " + script.src);
|
|
852
852
|
doCallback();
|
|
853
853
|
reject(Error("Request timeout: " + script.src));
|
|
854
854
|
}
|
|
855
855
|
else {
|
|
856
|
-
logger$
|
|
856
|
+
logger$6.debug("Request pending (" + respondedTimeout / 1000 + " sec): " + script.src);
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
859
|
}, respondedTick);
|
|
@@ -1545,17 +1545,67 @@
|
|
|
1545
1545
|
var CloudServiceBase = /** @class */ (function (_super) {
|
|
1546
1546
|
__extends(CloudServiceBase, _super);
|
|
1547
1547
|
function CloudServiceBase(optsConnection) {
|
|
1548
|
-
return _super.call(this, optsConnection, "WsCloud", "1") || this;
|
|
1548
|
+
return _super.call(this, optsConnection, "WsCloud", "1.02") || this;
|
|
1549
1549
|
}
|
|
1550
1550
|
CloudServiceBase.prototype.GetPODs = function (request) {
|
|
1551
|
-
return this._connection.send("GetPODs", request);
|
|
1551
|
+
return this._connection.send("GetPODs", request, "json", false, undefined, "GetPODsResponse");
|
|
1552
|
+
};
|
|
1553
|
+
CloudServiceBase.prototype.GetServices = function (request) {
|
|
1554
|
+
return this._connection.send("GetServices", request, "json", false, undefined, "GetServicesResponse");
|
|
1552
1555
|
};
|
|
1553
1556
|
CloudServiceBase.prototype.Ping = function (request) {
|
|
1554
|
-
return this._connection.send("Ping", request);
|
|
1557
|
+
return this._connection.send("Ping", request, "json", false, undefined, "WsCloudPingResponse");
|
|
1555
1558
|
};
|
|
1556
1559
|
return CloudServiceBase;
|
|
1557
1560
|
}(Service));
|
|
1558
1561
|
|
|
1562
|
+
var logger$5 = util.scopedLogger("@hpcc-js/comms/services/wsCloud.ts");
|
|
1563
|
+
function isGetPODsResponse_v1_02(response) {
|
|
1564
|
+
return (response === null || response === void 0 ? void 0 : response.Pods) !== undefined;
|
|
1565
|
+
}
|
|
1566
|
+
function mapPorts(pod) {
|
|
1567
|
+
var _a, _b, _c;
|
|
1568
|
+
return (_c = (_b = (_a = pod.spec) === null || _a === void 0 ? void 0 : _a.containers) === null || _b === void 0 ? void 0 : _b.reduce(function (prev, curr) {
|
|
1569
|
+
var _a;
|
|
1570
|
+
(_a = curr.ports) === null || _a === void 0 ? void 0 : _a.forEach(function (p) {
|
|
1571
|
+
prev.push({
|
|
1572
|
+
ContainerPort: p.containerPort,
|
|
1573
|
+
Name: p.name,
|
|
1574
|
+
Protocol: p.protocol
|
|
1575
|
+
});
|
|
1576
|
+
});
|
|
1577
|
+
return prev;
|
|
1578
|
+
}, [])) !== null && _c !== void 0 ? _c : [];
|
|
1579
|
+
}
|
|
1580
|
+
function mapPods(pods) {
|
|
1581
|
+
return pods
|
|
1582
|
+
.filter(function (pod) {
|
|
1583
|
+
var _a, _b;
|
|
1584
|
+
var labels = (_b = (_a = pod === null || pod === void 0 ? void 0 : pod.metadata) === null || _a === void 0 ? void 0 : _a.labels) !== null && _b !== void 0 ? _b : {};
|
|
1585
|
+
return labels.hasOwnProperty("app.kubernetes.io/part-of") && labels["app.kubernetes.io/part-of"] === "HPCC-Platform";
|
|
1586
|
+
})
|
|
1587
|
+
.map(function (pod) {
|
|
1588
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1589
|
+
var started = new Date((_a = pod.metadata) === null || _a === void 0 ? void 0 : _a.creationTimestamp);
|
|
1590
|
+
return {
|
|
1591
|
+
Name: pod.metadata.name,
|
|
1592
|
+
Status: (_b = pod.status) === null || _b === void 0 ? void 0 : _b.phase,
|
|
1593
|
+
CreationTimestamp: started.toISOString(),
|
|
1594
|
+
ContainerName: (_e = (_d = (_c = pod.status) === null || _c === void 0 ? void 0 : _c.containerStatuses) === null || _d === void 0 ? void 0 : _d.reduce(function (prev, curr) {
|
|
1595
|
+
if (curr.name) {
|
|
1596
|
+
prev.push(curr.name);
|
|
1597
|
+
}
|
|
1598
|
+
return prev;
|
|
1599
|
+
}, []).join(", ")) !== null && _e !== void 0 ? _e : "",
|
|
1600
|
+
ContainerCount: (_h = (_g = (_f = pod.spec) === null || _f === void 0 ? void 0 : _f.containers) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : 0,
|
|
1601
|
+
ContainerReadyCount: (_k = (_j = pod.status) === null || _j === void 0 ? void 0 : _j.containerStatuses) === null || _k === void 0 ? void 0 : _k.reduce(function (prev, curr) { return prev + (curr.ready ? 1 : 0); }, 0),
|
|
1602
|
+
ContainerRestartCount: (_m = (_l = pod.status) === null || _l === void 0 ? void 0 : _l.containerStatuses) === null || _m === void 0 ? void 0 : _m.reduce(function (prev, curr) { return prev + curr.restartCount; }, 0),
|
|
1603
|
+
Ports: {
|
|
1604
|
+
Port: mapPorts(pod)
|
|
1605
|
+
},
|
|
1606
|
+
};
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1559
1609
|
var CloudService = /** @class */ (function (_super) {
|
|
1560
1610
|
__extends(CloudService, _super);
|
|
1561
1611
|
function CloudService() {
|
|
@@ -1563,12 +1613,16 @@
|
|
|
1563
1613
|
}
|
|
1564
1614
|
CloudService.prototype.getPODs = function () {
|
|
1565
1615
|
return _super.prototype.GetPODs.call(this, {}).then(function (response) {
|
|
1566
|
-
var _a;
|
|
1616
|
+
var _a, _b, _c;
|
|
1617
|
+
if (isGetPODsResponse_v1_02(response)) {
|
|
1618
|
+
return (_b = (_a = response.Pods) === null || _a === void 0 ? void 0 : _a.Pod) !== null && _b !== void 0 ? _b : [];
|
|
1619
|
+
}
|
|
1567
1620
|
try {
|
|
1568
1621
|
var obj = typeof response.Result === "string" ? JSON.parse(response.Result) : response.Result;
|
|
1569
|
-
return (
|
|
1622
|
+
return mapPods((_c = obj === null || obj === void 0 ? void 0 : obj.items) !== null && _c !== void 0 ? _c : []);
|
|
1570
1623
|
}
|
|
1571
1624
|
catch (error) {
|
|
1625
|
+
logger$5.error("Error parsing V1Pods json '".concat(error.message, "'"));
|
|
1572
1626
|
return [];
|
|
1573
1627
|
}
|
|
1574
1628
|
});
|
|
@@ -1702,6 +1756,35 @@
|
|
|
1702
1756
|
function DaliService() {
|
|
1703
1757
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1704
1758
|
}
|
|
1759
|
+
DaliService.prototype.Export = function (request) {
|
|
1760
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1761
|
+
var exportUrl, reqParams, response, filename, content;
|
|
1762
|
+
return __generator(this, function (_a) {
|
|
1763
|
+
switch (_a.label) {
|
|
1764
|
+
case 0:
|
|
1765
|
+
exportUrl = "/WsDali/Export";
|
|
1766
|
+
reqParams = new URLSearchParams();
|
|
1767
|
+
if (request.Path) {
|
|
1768
|
+
reqParams.append("Path", request.Path);
|
|
1769
|
+
}
|
|
1770
|
+
if (request.Safe !== undefined) {
|
|
1771
|
+
reqParams.append("Safe", String(request.Safe));
|
|
1772
|
+
}
|
|
1773
|
+
return [4 /*yield*/, fetch("".concat(exportUrl, "?").concat(reqParams.toString()))];
|
|
1774
|
+
case 1:
|
|
1775
|
+
response = _a.sent();
|
|
1776
|
+
filename = response.headers.get("Content-Disposition");
|
|
1777
|
+
return [4 /*yield*/, response.blob()];
|
|
1778
|
+
case 2:
|
|
1779
|
+
content = _a.sent();
|
|
1780
|
+
return [2 /*return*/, {
|
|
1781
|
+
filename: filename ? filename.split("filename=")[1] : "WsDali_Export",
|
|
1782
|
+
content: content
|
|
1783
|
+
}];
|
|
1784
|
+
}
|
|
1785
|
+
});
|
|
1786
|
+
});
|
|
1787
|
+
};
|
|
1705
1788
|
return DaliService;
|
|
1706
1789
|
}(DaliServiceBase));
|
|
1707
1790
|
|
|
@@ -2043,12 +2126,15 @@
|
|
|
2043
2126
|
LogColumnType["threadid"] = "threadid";
|
|
2044
2127
|
LogColumnType["timestamp"] = "timestamp";
|
|
2045
2128
|
LogColumnType["pod"] = "pod";
|
|
2129
|
+
LogColumnType["traceid"] = "traceid";
|
|
2130
|
+
LogColumnType["spanid"] = "spanid";
|
|
2046
2131
|
})(WsLogaccess.LogColumnType || (WsLogaccess.LogColumnType = {}));
|
|
2047
2132
|
(function (LogColumnValueType) {
|
|
2048
2133
|
LogColumnValueType["string"] = "string";
|
|
2049
2134
|
LogColumnValueType["numeric"] = "numeric";
|
|
2050
2135
|
LogColumnValueType["datetime"] = "datetime";
|
|
2051
2136
|
LogColumnValueType["enum"] = "enum";
|
|
2137
|
+
LogColumnValueType["epoch"] = "epoch";
|
|
2052
2138
|
})(WsLogaccess.LogColumnValueType || (WsLogaccess.LogColumnValueType = {}));
|
|
2053
2139
|
(function (LogAccessType) {
|
|
2054
2140
|
LogAccessType[LogAccessType["All"] = 0] = "All";
|
|
@@ -2060,7 +2146,14 @@
|
|
|
2060
2146
|
LogAccessType[LogAccessType["BySourceNode"] = 6] = "BySourceNode";
|
|
2061
2147
|
LogAccessType[LogAccessType["ByFieldName"] = 7] = "ByFieldName";
|
|
2062
2148
|
LogAccessType[LogAccessType["ByPod"] = 8] = "ByPod";
|
|
2149
|
+
LogAccessType[LogAccessType["ByTraceID"] = 9] = "ByTraceID";
|
|
2150
|
+
LogAccessType[LogAccessType["BySpanID"] = 10] = "BySpanID";
|
|
2063
2151
|
})(WsLogaccess.LogAccessType || (WsLogaccess.LogAccessType = {}));
|
|
2152
|
+
(function (LogAccessStatusCode) {
|
|
2153
|
+
LogAccessStatusCode[LogAccessStatusCode["Success"] = 0] = "Success";
|
|
2154
|
+
LogAccessStatusCode[LogAccessStatusCode["Warning"] = 1] = "Warning";
|
|
2155
|
+
LogAccessStatusCode[LogAccessStatusCode["Fail"] = 2] = "Fail";
|
|
2156
|
+
})(WsLogaccess.LogAccessStatusCode || (WsLogaccess.LogAccessStatusCode = {}));
|
|
2064
2157
|
(function (LogAccessFilterOperator) {
|
|
2065
2158
|
LogAccessFilterOperator[LogAccessFilterOperator["NONE"] = 0] = "NONE";
|
|
2066
2159
|
LogAccessFilterOperator[LogAccessFilterOperator["AND"] = 1] = "AND";
|
|
@@ -2082,6 +2175,8 @@
|
|
|
2082
2175
|
SortColumType[SortColumType["BySourceNode"] = 6] = "BySourceNode";
|
|
2083
2176
|
SortColumType[SortColumType["ByFieldName"] = 7] = "ByFieldName";
|
|
2084
2177
|
SortColumType[SortColumType["ByPod"] = 8] = "ByPod";
|
|
2178
|
+
SortColumType[SortColumType["ByTraceID"] = 9] = "ByTraceID";
|
|
2179
|
+
SortColumType[SortColumType["BySpanID"] = 10] = "BySpanID";
|
|
2085
2180
|
})(WsLogaccess.SortColumType || (WsLogaccess.SortColumType = {}));
|
|
2086
2181
|
(function (SortDirection) {
|
|
2087
2182
|
SortDirection[SortDirection["ASC"] = 0] = "ASC";
|
|
@@ -2091,8 +2186,11 @@
|
|
|
2091
2186
|
var LogaccessServiceBase = /** @class */ (function (_super) {
|
|
2092
2187
|
__extends(LogaccessServiceBase, _super);
|
|
2093
2188
|
function LogaccessServiceBase(optsConnection) {
|
|
2094
|
-
return _super.call(this, optsConnection, "ws_logaccess", "1.
|
|
2189
|
+
return _super.call(this, optsConnection, "ws_logaccess", "1.08") || this;
|
|
2095
2190
|
}
|
|
2191
|
+
LogaccessServiceBase.prototype.GetHealthReport = function (request) {
|
|
2192
|
+
return this._connection.send("GetHealthReport", request, "json", false, undefined, "GetHealthReportResponse");
|
|
2193
|
+
};
|
|
2096
2194
|
LogaccessServiceBase.prototype.GetLogAccessInfo = function (request) {
|
|
2097
2195
|
return this._connection.send("GetLogAccessInfo", request, "json", false, undefined, "GetLogAccessInfoResponse");
|
|
2098
2196
|
};
|
|
@@ -3041,7 +3139,7 @@
|
|
|
3041
3139
|
var WorkunitsServiceBase = /** @class */ (function (_super) {
|
|
3042
3140
|
__extends(WorkunitsServiceBase, _super);
|
|
3043
3141
|
function WorkunitsServiceBase(optsConnection) {
|
|
3044
|
-
return _super.call(this, optsConnection, "WsWorkunits", "2") || this;
|
|
3142
|
+
return _super.call(this, optsConnection, "WsWorkunits", "2.02") || this;
|
|
3045
3143
|
}
|
|
3046
3144
|
WorkunitsServiceBase.prototype.GVCAjaxGraph = function (request) {
|
|
3047
3145
|
return this._connection.send("GVCAjaxGraph", request, "json", false, undefined, "GVCAjaxGraphResponse");
|