@nsshunt/stsrunnerframework 1.0.154 → 1.0.156
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 +32 -18
- package/dist/stsrunnerframework.mjs.map +1 -1
- package/dist/stsrunnerframework.umd.js +32 -18
- package/dist/stsrunnerframework.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/commonTypes.d.ts +4 -4
- package/types/commonTypes.d.ts.map +1 -1
- package/types/workerInstance.d.ts.map +1 -1
- package/types/workerManager.d.ts +3 -3
- package/types/workerManager.d.ts.map +1 -1
|
@@ -2000,9 +2000,9 @@ class WorkerInstance {
|
|
|
2000
2000
|
if (__privateGet(this, _runners)[runnerId]) {
|
|
2001
2001
|
const { state } = __privateGet(this, _runners)[runnerId].runner;
|
|
2002
2002
|
if (state === IRunnerState.paused || state === IRunnerState.running) {
|
|
2003
|
+
__privateGet(this, _UpdateRunnerStateById).call(this, runnerId, IRunnerState.paused);
|
|
2003
2004
|
__privateGet(this, _ResetRunnerIterationById).call(this, runnerId);
|
|
2004
2005
|
result = await ((_a = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _a.ResetRunner());
|
|
2005
|
-
__privateGet(this, _UpdateRunnerStateById).call(this, runnerId, IRunnerState.paused);
|
|
2006
2006
|
}
|
|
2007
2007
|
} else {
|
|
2008
2008
|
__privateGet(this, _warn).call(this, `#ResetRunner(): Runner: [${runnerId}] not found`);
|
|
@@ -2047,7 +2047,7 @@ class WorkerInstance {
|
|
|
2047
2047
|
__privateGet(this, _debug).call(this, chalk.cyan(`before: [${JSON.stringify(__privateGet(this, _GetRunnerOptionsById).call(this, runnerId))}]`));
|
|
2048
2048
|
__privateGet(this, _SetRunnerOptionsById).call(this, runnerId, testRunnerTelemetryPayload.runner.options);
|
|
2049
2049
|
__privateGet(this, _debug).call(this, chalk.cyan(`after: [${JSON.stringify(__privateGet(this, _GetRunnerOptionsById).call(this, runnerId))}]`));
|
|
2050
|
-
result = await ((_a = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _a.UpdateRunner());
|
|
2050
|
+
result = await ((_a = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _a.UpdateRunner(testRunnerTelemetryPayload.runner.options));
|
|
2051
2051
|
}
|
|
2052
2052
|
} else {
|
|
2053
2053
|
__privateGet(this, _warn).call(this, `#UpdateRunner(): Runner: [${runnerId}] not found`);
|
|
@@ -2497,7 +2497,7 @@ class STSWorkerManager {
|
|
|
2497
2497
|
TerminateRunner: (runner) => __privateGet(this, _TerminateRunner2).call(this, stsWorkerEx, runner),
|
|
2498
2498
|
ResetRunner: (runner) => __privateGet(this, _ResetRunner2).call(this, stsWorkerEx, runner),
|
|
2499
2499
|
ExecuteRunner: (runner) => __privateGet(this, _ExecuteRunner2).call(this, stsWorkerEx, runner),
|
|
2500
|
-
UpdateRunner: (runner,
|
|
2500
|
+
UpdateRunner: (runner, runnerOptions) => __privateGet(this, _UpdateRunner2).call(this, stsWorkerEx, runner, runnerOptions),
|
|
2501
2501
|
// Commands to execute on all runners
|
|
2502
2502
|
Start: () => __privateGet(this, _StartWorker).call(this, stsWorkerEx),
|
|
2503
2503
|
Stop: () => __privateGet(this, _StopWorker).call(this, stsWorkerEx),
|
|
@@ -2506,7 +2506,7 @@ class STSWorkerManager {
|
|
|
2506
2506
|
Terminate: () => __privateGet(this, _TerminateWorker).call(this, stsWorkerEx),
|
|
2507
2507
|
Reset: () => __privateGet(this, _ResetWorker).call(this, stsWorkerEx),
|
|
2508
2508
|
Execute: () => __privateGet(this, _ExecuteWorker).call(this, stsWorkerEx),
|
|
2509
|
-
Update: (
|
|
2509
|
+
Update: (runnerOptions) => __privateGet(this, _UpdateOptionsWorker).call(this, stsWorkerEx, runnerOptions),
|
|
2510
2510
|
on: (eventName, cb) => {
|
|
2511
2511
|
stsWorkerEx.workerEvents.push({
|
|
2512
2512
|
eventName,
|
|
@@ -2804,7 +2804,7 @@ class STSWorkerManager {
|
|
|
2804
2804
|
Reset: () => __privateGet(this, _ResetRunner2).call(this, workerEx, runnerEx),
|
|
2805
2805
|
Execute: () => __privateGet(this, _ExecuteRunner2).call(this, workerEx, runnerEx),
|
|
2806
2806
|
Terminate: () => __privateGet(this, _TerminateRunner2).call(this, workerEx, runnerEx),
|
|
2807
|
-
Update: (
|
|
2807
|
+
Update: (runnerOptions2) => __privateGet(this, _UpdateRunner2).call(this, workerEx, runnerEx, runnerOptions2),
|
|
2808
2808
|
on: (eventName, cb) => {
|
|
2809
2809
|
if (!workerEx.runnersEvents[runnerEx.id]) {
|
|
2810
2810
|
workerEx.runnersEvents[runnerEx.id] = [];
|
|
@@ -2953,11 +2953,25 @@ class STSWorkerManager {
|
|
|
2953
2953
|
}
|
|
2954
2954
|
});
|
|
2955
2955
|
});
|
|
2956
|
-
__privateAdd(this, _UpdateRunner2, async (workerEx, runnerEx,
|
|
2956
|
+
__privateAdd(this, _UpdateRunner2, async (workerEx, runnerEx, runnerOptions) => {
|
|
2957
2957
|
return new Promise((resolve, reject) => {
|
|
2958
2958
|
try {
|
|
2959
2959
|
__privateGet(this, _debug2).call(this, `#UpdateRunner`);
|
|
2960
|
-
|
|
2960
|
+
if (runnerOptions.description) {
|
|
2961
|
+
runnerEx.options.description = runnerOptions.description;
|
|
2962
|
+
}
|
|
2963
|
+
if (runnerOptions.executionProfile) {
|
|
2964
|
+
runnerEx.options.executionProfile = { ...runnerOptions.executionProfile };
|
|
2965
|
+
}
|
|
2966
|
+
if (runnerOptions.tag) {
|
|
2967
|
+
runnerEx.options.tag = runnerOptions.tag;
|
|
2968
|
+
}
|
|
2969
|
+
if (runnerOptions.testType) {
|
|
2970
|
+
runnerEx.options.testType = runnerOptions.testType;
|
|
2971
|
+
}
|
|
2972
|
+
if (runnerOptions.userData) {
|
|
2973
|
+
runnerEx.options.userData = runnerOptions.userData;
|
|
2974
|
+
}
|
|
2961
2975
|
const command = eIWMessageCommands.UpdateRunner;
|
|
2962
2976
|
const messageId = __privateGet(this, _SetupCallbackMessage).call(this, resolve, reject, command);
|
|
2963
2977
|
const payload = {
|
|
@@ -3020,11 +3034,11 @@ class STSWorkerManager {
|
|
|
3020
3034
|
return Promise.all(promArray);
|
|
3021
3035
|
});
|
|
3022
3036
|
// IExecutionProfile
|
|
3023
|
-
__privateAdd(this, _UpdateOptionsWorker, async (workerEx,
|
|
3037
|
+
__privateAdd(this, _UpdateOptionsWorker, async (workerEx, runnerOptions) => {
|
|
3024
3038
|
const runners = Object.values(workerEx.runnersEx);
|
|
3025
3039
|
const promArray = [];
|
|
3026
3040
|
for (let i = 0; i < runners.length; i++) {
|
|
3027
|
-
promArray.push(runners[i].Update(
|
|
3041
|
+
promArray.push(runners[i].Update(runnerOptions));
|
|
3028
3042
|
}
|
|
3029
3043
|
return Promise.all(promArray);
|
|
3030
3044
|
});
|
|
@@ -3088,13 +3102,13 @@ class STSWorkerManager {
|
|
|
3088
3102
|
return null;
|
|
3089
3103
|
}
|
|
3090
3104
|
});
|
|
3091
|
-
__privateAdd(this, _ProcessWorkerCommands, async (workerIds, command,
|
|
3105
|
+
__privateAdd(this, _ProcessWorkerCommands, async (workerIds, command, runnerOptions) => {
|
|
3092
3106
|
try {
|
|
3093
3107
|
const promArray = [];
|
|
3094
3108
|
const workers = Object.values(this.WorkersEx).filter((workerEx) => workerIds.length === 0 ? true : workerIds.includes(workerEx.id));
|
|
3095
3109
|
for (let i = 0; i < workers.length; i++) {
|
|
3096
3110
|
if (command === "Update") {
|
|
3097
|
-
promArray.push(workers[i][command](
|
|
3111
|
+
promArray.push(workers[i][command](runnerOptions));
|
|
3098
3112
|
} else {
|
|
3099
3113
|
promArray.push(workers[i][command]());
|
|
3100
3114
|
}
|
|
@@ -3135,15 +3149,15 @@ class STSWorkerManager {
|
|
|
3135
3149
|
__publicField(this, "TerminateWorkers", async (workerIds) => {
|
|
3136
3150
|
return __privateGet(this, _ProcessWorkerCommands).call(this, workerIds, "Terminate");
|
|
3137
3151
|
});
|
|
3138
|
-
__publicField(this, "UpdateWorkers", async (workerIds,
|
|
3139
|
-
return __privateGet(this, _ProcessWorkerCommands).call(this, workerIds, "Update",
|
|
3152
|
+
__publicField(this, "UpdateWorkers", async (workerIds, runnerOptions) => {
|
|
3153
|
+
return __privateGet(this, _ProcessWorkerCommands).call(this, workerIds, "Update", runnerOptions);
|
|
3140
3154
|
});
|
|
3141
|
-
__privateAdd(this, _ExecuteVariableCommandOnRunners, async (workerId, runnerIds, command,
|
|
3155
|
+
__privateAdd(this, _ExecuteVariableCommandOnRunners, async (workerId, runnerIds, command, runnerOptions) => {
|
|
3142
3156
|
try {
|
|
3143
3157
|
if (__privateGet(this, _workersEx)[workerId]) {
|
|
3144
3158
|
if (runnerIds.length === 0) {
|
|
3145
3159
|
if (command === "Update") {
|
|
3146
|
-
return __privateGet(this, _workersEx)[workerId][command](
|
|
3160
|
+
return __privateGet(this, _workersEx)[workerId][command](runnerOptions);
|
|
3147
3161
|
} else {
|
|
3148
3162
|
return __privateGet(this, _workersEx)[workerId][command]();
|
|
3149
3163
|
}
|
|
@@ -3152,7 +3166,7 @@ class STSWorkerManager {
|
|
|
3152
3166
|
const runners = Object.values(__privateGet(this, _workersEx)[workerId].runnersEx).filter((runnerEx) => runnerIds.length === 0 ? true : runnerIds.includes(runnerEx.id));
|
|
3153
3167
|
for (let i = 0; i < runners.length; i++) {
|
|
3154
3168
|
if (command === "Update") {
|
|
3155
|
-
promArray.push(runners[i][command](
|
|
3169
|
+
promArray.push(runners[i][command](runnerOptions));
|
|
3156
3170
|
} else {
|
|
3157
3171
|
promArray.push(runners[i][command]());
|
|
3158
3172
|
}
|
|
@@ -3192,8 +3206,8 @@ class STSWorkerManager {
|
|
|
3192
3206
|
__publicField(this, "TerminateRunners", async (workerId, runnerIds) => {
|
|
3193
3207
|
return __privateGet(this, _ExecuteVariableCommandOnRunners).call(this, workerId, runnerIds, "Terminate");
|
|
3194
3208
|
});
|
|
3195
|
-
__publicField(this, "UpdateRunners", async (workerId, runnerIds,
|
|
3196
|
-
return __privateGet(this, _ExecuteVariableCommandOnRunners).call(this, workerId, runnerIds, "Update",
|
|
3209
|
+
__publicField(this, "UpdateRunners", async (workerId, runnerIds, runnerOptions) => {
|
|
3210
|
+
return __privateGet(this, _ExecuteVariableCommandOnRunners).call(this, workerId, runnerIds, "Update", runnerOptions);
|
|
3197
3211
|
});
|
|
3198
3212
|
__privateAdd(this, _SyncRunnerData, (runnerEx, runner) => {
|
|
3199
3213
|
try {
|