@cap-js-community/event-queue 1.10.0-beta.6 → 1.10.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cap-js-community/event-queue",
3
- "version": "1.10.0-beta.6",
3
+ "version": "1.10.1",
4
4
  "description": "An event queue that enables secure transactional processing of asynchronous and periodic events, featuring instant event processing with Redis Pub/Sub and load distribution across all application instances.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -44,17 +44,17 @@
44
44
  "node": ">=18"
45
45
  },
46
46
  "dependencies": {
47
- "@sap/xssec": "^4.5.0",
47
+ "@sap/xssec": "^4.6.0",
48
48
  "cron-parser": "^5.1.0",
49
49
  "redis": "^4.7.0",
50
50
  "verror": "^1.10.1",
51
51
  "yaml": "^2.7.1"
52
52
  },
53
53
  "devDependencies": {
54
- "@cap-js/cds-test": "^0.2.0",
55
- "@cap-js/hana": "^1.7.0",
56
- "@cap-js/sqlite": "^1.9.0",
57
- "@sap/cds": "^8.8.0",
54
+ "@cap-js/cds-test": "^0.3.0",
55
+ "@cap-js/hana": "^1.8.0",
56
+ "@cap-js/sqlite": "^1.10.0",
57
+ "@sap/cds": "^8.9.0",
58
58
  "@sap/cds-dk": "^8.8.0",
59
59
  "eslint": "^8.57.0",
60
60
  "eslint-config-prettier": "^9.1.0",
@@ -329,7 +329,7 @@ class EventQueueGenericOutboxHandler extends EventQueueBaseClass {
329
329
  async #setContextUser(context, userId, data) {
330
330
  context.user = new cds.User.Privileged({
331
331
  id: userId,
332
- authInfo: await common.getTokenInfo(this.baseContext.tenant),
332
+ tokenInfo: await common.getTokenInfo(this.baseContext.tenant),
333
333
  });
334
334
  if (data) {
335
335
  data.user = context.user;
@@ -63,7 +63,7 @@ const publishEvent = async (
63
63
  event.context = JSON.stringify({ traceContext: openTelemetry.getCurrentTraceContext() });
64
64
  }
65
65
 
66
- if (eventConfig.timeBucket && event.startAfter !== undefined) {
66
+ if (eventConfig.timeBucket && !(startAfter in event)) {
67
67
  event.startAfter = CronExpressionParser.parse(eventConfig.timeBucket).next().toISOString();
68
68
  }
69
69
  }
@@ -146,7 +146,7 @@ const _executeEventsAllTenantsRedis = async (tenantIds) => {
146
146
  async () => {
147
147
  tx.context.user = new cds.User.Privileged({
148
148
  id: config.userId,
149
- authInfo: await common.getTokenInfo(tenantId),
149
+ tokenInfo: await common.getTokenInfo(tenantId),
150
150
  });
151
151
  const entries = await openEvents.getOpenQueueEntries(tx, false);
152
152
  logger.info("broadcasting events for run", {