dt-common-device 9.2.8 → 9.4.0

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.
@@ -206,13 +206,22 @@ function checkRequiredEnv(requiredEnvs) {
206
206
  function ensureAuditInitialized() {
207
207
  if (auditInitialized)
208
208
  return;
209
- const apiKey = process.env.POSTHOG_API_KEY;
210
- const host = process.env.POSTHOG_HOST;
211
- if (!apiKey || !host) {
212
- getConfig().LOGGER.error("POSTHOG_API_KEY and POSTHOG_HOST must be set in environment variables");
213
- throw new Error("dt-common-device: POSTHOG_API_KEY and POSTHOG_HOST must be set in environment variables");
209
+ // const apiKey = process.env.POSTHOG_API_KEY;
210
+ // const host = process.env.POSTHOG_HOST;
211
+ const host = process.env.CLICKHOUSE_HOST;
212
+ const database = process.env.CLICKHOUSE_DATABASE;
213
+ const username = process.env.CLICKHOUSE_USERNAME;
214
+ const password = process.env.CLICKHOUSE_PASSWORD;
215
+ if (!host || !database || !username || !password) {
216
+ getConfig().LOGGER.error("CLICKHOUSE_HOST, CLICKHOUSE_DATABASE, CLICKHOUSE_USERNAME, and CLICKHOUSE_PASSWORD must be set in environment variables");
217
+ throw new Error("dt-common-device: CLICKHOUSE_HOST, CLICKHOUSE_DATABASE, CLICKHOUSE_USERNAME, and CLICKHOUSE_PASSWORD must be set in environment variables");
214
218
  }
215
- (0, dt_audit_library_1.initializeAudit)(apiKey, host);
219
+ (0, dt_audit_library_1.initializeAudit)({
220
+ host,
221
+ database,
222
+ username,
223
+ password,
224
+ });
216
225
  auditInitialized = true;
217
226
  }
218
227
  // Direct logger export for easier usage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-common-device",
3
- "version": "9.2.8",
3
+ "version": "9.4.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "axios": "1.10.0",
47
47
  "bullmq": "5.56.4",
48
- "dt-audit-library": "^1.0.3",
48
+ "dt-audit-library": "1.0.5",
49
49
  "dt-pub-sub": "^1.0.0",
50
50
  "ioredis": "5.6.1",
51
51
  "lodash": "^4.17.21",