@nsshunt/stsobservability 1.0.30 → 1.0.32
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/stsobservability.mjs +207 -338
- package/dist/stsobservability.mjs.map +1 -1
- package/dist/stsobservability.umd.js +207 -338
- package/dist/stsobservability.umd.js.map +1 -1
- package/package.json +9 -9
- package/types/globalServiceDefinitions.d.ts.map +1 -1
- package/types/publish/publishers/publishTransportRESTServer.d.ts.map +1 -1
|
@@ -2,29 +2,16 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("lodash.clonedeep"), require("detect-node"), require("@nsshunt/stsutils"), require("tiny-emitter"), require("vue"), require("node:https"), require("axios"), require("socket.io-client")) : typeof define === "function" && define.amd ? define(["exports", "lodash.clonedeep", "detect-node", "@nsshunt/stsutils", "tiny-emitter", "vue", "node:https", "axios", "socket.io-client"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["@nsshunt/stsobservability"] = {}, global2.lodash, global2["detect-node"], global2.stsutils, global2["tiny-emitter"], global2.vue, global2.https, global2.axios, global2.socket["io-client"]));
|
|
3
3
|
})(this, function(exports2, _cloneDeep, isNode, stsutils, tinyEmitter, vue, https, axios, socket_ioClient) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
-
return value;
|
|
9
|
-
};
|
|
10
|
-
var __accessCheck = (obj, member, msg) => {
|
|
11
|
-
if (!member.has(obj))
|
|
12
|
-
throw TypeError("Cannot " + msg);
|
|
13
|
-
};
|
|
14
|
-
var __privateGet = (obj, member, getter) => {
|
|
15
|
-
__accessCheck(obj, member, "read from private field");
|
|
16
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
17
|
-
};
|
|
18
|
-
var __privateAdd = (obj, member, value) => {
|
|
19
|
-
if (member.has(obj))
|
|
20
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
21
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
22
|
-
};
|
|
23
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
24
|
-
__accessCheck(obj, member, "write to private field");
|
|
25
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
26
|
-
return value;
|
|
5
|
+
var __typeError = (msg) => {
|
|
6
|
+
throw TypeError(msg);
|
|
27
7
|
};
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
11
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
12
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
14
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
28
15
|
var __privateWrapper = (obj, member, setter, getter) => ({
|
|
29
16
|
set _(value) {
|
|
30
17
|
__privateSet(obj, member, value, setter);
|
|
@@ -33,12 +20,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
33
20
|
return __privateGet(obj, member, getter);
|
|
34
21
|
}
|
|
35
22
|
});
|
|
36
|
-
var __privateMethod = (obj, member, method) => {
|
|
37
|
-
__accessCheck(obj, member, "access private method");
|
|
38
|
-
return method;
|
|
39
|
-
};
|
|
40
23
|
|
|
41
|
-
var _label, _options, _data,
|
|
24
|
+
var _a, _label, _options, _data, _interval, _timeoutComputeVelocity, _lastVelocity, _delta, _maxVelocity, _timerInterval, _copy, _velocity, _velocityVal, _valStack, _averageValStack, _maxAverageValStack, _maxAverageIterations, _valStackMaxLength, _valStackAverage, _timeStamp, _maxTimeDiff, _vaTimeDiff, _velocityTimeDiff, _autoComputeVelocity, _autoComputeVelocityTimeout, _countDiff, _timeDiff, _deltaCountDiff, _deltaTimeDif, _minTimeForReporting, _averageVelocity, _InstrumentVelocity_instances, ComputeVelocityByTimeDiff_fn, ComputeVelocity_fn, SetupAutoComputeVelocity_fn, GetVelocityStackAverage_fn, GetVal_fn, SetVal_fn, GetVelocity_fn, GetMaxVelocity_fn, GetDelta_fn, GetTimeStamp_fn, GetCountDiff_fn, GetTimeDiff_fn, GetDeltaCountDiff_fn, GetDeltaTimeDif_fn, GetAverageVelocity_fn, _histogramData, _val, _copy2, _InstrumentHistogram_instances, GetVal_fn2, SetVal_fn2, GetHistogramData_fn, SetHistogramData_fn, _messages, _readPos, _maxSize, _copy3, _useLatestMessages, _consoleLogging, _instrumentLogging, _winstonLogging, _stsLogger, _InstrumentLog_instances, DumpToConsole_fn, GetVal_fn3, SetVal_fn3, _start, _copy4, _pauseVal, _InstrumentTimerGauge_instances, GetVal_fn4, SetVal_fn4, convertMS_fn, _val2, _maxval, _lastObservedValue, _timeSeriesList, _maxSampleSize, _timerInterval2, _observer, _min, _max, _observations, _total, _copy5, _InstrumentGauge_instances, GetVal_fn5, SetVal_fn5, GetMin_fn, GetMax_fn, GetAverage_fn, GetAndResetMaxVal_fn, NumberCompare_fn, GetPercentileData_fn, _val3, _copy6, _InstrumentObject_instances, GetVal_fn6, SetVal_fn6, _tinyEmitter, _RequestCompleted, _instruments, _inPublish, _observer2, _publishState, _PublishInstrumentController_instances, GetInstrument_fn, ProcessTelemetryCommand_fn, CreateInstrument_fn, CreateInstruments_fn, GetPayloadData_fn, PublishTimeoutLoop_fn, UpdateState_fn, _httpsAgent, _kafkaLog, _maxLogLength, _socketSubscribeKeepAlive, _options2, _ObservabilityRESTAPISubscriber_instances, LogDebugMessage_fn, LogErrorMessage_fn, InvokeRESTAPI_fn, _GetData, SetupTimeout_fn, AddKeepAlive_fn, RemoveKeepAlive_fn, _messageWithAckPayloadRecords, _socket, _maxReties, _timeoutValue, _options3, _SocketIoMessageSender_instances, LogDebugMessage_fn2, GetSubscribeKeepAliveAckEventName_fn, _socketSubscribeKeepAlive2, _socket2, _options4, _socketIoMessageSender, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3, LogErrorMessage_fn2, AddKeepAlive_fn2, RemoveKeepAlive_fn2, _observabilitySocketIOSubscriber, _subscriptions, _kafkaHelper, _serviceModel, _agentModel, _lambdaModel, _options5, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4, LogErrorMessage_fn3, _options6, _sockets, _httpsAgent2, _SocketIoClientHelper_instances, LogDebugMessage_fn5, LogErrorMessage_fn4, EstablishSocketConnect_fn;
|
|
42
25
|
var Gauge = /* @__PURE__ */ ((Gauge2) => {
|
|
43
26
|
Gauge2["ACTIVE_REQUEST_GAUGE"] = "a";
|
|
44
27
|
Gauge2["AUTHENTICATION_COUNT_GAUGE"] = "b";
|
|
@@ -89,6 +72,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
89
72
|
}
|
|
90
73
|
class InstrumentBaseTelemetry {
|
|
91
74
|
}
|
|
75
|
+
_a = GaugeTypes.GAUGE_TYPE;
|
|
92
76
|
class InstrumentBase {
|
|
93
77
|
// Use for copy objects only.
|
|
94
78
|
//protected _data: Record<string, any> = { };
|
|
@@ -177,7 +161,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
177
161
|
}
|
|
178
162
|
*/
|
|
179
163
|
}
|
|
180
|
-
_a = GaugeTypes.GAUGE_TYPE;
|
|
181
164
|
_label = new WeakMap();
|
|
182
165
|
_options = new WeakMap();
|
|
183
166
|
_data = new WeakMap();
|
|
@@ -208,21 +191,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
208
191
|
// window may be "spikey" depending on the volatility of the data being recorded.
|
|
209
192
|
constructor(options = {}) {
|
|
210
193
|
super(options);
|
|
211
|
-
__privateAdd(this,
|
|
212
|
-
__privateAdd(this, _ComputeVelocity);
|
|
213
|
-
__privateAdd(this, _SetupAutoComputeVelocity);
|
|
214
|
-
__privateAdd(this, _GetVelocityStackAverage);
|
|
215
|
-
__privateAdd(this, _GetVal);
|
|
216
|
-
__privateAdd(this, _SetVal);
|
|
217
|
-
__privateAdd(this, _GetVelocity);
|
|
218
|
-
__privateAdd(this, _GetMaxVelocity);
|
|
219
|
-
__privateAdd(this, _GetDelta);
|
|
220
|
-
__privateAdd(this, _GetTimeStamp);
|
|
221
|
-
__privateAdd(this, _GetCountDiff);
|
|
222
|
-
__privateAdd(this, _GetTimeDiff);
|
|
223
|
-
__privateAdd(this, _GetDeltaCountDiff);
|
|
224
|
-
__privateAdd(this, _GetDeltaTimeDif);
|
|
225
|
-
__privateAdd(this, _GetAverageVelocity);
|
|
194
|
+
__privateAdd(this, _InstrumentVelocity_instances);
|
|
226
195
|
//#val = 0;
|
|
227
196
|
__privateAdd(this, _interval, null);
|
|
228
197
|
__privateAdd(this, _timeoutComputeVelocity, null);
|
|
@@ -336,50 +305,50 @@ var __privateMethod = (obj, member, method) => {
|
|
|
336
305
|
} else {
|
|
337
306
|
Object.defineProperty(this, "val", {
|
|
338
307
|
enumerable: true,
|
|
339
|
-
get: () => __privateMethod(this,
|
|
308
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetVal_fn).call(this),
|
|
340
309
|
set: (value) => {
|
|
341
|
-
__privateMethod(this,
|
|
310
|
+
__privateMethod(this, _InstrumentVelocity_instances, SetVal_fn).call(this, value);
|
|
342
311
|
}
|
|
343
312
|
});
|
|
344
313
|
Object.defineProperty(this, "maxVelocity", {
|
|
345
314
|
enumerable: true,
|
|
346
|
-
get: () => __privateMethod(this,
|
|
315
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetMaxVelocity_fn).call(this)
|
|
347
316
|
});
|
|
348
317
|
Object.defineProperty(this, "delta", {
|
|
349
318
|
enumerable: true,
|
|
350
|
-
get: () => __privateMethod(this,
|
|
319
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetDelta_fn).call(this)
|
|
351
320
|
});
|
|
352
321
|
Object.defineProperty(this, "velocity", {
|
|
353
322
|
enumerable: true,
|
|
354
|
-
get: () => __privateMethod(this,
|
|
323
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetVelocity_fn).call(this)
|
|
355
324
|
});
|
|
356
325
|
Object.defineProperty(this, "va", {
|
|
357
326
|
enumerable: true,
|
|
358
|
-
get: () => __privateMethod(this,
|
|
327
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetVelocityStackAverage_fn).call(this)
|
|
359
328
|
});
|
|
360
329
|
Object.defineProperty(this, "timeStamp", {
|
|
361
330
|
enumerable: true,
|
|
362
|
-
get: () => __privateMethod(this,
|
|
331
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetTimeStamp_fn).call(this)
|
|
363
332
|
});
|
|
364
333
|
Object.defineProperty(this, "countDiff", {
|
|
365
334
|
enumerable: true,
|
|
366
|
-
get: () => __privateMethod(this,
|
|
335
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetCountDiff_fn).call(this)
|
|
367
336
|
});
|
|
368
337
|
Object.defineProperty(this, "timeDiff", {
|
|
369
338
|
enumerable: true,
|
|
370
|
-
get: () => __privateMethod(this,
|
|
339
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetTimeDiff_fn).call(this)
|
|
371
340
|
});
|
|
372
341
|
Object.defineProperty(this, "deltaCountDiff", {
|
|
373
342
|
enumerable: true,
|
|
374
|
-
get: () => __privateMethod(this,
|
|
343
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetDeltaCountDiff_fn).call(this)
|
|
375
344
|
});
|
|
376
345
|
Object.defineProperty(this, "deltaTimeDif", {
|
|
377
346
|
enumerable: true,
|
|
378
|
-
get: () => __privateMethod(this,
|
|
347
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetDeltaTimeDif_fn).call(this)
|
|
379
348
|
});
|
|
380
349
|
Object.defineProperty(this, "averageVelocity", {
|
|
381
350
|
enumerable: true,
|
|
382
|
-
get: () => __privateMethod(this,
|
|
351
|
+
get: () => __privateMethod(this, _InstrumentVelocity_instances, GetAverageVelocity_fn).call(this)
|
|
383
352
|
});
|
|
384
353
|
if (__privateGet(this, _timerInterval) > 0 && __privateGet(this, _autoComputeVelocity) === false) {
|
|
385
354
|
this._StartTimer();
|
|
@@ -410,7 +379,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
410
379
|
}
|
|
411
380
|
_StartTimer() {
|
|
412
381
|
__privateSet(this, _interval, setInterval(() => {
|
|
413
|
-
__privateMethod(this,
|
|
382
|
+
__privateMethod(this, _InstrumentVelocity_instances, ComputeVelocity_fn).call(this);
|
|
414
383
|
let pushVal = __privateGet(this, _velocity);
|
|
415
384
|
for (let i = 0; i < __privateGet(this, _maxAverageIterations); i++) {
|
|
416
385
|
if (!__privateGet(this, _averageValStack)[i]) {
|
|
@@ -431,9 +400,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
431
400
|
Inc(incVal = 1) {
|
|
432
401
|
__privateSet(this, _velocityVal, __privateGet(this, _velocityVal) + incVal);
|
|
433
402
|
if (__privateGet(this, _autoComputeVelocity)) {
|
|
434
|
-
__privateMethod(this,
|
|
403
|
+
__privateMethod(this, _InstrumentVelocity_instances, ComputeVelocity_fn).call(this);
|
|
435
404
|
} else {
|
|
436
|
-
__privateMethod(this,
|
|
405
|
+
__privateMethod(this, _InstrumentVelocity_instances, SetupAutoComputeVelocity_fn).call(this);
|
|
437
406
|
}
|
|
438
407
|
}
|
|
439
408
|
StopTimer() {
|
|
@@ -478,7 +447,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
478
447
|
_deltaTimeDif = new WeakMap();
|
|
479
448
|
_minTimeForReporting = new WeakMap();
|
|
480
449
|
_averageVelocity = new WeakMap();
|
|
481
|
-
|
|
450
|
+
_InstrumentVelocity_instances = new WeakSet();
|
|
482
451
|
ComputeVelocityByTimeDiff_fn = function(checkTimeDiff, checkDeltaTimeDiff) {
|
|
483
452
|
let val = 0;
|
|
484
453
|
let deltaVal = 0;
|
|
@@ -544,7 +513,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
544
513
|
deltaTimeDiff
|
|
545
514
|
};
|
|
546
515
|
};
|
|
547
|
-
_ComputeVelocity = new WeakSet();
|
|
548
516
|
ComputeVelocity_fn = function() {
|
|
549
517
|
const dp = {
|
|
550
518
|
timeStamp: performance.now(),
|
|
@@ -555,9 +523,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
555
523
|
while (__privateGet(this, _valStack).length > 0 && __privateGet(this, _timeStamp) - __privateGet(this, _valStack)[0].timeStamp > __privateGet(this, _maxTimeDiff)) {
|
|
556
524
|
__privateGet(this, _valStack).shift();
|
|
557
525
|
}
|
|
558
|
-
const valStackAverageDataPoint = __privateMethod(this,
|
|
526
|
+
const valStackAverageDataPoint = __privateMethod(this, _InstrumentVelocity_instances, ComputeVelocityByTimeDiff_fn).call(this, __privateGet(this, _vaTimeDiff), 0);
|
|
559
527
|
__privateSet(this, _valStackAverage, valStackAverageDataPoint.val);
|
|
560
|
-
const velocityDataPoint = __privateMethod(this,
|
|
528
|
+
const velocityDataPoint = __privateMethod(this, _InstrumentVelocity_instances, ComputeVelocityByTimeDiff_fn).call(this, __privateGet(this, _velocityTimeDiff), __privateGet(this, _velocityTimeDiff) * 2);
|
|
561
529
|
__privateSet(this, _velocity, velocityDataPoint.val);
|
|
562
530
|
__privateSet(this, _delta, velocityDataPoint.val - velocityDataPoint.deltaVal);
|
|
563
531
|
__privateSet(this, _countDiff, velocityDataPoint.countDiff);
|
|
@@ -569,65 +537,52 @@ var __privateMethod = (obj, member, method) => {
|
|
|
569
537
|
__privateSet(this, _maxVelocity, __privateGet(this, _velocity));
|
|
570
538
|
}
|
|
571
539
|
};
|
|
572
|
-
_SetupAutoComputeVelocity = new WeakSet();
|
|
573
540
|
SetupAutoComputeVelocity_fn = function() {
|
|
574
541
|
if (__privateGet(this, _timeoutComputeVelocity)) {
|
|
575
542
|
clearTimeout(__privateGet(this, _timeoutComputeVelocity));
|
|
576
543
|
}
|
|
577
544
|
__privateSet(this, _timeoutComputeVelocity, setTimeout(() => {
|
|
578
|
-
__privateMethod(this,
|
|
545
|
+
__privateMethod(this, _InstrumentVelocity_instances, ComputeVelocity_fn).call(this);
|
|
579
546
|
}, __privateGet(this, _autoComputeVelocityTimeout)));
|
|
580
547
|
};
|
|
581
|
-
_GetVelocityStackAverage = new WeakSet();
|
|
582
548
|
GetVelocityStackAverage_fn = function() {
|
|
583
549
|
return this.GetNumber(__privateGet(this, _valStackAverage));
|
|
584
550
|
};
|
|
585
|
-
_GetVal = new WeakSet();
|
|
586
551
|
GetVal_fn = function() {
|
|
587
552
|
return this.GetNumber(__privateGet(this, _velocityVal));
|
|
588
553
|
};
|
|
589
|
-
_SetVal = new WeakSet();
|
|
590
554
|
SetVal_fn = function(updatedValue) {
|
|
591
555
|
__privateSet(this, _velocityVal, updatedValue);
|
|
592
556
|
if (__privateGet(this, _autoComputeVelocity)) {
|
|
593
|
-
__privateMethod(this,
|
|
557
|
+
__privateMethod(this, _InstrumentVelocity_instances, ComputeVelocity_fn).call(this);
|
|
594
558
|
} else {
|
|
595
|
-
__privateMethod(this,
|
|
559
|
+
__privateMethod(this, _InstrumentVelocity_instances, SetupAutoComputeVelocity_fn).call(this);
|
|
596
560
|
}
|
|
597
561
|
};
|
|
598
|
-
_GetVelocity = new WeakSet();
|
|
599
562
|
GetVelocity_fn = function() {
|
|
600
563
|
return this.GetNumber(__privateGet(this, _velocity));
|
|
601
564
|
};
|
|
602
|
-
_GetMaxVelocity = new WeakSet();
|
|
603
565
|
GetMaxVelocity_fn = function() {
|
|
604
566
|
return this.GetNumber(__privateGet(this, _maxVelocity));
|
|
605
567
|
};
|
|
606
|
-
_GetDelta = new WeakSet();
|
|
607
568
|
GetDelta_fn = function() {
|
|
608
569
|
return this.GetNumber(__privateGet(this, _delta));
|
|
609
570
|
};
|
|
610
|
-
_GetTimeStamp = new WeakSet();
|
|
611
571
|
GetTimeStamp_fn = function() {
|
|
612
572
|
return this.GetNumber(__privateGet(this, _timeStamp));
|
|
613
573
|
};
|
|
614
|
-
_GetCountDiff = new WeakSet();
|
|
615
574
|
GetCountDiff_fn = function() {
|
|
616
575
|
return this.GetNumber(__privateGet(this, _countDiff));
|
|
617
576
|
};
|
|
618
|
-
_GetTimeDiff = new WeakSet();
|
|
619
577
|
GetTimeDiff_fn = function() {
|
|
620
578
|
return this.GetNumber(__privateGet(this, _timeDiff));
|
|
621
579
|
};
|
|
622
|
-
_GetDeltaCountDiff = new WeakSet();
|
|
623
580
|
GetDeltaCountDiff_fn = function() {
|
|
624
581
|
return this.GetNumber(__privateGet(this, _deltaCountDiff));
|
|
625
582
|
};
|
|
626
|
-
_GetDeltaTimeDif = new WeakSet();
|
|
627
583
|
GetDeltaTimeDif_fn = function() {
|
|
628
584
|
return this.GetNumber(__privateGet(this, _deltaTimeDif));
|
|
629
585
|
};
|
|
630
|
-
_GetAverageVelocity = new WeakSet();
|
|
631
586
|
GetAverageVelocity_fn = function() {
|
|
632
587
|
return __privateGet(this, _averageVelocity);
|
|
633
588
|
};
|
|
@@ -654,10 +609,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
654
609
|
class InstrumentHistogram extends InstrumentBase {
|
|
655
610
|
constructor(options = {}) {
|
|
656
611
|
super(options);
|
|
657
|
-
__privateAdd(this,
|
|
658
|
-
__privateAdd(this, _SetVal2);
|
|
659
|
-
__privateAdd(this, _GetHistogramData);
|
|
660
|
-
__privateAdd(this, _SetHistogramData);
|
|
612
|
+
__privateAdd(this, _InstrumentHistogram_instances);
|
|
661
613
|
__privateAdd(this, _histogramData, []);
|
|
662
614
|
__privateAdd(this, _val, 0);
|
|
663
615
|
__privateAdd(this, _copy2, false);
|
|
@@ -710,16 +662,16 @@ var __privateMethod = (obj, member, method) => {
|
|
|
710
662
|
} else {
|
|
711
663
|
Object.defineProperty(this, "val", {
|
|
712
664
|
enumerable: true,
|
|
713
|
-
get: () => __privateMethod(this,
|
|
665
|
+
get: () => __privateMethod(this, _InstrumentHistogram_instances, GetVal_fn2).call(this),
|
|
714
666
|
set: (value) => {
|
|
715
|
-
__privateMethod(this,
|
|
667
|
+
__privateMethod(this, _InstrumentHistogram_instances, SetVal_fn2).call(this, value);
|
|
716
668
|
}
|
|
717
669
|
});
|
|
718
670
|
Object.defineProperty(this, "hist", {
|
|
719
671
|
enumerable: true,
|
|
720
|
-
get: () => __privateMethod(this,
|
|
672
|
+
get: () => __privateMethod(this, _InstrumentHistogram_instances, GetHistogramData_fn).call(this),
|
|
721
673
|
set: (value) => {
|
|
722
|
-
__privateMethod(this,
|
|
674
|
+
__privateMethod(this, _InstrumentHistogram_instances, SetHistogramData_fn).call(this, value);
|
|
723
675
|
}
|
|
724
676
|
});
|
|
725
677
|
}
|
|
@@ -865,20 +817,17 @@ var __privateMethod = (obj, member, method) => {
|
|
|
865
817
|
_histogramData = new WeakMap();
|
|
866
818
|
_val = new WeakMap();
|
|
867
819
|
_copy2 = new WeakMap();
|
|
868
|
-
|
|
820
|
+
_InstrumentHistogram_instances = new WeakSet();
|
|
869
821
|
GetVal_fn2 = function() {
|
|
870
822
|
return this.GetNumber(__privateGet(this, _val));
|
|
871
823
|
};
|
|
872
|
-
_SetVal2 = new WeakSet();
|
|
873
824
|
SetVal_fn2 = function(value) {
|
|
874
825
|
__privateSet(this, _val, value);
|
|
875
826
|
this.AddObservation(value);
|
|
876
827
|
};
|
|
877
|
-
_GetHistogramData = new WeakSet();
|
|
878
828
|
GetHistogramData_fn = function() {
|
|
879
829
|
return __privateGet(this, _histogramData);
|
|
880
830
|
};
|
|
881
|
-
_SetHistogramData = new WeakSet();
|
|
882
831
|
SetHistogramData_fn = function(value) {
|
|
883
832
|
__privateSet(this, _histogramData, value);
|
|
884
833
|
};
|
|
@@ -907,9 +856,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
907
856
|
class InstrumentLog extends InstrumentBase {
|
|
908
857
|
constructor(options = {}) {
|
|
909
858
|
super(options);
|
|
910
|
-
__privateAdd(this,
|
|
911
|
-
__privateAdd(this, _GetVal3);
|
|
912
|
-
__privateAdd(this, _SetVal3);
|
|
859
|
+
__privateAdd(this, _InstrumentLog_instances);
|
|
913
860
|
__privateAdd(this, _messages, []);
|
|
914
861
|
__privateAdd(this, _readPos, 0);
|
|
915
862
|
__privateAdd(this, _maxSize, 200);
|
|
@@ -919,7 +866,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
919
866
|
__privateAdd(this, _consoleLogging, false);
|
|
920
867
|
__privateAdd(this, _instrumentLogging, true);
|
|
921
868
|
__privateAdd(this, _winstonLogging, false);
|
|
922
|
-
__privateAdd(this, _stsLogger
|
|
869
|
+
__privateAdd(this, _stsLogger);
|
|
923
870
|
__publicField(this, "val", []);
|
|
924
871
|
if (typeof options.label === "undefined") {
|
|
925
872
|
this.label = "InstrumentLog";
|
|
@@ -967,9 +914,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
967
914
|
} else {
|
|
968
915
|
Object.defineProperty(this, "val", {
|
|
969
916
|
enumerable: true,
|
|
970
|
-
get: () => _cloneDeep(__privateMethod(this,
|
|
917
|
+
get: () => _cloneDeep(__privateMethod(this, _InstrumentLog_instances, GetVal_fn3).call(this)),
|
|
971
918
|
set: (value) => {
|
|
972
|
-
__privateMethod(this,
|
|
919
|
+
__privateMethod(this, _InstrumentLog_instances, SetVal_fn3).call(this, value);
|
|
973
920
|
}
|
|
974
921
|
});
|
|
975
922
|
}
|
|
@@ -1009,7 +956,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1009
956
|
set consoleLogging(value) {
|
|
1010
957
|
__privateSet(this, _consoleLogging, value);
|
|
1011
958
|
if (value === true) {
|
|
1012
|
-
__privateMethod(this,
|
|
959
|
+
__privateMethod(this, _InstrumentLog_instances, DumpToConsole_fn).call(this);
|
|
1013
960
|
}
|
|
1014
961
|
}
|
|
1015
962
|
get instrumentLogging() {
|
|
@@ -1024,32 +971,25 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1024
971
|
}
|
|
1025
972
|
}
|
|
1026
973
|
error(message) {
|
|
1027
|
-
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger))
|
|
1028
|
-
__privateGet(this, _stsLogger).error(message);
|
|
974
|
+
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger)) __privateGet(this, _stsLogger).error(message);
|
|
1029
975
|
}
|
|
1030
976
|
warn(message) {
|
|
1031
|
-
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger))
|
|
1032
|
-
__privateGet(this, _stsLogger).warn(message);
|
|
977
|
+
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger)) __privateGet(this, _stsLogger).warn(message);
|
|
1033
978
|
}
|
|
1034
979
|
info(message) {
|
|
1035
|
-
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger))
|
|
1036
|
-
__privateGet(this, _stsLogger).info(message);
|
|
980
|
+
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger)) __privateGet(this, _stsLogger).info(message);
|
|
1037
981
|
}
|
|
1038
982
|
http(message) {
|
|
1039
|
-
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger))
|
|
1040
|
-
__privateGet(this, _stsLogger).http(message);
|
|
983
|
+
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger)) __privateGet(this, _stsLogger).http(message);
|
|
1041
984
|
}
|
|
1042
985
|
verbose(message) {
|
|
1043
|
-
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger))
|
|
1044
|
-
__privateGet(this, _stsLogger).verbose(message);
|
|
986
|
+
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger)) __privateGet(this, _stsLogger).verbose(message);
|
|
1045
987
|
}
|
|
1046
988
|
debug(message) {
|
|
1047
|
-
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger))
|
|
1048
|
-
__privateGet(this, _stsLogger).debug(message);
|
|
989
|
+
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger)) __privateGet(this, _stsLogger).debug(message);
|
|
1049
990
|
}
|
|
1050
991
|
silly(message) {
|
|
1051
|
-
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger))
|
|
1052
|
-
__privateGet(this, _stsLogger).silly(message);
|
|
992
|
+
if (__privateGet(this, _winstonLogging) && __privateGet(this, _stsLogger)) __privateGet(this, _stsLogger).silly(message);
|
|
1053
993
|
}
|
|
1054
994
|
LogMessage(message) {
|
|
1055
995
|
if (__privateGet(this, _copy3)) {
|
|
@@ -1104,14 +1044,13 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1104
1044
|
_instrumentLogging = new WeakMap();
|
|
1105
1045
|
_winstonLogging = new WeakMap();
|
|
1106
1046
|
_stsLogger = new WeakMap();
|
|
1107
|
-
|
|
1047
|
+
_InstrumentLog_instances = new WeakSet();
|
|
1108
1048
|
DumpToConsole_fn = function() {
|
|
1109
1049
|
const logReport = this.GetMessagesSinceLastRead();
|
|
1110
1050
|
for (let i = 0; i < logReport.length; i++) {
|
|
1111
1051
|
console.log(logReport[i]);
|
|
1112
1052
|
}
|
|
1113
1053
|
};
|
|
1114
|
-
_GetVal3 = new WeakSet();
|
|
1115
1054
|
GetVal_fn3 = function() {
|
|
1116
1055
|
if (__privateGet(this, _useLatestMessages)) {
|
|
1117
1056
|
return this.GetMessagesSinceLastRead();
|
|
@@ -1119,7 +1058,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1119
1058
|
return __privateGet(this, _messages);
|
|
1120
1059
|
}
|
|
1121
1060
|
};
|
|
1122
|
-
_SetVal3 = new WeakSet();
|
|
1123
1061
|
SetVal_fn3 = function(updatedValue) {
|
|
1124
1062
|
__privateSet(this, _messages, updatedValue);
|
|
1125
1063
|
__privateSet(this, _readPos, 0);
|
|
@@ -1143,9 +1081,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1143
1081
|
class InstrumentTimerGauge extends InstrumentBase {
|
|
1144
1082
|
constructor(options = {}) {
|
|
1145
1083
|
super(options);
|
|
1146
|
-
__privateAdd(this,
|
|
1147
|
-
__privateAdd(this, _SetVal4);
|
|
1148
|
-
__privateAdd(this, _convertMS);
|
|
1084
|
+
__privateAdd(this, _InstrumentTimerGauge_instances);
|
|
1149
1085
|
__privateAdd(this, _start, 0);
|
|
1150
1086
|
__privateAdd(this, _copy4, false);
|
|
1151
1087
|
__privateAdd(this, _pauseVal, 0);
|
|
@@ -1171,9 +1107,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1171
1107
|
} else {
|
|
1172
1108
|
Object.defineProperty(this, "val", {
|
|
1173
1109
|
enumerable: true,
|
|
1174
|
-
get: () => __privateMethod(this,
|
|
1110
|
+
get: () => __privateMethod(this, _InstrumentTimerGauge_instances, GetVal_fn4).call(this),
|
|
1175
1111
|
set: (value) => {
|
|
1176
|
-
__privateMethod(this,
|
|
1112
|
+
__privateMethod(this, _InstrumentTimerGauge_instances, SetVal_fn4).call(this, value);
|
|
1177
1113
|
}
|
|
1178
1114
|
});
|
|
1179
1115
|
}
|
|
@@ -1221,7 +1157,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1221
1157
|
_start = new WeakMap();
|
|
1222
1158
|
_copy4 = new WeakMap();
|
|
1223
1159
|
_pauseVal = new WeakMap();
|
|
1224
|
-
|
|
1160
|
+
_InstrumentTimerGauge_instances = new WeakSet();
|
|
1225
1161
|
GetVal_fn4 = function() {
|
|
1226
1162
|
if (__privateGet(this, _pauseVal) !== 0) {
|
|
1227
1163
|
return this.GetNumber(__privateGet(this, _pauseVal));
|
|
@@ -1232,7 +1168,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1232
1168
|
return this.GetNumber(performance.now() - __privateGet(this, _start));
|
|
1233
1169
|
}
|
|
1234
1170
|
};
|
|
1235
|
-
_SetVal4 = new WeakSet();
|
|
1236
1171
|
SetVal_fn4 = function(updatedValue) {
|
|
1237
1172
|
if (isNode) {
|
|
1238
1173
|
__privateSet(this, _start, performance.now() - updatedValue);
|
|
@@ -1240,7 +1175,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1240
1175
|
__privateSet(this, _start, performance.now() - updatedValue);
|
|
1241
1176
|
}
|
|
1242
1177
|
};
|
|
1243
|
-
_convertMS = new WeakSet();
|
|
1244
1178
|
convertMS_fn = function(ms) {
|
|
1245
1179
|
let s = Math.floor(ms / 1e3);
|
|
1246
1180
|
let m = Math.floor(s / 60);
|
|
@@ -1893,8 +1827,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1893
1827
|
}, []);
|
|
1894
1828
|
}
|
|
1895
1829
|
function getPsValue(p, list) {
|
|
1896
|
-
if (p === 0)
|
|
1897
|
-
return list[0];
|
|
1830
|
+
if (p === 0) return list[0];
|
|
1898
1831
|
var kIndex = Math.ceil(list.length * (p / 100)) - 1;
|
|
1899
1832
|
return list[kIndex];
|
|
1900
1833
|
}
|
|
@@ -1911,10 +1844,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1911
1844
|
}
|
|
1912
1845
|
a = Number.isNaN(a) ? Number.NEGATIVE_INFINITY : a;
|
|
1913
1846
|
b = Number.isNaN(b) ? Number.NEGATIVE_INFINITY : b;
|
|
1914
|
-
if (a > b)
|
|
1915
|
-
|
|
1916
|
-
if (a < b)
|
|
1917
|
-
return -1;
|
|
1847
|
+
if (a > b) return 1;
|
|
1848
|
+
if (a < b) return -1;
|
|
1918
1849
|
return 0;
|
|
1919
1850
|
});
|
|
1920
1851
|
if (ps.length === 1) {
|
|
@@ -1946,18 +1877,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1946
1877
|
class InstrumentGauge extends InstrumentBase {
|
|
1947
1878
|
constructor(options = {}) {
|
|
1948
1879
|
super(options);
|
|
1949
|
-
|
|
1950
|
-
* If the gauge is being monitored as part of a time series, get the most recent recorded value (max value) from within the time interval
|
|
1951
|
-
* otherwise, just return the current instant value.
|
|
1952
|
-
*/
|
|
1953
|
-
__privateAdd(this, _GetVal5);
|
|
1954
|
-
__privateAdd(this, _SetVal5);
|
|
1955
|
-
__privateAdd(this, _GetMin);
|
|
1956
|
-
__privateAdd(this, _GetMax);
|
|
1957
|
-
__privateAdd(this, _GetAverage);
|
|
1958
|
-
__privateAdd(this, _GetAndResetMaxVal);
|
|
1959
|
-
__privateAdd(this, _NumberCompare);
|
|
1960
|
-
__privateAdd(this, _GetPercentileData);
|
|
1880
|
+
__privateAdd(this, _InstrumentGauge_instances);
|
|
1961
1881
|
__privateAdd(this, _val2, 0);
|
|
1962
1882
|
__privateAdd(this, _maxval, null);
|
|
1963
1883
|
__privateAdd(this, _lastObservedValue, 0);
|
|
@@ -2011,15 +1931,15 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2011
1931
|
} else {
|
|
2012
1932
|
Object.defineProperty(this, "val", {
|
|
2013
1933
|
enumerable: true,
|
|
2014
|
-
get: () => __privateMethod(this,
|
|
1934
|
+
get: () => __privateMethod(this, _InstrumentGauge_instances, GetVal_fn5).call(this),
|
|
2015
1935
|
set: (value) => {
|
|
2016
|
-
__privateMethod(this,
|
|
1936
|
+
__privateMethod(this, _InstrumentGauge_instances, SetVal_fn5).call(this, value);
|
|
2017
1937
|
}
|
|
2018
1938
|
});
|
|
2019
1939
|
if (__privateGet(this, _timerInterval2) > 0) {
|
|
2020
1940
|
Object.defineProperty(this, "percentile", {
|
|
2021
1941
|
enumerable: true,
|
|
2022
|
-
get: () => __privateMethod(this,
|
|
1942
|
+
get: () => __privateMethod(this, _InstrumentGauge_instances, GetPercentileData_fn).call(this)
|
|
2023
1943
|
});
|
|
2024
1944
|
this._StartTimer();
|
|
2025
1945
|
}
|
|
@@ -2051,21 +1971,21 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2051
1971
|
WithMin() {
|
|
2052
1972
|
Object.defineProperty(this, "min", {
|
|
2053
1973
|
enumerable: true,
|
|
2054
|
-
get: () => __privateMethod(this,
|
|
1974
|
+
get: () => __privateMethod(this, _InstrumentGauge_instances, GetMin_fn).call(this)
|
|
2055
1975
|
});
|
|
2056
1976
|
return this;
|
|
2057
1977
|
}
|
|
2058
1978
|
WithMax() {
|
|
2059
1979
|
Object.defineProperty(this, "max", {
|
|
2060
1980
|
enumerable: true,
|
|
2061
|
-
get: () => __privateMethod(this,
|
|
1981
|
+
get: () => __privateMethod(this, _InstrumentGauge_instances, GetMax_fn).call(this)
|
|
2062
1982
|
});
|
|
2063
1983
|
return this;
|
|
2064
1984
|
}
|
|
2065
1985
|
WithAverage() {
|
|
2066
1986
|
Object.defineProperty(this, "avg", {
|
|
2067
1987
|
enumerable: true,
|
|
2068
|
-
get: () => __privateMethod(this,
|
|
1988
|
+
get: () => __privateMethod(this, _InstrumentGauge_instances, GetAverage_fn).call(this)
|
|
2069
1989
|
});
|
|
2070
1990
|
return this;
|
|
2071
1991
|
}
|
|
@@ -2076,7 +1996,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2076
1996
|
if (__privateGet(this, _timeSeriesList).length > __privateGet(this, _maxSampleSize)) {
|
|
2077
1997
|
__privateGet(this, _timeSeriesList).shift();
|
|
2078
1998
|
}
|
|
2079
|
-
const maxval = __privateMethod(this,
|
|
1999
|
+
const maxval = __privateMethod(this, _InstrumentGauge_instances, GetAndResetMaxVal_fn).call(this);
|
|
2080
2000
|
__privateGet(this, _timeSeriesList).push(maxval);
|
|
2081
2001
|
}, __privateGet(this, _timerInterval2)));
|
|
2082
2002
|
if (isNode) {
|
|
@@ -2107,10 +2027,10 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2107
2027
|
}
|
|
2108
2028
|
}
|
|
2109
2029
|
Inc(incVal = 1) {
|
|
2110
|
-
__privateMethod(this,
|
|
2030
|
+
__privateMethod(this, _InstrumentGauge_instances, SetVal_fn5).call(this, __privateGet(this, _val2) + incVal);
|
|
2111
2031
|
}
|
|
2112
2032
|
Dec(decVal = 1) {
|
|
2113
|
-
__privateMethod(this,
|
|
2033
|
+
__privateMethod(this, _InstrumentGauge_instances, SetVal_fn5).call(this, __privateGet(this, _val2) - decVal);
|
|
2114
2034
|
}
|
|
2115
2035
|
ProcessTelemetry(telemetry) {
|
|
2116
2036
|
if (telemetry.Inc) {
|
|
@@ -2136,7 +2056,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2136
2056
|
_observations = new WeakMap();
|
|
2137
2057
|
_total = new WeakMap();
|
|
2138
2058
|
_copy5 = new WeakMap();
|
|
2139
|
-
|
|
2059
|
+
_InstrumentGauge_instances = new WeakSet();
|
|
2060
|
+
/**
|
|
2061
|
+
* If the gauge is being monitored as part of a time series, get the most recent recorded value (max value) from within the time interval
|
|
2062
|
+
* otherwise, just return the current instant value.
|
|
2063
|
+
*/
|
|
2140
2064
|
GetVal_fn5 = function() {
|
|
2141
2065
|
if (__privateGet(this, _timerInterval2) > 0 && __privateGet(this, _observer) !== null) {
|
|
2142
2066
|
if (__privateGet(this, _maxval) === null) {
|
|
@@ -2147,7 +2071,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2147
2071
|
}
|
|
2148
2072
|
return this.GetNumber(__privateGet(this, _val2));
|
|
2149
2073
|
};
|
|
2150
|
-
_SetVal5 = new WeakSet();
|
|
2151
2074
|
SetVal_fn5 = function(updatedValue) {
|
|
2152
2075
|
__privateSet(this, _val2, updatedValue);
|
|
2153
2076
|
__privateWrapper(this, _observations)._++;
|
|
@@ -2171,25 +2094,21 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2171
2094
|
}
|
|
2172
2095
|
}
|
|
2173
2096
|
};
|
|
2174
|
-
_GetMin = new WeakSet();
|
|
2175
2097
|
GetMin_fn = function() {
|
|
2176
2098
|
if (__privateGet(this, _min) !== null) {
|
|
2177
2099
|
return __privateGet(this, _min);
|
|
2178
2100
|
}
|
|
2179
2101
|
return 0;
|
|
2180
2102
|
};
|
|
2181
|
-
_GetMax = new WeakSet();
|
|
2182
2103
|
GetMax_fn = function() {
|
|
2183
2104
|
return __privateGet(this, _max);
|
|
2184
2105
|
};
|
|
2185
|
-
_GetAverage = new WeakSet();
|
|
2186
2106
|
GetAverage_fn = function() {
|
|
2187
2107
|
if (__privateGet(this, _observations) > 0) {
|
|
2188
2108
|
return __privateGet(this, _total) / __privateGet(this, _observations);
|
|
2189
2109
|
}
|
|
2190
2110
|
return 0;
|
|
2191
2111
|
};
|
|
2192
|
-
_GetAndResetMaxVal = new WeakSet();
|
|
2193
2112
|
GetAndResetMaxVal_fn = function() {
|
|
2194
2113
|
if (__privateGet(this, _maxval) === null) {
|
|
2195
2114
|
return __privateGet(this, _lastObservedValue);
|
|
@@ -2198,14 +2117,12 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2198
2117
|
__privateSet(this, _maxval, null);
|
|
2199
2118
|
return retVal;
|
|
2200
2119
|
};
|
|
2201
|
-
_NumberCompare = new WeakSet();
|
|
2202
2120
|
NumberCompare_fn = function(a, b) {
|
|
2203
2121
|
return a - b;
|
|
2204
2122
|
};
|
|
2205
|
-
_GetPercentileData = new WeakSet();
|
|
2206
2123
|
GetPercentileData_fn = function() {
|
|
2207
2124
|
const sortedList = __privateGet(this, _timeSeriesList).slice(0);
|
|
2208
|
-
timsort.sort(sortedList, __privateMethod(this,
|
|
2125
|
+
timsort.sort(sortedList, __privateMethod(this, _InstrumentGauge_instances, NumberCompare_fn));
|
|
2209
2126
|
return percentile$1([50, 80, 90, 95, 99, 99.95], sortedList);
|
|
2210
2127
|
};
|
|
2211
2128
|
class InstrumentObjectOptions extends InstrumentBaseOptions {
|
|
@@ -2224,8 +2141,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2224
2141
|
class InstrumentObject extends InstrumentBase {
|
|
2225
2142
|
constructor(options = {}) {
|
|
2226
2143
|
super(options);
|
|
2227
|
-
__privateAdd(this,
|
|
2228
|
-
__privateAdd(this, _SetVal6);
|
|
2144
|
+
__privateAdd(this, _InstrumentObject_instances);
|
|
2229
2145
|
__privateAdd(this, _val3, {});
|
|
2230
2146
|
__privateAdd(this, _copy6, false);
|
|
2231
2147
|
__publicField(this, "val");
|
|
@@ -2250,9 +2166,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2250
2166
|
} else {
|
|
2251
2167
|
Object.defineProperty(this, "val", {
|
|
2252
2168
|
enumerable: true,
|
|
2253
|
-
get: () => __privateMethod(this,
|
|
2169
|
+
get: () => __privateMethod(this, _InstrumentObject_instances, GetVal_fn6).call(this),
|
|
2254
2170
|
set: (value) => {
|
|
2255
|
-
__privateMethod(this,
|
|
2171
|
+
__privateMethod(this, _InstrumentObject_instances, SetVal_fn6).call(this, value);
|
|
2256
2172
|
}
|
|
2257
2173
|
});
|
|
2258
2174
|
}
|
|
@@ -2278,11 +2194,10 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2278
2194
|
}
|
|
2279
2195
|
_val3 = new WeakMap();
|
|
2280
2196
|
_copy6 = new WeakMap();
|
|
2281
|
-
|
|
2197
|
+
_InstrumentObject_instances = new WeakSet();
|
|
2282
2198
|
GetVal_fn6 = function() {
|
|
2283
2199
|
return __privateGet(this, _val3);
|
|
2284
2200
|
};
|
|
2285
|
-
_SetVal6 = new WeakSet();
|
|
2286
2201
|
SetVal_fn6 = function(updatedValue) {
|
|
2287
2202
|
__privateSet(this, _val3, updatedValue);
|
|
2288
2203
|
};
|
|
@@ -2553,8 +2468,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2553
2468
|
var colorName;
|
|
2554
2469
|
var hasRequiredColorName;
|
|
2555
2470
|
function requireColorName() {
|
|
2556
|
-
if (hasRequiredColorName)
|
|
2557
|
-
return colorName;
|
|
2471
|
+
if (hasRequiredColorName) return colorName;
|
|
2558
2472
|
hasRequiredColorName = 1;
|
|
2559
2473
|
colorName = {
|
|
2560
2474
|
"aliceblue": [240, 248, 255],
|
|
@@ -2711,8 +2625,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2711
2625
|
var conversions;
|
|
2712
2626
|
var hasRequiredConversions;
|
|
2713
2627
|
function requireConversions() {
|
|
2714
|
-
if (hasRequiredConversions)
|
|
2715
|
-
return conversions;
|
|
2628
|
+
if (hasRequiredConversions) return conversions;
|
|
2716
2629
|
hasRequiredConversions = 1;
|
|
2717
2630
|
const cssKeywords = requireColorName();
|
|
2718
2631
|
const reverseKeywords = {};
|
|
@@ -3384,8 +3297,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3384
3297
|
var route;
|
|
3385
3298
|
var hasRequiredRoute;
|
|
3386
3299
|
function requireRoute() {
|
|
3387
|
-
if (hasRequiredRoute)
|
|
3388
|
-
return route;
|
|
3300
|
+
if (hasRequiredRoute) return route;
|
|
3389
3301
|
hasRequiredRoute = 1;
|
|
3390
3302
|
const conversions2 = requireConversions();
|
|
3391
3303
|
function buildGraph() {
|
|
@@ -3456,8 +3368,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3456
3368
|
var colorConvert;
|
|
3457
3369
|
var hasRequiredColorConvert;
|
|
3458
3370
|
function requireColorConvert() {
|
|
3459
|
-
if (hasRequiredColorConvert)
|
|
3460
|
-
return colorConvert;
|
|
3371
|
+
if (hasRequiredColorConvert) return colorConvert;
|
|
3461
3372
|
hasRequiredColorConvert = 1;
|
|
3462
3373
|
const conversions2 = requireConversions();
|
|
3463
3374
|
const route2 = requireRoute();
|
|
@@ -3694,8 +3605,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3694
3605
|
var templates;
|
|
3695
3606
|
var hasRequiredTemplates;
|
|
3696
3607
|
function requireTemplates() {
|
|
3697
|
-
if (hasRequiredTemplates)
|
|
3698
|
-
return templates;
|
|
3608
|
+
if (hasRequiredTemplates) return templates;
|
|
3699
3609
|
hasRequiredTemplates = 1;
|
|
3700
3610
|
const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
3701
3611
|
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
@@ -3987,14 +3897,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3987
3897
|
class PublishInstrumentController extends stsutils.STSOptionsBase {
|
|
3988
3898
|
constructor(options) {
|
|
3989
3899
|
super(options);
|
|
3990
|
-
__privateAdd(this,
|
|
3991
|
-
__privateAdd(this, _ProcessTelemetryCommand);
|
|
3992
|
-
// Instrument factory
|
|
3993
|
-
__privateAdd(this, _CreateInstrument);
|
|
3994
|
-
__privateAdd(this, _CreateInstruments);
|
|
3995
|
-
__privateAdd(this, _GetPayloadData);
|
|
3996
|
-
__privateAdd(this, _PublishTimeoutLoop);
|
|
3997
|
-
__privateAdd(this, _UpdateState);
|
|
3900
|
+
__privateAdd(this, _PublishInstrumentController_instances);
|
|
3998
3901
|
__privateAdd(this, _instruments, {});
|
|
3999
3902
|
__privateAdd(this, _inPublish, false);
|
|
4000
3903
|
__privateAdd(this, _observer2, null);
|
|
@@ -4004,7 +3907,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4004
3907
|
LogMessage: message
|
|
4005
3908
|
});
|
|
4006
3909
|
});
|
|
4007
|
-
__privateMethod(this,
|
|
3910
|
+
__privateMethod(this, _PublishInstrumentController_instances, UpdateState_fn).call(this, 0, "constructor()");
|
|
4008
3911
|
this.SetupInstrumentation();
|
|
4009
3912
|
this.StartPublish();
|
|
4010
3913
|
}
|
|
@@ -4018,7 +3921,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4018
3921
|
try {
|
|
4019
3922
|
__privateSet(this, _inPublish, true);
|
|
4020
3923
|
if (Object.keys(__privateGet(this, _instruments)).length > 0) {
|
|
4021
|
-
const instrumentPayload = __privateMethod(this,
|
|
3924
|
+
const instrumentPayload = __privateMethod(this, _PublishInstrumentController_instances, GetPayloadData_fn).call(this, this.options.processContext, __privateGet(this, _instruments));
|
|
4022
3925
|
return await this.options.publisherTransport.Publish(instrumentPayload);
|
|
4023
3926
|
} else {
|
|
4024
3927
|
return true;
|
|
@@ -4034,8 +3937,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4034
3937
|
this.options.logger.debug(chalk$1.yellow(`StartPublish:${this.options.processContext.nid}: StartPublish called when not currently in the init state. Current State: [${__privateGet(this, _publishState)}]`));
|
|
4035
3938
|
return false;
|
|
4036
3939
|
}
|
|
4037
|
-
__privateMethod(this,
|
|
4038
|
-
__privateMethod(this,
|
|
3940
|
+
__privateMethod(this, _PublishInstrumentController_instances, UpdateState_fn).call(this, 1, "StartPublish()");
|
|
3941
|
+
__privateMethod(this, _PublishInstrumentController_instances, PublishTimeoutLoop_fn).call(this, this.options.publishInterval);
|
|
4039
3942
|
return true;
|
|
4040
3943
|
}
|
|
4041
3944
|
async EndPublish() {
|
|
@@ -4043,14 +3946,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4043
3946
|
this.options.logger.debug(chalk$1.yellow(`EndPublish:${this.options.processContext.nid}: EndPublish called when not within the started state. Current State: [${__privateGet(this, _publishState)}]`));
|
|
4044
3947
|
return false;
|
|
4045
3948
|
}
|
|
4046
|
-
__privateMethod(this,
|
|
3949
|
+
__privateMethod(this, _PublishInstrumentController_instances, UpdateState_fn).call(this, 2, "EndPublish() (1)");
|
|
4047
3950
|
if (__privateGet(this, _observer2) !== null) {
|
|
4048
3951
|
clearInterval(__privateGet(this, _observer2));
|
|
4049
3952
|
__privateSet(this, _observer2, null);
|
|
4050
3953
|
await this.Publish();
|
|
4051
3954
|
}
|
|
4052
3955
|
await this.options.publisherTransport.Close();
|
|
4053
|
-
__privateMethod(this,
|
|
3956
|
+
__privateMethod(this, _PublishInstrumentController_instances, UpdateState_fn).call(this, 0, "EndPublish() (2)");
|
|
4054
3957
|
return true;
|
|
4055
3958
|
}
|
|
4056
3959
|
SetupInstrumentation() {
|
|
@@ -4062,7 +3965,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4062
3965
|
this.options.logger.debug(chalk$1.yellow(`SetupInstrumentation: No context defined within supplied options.`));
|
|
4063
3966
|
return;
|
|
4064
3967
|
}
|
|
4065
|
-
__privateMethod(this,
|
|
3968
|
+
__privateMethod(this, _PublishInstrumentController_instances, CreateInstruments_fn).call(this, this.options.instrumentDefinitions);
|
|
4066
3969
|
}
|
|
4067
3970
|
/**
|
|
4068
3971
|
* Check if an instrument exists within the managed instrument collection
|
|
@@ -4082,7 +3985,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4082
3985
|
*/
|
|
4083
3986
|
UpdateInstrument(instrumentName, telemetry) {
|
|
4084
3987
|
if (__privateGet(this, _instruments)[instrumentName]) {
|
|
4085
|
-
__privateMethod(this,
|
|
3988
|
+
__privateMethod(this, _PublishInstrumentController_instances, ProcessTelemetryCommand_fn).call(this, instrumentName, telemetry);
|
|
4086
3989
|
} else {
|
|
4087
3990
|
this.options.logger.debug(chalk$1.red(`UpdateInstrument:${this.options.processContext.nid}: Attempted to UpdateInstrument before initialised.`));
|
|
4088
3991
|
}
|
|
@@ -4207,18 +4110,17 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4207
4110
|
_inPublish = new WeakMap();
|
|
4208
4111
|
_observer2 = new WeakMap();
|
|
4209
4112
|
_publishState = new WeakMap();
|
|
4210
|
-
|
|
4113
|
+
_PublishInstrumentController_instances = new WeakSet();
|
|
4211
4114
|
GetInstrument_fn = function(instrumentName) {
|
|
4212
4115
|
return __privateGet(this, _instruments)[instrumentName];
|
|
4213
4116
|
};
|
|
4214
|
-
_ProcessTelemetryCommand = new WeakSet();
|
|
4215
4117
|
ProcessTelemetryCommand_fn = function(instrumentName, telemetry) {
|
|
4216
|
-
const instrument = __privateMethod(this,
|
|
4118
|
+
const instrument = __privateMethod(this, _PublishInstrumentController_instances, GetInstrument_fn).call(this, instrumentName);
|
|
4217
4119
|
if (instrument) {
|
|
4218
4120
|
instrument.ProcessTelemetry(telemetry);
|
|
4219
4121
|
}
|
|
4220
4122
|
};
|
|
4221
|
-
|
|
4123
|
+
// Instrument factory
|
|
4222
4124
|
CreateInstrument_fn = function(instrumentType, options) {
|
|
4223
4125
|
let instrument;
|
|
4224
4126
|
switch (instrumentType) {
|
|
@@ -4245,17 +4147,15 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4245
4147
|
}
|
|
4246
4148
|
return instrument;
|
|
4247
4149
|
};
|
|
4248
|
-
_CreateInstruments = new WeakSet();
|
|
4249
4150
|
CreateInstruments_fn = function(payload) {
|
|
4250
4151
|
payload.forEach((instrumentDefinition) => {
|
|
4251
4152
|
const g = instrumentDefinition[0];
|
|
4252
4153
|
const gt = instrumentDefinition[1];
|
|
4253
4154
|
const instrumentBaseOptions = instrumentDefinition[2];
|
|
4254
|
-
const instrument = __privateMethod(this,
|
|
4155
|
+
const instrument = __privateMethod(this, _PublishInstrumentController_instances, CreateInstrument_fn).call(this, gt, instrumentBaseOptions);
|
|
4255
4156
|
__privateGet(this, _instruments)[g] = instrument;
|
|
4256
4157
|
});
|
|
4257
4158
|
};
|
|
4258
|
-
_GetPayloadData = new WeakSet();
|
|
4259
4159
|
GetPayloadData_fn = function(context, instruments) {
|
|
4260
4160
|
const payloadInstruments = {};
|
|
4261
4161
|
for (const [key, value] of Object.entries(instruments)) {
|
|
@@ -4270,7 +4170,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4270
4170
|
instruments: payloadInstruments
|
|
4271
4171
|
};
|
|
4272
4172
|
};
|
|
4273
|
-
_PublishTimeoutLoop = new WeakSet();
|
|
4274
4173
|
PublishTimeoutLoop_fn = function(publishInterval) {
|
|
4275
4174
|
__privateSet(this, _observer2, setTimeout(async () => {
|
|
4276
4175
|
const start = performance.now();
|
|
@@ -4278,13 +4177,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4278
4177
|
const end = performance.now();
|
|
4279
4178
|
const diff = end - start;
|
|
4280
4179
|
if (__privateGet(this, _publishState) === 1) {
|
|
4281
|
-
__privateMethod(this,
|
|
4180
|
+
__privateMethod(this, _PublishInstrumentController_instances, PublishTimeoutLoop_fn).call(this, this.options.publishInterval - diff);
|
|
4282
4181
|
}
|
|
4283
4182
|
}, publishInterval));
|
|
4284
|
-
if (isNode)
|
|
4285
|
-
__privateGet(this, _observer2).unref();
|
|
4183
|
+
if (isNode) __privateGet(this, _observer2).unref();
|
|
4286
4184
|
};
|
|
4287
|
-
_UpdateState = new WeakSet();
|
|
4288
4185
|
UpdateState_fn = function(newState, comment) {
|
|
4289
4186
|
const previousState = __privateGet(this, _publishState);
|
|
4290
4187
|
__privateSet(this, _publishState, newState);
|
|
@@ -4427,9 +4324,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4427
4324
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
4428
4325
|
d2.__proto__ = b2;
|
|
4429
4326
|
} || function(d2, b2) {
|
|
4430
|
-
for (var p in b2)
|
|
4431
|
-
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
4432
|
-
d2[p] = b2[p];
|
|
4327
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
4433
4328
|
};
|
|
4434
4329
|
return extendStatics(d, b);
|
|
4435
4330
|
};
|
|
@@ -4979,7 +4874,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
4979
4874
|
class PublishTransportRESTServer extends stsutils.STSOptionsBase {
|
|
4980
4875
|
constructor(options) {
|
|
4981
4876
|
super(options);
|
|
4982
|
-
__privateAdd(this, _httpsAgent
|
|
4877
|
+
__privateAdd(this, _httpsAgent);
|
|
4983
4878
|
// Returns true for success or false for failure.
|
|
4984
4879
|
__publicField(this, "Publish", async (payload) => {
|
|
4985
4880
|
try {
|
|
@@ -5613,7 +5508,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5613
5508
|
class KafkaHelper {
|
|
5614
5509
|
constructor(options) {
|
|
5615
5510
|
__privateAdd(this, _kafkaLog, {});
|
|
5616
|
-
__privateAdd(this, _maxLogLength
|
|
5511
|
+
__privateAdd(this, _maxLogLength);
|
|
5617
5512
|
__publicField(this, "GetKafkaLogData", (kafkaTopic, modelNode) => {
|
|
5618
5513
|
if (__privateGet(this, _kafkaLog)[kafkaTopic]) {
|
|
5619
5514
|
modelNode.instruments[Gauge.LOGGER] = ObservabilityModelUtils.GetModelNodeRawStringArray(__privateGet(this, _kafkaLog)[kafkaTopic].kafkaLog);
|
|
@@ -5644,19 +5539,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5644
5539
|
_maxLogLength = new WeakMap();
|
|
5645
5540
|
class ObservabilityRESTAPISubscriber {
|
|
5646
5541
|
constructor(options) {
|
|
5647
|
-
__privateAdd(this,
|
|
5648
|
-
__privateAdd(this, _LogErrorMessage);
|
|
5649
|
-
__privateAdd(this, _InvokeRESTAPI);
|
|
5650
|
-
__privateAdd(this, _SetupTimeout);
|
|
5651
|
-
__privateAdd(this, _AddKeepAlive);
|
|
5652
|
-
__privateAdd(this, _RemoveKeepAlive);
|
|
5542
|
+
__privateAdd(this, _ObservabilityRESTAPISubscriber_instances);
|
|
5653
5543
|
__privateAdd(this, _socketSubscribeKeepAlive, {});
|
|
5654
|
-
__privateAdd(this, _options2
|
|
5544
|
+
__privateAdd(this, _options2);
|
|
5655
5545
|
// This is required becuase each call to .bind create a new replica bound function - so we need the same instance for on/off event bindings.
|
|
5656
5546
|
__publicField(this, "KeepAliveAckBoundFunction");
|
|
5657
5547
|
__privateAdd(this, _GetData, async (subscription) => {
|
|
5658
5548
|
try {
|
|
5659
|
-
const retVal = await __privateMethod(this,
|
|
5549
|
+
const retVal = await __privateMethod(this, _ObservabilityRESTAPISubscriber_instances, InvokeRESTAPI_fn).call(this, subscription);
|
|
5660
5550
|
if (retVal) {
|
|
5661
5551
|
const payload = {
|
|
5662
5552
|
subscriptionKey: subscription.subscriptionKey,
|
|
@@ -5665,8 +5555,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5665
5555
|
subscription.cb(payload);
|
|
5666
5556
|
}
|
|
5667
5557
|
} catch (error) {
|
|
5668
|
-
__privateMethod(this,
|
|
5669
|
-
__privateMethod(this,
|
|
5558
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, LogErrorMessage_fn).call(this, chalk$1.red(`ObservabilityRESTAPISubscriber:#AddKeepAlive(): Error response: [${JSON.stringify(error)}]`));
|
|
5559
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, RemoveKeepAlive_fn).call(this, subscription);
|
|
5670
5560
|
}
|
|
5671
5561
|
});
|
|
5672
5562
|
__privateSet(this, _options2, options);
|
|
@@ -5676,13 +5566,13 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5676
5566
|
}
|
|
5677
5567
|
async Subscribe(subscriptions) {
|
|
5678
5568
|
subscriptions.map(async (subId) => {
|
|
5679
|
-
__privateMethod(this,
|
|
5680
|
-
__privateMethod(this,
|
|
5569
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, RemoveKeepAlive_fn).call(this, subId);
|
|
5570
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, LogDebugMessage_fn).call(this, chalk$1.yellow(`ObservabilityRESTAPISubscriber:Subscribe(): Sending subscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));
|
|
5681
5571
|
try {
|
|
5682
|
-
__privateMethod(this,
|
|
5572
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, AddKeepAlive_fn).call(this, subId);
|
|
5683
5573
|
} catch (error) {
|
|
5684
|
-
__privateMethod(this,
|
|
5685
|
-
__privateMethod(this,
|
|
5574
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, LogErrorMessage_fn).call(this, chalk$1.red(`ObservabilityRESTAPISubscriber:Subscribe(): Error: response: [${JSON.stringify(error)}]`));
|
|
5575
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, RemoveKeepAlive_fn).call(this, subId);
|
|
5686
5576
|
}
|
|
5687
5577
|
});
|
|
5688
5578
|
}
|
|
@@ -5691,22 +5581,20 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5691
5581
|
}
|
|
5692
5582
|
UnSubscribe(subscriptions) {
|
|
5693
5583
|
subscriptions.map(async (subId) => {
|
|
5694
|
-
__privateMethod(this,
|
|
5695
|
-
__privateMethod(this,
|
|
5584
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, RemoveKeepAlive_fn).call(this, subId);
|
|
5585
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, LogDebugMessage_fn).call(this, chalk$1.yellow(`ObservabilityRESTAPISubscriber:UnSubscribe(): Sending unsubscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));
|
|
5696
5586
|
});
|
|
5697
5587
|
}
|
|
5698
5588
|
}
|
|
5699
5589
|
_socketSubscribeKeepAlive = new WeakMap();
|
|
5700
5590
|
_options2 = new WeakMap();
|
|
5701
|
-
|
|
5591
|
+
_ObservabilityRESTAPISubscriber_instances = new WeakSet();
|
|
5702
5592
|
LogDebugMessage_fn = function(message) {
|
|
5703
5593
|
__privateGet(this, _options2).logger.debug(message);
|
|
5704
5594
|
};
|
|
5705
|
-
_LogErrorMessage = new WeakSet();
|
|
5706
5595
|
LogErrorMessage_fn = function(message) {
|
|
5707
5596
|
__privateGet(this, _options2).logger.error(message);
|
|
5708
5597
|
};
|
|
5709
|
-
_InvokeRESTAPI = new WeakSet();
|
|
5710
5598
|
InvokeRESTAPI_fn = async function(subscription) {
|
|
5711
5599
|
const { subscriptionKey } = subscription;
|
|
5712
5600
|
let url = "";
|
|
@@ -5816,7 +5704,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5816
5704
|
}
|
|
5817
5705
|
};
|
|
5818
5706
|
_GetData = new WeakMap();
|
|
5819
|
-
_SetupTimeout = new WeakSet();
|
|
5820
5707
|
SetupTimeout_fn = function(socketSubscribeKeepAlive, subscription, timeout) {
|
|
5821
5708
|
return setTimeout(async () => {
|
|
5822
5709
|
try {
|
|
@@ -5829,30 +5716,28 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5829
5716
|
if (timeoutDuration < 500) {
|
|
5830
5717
|
timeoutDuration = 500;
|
|
5831
5718
|
}
|
|
5832
|
-
socketSubscribeKeepAlive.timeout = __privateMethod(this,
|
|
5719
|
+
socketSubscribeKeepAlive.timeout = __privateMethod(this, _ObservabilityRESTAPISubscriber_instances, SetupTimeout_fn).call(this, socketSubscribeKeepAlive, subscription, timeoutDuration);
|
|
5833
5720
|
} else {
|
|
5834
|
-
__privateMethod(this,
|
|
5721
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, LogDebugMessage_fn).call(this, chalk$1.yellow(`Subscription removed: [${socketSubscribeKeepAlive.id}]. Processing terminate.`));
|
|
5835
5722
|
}
|
|
5836
5723
|
} catch (error) {
|
|
5837
|
-
__privateMethod(this,
|
|
5838
|
-
__privateMethod(this,
|
|
5724
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, LogErrorMessage_fn).call(this, chalk$1.red(`ObservabilityRESTAPISubscriber:#AddKeepAlive(): Error response: [${JSON.stringify(error)}]`));
|
|
5725
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, RemoveKeepAlive_fn).call(this, subscription);
|
|
5839
5726
|
}
|
|
5840
5727
|
}, timeout);
|
|
5841
5728
|
};
|
|
5842
|
-
_AddKeepAlive = new WeakSet();
|
|
5843
5729
|
AddKeepAlive_fn = function(subscription) {
|
|
5844
|
-
__privateMethod(this,
|
|
5730
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, RemoveKeepAlive_fn).call(this, subscription);
|
|
5845
5731
|
const socketSubscribeKeepAlive = {
|
|
5846
5732
|
id: subscription.subscriptionKey.id
|
|
5847
5733
|
};
|
|
5848
|
-
socketSubscribeKeepAlive.timeout = __privateMethod(this,
|
|
5734
|
+
socketSubscribeKeepAlive.timeout = __privateMethod(this, _ObservabilityRESTAPISubscriber_instances, SetupTimeout_fn).call(this, socketSubscribeKeepAlive, subscription, __privateGet(this, _options2).keepAlive);
|
|
5849
5735
|
__privateGet(this, _socketSubscribeKeepAlive)[subscription.subscriptionKey.id] = socketSubscribeKeepAlive;
|
|
5850
5736
|
__privateGet(this, _GetData).call(this, subscription);
|
|
5851
5737
|
};
|
|
5852
|
-
_RemoveKeepAlive = new WeakSet();
|
|
5853
5738
|
RemoveKeepAlive_fn = function(subscription) {
|
|
5854
5739
|
if (__privateGet(this, _socketSubscribeKeepAlive)[subscription.subscriptionKey.id]) {
|
|
5855
|
-
__privateMethod(this,
|
|
5740
|
+
__privateMethod(this, _ObservabilityRESTAPISubscriber_instances, LogDebugMessage_fn).call(this, chalk$1.gray(`ObservabilityRESTAPISubscriber:#RemoveKeepAlive(): subscriptionKey: [${subscription.subscriptionKey.id}]`));
|
|
5856
5741
|
clearTimeout(__privateGet(this, _socketSubscribeKeepAlive)[subscription.subscriptionKey.id].timeout);
|
|
5857
5742
|
delete __privateGet(this, _socketSubscribeKeepAlive)[subscription.subscriptionKey.id].timeout;
|
|
5858
5743
|
delete __privateGet(this, _socketSubscribeKeepAlive)[subscription.subscriptionKey.id];
|
|
@@ -5914,15 +5799,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5914
5799
|
})(messageStatusResponse || {});
|
|
5915
5800
|
class SocketIoMessageSender {
|
|
5916
5801
|
constructor(options) {
|
|
5917
|
-
__privateAdd(this,
|
|
5918
|
-
__privateAdd(this, _GetSubscribeKeepAliveAckEventName);
|
|
5802
|
+
__privateAdd(this, _SocketIoMessageSender_instances);
|
|
5919
5803
|
__privateAdd(this, _messageWithAckPayloadRecords, {});
|
|
5920
|
-
__privateAdd(this, _socket
|
|
5804
|
+
__privateAdd(this, _socket);
|
|
5921
5805
|
__privateAdd(this, _maxReties, 3);
|
|
5922
5806
|
//@@
|
|
5923
5807
|
__privateAdd(this, _timeoutValue, 5e3);
|
|
5924
5808
|
//@@
|
|
5925
|
-
__privateAdd(this, _options3
|
|
5809
|
+
__privateAdd(this, _options3);
|
|
5926
5810
|
__privateSet(this, _options3, options);
|
|
5927
5811
|
__privateSet(this, _socket, options.socket);
|
|
5928
5812
|
}
|
|
@@ -5930,38 +5814,38 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5930
5814
|
return __privateGet(this, _socket);
|
|
5931
5815
|
}
|
|
5932
5816
|
set socket(socket) {
|
|
5933
|
-
__privateMethod(this,
|
|
5817
|
+
__privateMethod(this, _SocketIoMessageSender_instances, LogDebugMessage_fn2).call(this, chalk$1.cyan(`SocketIoMessageSender:set socket(): new socket assigned`));
|
|
5934
5818
|
__privateSet(this, _socket, socket);
|
|
5935
5819
|
}
|
|
5936
5820
|
AckListener(message, payload) {
|
|
5937
5821
|
if (message.subscriptionKey.id.localeCompare(payload.id) === 0) {
|
|
5938
5822
|
clearTimeout(message.timeoutId);
|
|
5939
5823
|
delete message.timeoutId;
|
|
5940
|
-
__privateGet(this, _socket).off(__privateMethod(this,
|
|
5824
|
+
__privateGet(this, _socket).off(__privateMethod(this, _SocketIoMessageSender_instances, GetSubscribeKeepAliveAckEventName_fn).call(this, message.eventName, message.subscriptionKey), message.BoundAckListenerCallback);
|
|
5941
5825
|
message.endTime = performance.now();
|
|
5942
5826
|
message.duration = message.endTime - message.startTime;
|
|
5943
5827
|
message.status = "SUCCESS";
|
|
5944
5828
|
message.subscriptionKeyResponse = payload;
|
|
5945
5829
|
delete __privateGet(this, _messageWithAckPayloadRecords)[message.id];
|
|
5946
|
-
__privateMethod(this,
|
|
5830
|
+
__privateMethod(this, _SocketIoMessageSender_instances, LogDebugMessage_fn2).call(this, chalk$1.grey(`SocketIoMessageSender:AckListener(): ack received, event: [${message.eventName}], subscriptionKey: [${message.subscriptionKey.id}]`));
|
|
5947
5831
|
message.resolve(message);
|
|
5948
5832
|
}
|
|
5949
5833
|
}
|
|
5950
5834
|
ResponseTimout(message) {
|
|
5951
|
-
__privateMethod(this,
|
|
5835
|
+
__privateMethod(this, _SocketIoMessageSender_instances, LogDebugMessage_fn2).call(this, chalk$1.magenta(`SocketIoMessageSender:ResponseTimout(): timeout reached: [${__privateGet(this, _timeoutValue)}], event: [${message.eventName}], subscriptionKey: [${message.subscriptionKey.id}]`));
|
|
5952
5836
|
delete message.timeoutId;
|
|
5953
|
-
__privateGet(this, _socket).off(__privateMethod(this,
|
|
5837
|
+
__privateGet(this, _socket).off(__privateMethod(this, _SocketIoMessageSender_instances, GetSubscribeKeepAliveAckEventName_fn).call(this, message.eventName, message.subscriptionKey), message.BoundAckListenerCallback);
|
|
5954
5838
|
message.endTime = performance.now();
|
|
5955
5839
|
if (message.retryCount >= __privateGet(this, _maxReties)) {
|
|
5956
5840
|
message.status = "FAIL";
|
|
5957
|
-
__privateMethod(this,
|
|
5841
|
+
__privateMethod(this, _SocketIoMessageSender_instances, LogDebugMessage_fn2).call(this, chalk$1.red(`SocketIoMessageSender:ResponseTimout(): timeout reached after ${__privateGet(this, _maxReties)} retries, event: [${message.eventName}], subscriptionKey: [${message.subscriptionKey.id}]`));
|
|
5958
5842
|
delete __privateGet(this, _messageWithAckPayloadRecords)[message.id];
|
|
5959
5843
|
message.reject(message);
|
|
5960
5844
|
return;
|
|
5961
5845
|
}
|
|
5962
5846
|
message.status = "INRETRY";
|
|
5963
5847
|
message.retryCount++;
|
|
5964
|
-
__privateMethod(this,
|
|
5848
|
+
__privateMethod(this, _SocketIoMessageSender_instances, LogDebugMessage_fn2).call(this, chalk$1.magenta(`SocketIoMessageSender:ResponseTimout(): timeout reached, retrying. Retries: [${message.retryCount}], event: [${message.eventName}], subscriptionKey: [${message.subscriptionKey.id}]`));
|
|
5965
5849
|
this.SendMessage(message);
|
|
5966
5850
|
}
|
|
5967
5851
|
SendMessage(message) {
|
|
@@ -5973,8 +5857,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5973
5857
|
this.AckListener(message, payload);
|
|
5974
5858
|
};
|
|
5975
5859
|
message.BoundAckListenerCallback = AckListenerCallback.bind(this);
|
|
5976
|
-
__privateGet(this, _socket).on(__privateMethod(this,
|
|
5977
|
-
__privateMethod(this,
|
|
5860
|
+
__privateGet(this, _socket).on(__privateMethod(this, _SocketIoMessageSender_instances, GetSubscribeKeepAliveAckEventName_fn).call(this, message.eventName, message.subscriptionKey), message.BoundAckListenerCallback);
|
|
5861
|
+
__privateMethod(this, _SocketIoMessageSender_instances, LogDebugMessage_fn2).call(this, chalk$1.gray(`SocketIoMessageSender:SendMessage(): event: [${message.eventName}], subscriptionKey: [${message.subscriptionKey.id}]`));
|
|
5978
5862
|
__privateGet(this, _socket).emit(message.eventName, message.subscriptionKey);
|
|
5979
5863
|
}
|
|
5980
5864
|
SendMessageWithAck(eventName, subscriptionKey) {
|
|
@@ -5998,10 +5882,10 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5998
5882
|
const killIds = [];
|
|
5999
5883
|
for (const [, message] of Object.entries(__privateGet(this, _messageWithAckPayloadRecords))) {
|
|
6000
5884
|
if (message.subscriptionKey.id.localeCompare(subscriptionKey.id) === 0) {
|
|
6001
|
-
__privateMethod(this,
|
|
5885
|
+
__privateMethod(this, _SocketIoMessageSender_instances, LogDebugMessage_fn2).call(this, chalk$1.blue(`SocketIoMessageSender:KillMessageInFlight(): event: [${message.eventName}], subscriptionKey: [${message.subscriptionKey.id}]`));
|
|
6002
5886
|
clearTimeout(message.timeoutId);
|
|
6003
5887
|
delete message.timeoutId;
|
|
6004
|
-
__privateGet(this, _socket).off(__privateMethod(this,
|
|
5888
|
+
__privateGet(this, _socket).off(__privateMethod(this, _SocketIoMessageSender_instances, GetSubscribeKeepAliveAckEventName_fn).call(this, message.eventName, message.subscriptionKey), message.BoundAckListenerCallback);
|
|
6005
5889
|
killIds.push(message.id);
|
|
6006
5890
|
message.status = "KILLED";
|
|
6007
5891
|
message.reject(message);
|
|
@@ -6017,24 +5901,20 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6017
5901
|
_maxReties = new WeakMap();
|
|
6018
5902
|
_timeoutValue = new WeakMap();
|
|
6019
5903
|
_options3 = new WeakMap();
|
|
6020
|
-
|
|
5904
|
+
_SocketIoMessageSender_instances = new WeakSet();
|
|
6021
5905
|
LogDebugMessage_fn2 = function(message) {
|
|
6022
5906
|
__privateGet(this, _options3).logger.debug(message);
|
|
6023
5907
|
};
|
|
6024
|
-
_GetSubscribeKeepAliveAckEventName = new WeakSet();
|
|
6025
5908
|
GetSubscribeKeepAliveAckEventName_fn = function(eventName, subscriptionKey) {
|
|
6026
5909
|
return `${eventName}Ack_${subscriptionKey.id}`;
|
|
6027
5910
|
};
|
|
6028
5911
|
class ObservabilitySocketIOSubscriber {
|
|
6029
5912
|
constructor(options) {
|
|
6030
|
-
__privateAdd(this,
|
|
6031
|
-
__privateAdd(this, _LogErrorMessage2);
|
|
6032
|
-
__privateAdd(this, _AddKeepAlive2);
|
|
6033
|
-
__privateAdd(this, _RemoveKeepAlive2);
|
|
5913
|
+
__privateAdd(this, _ObservabilitySocketIOSubscriber_instances);
|
|
6034
5914
|
__privateAdd(this, _socketSubscribeKeepAlive2, {});
|
|
6035
|
-
__privateAdd(this, _socket2
|
|
6036
|
-
__privateAdd(this, _options4
|
|
6037
|
-
__privateAdd(this, _socketIoMessageSender
|
|
5915
|
+
__privateAdd(this, _socket2);
|
|
5916
|
+
__privateAdd(this, _options4);
|
|
5917
|
+
__privateAdd(this, _socketIoMessageSender);
|
|
6038
5918
|
// This is required becuase each call to .bind create a new replica bound function - so we need the same instance for on/off event bindings.
|
|
6039
5919
|
__publicField(this, "KeepAliveAckBoundFunction");
|
|
6040
5920
|
__privateSet(this, _options4, options);
|
|
@@ -6048,7 +5928,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6048
5928
|
return __privateGet(this, _socket2);
|
|
6049
5929
|
}
|
|
6050
5930
|
set socket(socket) {
|
|
6051
|
-
__privateMethod(this,
|
|
5931
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3).call(this, chalk$1.cyan(`ObservabilitySocketIOSubscriber:set socket(): new socket assigned`));
|
|
6052
5932
|
__privateSet(this, _socket2, socket);
|
|
6053
5933
|
__privateGet(this, _socketIoMessageSender).socket = socket;
|
|
6054
5934
|
}
|
|
@@ -6058,17 +5938,17 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6058
5938
|
async Subscribe(subscriptions) {
|
|
6059
5939
|
const socket = __privateGet(this, _socket2);
|
|
6060
5940
|
subscriptions.map(async (subId) => {
|
|
6061
|
-
__privateMethod(this,
|
|
6062
|
-
__privateMethod(this,
|
|
5941
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, RemoveKeepAlive_fn2).call(this, subId);
|
|
5942
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3).call(this, chalk$1.yellow(`ObservabilitySocketIOSubscriber:Subscribe(): Sending subscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));
|
|
6063
5943
|
try {
|
|
6064
5944
|
const retVal = await __privateGet(this, _socketIoMessageSender).SendMessageWithAck("subscribe", subId.subscriptionKey);
|
|
6065
|
-
__privateMethod(this,
|
|
6066
|
-
__privateMethod(this,
|
|
5945
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3).call(this, chalk$1.green(`ObservabilitySocketIOSubscriber:Subscribe(): SendMessageWithAck response: [${JSON.stringify(retVal)}]`));
|
|
5946
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, AddKeepAlive_fn2).call(this, socket, subId);
|
|
6067
5947
|
socket.on(GetSocketIOSubscriptionKey(subId.subscriptionKey), subId.cb);
|
|
6068
5948
|
} catch (error) {
|
|
6069
|
-
__privateMethod(this,
|
|
5949
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogErrorMessage_fn2).call(this, chalk$1.red(`ObservabilitySocketIOSubscriber:Subscribe(): Error: response: [${JSON.stringify(error)}]`));
|
|
6070
5950
|
socket.off(GetSocketIOSubscriptionKey(subId.subscriptionKey), subId.cb);
|
|
6071
|
-
__privateMethod(this,
|
|
5951
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, RemoveKeepAlive_fn2).call(this, subId);
|
|
6072
5952
|
}
|
|
6073
5953
|
});
|
|
6074
5954
|
}
|
|
@@ -6079,14 +5959,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6079
5959
|
const socket = __privateGet(this, _socket2);
|
|
6080
5960
|
subscriptions.map(async (subId) => {
|
|
6081
5961
|
socket.off(GetSocketIOSubscriptionKey(subId.subscriptionKey), subId.cb);
|
|
6082
|
-
__privateMethod(this,
|
|
5962
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, RemoveKeepAlive_fn2).call(this, subId);
|
|
6083
5963
|
__privateGet(this, _socketIoMessageSender).KillMessageInFlight(subId.subscriptionKey);
|
|
6084
|
-
__privateMethod(this,
|
|
5964
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3).call(this, chalk$1.yellow(`ObservabilitySocketIOSubscriber:UnSubscribe(): Sending unsubscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));
|
|
6085
5965
|
try {
|
|
6086
5966
|
const retVal = await __privateGet(this, _socketIoMessageSender).SendMessageWithAck("unsubscribe", subId.subscriptionKey);
|
|
6087
|
-
__privateMethod(this,
|
|
5967
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3).call(this, chalk$1.green(`ObservabilitySocketIOSubscriber:UnSubscribe(): SendMessageWithAck response: [${JSON.stringify(retVal)}]`));
|
|
6088
5968
|
} catch (error) {
|
|
6089
|
-
__privateMethod(this,
|
|
5969
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogErrorMessage_fn2).call(this, chalk$1.red(`ObservabilitySocketIOSubscriber:UnSubscribe(): Error response: [${JSON.stringify(error)}]`));
|
|
6090
5970
|
}
|
|
6091
5971
|
});
|
|
6092
5972
|
}
|
|
@@ -6108,52 +5988,48 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6108
5988
|
_socket2 = new WeakMap();
|
|
6109
5989
|
_options4 = new WeakMap();
|
|
6110
5990
|
_socketIoMessageSender = new WeakMap();
|
|
6111
|
-
|
|
5991
|
+
_ObservabilitySocketIOSubscriber_instances = new WeakSet();
|
|
6112
5992
|
LogDebugMessage_fn3 = function(message) {
|
|
6113
5993
|
__privateGet(this, _options4).logger.debug(message);
|
|
6114
5994
|
};
|
|
6115
|
-
_LogErrorMessage2 = new WeakSet();
|
|
6116
5995
|
LogErrorMessage_fn2 = function(message) {
|
|
6117
5996
|
__privateGet(this, _options4).logger.error(message);
|
|
6118
5997
|
};
|
|
6119
|
-
_AddKeepAlive2 = new WeakSet();
|
|
6120
5998
|
AddKeepAlive_fn2 = function(socket, subscription) {
|
|
6121
|
-
__privateMethod(this,
|
|
5999
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, RemoveKeepAlive_fn2).call(this, subscription);
|
|
6122
6000
|
__privateGet(this, _socketSubscribeKeepAlive2)[subscription.subscriptionKey.id] = {
|
|
6123
6001
|
id: subscription.subscriptionKey.id,
|
|
6124
6002
|
timeout: setTimeout(async () => {
|
|
6125
|
-
__privateMethod(this,
|
|
6003
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3).call(this, chalk$1.yellow(`ObservabilitySocketIOSubscriber:#AddKeepAlive:timeoutCheck(): Sending keepAlive: subscriptionKey: [${subscription.subscriptionKey.id}]`));
|
|
6126
6004
|
try {
|
|
6127
6005
|
const retVal = await __privateGet(this, _socketIoMessageSender).SendMessageWithAck("subscribeKeepAlive", subscription.subscriptionKey);
|
|
6128
|
-
__privateMethod(this,
|
|
6129
|
-
__privateMethod(this,
|
|
6006
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3).call(this, chalk$1.green(`ObservabilitySocketIOSubscriber:#AddKeepAlive(): SendMessageWithAck response: [${JSON.stringify(retVal)}]`));
|
|
6007
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, AddKeepAlive_fn2).call(this, socket, subscription);
|
|
6130
6008
|
} catch (error) {
|
|
6131
|
-
__privateMethod(this,
|
|
6009
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogErrorMessage_fn2).call(this, chalk$1.red(`ObservabilitySocketIOSubscriber:#AddKeepAlive(): Error response: [${JSON.stringify(error)}]`));
|
|
6132
6010
|
socket.off(GetSocketIOSubscriptionKey(subscription.subscriptionKey), subscription.cb);
|
|
6133
|
-
__privateMethod(this,
|
|
6011
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, RemoveKeepAlive_fn2).call(this, subscription);
|
|
6134
6012
|
}
|
|
6135
6013
|
}, __privateGet(this, _options4).keepAlive)
|
|
6136
6014
|
};
|
|
6137
6015
|
};
|
|
6138
|
-
_RemoveKeepAlive2 = new WeakSet();
|
|
6139
6016
|
RemoveKeepAlive_fn2 = function(subscription) {
|
|
6140
6017
|
if (__privateGet(this, _socketSubscribeKeepAlive2)[subscription.subscriptionKey.id]) {
|
|
6141
|
-
__privateMethod(this,
|
|
6018
|
+
__privateMethod(this, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3).call(this, chalk$1.gray(`ObservabilitySocketIOSubscriber:#RemoveKeepAlive(): subscriptionKey: [${subscription.subscriptionKey.id}]`));
|
|
6142
6019
|
clearTimeout(__privateGet(this, _socketSubscribeKeepAlive2)[subscription.subscriptionKey.id].timeout);
|
|
6143
6020
|
delete __privateGet(this, _socketSubscribeKeepAlive2)[subscription.subscriptionKey.id];
|
|
6144
6021
|
}
|
|
6145
6022
|
};
|
|
6146
6023
|
class ObservabilitySubscriptionManager {
|
|
6147
6024
|
constructor(options) {
|
|
6148
|
-
__privateAdd(this,
|
|
6149
|
-
__privateAdd(this, _LogErrorMessage3);
|
|
6025
|
+
__privateAdd(this, _ObservabilitySubscriptionManager_instances);
|
|
6150
6026
|
__privateAdd(this, _observabilitySocketIOSubscriber, null);
|
|
6151
6027
|
__privateAdd(this, _subscriptions, []);
|
|
6152
|
-
__privateAdd(this, _kafkaHelper
|
|
6028
|
+
__privateAdd(this, _kafkaHelper);
|
|
6153
6029
|
__privateAdd(this, _serviceModel, {});
|
|
6154
6030
|
__privateAdd(this, _agentModel, {});
|
|
6155
6031
|
__privateAdd(this, _lambdaModel, {});
|
|
6156
|
-
__privateAdd(this, _options5
|
|
6032
|
+
__privateAdd(this, _options5);
|
|
6157
6033
|
__privateSet(this, _options5, options);
|
|
6158
6034
|
__privateSet(this, _kafkaHelper, new KafkaHelper({
|
|
6159
6035
|
maxLogLength: __privateGet(this, _options5).maxLogLength
|
|
@@ -6186,7 +6062,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6186
6062
|
subscriptions.map((subscription) => {
|
|
6187
6063
|
const retVal = this.subscriptions.find((v) => v.subscriptionKey.id.localeCompare(subscription.subscriptionKey.id) === 0);
|
|
6188
6064
|
if (retVal) {
|
|
6189
|
-
__privateMethod(this,
|
|
6065
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.magenta(`AddSubscription(): Subscription: [${retVal.subscriptionKey.id}] already exists - ignoring.`));
|
|
6190
6066
|
} else {
|
|
6191
6067
|
subscriptionsToAdd.push(subscription);
|
|
6192
6068
|
}
|
|
@@ -6195,7 +6071,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6195
6071
|
subscriptionsToAdd.map((s) => this.subscriptions.push(s));
|
|
6196
6072
|
(_a2 = __privateGet(this, _observabilitySocketIOSubscriber)) == null ? void 0 : _a2.Subscribe(subscriptionsToAdd);
|
|
6197
6073
|
} else {
|
|
6198
|
-
__privateMethod(this,
|
|
6074
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.magenta(`AddSubscription(): No valid subscriptions to subscribe.`));
|
|
6199
6075
|
}
|
|
6200
6076
|
}
|
|
6201
6077
|
RemoveSubscriptionsByKey(keyToFind) {
|
|
@@ -6290,11 +6166,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6290
6166
|
if (subscriptionPayload.subscriptionKey.topic.localeCompare(SubscriptionTopic.AllServicesCombined.toString()) === 0) {
|
|
6291
6167
|
__privateGet(this, _serviceModel)["STS-Service"] = ObservabilityModelUtils.GetModelForService("STS-Service", subscriptionPayload.data, subscribeToKafka, __privateGet(this, _options5).logger);
|
|
6292
6168
|
if (__privateGet(this, _serviceModel)["STS-Service"] === null) {
|
|
6293
|
-
__privateMethod(this,
|
|
6169
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelAllServicesCombined():Error: GetModelForService() returned null`));
|
|
6294
6170
|
}
|
|
6295
6171
|
}
|
|
6296
6172
|
} catch (error) {
|
|
6297
|
-
__privateMethod(this,
|
|
6173
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogErrorMessage_fn3).call(this, error);
|
|
6298
6174
|
return;
|
|
6299
6175
|
}
|
|
6300
6176
|
}
|
|
@@ -6305,7 +6181,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6305
6181
|
for (const [serviceId, serviceTelemetry] of Object.entries(subscriptionPayload.data)) {
|
|
6306
6182
|
__privateGet(this, _serviceModel)[serviceId] = ObservabilityModelUtils.GetModelForService(serviceId, serviceTelemetry, subscribeToKafka, __privateGet(this, _options5).logger);
|
|
6307
6183
|
if (__privateGet(this, _serviceModel)[serviceId] === null) {
|
|
6308
|
-
__privateMethod(this,
|
|
6184
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelServices():Error: GetModelForService() returned null`));
|
|
6309
6185
|
}
|
|
6310
6186
|
}
|
|
6311
6187
|
} catch (error) {
|
|
@@ -6339,7 +6215,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6339
6215
|
}
|
|
6340
6216
|
}
|
|
6341
6217
|
} else {
|
|
6342
|
-
__privateMethod(this,
|
|
6218
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelServiceInstances():Error: GetModelForService() returned null`));
|
|
6343
6219
|
}
|
|
6344
6220
|
} else {
|
|
6345
6221
|
if (subscribeToKafka) {
|
|
@@ -6382,7 +6258,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6382
6258
|
}
|
|
6383
6259
|
}
|
|
6384
6260
|
} else {
|
|
6385
|
-
__privateMethod(this,
|
|
6261
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelServiceInstance():Error: GetModelForService() returned null`));
|
|
6386
6262
|
}
|
|
6387
6263
|
} else {
|
|
6388
6264
|
if (subscribeToKafka) {
|
|
@@ -6407,12 +6283,12 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6407
6283
|
if (Object.keys(subscriptionPayload.data).length !== 0) {
|
|
6408
6284
|
__privateGet(this, _agentModel)["STS-Agent"] = ObservabilityModelUtils.GetModelForAgent("STS-Agent", subscriptionPayload.data, subscribeToKafka, __privateGet(this, _options5).logger);
|
|
6409
6285
|
if (__privateGet(this, _agentModel)["STS-Agent"] === null) {
|
|
6410
|
-
__privateMethod(this,
|
|
6286
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelAllAgentsCombined():Error: GetModelForAgent() returned null`));
|
|
6411
6287
|
}
|
|
6412
6288
|
}
|
|
6413
6289
|
}
|
|
6414
6290
|
} catch (error) {
|
|
6415
|
-
__privateMethod(this,
|
|
6291
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogErrorMessage_fn3).call(this, error);
|
|
6416
6292
|
return;
|
|
6417
6293
|
}
|
|
6418
6294
|
}
|
|
@@ -6441,7 +6317,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6441
6317
|
}
|
|
6442
6318
|
}
|
|
6443
6319
|
} else {
|
|
6444
|
-
__privateMethod(this,
|
|
6320
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelAgents():Error: GetModelForAgent() returned null`));
|
|
6445
6321
|
}
|
|
6446
6322
|
} else {
|
|
6447
6323
|
if (subscribeToKafka) {
|
|
@@ -6452,7 +6328,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6452
6328
|
}
|
|
6453
6329
|
}
|
|
6454
6330
|
} catch (error) {
|
|
6455
|
-
__privateMethod(this,
|
|
6331
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogErrorMessage_fn3).call(this, chalk$1.red(`UIControllerAgent:CreateModel(): Error: [${error}]`));
|
|
6456
6332
|
}
|
|
6457
6333
|
}
|
|
6458
6334
|
// /agentId/agentWorkerId
|
|
@@ -6485,7 +6361,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6485
6361
|
}
|
|
6486
6362
|
}
|
|
6487
6363
|
} else {
|
|
6488
|
-
__privateMethod(this,
|
|
6364
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelAgentWorkers():Error: GetModelForAgent() returned null`));
|
|
6489
6365
|
}
|
|
6490
6366
|
} else {
|
|
6491
6367
|
if (subscribeToKafka) {
|
|
@@ -6497,7 +6373,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6497
6373
|
}
|
|
6498
6374
|
}
|
|
6499
6375
|
} catch (error) {
|
|
6500
|
-
__privateMethod(this,
|
|
6376
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogErrorMessage_fn3).call(this, chalk$1.red(`UIControllerAgentThreads:CreateModel(): Error: [${error}]`));
|
|
6501
6377
|
}
|
|
6502
6378
|
}
|
|
6503
6379
|
// /agentId/agentWorkerId/asyncRunnerId
|
|
@@ -6527,7 +6403,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6527
6403
|
}
|
|
6528
6404
|
}
|
|
6529
6405
|
} else {
|
|
6530
|
-
__privateMethod(this,
|
|
6406
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelAgentWorker():Error: GetModelForAgent() returned null`));
|
|
6531
6407
|
}
|
|
6532
6408
|
} else {
|
|
6533
6409
|
if (subscribeToKafka) {
|
|
@@ -6540,7 +6416,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6540
6416
|
}
|
|
6541
6417
|
}
|
|
6542
6418
|
} catch (error) {
|
|
6543
|
-
__privateMethod(this,
|
|
6419
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogErrorMessage_fn3).call(this, chalk$1.red(`UIControllerAgentThread:CreateModel(): Error: [${error}]`));
|
|
6544
6420
|
}
|
|
6545
6421
|
}
|
|
6546
6422
|
// --- [ Lambdas ] ------------------------------------------------------------------------------------------------------------------------------------------------
|
|
@@ -6551,11 +6427,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6551
6427
|
if (subscriptionPayload.subscriptionKey.topic.localeCompare(SubscriptionTopic.AllLambdasCombined.toString()) === 0) {
|
|
6552
6428
|
__privateGet(this, _lambdaModel)["STS-Lambda"] = ObservabilityModelUtils.GetModelForLambda("STS-Lambda", subscriptionPayload.data, subscribeToKafka, __privateGet(this, _options5).logger);
|
|
6553
6429
|
if (__privateGet(this, _lambdaModel)["STS-Lambda"] === null) {
|
|
6554
|
-
__privateMethod(this,
|
|
6430
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelAllLambdasCombined():Error: GetModelForLambda() returned null`));
|
|
6555
6431
|
}
|
|
6556
6432
|
}
|
|
6557
6433
|
} catch (error) {
|
|
6558
|
-
__privateMethod(this,
|
|
6434
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogErrorMessage_fn3).call(this, error);
|
|
6559
6435
|
return;
|
|
6560
6436
|
}
|
|
6561
6437
|
}
|
|
@@ -6566,7 +6442,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6566
6442
|
for (const [technologyId, technologyTelemetry] of Object.entries(subscriptionPayload.data)) {
|
|
6567
6443
|
__privateGet(this, _lambdaModel)[technologyId] = ObservabilityModelUtils.GetModelForLambda(technologyId, technologyTelemetry, subscribeToKafka, __privateGet(this, _options5).logger);
|
|
6568
6444
|
if (__privateGet(this, _lambdaModel)[technologyId] === null) {
|
|
6569
|
-
__privateMethod(this,
|
|
6445
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelLambdaTechnologies():Error: GetModelForLambda() returned null`));
|
|
6570
6446
|
}
|
|
6571
6447
|
}
|
|
6572
6448
|
} catch (error) {
|
|
@@ -6600,7 +6476,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6600
6476
|
}
|
|
6601
6477
|
}
|
|
6602
6478
|
} else {
|
|
6603
|
-
__privateMethod(this,
|
|
6479
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelLambdaSubTechnologies():Error: GetModelForLambda() returned null`));
|
|
6604
6480
|
}
|
|
6605
6481
|
} else {
|
|
6606
6482
|
if (subscribeToKafka) {
|
|
@@ -6643,7 +6519,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6643
6519
|
}
|
|
6644
6520
|
}
|
|
6645
6521
|
} else {
|
|
6646
|
-
__privateMethod(this,
|
|
6522
|
+
__privateMethod(this, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4).call(this, chalk$1.red(`CreateModelLambdaSubTechnologiesInstance():Error: GetModelForLambda() returned null`));
|
|
6647
6523
|
}
|
|
6648
6524
|
} else {
|
|
6649
6525
|
if (subscribeToKafka) {
|
|
@@ -6667,22 +6543,17 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6667
6543
|
_agentModel = new WeakMap();
|
|
6668
6544
|
_lambdaModel = new WeakMap();
|
|
6669
6545
|
_options5 = new WeakMap();
|
|
6670
|
-
|
|
6546
|
+
_ObservabilitySubscriptionManager_instances = new WeakSet();
|
|
6671
6547
|
LogDebugMessage_fn4 = function(message) {
|
|
6672
6548
|
__privateGet(this, _options5).logger.debug(message);
|
|
6673
6549
|
};
|
|
6674
|
-
_LogErrorMessage3 = new WeakSet();
|
|
6675
6550
|
LogErrorMessage_fn3 = function(message) {
|
|
6676
6551
|
__privateGet(this, _options5).logger.error(message);
|
|
6677
6552
|
};
|
|
6678
6553
|
class SocketIoClientHelper {
|
|
6679
6554
|
constructor(options) {
|
|
6680
|
-
|
|
6681
|
-
__privateAdd(this,
|
|
6682
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6683
|
-
__privateAdd(this, _LogErrorMessage4);
|
|
6684
|
-
__privateAdd(this, _EstablishSocketConnect);
|
|
6685
|
-
__privateAdd(this, _options6, void 0);
|
|
6555
|
+
__privateAdd(this, _SocketIoClientHelper_instances);
|
|
6556
|
+
__privateAdd(this, _options6);
|
|
6686
6557
|
__privateAdd(this, _sockets, {});
|
|
6687
6558
|
__privateAdd(this, _httpsAgent2, null);
|
|
6688
6559
|
__privateSet(this, _options6, options);
|
|
@@ -6709,7 +6580,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6709
6580
|
socket: null,
|
|
6710
6581
|
errorCallBack
|
|
6711
6582
|
};
|
|
6712
|
-
__privateMethod(this,
|
|
6583
|
+
__privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack);
|
|
6713
6584
|
return this.sockets[name].socket;
|
|
6714
6585
|
}
|
|
6715
6586
|
GetSocket(name) {
|
|
@@ -6722,17 +6593,15 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6722
6593
|
_options6 = new WeakMap();
|
|
6723
6594
|
_sockets = new WeakMap();
|
|
6724
6595
|
_httpsAgent2 = new WeakMap();
|
|
6725
|
-
|
|
6596
|
+
_SocketIoClientHelper_instances = new WeakSet();
|
|
6597
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6726
6598
|
LogDebugMessage_fn5 = function(message) {
|
|
6727
|
-
if (__privateGet(this, _options6).logger)
|
|
6728
|
-
__privateGet(this, _options6).logger.debug(message);
|
|
6599
|
+
if (__privateGet(this, _options6).logger) __privateGet(this, _options6).logger.debug(message);
|
|
6729
6600
|
};
|
|
6730
|
-
|
|
6601
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6731
6602
|
LogErrorMessage_fn4 = function(message) {
|
|
6732
|
-
if (__privateGet(this, _options6).logger)
|
|
6733
|
-
__privateGet(this, _options6).logger.error(message);
|
|
6603
|
+
if (__privateGet(this, _options6).logger) __privateGet(this, _options6).logger.error(message);
|
|
6734
6604
|
};
|
|
6735
|
-
_EstablishSocketConnect = new WeakSet();
|
|
6736
6605
|
EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBack) {
|
|
6737
6606
|
const socketDetail = this.sockets[name];
|
|
6738
6607
|
if (socketDetail.socket !== null) {
|
|
@@ -6741,9 +6610,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6741
6610
|
}
|
|
6742
6611
|
socketDetail.socket = null;
|
|
6743
6612
|
if (isNode) {
|
|
6744
|
-
setTimeout(() => __privateMethod(this,
|
|
6613
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
6745
6614
|
} else {
|
|
6746
|
-
setTimeout(() => __privateMethod(this,
|
|
6615
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
|
|
6747
6616
|
}
|
|
6748
6617
|
return;
|
|
6749
6618
|
}
|
|
@@ -6763,7 +6632,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6763
6632
|
socketDetail.socket = socket_ioClient.io(socketDetail.address, socketOptions);
|
|
6764
6633
|
socketDetail.socket.on("connect", () => {
|
|
6765
6634
|
if (socketDetail.socket) {
|
|
6766
|
-
__privateMethod(this,
|
|
6635
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn5).call(this, `Socket: [${socketDetail.socket.id}]: connected`);
|
|
6767
6636
|
if (onConnectCallBack) {
|
|
6768
6637
|
setTimeout(() => {
|
|
6769
6638
|
onConnectCallBack(socketDetail.socket);
|
|
@@ -6774,45 +6643,45 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6774
6643
|
}
|
|
6775
6644
|
} else {
|
|
6776
6645
|
const errorMessage = "Could not get socket object from socket.io";
|
|
6777
|
-
__privateMethod(this,
|
|
6646
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogErrorMessage_fn4).call(this, errorMessage);
|
|
6778
6647
|
socketDetail.errorCallBack(new Error(errorMessage));
|
|
6779
6648
|
}
|
|
6780
6649
|
});
|
|
6781
6650
|
socketDetail.socket.on("disconnect", (reason) => {
|
|
6782
|
-
__privateMethod(this,
|
|
6651
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn5).call(this, "socket disconnect: " + reason);
|
|
6783
6652
|
switch (reason) {
|
|
6784
6653
|
case "io server disconnect":
|
|
6785
6654
|
{
|
|
6786
|
-
__privateMethod(this,
|
|
6787
|
-
__privateMethod(this,
|
|
6655
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn5).call(this, "The server disconnected using disconnectSockets, i.e. normal safe shutdown from explicit disconnection by the server.");
|
|
6656
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn5).call(this, "The connection will be re-established when the server becomes available.");
|
|
6788
6657
|
const socketDetail2 = this.sockets[name];
|
|
6789
6658
|
socketDetail2.socket = null;
|
|
6790
6659
|
if (isNode) {
|
|
6791
|
-
setTimeout(() => __privateMethod(this,
|
|
6660
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
6792
6661
|
} else {
|
|
6793
|
-
setTimeout(() => __privateMethod(this,
|
|
6662
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
|
|
6794
6663
|
}
|
|
6795
6664
|
}
|
|
6796
6665
|
break;
|
|
6797
6666
|
case "io client disconnect":
|
|
6798
|
-
__privateMethod(this,
|
|
6799
|
-
__privateMethod(this,
|
|
6667
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn5).call(this, "The client disconnected using disconnectSockets, i.e. normal safe disconnection from explicit disconnection by the client.");
|
|
6668
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn5).call(this, "The connection will not be re-established automatically.");
|
|
6800
6669
|
break;
|
|
6801
6670
|
case "transport close":
|
|
6802
6671
|
case "ping timeout":
|
|
6803
6672
|
case "transport error":
|
|
6804
6673
|
{
|
|
6805
|
-
__privateMethod(this,
|
|
6806
|
-
__privateMethod(this,
|
|
6674
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn5).call(this, `Server unexpectedly disconnected. Reason: [${reason}]`);
|
|
6675
|
+
__privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn5).call(this, "The connection will be re-established when the server becomes available.");
|
|
6807
6676
|
const socketDetail2 = this.sockets[name];
|
|
6808
6677
|
if (socketDetail2.socket) {
|
|
6809
6678
|
socketDetail2.socket.disconnect();
|
|
6810
6679
|
}
|
|
6811
6680
|
socketDetail2.socket = null;
|
|
6812
6681
|
if (isNode) {
|
|
6813
|
-
setTimeout(() => __privateMethod(this,
|
|
6682
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
6814
6683
|
} else {
|
|
6815
|
-
setTimeout(() => __privateMethod(this,
|
|
6684
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
|
|
6816
6685
|
}
|
|
6817
6686
|
}
|
|
6818
6687
|
break;
|