@nsshunt/stsrunnerframework 1.0.94 → 1.0.96

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.
@@ -13,7 +13,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
13
13
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
14
14
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
15
15
 
16
- var _collectorCollectorPort, _runners, _options, _workerId, _logMessage, _debug, _error, _warn, _processLoopExecutor, _SetMessagePort, _CreateRunnerEx2RunState, _UpdateRunnerStateById, _GetAllRunners, _CanExecuteNextIterationById, _IsCompletedById, _GetRunnerIterationById, _ResetRunnerIterationById, _IncRunnerIterationById, _GetRunnerInstanceById, _GetRunnerExecutionProfileById, _GetRunnerOptionsById, _SetRunnerOptionsById, _AddRunner, _WorkerInstance_instances, SleepImmediate_fn, _PostMessageToWorkerManagerById, _PostRunnersToWorkerManager, _StartRunner, _StopRunnerByRunnerId, _StopAllRunners, _StopRunner, _TerminateRunner, _PauseRunner, _ResumeRunner, _ResetRunner, _ExecuteRunner, _UpdateOptions, _workersEx, _options2, _STSInstrumentController, _telemetryProcessor, _archiveList, _id, _messages, _logMessage2, _debug2, _error2, _processLoopExecutor2, _SetRunnerIntoWorker, _ProcessTelemetry, _EmitWorkerEvent, _EmitRunnerEvent, _RunnerStateChange, _RemoveRunnerFromCollection, _CreateAsyncRunner, _PostMessageToWorkerUsingDefaultChannel, _PostMessageToWorker, _StartRunner2, _ResetRunner2, _ExecuteRunner2, _StopRunner2, _TerminateRunner2, _PauseRunner2, _ResumeRunner2, _UpdateOptionsRunner, _PauseWorker, _ResumeWorker, _StopWorker, _StartWorker, _ResetWorker, _ExecuteWorker, _UpdateOptionsWorker, _TerminateWorker, _BroadcastCommandToAllRunners, _HandleAllWorkers, _STSWorkerManager_instances, GetRunnersResponse_fn, _SyncRunnerData, _SyncWorkerDataFromPayload, _SyncWorkerDataFromWorker, _SyncWorkerDataFromWorkers, _PostMessageToWorkerGetRunners;
16
+ var _collectorCollectorPort, _runners, _options, _workerId, _logMessage, _debug, _error, _warn, _processLoopExecutor, _SetMessagePort, _CreateRunnerEx2RunState, _UpdateRunnerStateById, _GetAllRunners, _CanExecuteNextIterationById, _IsCompletedById, _GetRunnerIterationById, _ResetRunnerIterationById, _IncRunnerIterationById, _GetRunnerInstanceById, _GetRunnerExecutionProfileById, _GetRunnerOptionsById, _SetRunnerOptionsById, _AddRunner, _WorkerInstance_instances, SleepImmediate_fn, _PostMessageToWorkerManagerById, _PostRunnersToWorkerManager, _StartRunner, _StopRunnerByRunnerId, _StopAllRunners, _StopRunner, _TerminateRunner, _PauseRunner, _ResumeRunner, _ResetRunner, _ExecuteRunner, _UpdateOptions, _workersEx, _options2, _STSInstrumentController, _telemetryProcessor, _archiveList, _id, _messages, _logMessage2, _debug2, _error2, _processLoopExecutor2, _SetRunnerIntoWorker, _ProcessTelemetry, _EmitWorkerEvent, _EmitRunnerEvent, _RunnerStateChange, _RemoveRunnerFromCollection, _CreateAsyncRunner, _PostMessageToWorkerUsingDefaultChannel, _PostMessageToWorker, _StartRunner2, _ResetRunner2, _ExecuteRunner2, _StopRunner2, _TerminateRunner2, _PauseRunner2, _ResumeRunner2, _UpdateOptionsRunner, _PauseWorker, _ResumeWorker, _StopWorker, _StartWorker, _ResetWorker, _ExecuteWorker, _UpdateOptionsWorker, _TerminateWorker, _BroadcastCommandToAllRunners, _HandleAllWorkers, _ExecuteCommandOnRunners, _STSWorkerManager_instances, GetRunnersResponse_fn, _SyncRunnerData, _SyncWorkerDataFromPayload, _SyncWorkerDataFromWorker, _SyncWorkerDataFromWorkers, _PostMessageToWorkerGetRunners;
17
17
  const URI_BASE_VUEUTILS = "/";
