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