@nsshunt/stsrunnerframework 2.0.24 → 2.0.26
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 +57 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +57 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/types/workerManagerProxy.d.ts +2 -2
- package/types/workerManagerProxy.d.ts.map +1 -1
- package/types/wsevents.d.ts +2 -2
- package/types/wsevents.d.ts.map +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3797,15 +3797,53 @@ var AsyncRunnerInstanceManager = class {
|
|
|
3797
3797
|
* - distributed runtime traceability
|
|
3798
3798
|
*/
|
|
3799
3799
|
const asyncRunnerContext = {
|
|
3800
|
+
/**
|
|
3801
|
+
* Hierarchical node identifier.
|
|
3802
|
+
*
|
|
3803
|
+
* Format:
|
|
3804
|
+
* [level1]@[level2]^[level3]|[level4]
|
|
3805
|
+
*
|
|
3806
|
+
* Concrete layout:
|
|
3807
|
+
* [hostName]@[agentId]-[userAgent]^[workerId]|[runnerId]
|
|
3808
|
+
*/
|
|
3800
3809
|
nid: `\
|
|
3801
3810
|
${workerEx.options.hostName}${_nsshunt_stsutils.ModelDelimeter.COMPONENT_SEPERATOR}${workerEx.options.agentId}-${workerEx.options.userAgent}\
|
|
3802
3811
|
${_nsshunt_stsutils.ModelDelimeter.NID_SEPERATOR}\
|
|
3803
3812
|
${workerEx.id}\
|
|
3804
3813
|
${_nsshunt_stsutils.ModelDelimeter.SEPERATOR}\
|
|
3805
3814
|
${runnerId}`,
|
|
3815
|
+
/**
|
|
3816
|
+
* Level 1: host identity.
|
|
3817
|
+
*
|
|
3818
|
+
* Example:
|
|
3819
|
+
* - machine name
|
|
3820
|
+
* - physical host
|
|
3821
|
+
* - logical host/runtime name
|
|
3822
|
+
*/
|
|
3806
3823
|
hostName: workerEx.options.hostName,
|
|
3824
|
+
/**
|
|
3825
|
+
* Level 2: agent identity.
|
|
3826
|
+
*
|
|
3827
|
+
* Constructed as:
|
|
3828
|
+
* `${agentId}-${userAgent}`
|
|
3829
|
+
*
|
|
3830
|
+
* This typically identifies:
|
|
3831
|
+
* - browser session
|
|
3832
|
+
* - tab instance
|
|
3833
|
+
* - client/service instance
|
|
3834
|
+
*/
|
|
3807
3835
|
agentName: `${workerEx.options.agentId}-${workerEx.options.userAgent}`,
|
|
3836
|
+
/**
|
|
3837
|
+
* Level 3: worker/thread identity.
|
|
3838
|
+
*
|
|
3839
|
+
* This identifies the worker hosting the runner.
|
|
3840
|
+
*/
|
|
3808
3841
|
threadId: `${workerEx.id}`,
|
|
3842
|
+
/**
|
|
3843
|
+
* Level 4: runner identity.
|
|
3844
|
+
*
|
|
3845
|
+
* This identifies the specific async runner within the worker.
|
|
3846
|
+
*/
|
|
3809
3847
|
id: runnerId
|
|
3810
3848
|
};
|
|
3811
3849
|
return new RunnerInstance({
|
|
@@ -6600,8 +6638,8 @@ var STSWorkerManager = class {
|
|
|
6600
6638
|
};
|
|
6601
6639
|
};
|
|
6602
6640
|
//#endregion
|
|
6603
|
-
//#region node_modules/@nsshunt/stssocketioutils/dist/tiny-emitter-
|
|
6604
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
6641
|
+
//#region node_modules/@nsshunt/stssocketioutils/dist/tiny-emitter-DcZ69ZvJ.js
|
|
6642
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
6605
6643
|
var require_tiny_emitter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6606
6644
|
function E() {}
|
|
6607
6645
|
E.prototype = {
|
|
@@ -9942,6 +9980,7 @@ var SocketIoClient = class extends import_tiny_emitter.TinyEmitter {
|
|
|
9942
9980
|
#authToken;
|
|
9943
9981
|
#socket;
|
|
9944
9982
|
#reconnectTimeout = 2e3;
|
|
9983
|
+
#ackTimeout = 5e3;
|
|
9945
9984
|
constructor(name) {
|
|
9946
9985
|
super();
|
|
9947
9986
|
this.#name = name;
|
|
@@ -9982,6 +10021,13 @@ var SocketIoClient = class extends import_tiny_emitter.TinyEmitter {
|
|
|
9982
10021
|
get socket() {
|
|
9983
10022
|
return this.#socket;
|
|
9984
10023
|
}
|
|
10024
|
+
get ackTimeout() {
|
|
10025
|
+
return this.#ackTimeout;
|
|
10026
|
+
}
|
|
10027
|
+
WithAckTimeout(ackTimeout) {
|
|
10028
|
+
this.#ackTimeout = ackTimeout;
|
|
10029
|
+
return this;
|
|
10030
|
+
}
|
|
9985
10031
|
WithAddress(address) {
|
|
9986
10032
|
this.#address = address;
|
|
9987
10033
|
return this;
|
|
@@ -10031,6 +10077,7 @@ var SocketIoClient = class extends import_tiny_emitter.TinyEmitter {
|
|
|
10031
10077
|
socketOptions.agent = this.#agentManager.GetAgent(this.#address);
|
|
10032
10078
|
}
|
|
10033
10079
|
} else socketOptions = { transports: ["websocket"] };
|
|
10080
|
+
socketOptions.ackTimeout = this.#ackTimeout;
|
|
10034
10081
|
if (this.#authToken) socketOptions.auth = (cb) => {
|
|
10035
10082
|
cb({ token: this.#authToken });
|
|
10036
10083
|
};
|
|
@@ -10116,7 +10163,7 @@ var IEventRequestCommand = /* @__PURE__ */ function(IEventRequestCommand) {
|
|
|
10116
10163
|
IEventRequestCommand["AddWorker"] = "AddWorker";
|
|
10117
10164
|
IEventRequestCommand["GetService"] = "GetService";
|
|
10118
10165
|
IEventRequestCommand["GetWorkers"] = "GetWorkers";
|
|
10119
|
-
IEventRequestCommand["
|
|
10166
|
+
IEventRequestCommand["GetWorkersCore"] = "GetWorkersCore";
|
|
10120
10167
|
IEventRequestCommand["GetArchiveList"] = "GetArchiveList";
|
|
10121
10168
|
IEventRequestCommand["StartWorkers"] = "StartWorkers";
|
|
10122
10169
|
IEventRequestCommand["StopWorkers"] = "StopWorkers";
|
|
@@ -10319,17 +10366,17 @@ var WorkerManagerProxy = class extends SocketIoClient {
|
|
|
10319
10366
|
workers: await this._wm.GetWorkers()
|
|
10320
10367
|
}));
|
|
10321
10368
|
};
|
|
10322
|
-
|
|
10323
|
-
const raw = this._EmitEvent("
|
|
10324
|
-
...this._GetKeyPayloadData(IEventRequestCommand.
|
|
10369
|
+
_GetWorkersCore = async (states) => {
|
|
10370
|
+
const raw = this._EmitEvent("GetWorkersCore", this._LogPayloadEventRetVal({
|
|
10371
|
+
...this._GetKeyPayloadData(IEventRequestCommand.GetWorkersCore, IEventReturnValueBaseType.workers),
|
|
10325
10372
|
workerCores: await this._wm.GetWorkersCore(states)
|
|
10326
10373
|
}));
|
|
10327
10374
|
raw.workers = (0, fflate.gzipSync)((0, fflate.strToU8)(JSON.stringify(raw.workers)));
|
|
10328
10375
|
return raw;
|
|
10329
10376
|
};
|
|
10330
|
-
|
|
10331
|
-
return this._EmitEvent("
|
|
10332
|
-
...this._GetKeyPayloadData(IEventRequestCommand.
|
|
10377
|
+
_GetWorkersCoreNoZip = async (states) => {
|
|
10378
|
+
return this._EmitEvent("GetWorkersCore", this._LogPayloadEventRetVal({
|
|
10379
|
+
...this._GetKeyPayloadData(IEventRequestCommand.GetWorkersCore, IEventReturnValueBaseType.workers),
|
|
10333
10380
|
workerCores: await this._wm.GetWorkersCore(states)
|
|
10334
10381
|
}));
|
|
10335
10382
|
};
|
|
@@ -10493,7 +10540,7 @@ var WorkerManagerProxy = class extends SocketIoClient {
|
|
|
10493
10540
|
},
|
|
10494
10541
|
"GetService": async (cb) => cb(await this._GetService()),
|
|
10495
10542
|
"GetWorkers": async (cb) => cb(await this._GetWorkers()),
|
|
10496
|
-
"
|
|
10543
|
+
"GetWorkersCore": async (states, cb) => cb(await this._GetWorkersCore(states)),
|
|
10497
10544
|
"GetArchiveList": async (runnerSearchFilters, cb) => cb(await this._GetArchiveList(runnerSearchFilters)),
|
|
10498
10545
|
"AddRunner": async (options, cb) => cb(await this._AddRunner(options)),
|
|
10499
10546
|
"AddRunnerToWorkerByWorkerId": async (workerId, options, cb) => cb(await this._AddRunnerToWorkerByWorkerId(workerId, options)),
|