18
18
  const STS_RF_RES_PREFIX = "STS_R_RF_";
19
19
  const STS_RF_RES_ENT_PREFIX = "STS_RE_RF_";
@@ -2835,117 +2835,53 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2835
2835
  __publicField(this, "UpdateAllWorkers", (options) => {
2836
2836
  return __privateGet(this, _HandleAllWorkers).call(this, "UpdateOptions", options);
2837
2837
  });
2838
- __publicField(this, "StopAllRunners", (workerId) => {
2838
+ __privateAdd(this, _ExecuteCommandOnRunners, (workerId, runnerIds, command, executionProfile) => {
2839
2839
  if (__privateGet(this, _workersEx)[workerId]) {
2840
- return __privateGet(this, _workersEx)[workerId].Stop();
2841
- }
2842
- return [];
2843
- });
2844
- __publicField(this, "StopRunner", (workerId, runnerId) => {
2845
- if (__privateGet(this, _workersEx)[workerId]) {
2846
- if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2847
- return __privateGet(this, _workersEx)[workerId].runnersEx[runnerId].Stop();
2840
+ if (runnerIds.length === 0) {
2841
+ if (command === "UpdateOptions") {
2842
+ return __privateGet(this, _workersEx)[workerId][command](executionProfile);
2843
+ } else {
2844
+ return __privateGet(this, _workersEx)[workerId][command]();
2845
+ }
2846
+ } else {
2847
+ const retVal = [];
2848
+ runnerIds.forEach((runnerId) => {
2849
+ if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2850
+ if (command === "UpdateOptions") {
2851
+ retVal.push(__privateGet(this, _workersEx)[workerId].runnersEx[runnerId][command](executionProfile));
2852
+ } else {
2853
+ retVal.push(__privateGet(this, _workersEx)[workerId].runnersEx[runnerId][command]());
2854
+ }
2855
+ }
2856
+ });
2857
+ return retVal;
2848
2858
  }
2849
2859
  }
2850
- return void 0;
2851
- });
2852
- __publicField(this, "StartAllRunners", (workerId) => {
2853
- if (__privateGet(this, _workersEx)[workerId]) {
2854
- return __privateGet(this, _workersEx)[workerId].Start();
2855
- }
2856
2860
  return [];
2857
2861
  });
2858
- __publicField(this, "StartRunner", (workerId, runnerId) => {
2859
- if (__privateGet(this, _workersEx)[workerId]) {
2860
- if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2861
- return __privateGet(this, _workersEx)[workerId].runnersEx[runnerId].Start();
2862
- }
2863
- }
2864
- return void 0;
2862
+ __publicField(this, "StopRunners", (workerId, runnerIds) => {
2863
+ return __privateGet(this, _ExecuteCommandOnRunners).call(this, workerId, runnerIds, "Stop");
2865
2864
  });
2866
- __publicField(this, "PauseAllRunners", (workerId) => {
2867
- if (__privateGet(this, _workersEx)[workerId]) {
2868
- return __privateGet(this, _workersEx)[workerId].Pause();
2869
- }
2870
- return [];
2865
+ __publicField(this, "StartRunners", (workerId, runnerIds) => {
2866
+ return __privateGet(this, _ExecuteCommandOnRunners).call(this, workerId, runnerIds, "Start");
2871
2867
  });
2872
- __publicField(this, "PauseRunner", (workerId, runnerId) => {
2873
- if (__privateGet(this, _workersEx)[workerId]) {
2874
- if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2875
- return __privateGet(this, _workersEx)[workerId].runnersEx[runnerId].Pause();
2876
- }
2877
- }
2878
- return void 0;
2868
+ __publicField(this, "PauseRunners", (workerId, runnerIds) => {
2869
+ return __privateGet(this, _ExecuteCommandOnRunners).call(this, workerId, runnerIds, "Pause");
2879
2870
  });
2880
- __publicField(this, "ResumeAllRunners", (workerId) => {
2881
- if (__privateGet(this, _workersEx)[workerId]) {
2882
- return __privateGet(this, _workersEx)[workerId].Resume();
2883
- }
2884
- return [];
2871
+ __publicField(this, "ResumeRunners", (workerId, runnerIds) => {
2872
+ return __privateGet(this, _ExecuteCommandOnRunners).call(this, workerId, runnerIds, "Resume");
2885
2873
  });
2886
- __publicField(this, "ResumeRunner", (workerId, runnerId) => {
2887
- if (__privateGet(this, _workersEx)[workerId]) {
2888
- if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2889
- return __privateGet(this, _workersEx)[workerId].runnersEx[runnerId].Resume();
2890
- }
2891
- }
2892
- return void 0;
2874
+ __publicField(this, "ExecuteRunners", (workerId, runnerIds) => {
2875
+ return __privateGet(this, _ExecuteCommandOnRunners).call(this, workerId, runnerIds, "Execute");
2893
2876
  });
2894
- __publicField(this, "TerminateAllRunners", (workerId) => {
2895
- if (__privateGet(this, _workersEx)[workerId]) {
2896
- return __privateGet(this, _workersEx)[workerId].Terminate();
2897
- }
2898
- return [];
2899
- });
2900
- __publicField(this, "TerminateRunner", (workerId, runnerId) => {
2901
- if (__privateGet(this, _workersEx)[workerId]) {
2902
- if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2903
- return __privateGet(this, _workersEx)[workerId].runnersEx[runnerId].Terminate();
2904
- }
2905
- }
2906
- return void 0;
2907
- });
2908
- __publicField(this, "ResetAllRunners", (workerId) => {
2909
- if (__privateGet(this, _workersEx)[workerId]) {
2910
- return __privateGet(this, _workersEx)[workerId].Reset();
2911
- }
2912
- return [];
2913
- });
2914
- __publicField(this, "ResetRunner", (workerId, runnerId) => {
2915
- if (__privateGet(this, _workersEx)[workerId]) {
2916
- if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2917
- return __privateGet(this, _workersEx)[workerId].runnersEx[runnerId].Reset();
2918
- }
2919
- }
2920
- return void 0;
2877
+ __publicField(this, "ResetRunners", (workerId, runnerIds) => {
2878
+ return __privateGet(this, _ExecuteCommandOnRunners).call(this, workerId, runnerIds, "Reset");
2921
2879
  });
2922
- __publicField(this, "ExecuteAllRunners", (workerId) => {
2923
- if (__privateGet(this, _workersEx)[workerId]) {
2924
- return __privateGet(this, _workersEx)[workerId].Execute();
2925
- }
2926
- return [];
2927
- });
2928
- __publicField(this, "ExecuteRunner", (workerId, runnerId) => {
2929
- if (__privateGet(this, _workersEx)[workerId]) {
2930
- if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2931
- return __privateGet(this, _workersEx)[workerId].runnersEx[runnerId].Execute();
2932
- }
2933
- }
2934
- return void 0;
2880
+ __publicField(this, "TerminateRunners", (workerId, runnerIds) => {
2881
+ return __privateGet(this, _ExecuteCommandOnRunners).call(this, workerId, runnerIds, "Terminate");
2935
2882
  });
2936
- __publicField(this, "UpdateAllRunners", (workerId, executionProfile) => {
2937
- if (__privateGet(this, _workersEx)[workerId]) {
2938
- return __privateGet(this, _workersEx)[workerId].UpdateOptions(executionProfile);
2939
- }
2940
- return [];
2941
- });
2942
- __publicField(this, "UpdateRunner", (workerId, runnerId, executionProfile) => {
2943
- if (__privateGet(this, _workersEx)[workerId]) {
2944
- if (__privateGet(this, _workersEx)[workerId].runnersEx[runnerId]) {
2945
- return __privateGet(this, _workersEx)[workerId].runnersEx[runnerId].UpdateOptions(executionProfile);
2946
- }
2947
- }
2948
- return void 0;
2883
+ __publicField(this, "UpdateRunners", (workerId, runnerIds, executionProfile) => {
2884
+ return __privateGet(this, _ExecuteCommandOnRunners).call(this, workerId, runnerIds, "UpdateOptions", executionProfile);
2949
2885
  });
2950
2886
  __privateAdd(this, _SyncRunnerData, (runnerEx, runner) => {
2951
2887
  runnerEx.iteration = runner.iteration;
@@ -3088,6 +3024,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3088
3024
  _TerminateWorker = new WeakMap();
3089
3025
  _BroadcastCommandToAllRunners = new WeakMap();
3090
3026
  _HandleAllWorkers = new WeakMap();
3027
+ _ExecuteCommandOnRunners = new WeakMap();
3091
3028
  _STSWorkerManager_instances = new WeakSet();
3092
3029
  //GetWorkersEx = async (messageId: string, workerEx: IWorkerEx): Promise<IWorkers> => {
3093
3030
  //const retVal2 = await this.#PostMessageToWorkerGetRunners(workerEx, eIWMessageCommands.GetRunners);