@trigger.dev/redis-worker 4.0.0-v4-beta.11 → 4.0.0-v4-beta.13
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.cjs +161 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +155 -111
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'module';
|
|
2
|
+
import process2 from 'node:process';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import tty from 'node:tty';
|
|
2
5
|
import { Logger } from '@trigger.dev/core/logger';
|
|
3
6
|
import { webcrypto } from 'node:crypto';
|
|
4
7
|
import '@trigger.dev/core/v3/utils/flattenAttributes';
|
|
@@ -19,9 +22,16 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
19
22
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
20
23
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
21
24
|
});
|
|
25
|
+
var __esm = (fn, res) => function __init() {
|
|
26
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
27
|
+
};
|
|
22
28
|
var __commonJS = (cb, mod) => function __require2() {
|
|
23
29
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
24
30
|
};
|
|
31
|
+
var __export = (target, all) => {
|
|
32
|
+
for (var name in all)
|
|
33
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
34
|
+
};
|
|
25
35
|
var __copyProps = (to, from, except, desc) => {
|
|
26
36
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
37
|
for (let key of __getOwnPropNames(from))
|
|
@@ -38,6 +48,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
48
|
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
39
49
|
mod
|
|
40
50
|
));
|
|
51
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
52
|
|
|
42
53
|
// ../../node_modules/.pnpm/@ioredis+commands@1.2.0/node_modules/@ioredis/commands/built/commands.json
|
|
43
54
|
var require_commands = __commonJS({
|
|
@@ -2513,13 +2524,13 @@ var require_built = __commonJS({
|
|
|
2513
2524
|
return Boolean(commands_json_1.default[commandName]);
|
|
2514
2525
|
}
|
|
2515
2526
|
exports.exists = exists;
|
|
2516
|
-
function
|
|
2527
|
+
function hasFlag2(commandName, flag) {
|
|
2517
2528
|
if (!flags[commandName]) {
|
|
2518
2529
|
throw new Error("Unknown command " + commandName);
|
|
2519
2530
|
}
|
|
2520
2531
|
return Boolean(flags[commandName][flag]);
|
|
2521
2532
|
}
|
|
2522
|
-
exports.hasFlag =
|
|
2533
|
+
exports.hasFlag = hasFlag2;
|
|
2523
2534
|
function getKeyIndexes(commandName, args, options) {
|
|
2524
2535
|
const command = commands_json_1.default[commandName];
|
|
2525
2536
|
if (!command) {
|
|
@@ -3567,10 +3578,10 @@ var require_ms = __commonJS({
|
|
|
3567
3578
|
}
|
|
3568
3579
|
});
|
|
3569
3580
|
|
|
3570
|
-
// ../../node_modules/.pnpm/debug@4.3.
|
|
3581
|
+
// ../../node_modules/.pnpm/debug@4.3.7_supports-color@10.0.0/node_modules/debug/src/common.js
|
|
3571
3582
|
var require_common = __commonJS({
|
|
3572
|
-
"../../node_modules/.pnpm/debug@4.3.
|
|
3573
|
-
function setup(
|
|
3583
|
+
"../../node_modules/.pnpm/debug@4.3.7_supports-color@10.0.0/node_modules/debug/src/common.js"(exports, module) {
|
|
3584
|
+
function setup(env2) {
|
|
3574
3585
|
createDebug.debug = createDebug;
|
|
3575
3586
|
createDebug.default = createDebug;
|
|
3576
3587
|
createDebug.coerce = coerce;
|
|
@@ -3579,8 +3590,8 @@ var require_common = __commonJS({
|
|
|
3579
3590
|
createDebug.enabled = enabled;
|
|
3580
3591
|
createDebug.humanize = require_ms();
|
|
3581
3592
|
createDebug.destroy = destroy;
|
|
3582
|
-
Object.keys(
|
|
3583
|
-
createDebug[key] =
|
|
3593
|
+
Object.keys(env2).forEach((key) => {
|
|
3594
|
+
createDebug[key] = env2[key];
|
|
3584
3595
|
});
|
|
3585
3596
|
createDebug.names = [];
|
|
3586
3597
|
createDebug.skips = [];
|
|
@@ -3730,9 +3741,9 @@ var require_common = __commonJS({
|
|
|
3730
3741
|
}
|
|
3731
3742
|
});
|
|
3732
3743
|
|
|
3733
|
-
// ../../node_modules/.pnpm/debug@4.3.
|
|
3744
|
+
// ../../node_modules/.pnpm/debug@4.3.7_supports-color@10.0.0/node_modules/debug/src/browser.js
|
|
3734
3745
|
var require_browser = __commonJS({
|
|
3735
|
-
"../../node_modules/.pnpm/debug@4.3.
|
|
3746
|
+
"../../node_modules/.pnpm/debug@4.3.7_supports-color@10.0.0/node_modules/debug/src/browser.js"(exports, module) {
|
|
3736
3747
|
exports.formatArgs = formatArgs;
|
|
3737
3748
|
exports.save = save;
|
|
3738
3749
|
exports.load = load;
|
|
@@ -3900,117 +3911,150 @@ var require_browser = __commonJS({
|
|
|
3900
3911
|
}
|
|
3901
3912
|
});
|
|
3902
3913
|
|
|
3903
|
-
// ../../node_modules/.pnpm/
|
|
3904
|
-
var
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
3909
|
-
const pos = argv.indexOf(prefix + flag);
|
|
3910
|
-
const terminatorPos = argv.indexOf("--");
|
|
3911
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
3912
|
-
};
|
|
3913
|
-
}
|
|
3914
|
+
// ../../node_modules/.pnpm/supports-color@10.0.0/node_modules/supports-color/index.js
|
|
3915
|
+
var supports_color_exports = {};
|
|
3916
|
+
__export(supports_color_exports, {
|
|
3917
|
+
createSupportsColor: () => createSupportsColor,
|
|
3918
|
+
default: () => supports_color_default
|
|
3914
3919
|
});
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3920
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
3921
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
3922
|
+
const position = argv.indexOf(prefix + flag);
|
|
3923
|
+
const terminatorPosition = argv.indexOf("--");
|
|
3924
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
3925
|
+
}
|
|
3926
|
+
function envForceColor() {
|
|
3927
|
+
if (!("FORCE_COLOR" in env)) {
|
|
3928
|
+
return;
|
|
3929
|
+
}
|
|
3930
|
+
if (env.FORCE_COLOR === "true") {
|
|
3931
|
+
return 1;
|
|
3932
|
+
}
|
|
3933
|
+
if (env.FORCE_COLOR === "false") {
|
|
3934
|
+
return 0;
|
|
3935
|
+
}
|
|
3936
|
+
if (env.FORCE_COLOR.length === 0) {
|
|
3937
|
+
return 1;
|
|
3938
|
+
}
|
|
3939
|
+
const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
3940
|
+
if (![0, 1, 2, 3].includes(level)) {
|
|
3941
|
+
return;
|
|
3942
|
+
}
|
|
3943
|
+
return level;
|
|
3944
|
+
}
|
|
3945
|
+
function translateLevel(level) {
|
|
3946
|
+
if (level === 0) {
|
|
3947
|
+
return false;
|
|
3948
|
+
}
|
|
3949
|
+
return {
|
|
3950
|
+
level,
|
|
3951
|
+
hasBasic: true,
|
|
3952
|
+
has256: level >= 2,
|
|
3953
|
+
has16m: level >= 3
|
|
3954
|
+
};
|
|
3955
|
+
}
|
|
3956
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
3957
|
+
const noFlagForceColor = envForceColor();
|
|
3958
|
+
if (noFlagForceColor !== void 0) {
|
|
3959
|
+
flagForceColor = noFlagForceColor;
|
|
3960
|
+
}
|
|
3961
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
3962
|
+
if (forceColor === 0) {
|
|
3963
|
+
return 0;
|
|
3964
|
+
}
|
|
3965
|
+
if (sniffFlags) {
|
|
3966
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
3967
|
+
return 3;
|
|
3927
3968
|
}
|
|
3928
|
-
if ("
|
|
3929
|
-
|
|
3969
|
+
if (hasFlag("color=256")) {
|
|
3970
|
+
return 2;
|
|
3930
3971
|
}
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3972
|
+
}
|
|
3973
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
3974
|
+
return 1;
|
|
3975
|
+
}
|
|
3976
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
3977
|
+
return 0;
|
|
3978
|
+
}
|
|
3979
|
+
const min = forceColor || 0;
|
|
3980
|
+
if (env.TERM === "dumb") {
|
|
3981
|
+
return min;
|
|
3982
|
+
}
|
|
3983
|
+
if (process2.platform === "win32") {
|
|
3984
|
+
const osRelease = os.release().split(".");
|
|
3985
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
3986
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
3941
3987
|
}
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
return min;
|
|
3968
|
-
}
|
|
3969
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
3970
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
3971
|
-
}
|
|
3972
|
-
if (env.COLORTERM === "truecolor") {
|
|
3973
|
-
return 3;
|
|
3974
|
-
}
|
|
3975
|
-
if ("TERM_PROGRAM" in env) {
|
|
3976
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
3977
|
-
switch (env.TERM_PROGRAM) {
|
|
3978
|
-
case "iTerm.app":
|
|
3979
|
-
return version >= 3 ? 3 : 2;
|
|
3980
|
-
case "Apple_Terminal":
|
|
3981
|
-
return 2;
|
|
3982
|
-
}
|
|
3988
|
+
return 1;
|
|
3989
|
+
}
|
|
3990
|
+
if ("CI" in env) {
|
|
3991
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
|
|
3992
|
+
return 3;
|
|
3993
|
+
}
|
|
3994
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
3995
|
+
return 1;
|
|
3996
|
+
}
|
|
3997
|
+
return min;
|
|
3998
|
+
}
|
|
3999
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
4000
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
4001
|
+
}
|
|
4002
|
+
if (env.COLORTERM === "truecolor") {
|
|
4003
|
+
return 3;
|
|
4004
|
+
}
|
|
4005
|
+
if (env.TERM === "xterm-kitty") {
|
|
4006
|
+
return 3;
|
|
4007
|
+
}
|
|
4008
|
+
if ("TERM_PROGRAM" in env) {
|
|
4009
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
4010
|
+
switch (env.TERM_PROGRAM) {
|
|
4011
|
+
case "iTerm.app": {
|
|
4012
|
+
return version >= 3 ? 3 : 2;
|
|
3983
4013
|
}
|
|
3984
|
-
|
|
4014
|
+
case "Apple_Terminal": {
|
|
3985
4015
|
return 2;
|
|
3986
4016
|
}
|
|
3987
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
3988
|
-
return 1;
|
|
3989
|
-
}
|
|
3990
|
-
if ("COLORTERM" in env) {
|
|
3991
|
-
return 1;
|
|
3992
|
-
}
|
|
3993
|
-
if (env.TERM === "dumb") {
|
|
3994
|
-
return min;
|
|
3995
|
-
}
|
|
3996
|
-
return min;
|
|
3997
4017
|
}
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4018
|
+
}
|
|
4019
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
4020
|
+
return 2;
|
|
4021
|
+
}
|
|
4022
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
4023
|
+
return 1;
|
|
4024
|
+
}
|
|
4025
|
+
if ("COLORTERM" in env) {
|
|
4026
|
+
return 1;
|
|
4027
|
+
}
|
|
4028
|
+
return min;
|
|
4029
|
+
}
|
|
4030
|
+
function createSupportsColor(stream, options = {}) {
|
|
4031
|
+
const level = _supportsColor(stream, {
|
|
4032
|
+
streamIsTTY: stream && stream.isTTY,
|
|
4033
|
+
...options
|
|
4034
|
+
});
|
|
4035
|
+
return translateLevel(level);
|
|
4036
|
+
}
|
|
4037
|
+
var env, flagForceColor, supportsColor, supports_color_default;
|
|
4038
|
+
var init_supports_color = __esm({
|
|
4039
|
+
"../../node_modules/.pnpm/supports-color@10.0.0/node_modules/supports-color/index.js"() {
|
|
4040
|
+
({ env } = process2);
|
|
4041
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
4042
|
+
flagForceColor = 0;
|
|
4043
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
4044
|
+
flagForceColor = 1;
|
|
4001
4045
|
}
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
stderr: getSupportLevel(process.stderr)
|
|
4046
|
+
supportsColor = {
|
|
4047
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
4048
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
4006
4049
|
};
|
|
4050
|
+
supports_color_default = supportsColor;
|
|
4007
4051
|
}
|
|
4008
4052
|
});
|
|
4009
4053
|
|
|
4010
|
-
// ../../node_modules/.pnpm/debug@4.3.
|
|
4054
|
+
// ../../node_modules/.pnpm/debug@4.3.7_supports-color@10.0.0/node_modules/debug/src/node.js
|
|
4011
4055
|
var require_node = __commonJS({
|
|
4012
|
-
"../../node_modules/.pnpm/debug@4.3.
|
|
4013
|
-
var
|
|
4056
|
+
"../../node_modules/.pnpm/debug@4.3.7_supports-color@10.0.0/node_modules/debug/src/node.js"(exports, module) {
|
|
4057
|
+
var tty2 = __require("tty");
|
|
4014
4058
|
var util = __require("util");
|
|
4015
4059
|
exports.init = init;
|
|
4016
4060
|
exports.log = log;
|
|
@@ -4025,8 +4069,8 @@ var require_node = __commonJS({
|
|
|
4025
4069
|
);
|
|
4026
4070
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
4027
4071
|
try {
|
|
4028
|
-
const
|
|
4029
|
-
if (
|
|
4072
|
+
const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
|
|
4073
|
+
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
|
4030
4074
|
exports.colors = [
|
|
4031
4075
|
20,
|
|
4032
4076
|
21,
|
|
@@ -4128,7 +4172,7 @@ var require_node = __commonJS({
|
|
|
4128
4172
|
return obj;
|
|
4129
4173
|
}, {});
|
|
4130
4174
|
function useColors() {
|
|
4131
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) :
|
|
4175
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
|
|
4132
4176
|
}
|
|
4133
4177
|
function formatArgs(args) {
|
|
4134
4178
|
const { namespace: name, useColors: useColors2 } = this;
|
|
@@ -4181,9 +4225,9 @@ var require_node = __commonJS({
|
|
|
4181
4225
|
}
|
|
4182
4226
|
});
|
|
4183
4227
|
|
|
4184
|
-
// ../../node_modules/.pnpm/debug@4.3.
|
|
4228
|
+
// ../../node_modules/.pnpm/debug@4.3.7_supports-color@10.0.0/node_modules/debug/src/index.js
|
|
4185
4229
|
var require_src = __commonJS({
|
|
4186
|
-
"../../node_modules/.pnpm/debug@4.3.
|
|
4230
|
+
"../../node_modules/.pnpm/debug@4.3.7_supports-color@10.0.0/node_modules/debug/src/index.js"(exports, module) {
|
|
4187
4231
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
4188
4232
|
module.exports = require_browser();
|
|
4189
4233
|
} else {
|