@jfvilas/kwirth-common 0.4.45 → 0.4.47

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.
@@ -1,5 +1,5 @@
1
1
  import { IInstanceMessage } from "./InstanceMessage";
2
- export declare enum AlertSeverityEnum {
2
+ export declare enum EAlertSeverity {
3
3
  INFO = "info",
4
4
  WARNING = "warning",
5
5
  ERROR = "error"
@@ -7,7 +7,7 @@ export declare enum AlertSeverityEnum {
7
7
  export interface IAlertMessage extends IInstanceMessage {
8
8
  msgtype: 'alertmessage';
9
9
  timestamp?: Date;
10
- severity: AlertSeverityEnum;
10
+ severity: EAlertSeverity;
11
11
  namespace: string;
12
12
  pod: string;
13
13
  container: string;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AlertSeverityEnum = void 0;
4
- var AlertSeverityEnum;
5
- (function (AlertSeverityEnum) {
6
- AlertSeverityEnum["INFO"] = "info";
7
- AlertSeverityEnum["WARNING"] = "warning";
8
- AlertSeverityEnum["ERROR"] = "error";
9
- })(AlertSeverityEnum || (exports.AlertSeverityEnum = AlertSeverityEnum = {}));
3
+ exports.EAlertSeverity = void 0;
4
+ var EAlertSeverity;
5
+ (function (EAlertSeverity) {
6
+ EAlertSeverity["INFO"] = "info";
7
+ EAlertSeverity["WARNING"] = "warning";
8
+ EAlertSeverity["ERROR"] = "error";
9
+ })(EAlertSeverity || (exports.EAlertSeverity = EAlertSeverity = {}));
package/dist/Channel.d.ts CHANGED
@@ -22,13 +22,15 @@ interface BackChannelData {
22
22
  events: boolean;
23
23
  endpoints: IEndpointConfig[];
24
24
  websocket: boolean;
25
+ cluster: boolean;
25
26
  }
26
27
  interface KwirthData {
27
28
  version: string;
28
29
  lastVersion: string;
29
30
  clusterName: string;
30
- clusterType: ClusterTypeEnum;
31
+ clusterType: EClusterType;
31
32
  inCluster: boolean;
33
+ isElectron: boolean;
32
34
  namespace: string;
33
35
  deployment: string;
34
36
  metricsInterval: number;
@@ -8,3 +8,13 @@ export interface MetricsConfig {
8
8
  interval: number;
9
9
  metrics: string[];
10
10
  }
11
+ export declare enum EMetricsConfigMode {
12
+ SNAPSHOT = "snapshot",
13
+ STREAM = "stream"
14
+ }
15
+ export interface IMetricsConfig {
16
+ mode: MetricsConfigModeEnum;
17
+ aggregate: boolean;
18
+ interval: number;
19
+ metrics: string[];
20
+ }
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MetricsConfigModeEnum = void 0;
3
+ exports.EMetricsConfigMode = exports.MetricsConfigModeEnum = void 0;
4
+ //transient
4
5
  var MetricsConfigModeEnum;
5
6
  (function (MetricsConfigModeEnum) {
6
7
  MetricsConfigModeEnum["SNAPSHOT"] = "snapshot";
7
8
  MetricsConfigModeEnum["STREAM"] = "stream";
8
9
  })(MetricsConfigModeEnum || (exports.MetricsConfigModeEnum = MetricsConfigModeEnum = {}));
10
+ var EMetricsConfigMode;
11
+ (function (EMetricsConfigMode) {
12
+ EMetricsConfigMode["SNAPSHOT"] = "snapshot";
13
+ EMetricsConfigMode["STREAM"] = "stream";
14
+ })(EMetricsConfigMode || (exports.EMetricsConfigMode = EMetricsConfigMode = {}));
@@ -1,5 +1,5 @@
1
1
  import { IInstanceMessage } from "./InstanceMessage";
2
- export declare enum OpsCommandEnum {
2
+ export declare enum EOpsCommand {
3
3
  DESCRIBE = "describe",
4
4
  EXECUTE = "execute",
5
5
  RESTART = "restart",
@@ -15,13 +15,13 @@ export interface IOpsMessage extends IInstanceMessage {
15
15
  group: string;
16
16
  pod: string;
17
17
  container: string;
18
- command: OpsCommandEnum;
18
+ command: EOpsCommand;
19
19
  params?: string[];
20
20
  }
21
21
  export interface IOpsMessageResponse extends IInstanceMessage {
22
22
  msgtype: 'opsmessageresponse';
23
23
  id: string;
24
- command: OpsCommandEnum;
24
+ command: EOpsCommand;
25
25
  namespace: string;
26
26
  group: string;
27
27
  pod: string;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OpsCommandEnum = void 0;
4
- var OpsCommandEnum;
5
- (function (OpsCommandEnum) {
6
- OpsCommandEnum["DESCRIBE"] = "describe";
7
- OpsCommandEnum["EXECUTE"] = "execute";
8
- OpsCommandEnum["RESTART"] = "restart";
9
- OpsCommandEnum["RESTARTPOD"] = "restartpod";
10
- OpsCommandEnum["RESTARTNS"] = "restartns";
11
- })(OpsCommandEnum || (exports.OpsCommandEnum = OpsCommandEnum = {}));
3
+ exports.EOpsCommand = void 0;
4
+ var EOpsCommand;
5
+ (function (EOpsCommand) {
6
+ EOpsCommand["DESCRIBE"] = "describe";
7
+ EOpsCommand["EXECUTE"] = "execute";
8
+ EOpsCommand["RESTART"] = "restart";
9
+ EOpsCommand["RESTARTPOD"] = "restartpod";
10
+ EOpsCommand["RESTARTNS"] = "restartns";
11
+ })(EOpsCommand || (exports.EOpsCommand = EOpsCommand = {}));
@@ -1,5 +1,5 @@
1
1
  import { IInstanceMessage } from "./InstanceMessage";
2
- export declare enum TrivyCommandEnum {
2
+ export declare enum ETrivyCommand {
3
3
  SCORE = "score",
4
4
  RESCAN = "rescan"
5
5
  }
@@ -12,7 +12,7 @@ export interface ITrivyMessage extends IInstanceMessage {
12
12
  group: string;
13
13
  pod: string;
14
14
  container: string;
15
- command: TrivyCommandEnum;
15
+ command: ETrivyCommand;
16
16
  params?: string[];
17
17
  }
18
18
  export interface ITrivyMessageResponse extends IInstanceMessage {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TrivyCommandEnum = void 0;
4
- var TrivyCommandEnum;
5
- (function (TrivyCommandEnum) {
6
- TrivyCommandEnum["SCORE"] = "score";
7
- TrivyCommandEnum["RESCAN"] = "rescan";
8
- })(TrivyCommandEnum || (exports.TrivyCommandEnum = TrivyCommandEnum = {}));
3
+ exports.ETrivyCommand = void 0;
4
+ var ETrivyCommand;
5
+ (function (ETrivyCommand) {
6
+ ETrivyCommand["SCORE"] = "score";
7
+ ETrivyCommand["RESCAN"] = "rescan";
8
+ })(ETrivyCommand || (exports.ETrivyCommand = ETrivyCommand = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jfvilas/kwirth-common",
3
- "version": "0.4.45",
3
+ "version": "0.4.47",
4
4
  "description": "Common interfaces for integrating applications with Kwirth",
5
5
  "scripts": {
6
6
  "build": "del .\\dist\\* /s /q && tsc"