@nsshunt/stsvueutils 1.0.78 → 1.0.80

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.
@@ -37,8 +37,8 @@ var __privateMethod = (obj, member, method) => {
37
37
  var _store, _storage, _workersEx, _runner, _workerId, _options, _STSInstrumentController, _app, _CreateRunnerCopy, CreateRunnerCopy_fn, _SetRunnerIntoWorker, _ProcessTelemetry, _CreateAsyncRunner, _PostMessageToWorker, _TerminateWorker, _StopRunner, _StopWorker, _requestResponseMessages, _requestResponseMessageTimeout, _port, _SetupListener, _collectorCollectorPort, _requestResponseHelper, _runners, _options2, _SetMessagePort, _AddAsyncRunner, _StopRunners;
38
38
  import { inject } from "vue";
39
39
  import debugModule from "debug";
40
- import { Gauge } from "@nsshunt/stsinstrumentation";
41
40
  import { ModelDelimeter, Sleep } from "@nsshunt/stsutils";
41
+ import "socket.io-client";
42
42
  import { defineStore } from "pinia";
43
43
  const STSStoragePluginKey = Symbol("storage");
44
44
  const STSEmitterPluginKey = Symbol("emitter");
@@ -352,71 +352,6 @@ var eIWMessageCommands = /* @__PURE__ */ ((eIWMessageCommands2) => {
352
352
  eIWMessageCommands2["StopAllAsyncRunners"] = "__STS__StopAllAsyncRunners";
353
353
  return eIWMessageCommands2;
354
354
  })(eIWMessageCommands || {});
355
- const TelemetryStore = defineStore("__sts__TelemetryStore", {
356
- // State
357
- // https://pinia.vuejs.org/core-concepts/state.html
358
- state: () => {
359
- return {
360
- workers: {}
361
- };
362
- },
363
- // Getters
364
- // https://pinia.vuejs.org/core-concepts/getters.html
365
- // Actions
366
- // https://pinia.vuejs.org/core-concepts/actions.html
367
- actions: {
368
- RemoveWorker(workerEx) {
369
- delete this.workers[workerEx.id];
370
- },
371
- RemoveRunner(workerEx, runnerEx) {
372
- const worker = this.workers[workerEx.id];
373
- if (worker && worker.runners) {
374
- delete worker.runners[runnerEx.id];
375
- }
376
- },
377
- Update(workerEx, runnerEx) {
378
- if (!this.workers[workerEx.id]) {
379
- this.workers[workerEx.id] = {
380
- id: workerEx.id,
381
- state: workerEx.state,
382
- primaryThreadWorkerOptions: { ...workerEx.primaryThreadWorkerOptions },
383
- workerThreadWorkerOptions: { ...workerEx.workerThreadWorkerOptions },
384
- runners: {}
385
- };
386
- }
387
- const worker = this.workers[workerEx.id];
388
- if (worker.runners) {
389
- if (!worker.runners[runnerEx.id]) {
390
- const runner = {
391
- id: runnerEx.id,
392
- asyncRunnerContext: { ...runnerEx.asyncRunnerContext },
393
- options: { ...runnerEx.options },
394
- state: runnerEx.state,
395
- instrumentData: { ...runnerEx.instrumentData }
396
- };
397
- worker.runners[runner.id] = runner;
398
- } else {
399
- const runner = worker.runners[runnerEx.id];
400
- runner.instrumentData = { ...runnerEx.instrumentData };
401
- }
402
- }
403
- }
404
- }
405
- });
406
- var IRunnerState = /* @__PURE__ */ ((IRunnerState2) => {
407
- IRunnerState2["created"] = "created";
408
- IRunnerState2["running"] = "running";
409
- IRunnerState2["stopped"] = "stopped";
410
- IRunnerState2["paused"] = "paused";
411
- IRunnerState2["error"] = "error";
412
- return IRunnerState2;
413
- })(IRunnerState || {});
414
- var IWorkerState = /* @__PURE__ */ ((IWorkerState2) => {
415
- IWorkerState2["starting"] = "starting";
416
- IWorkerState2["started"] = "started";
417
- IWorkerState2["stopped"] = "stopped";
418
- return IWorkerState2;
419
- })(IWorkerState || {});
420
355
  var lodash_clonedeep = { exports: {} };
421
356
  lodash_clonedeep.exports;
422
357
  (function(module, exports) {
@@ -1000,6 +935,37 @@ var __publicField2 = (obj, key, value) => {
1000
935
  __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
1001
936
  return value;
1002
937
  };
938
+ var Gauge = /* @__PURE__ */ ((Gauge2) => {
939
+ Gauge2["ACTIVE_REQUEST_GAUGE"] = "a";
940
+ Gauge2["AUTHENTICATION_COUNT_GAUGE"] = "b";
941
+ Gauge2["AUTHENTICATION_ERROR_COUNT_GAUGE"] = "aa";
942
+ Gauge2["AUTHENTICATION_RETRY_COUNT_GAUGE"] = "ab";
943
+ Gauge2["CONNECTION_POOL_IDLE_GAUGE"] = "c";
944
+ Gauge2["CONNECTION_POOL_TOTAL_GAUGE"] = "d";
945
+ Gauge2["CONNECTION_POOL_WAITING_GAUGE"] = "e";
946
+ Gauge2["CPU_LOAD_GAUGE"] = "f";
947
+ Gauge2["CPU_SYSTEM_LOAD_GAUGE"] = "g";
948
+ Gauge2["DURATION_GAUGE"] = "h";
949
+ Gauge2["DURATION_HISTOGRAM_GAUGE"] = "i";
950
+ Gauge2["ERROR_COUNT_GAUGE"] = "j";
951
+ Gauge2["LATENCY_GAUGE"] = "k";
952
+ Gauge2["LATENCY_HISTOGRAM_GAUGE"] = "l";
953
+ Gauge2["LOGGER"] = "m";
954
+ Gauge2["LOGGER_COPY"] = "n";
955
+ Gauge2["NETWORK_RX_GAUGE"] = "o";
956
+ Gauge2["NETWORK_TX_GAUGE"] = "p";
957
+ Gauge2["REQUEST_COUNT_GAUGE"] = "q";
958
+ Gauge2["RETRY_COUNT_GAUGE"] = "r";
959
+ Gauge2["TIMER_GAUGE"] = "s";
960
+ Gauge2["VELOCITY_GAUGE"] = "t";
961
+ Gauge2["CONNECTION_COUNT_GAUGE"] = "u";
962
+ Gauge2["OBJECT_GAUGE"] = "v";
963
+ Gauge2["PAYLOAD_SIZE"] = "w";
964
+ Gauge2["CORE_COUNT_GAUGE"] = "x";
965
+ Gauge2["CHILD_COUNT"] = "y";
966
+ Gauge2["UNKNOWN"] = "z";
967
+ return Gauge2;
968
+ })(Gauge || {});
1003
969
  var GaugeTypes = /* @__PURE__ */ ((GaugeTypes2) => {
1004
970
  GaugeTypes2["GAUGE_TYPE"] = "_";
1005
971
  GaugeTypes2["INSTRUMENT_GAUGE"] = "a";
@@ -3254,6 +3220,22 @@ var timestampExtension = {
3254
3220
  ExtensionCodec2.defaultCodec = new ExtensionCodec2();
3255
3221
  return ExtensionCodec2;
3256
3222
  })();
3223
+ var SubscriptionTopic = /* @__PURE__ */ ((SubscriptionTopic2) => {
3224
+ SubscriptionTopic2["AllServicesCombined"] = "AllServicesCombined";
3225
+ SubscriptionTopic2["Services"] = "Services";
3226
+ SubscriptionTopic2["ServiceInstances"] = "ServiceInstances";
3227
+ SubscriptionTopic2["ServiceInstance"] = "ServiceInstance";
3228
+ SubscriptionTopic2["AllAgentsCombined"] = "AllAgentsCombined";
3229
+ SubscriptionTopic2["Agents"] = "Agents";
3230
+ SubscriptionTopic2["AgentWorkers"] = "AgentWorkers";
3231
+ SubscriptionTopic2["AgentWorker"] = "AgentWorker";
3232
+ SubscriptionTopic2["AllLambdasCombined"] = "AllLambdasCombined";
3233
+ SubscriptionTopic2["LambdaTechnologies"] = "LambdaTechnologies";
3234
+ SubscriptionTopic2["LambdaSubTechnologies"] = "LambdaSubTechnologies";
3235
+ SubscriptionTopic2["LambdaSubTechnologiesInstance"] = "LambdaSubTechnologiesInstance";
3236
+ SubscriptionTopic2["LogProcessing"] = "LogProcessing";
3237
+ return SubscriptionTopic2;
3238
+ })(SubscriptionTopic || {});
3257
3239
  const _ObservabilityModelUtils = class _ObservabilityModelUtils2 {
3258
3240
  static GetModelNode(data) {
3259
3241
  const fixedSize = 2;
@@ -3514,6 +3496,490 @@ for (let i = 0; i < 256; ++i) {
3514
3496
  byteToHex.push((i + 256).toString(16).slice(1));
3515
3497
  }
3516
3498
  typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3499
+ ({
3500
+ coreFieldList: [
3501
+ {
3502
+ fieldName: "requestCount",
3503
+ gauge: Gauge.REQUEST_COUNT_GAUGE,
3504
+ instrumentProperty: "val",
3505
+ dataType: "number",
3506
+ influxdbDataType: "intField"
3507
+ /* intField */
3508
+ },
3509
+ {
3510
+ fieldName: "errorCount",
3511
+ gauge: Gauge.ERROR_COUNT_GAUGE,
3512
+ instrumentProperty: "val",
3513
+ dataType: "number",
3514
+ influxdbDataType: "intField"
3515
+ /* intField */
3516
+ },
3517
+ {
3518
+ fieldName: "retryCount",
3519
+ gauge: Gauge.RETRY_COUNT_GAUGE,
3520
+ instrumentProperty: "val",
3521
+ dataType: "number",
3522
+ influxdbDataType: "intField"
3523
+ /* intField */
3524
+ },
3525
+ {
3526
+ fieldName: "authenticationCount",
3527
+ gauge: Gauge.AUTHENTICATION_COUNT_GAUGE,
3528
+ instrumentProperty: "val",
3529
+ dataType: "number",
3530
+ influxdbDataType: "intField"
3531
+ /* intField */
3532
+ },
3533
+ {
3534
+ fieldName: "authenticationErrorCount",
3535
+ gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE,
3536
+ instrumentProperty: "val",
3537
+ dataType: "number",
3538
+ influxdbDataType: "intField"
3539
+ /* intField */
3540
+ },
3541
+ {
3542
+ fieldName: "authenticationRetryCount",
3543
+ gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE,
3544
+ instrumentProperty: "val",
3545
+ dataType: "number",
3546
+ influxdbDataType: "intField"
3547
+ /* intField */
3548
+ },
3549
+ {
3550
+ fieldName: "velocity",
3551
+ gauge: Gauge.VELOCITY_GAUGE,
3552
+ instrumentProperty: "va",
3553
+ dataType: "number",
3554
+ influxdbDataType: "floatField"
3555
+ /* floatField */
3556
+ },
3557
+ {
3558
+ fieldName: "activeRequestCount",
3559
+ gauge: Gauge.ACTIVE_REQUEST_GAUGE,
3560
+ instrumentProperty: "val",
3561
+ dataType: "number",
3562
+ timeSeriesIndex: true,
3563
+ quantile: true,
3564
+ influxdbDataType: "intField"
3565
+ /* intField */
3566
+ },
3567
+ {
3568
+ fieldName: "coreCount",
3569
+ gauge: Gauge.CORE_COUNT_GAUGE,
3570
+ instrumentProperty: "val",
3571
+ dataType: "number",
3572
+ influxdbDataType: "intField"
3573
+ /* intField */
3574
+ },
3575
+ {
3576
+ fieldName: "rx",
3577
+ gauge: Gauge.NETWORK_RX_GAUGE,
3578
+ instrumentProperty: "va",
3579
+ dataType: "number",
3580
+ influxdbDataType: "floatField"
3581
+ /* floatField */
3582
+ },
3583
+ {
3584
+ fieldName: "tx",
3585
+ gauge: Gauge.NETWORK_TX_GAUGE,
3586
+ instrumentProperty: "va",
3587
+ dataType: "number",
3588
+ influxdbDataType: "floatField"
3589
+ /* floatField */
3590
+ },
3591
+ {
3592
+ fieldName: "timer",
3593
+ gauge: Gauge.TIMER_GAUGE,
3594
+ instrumentProperty: "val",
3595
+ dataType: "number",
3596
+ influxdbDataType: "floatField"
3597
+ /* floatField */
3598
+ },
3599
+ {
3600
+ fieldName: "duration",
3601
+ gauge: Gauge.DURATION_GAUGE,
3602
+ instrumentProperty: "val",
3603
+ dataType: "number",
3604
+ timeSeriesIndex: true,
3605
+ quantile: true,
3606
+ influxdbDataType: "floatField",
3607
+ histo: [
3608
+ { label: "B10", bucketLimit: 10 },
3609
+ { label: "B20", bucketLimit: 20 },
3610
+ { label: "B50", bucketLimit: 50 },
3611
+ { label: "B100", bucketLimit: 100 },
3612
+ { label: "B1000", bucketLimit: 1e3 },
3613
+ { label: "B50000", bucketLimit: 5e4 },
3614
+ { label: "BInfinity", bucketLimit: -1 }
3615
+ ]
3616
+ },
3617
+ {
3618
+ fieldName: "latency",
3619
+ gauge: Gauge.LATENCY_GAUGE,
3620
+ instrumentProperty: "val",
3621
+ dataType: "number",
3622
+ timeSeriesIndex: true,
3623
+ quantile: true,
3624
+ influxdbDataType: "floatField",
3625
+ histo: [
3626
+ { label: "B10", bucketLimit: 10 },
3627
+ { label: "B20", bucketLimit: 20 },
3628
+ { label: "B50", bucketLimit: 50 },
3629
+ { label: "B100", bucketLimit: 100 },
3630
+ { label: "B1000", bucketLimit: 1e3 },
3631
+ { label: "B50000", bucketLimit: 5e4 },
3632
+ { label: "BInfinity", bucketLimit: -1 }
3633
+ ]
3634
+ }
3635
+ ],
3636
+ services: {
3637
+ ["service"]: {
3638
+ influxDBContextTags: [
3639
+ "serviceId",
3640
+ "serviceName",
3641
+ "serviceVersion",
3642
+ "serviceInstanceId",
3643
+ "serviceInstanceProcessId",
3644
+ "hostName",
3645
+ "pid",
3646
+ "ppid"
3647
+ ],
3648
+ redisIndexPrefixDefinitions: {
3649
+ timeSeriesIndex: "idx:serviceIndexTimeSeries",
3650
+ timeSeriesPrefix: "/serviceTimeSeries:",
3651
+ instantIndex: "idx:serviceIndexInstant",
3652
+ instantPrefix: "/serviceInstant:"
3653
+ },
3654
+ fieldList: [
3655
+ {
3656
+ fieldName: "cpu",
3657
+ gauge: Gauge.CPU_LOAD_GAUGE,
3658
+ instrumentProperty: "val",
3659
+ dataType: "number",
3660
+ timeSeriesIndex: true,
3661
+ quantile: true,
3662
+ influxdbDataType: "floatField"
3663
+ /* floatField */
3664
+ },
3665
+ {
3666
+ fieldName: "connectionCount",
3667
+ gauge: Gauge.CONNECTION_COUNT_GAUGE,
3668
+ instrumentProperty: "val",
3669
+ dataType: "number",
3670
+ timeSeriesIndex: true,
3671
+ quantile: true,
3672
+ influxdbDataType: "intField"
3673
+ /* intField */
3674
+ },
3675
+ {
3676
+ fieldName: "connectionPoolCount",
3677
+ gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
3678
+ instrumentProperty: "val",
3679
+ dataType: "number",
3680
+ influxdbDataType: "intField"
3681
+ /* intField */
3682
+ },
3683
+ {
3684
+ fieldName: "connectionIdleCount",
3685
+ gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
3686
+ instrumentProperty: "val",
3687
+ dataType: "number",
3688
+ influxdbDataType: "intField"
3689
+ /* intField */
3690
+ },
3691
+ {
3692
+ fieldName: "connectionWaitingCount",
3693
+ gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
3694
+ instrumentProperty: "val",
3695
+ dataType: "number",
3696
+ influxdbDataType: "intField"
3697
+ /* intField */
3698
+ },
3699
+ {
3700
+ fieldName: "systemcpu",
3701
+ gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
3702
+ instrumentProperty: "val",
3703
+ dataType: "number",
3704
+ timeSeriesIndex: true,
3705
+ quantile: true,
3706
+ influxdbDataType: "floatField"
3707
+ /* floatField */
3708
+ },
3709
+ {
3710
+ fieldName: "memory",
3711
+ gauge: Gauge.OBJECT_GAUGE,
3712
+ instrumentProperty: "val",
3713
+ dataType: "JSON",
3714
+ influxdbDataType: "stringField"
3715
+ /* stringField */
3716
+ }
3717
+ ],
3718
+ GetPathFromContext(context) {
3719
+ const { serviceId, serviceInstanceId, serviceInstanceProcessId } = context;
3720
+ return `/${serviceId}/${serviceInstanceId}/${serviceInstanceProcessId}`;
3721
+ },
3722
+ redisQueryFilters: {
3723
+ level1ContextField: "serviceType",
3724
+ level2ContextField: "appid",
3725
+ level3ContextField: "appinstanceid"
3726
+ },
3727
+ subscriptionTopics: [
3728
+ {
3729
+ subscriptionTopic: SubscriptionTopic.AllServicesCombined,
3730
+ route: "/metrics"
3731
+ },
3732
+ {
3733
+ subscriptionTopic: SubscriptionTopic.Services,
3734
+ route: "/metrics/services"
3735
+ },
3736
+ {
3737
+ subscriptionTopic: SubscriptionTopic.ServiceInstances,
3738
+ route: "/metrics/services/:key"
3739
+ },
3740
+ {
3741
+ subscriptionTopic: SubscriptionTopic.ServiceInstance,
3742
+ route: "/metrics/services/:key/:subkey"
3743
+ }
3744
+ ]
3745
+ },
3746
+ ["agent"]: {
3747
+ influxDBContextTags: [
3748
+ "id",
3749
+ "hostName",
3750
+ "agentName",
3751
+ "threadId",
3752
+ "asyncRunnerId"
3753
+ ],
3754
+ redisIndexPrefixDefinitions: {
3755
+ timeSeriesIndex: "idx:agentIndexTimeSeries",
3756
+ timeSeriesPrefix: "/agentTimeSeries:",
3757
+ instantIndex: "idx:agentIndexInstant",
3758
+ instantPrefix: "/agentInstant:"
3759
+ },
3760
+ fieldList: [
3761
+ {
3762
+ fieldName: "childCount",
3763
+ gauge: Gauge.CHILD_COUNT,
3764
+ instrumentProperty: "val",
3765
+ dataType: "number",
3766
+ influxdbDataType: "intField"
3767
+ /* intField */
3768
+ }
3769
+ ],
3770
+ //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher
3771
+ GetPathFromContext(context) {
3772
+ const { agentName, threadId, asyncRunnerId } = context;
3773
+ return `/${agentName}/${threadId}/${asyncRunnerId}`;
3774
+ },
3775
+ redisQueryFilters: {
3776
+ level1ContextField: "serviceType",
3777
+ level2ContextField: "appid",
3778
+ //@@ this should be named something else
3779
+ level3ContextField: "appinstanceid"
3780
+ //@@ this should be named something else
3781
+ },
3782
+ subscriptionTopics: [
3783
+ {
3784
+ subscriptionTopic: SubscriptionTopic.AllAgentsCombined,
3785
+ route: "/metrics"
3786
+ },
3787
+ {
3788
+ subscriptionTopic: SubscriptionTopic.Agents,
3789
+ route: "/metrics/agents"
3790
+ },
3791
+ {
3792
+ subscriptionTopic: SubscriptionTopic.AgentWorkers,
3793
+ route: "/metrics/agents/:key"
3794
+ },
3795
+ {
3796
+ subscriptionTopic: SubscriptionTopic.AgentWorker,
3797
+ route: "/metrics/agents/:key/:subkey"
3798
+ }
3799
+ ]
3800
+ },
3801
+ ["lambda"]: {
3802
+ influxDBContextTags: [
3803
+ "technology",
3804
+ "subTechnology",
3805
+ "lambdaFunctionName",
3806
+ "lambdaInstance",
3807
+ "hostName",
3808
+ "processId",
3809
+ "parentProcessId",
3810
+ "useCase",
3811
+ "pattern"
3812
+ ],
3813
+ redisIndexPrefixDefinitions: {
3814
+ timeSeriesIndex: "idx:lambdaIndexTimeSeries",
3815
+ timeSeriesPrefix: "/lambdaTimeSeries:",
3816
+ instantIndex: "idx:lambdaIndexInstant",
3817
+ instantPrefix: "/lambdaInstant:"
3818
+ },
3819
+ fieldList: [
3820
+ {
3821
+ fieldName: "cpu",
3822
+ gauge: Gauge.CPU_LOAD_GAUGE,
3823
+ instrumentProperty: "val",
3824
+ dataType: "number",
3825
+ timeSeriesIndex: true,
3826
+ quantile: true,
3827
+ influxdbDataType: "floatField"
3828
+ /* floatField */
3829
+ },
3830
+ {
3831
+ fieldName: "connectionCount",
3832
+ gauge: Gauge.CONNECTION_COUNT_GAUGE,
3833
+ instrumentProperty: "val",
3834
+ dataType: "number",
3835
+ timeSeriesIndex: true,
3836
+ quantile: true,
3837
+ influxdbDataType: "intField"
3838
+ /* intField */
3839
+ },
3840
+ {
3841
+ fieldName: "connectionPoolCount",
3842
+ gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
3843
+ instrumentProperty: "val",
3844
+ dataType: "number",
3845
+ influxdbDataType: "intField"
3846
+ /* intField */
3847
+ },
3848
+ {
3849
+ fieldName: "connectionIdleCount",
3850
+ gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
3851
+ instrumentProperty: "val",
3852
+ dataType: "number",
3853
+ influxdbDataType: "intField"
3854
+ /* intField */
3855
+ },
3856
+ {
3857
+ fieldName: "connectionWaitingCount",
3858
+ gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
3859
+ instrumentProperty: "val",
3860
+ dataType: "number",
3861
+ influxdbDataType: "intField"
3862
+ /* intField */
3863
+ },
3864
+ {
3865
+ fieldName: "systemcpu",
3866
+ gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
3867
+ instrumentProperty: "val",
3868
+ dataType: "number",
3869
+ timeSeriesIndex: true,
3870
+ quantile: true,
3871
+ influxdbDataType: "floatField"
3872
+ /* floatField */
3873
+ },
3874
+ {
3875
+ fieldName: "memory",
3876
+ gauge: Gauge.OBJECT_GAUGE,
3877
+ instrumentProperty: "val",
3878
+ dataType: "JSON",
3879
+ influxdbDataType: "stringField"
3880
+ /* stringField */
3881
+ }
3882
+ ],
3883
+ //@@ need type declare in appframework
3884
+ GetPathFromContext(context) {
3885
+ const { technology, subTechnology, lambdaInstance } = context;
3886
+ return `/${technology}/${subTechnology}/${lambdaInstance}`;
3887
+ },
3888
+ redisQueryFilters: {
3889
+ level1ContextField: "serviceType",
3890
+ level2ContextField: "technology",
3891
+ level3ContextField: "subTechnology"
3892
+ },
3893
+ subscriptionTopics: [
3894
+ {
3895
+ subscriptionTopic: SubscriptionTopic.AllLambdasCombined,
3896
+ // uicontrollerlanding
3897
+ route: "/metrics"
3898
+ },
3899
+ {
3900
+ subscriptionTopic: SubscriptionTopic.LambdaTechnologies,
3901
+ // uicontrollerlambda
3902
+ route: "/metrics/lambdas"
3903
+ },
3904
+ {
3905
+ subscriptionTopic: SubscriptionTopic.LambdaSubTechnologies,
3906
+ // uicontrollerlambdasubtechnologies
3907
+ route: "/metrics/lambdas/:key"
3908
+ },
3909
+ {
3910
+ subscriptionTopic: SubscriptionTopic.LambdaSubTechnologiesInstance,
3911
+ // uicontrollerlambdasubtechnologiesinstance
3912
+ route: "/metrics/lambdas/:key/:subkey"
3913
+ }
3914
+ ]
3915
+ }
3916
+ }
3917
+ });
3918
+ const TelemetryStore = defineStore("__sts__TelemetryStore", {
3919
+ // State
3920
+ // https://pinia.vuejs.org/core-concepts/state.html
3921
+ state: () => {
3922
+ return {
3923
+ workers: {}
3924
+ };
3925
+ },
3926
+ // Getters
3927
+ // https://pinia.vuejs.org/core-concepts/getters.html
3928
+ // Actions
3929
+ // https://pinia.vuejs.org/core-concepts/actions.html
3930
+ actions: {
3931
+ RemoveWorker(workerEx) {
3932
+ delete this.workers[workerEx.id];
3933
+ },
3934
+ RemoveRunner(workerEx, runnerEx) {
3935
+ const worker = this.workers[workerEx.id];
3936
+ if (worker && worker.runners) {
3937
+ delete worker.runners[runnerEx.id];
3938
+ }
3939
+ },
3940
+ Update(workerEx, runnerEx) {
3941
+ if (!this.workers[workerEx.id]) {
3942
+ this.workers[workerEx.id] = {
3943
+ id: workerEx.id,
3944
+ state: workerEx.state,
3945
+ primaryThreadWorkerOptions: { ...workerEx.primaryThreadWorkerOptions },
3946
+ workerThreadWorkerOptions: { ...workerEx.workerThreadWorkerOptions },
3947
+ runners: {}
3948
+ };
3949
+ }
3950
+ const worker = this.workers[workerEx.id];
3951
+ if (worker.runners) {
3952
+ if (!worker.runners[runnerEx.id]) {
3953
+ const runner = {
3954
+ id: runnerEx.id,
3955
+ asyncRunnerContext: { ...runnerEx.asyncRunnerContext },
3956
+ options: { ...runnerEx.options },
3957
+ state: runnerEx.state,
3958
+ instrumentData: { ...runnerEx.instrumentData }
3959
+ };
3960
+ worker.runners[runner.id] = runner;
3961
+ } else {
3962
+ const runner = worker.runners[runnerEx.id];
3963
+ runner.instrumentData = { ...runnerEx.instrumentData };
3964
+ }
3965
+ }
3966
+ }
3967
+ }
3968
+ });
3969
+ var IRunnerState = /* @__PURE__ */ ((IRunnerState2) => {
3970
+ IRunnerState2["created"] = "created";
3971
+ IRunnerState2["running"] = "running";
3972
+ IRunnerState2["stopped"] = "stopped";
3973
+ IRunnerState2["paused"] = "paused";
3974
+ IRunnerState2["error"] = "error";
3975
+ return IRunnerState2;
3976
+ })(IRunnerState || {});
3977
+ var IWorkerState = /* @__PURE__ */ ((IWorkerState2) => {
3978
+ IWorkerState2["starting"] = "starting";
3979
+ IWorkerState2["started"] = "started";
3980
+ IWorkerState2["stopped"] = "stopped";
3981
+ return IWorkerState2;
3982
+ })(IWorkerState || {});
3517
3983
  var ansiStyles$1 = { exports: {} };
3518
3984
  var colorName;
3519
3985
  var hasRequiredColorName;