@falcondev-oss/workflow 0.8.9 → 0.9.0

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/index.d.mts CHANGED
@@ -22,7 +22,9 @@ declare const Settings: {
22
22
  prefix: string;
23
23
  } | undefined;
24
24
  };
25
- declare function createRedis(opts: RedisOptions): Promise<IORedis>;
25
+ declare function createRedis(opts: RedisOptions & {
26
+ url?: string;
27
+ }): Promise<IORedis>;
26
28
  //#endregion
27
29
  //#region src/serializer.d.ts
28
30
  type Serialized<T> = Tagged<SuperJSONResult, 'data', T>;
package/dist/index.mjs CHANGED
@@ -57,10 +57,11 @@ const defaultRedisConnection = createSingletonPromise(async () => {
57
57
  return redis;
58
58
  });
59
59
  async function createRedis(opts) {
60
- const redis = new IORedis({
60
+ const redisOpts = {
61
61
  ...defaultRedisOptions,
62
62
  ...opts
63
- });
63
+ };
64
+ const redis = opts.url ? new IORedis(opts.url, redisOpts) : new IORedis(redisOpts);
64
65
  await redis.connect();
65
66
  return redis;
66
67
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@falcondev-oss/workflow",
3
3
  "type": "module",
4
- "version": "0.8.9",
4
+ "version": "0.9.0",
5
5
  "description": "Simple type-safe queue worker with durable execution using Redis.",
6
6
  "license": "MIT",
7
7
  "repository": "github:falcondev-oss/workflow",