@hpcc-js/comms 2.82.0 → 2.82.2
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 +644 -47
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +645 -46
- 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 +645 -46
- 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/ecl/dfuWorkunit.js +528 -0
- package/lib-es6/ecl/dfuWorkunit.js.map +1 -0
- package/lib-es6/ecl/workunit.js +2 -2
- package/lib-es6/ecl/workunit.js.map +1 -1
- package/lib-es6/index-common.js +1 -0
- package/lib-es6/index-common.js.map +1 -1
- package/lib-es6/services/fileSpray.js +9 -0
- package/lib-es6/services/fileSpray.js.map +1 -1
- package/lib-es6/services/wsLogaccess.js +75 -27
- package/lib-es6/services/wsLogaccess.js.map +1 -1
- package/lib-es6/services/wsdl/WsWorkunits/v1.95/WsWorkunits.js +3 -0
- package/lib-es6/services/wsdl/WsWorkunits/v1.95/WsWorkunits.js.map +1 -1
- package/lib-es6/services/wsdl/ws_logaccess/v1.04/ws_logaccess.js +85 -0
- package/lib-es6/services/wsdl/ws_logaccess/v1.04/ws_logaccess.js.map +1 -0
- package/package.json +6 -6
- package/src/__package__.ts +2 -2
- package/src/ecl/dfuWorkunit.ts +306 -0
- package/src/ecl/workunit.ts +2 -2
- package/src/index-common.ts +1 -0
- package/src/services/fileSpray.ts +108 -0
- package/src/services/wsLogaccess.ts +70 -26
- package/src/services/wsdl/WsWorkunits/v1.95/WsWorkunits.ts +106 -60
- package/src/services/wsdl/ws_logaccess/v1.04/ws_logaccess.ts +215 -0
- package/types/__package__.d.ts +2 -2
- package/types/connection.d.ts +5 -5
- package/types/connection.d.ts.map +1 -1
- package/types/ecl/activity.d.ts +3 -3
- package/types/ecl/activity.d.ts.map +1 -1
- package/types/ecl/dfuWorkunit.d.ts +95 -0
- package/types/ecl/dfuWorkunit.d.ts.map +1 -0
- package/types/ecl/result.d.ts +3 -3
- package/types/ecl/result.d.ts.map +1 -1
- package/types/ecl/targetCluster.d.ts +2 -2
- package/types/ecl/targetCluster.d.ts.map +1 -1
- package/types/ecl/workunit.d.ts +4 -4
- package/types/ecl/workunit.d.ts.map +1 -1
- package/types/espConnection.d.ts +1 -1
- package/types/espConnection.d.ts.map +1 -1
- package/types/index-common.d.ts +1 -0
- package/types/index-common.d.ts.map +1 -1
- package/types/services/fileSpray.d.ts +95 -0
- package/types/services/fileSpray.d.ts.map +1 -1
- package/types/services/wsDFU.d.ts +1 -1
- package/types/services/wsDFU.d.ts.map +1 -1
- package/types/services/wsEcl.d.ts +5 -5
- package/types/services/wsEcl.d.ts.map +1 -1
- package/types/services/wsLogaccess.d.ts +3 -3
- package/types/services/wsLogaccess.d.ts.map +1 -1
- package/types/services/wsdl/FileSpray/v1.23/FileSpray.d.ts +5 -5
- package/types/services/wsdl/FileSpray/v1.23/FileSpray.d.ts.map +1 -1
- package/types/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.d.ts +2 -2
- package/types/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.d.ts.map +1 -1
- package/types/services/wsdl/WsDfu/v1.62/WsDfu.d.ts +4 -4
- package/types/services/wsdl/WsDfu/v1.62/WsDfu.d.ts.map +1 -1
- package/types/services/wsdl/WsFileIO/v1.01/WsFileIO.d.ts +2 -2
- package/types/services/wsdl/WsFileIO/v1.01/WsFileIO.d.ts.map +1 -1
- package/types/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.d.ts +1 -1
- package/types/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.d.ts.map +1 -1
- package/types/services/wsdl/WsResources/v1.01/WsResources.d.ts +1 -1
- package/types/services/wsdl/WsResources/v1.01/WsResources.d.ts.map +1 -1
- package/types/services/wsdl/WsSMC/v1.24/WsSMC.d.ts +3 -3
- package/types/services/wsdl/WsSMC/v1.24/WsSMC.d.ts.map +1 -1
- package/types/services/wsdl/WsTopology/v1.31/WsTopology.d.ts +4 -4
- package/types/services/wsdl/WsTopology/v1.31/WsTopology.d.ts.map +1 -1
- package/types/services/wsdl/WsWorkunits/v1.88/WsWorkunits.d.ts +8 -8
- package/types/services/wsdl/WsWorkunits/v1.88/WsWorkunits.d.ts.map +1 -1
- package/types/services/wsdl/WsWorkunits/v1.95/WsWorkunits.d.ts +92 -54
- package/types/services/wsdl/WsWorkunits/v1.95/WsWorkunits.d.ts.map +1 -1
- package/types/services/wsdl/ws_access/v1.16/ws_access.d.ts +4 -4
- package/types/services/wsdl/ws_access/v1.16/ws_access.d.ts.map +1 -1
- package/types/services/wsdl/ws_account/v1.05/ws_account.d.ts +1 -1
- package/types/services/wsdl/ws_account/v1.05/ws_account.d.ts.map +1 -1
- package/types/services/wsdl/ws_codesign/v1.1/ws_codesign.d.ts +1 -1
- package/types/services/wsdl/ws_codesign/v1.1/ws_codesign.d.ts.map +1 -1
- package/types/services/wsdl/ws_logaccess/v1/ws_logaccess.d.ts +3 -3
- package/types/services/wsdl/ws_logaccess/v1/ws_logaccess.d.ts.map +1 -1
- package/types/services/wsdl/ws_logaccess/v1.04/ws_logaccess.d.ts +171 -0
- package/types/services/wsdl/ws_logaccess/v1.04/ws_logaccess.d.ts.map +1 -0
- package/types/services/wsdl/ws_machine/v1.17/ws_machine.d.ts +3 -3
- package/types/services/wsdl/ws_machine/v1.17/ws_machine.d.ts.map +1 -1
- package/types/services/wsdl/wsstore/v1.02/wsstore.d.ts +1 -1
- package/types/services/wsdl/wsstore/v1.02/wsstore.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
- package/types-3.4/connection.d.ts +5 -5
- package/types-3.4/ecl/activity.d.ts +3 -3
- package/types-3.4/ecl/dfuWorkunit.d.ts +95 -0
- package/types-3.4/ecl/result.d.ts +3 -3
- package/types-3.4/ecl/targetCluster.d.ts +2 -2
- package/types-3.4/ecl/workunit.d.ts +4 -4
- package/types-3.4/espConnection.d.ts +1 -1
- package/types-3.4/index-common.d.ts +1 -0
- package/types-3.4/services/fileSpray.d.ts +95 -0
- package/types-3.4/services/wsDFU.d.ts +1 -1
- package/types-3.4/services/wsEcl.d.ts +5 -5
- package/types-3.4/services/wsLogaccess.d.ts +3 -3
- package/types-3.4/services/wsdl/FileSpray/v1.23/FileSpray.d.ts +5 -5
- package/types-3.4/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.d.ts +2 -2
- package/types-3.4/services/wsdl/WsDfu/v1.62/WsDfu.d.ts +4 -4
- package/types-3.4/services/wsdl/WsFileIO/v1.01/WsFileIO.d.ts +2 -2
- package/types-3.4/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.d.ts +1 -1
- package/types-3.4/services/wsdl/WsResources/v1.01/WsResources.d.ts +1 -1
- package/types-3.4/services/wsdl/WsSMC/v1.24/WsSMC.d.ts +3 -3
- package/types-3.4/services/wsdl/WsTopology/v1.31/WsTopology.d.ts +4 -4
- package/types-3.4/services/wsdl/WsWorkunits/v1.88/WsWorkunits.d.ts +8 -8
- package/types-3.4/services/wsdl/WsWorkunits/v1.95/WsWorkunits.d.ts +92 -54
- package/types-3.4/services/wsdl/ws_access/v1.16/ws_access.d.ts +4 -4
- package/types-3.4/services/wsdl/ws_account/v1.05/ws_account.d.ts +1 -1
- package/types-3.4/services/wsdl/ws_codesign/v1.1/ws_codesign.d.ts +1 -1
- package/types-3.4/services/wsdl/ws_logaccess/v1/ws_logaccess.d.ts +3 -3
- package/types-3.4/services/wsdl/ws_logaccess/v1.04/ws_logaccess.d.ts +171 -0
- package/types-3.4/services/wsdl/ws_machine/v1.17/ws_machine.d.ts +3 -3
- package/types-3.4/services/wsdl/wsstore/v1.02/wsstore.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -611,8 +611,8 @@
|
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
var PKG_NAME = "@hpcc-js/comms";
|
|
614
|
-
var PKG_VERSION = "2.82.
|
|
615
|
-
var BUILD_VERSION = "2.104.
|
|
614
|
+
var PKG_VERSION = "2.82.2";
|
|
615
|
+
var BUILD_VERSION = "2.104.20";
|
|
616
616
|
|
|
617
617
|
/******************************************************************************
|
|
618
618
|
Copyright (c) Microsoft Corporation.
|
|
@@ -704,7 +704,7 @@
|
|
|
704
704
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
705
705
|
}
|
|
706
706
|
|
|
707
|
-
var logger$
|
|
707
|
+
var logger$3 = util.scopedLogger("comms/connection.ts");
|
|
708
708
|
function instanceOfIOptions(object) {
|
|
709
709
|
return "baseUrl" in object;
|
|
710
710
|
}
|
|
@@ -806,12 +806,12 @@
|
|
|
806
806
|
respondedTimeout -= respondedTick;
|
|
807
807
|
if (respondedTimeout <= 0) {
|
|
808
808
|
clearInterval(progress);
|
|
809
|
-
logger$
|
|
809
|
+
logger$3.error("Request timeout: " + script.src);
|
|
810
810
|
doCallback();
|
|
811
811
|
reject(Error("Request timeout: " + script.src));
|
|
812
812
|
}
|
|
813
813
|
else {
|
|
814
|
-
logger$
|
|
814
|
+
logger$3.debug("Request pending (" + respondedTimeout / 1000 + " sec): " + script.src);
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
817
|
}, respondedTick);
|
|
@@ -1201,6 +1201,15 @@
|
|
|
1201
1201
|
function FileSprayService() {
|
|
1202
1202
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1203
1203
|
}
|
|
1204
|
+
FileSprayService.prototype.SprayFixedEx = function (request) {
|
|
1205
|
+
return this._connection.send("SprayFixed", request);
|
|
1206
|
+
};
|
|
1207
|
+
FileSprayService.prototype.SprayVariableEx = function (request) {
|
|
1208
|
+
return this._connection.send("SprayVariable", request, "json", false, null, "SprayResponse");
|
|
1209
|
+
};
|
|
1210
|
+
FileSprayService.prototype.DesprayEx = function (request) {
|
|
1211
|
+
return this._connection.send("Despray", request);
|
|
1212
|
+
};
|
|
1204
1213
|
return FileSprayService;
|
|
1205
1214
|
}(FileSprayServiceBase));
|
|
1206
1215
|
|
|
@@ -1901,6 +1910,26 @@
|
|
|
1901
1910
|
|
|
1902
1911
|
exports.WsLogaccess = void 0;
|
|
1903
1912
|
(function (WsLogaccess) {
|
|
1913
|
+
(function (LogColumnType) {
|
|
1914
|
+
LogColumnType["global"] = "global";
|
|
1915
|
+
LogColumnType["workunits"] = "workunits";
|
|
1916
|
+
LogColumnType["components"] = "components";
|
|
1917
|
+
LogColumnType["audience"] = "audience";
|
|
1918
|
+
LogColumnType["class"] = "class";
|
|
1919
|
+
LogColumnType["instance"] = "instance";
|
|
1920
|
+
LogColumnType["node"] = "node";
|
|
1921
|
+
LogColumnType["message"] = "message";
|
|
1922
|
+
LogColumnType["logid"] = "logid";
|
|
1923
|
+
LogColumnType["processid"] = "processid";
|
|
1924
|
+
LogColumnType["threadid"] = "threadid";
|
|
1925
|
+
LogColumnType["timestamp"] = "timestamp";
|
|
1926
|
+
})(WsLogaccess.LogColumnType || (WsLogaccess.LogColumnType = {}));
|
|
1927
|
+
(function (LogColumnValueType) {
|
|
1928
|
+
LogColumnValueType["string"] = "string";
|
|
1929
|
+
LogColumnValueType["numeric"] = "numeric";
|
|
1930
|
+
LogColumnValueType["datetime"] = "datetime";
|
|
1931
|
+
LogColumnValueType["enum"] = "enum";
|
|
1932
|
+
})(WsLogaccess.LogColumnValueType || (WsLogaccess.LogColumnValueType = {}));
|
|
1904
1933
|
(function (LogAccessType) {
|
|
1905
1934
|
LogAccessType[LogAccessType["All"] = 0] = "All";
|
|
1906
1935
|
LogAccessType[LogAccessType["ByJobID"] = 1] = "ByJobID";
|
|
@@ -1940,7 +1969,7 @@
|
|
|
1940
1969
|
var LogaccessServiceBase = /** @class */ (function (_super) {
|
|
1941
1970
|
__extends(LogaccessServiceBase, _super);
|
|
1942
1971
|
function LogaccessServiceBase(optsConnection) {
|
|
1943
|
-
return _super.call(this, optsConnection, "ws_logaccess", "1.
|
|
1972
|
+
return _super.call(this, optsConnection, "ws_logaccess", "1.04") || this;
|
|
1944
1973
|
}
|
|
1945
1974
|
LogaccessServiceBase.prototype.GetLogAccessInfo = function (request) {
|
|
1946
1975
|
return this._connection.send("GetLogAccessInfo", request, "json", false, undefined, "GetLogAccessInfoResponse");
|
|
@@ -1954,7 +1983,7 @@
|
|
|
1954
1983
|
return LogaccessServiceBase;
|
|
1955
1984
|
}(Service));
|
|
1956
1985
|
|
|
1957
|
-
var logger$
|
|
1986
|
+
var logger$2 = util.scopedLogger("@hpcc-js/comms/services/wsLogaccess.ts");
|
|
1958
1987
|
var ElasticKnownColumns;
|
|
1959
1988
|
(function (ElasticKnownColumns) {
|
|
1960
1989
|
ElasticKnownColumns["audience"] = "hpcc.log.audience";
|
|
@@ -2023,7 +2052,7 @@
|
|
|
2023
2052
|
return _super.prototype.GetLogs.call(this, request);
|
|
2024
2053
|
};
|
|
2025
2054
|
LogaccessService.prototype.GetLogsEx = function (request) {
|
|
2026
|
-
var _a, _b;
|
|
2055
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2027
2056
|
var getLogsRequest = {
|
|
2028
2057
|
Filter: {
|
|
2029
2058
|
leftBinaryFilter: {
|
|
@@ -2043,40 +2072,88 @@
|
|
|
2043
2072
|
Format: "JSON"
|
|
2044
2073
|
};
|
|
2045
2074
|
var filters = [];
|
|
2046
|
-
|
|
2075
|
+
var _loop_1 = function (key) {
|
|
2047
2076
|
if (key in ElasticKnownColumns) {
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2077
|
+
if (Array.isArray(request[key])) {
|
|
2078
|
+
request[key].forEach(function (value) {
|
|
2079
|
+
filters.push({
|
|
2080
|
+
LogCategory: exports.WsLogaccess.LogAccessType.ByFieldName,
|
|
2081
|
+
SearchField: ElasticKnownColumns[key],
|
|
2082
|
+
SearchByValue: value
|
|
2083
|
+
});
|
|
2084
|
+
});
|
|
2085
|
+
}
|
|
2086
|
+
else {
|
|
2087
|
+
filters.push({
|
|
2088
|
+
LogCategory: exports.WsLogaccess.LogAccessType.ByFieldName,
|
|
2089
|
+
SearchField: ElasticKnownColumns[key],
|
|
2090
|
+
SearchByValue: request[key]
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2053
2093
|
}
|
|
2094
|
+
};
|
|
2095
|
+
for (var key in request) {
|
|
2096
|
+
_loop_1(key);
|
|
2054
2097
|
}
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2098
|
+
if (filters.length > 2) {
|
|
2099
|
+
var binaryLogFilter_1 = getLogsRequest.Filter.leftBinaryFilter.BinaryLogFilter[0];
|
|
2100
|
+
filters.forEach(function (filter, i) {
|
|
2101
|
+
var operator = exports.WsLogaccess.LogAccessFilterOperator.AND;
|
|
2102
|
+
if (i > 0) {
|
|
2103
|
+
if (filters[i - 1].SearchField === filter.SearchField) {
|
|
2104
|
+
operator = exports.WsLogaccess.LogAccessFilterOperator.OR;
|
|
2105
|
+
}
|
|
2106
|
+
if (i === filters.length - 1) {
|
|
2107
|
+
binaryLogFilter_1.Operator = operator;
|
|
2108
|
+
binaryLogFilter_1.rightFilter = filter;
|
|
2109
|
+
}
|
|
2110
|
+
else {
|
|
2111
|
+
binaryLogFilter_1.Operator = operator;
|
|
2112
|
+
binaryLogFilter_1.rightBinaryFilter = {
|
|
2113
|
+
BinaryLogFilter: [{
|
|
2114
|
+
leftFilter: filter
|
|
2115
|
+
}]
|
|
2116
|
+
};
|
|
2117
|
+
binaryLogFilter_1 = binaryLogFilter_1.rightBinaryFilter.BinaryLogFilter[0];
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
else {
|
|
2121
|
+
binaryLogFilter_1.leftFilter = filter;
|
|
2122
|
+
}
|
|
2123
|
+
});
|
|
2124
|
+
}
|
|
2125
|
+
else {
|
|
2126
|
+
delete getLogsRequest.Filter.leftBinaryFilter;
|
|
2127
|
+
getLogsRequest.Filter.leftFilter = {
|
|
2128
|
+
LogCategory: exports.WsLogaccess.LogAccessType.All
|
|
2129
|
+
};
|
|
2130
|
+
if ((_c = filters[0]) === null || _c === void 0 ? void 0 : _c.SearchField) {
|
|
2131
|
+
getLogsRequest.Filter.leftFilter = {
|
|
2132
|
+
LogCategory: (_d = filters[0]) === null || _d === void 0 ? void 0 : _d.LogCategory,
|
|
2133
|
+
SearchField: (_e = filters[0]) === null || _e === void 0 ? void 0 : _e.SearchField,
|
|
2134
|
+
SearchByValue: (_f = filters[0]) === null || _f === void 0 ? void 0 : _f.SearchByValue
|
|
2135
|
+
};
|
|
2063
2136
|
}
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2137
|
+
if ((_g = filters[1]) === null || _g === void 0 ? void 0 : _g.SearchField) {
|
|
2138
|
+
getLogsRequest.Filter.Operator = exports.WsLogaccess.LogAccessFilterOperator.AND;
|
|
2139
|
+
if (filters[0].SearchField === filters[1].SearchField) {
|
|
2140
|
+
getLogsRequest.Filter.Operator = exports.WsLogaccess.LogAccessFilterOperator.OR;
|
|
2141
|
+
}
|
|
2142
|
+
getLogsRequest.Filter.rightFilter = {
|
|
2143
|
+
LogCategory: (_h = filters[0]) === null || _h === void 0 ? void 0 : _h.LogCategory,
|
|
2144
|
+
SearchField: (_j = filters[1]) === null || _j === void 0 ? void 0 : _j.SearchField,
|
|
2145
|
+
SearchByValue: (_k = filters[1]) === null || _k === void 0 ? void 0 : _k.SearchByValue
|
|
2070
2146
|
};
|
|
2071
|
-
binaryLogFilter = binaryLogFilter.rightBinaryFilter.BinaryLogFilter[0];
|
|
2072
2147
|
}
|
|
2073
|
-
}
|
|
2074
|
-
if (request.StartDate
|
|
2148
|
+
}
|
|
2149
|
+
if (request.StartDate) {
|
|
2075
2150
|
getLogsRequest.Range.StartDate = request.StartDate.toISOString();
|
|
2151
|
+
}
|
|
2152
|
+
if (request.EndDate) {
|
|
2076
2153
|
getLogsRequest.Range.EndDate = request.EndDate.toISOString();
|
|
2077
2154
|
}
|
|
2078
2155
|
return Promise.all([this.GetLogAccessInfo(), this.GetLogs(getLogsRequest)]).then(function (_a) {
|
|
2079
|
-
var _b, _c, _d, _e;
|
|
2156
|
+
var _b, _c, _d, _e, _f;
|
|
2080
2157
|
var info = _a[0], response = _a[1];
|
|
2081
2158
|
try {
|
|
2082
2159
|
var logLines = JSON.parse(response.LogLines);
|
|
@@ -2089,16 +2166,16 @@
|
|
|
2089
2166
|
lines = (_e = (_d = logLines.lines) === null || _d === void 0 ? void 0 : _d.map(elasticToLogLine)) !== null && _e !== void 0 ? _e : [];
|
|
2090
2167
|
break;
|
|
2091
2168
|
default:
|
|
2092
|
-
logger$
|
|
2169
|
+
logger$2.warning("Unknown RemoteLogManagerType: ".concat(info.RemoteLogManagerType));
|
|
2093
2170
|
lines = [];
|
|
2094
2171
|
}
|
|
2095
2172
|
return {
|
|
2096
2173
|
lines: lines,
|
|
2097
|
-
total: response.TotalLogLinesAvailable
|
|
2174
|
+
total: (_f = response.TotalLogLinesAvailable) !== null && _f !== void 0 ? _f : 10000
|
|
2098
2175
|
};
|
|
2099
2176
|
}
|
|
2100
2177
|
catch (e) {
|
|
2101
|
-
logger$
|
|
2178
|
+
logger$2.error(e);
|
|
2102
2179
|
}
|
|
2103
2180
|
return {
|
|
2104
2181
|
lines: [],
|
|
@@ -2663,6 +2740,9 @@
|
|
|
2663
2740
|
WorkunitsServiceBase.prototype.WUAddLocalFileToWorkunit = function (request) {
|
|
2664
2741
|
return this._connection.send("WUAddLocalFileToWorkunit", request, "json", false, undefined, "WUAddLocalFileToWorkunitResponse");
|
|
2665
2742
|
};
|
|
2743
|
+
WorkunitsServiceBase.prototype.WUAnalyseHotspot = function (request) {
|
|
2744
|
+
return this._connection.send("WUAnalyseHotspot", request, "json", false, undefined, "WUAnalyseHotspotResponse");
|
|
2745
|
+
};
|
|
2666
2746
|
WorkunitsServiceBase.prototype.WUCDebug = function (request) {
|
|
2667
2747
|
return this._connection.send("WUCDebug", request, "json", false, undefined, "WUDebugResponse");
|
|
2668
2748
|
};
|
|
@@ -5158,7 +5238,7 @@
|
|
|
5158
5238
|
|
|
5159
5239
|
var formatter = utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");
|
|
5160
5240
|
var parser = utcParse("%Y-%m-%dT%H:%M:%S.%LZ");
|
|
5161
|
-
var logger = util.scopedLogger("workunit.ts");
|
|
5241
|
+
var logger$1 = util.scopedLogger("workunit.ts");
|
|
5162
5242
|
var WUStateID = exports.WUStateID;
|
|
5163
5243
|
var WorkunitCache = /** @class */ (function (_super) {
|
|
5164
5244
|
__extends(WorkunitCache, _super);
|
|
@@ -5169,7 +5249,7 @@
|
|
|
5169
5249
|
}
|
|
5170
5250
|
return WorkunitCache;
|
|
5171
5251
|
}(util.Cache));
|
|
5172
|
-
var _workunits = new WorkunitCache();
|
|
5252
|
+
var _workunits$1 = new WorkunitCache();
|
|
5173
5253
|
var Workunit = /** @class */ (function (_super) {
|
|
5174
5254
|
__extends(Workunit, _super);
|
|
5175
5255
|
// --- --- ---
|
|
@@ -5651,13 +5731,13 @@
|
|
|
5651
5731
|
Workunit.create = function (optsConnection) {
|
|
5652
5732
|
var retVal = new Workunit(optsConnection);
|
|
5653
5733
|
return retVal.connection.WUCreate().then(function (response) {
|
|
5654
|
-
_workunits.set(retVal);
|
|
5734
|
+
_workunits$1.set(retVal);
|
|
5655
5735
|
retVal.set(response.Workunit);
|
|
5656
5736
|
return retVal;
|
|
5657
5737
|
});
|
|
5658
5738
|
};
|
|
5659
5739
|
Workunit.attach = function (optsConnection, wuid, state) {
|
|
5660
|
-
var retVal = _workunits.get({ BaseUrl: optsConnection.baseUrl, Wuid: wuid }, function () {
|
|
5740
|
+
var retVal = _workunits$1.get({ BaseUrl: optsConnection.baseUrl, Wuid: wuid }, function () {
|
|
5661
5741
|
return new Workunit(optsConnection, wuid);
|
|
5662
5742
|
});
|
|
5663
5743
|
if (state) {
|
|
@@ -5666,7 +5746,7 @@
|
|
|
5666
5746
|
return retVal;
|
|
5667
5747
|
};
|
|
5668
5748
|
Workunit.existsLocal = function (baseUrl, wuid) {
|
|
5669
|
-
return _workunits.has({ BaseUrl: baseUrl, Wuid: wuid });
|
|
5749
|
+
return _workunits$1.has({ BaseUrl: baseUrl, Wuid: wuid });
|
|
5670
5750
|
};
|
|
5671
5751
|
Workunit.submit = function (server, target, ecl, compileOnly) {
|
|
5672
5752
|
if (compileOnly === void 0) { compileOnly = false; }
|
|
@@ -6185,8 +6265,8 @@
|
|
|
6185
6265
|
}
|
|
6186
6266
|
_super.prototype._monitor.call(this);
|
|
6187
6267
|
};
|
|
6188
|
-
Workunit.prototype.
|
|
6189
|
-
var retVal = _super.prototype.
|
|
6268
|
+
Workunit.prototype._monitorTimeoutDuration = function () {
|
|
6269
|
+
var retVal = _super.prototype._monitorTimeoutDuration.call(this);
|
|
6190
6270
|
if (this._monitorTickCount <= 1) { // Once
|
|
6191
6271
|
return 1000;
|
|
6192
6272
|
}
|
|
@@ -6274,7 +6354,7 @@
|
|
|
6274
6354
|
return false;
|
|
6275
6355
|
});
|
|
6276
6356
|
if (!wuMissing) {
|
|
6277
|
-
logger.warning("Unexpected exception: ");
|
|
6357
|
+
logger$1.warning("Unexpected exception: ");
|
|
6278
6358
|
throw e;
|
|
6279
6359
|
}
|
|
6280
6360
|
return {};
|
|
@@ -6284,7 +6364,7 @@
|
|
|
6284
6364
|
var _this = this;
|
|
6285
6365
|
return this.connection.WUCreate().then(function (response) {
|
|
6286
6366
|
_this.set(response.Workunit);
|
|
6287
|
-
_workunits.set(_this);
|
|
6367
|
+
_workunits$1.set(_this);
|
|
6288
6368
|
return response;
|
|
6289
6369
|
});
|
|
6290
6370
|
};
|
|
@@ -6311,7 +6391,7 @@
|
|
|
6311
6391
|
return false;
|
|
6312
6392
|
});
|
|
6313
6393
|
if (!wuMissing) {
|
|
6314
|
-
logger.warning("Unexpected exception: ");
|
|
6394
|
+
logger$1.warning("Unexpected exception: ");
|
|
6315
6395
|
throw e;
|
|
6316
6396
|
}
|
|
6317
6397
|
return {};
|
|
@@ -6400,7 +6480,7 @@
|
|
|
6400
6480
|
}
|
|
6401
6481
|
return new util.XMLNode(command);
|
|
6402
6482
|
}).catch(function (_) {
|
|
6403
|
-
logger.error(_);
|
|
6483
|
+
logger$1.error(_);
|
|
6404
6484
|
return Promise.resolve(new util.XMLNode(command));
|
|
6405
6485
|
});
|
|
6406
6486
|
};
|
|
@@ -7962,6 +8042,523 @@
|
|
|
7962
8042
|
return Topology;
|
|
7963
8043
|
}(util.StateObject));
|
|
7964
8044
|
|
|
8045
|
+
var logger = util.scopedLogger("@hpcc-js/comms/dfuWorkunit.ts");
|
|
8046
|
+
var States;
|
|
8047
|
+
(function (States) {
|
|
8048
|
+
States[States["Unknown"] = 0] = "Unknown";
|
|
8049
|
+
States[States["Scheduled"] = 1] = "Scheduled";
|
|
8050
|
+
States[States["Queued"] = 2] = "Queued";
|
|
8051
|
+
States[States["Started"] = 3] = "Started";
|
|
8052
|
+
States[States["Aborted"] = 4] = "Aborted";
|
|
8053
|
+
States[States["Failed"] = 5] = "Failed";
|
|
8054
|
+
States[States["Finished"] = 6] = "Finished";
|
|
8055
|
+
States[States["Monitoring"] = 7] = "Monitoring";
|
|
8056
|
+
States[States["Aborting"] = 8] = "Aborting";
|
|
8057
|
+
States[States["NotFound"] = 999] = "NotFound";
|
|
8058
|
+
})(States || (States = {}));
|
|
8059
|
+
var DFUWorkunitCache = /** @class */ (function (_super) {
|
|
8060
|
+
__extends(DFUWorkunitCache, _super);
|
|
8061
|
+
function DFUWorkunitCache() {
|
|
8062
|
+
return _super.call(this, function (obj) {
|
|
8063
|
+
return "".concat(obj.BaseUrl, "-").concat(obj.ID);
|
|
8064
|
+
}) || this;
|
|
8065
|
+
}
|
|
8066
|
+
return DFUWorkunitCache;
|
|
8067
|
+
}(util.Cache));
|
|
8068
|
+
var _workunits = new DFUWorkunitCache();
|
|
8069
|
+
var DFUWorkunit = /** @class */ (function (_super) {
|
|
8070
|
+
__extends(DFUWorkunit, _super);
|
|
8071
|
+
// --- --- ---
|
|
8072
|
+
function DFUWorkunit(optsConnection, wuid) {
|
|
8073
|
+
var _this = _super.call(this) || this;
|
|
8074
|
+
_this.connection = new FileSprayService(optsConnection);
|
|
8075
|
+
_this.topologyConnection = new TopologyService(optsConnection);
|
|
8076
|
+
_this.clearState(wuid);
|
|
8077
|
+
return _this;
|
|
8078
|
+
}
|
|
8079
|
+
Object.defineProperty(DFUWorkunit.prototype, "BaseUrl", {
|
|
8080
|
+
get: function () { return this.connection.baseUrl; },
|
|
8081
|
+
enumerable: false,
|
|
8082
|
+
configurable: true
|
|
8083
|
+
});
|
|
8084
|
+
Object.defineProperty(DFUWorkunit.prototype, "properties", {
|
|
8085
|
+
// Accessors ---
|
|
8086
|
+
get: function () { return this.get(); },
|
|
8087
|
+
enumerable: false,
|
|
8088
|
+
configurable: true
|
|
8089
|
+
});
|
|
8090
|
+
Object.defineProperty(DFUWorkunit.prototype, "ID", {
|
|
8091
|
+
get: function () { return this.get("ID"); },
|
|
8092
|
+
enumerable: false,
|
|
8093
|
+
configurable: true
|
|
8094
|
+
});
|
|
8095
|
+
Object.defineProperty(DFUWorkunit.prototype, "DFUServerName", {
|
|
8096
|
+
get: function () { return this.get("DFUServerName"); },
|
|
8097
|
+
enumerable: false,
|
|
8098
|
+
configurable: true
|
|
8099
|
+
});
|
|
8100
|
+
Object.defineProperty(DFUWorkunit.prototype, "ClusterName", {
|
|
8101
|
+
get: function () { return this.get("ClusterName"); },
|
|
8102
|
+
enumerable: false,
|
|
8103
|
+
configurable: true
|
|
8104
|
+
});
|
|
8105
|
+
Object.defineProperty(DFUWorkunit.prototype, "JobName", {
|
|
8106
|
+
get: function () { return this.get("JobName"); },
|
|
8107
|
+
enumerable: false,
|
|
8108
|
+
configurable: true
|
|
8109
|
+
});
|
|
8110
|
+
Object.defineProperty(DFUWorkunit.prototype, "Queue", {
|
|
8111
|
+
get: function () { return this.get("Queue"); },
|
|
8112
|
+
enumerable: false,
|
|
8113
|
+
configurable: true
|
|
8114
|
+
});
|
|
8115
|
+
Object.defineProperty(DFUWorkunit.prototype, "User", {
|
|
8116
|
+
get: function () { return this.get("User"); },
|
|
8117
|
+
enumerable: false,
|
|
8118
|
+
configurable: true
|
|
8119
|
+
});
|
|
8120
|
+
Object.defineProperty(DFUWorkunit.prototype, "isProtected", {
|
|
8121
|
+
get: function () { return this.get("isProtected"); },
|
|
8122
|
+
enumerable: false,
|
|
8123
|
+
configurable: true
|
|
8124
|
+
});
|
|
8125
|
+
Object.defineProperty(DFUWorkunit.prototype, "Command", {
|
|
8126
|
+
get: function () { return this.get("Command"); },
|
|
8127
|
+
enumerable: false,
|
|
8128
|
+
configurable: true
|
|
8129
|
+
});
|
|
8130
|
+
Object.defineProperty(DFUWorkunit.prototype, "CommandMessage", {
|
|
8131
|
+
get: function () { return this.get("CommandMessage"); },
|
|
8132
|
+
enumerable: false,
|
|
8133
|
+
configurable: true
|
|
8134
|
+
});
|
|
8135
|
+
Object.defineProperty(DFUWorkunit.prototype, "PercentDone", {
|
|
8136
|
+
get: function () { return this.get("PercentDone"); },
|
|
8137
|
+
enumerable: false,
|
|
8138
|
+
configurable: true
|
|
8139
|
+
});
|
|
8140
|
+
Object.defineProperty(DFUWorkunit.prototype, "SecsLeft", {
|
|
8141
|
+
get: function () { return this.get("SecsLeft"); },
|
|
8142
|
+
enumerable: false,
|
|
8143
|
+
configurable: true
|
|
8144
|
+
});
|
|
8145
|
+
Object.defineProperty(DFUWorkunit.prototype, "ProgressMessage", {
|
|
8146
|
+
get: function () { return this.get("ProgressMessage"); },
|
|
8147
|
+
enumerable: false,
|
|
8148
|
+
configurable: true
|
|
8149
|
+
});
|
|
8150
|
+
Object.defineProperty(DFUWorkunit.prototype, "SummaryMessage", {
|
|
8151
|
+
get: function () { return this.get("SummaryMessage"); },
|
|
8152
|
+
enumerable: false,
|
|
8153
|
+
configurable: true
|
|
8154
|
+
});
|
|
8155
|
+
Object.defineProperty(DFUWorkunit.prototype, "State", {
|
|
8156
|
+
get: function () { return this.get("State", States.Unknown); },
|
|
8157
|
+
enumerable: false,
|
|
8158
|
+
configurable: true
|
|
8159
|
+
});
|
|
8160
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceLogicalName", {
|
|
8161
|
+
get: function () { return this.get("SourceLogicalName"); },
|
|
8162
|
+
enumerable: false,
|
|
8163
|
+
configurable: true
|
|
8164
|
+
});
|
|
8165
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceIP", {
|
|
8166
|
+
get: function () { return this.get("SourceIP"); },
|
|
8167
|
+
enumerable: false,
|
|
8168
|
+
configurable: true
|
|
8169
|
+
});
|
|
8170
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceFilePath", {
|
|
8171
|
+
get: function () { return this.get("SourceFilePath"); },
|
|
8172
|
+
enumerable: false,
|
|
8173
|
+
configurable: true
|
|
8174
|
+
});
|
|
8175
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceDali", {
|
|
8176
|
+
get: function () { return this.get("SourceDali"); },
|
|
8177
|
+
enumerable: false,
|
|
8178
|
+
configurable: true
|
|
8179
|
+
});
|
|
8180
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceRecordSize", {
|
|
8181
|
+
get: function () { return this.get("SourceRecordSize"); },
|
|
8182
|
+
enumerable: false,
|
|
8183
|
+
configurable: true
|
|
8184
|
+
});
|
|
8185
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceFormat", {
|
|
8186
|
+
get: function () { return this.get("SourceFormat"); },
|
|
8187
|
+
enumerable: false,
|
|
8188
|
+
configurable: true
|
|
8189
|
+
});
|
|
8190
|
+
Object.defineProperty(DFUWorkunit.prototype, "RowTag", {
|
|
8191
|
+
get: function () { return this.get("RowTag"); },
|
|
8192
|
+
enumerable: false,
|
|
8193
|
+
configurable: true
|
|
8194
|
+
});
|
|
8195
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceNumParts", {
|
|
8196
|
+
get: function () { return this.get("SourceNumParts"); },
|
|
8197
|
+
enumerable: false,
|
|
8198
|
+
configurable: true
|
|
8199
|
+
});
|
|
8200
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceDirectory", {
|
|
8201
|
+
get: function () { return this.get("SourceDirectory"); },
|
|
8202
|
+
enumerable: false,
|
|
8203
|
+
configurable: true
|
|
8204
|
+
});
|
|
8205
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestLogicalName", {
|
|
8206
|
+
get: function () { return this.get("DestLogicalName"); },
|
|
8207
|
+
enumerable: false,
|
|
8208
|
+
configurable: true
|
|
8209
|
+
});
|
|
8210
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestGroupName", {
|
|
8211
|
+
get: function () { return this.get("DestGroupName"); },
|
|
8212
|
+
enumerable: false,
|
|
8213
|
+
configurable: true
|
|
8214
|
+
});
|
|
8215
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestDirectory", {
|
|
8216
|
+
get: function () { return this.get("DestDirectory"); },
|
|
8217
|
+
enumerable: false,
|
|
8218
|
+
configurable: true
|
|
8219
|
+
});
|
|
8220
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestIP", {
|
|
8221
|
+
get: function () { return this.get("DestIP"); },
|
|
8222
|
+
enumerable: false,
|
|
8223
|
+
configurable: true
|
|
8224
|
+
});
|
|
8225
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestFilePath", {
|
|
8226
|
+
get: function () { return this.get("DestFilePath"); },
|
|
8227
|
+
enumerable: false,
|
|
8228
|
+
configurable: true
|
|
8229
|
+
});
|
|
8230
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestFormat", {
|
|
8231
|
+
get: function () { return this.get("DestFormat"); },
|
|
8232
|
+
enumerable: false,
|
|
8233
|
+
configurable: true
|
|
8234
|
+
});
|
|
8235
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestNumParts", {
|
|
8236
|
+
get: function () { return this.get("DestNumParts"); },
|
|
8237
|
+
enumerable: false,
|
|
8238
|
+
configurable: true
|
|
8239
|
+
});
|
|
8240
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestRecordSize", {
|
|
8241
|
+
get: function () { return this.get("DestRecordSize"); },
|
|
8242
|
+
enumerable: false,
|
|
8243
|
+
configurable: true
|
|
8244
|
+
});
|
|
8245
|
+
Object.defineProperty(DFUWorkunit.prototype, "Replicate", {
|
|
8246
|
+
get: function () { return this.get("Replicate"); },
|
|
8247
|
+
enumerable: false,
|
|
8248
|
+
configurable: true
|
|
8249
|
+
});
|
|
8250
|
+
Object.defineProperty(DFUWorkunit.prototype, "Overwrite", {
|
|
8251
|
+
get: function () { return this.get("Overwrite"); },
|
|
8252
|
+
enumerable: false,
|
|
8253
|
+
configurable: true
|
|
8254
|
+
});
|
|
8255
|
+
Object.defineProperty(DFUWorkunit.prototype, "Compress", {
|
|
8256
|
+
get: function () { return this.get("Compress"); },
|
|
8257
|
+
enumerable: false,
|
|
8258
|
+
configurable: true
|
|
8259
|
+
});
|
|
8260
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceCsvSeparate", {
|
|
8261
|
+
get: function () { return this.get("SourceCsvSeparate"); },
|
|
8262
|
+
enumerable: false,
|
|
8263
|
+
configurable: true
|
|
8264
|
+
});
|
|
8265
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceCsvQuote", {
|
|
8266
|
+
get: function () { return this.get("SourceCsvQuote"); },
|
|
8267
|
+
enumerable: false,
|
|
8268
|
+
configurable: true
|
|
8269
|
+
});
|
|
8270
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceCsvTerminate", {
|
|
8271
|
+
get: function () { return this.get("SourceCsvTerminate"); },
|
|
8272
|
+
enumerable: false,
|
|
8273
|
+
configurable: true
|
|
8274
|
+
});
|
|
8275
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceCsvEscape", {
|
|
8276
|
+
get: function () { return this.get("SourceCsvEscape"); },
|
|
8277
|
+
enumerable: false,
|
|
8278
|
+
configurable: true
|
|
8279
|
+
});
|
|
8280
|
+
Object.defineProperty(DFUWorkunit.prototype, "TimeStarted", {
|
|
8281
|
+
get: function () { return this.get("TimeStarted"); },
|
|
8282
|
+
enumerable: false,
|
|
8283
|
+
configurable: true
|
|
8284
|
+
});
|
|
8285
|
+
Object.defineProperty(DFUWorkunit.prototype, "TimeStopped", {
|
|
8286
|
+
get: function () { return this.get("TimeStopped"); },
|
|
8287
|
+
enumerable: false,
|
|
8288
|
+
configurable: true
|
|
8289
|
+
});
|
|
8290
|
+
Object.defineProperty(DFUWorkunit.prototype, "StateMessage", {
|
|
8291
|
+
get: function () { return this.get("StateMessage"); },
|
|
8292
|
+
enumerable: false,
|
|
8293
|
+
configurable: true
|
|
8294
|
+
});
|
|
8295
|
+
Object.defineProperty(DFUWorkunit.prototype, "MonitorEventName", {
|
|
8296
|
+
get: function () { return this.get("MonitorEventName"); },
|
|
8297
|
+
enumerable: false,
|
|
8298
|
+
configurable: true
|
|
8299
|
+
});
|
|
8300
|
+
Object.defineProperty(DFUWorkunit.prototype, "MonitorSub", {
|
|
8301
|
+
get: function () { return this.get("MonitorSub"); },
|
|
8302
|
+
enumerable: false,
|
|
8303
|
+
configurable: true
|
|
8304
|
+
});
|
|
8305
|
+
Object.defineProperty(DFUWorkunit.prototype, "MonitorShotLimit", {
|
|
8306
|
+
get: function () { return this.get("MonitorShotLimit"); },
|
|
8307
|
+
enumerable: false,
|
|
8308
|
+
configurable: true
|
|
8309
|
+
});
|
|
8310
|
+
Object.defineProperty(DFUWorkunit.prototype, "SourceDiffKeyName", {
|
|
8311
|
+
get: function () { return this.get("SourceDiffKeyName"); },
|
|
8312
|
+
enumerable: false,
|
|
8313
|
+
configurable: true
|
|
8314
|
+
});
|
|
8315
|
+
Object.defineProperty(DFUWorkunit.prototype, "DestDiffKeyName", {
|
|
8316
|
+
get: function () { return this.get("DestDiffKeyName"); },
|
|
8317
|
+
enumerable: false,
|
|
8318
|
+
configurable: true
|
|
8319
|
+
});
|
|
8320
|
+
Object.defineProperty(DFUWorkunit.prototype, "Archived", {
|
|
8321
|
+
get: function () { return this.get("Archived"); },
|
|
8322
|
+
enumerable: false,
|
|
8323
|
+
configurable: true
|
|
8324
|
+
});
|
|
8325
|
+
Object.defineProperty(DFUWorkunit.prototype, "encrypt", {
|
|
8326
|
+
get: function () { return this.get("encrypt"); },
|
|
8327
|
+
enumerable: false,
|
|
8328
|
+
configurable: true
|
|
8329
|
+
});
|
|
8330
|
+
Object.defineProperty(DFUWorkunit.prototype, "decrypt", {
|
|
8331
|
+
get: function () { return this.get("decrypt"); },
|
|
8332
|
+
enumerable: false,
|
|
8333
|
+
configurable: true
|
|
8334
|
+
});
|
|
8335
|
+
Object.defineProperty(DFUWorkunit.prototype, "failIfNoSourceFile", {
|
|
8336
|
+
get: function () { return this.get("failIfNoSourceFile"); },
|
|
8337
|
+
enumerable: false,
|
|
8338
|
+
configurable: true
|
|
8339
|
+
});
|
|
8340
|
+
Object.defineProperty(DFUWorkunit.prototype, "recordStructurePresent", {
|
|
8341
|
+
get: function () { return this.get("recordStructurePresent"); },
|
|
8342
|
+
enumerable: false,
|
|
8343
|
+
configurable: true
|
|
8344
|
+
});
|
|
8345
|
+
Object.defineProperty(DFUWorkunit.prototype, "quotedTerminator", {
|
|
8346
|
+
get: function () { return this.get("quotedTerminator"); },
|
|
8347
|
+
enumerable: false,
|
|
8348
|
+
configurable: true
|
|
8349
|
+
});
|
|
8350
|
+
Object.defineProperty(DFUWorkunit.prototype, "preserveCompression", {
|
|
8351
|
+
get: function () { return this.get("preserveCompression"); },
|
|
8352
|
+
enumerable: false,
|
|
8353
|
+
configurable: true
|
|
8354
|
+
});
|
|
8355
|
+
Object.defineProperty(DFUWorkunit.prototype, "expireDays", {
|
|
8356
|
+
get: function () { return this.get("expireDays"); },
|
|
8357
|
+
enumerable: false,
|
|
8358
|
+
configurable: true
|
|
8359
|
+
});
|
|
8360
|
+
Object.defineProperty(DFUWorkunit.prototype, "PreserveFileParts", {
|
|
8361
|
+
get: function () { return this.get("PreserveFileParts"); },
|
|
8362
|
+
enumerable: false,
|
|
8363
|
+
configurable: true
|
|
8364
|
+
});
|
|
8365
|
+
Object.defineProperty(DFUWorkunit.prototype, "FileAccessCost", {
|
|
8366
|
+
get: function () { return this.get("FileAccessCost"); },
|
|
8367
|
+
enumerable: false,
|
|
8368
|
+
configurable: true
|
|
8369
|
+
});
|
|
8370
|
+
// Factories ---
|
|
8371
|
+
DFUWorkunit.create = function (optsConnection, dfuServerQueue) {
|
|
8372
|
+
var retVal = new DFUWorkunit(optsConnection);
|
|
8373
|
+
return retVal.connection.CreateDFUWorkunit({ DFUServerQueue: dfuServerQueue }).then(function (response) {
|
|
8374
|
+
_workunits.set(retVal);
|
|
8375
|
+
retVal.set(response.result);
|
|
8376
|
+
return retVal;
|
|
8377
|
+
});
|
|
8378
|
+
};
|
|
8379
|
+
DFUWorkunit.attach = function (optsConnection, wuid, state) {
|
|
8380
|
+
var retVal = _workunits.get({ BaseUrl: optsConnection.baseUrl, ID: wuid }, function () {
|
|
8381
|
+
return new DFUWorkunit(optsConnection, wuid);
|
|
8382
|
+
});
|
|
8383
|
+
if (state) {
|
|
8384
|
+
retVal.set(state);
|
|
8385
|
+
}
|
|
8386
|
+
return retVal;
|
|
8387
|
+
};
|
|
8388
|
+
DFUWorkunit.sprayFixed = function (server, request) {
|
|
8389
|
+
var service = new FileSprayService(server);
|
|
8390
|
+
return service.SprayFixedEx(__assign({}, request)).then(function (response) {
|
|
8391
|
+
var wuid = response.wuid;
|
|
8392
|
+
return service.GetDFUWorkunit({ wuid: wuid }).then(function (response) {
|
|
8393
|
+
return DFUWorkunit.attach(server, wuid, response.result);
|
|
8394
|
+
});
|
|
8395
|
+
});
|
|
8396
|
+
};
|
|
8397
|
+
DFUWorkunit.sprayVariable = function (server, request) {
|
|
8398
|
+
var service = new FileSprayService(server);
|
|
8399
|
+
return service.SprayVariableEx(__assign({}, request)).then(function (response) {
|
|
8400
|
+
var wuid = response.wuid;
|
|
8401
|
+
return service.GetDFUWorkunit({ wuid: wuid }).then(function (response) {
|
|
8402
|
+
return DFUWorkunit.attach(server, wuid, response.result);
|
|
8403
|
+
});
|
|
8404
|
+
});
|
|
8405
|
+
};
|
|
8406
|
+
DFUWorkunit.despray = function (server, request) {
|
|
8407
|
+
var service = new FileSprayService(server);
|
|
8408
|
+
return service.DesprayEx(__assign({}, request)).then(function (response) {
|
|
8409
|
+
var wuid = response.wuid;
|
|
8410
|
+
return service.GetDFUWorkunit({ wuid: wuid }).then(function (response) {
|
|
8411
|
+
return DFUWorkunit.attach(server, wuid, response.result);
|
|
8412
|
+
});
|
|
8413
|
+
});
|
|
8414
|
+
};
|
|
8415
|
+
DFUWorkunit.prototype.isComplete = function () {
|
|
8416
|
+
switch (this.State) {
|
|
8417
|
+
case States.Finished:
|
|
8418
|
+
case States.Failed:
|
|
8419
|
+
case States.Aborted:
|
|
8420
|
+
case States.NotFound:
|
|
8421
|
+
return true;
|
|
8422
|
+
}
|
|
8423
|
+
return false;
|
|
8424
|
+
};
|
|
8425
|
+
DFUWorkunit.prototype.isFailed = function () {
|
|
8426
|
+
if (this.isComplete() && this.State !== States.Finished) {
|
|
8427
|
+
return true;
|
|
8428
|
+
}
|
|
8429
|
+
return false;
|
|
8430
|
+
};
|
|
8431
|
+
DFUWorkunit.prototype.isDeleted = function () {
|
|
8432
|
+
switch (this.State) {
|
|
8433
|
+
case States.NotFound:
|
|
8434
|
+
return true;
|
|
8435
|
+
}
|
|
8436
|
+
return false;
|
|
8437
|
+
};
|
|
8438
|
+
DFUWorkunit.prototype.isRunning = function () {
|
|
8439
|
+
return !this.isComplete();
|
|
8440
|
+
};
|
|
8441
|
+
DFUWorkunit.prototype.refresh = function (full) {
|
|
8442
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8443
|
+
return __generator(this, function (_a) {
|
|
8444
|
+
switch (_a.label) {
|
|
8445
|
+
case 0: return [4 /*yield*/, this.GetDFUWorkunit()];
|
|
8446
|
+
case 1:
|
|
8447
|
+
_a.sent();
|
|
8448
|
+
return [2 /*return*/, this];
|
|
8449
|
+
}
|
|
8450
|
+
});
|
|
8451
|
+
});
|
|
8452
|
+
};
|
|
8453
|
+
// Monitoring ---
|
|
8454
|
+
DFUWorkunit.prototype._monitor = function () {
|
|
8455
|
+
if (this.isComplete()) {
|
|
8456
|
+
this._monitorTickCount = 0;
|
|
8457
|
+
return;
|
|
8458
|
+
}
|
|
8459
|
+
_super.prototype._monitor.call(this);
|
|
8460
|
+
};
|
|
8461
|
+
DFUWorkunit.prototype._monitorTimeoutDuration = function () {
|
|
8462
|
+
var retVal = _super.prototype._monitorTimeoutDuration.call(this);
|
|
8463
|
+
if (this._monitorTickCount <= 1) { // Once
|
|
8464
|
+
return 3000;
|
|
8465
|
+
}
|
|
8466
|
+
else if (this._monitorTickCount <= 5) { // Twice
|
|
8467
|
+
return 6000;
|
|
8468
|
+
}
|
|
8469
|
+
else if (this._monitorTickCount <= 7) { // Twice
|
|
8470
|
+
return 12000;
|
|
8471
|
+
}
|
|
8472
|
+
return retVal;
|
|
8473
|
+
};
|
|
8474
|
+
// Events ---
|
|
8475
|
+
DFUWorkunit.prototype.on = function (eventID, propIDorCallback, callback) {
|
|
8476
|
+
var _this = this;
|
|
8477
|
+
if (this.isCallback(propIDorCallback)) {
|
|
8478
|
+
switch (eventID) {
|
|
8479
|
+
case "finished":
|
|
8480
|
+
_super.prototype.on.call(this, "propChanged", "State", function (changeInfo) {
|
|
8481
|
+
if (_this.isComplete()) {
|
|
8482
|
+
propIDorCallback([changeInfo]);
|
|
8483
|
+
}
|
|
8484
|
+
});
|
|
8485
|
+
break;
|
|
8486
|
+
case "changed":
|
|
8487
|
+
_super.prototype.on.call(this, eventID, propIDorCallback);
|
|
8488
|
+
break;
|
|
8489
|
+
}
|
|
8490
|
+
}
|
|
8491
|
+
else {
|
|
8492
|
+
switch (eventID) {
|
|
8493
|
+
case "changed":
|
|
8494
|
+
_super.prototype.on.call(this, eventID, propIDorCallback, callback);
|
|
8495
|
+
break;
|
|
8496
|
+
}
|
|
8497
|
+
}
|
|
8498
|
+
this._monitor();
|
|
8499
|
+
return this;
|
|
8500
|
+
};
|
|
8501
|
+
DFUWorkunit.prototype.watchUntilComplete = function (callback) {
|
|
8502
|
+
var _this = this;
|
|
8503
|
+
return new Promise(function (resolve, _) {
|
|
8504
|
+
var watchHandle = _this.watch(function (changes) {
|
|
8505
|
+
if (callback) {
|
|
8506
|
+
callback(changes);
|
|
8507
|
+
}
|
|
8508
|
+
if (_this.isComplete()) {
|
|
8509
|
+
watchHandle.release();
|
|
8510
|
+
resolve(_this);
|
|
8511
|
+
}
|
|
8512
|
+
});
|
|
8513
|
+
});
|
|
8514
|
+
};
|
|
8515
|
+
DFUWorkunit.prototype.watchUntilRunning = function (callback) {
|
|
8516
|
+
var _this = this;
|
|
8517
|
+
return new Promise(function (resolve, _) {
|
|
8518
|
+
var watchHandle = _this.watch(function (changes) {
|
|
8519
|
+
if (callback) {
|
|
8520
|
+
callback(changes);
|
|
8521
|
+
}
|
|
8522
|
+
if (_this.isComplete() || _this.isRunning()) {
|
|
8523
|
+
watchHandle.release();
|
|
8524
|
+
resolve(_this);
|
|
8525
|
+
}
|
|
8526
|
+
});
|
|
8527
|
+
});
|
|
8528
|
+
};
|
|
8529
|
+
DFUWorkunit.prototype.clearState = function (wuid) {
|
|
8530
|
+
this.clear({
|
|
8531
|
+
ID: wuid,
|
|
8532
|
+
State: States.Unknown
|
|
8533
|
+
});
|
|
8534
|
+
};
|
|
8535
|
+
// FileSpray passthroughs ---
|
|
8536
|
+
DFUWorkunit.prototype.GetDFUWorkunit = function (_request) {
|
|
8537
|
+
var _this = this;
|
|
8538
|
+
if (_request === void 0) { _request = {}; }
|
|
8539
|
+
return this.connection.GetDFUWorkunit(__assign(__assign({}, _request), { wuid: this.ID })).then(function (response) {
|
|
8540
|
+
_this.set(response.result);
|
|
8541
|
+
return response;
|
|
8542
|
+
}).catch(function (e) {
|
|
8543
|
+
// deleted ---
|
|
8544
|
+
var wuMissing = e.Exception.some(function (exception) {
|
|
8545
|
+
if (exception.Code === 20081) {
|
|
8546
|
+
_this.clearState(_this.ID);
|
|
8547
|
+
_this.set("State", States.NotFound);
|
|
8548
|
+
return true;
|
|
8549
|
+
}
|
|
8550
|
+
return false;
|
|
8551
|
+
});
|
|
8552
|
+
if (!wuMissing) {
|
|
8553
|
+
logger.warning("Unexpected exception: ");
|
|
8554
|
+
throw e;
|
|
8555
|
+
}
|
|
8556
|
+
return {};
|
|
8557
|
+
});
|
|
8558
|
+
};
|
|
8559
|
+
return DFUWorkunit;
|
|
8560
|
+
}(util.StateObject));
|
|
8561
|
+
|
|
7965
8562
|
exports.AccessService = AccessService;
|
|
7966
8563
|
exports.AccountService = AccountService;
|
|
7967
8564
|
exports.Activity = Activity;
|
|
@@ -7976,6 +8573,8 @@
|
|
|
7976
8573
|
exports.DFUChangeRestriction = DFUChangeRestriction;
|
|
7977
8574
|
exports.DFUDefFileFormat = DFUDefFileFormat;
|
|
7978
8575
|
exports.DFUService = DFUService;
|
|
8576
|
+
exports.DFUWorkunit = DFUWorkunit;
|
|
8577
|
+
exports.DFUWorkunitCache = DFUWorkunitCache;
|
|
7979
8578
|
exports.DFUXRefService = DFUXRefService;
|
|
7980
8579
|
exports.DaliService = DaliService;
|
|
7981
8580
|
exports.ECLGraph = ECLGraph;
|