@nsshunt/stsrunnerframework 1.0.53 → 1.0.55
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/stsrunnerframework.mjs +137 -36
- package/dist/stsrunnerframework.mjs.map +1 -1
- package/dist/stsrunnerframework.umd.js +137 -36
- package/dist/stsrunnerframework.umd.js.map +1 -1
- package/package.json +12 -12
- package/types/commonTypes.d.ts +5 -0
- package/types/commonTypes.d.ts.map +1 -1
- package/types/rest01Client.d.ts +1 -0
- package/types/rest01Client.d.ts.map +1 -1
- package/types/telemetryProcessor.d.ts.map +1 -1
- package/types/testCase01.d.ts.map +1 -1
- package/types/workerInstance.d.ts.map +1 -1
- package/types/workerManager.d.ts.map +1 -1
- package/types/workerWorkerTestRunner01.d.ts.map +1 -1
- package/types/workerWorkerTestRunner01Agent.d.ts.map +1 -1
|
@@ -1807,21 +1807,6 @@ const noop = () => {
|
|
|
1807
1807
|
const toFiniteNumber = (value2, defaultValue) => {
|
|
1808
1808
|
return value2 != null && Number.isFinite(value2 = +value2) ? value2 : defaultValue;
|
|
1809
1809
|
};
|
|
1810
|
-
const ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
1811
|
-
const DIGIT = "0123456789";
|
|
1812
|
-
const ALPHABET = {
|
|
1813
|
-
DIGIT,
|
|
1814
|
-
ALPHA,
|
|
1815
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
1816
|
-
};
|
|
1817
|
-
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
1818
|
-
let str = "";
|
|
1819
|
-
const { length } = alphabet;
|
|
1820
|
-
while (size--) {
|
|
1821
|
-
str += alphabet[Math.random() * length | 0];
|
|
1822
|
-
}
|
|
1823
|
-
return str;
|
|
1824
|
-
};
|
|
1825
1810
|
function isSpecCompliantForm(thing) {
|
|
1826
1811
|
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
|
|
1827
1812
|
}
|
|
@@ -1920,8 +1905,6 @@ const utils$3 = {
|
|
|
1920
1905
|
findKey,
|
|
1921
1906
|
global: _global,
|
|
1922
1907
|
isContextDefined,
|
|
1923
|
-
ALPHABET,
|
|
1924
|
-
generateString,
|
|
1925
1908
|
isSpecCompliantForm,
|
|
1926
1909
|
toJSONObject,
|
|
1927
1910
|
isAsyncFn,
|
|
@@ -2877,8 +2860,9 @@ function isAbsoluteURL(url) {
|
|
|
2877
2860
|
function combineURLs(baseURL, relativeURL) {
|
|
2878
2861
|
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
2879
2862
|
}
|
|
2880
|
-
function buildFullPath(baseURL, requestedURL) {
|
|
2881
|
-
|
|
2863
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
2864
|
+
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
2865
|
+
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
|
2882
2866
|
return combineURLs(baseURL, requestedURL);
|
|
2883
2867
|
}
|
|
2884
2868
|
return requestedURL;
|
|
@@ -3482,7 +3466,7 @@ function dispatchRequest(config2) {
|
|
|
3482
3466
|
return Promise.reject(reason);
|
|
3483
3467
|
});
|
|
3484
3468
|
}
|
|
3485
|
-
const VERSION$1 = "1.
|
|
3469
|
+
const VERSION$1 = "1.8.1";
|
|
3486
3470
|
const validators$2 = {};
|
|
3487
3471
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
3488
3472
|
validators$2[type] = function validator2(thing) {
|
|
@@ -3610,6 +3594,12 @@ let Axios$1 = class Axios {
|
|
|
3610
3594
|
}, true);
|
|
3611
3595
|
}
|
|
3612
3596
|
}
|
|
3597
|
+
if (config2.allowAbsoluteUrls !== void 0) ;
|
|
3598
|
+
else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
3599
|
+
config2.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
3600
|
+
} else {
|
|
3601
|
+
config2.allowAbsoluteUrls = true;
|
|
3602
|
+
}
|
|
3613
3603
|
validator.assertOptions(config2, {
|
|
3614
3604
|
baseUrl: validators$1.spelling("baseURL"),
|
|
3615
3605
|
withXsrfToken: validators$1.spelling("withXSRFToken")
|
|
@@ -3680,7 +3670,7 @@ let Axios$1 = class Axios {
|
|
|
3680
3670
|
}
|
|
3681
3671
|
getUri(config2) {
|
|
3682
3672
|
config2 = mergeConfig$1(this.defaults, config2);
|
|
3683
|
-
const fullPath = buildFullPath(config2.baseURL, config2.url);
|
|
3673
|
+
const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);
|
|
3684
3674
|
return buildURL(fullPath, config2.params, config2.paramsSerializer);
|
|
3685
3675
|
}
|
|
3686
3676
|
};
|
|
@@ -3938,7 +3928,7 @@ var __accessCheck$1 = (obj, member, msg) => member.has(obj) || __typeError$1("Ca
|
|
|
3938
3928
|
var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
3939
3929
|
var __privateAdd$1 = (obj, member, value2) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value2);
|
|
3940
3930
|
var __privateSet$1 = (obj, member, value2, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value2), value2);
|
|
3941
|
-
var _options, _DUMMY_USER, _invokeMethods, _maxRetries, _sleepDuration, _NoRetryStatusCodes, _accessToken, _noRetries, _LogDebugMessage, _LogErrorMessage, _TestMode, ___InvokeResourceAPI, _axiosClient, _options2$1;
|
|
3931
|
+
var _options, _DUMMY_USER, _invokeMethods, _maxRetries, _sleepDuration, _NoRetryStatusCodes, _accessToken, _noRetries, _LogDebugMessage, _LogErrorMessage, _TestMode, ___InvokeResourceAPI, _axiosClient, _options2$1, _checkResName;
|
|
3942
3932
|
function getDefaultExportFromCjs(x) {
|
|
3943
3933
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
3944
3934
|
}
|
|
@@ -7676,6 +7666,18 @@ class STSRest01Client {
|
|
|
7676
7666
|
var _a;
|
|
7677
7667
|
return ((_a = await this.PostResourceDBR(resource, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
|
|
7678
7668
|
});
|
|
7669
|
+
__publicField$1(this, "PutResourcesAR", async (resources, errorCb) => {
|
|
7670
|
+
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources`;
|
|
7671
|
+
return await __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "put", resources, null, null, errorCb);
|
|
7672
|
+
});
|
|
7673
|
+
__publicField$1(this, "PutResourcesDBR", async (resources, errorCb) => {
|
|
7674
|
+
var _a;
|
|
7675
|
+
return ((_a = await this.PutResourcesAR(resources, errorCb)) == null ? void 0 : _a.data.map((r) => r.detail)) ?? null;
|
|
7676
|
+
});
|
|
7677
|
+
__publicField$1(this, "PutResources", async (resources, errorCb) => {
|
|
7678
|
+
var _a;
|
|
7679
|
+
return ((_a = await this.PutResourcesDBR(resources, errorCb)) == null ? void 0 : _a.map((r) => r.resdesc)) ?? null;
|
|
7680
|
+
});
|
|
7679
7681
|
__publicField$1(this, "PutResourceAR", async (resource, errorCb) => {
|
|
7680
7682
|
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${resource.resname}`;
|
|
7681
7683
|
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "put", resource, null, null, errorCb);
|
|
@@ -7688,6 +7690,18 @@ class STSRest01Client {
|
|
|
7688
7690
|
var _a;
|
|
7689
7691
|
return ((_a = await this.PutResourceDBR(resource, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
|
|
7690
7692
|
});
|
|
7693
|
+
__publicField$1(this, "PatchResourcesAR", async (resources, errorCb) => {
|
|
7694
|
+
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources`;
|
|
7695
|
+
return await __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "patch", resources, null, null, errorCb);
|
|
7696
|
+
});
|
|
7697
|
+
__publicField$1(this, "PatchResourcesDBR", async (resources, errorCb) => {
|
|
7698
|
+
var _a;
|
|
7699
|
+
return ((_a = await this.PatchResourcesAR(resources, errorCb)) == null ? void 0 : _a.data.map((r) => r.detail)) ?? null;
|
|
7700
|
+
});
|
|
7701
|
+
__publicField$1(this, "PatchResources", async (resources, errorCb) => {
|
|
7702
|
+
var _a;
|
|
7703
|
+
return ((_a = await this.PatchResourcesDBR(resources, errorCb)) == null ? void 0 : _a.map((r) => r.resdesc)) ?? null;
|
|
7704
|
+
});
|
|
7691
7705
|
__publicField$1(this, "PatchResourceAR", async (resource, errorCb) => {
|
|
7692
7706
|
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${resource.resname}`;
|
|
7693
7707
|
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "patch", resource, null, null, errorCb);
|
|
@@ -7700,6 +7714,18 @@ class STSRest01Client {
|
|
|
7700
7714
|
var _a;
|
|
7701
7715
|
return ((_a = await this.PatchResourceDBR(resource, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
|
|
7702
7716
|
});
|
|
7717
|
+
__publicField$1(this, "DeleteResourcesAR", async (resources, errorCb) => {
|
|
7718
|
+
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources`;
|
|
7719
|
+
return await __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "delete", resources, null, null, errorCb);
|
|
7720
|
+
});
|
|
7721
|
+
__publicField$1(this, "DeleteResourcesDBR", async (resources, errorCb) => {
|
|
7722
|
+
var _a;
|
|
7723
|
+
return ((_a = await this.DeleteResourcesAR(resources, errorCb)) == null ? void 0 : _a.data.map((r) => r.detail)) ?? null;
|
|
7724
|
+
});
|
|
7725
|
+
__publicField$1(this, "DeleteResources", async (resources, errorCb) => {
|
|
7726
|
+
var _a;
|
|
7727
|
+
return ((_a = await this.DeleteResourcesDBR(resources, errorCb)) == null ? void 0 : _a.map((r) => r.resdesc)) ?? null;
|
|
7728
|
+
});
|
|
7703
7729
|
__publicField$1(this, "DeleteResourceAR", async (resource, errorCb) => {
|
|
7704
7730
|
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${resource.resname}`;
|
|
7705
7731
|
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "delete", resource, null, null, errorCb);
|
|
@@ -7742,6 +7768,18 @@ class STSRest01Client {
|
|
|
7742
7768
|
var _a;
|
|
7743
7769
|
return ((_a = await this.GetResourcesDBR(filters, errorCb)) == null ? void 0 : _a.map((r) => r.resdesc)) ?? null;
|
|
7744
7770
|
});
|
|
7771
|
+
__privateAdd$1(this, _checkResName, (resourceEntities) => {
|
|
7772
|
+
let resName = "";
|
|
7773
|
+
resourceEntities.forEach((re2) => {
|
|
7774
|
+
resName = resName.localeCompare("") === 0 ? re2.resname : resName;
|
|
7775
|
+
if (resName.localeCompare(re2.resname) !== 0) {
|
|
7776
|
+
throw new Error(`Invalid batch provided. resname not all equal. Previous checked value: [${resName}, current value: [${re2.resname}]`);
|
|
7777
|
+
} else {
|
|
7778
|
+
resName = re2.resname;
|
|
7779
|
+
}
|
|
7780
|
+
});
|
|
7781
|
+
return resName;
|
|
7782
|
+
});
|
|
7745
7783
|
__publicField$1(this, "PostEntityAR", async (resourceEntity, errorCb) => {
|
|
7746
7784
|
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${resourceEntity.resname}/entities`;
|
|
7747
7785
|
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "post", resourceEntity, null, null, errorCb);
|
|
@@ -7754,6 +7792,18 @@ class STSRest01Client {
|
|
|
7754
7792
|
var _a;
|
|
7755
7793
|
return ((_a = await this.PostEntityDBR(resourceEntity, errorCb)) == null ? void 0 : _a.entvalue) ?? null;
|
|
7756
7794
|
});
|
|
7795
|
+
__publicField$1(this, "PutEntitiesAR", async (resourceEntities, errorCb) => {
|
|
7796
|
+
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${__privateGet$1(this, _checkResName).call(this, resourceEntities)}/entities`;
|
|
7797
|
+
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "put", resourceEntities, null, null, errorCb);
|
|
7798
|
+
});
|
|
7799
|
+
__publicField$1(this, "PutEntitiesDBR", async (resourceEntities, errorCb) => {
|
|
7800
|
+
var _a;
|
|
7801
|
+
return ((_a = await this.PutEntitiesAR(resourceEntities, errorCb)) == null ? void 0 : _a.data.map((r) => r.detail)) ?? null;
|
|
7802
|
+
});
|
|
7803
|
+
__publicField$1(this, "PutEntities", async (resourceEntities, errorCb) => {
|
|
7804
|
+
var _a;
|
|
7805
|
+
return ((_a = await this.PutEntitiesDBR(resourceEntities, errorCb)) == null ? void 0 : _a.map((r) => r.entvalue)) ?? null;
|
|
7806
|
+
});
|
|
7757
7807
|
__publicField$1(this, "PutEntityAR", async (entity, errorCb) => {
|
|
7758
7808
|
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${entity.resname}/entities/${entity.entname}`;
|
|
7759
7809
|
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "put", entity, null, null, errorCb);
|
|
@@ -7766,6 +7816,18 @@ class STSRest01Client {
|
|
|
7766
7816
|
var _a;
|
|
7767
7817
|
return ((_a = await this.PutEntityDBR(resourceEntity, errorCb)) == null ? void 0 : _a.entvalue) ?? null;
|
|
7768
7818
|
});
|
|
7819
|
+
__publicField$1(this, "PatchEntitiesAR", async (resourceEntities, errorCb) => {
|
|
7820
|
+
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${__privateGet$1(this, _checkResName).call(this, resourceEntities)}/entities`;
|
|
7821
|
+
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "patch", resourceEntities, null, null, errorCb);
|
|
7822
|
+
});
|
|
7823
|
+
__publicField$1(this, "PatchEntitiesDBR", async (resourceEntities, errorCb) => {
|
|
7824
|
+
var _a;
|
|
7825
|
+
return ((_a = await this.PatchEntitiesAR(resourceEntities, errorCb)) == null ? void 0 : _a.data.map((r) => r.detail)) ?? null;
|
|
7826
|
+
});
|
|
7827
|
+
__publicField$1(this, "PatchEntities", async (resourceEntities, errorCb) => {
|
|
7828
|
+
var _a;
|
|
7829
|
+
return ((_a = await this.PatchEntitiesDBR(resourceEntities, errorCb)) == null ? void 0 : _a.map((r) => r.entvalue)) ?? null;
|
|
7830
|
+
});
|
|
7769
7831
|
__publicField$1(this, "PatchEntityAR", async (resourceEntity, errorCb) => {
|
|
7770
7832
|
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
|
|
7771
7833
|
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "patch", resourceEntity, null, null, errorCb);
|
|
@@ -7778,6 +7840,18 @@ class STSRest01Client {
|
|
|
7778
7840
|
var _a;
|
|
7779
7841
|
return ((_a = await this.PatchEntityDBR(resourceEntity, errorCb)) == null ? void 0 : _a.entvalue) ?? null;
|
|
7780
7842
|
});
|
|
7843
|
+
__publicField$1(this, "DeleteEntitiesAR", async (resourceEntities, errorCb) => {
|
|
7844
|
+
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${__privateGet$1(this, _checkResName).call(this, resourceEntities)}/entities`;
|
|
7845
|
+
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "delete", resourceEntities, null, null, errorCb);
|
|
7846
|
+
});
|
|
7847
|
+
__publicField$1(this, "DeleteEntitiesDBR", async (resourceEntities, errorCb) => {
|
|
7848
|
+
var _a;
|
|
7849
|
+
return ((_a = await this.DeleteEntitiesAR(resourceEntities, errorCb)) == null ? void 0 : _a.data.map((r) => r.detail)) ?? null;
|
|
7850
|
+
});
|
|
7851
|
+
__publicField$1(this, "DeleteEntities", async (resourceEntities, errorCb) => {
|
|
7852
|
+
var _a;
|
|
7853
|
+
return ((_a = await this.DeleteEntitiesDBR(resourceEntities, errorCb)) == null ? void 0 : _a.map((r) => r.entvalue)) ?? null;
|
|
7854
|
+
});
|
|
7781
7855
|
__publicField$1(this, "DeleteEntityAR", async (resourceEntity, errorCb) => {
|
|
7782
7856
|
const url = `${__privateGet$1(this, _options2$1).endpoint}${goptions$1.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
|
|
7783
7857
|
return __privateGet$1(this, _axiosClient).InvokeResourceAPI(url, "delete", resourceEntity, null, null, errorCb);
|
|
@@ -7833,6 +7907,7 @@ class STSRest01Client {
|
|
|
7833
7907
|
}
|
|
7834
7908
|
_axiosClient = /* @__PURE__ */ new WeakMap();
|
|
7835
7909
|
_options2$1 = /* @__PURE__ */ new WeakMap();
|
|
7910
|
+
_checkResName = /* @__PURE__ */ new WeakMap();
|
|
7836
7911
|
var cookie$1 = {};
|
|
7837
7912
|
var memstore = {};
|
|
7838
7913
|
var pathMatch = {};
|
|
@@ -8760,7 +8835,7 @@ function requireVersion() {
|
|
|
8760
8835
|
hasRequiredVersion = 1;
|
|
8761
8836
|
Object.defineProperty(version$1, "__esModule", { value: true });
|
|
8762
8837
|
version$1.version = void 0;
|
|
8763
|
-
version$1.version = "5.1.
|
|
8838
|
+
version$1.version = "5.1.2";
|
|
8764
8839
|
return version$1;
|
|
8765
8840
|
}
|
|
8766
8841
|
var canonicalDomain = {};
|
|
@@ -8769,14 +8844,16 @@ var hasRequiredConstants$1;
|
|
|
8769
8844
|
function requireConstants$1() {
|
|
8770
8845
|
if (hasRequiredConstants$1) return constants$1;
|
|
8771
8846
|
hasRequiredConstants$1 = 1;
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8847
|
+
(function(exports) {
|
|
8848
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8849
|
+
exports.IP_V6_REGEX_OBJECT = exports.PrefixSecurityEnum = void 0;
|
|
8850
|
+
exports.PrefixSecurityEnum = {
|
|
8851
|
+
SILENT: "silent",
|
|
8852
|
+
STRICT: "strict",
|
|
8853
|
+
DISABLED: "unsafe-disabled"
|
|
8854
|
+
};
|
|
8855
|
+
Object.freeze(exports.PrefixSecurityEnum);
|
|
8856
|
+
const IP_V6_REGEX = `
|
|
8780
8857
|
\\[?(?:
|
|
8781
8858
|
(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|
|
|
8782
8859
|
(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|
|
|
@@ -8788,7 +8865,8 @@ function requireConstants$1() {
|
|
|
8788
8865
|
(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:))
|
|
8789
8866
|
)(?:%[0-9a-zA-Z]{1,})?\\]?
|
|
8790
8867
|
`.replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
|
|
8791
|
-
|
|
8868
|
+
exports.IP_V6_REGEX_OBJECT = new RegExp(`^${IP_V6_REGEX}$`);
|
|
8869
|
+
})(constants$1);
|
|
8792
8870
|
return constants$1;
|
|
8793
8871
|
}
|
|
8794
8872
|
var hasRequiredCanonicalDomain;
|
|
@@ -9774,7 +9852,7 @@ function requireDomainMatch() {
|
|
|
9774
9852
|
if (_str == _domStr) {
|
|
9775
9853
|
return true;
|
|
9776
9854
|
}
|
|
9777
|
-
const idx = _str.lastIndexOf(
|
|
9855
|
+
const idx = _str.lastIndexOf(_domStr);
|
|
9778
9856
|
if (idx <= 0) {
|
|
9779
9857
|
return false;
|
|
9780
9858
|
}
|
|
@@ -22960,9 +23038,11 @@ class Rest01Client {
|
|
|
22960
23038
|
});
|
|
22961
23039
|
__publicField(this, "AddResource", async (worker) => {
|
|
22962
23040
|
const resourceTestRunnerMetadata = {
|
|
23041
|
+
id: worker.id,
|
|
22963
23042
|
lastRefresh: Math.floor(Date.now() / 1e3),
|
|
22964
23043
|
resname: `${STS_RF_RES_PREFIX}${worker.id}`,
|
|
22965
|
-
data: worker.workerThreadWorkerOptions
|
|
23044
|
+
data: worker.workerThreadWorkerOptions,
|
|
23045
|
+
state: "started"
|
|
22966
23046
|
};
|
|
22967
23047
|
return await __privateGet(this, _rest01Client).PostResource(resourceTestRunnerMetadata, (error) => {
|
|
22968
23048
|
defaultLogger.error(`Rest01Client:AddResource.PostResource.Error(): [${error}]`);
|
|
@@ -22970,15 +23050,32 @@ class Rest01Client {
|
|
|
22970
23050
|
});
|
|
22971
23051
|
__publicField(this, "AddResourceEntity", async (workerId, runner) => {
|
|
22972
23052
|
const resourceEntityTestRunnerMetadata = {
|
|
23053
|
+
id: runner.id,
|
|
22973
23054
|
lastRefresh: Math.floor(Date.now() / 1e3),
|
|
22974
23055
|
resname: `${STS_RF_RES_PREFIX}${workerId}`,
|
|
22975
23056
|
entname: `${STS_RF_RES_ENT_PREFIX}${runner.id}`,
|
|
22976
|
-
data: runner.asyncRunnerContext
|
|
23057
|
+
data: runner.asyncRunnerContext,
|
|
23058
|
+
runnerTelemetry: runner.instrumentData,
|
|
23059
|
+
state: "started"
|
|
22977
23060
|
};
|
|
22978
23061
|
return await __privateGet(this, _rest01Client).PostEntity(resourceEntityTestRunnerMetadata, (error) => {
|
|
22979
23062
|
defaultLogger.error(`WorkerInstance: #AddRunner.PostEntity.Error(): [${error}]`);
|
|
22980
23063
|
});
|
|
22981
23064
|
});
|
|
23065
|
+
__publicField(this, "UpdateResourceEntity", async (workerId, runner, state) => {
|
|
23066
|
+
const resourceEntityTestRunnerMetadata = {
|
|
23067
|
+
id: runner.id,
|
|
23068
|
+
lastRefresh: Math.floor(Date.now() / 1e3),
|
|
23069
|
+
resname: `${STS_RF_RES_PREFIX}${workerId}`,
|
|
23070
|
+
entname: `${STS_RF_RES_ENT_PREFIX}${runner.id}`,
|
|
23071
|
+
data: runner.asyncRunnerContext,
|
|
23072
|
+
runnerTelemetry: runner.instrumentData,
|
|
23073
|
+
state
|
|
23074
|
+
};
|
|
23075
|
+
return await __privateGet(this, _rest01Client).PutEntity(resourceEntityTestRunnerMetadata, (error) => {
|
|
23076
|
+
defaultLogger.error(`WorkerInstance: #AddRunner.PutEntity.Error(): [${error}]`);
|
|
23077
|
+
});
|
|
23078
|
+
});
|
|
22982
23079
|
__publicField(this, "GetResource", async (resourceTestRunnerMetadata) => {
|
|
22983
23080
|
return await __privateGet(this, _rest01Client).GetResource(resourceTestRunnerMetadata, "", (error) => {
|
|
22984
23081
|
defaultLogger.error(`Rest01Client: GetResource.Error(): [${error}]`);
|
|
@@ -23628,7 +23725,10 @@ class STSWorkerManager {
|
|
|
23628
23725
|
} else {
|
|
23629
23726
|
runnerEx.instrumentData.message = [];
|
|
23630
23727
|
}
|
|
23631
|
-
__privateGet(this, _telemetryProcessor).ProcessTelemetry(runnerEx.publishInstrumentController, runnerEx.instrumentData);
|
|
23728
|
+
const update = __privateGet(this, _telemetryProcessor).ProcessTelemetry(runnerEx.publishInstrumentController, runnerEx.instrumentData);
|
|
23729
|
+
if (update) {
|
|
23730
|
+
__privateGet(this, _rest01Client3).UpdateResourceEntity(workerEx.id, runnerEx, "running");
|
|
23731
|
+
}
|
|
23632
23732
|
if (workerEx.runnersEvents[runner.id]) {
|
|
23633
23733
|
const runnersEvents = workerEx.runnersEvents[runner.id];
|
|
23634
23734
|
runnersEvents.forEach((ev) => {
|
|
@@ -23648,6 +23748,7 @@ class STSWorkerManager {
|
|
|
23648
23748
|
ev.cb(workerEx.runnersEx[runner.id].instrumentData);
|
|
23649
23749
|
}
|
|
23650
23750
|
});
|
|
23751
|
+
__privateGet(this, _rest01Client3).UpdateResourceEntity(workerEx.id, runner, "completed");
|
|
23651
23752
|
}
|
|
23652
23753
|
console.log(chalk$1.green(`ProcessCompleted: [${JSON.stringify(runner)}]`));
|
|
23653
23754
|
});
|