dt-common-device 11.0.1 → 11.0.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.
package/dist/audit/PushAudit.js
CHANGED
|
@@ -11,6 +11,10 @@ async function pushAudit(data) {
|
|
|
11
11
|
const audit = await typedi_1.default.get(AuditUtils_1.AuditUtils).buildAuditProperties(data.auditData);
|
|
12
12
|
await (0, dt_audit_library_1.publishAudit)({
|
|
13
13
|
eventType: data.auditType,
|
|
14
|
-
properties: {
|
|
14
|
+
properties: {
|
|
15
|
+
...audit,
|
|
16
|
+
timestamp: new Date().toISOString(),
|
|
17
|
+
env_type: process.env.NODE_ENV,
|
|
18
|
+
},
|
|
15
19
|
});
|
|
16
20
|
}
|
package/dist/config/config.js
CHANGED
|
@@ -212,17 +212,15 @@ function ensureAuditInitialized() {
|
|
|
212
212
|
const database = process.env.CLICKHOUSE_DATABASE;
|
|
213
213
|
const username = process.env.CLICKHOUSE_USERNAME;
|
|
214
214
|
const password = process.env.CLICKHOUSE_PASSWORD;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
throw new Error("dt-common-device: CLICKHOUSE_HOST, CLICKHOUSE_DATABASE, CLICKHOUSE_USERNAME, CLICKHOUSE_PASSWORD, and NODE_ENV must be set in environment variables");
|
|
215
|
+
if (!host || !database || !username || !password) {
|
|
216
|
+
getConfig().LOGGER.error("CLICKHOUSE_HOST, CLICKHOUSE_DATABASE, CLICKHOUSE_USERNAME, CLICKHOUSE_PASSWORD must be set in environment variables");
|
|
217
|
+
throw new Error("dt-common-device: CLICKHOUSE_HOST, CLICKHOUSE_DATABASE, CLICKHOUSE_USERNAME, CLICKHOUSE_PASSWORD must be set in environment variables");
|
|
219
218
|
}
|
|
220
219
|
(0, dt_audit_library_1.initializeAudit)({
|
|
221
220
|
host,
|
|
222
221
|
database,
|
|
223
222
|
username,
|
|
224
223
|
password,
|
|
225
|
-
env_type,
|
|
226
224
|
});
|
|
227
225
|
auditInitialized = true;
|
|
228
226
|
}
|
package/dist/config/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dt-common-device",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
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.
|
|
48
|
+
"dt-audit-library": "1.7.1",
|
|
49
49
|
"dt-pub-sub": "^1.0.0",
|
|
50
50
|
"ioredis": "5.6.1",
|
|
51
51
|
"lodash": "^4.17.21",
|