@falcondev-oss/workflow 0.8.1 → 0.8.4

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/dist/index.mjs +2 -2
  2. package/package.json +7 -7
package/dist/index.mjs CHANGED
@@ -7294,7 +7294,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7294
7294
  }));
7295
7295
 
7296
7296
  //#endregion
7297
- //#region node_modules/.pnpm/groupmq@1.1.0_ioredis@5.8.2/node_modules/groupmq/dist/index.js
7297
+ //#region node_modules/.pnpm/groupmq@1.1.0_ioredis@5.9.2/node_modules/groupmq/dist/index.js
7298
7298
  var import_parser = /* @__PURE__ */ __toESM$1(require_parser(), 1);
7299
7299
  const __INLINED_LUA_SCRIPTS__ = {
7300
7300
  "change-delay": "-- argv: ns, jobId, newDelayUntil, now\nlocal ns = KEYS[1]\nlocal jobId = ARGV[1]\nlocal newDelayUntil = tonumber(ARGV[2])\nlocal now = tonumber(ARGV[3])\n\nlocal jobKey = ns .. \":job:\" .. jobId\nlocal delayedKey = ns .. \":delayed\"\nlocal readyKey = ns .. \":ready\"\n\n-- Check if job exists\nlocal exists = redis.call(\"EXISTS\", jobKey)\nif exists == 0 then\n return 0\nend\n\nlocal groupId = redis.call(\"HGET\", jobKey, \"groupId\")\nif not groupId then\n return 0\nend\n\nlocal gZ = ns .. \":g:\" .. groupId\n\n-- Update job's delayUntil field\nredis.call(\"HSET\", jobKey, \"delayUntil\", tostring(newDelayUntil))\n\n-- Check if job is currently in delayed set\nlocal inDelayed = redis.call(\"ZSCORE\", delayedKey, jobId)\n\nif newDelayUntil > 0 and newDelayUntil > now then\n -- Job should be delayed\n redis.call(\"HSET\", jobKey, \"status\", \"delayed\")\n if inDelayed then\n -- Update existing delay\n redis.call(\"ZADD\", delayedKey, newDelayUntil, jobId)\n else\n -- Move to delayed\n redis.call(\"ZADD\", delayedKey, newDelayUntil, jobId)\n -- If this is the head job, remove group from ready\n local head = redis.call(\"ZRANGE\", gZ, 0, 0)\n if head and #head > 0 and head[1] == jobId then\n redis.call(\"ZREM\", readyKey, groupId)\n end\n end\nelse\n -- Job should be ready immediately\n redis.call(\"HSET\", jobKey, \"status\", \"waiting\")\n if inDelayed then\n -- Remove from delayed\n redis.call(\"ZREM\", delayedKey, jobId)\n -- If this is the head job, ensure group is in ready\n local head = redis.call(\"ZRANGE\", gZ, 0, 0, \"WITHSCORES\")\n if head and #head >= 2 and head[1] == jobId then\n local headScore = tonumber(head[2])\n redis.call(\"ZADD\", readyKey, headScore, groupId)\n end\n end\nend\n\nreturn 1\n\n\n",
@@ -9754,7 +9754,7 @@ var Workflow = class {
9754
9754
  Settings.logger?.info?.(`[${this.opts.id}] Job ${job.id} failed`);
9755
9755
  });
9756
9756
  worker.on("error", (error) => {
9757
- Settings.logger?.error?.(`[${this.opts.id}] Error during worker startup:`, error);
9757
+ Settings.logger?.error?.(`[${this.opts.id}] Job error:`, error);
9758
9758
  });
9759
9759
  Settings.logger?.info?.(`[${this.opts.id}] Worker started`);
9760
9760
  const metricsOpts = opts?.metrics ?? this.opts.workerOptions?.metrics ?? Settings.metrics;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@falcondev-oss/workflow",
3
3
  "type": "module",
4
- "version": "0.8.1",
4
+ "version": "0.8.4",
5
5
  "description": "Simple type-safe queue worker with durable execution using Redis.",
6
6
  "license": "MIT",
7
7
  "repository": "github:falcondev-oss/workflow",
@@ -37,26 +37,26 @@
37
37
  "@antfu/utils": "^9.3.0",
38
38
  "@opentelemetry/api": "^1.9.0",
39
39
  "@standard-schema/spec": "^1.1.0",
40
- "@types/node": "^25.0.3",
40
+ "@types/node": "^25.1.0",
41
41
  "exit-hook": "^5.0.1",
42
- "ioredis": "^5.8.2",
42
+ "groupmq": "^1.1.0",
43
+ "ioredis": "^5.9.2",
43
44
  "p-retry": "^7.1.1",
44
45
  "superjson": "^2.2.6",
45
- "type-fest": "^5.3.1"
46
+ "type-fest": "^5.4.2"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@falcondev-oss/configs": "^5.0.2",
49
50
  "@testcontainers/redis": "^11.11.0",
50
51
  "arktype": "^2.1.29",
51
52
  "eslint": "^9.39.2",
52
- "groupmq": "^1.1.0",
53
- "prettier": "^3.7.4",
53
+ "prettier": "^3.8.1",
54
54
  "rolldown": "1.0.0-rc.2",
55
55
  "tsdown": "0.19.0-beta.5",
56
56
  "tsx": "^4.21.0",
57
57
  "typescript": "^5.9.3",
58
58
  "vitest": "^4.0.18",
59
- "zod": "^4.3.4"
59
+ "zod": "^4.3.6"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsdown",