dt-common-device 11.2.1 → 11.2.2

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.
@@ -69,6 +69,11 @@ async function initialize(cfg) {
69
69
  db_keys = constants_1.CONFIG_KEYS.MIGRATION.db_keys;
70
70
  await validateServiceConfig(cfg);
71
71
  }
72
+ if (cfg.SOURCE === "OPERATION_NODE_SERVICE") {
73
+ sourceKey = "OPERATION_NODE";
74
+ db_keys = constants_1.CONFIG_KEYS.OPERATION_NODE.db_keys;
75
+ await validateServiceConfig(cfg);
76
+ }
72
77
  // Connect to databases
73
78
  try {
74
79
  await (0, db_1.connectDatabase)();
@@ -4,7 +4,7 @@ export interface ILogger {
4
4
  warn(message: string, ...args: any[]): void;
5
5
  error(message: string, ...args: any[]): void;
6
6
  }
7
- type AllowedSource = "ACCESS_SERVICE" | "ADMIN_SERVICE" | "ENERGY_SERVICE" | "REMOTE_SERVICE" | "SCHEDULE_SERVICE" | "MIGRATION";
7
+ type AllowedSource = "ACCESS_SERVICE" | "ADMIN_SERVICE" | "ENERGY_SERVICE" | "REMOTE_SERVICE" | "SCHEDULE_SERVICE" | "MIGRATION" | "OPERATION_NODE_SERVICE";
8
8
  export type IConfig = {
9
9
  SOURCE: AllowedSource;
10
10
  INTERNAL_EVENT_HANDLER?: IInternalEvent;
@@ -56,4 +56,11 @@ export declare const CONFIG_KEYS: {
56
56
  pms: string;
57
57
  };
58
58
  };
59
+ OPERATION_NODE: {
60
+ env: string[];
61
+ INTERNAL_EVENT_HANDLER: boolean;
62
+ db_keys: {
63
+ pms: string;
64
+ };
65
+ };
59
66
  };
@@ -9,8 +9,6 @@ exports.REQUIRED = {
9
9
  "EVENT_BUS_NAME",
10
10
  "REDIS_HOST",
11
11
  "REDIS_PORT",
12
- "POSTHOG_API_KEY",
13
- "POSTHOG_HOST",
14
12
  "DEVICE_SERVICE",
15
13
  "DT_API_KEY",
16
14
  "MONITORING_SERVICE_PYTHON",
@@ -101,4 +99,11 @@ exports.CONFIG_KEYS = {
101
99
  pms: "PMS_DB_URI",
102
100
  },
103
101
  },
102
+ OPERATION_NODE: {
103
+ env: ["PMS_DB_URI"],
104
+ INTERNAL_EVENT_HANDLER: false,
105
+ db_keys: {
106
+ pms: "PMS_DB_URI",
107
+ },
108
+ },
104
109
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-common-device",
3
- "version": "11.2.1",
3
+ "version": "11.2.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [