@nsshunt/stsrunnerframework 1.0.120 → 1.0.122
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.
|
@@ -2387,12 +2387,14 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
2387
2387
|
throw error;
|
|
2388
2388
|
}
|
|
2389
2389
|
});
|
|
2390
|
-
|
|
2390
|
+
// only include runners that are in the specified states.
|
|
2391
|
+
// Use [] to include all runners irrespective of state.
|
|
2392
|
+
__publicField(this, "GetWorkersSmall", async (states) => {
|
|
2391
2393
|
try {
|
|
2392
2394
|
await __privateGet(this, _SyncWorkerDataFromWorkers).call(this);
|
|
2393
2395
|
const retVal = {};
|
|
2394
2396
|
for (const [, workerEx] of Object.entries(__privateGet(this, _workersEx))) {
|
|
2395
|
-
retVal[workerEx.id] = this.CreateWorkerCopySmall(workerEx);
|
|
2397
|
+
retVal[workerEx.id] = this.CreateWorkerCopySmall(workerEx, states);
|
|
2396
2398
|
}
|
|
2397
2399
|
return retVal;
|
|
2398
2400
|
} catch (error) {
|
|
@@ -2400,9 +2402,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
2400
2402
|
throw error;
|
|
2401
2403
|
}
|
|
2402
2404
|
});
|
|
2403
|
-
|
|
2405
|
+
// Filter by plan and/or tag. Leave blank to not use in filter.
|
|
2406
|
+
__publicField(this, "GetArchiveList", (plan, tag) => {
|
|
2404
2407
|
try {
|
|
2405
|
-
return __privateGet(this, _archiveList).filter((runner) => tag.localeCompare("") === 0 ? true : runner.options.tag.localeCompare(tag) === 0);
|
|
2408
|
+
return __privateGet(this, _archiveList).filter((runner) => plan.localeCompare("") === 0 ? true : runner.options.plan.localeCompare(plan) === 0).filter((runner) => tag.localeCompare("") === 0 ? true : runner.options.tag.localeCompare(tag) === 0);
|
|
2406
2409
|
} catch (error) {
|
|
2407
2410
|
__privateGet(this, _error2).call(this, `GetArchiveList(): Error: [${error}]`);
|
|
2408
2411
|
throw error;
|
|
@@ -3256,15 +3259,15 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
3256
3259
|
throw error;
|
|
3257
3260
|
}
|
|
3258
3261
|
}
|
|
3259
|
-
CreateWorkerCopySmall(workerEx) {
|
|
3262
|
+
CreateWorkerCopySmall(workerEx, states) {
|
|
3260
3263
|
try {
|
|
3261
3264
|
const workerCopy = {
|
|
3262
3265
|
id: workerEx.id,
|
|
3263
3266
|
runners: {}
|
|
3264
3267
|
};
|
|
3265
|
-
|
|
3268
|
+
Object.values(workerEx.runnersEx).filter((runnerEx) => states.length === 0 ? true : states.includes(runnerEx.state)).forEach((runnerEx) => {
|
|
3266
3269
|
workerCopy.runners[runnerEx.id] = this.CreateRunnerCopySmall(runnerEx);
|
|
3267
|
-
}
|
|
3270
|
+
});
|
|
3268
3271
|
return workerCopy;
|
|
3269
3272
|
} catch (error) {
|
|
3270
3273
|
__privateGet(this, _error2).call(this, `CreateWorkerCopySmall(): Error: [${error}]`);
|