@nsshunt/stsrunnerframework 2.0.8 → 2.0.9
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 +8262 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{stsrunnerframework.mjs → index.mjs} +8 -47
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -16
- package/dist/stsrunnerframework.mjs.map +0 -1
- package/dist/stsrunnerframework.umd.js +0 -8307
- package/dist/stsrunnerframework.umd.js.map +0 -1
|
@@ -3194,45 +3194,6 @@ var AbstractRunnerExecutionWorker = class {
|
|
|
3194
3194
|
};
|
|
3195
3195
|
};
|
|
3196
3196
|
//#endregion
|
|
3197
|
-
//#region node_modules/uuid/dist/stringify.js
|
|
3198
|
-
var byteToHex = [];
|
|
3199
|
-
for (let i = 0; i < 256; ++i) byteToHex.push((i + 256).toString(16).slice(1));
|
|
3200
|
-
function unsafeStringify(arr, offset = 0) {
|
|
3201
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
3202
|
-
}
|
|
3203
|
-
//#endregion
|
|
3204
|
-
//#region node_modules/uuid/dist/rng.js
|
|
3205
|
-
var getRandomValues;
|
|
3206
|
-
var rnds8 = new Uint8Array(16);
|
|
3207
|
-
function rng() {
|
|
3208
|
-
if (!getRandomValues) {
|
|
3209
|
-
if (typeof crypto === "undefined" || !crypto.getRandomValues) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3210
|
-
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
3211
|
-
}
|
|
3212
|
-
return getRandomValues(rnds8);
|
|
3213
|
-
}
|
|
3214
|
-
var native_default = { randomUUID: typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
3215
|
-
//#endregion
|
|
3216
|
-
//#region node_modules/uuid/dist/v4.js
|
|
3217
|
-
function _v4(options, buf, offset) {
|
|
3218
|
-
options = options || {};
|
|
3219
|
-
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
3220
|
-
if (rnds.length < 16) throw new Error("Random bytes length must be >= 16");
|
|
3221
|
-
rnds[6] = rnds[6] & 15 | 64;
|
|
3222
|
-
rnds[8] = rnds[8] & 63 | 128;
|
|
3223
|
-
if (buf) {
|
|
3224
|
-
offset = offset || 0;
|
|
3225
|
-
if (offset < 0 || offset + 16 > buf.length) throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
3226
|
-
for (let i = 0; i < 16; ++i) buf[offset + i] = rnds[i];
|
|
3227
|
-
return buf;
|
|
3228
|
-
}
|
|
3229
|
-
return unsafeStringify(rnds);
|
|
3230
|
-
}
|
|
3231
|
-
function v4(options, buf, offset) {
|
|
3232
|
-
if (native_default.randomUUID && !buf && !options) return native_default.randomUUID();
|
|
3233
|
-
return _v4(options, buf, offset);
|
|
3234
|
-
}
|
|
3235
|
-
//#endregion
|
|
3236
3197
|
//#region src/messageBroker.ts
|
|
3237
3198
|
var import_lodash_merge = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3238
3199
|
/**
|
|
@@ -4928,7 +4889,7 @@ var STSMessageBroker = class {
|
|
|
4928
4889
|
* @returns The generated message id to embed in the outbound payload.
|
|
4929
4890
|
*/
|
|
4930
4891
|
_SetupCallbackMessage = (resolve, reject, command) => {
|
|
4931
|
-
const messageId =
|
|
4892
|
+
const messageId = globalThis.crypto.randomUUID();
|
|
4932
4893
|
this.messages[messageId] = {
|
|
4933
4894
|
timeout: setTimeout(() => {
|
|
4934
4895
|
delete this.messages[messageId];
|
|
@@ -5075,14 +5036,14 @@ var STSMessageBroker = class {
|
|
|
5075
5036
|
if (stsWorkerEx.options.mocked) stsWorkerEx.worker.SetPort({
|
|
5076
5037
|
command: eIWMessageCommands.MessagePort,
|
|
5077
5038
|
payload: {
|
|
5078
|
-
messageId:
|
|
5039
|
+
messageId: globalThis.crypto.randomUUID(),
|
|
5079
5040
|
port,
|
|
5080
5041
|
options: { ...stsWorkerEx.options },
|
|
5081
5042
|
workerId: stsWorkerEx.id
|
|
5082
5043
|
}
|
|
5083
5044
|
});
|
|
5084
5045
|
else this._PostMessageToWorkerUsingDefaultChannel(stsWorkerEx, eIWMessageCommands.MessagePort, {
|
|
5085
|
-
messageId:
|
|
5046
|
+
messageId: globalThis.crypto.randomUUID(),
|
|
5086
5047
|
port,
|
|
5087
5048
|
options: { ...stsWorkerEx.options },
|
|
5088
5049
|
workerId: stsWorkerEx.id
|
|
@@ -5507,7 +5468,7 @@ var AsyncRunnerInstanceManager = class {
|
|
|
5507
5468
|
/**
|
|
5508
5469
|
* Generate a unique id for the new runner.
|
|
5509
5470
|
*/
|
|
5510
|
-
const runnerId =
|
|
5471
|
+
const runnerId = globalThis.crypto.randomUUID();
|
|
5511
5472
|
/**
|
|
5512
5473
|
* Construct the hierarchical async runner context used for:
|
|
5513
5474
|
* - logical identification
|
|
@@ -5722,7 +5683,7 @@ var ArchiveManager = class {
|
|
|
5722
5683
|
* This removes the runner from the active runtime graph after a delay.
|
|
5723
5684
|
*/
|
|
5724
5685
|
if (this.archiveDeleteTimeout !== 0) {
|
|
5725
|
-
const delTimeoutId =
|
|
5686
|
+
const delTimeoutId = globalThis.crypto.randomUUID();
|
|
5726
5687
|
const delTimeout = setTimeout(() => {
|
|
5727
5688
|
try {
|
|
5728
5689
|
this.options.workerRegistry.DeleteRunner(workerEx.id, removeList[i].runnerId);
|
|
@@ -5918,7 +5879,7 @@ var WorkerInstance = class {
|
|
|
5918
5879
|
* @param options Dependencies and configuration required to construct the worker.
|
|
5919
5880
|
*/
|
|
5920
5881
|
constructor(options) {
|
|
5921
|
-
this.id =
|
|
5882
|
+
this.id = globalThis.crypto.randomUUID();
|
|
5922
5883
|
this.workerManagerId = options.workerManagerId;
|
|
5923
5884
|
this.worker = options.workerFactory.createWorkerThreadWorker();
|
|
5924
5885
|
this.messagePort = options.messagePort;
|
|
@@ -7858,7 +7819,7 @@ var STSWorkerManager = class {
|
|
|
7858
7819
|
* @param options Optional worker-manager runtime configuration.
|
|
7859
7820
|
*/
|
|
7860
7821
|
constructor(options) {
|
|
7861
|
-
this.#id =
|
|
7822
|
+
this.#id = globalThis.crypto.randomUUID();
|
|
7862
7823
|
if (options) this.#options = options;
|
|
7863
7824
|
else this.#options = {};
|
|
7864
7825
|
this.#workerRegistry = new WorkerRegistry({ logger: this.#options.logger });
|
|
@@ -8290,4 +8251,4 @@ var STSWorkerManager = class {
|
|
|
8290
8251
|
//#endregion
|
|
8291
8252
|
export { AbstractRunnerExecutionWorker, IRunnerSignalType, IRunnerState, IWorkerState, PublishMessageCommandsTestRunner, STSWorkerManager, eIWMessageCommands };
|
|
8292
8253
|
|
|
8293
|
-
//# sourceMappingURL=
|
|
8254
|
+
//# sourceMappingURL=index.mjs.map
|