@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 +3 -1
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
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
|
|
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
|
|
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