@cap-js-community/event-queue 0.1.57 → 0.1.58

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.
Files changed (2) hide show
  1. package/package.json +11 -13
  2. package/src/runner.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cap-js-community/event-queue",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "description": "An event queue that enables secure transactional processing of asynchronous events, featuring instant event processing with Redis Pub/Sub and load distribution across all application instances.",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -30,7 +30,7 @@
30
30
  "lint:ci": "npm run eslint:ci && npm run prettier:ci",
31
31
  "eslint": "eslint --fix .",
32
32
  "eslint:ci": "eslint .",
33
- "prettier": "prettier --write --loglevel error .",
33
+ "prettier": "prettier --write --log-level error .",
34
34
  "prettier:ci": "prettier --check .",
35
35
  "prepareRelease": "npm prune --production",
36
36
  "docs": "cd docs && bundle exec jekyll serve",
@@ -41,24 +41,22 @@
41
41
  "node": ">=16"
42
42
  },
43
43
  "dependencies": {
44
- "uuid": "9.0.1",
45
44
  "redis": "4.6.10",
46
45
  "verror": "1.10.1",
47
- "yaml": "2.3.2"
46
+ "yaml": "2.3.3"
48
47
  },
49
48
  "devDependencies": {
50
- "@sap/eslint-plugin-cds": "2.6.3",
51
- "@sap/cds-dk": "7.1.1",
52
- "hdb": "0.19.6",
49
+ "@sap/cds": "7.3.1",
50
+ "@sap/cds-dk": "7.3.1",
51
+ "eslint": "8.52.0",
52
+ "eslint-config-prettier": "9.0.0",
53
+ "eslint-plugin-jest": "27.6.0",
53
54
  "eslint-plugin-node": "11.1.0",
54
- "sqlite3": "5.1.6",
55
55
  "express": "4.18.2",
56
- "@sap/cds": "7.1.2",
57
- "eslint": "8.50.0",
58
- "eslint-config-prettier": "9.0.0",
59
- "eslint-plugin-jest": "27.4.0",
56
+ "hdb": "0.19.6",
60
57
  "jest": "29.7.0",
61
- "prettier": "3.0.3"
58
+ "prettier": "3.0.3",
59
+ "sqlite3": "5.1.6"
62
60
  },
63
61
  "homepage": "https://cap-js-community.github.io/event-queue/",
64
62
  "repository": {
package/src/runner.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const uuid = require("uuid");
3
+ const { randomUUID } = require("crypto");
4
4
 
5
5
  const eventQueueConfig = require("./config");
6
6
  const { eventQueueRunner } = require("./processEventQueue");
@@ -130,7 +130,7 @@ const _executeRunForTenant = async (tenantId, runId) => {
130
130
 
131
131
  const _acquireRunId = async (context) => {
132
132
  const configInstance = eventQueueConfig.getConfigInstance();
133
- let runId = uuid.v4();
133
+ let runId = randomUUID();
134
134
  const couldSetValue = await distributedLock.setValueWithExpire(context, EVENT_QUEUE_RUN_ID, runId, {
135
135
  tenantScoped: false,
136
136
  expiryTime: configInstance.runInterval * 0.95,