@ductape/sdk 0.2.0 → 0.2.3
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/agents/agents.service.js +6 -6
- package/dist/agents/agents.service.js.map +1 -1
- package/dist/brokers/brokers.service.js +3 -3
- package/dist/brokers/brokers.service.js.map +1 -1
- package/dist/cache/cache.service.js +4 -4
- package/dist/cache/cache.service.js.map +1 -1
- package/dist/database/databases.service.js +20 -20
- package/dist/database/databases.service.js.map +1 -1
- package/dist/features/feature-executor.js +6 -6
- package/dist/features/feature-executor.js.map +1 -1
- package/dist/features/features.service.js +10 -10
- package/dist/features/features.service.js.map +1 -1
- package/dist/graph/graphs.service.js +32 -32
- package/dist/graph/graphs.service.js.map +1 -1
- package/dist/notifications/notifications.service.js +1 -1
- package/dist/notifications/notifications.service.js.map +1 -1
- package/dist/processor/services/processor.service.d.ts +2 -2
- package/dist/processor/services/processor.service.js +24 -18
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/resilience/fallback.service.js +5 -5
- package/dist/resilience/fallback.service.js.map +1 -1
- package/dist/sessions/sessions.service.js +22 -22
- package/dist/sessions/sessions.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/vector/vector-database.service.js +14 -14
- package/dist/vector/vector-database.service.js.map +1 -1
- package/dist/vector/vector.service.js +2 -2
- package/dist/vector/vector.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -991,7 +991,7 @@ class DatabaseService {
|
|
|
991
991
|
lastConnectLogAt.set(logKey, Object.assign(Object.assign({}, lastSuccess), { success: end }));
|
|
992
992
|
this.logService.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
993
993
|
end, message: 'Database connect - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
|
|
994
|
-
this.logService.publish();
|
|
994
|
+
void this.logService.publish().catch(() => { });
|
|
995
995
|
}
|
|
996
996
|
return new DatabaseConnection(this, config.database, config.env, config.product || '');
|
|
997
997
|
}
|
|
@@ -1002,7 +1002,7 @@ class DatabaseService {
|
|
|
1002
1002
|
lastConnectLogAt.set(logKey, Object.assign(Object.assign({}, lastFail), { failed: end }));
|
|
1003
1003
|
this.logService.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1004
1004
|
end, message: 'Database connect - failed', failed_execution: true, data: { database: config.database, env: config.env, error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
|
|
1005
|
-
|
|
1005
|
+
void this.logService.publish().catch(() => { });
|
|
1006
1006
|
}
|
|
1007
1007
|
const err = error;
|
|
1008
1008
|
const baseMsg = (_e = err === null || err === void 0 ? void 0 : err.message) !== null && _e !== void 0 ? _e : String(error);
|
|
@@ -1259,7 +1259,7 @@ class DatabaseService {
|
|
|
1259
1259
|
const end = Date.now();
|
|
1260
1260
|
(_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1261
1261
|
end, message: `Database query - cache hit (${cached.source})`, successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS, cache_tag: options.cache, cache_key: cached.key, cache_status: true }));
|
|
1262
|
-
(_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish();
|
|
1262
|
+
void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
|
|
1263
1263
|
return cached.data;
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
@@ -1285,14 +1285,14 @@ class DatabaseService {
|
|
|
1285
1285
|
const end = Date.now();
|
|
1286
1286
|
(_m = this.logService) === null || _m === void 0 ? void 0 : _m.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1287
1287
|
end, message: options.cache ? 'Database query - cache miss' : 'Database query - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS, cache_tag: options.cache, cache_key: queryCacheKey }));
|
|
1288
|
-
(_o = this.logService) === null || _o === void 0 ? void 0 : _o.publish();
|
|
1288
|
+
void ((_o = this.logService) === null || _o === void 0 ? void 0 : _o.publish().catch(() => { }));
|
|
1289
1289
|
return result;
|
|
1290
1290
|
}
|
|
1291
1291
|
catch (error) {
|
|
1292
1292
|
const end = Date.now();
|
|
1293
1293
|
(_p = this.logService) === null || _p === void 0 ? void 0 : _p.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1294
1294
|
end, message: 'Database query - failed', failed_execution: true, data: { table: options.table, operation: 'query', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL, cache_tag: options.cache, cache_key: queryCacheKey }));
|
|
1295
|
-
|
|
1295
|
+
void ((_q = this.logService) === null || _q === void 0 ? void 0 : _q.publish().catch(() => { }));
|
|
1296
1296
|
throw error;
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
@@ -1363,7 +1363,7 @@ class DatabaseService {
|
|
|
1363
1363
|
const end = Date.now();
|
|
1364
1364
|
(_f = this.logService) === null || _f === void 0 ? void 0 : _f.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1365
1365
|
end, message: `Database raw query - cache hit (${cached.source})`, successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS, cache_tag: options.cache, cache_key: cached.key, cache_status: true }));
|
|
1366
|
-
(_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish();
|
|
1366
|
+
void ((_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish().catch(() => { }));
|
|
1367
1367
|
return cached.data;
|
|
1368
1368
|
}
|
|
1369
1369
|
}
|
|
@@ -1385,14 +1385,14 @@ class DatabaseService {
|
|
|
1385
1385
|
const end = Date.now();
|
|
1386
1386
|
(_h = this.logService) === null || _h === void 0 ? void 0 : _h.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1387
1387
|
end, message: options.cache ? 'Database raw query - cache miss' : 'Database raw query - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS, cache_tag: options.cache, cache_key: rawQueryCacheKey }));
|
|
1388
|
-
(_j = this.logService) === null || _j === void 0 ? void 0 : _j.publish();
|
|
1388
|
+
void ((_j = this.logService) === null || _j === void 0 ? void 0 : _j.publish().catch(() => { }));
|
|
1389
1389
|
return result;
|
|
1390
1390
|
}
|
|
1391
1391
|
catch (error) {
|
|
1392
1392
|
const end = Date.now();
|
|
1393
1393
|
(_k = this.logService) === null || _k === void 0 ? void 0 : _k.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1394
1394
|
end, message: 'Database raw query - failed', failed_execution: true, data: { operation: 'raw', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL, cache_tag: options.cache, cache_key: rawQueryCacheKey }));
|
|
1395
|
-
|
|
1395
|
+
void ((_l = this.logService) === null || _l === void 0 ? void 0 : _l.publish().catch(() => { }));
|
|
1396
1396
|
throw error;
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
@@ -1483,14 +1483,14 @@ class DatabaseService {
|
|
|
1483
1483
|
const end = Date.now();
|
|
1484
1484
|
(_f = this.logService) === null || _f === void 0 ? void 0 : _f.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1485
1485
|
end, message: 'Database insert - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
|
|
1486
|
-
(_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish();
|
|
1486
|
+
void ((_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish().catch(() => { }));
|
|
1487
1487
|
return result;
|
|
1488
1488
|
}
|
|
1489
1489
|
catch (error) {
|
|
1490
1490
|
const end = Date.now();
|
|
1491
1491
|
(_h = this.logService) === null || _h === void 0 ? void 0 : _h.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1492
1492
|
end, message: 'Database insert - failed', failed_execution: true, data: { table: options.table, operation: 'insert', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
|
|
1493
|
-
|
|
1493
|
+
void ((_j = this.logService) === null || _j === void 0 ? void 0 : _j.publish().catch(() => { }));
|
|
1494
1494
|
throw error;
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
@@ -1563,14 +1563,14 @@ class DatabaseService {
|
|
|
1563
1563
|
const end = Date.now();
|
|
1564
1564
|
(_f = this.logService) === null || _f === void 0 ? void 0 : _f.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1565
1565
|
end, message: 'Database update - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
|
|
1566
|
-
(_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish();
|
|
1566
|
+
void ((_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish().catch(() => { }));
|
|
1567
1567
|
return result;
|
|
1568
1568
|
}
|
|
1569
1569
|
catch (error) {
|
|
1570
1570
|
const end = Date.now();
|
|
1571
1571
|
(_h = this.logService) === null || _h === void 0 ? void 0 : _h.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1572
1572
|
end, message: 'Database update - failed', failed_execution: true, data: { table: options.table, operation: 'update', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
|
|
1573
|
-
|
|
1573
|
+
void ((_j = this.logService) === null || _j === void 0 ? void 0 : _j.publish().catch(() => { }));
|
|
1574
1574
|
throw error;
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
@@ -1626,14 +1626,14 @@ class DatabaseService {
|
|
|
1626
1626
|
const end = Date.now();
|
|
1627
1627
|
(_f = this.logService) === null || _f === void 0 ? void 0 : _f.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1628
1628
|
end, message: 'Database delete - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
|
|
1629
|
-
(_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish();
|
|
1629
|
+
void ((_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish().catch(() => { }));
|
|
1630
1630
|
return result;
|
|
1631
1631
|
}
|
|
1632
1632
|
catch (error) {
|
|
1633
1633
|
const end = Date.now();
|
|
1634
1634
|
(_h = this.logService) === null || _h === void 0 ? void 0 : _h.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1635
1635
|
end, message: 'Database delete - failed', failed_execution: true, data: { table: options.table, operation: 'delete', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
|
|
1636
|
-
|
|
1636
|
+
void ((_j = this.logService) === null || _j === void 0 ? void 0 : _j.publish().catch(() => { }));
|
|
1637
1637
|
throw error;
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
@@ -1697,14 +1697,14 @@ class DatabaseService {
|
|
|
1697
1697
|
const end = Date.now();
|
|
1698
1698
|
(_f = this.logService) === null || _f === void 0 ? void 0 : _f.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1699
1699
|
end, message: 'Database upsert - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
|
|
1700
|
-
(_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish();
|
|
1700
|
+
void ((_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish().catch(() => { }));
|
|
1701
1701
|
return result;
|
|
1702
1702
|
}
|
|
1703
1703
|
catch (error) {
|
|
1704
1704
|
const end = Date.now();
|
|
1705
1705
|
(_h = this.logService) === null || _h === void 0 ? void 0 : _h.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
1706
1706
|
end, message: 'Database upsert - failed', failed_execution: true, data: { table: options.table, operation: 'upsert', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
|
|
1707
|
-
|
|
1707
|
+
void ((_j = this.logService) === null || _j === void 0 ? void 0 : _j.publish().catch(() => { }));
|
|
1708
1708
|
throw error;
|
|
1709
1709
|
}
|
|
1710
1710
|
}
|
|
@@ -2519,14 +2519,14 @@ class DatabaseService {
|
|
|
2519
2519
|
const end = Date.now();
|
|
2520
2520
|
(_c = this.logService) === null || _c === void 0 ? void 0 : _c.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
2521
2521
|
end, message: 'Database action execute - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
|
|
2522
|
-
(_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish();
|
|
2522
|
+
void ((_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish().catch(() => { }));
|
|
2523
2523
|
return result;
|
|
2524
2524
|
}
|
|
2525
2525
|
catch (error) {
|
|
2526
2526
|
const end = Date.now();
|
|
2527
2527
|
(_e = this.logService) === null || _e === void 0 ? void 0 : _e.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
2528
2528
|
end, message: 'Database action execute - failed', failed_execution: true, data: { database: options.database, action: options.action, error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
|
|
2529
|
-
|
|
2529
|
+
void ((_f = this.logService) === null || _f === void 0 ? void 0 : _f.publish().catch(() => { }));
|
|
2530
2530
|
throw error;
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
@@ -2671,7 +2671,7 @@ class DatabaseService {
|
|
|
2671
2671
|
const end = Date.now();
|
|
2672
2672
|
(_c = this.logService) === null || _c === void 0 ? void 0 : _c.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
2673
2673
|
end, message: 'Database dispatch - success', successful_execution: true, data: { database: data.database, operation: data.operation, job_id }, status: logs_types_1.LogEventStatus.SUCCESS }));
|
|
2674
|
-
(_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish();
|
|
2674
|
+
void ((_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish().catch(() => { }));
|
|
2675
2675
|
return {
|
|
2676
2676
|
job_id,
|
|
2677
2677
|
status: startAt > Date.now() ? 'scheduled' : 'queued',
|
|
@@ -2684,7 +2684,7 @@ class DatabaseService {
|
|
|
2684
2684
|
const end = Date.now();
|
|
2685
2685
|
(_e = this.logService) === null || _e === void 0 ? void 0 : _e.add(Object.assign(Object.assign({}, baseLogs), { start,
|
|
2686
2686
|
end, message: 'Database dispatch - failed', failed_execution: true, data: { database: data.database, operation: data.operation, error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
|
|
2687
|
-
|
|
2687
|
+
void ((_f = this.logService) === null || _f === void 0 ? void 0 : _f.publish().catch(() => { }));
|
|
2688
2688
|
throw error;
|
|
2689
2689
|
}
|
|
2690
2690
|
}
|