@ductape/sdk 0.2.2 → 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.
@@ -884,7 +884,7 @@ class GraphService {
884
884
  if (this.logService && (!lastSuccess.success || end - lastSuccess.success >= GRAPH_CONNECT_LOG_DEBOUNCE_MS)) {
885
885
  lastGraphConnectLogAt.set(logKey, Object.assign(Object.assign({}, lastSuccess), { success: end }));
886
886
  this.logService.add(Object.assign(Object.assign({}, baseLogs), { start, end, message: 'Graph connect - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
887
- this.logService.publish();
887
+ void this.logService.publish().catch(() => { });
888
888
  }
889
889
  return result;
890
890
  }
@@ -895,7 +895,7 @@ class GraphService {
895
895
  lastGraphConnectLogAt.set(logKey, Object.assign(Object.assign({}, lastFail), { failed: end }));
896
896
  this.logService.add(Object.assign(Object.assign({}, baseLogs), { start,
897
897
  end, message: 'Graph connect - failed', failed_execution: true, data: { graph: config.graph, env: config.env, error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
898
- this.logService.publish().catch(() => { });
898
+ void this.logService.publish().catch(() => { });
899
899
  }
900
900
  throw error;
901
901
  }
@@ -1009,14 +1009,14 @@ class GraphService {
1009
1009
  const end = Date.now();
1010
1010
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1011
1011
  end, message: 'Graph createNode - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1012
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1012
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1013
1013
  return result;
1014
1014
  }
1015
1015
  catch (error) {
1016
1016
  const end = Date.now();
1017
1017
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1018
1018
  end, message: 'Graph createNode - failed', failed_execution: true, data: { labels: resolvedOptions.labels, operation: 'createNode', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1019
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1019
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1020
1020
  throw error;
1021
1021
  }
1022
1022
  }
@@ -1081,7 +1081,7 @@ class GraphService {
1081
1081
  const end = Date.now();
1082
1082
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1083
1083
  end, message: `Graph findNodes - cache hit (${cached.source})`, successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS, cache_tag: resolvedOptions.cache, cache_key: cached.key, cache_status: true }));
1084
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish();
1084
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1085
1085
  return cached.data;
1086
1086
  }
1087
1087
  }
@@ -1109,14 +1109,14 @@ class GraphService {
1109
1109
  const end = Date.now();
1110
1110
  (_m = this.logService) === null || _m === void 0 ? void 0 : _m.add(Object.assign(Object.assign({}, baseLogs), { start,
1111
1111
  end, message: 'Graph findNodes - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1112
- (_o = this.logService) === null || _o === void 0 ? void 0 : _o.publish();
1112
+ void ((_o = this.logService) === null || _o === void 0 ? void 0 : _o.publish().catch(() => { }));
1113
1113
  return result;
1114
1114
  }
1115
1115
  catch (error) {
1116
1116
  const end = Date.now();
1117
1117
  (_p = this.logService) === null || _p === void 0 ? void 0 : _p.add(Object.assign(Object.assign({}, baseLogs), { start,
1118
1118
  end, message: 'Graph findNodes - failed', failed_execution: true, data: { labels: resolvedOptions.labels, operation: 'findNodes', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1119
- (_q = this.logService) === null || _q === void 0 ? void 0 : _q.publish().catch(() => { });
1119
+ void ((_q = this.logService) === null || _q === void 0 ? void 0 : _q.publish().catch(() => { }));
1120
1120
  throw error;
1121
1121
  }
1122
1122
  }
@@ -1172,14 +1172,14 @@ class GraphService {
1172
1172
  const end = Date.now();
1173
1173
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1174
1174
  end, message: 'Graph updateNode - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1175
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1175
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1176
1176
  return result;
1177
1177
  }
1178
1178
  catch (error) {
1179
1179
  const end = Date.now();
1180
1180
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1181
1181
  end, message: 'Graph updateNode - failed', failed_execution: true, data: { id: resolvedOptions.id, operation: 'updateNode', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1182
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1182
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1183
1183
  throw error;
1184
1184
  }
1185
1185
  }
@@ -1225,14 +1225,14 @@ class GraphService {
1225
1225
  const end = Date.now();
1226
1226
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1227
1227
  end, message: 'Graph deleteNode - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1228
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1228
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1229
1229
  return result;
1230
1230
  }
1231
1231
  catch (error) {
1232
1232
  const end = Date.now();
1233
1233
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1234
1234
  end, message: 'Graph deleteNode - failed', failed_execution: true, data: { id: resolvedOptions.id, operation: 'deleteNode', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1235
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1235
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1236
1236
  throw error;
1237
1237
  }
1238
1238
  }
@@ -1349,14 +1349,14 @@ class GraphService {
1349
1349
  const end = Date.now();
1350
1350
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1351
1351
  end, message: 'Graph createRelationship - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1352
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1352
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1353
1353
  return result;
1354
1354
  }
1355
1355
  catch (error) {
1356
1356
  const end = Date.now();
1357
1357
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1358
1358
  end, message: 'Graph createRelationship - failed', failed_execution: true, data: { type: resolvedOptions.type, operation: 'createRelationship', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1359
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1359
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1360
1360
  throw error;
1361
1361
  }
1362
1362
  }
@@ -1402,14 +1402,14 @@ class GraphService {
1402
1402
  const end = Date.now();
1403
1403
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1404
1404
  end, message: 'Graph findRelationships - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1405
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1405
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1406
1406
  return result;
1407
1407
  }
1408
1408
  catch (error) {
1409
1409
  const end = Date.now();
1410
1410
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1411
1411
  end, message: 'Graph findRelationships - failed', failed_execution: true, data: { type: resolvedOptions.type, operation: 'findRelationships', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1412
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1412
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1413
1413
  throw error;
1414
1414
  }
1415
1415
  }
@@ -1464,14 +1464,14 @@ class GraphService {
1464
1464
  const end = Date.now();
1465
1465
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1466
1466
  end, message: 'Graph updateRelationship - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1467
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1467
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1468
1468
  return result;
1469
1469
  }
1470
1470
  catch (error) {
1471
1471
  const end = Date.now();
1472
1472
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1473
1473
  end, message: 'Graph updateRelationship - failed', failed_execution: true, data: { id: resolvedOptions.id, operation: 'updateRelationship', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1474
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1474
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1475
1475
  throw error;
1476
1476
  }
1477
1477
  }
@@ -1517,14 +1517,14 @@ class GraphService {
1517
1517
  const end = Date.now();
1518
1518
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1519
1519
  end, message: 'Graph deleteRelationship - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1520
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1520
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1521
1521
  return result;
1522
1522
  }
1523
1523
  catch (error) {
1524
1524
  const end = Date.now();
1525
1525
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1526
1526
  end, message: 'Graph deleteRelationship - failed', failed_execution: true, data: { id: resolvedOptions.id, operation: 'deleteRelationship', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1527
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1527
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1528
1528
  throw error;
1529
1529
  }
1530
1530
  }
@@ -1580,14 +1580,14 @@ class GraphService {
1580
1580
  const end = Date.now();
1581
1581
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1582
1582
  end, message: 'Graph traverse - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1583
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1583
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1584
1584
  return result;
1585
1585
  }
1586
1586
  catch (error) {
1587
1587
  const end = Date.now();
1588
1588
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1589
1589
  end, message: 'Graph traverse - failed', failed_execution: true, data: { startNodeId: options.startNodeId, operation: 'traverse', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1590
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1590
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1591
1591
  throw error;
1592
1592
  }
1593
1593
  }
@@ -1677,14 +1677,14 @@ class GraphService {
1677
1677
  const end = Date.now();
1678
1678
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1679
1679
  end, message: 'Graph countNodes - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1680
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1680
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1681
1681
  return result;
1682
1682
  }
1683
1683
  catch (error) {
1684
1684
  const end = Date.now();
1685
1685
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1686
1686
  end, message: 'Graph countNodes - failed', failed_execution: true, data: { labels, operation: 'countNodes', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1687
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1687
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1688
1688
  throw error;
1689
1689
  }
1690
1690
  }
@@ -1737,14 +1737,14 @@ class GraphService {
1737
1737
  const end = Date.now();
1738
1738
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1739
1739
  end, message: 'Graph getStatistics - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
1740
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish();
1740
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
1741
1741
  return result;
1742
1742
  }
1743
1743
  catch (error) {
1744
1744
  const end = Date.now();
1745
1745
  (_j = this.logService) === null || _j === void 0 ? void 0 : _j.add(Object.assign(Object.assign({}, baseLogs), { start,
1746
1746
  end, message: 'Graph getStatistics - failed', failed_execution: true, data: { operation: 'getStatistics', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1747
- (_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { });
1747
+ void ((_k = this.logService) === null || _k === void 0 ? void 0 : _k.publish().catch(() => { }));
1748
1748
  throw error;
1749
1749
  }
1750
1750
  }
@@ -1818,14 +1818,14 @@ class GraphService {
1818
1818
  const end = Date.now();
1819
1819
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start,
1820
1820
  end, message: 'Graph query - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS, data: { operation: 'query', graph: graphValue, env: envValue, recordCount: ((_h = result.records) === null || _h === void 0 ? void 0 : _h.length) || 0 } }));
1821
- (_j = this.logService) === null || _j === void 0 ? void 0 : _j.publish();
1821
+ void ((_j = this.logService) === null || _j === void 0 ? void 0 : _j.publish().catch(() => { }));
1822
1822
  return result;
1823
1823
  }
1824
1824
  catch (error) {
1825
1825
  const end = Date.now();
1826
1826
  (_k = this.logService) === null || _k === void 0 ? void 0 : _k.add(Object.assign(Object.assign({}, baseLogs), { start,
1827
1827
  end, message: 'Graph query - failed', failed_execution: true, data: { operation: 'query', graph: graphValue, env: envValue, error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
1828
- (_l = this.logService) === null || _l === void 0 ? void 0 : _l.publish().catch(() => { });
1828
+ void ((_l = this.logService) === null || _l === void 0 ? void 0 : _l.publish().catch(() => { }));
1829
1829
  throw error;
1830
1830
  }
1831
1831
  }
@@ -2198,7 +2198,7 @@ class GraphService {
2198
2198
  if (!action) {
2199
2199
  const end = Date.now();
2200
2200
  (_c = this.logService) === null || _c === void 0 ? void 0 : _c.add(Object.assign(Object.assign({}, baseLogs), { start: startTime, end, message: 'Graph action execute - failed', failed_execution: true, data: { graph: options.graph, action: options.action, error: `Action '${options.action}' not found` }, status: logs_types_1.LogEventStatus.FAIL }));
2201
- (_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish().catch(() => { });
2201
+ void ((_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish().catch(() => { }));
2202
2202
  return {
2203
2203
  success: false,
2204
2204
  executionTime: end - startTime,
@@ -2214,7 +2214,7 @@ class GraphService {
2214
2214
  const result = await this.executeOperation(query);
2215
2215
  const end = Date.now();
2216
2216
  (_e = this.logService) === null || _e === void 0 ? void 0 : _e.add(Object.assign(Object.assign({}, baseLogs), { start: startTime, end, message: 'Graph action execute - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
2217
- (_f = this.logService) === null || _f === void 0 ? void 0 : _f.publish();
2217
+ void ((_f = this.logService) === null || _f === void 0 ? void 0 : _f.publish().catch(() => { }));
2218
2218
  return {
2219
2219
  success: true,
2220
2220
  executionTime: end - startTime,
@@ -2225,7 +2225,7 @@ class GraphService {
2225
2225
  catch (error) {
2226
2226
  const end = Date.now();
2227
2227
  (_g = this.logService) === null || _g === void 0 ? void 0 : _g.add(Object.assign(Object.assign({}, baseLogs), { start: startTime, end, message: 'Graph action execute - failed', failed_execution: true, data: { graph: options.graph, action: options.action, error: error.message || 'Execution failed' }, status: logs_types_1.LogEventStatus.FAIL }));
2228
- (_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { });
2228
+ void ((_h = this.logService) === null || _h === void 0 ? void 0 : _h.publish().catch(() => { }));
2229
2229
  return {
2230
2230
  success: false,
2231
2231
  executionTime: end - startTime,
@@ -2419,7 +2419,7 @@ class GraphService {
2419
2419
  const end = Date.now();
2420
2420
  (_c = this.logService) === null || _c === void 0 ? void 0 : _c.add(Object.assign(Object.assign({}, baseLogs), { start,
2421
2421
  end, message: 'Graph dispatch - success', successful_execution: true, data: { graph: data.graph, operation: data.operation, job_id }, status: logs_types_1.LogEventStatus.SUCCESS }));
2422
- (_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish();
2422
+ void ((_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish().catch(() => { }));
2423
2423
  return {
2424
2424
  job_id,
2425
2425
  status: startAt > Date.now() ? 'scheduled' : 'queued',
@@ -2432,7 +2432,7 @@ class GraphService {
2432
2432
  const end = Date.now();
2433
2433
  (_e = this.logService) === null || _e === void 0 ? void 0 : _e.add(Object.assign(Object.assign({}, baseLogs), { start,
2434
2434
  end, message: 'Graph dispatch - failed', failed_execution: true, data: { graph: data.graph, operation: data.operation, error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
2435
- (_f = this.logService) === null || _f === void 0 ? void 0 : _f.publish().catch(() => { });
2435
+ void ((_f = this.logService) === null || _f === void 0 ? void 0 : _f.publish().catch(() => { }));
2436
2436
  throw error;
2437
2437
  }
2438
2438
  }