@nsshunt/stsrunnerframework 2.0.18 → 2.0.19
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/index.cjs +25 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +25 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/types/commonTypes.d.ts +4 -0
- package/types/commonTypes.d.ts.map +1 -1
- package/types/workerManager.d.ts +3 -0
- package/types/workerManager.d.ts.map +1 -1
- package/types/workerManagerProxy.d.ts +56 -0
- package/types/workerManagerProxy.d.ts.map +1 -0
- package/types/wsevents.d.ts +104 -0
- package/types/wsevents.d.ts.map +1 -0
package/dist/index.mjs
CHANGED
|
@@ -6336,6 +6336,17 @@ var STSWorkerManager = class {
|
|
|
6336
6336
|
throw error;
|
|
6337
6337
|
}
|
|
6338
6338
|
};
|
|
6339
|
+
AddRunnerToWorkerByWorkerId = async (workerId, runnerOptions) => {
|
|
6340
|
+
this.#debug(`AddRunnerToWorkerByWorkerId()`);
|
|
6341
|
+
try {
|
|
6342
|
+
const stsWorkerEx = this.#workerRegistry.GetWorkerEx(workerId);
|
|
6343
|
+
if (stsWorkerEx) {} else throw new Error(`AddRunnerToWorkerByWorkerId(): Error: [Could not GetWorkerEx from workerId: [${workerId}]]`);
|
|
6344
|
+
return this.AddRunnerToWorker(stsWorkerEx, runnerOptions);
|
|
6345
|
+
} catch (error) {
|
|
6346
|
+
this.#error(`AddRunnerToWorkerByWorkerId(): Error: [${error}]`);
|
|
6347
|
+
throw error;
|
|
6348
|
+
}
|
|
6349
|
+
};
|
|
6339
6350
|
/**
|
|
6340
6351
|
* Get the current worker-manager options object.
|
|
6341
6352
|
*
|
|
@@ -6556,6 +6567,20 @@ var STSWorkerManager = class {
|
|
|
6556
6567
|
GetWorkersCore = async (states) => {
|
|
6557
6568
|
return this.#workerStateSynchroniser.GetSyncedWorkersCore(states);
|
|
6558
6569
|
};
|
|
6570
|
+
AddRunner = async (runnerOptions) => {
|
|
6571
|
+
this.#debug(`AddRunner()`);
|
|
6572
|
+
try {
|
|
6573
|
+
const stsWorkerEx = this.GetNextAvailableWorker();
|
|
6574
|
+
if (stsWorkerEx) return this.AddRunnerToWorker(stsWorkerEx, runnerOptions);
|
|
6575
|
+
else throw new Error(`AddRunner(): Error: [Could not get GetNextAvailableWorker()]`);
|
|
6576
|
+
} catch (error) {
|
|
6577
|
+
this.#error(`AddRunner(): Error: [${error}]`);
|
|
6578
|
+
throw error;
|
|
6579
|
+
}
|
|
6580
|
+
};
|
|
6581
|
+
GetNextAvailableWorker = () => {
|
|
6582
|
+
return this.#workerRegistry.GetNextAvailableWorker();
|
|
6583
|
+
};
|
|
6559
6584
|
};
|
|
6560
6585
|
//#endregion
|
|
6561
6586
|
export { AbstractRunnerExecutionWorker, IRunnerState, IWorkerState, PublishMessageCommandsTestRunner, STSWorkerManager, eIWMessageCommands };
|