@nsshunt/stsrunnerframework 1.0.65 → 1.0.67

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.
@@ -2014,8 +2014,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2014
2014
  //#agentSession: string = null;
2015
2015
  __privateAdd(this, _workersEx, {});
2016
2016
  __privateAdd(this, _options4);
2017
- __privateAdd(this, _STSInstrumentController);
2018
- __privateAdd(this, _telemetryProcessor);
2017
+ __privateAdd(this, _STSInstrumentController, null);
2018
+ __privateAdd(this, _telemetryProcessor, null);
2019
2019
  __privateAdd(this, _debug2, (message2) => {
2020
2020
  console.log(chalk$1.cyan(`pid: [${process.pid}] STSWorkerManager::${message2}`));
2021
2021
  });
@@ -2062,7 +2062,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2062
2062
  Execute: async () => __privateGet(this, _ExecuteWorker).call(this, stsWorkerEx),
2063
2063
  UpdateOptions: async (executionProfile) => __privateGet(this, _UpdateOptionsWorker).call(this, stsWorkerEx, executionProfile)
2064
2064
  };
2065
- __privateGet(this, _STSInstrumentController).LogEx(chalk$1.yellow(`pid: [${process.pid}] Creating new worker: [${stsWorkerEx.id}]`));
2065
+ if (__privateGet(this, _STSInstrumentController)) {
2066
+ __privateGet(this, _STSInstrumentController).LogEx(chalk$1.yellow(`pid: [${process.pid}] Creating new worker: [${stsWorkerEx.id}]`));
2067
+ }
2066
2068
  __privateGet(this, _debug2).call(this, `Adding worker: [${stsWorkerEx.id}]`);
2067
2069
  __privateGet(this, _debug2).call(this, `AddWorker::workerThreadWorkerOptions: [${stsWorkerEx.workerThreadWorkerOptions.id}]`);
2068
2070
  if (stsWorkerEx.workerThreadWorkerOptions.mocked) {
@@ -2142,7 +2144,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2142
2144
  const runnerEx = __privateGet(this, _CreateAsyncRunner).call(this, stsWorkerEx, runnerOptions);
2143
2145
  stsWorkerEx.runnersEx[runnerEx.id] = runnerEx;
2144
2146
  __privateGet(this, _SetRunnerIntoWorker).call(this, stsWorkerEx, runnerEx);
2145
- runnerEx.publishInstrumentController.LogEx(chalk$1.green(`Added runner: [${runnerEx.id}] into worker: [${stsWorkerEx.id}]`));
2147
+ if (runnerEx.publishInstrumentController) {
2148
+ runnerEx.publishInstrumentController.LogEx(chalk$1.green(`Added runner: [${runnerEx.id}] into worker: [${stsWorkerEx.id}]`));
2149
+ }
2146
2150
  return runnerEx;
2147
2151
  });
2148
2152
  __privateAdd(this, _SetRunnerIntoWorker, (workerEx, runnerEx) => {
@@ -2161,7 +2165,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2161
2165
  } else {
2162
2166
  runnerEx.instrumentData.message = [];
2163
2167
  }
2164
- __privateGet(this, _telemetryProcessor).ProcessTelemetry(runnerEx.publishInstrumentController, runnerEx.instrumentData);
2168
+ if (runnerEx.publishInstrumentController && __privateGet(this, _telemetryProcessor)) {
2169
+ __privateGet(this, _telemetryProcessor).ProcessTelemetry(runnerEx.publishInstrumentController, runnerEx.instrumentData);
2170
+ }
2165
2171
  __privateGet(this, _EmitEvent).call(this, "Telemetry", workerEx, runner.id);
2166
2172
  }
2167
2173
  });
@@ -2192,7 +2198,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2192
2198
  console.log(chalk$1.green(`ProcessCompleted: [${JSON.stringify(runner)}]`));
2193
2199
  });
2194
2200
  __privateAdd(this, _CreateAsyncRunner, (workerEx, runnerOptions) => {
2195
- __privateGet(this, _STSInstrumentController).LogEx(chalk$1.yellow(`Creating new async runner: [${runnerOptions.id}]`));
2201
+ if (__privateGet(this, _STSInstrumentController)) {
2202
+ __privateGet(this, _STSInstrumentController).LogEx(chalk$1.yellow(`Creating new async runner: [${runnerOptions.id}]`));
2203
+ }
2196
2204
  const asyncRunnerContext = {
2197
2205
  nid: `${workerEx.workerThreadWorkerOptions.hostName}${stsutils.ModelDelimeter.COMPONENT_SEPERATOR}${workerEx.workerThreadWorkerOptions.agentId}-${workerEx.workerThreadWorkerOptions.userAgent}${stsutils.ModelDelimeter.NID_SEPERATOR}${workerEx.id}${stsutils.ModelDelimeter.SEPERATOR}${runnerOptions.id}`,
2198
2206
  id: runnerOptions.id,
@@ -2204,7 +2212,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2204
2212
  id: runnerOptions.id,
2205
2213
  state: IRunnerState.created,
2206
2214
  iteration: 0,
2207
- publishInstrumentController: __privateGet(this, _STSInstrumentController).AddPublishInstrumentController(asyncRunnerContext),
2215
+ publishInstrumentController: __privateGet(this, _STSInstrumentController) ? __privateGet(this, _STSInstrumentController).AddPublishInstrumentController(asyncRunnerContext) : void 0,
2208
2216
  asyncRunnerContext,
2209
2217
  options: runnerOptions,
2210
2218
  instrumentData: {
@@ -2303,11 +2311,15 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2303
2311
  __privateGet(this, _PostMessageToWorker).call(this, workerEx, eIWMessageCommands.TerminateRunner, {
2304
2312
  runner: __privateMethod(this, _STSWorkerManager_instances, CreateRunnerCopy_fn).call(this, runnerEx)
2305
2313
  });
2306
- runnerEx.publishInstrumentController.LogEx(`Terminating runner: [${runnerEx.id}]`);
2314
+ if (runnerEx.publishInstrumentController) {
2315
+ runnerEx.publishInstrumentController.LogEx(`Terminating runner: [${runnerEx.id}]`);
2316
+ }
2307
2317
  await stsutils.Sleep(250);
2308
2318
  console.log(chalk$1.magenta(`Ending publish for runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
2309
- await runnerEx.publishInstrumentController.EndPublish();
2310
- await stsutils.Sleep(250);
2319
+ if (runnerEx.publishInstrumentController) {
2320
+ await runnerEx.publishInstrumentController.EndPublish();
2321
+ await stsutils.Sleep(250);
2322
+ }
2311
2323
  delete workerEx.runnersEx[runnerEx.id];
2312
2324
  console.log(chalk$1.magenta(`Completed Terminate for runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
2313
2325
  resolve(true);
@@ -2505,8 +2517,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2505
2517
  } else {
2506
2518
  __privateSet(this, _options4, {});
2507
2519
  }
2508
- __privateSet(this, _STSInstrumentController, __privateGet(this, _options4).publishInstrumentController);
2509
- __privateSet(this, _telemetryProcessor, new TelemetryProcessor());
2520
+ if (__privateGet(this, _options4).publishInstrumentController) {
2521
+ __privateSet(this, _STSInstrumentController, __privateGet(this, _options4).publishInstrumentController);
2522
+ __privateSet(this, _telemetryProcessor, new TelemetryProcessor());
2523
+ }
2510
2524
  }
2511
2525
  get WorkersEx() {
2512
2526
  return __privateGet(this, _workersEx);