@bull-board/cli 9.7.0 → 9.8.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/README.md +40 -0
- package/dist/bin.js +0 -12
- package/dist/bin.js.map +1 -1
- package/dist/config/connection.d.ts +19 -0
- package/dist/config/connection.js +99 -0
- package/dist/config/connection.js.map +1 -0
- package/dist/config/flags.d.ts +24 -0
- package/dist/config/flags.js +6 -0
- package/dist/config/flags.js.map +1 -1
- package/dist/config/resolve.js +11 -11
- package/dist/config/resolve.js.map +1 -1
- package/dist/config/types.d.ts +4 -2
- package/dist/connectionState.d.ts +6 -4
- package/dist/connectionState.js +17 -0
- package/dist/connectionState.js.map +1 -1
- package/dist/diagnosticPage.js +1 -1
- package/dist/diagnosticPage.js.map +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.js +18 -1
- package/dist/help.js.map +1 -1
- package/dist/index.js +28 -12
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -28,6 +28,15 @@ Usage:
|
|
|
28
28
|
|
|
29
29
|
Options:
|
|
30
30
|
-r, --redis <url> Redis connection URL [redis://localhost:6379]
|
|
31
|
+
--sentinel <list> Comma separated sentinel host:port list, port [26379]
|
|
32
|
+
--sentinel-name <n> Redis master group name, required with --sentinel
|
|
33
|
+
--sentinel-password <pass>
|
|
34
|
+
Password for the sentinel nodes themselves
|
|
35
|
+
--redis-username <name>
|
|
36
|
+
Username for the Redis nodes behind the sentinels
|
|
37
|
+
--redis-password <pass>
|
|
38
|
+
Password for the Redis nodes behind the sentinels
|
|
39
|
+
--redis-db <n> Database to select behind the sentinels
|
|
31
40
|
-p, --port <port> Port to listen on [3000]
|
|
32
41
|
--host <address> Interface to bind [127.0.0.1]
|
|
33
42
|
--prefix <list> Comma separated key prefixes [bull]
|
|
@@ -67,6 +76,37 @@ module.exports = {
|
|
|
67
76
|
};
|
|
68
77
|
```
|
|
69
78
|
|
|
79
|
+
## Redis Sentinel
|
|
80
|
+
|
|
81
|
+
`--sentinel` connects through Redis Sentinel rather than to one instance directly, for a deployment where the master address is not fixed:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
npx @bull-board/cli --sentinel s1.internal:26379,s2.internal:26379 --sentinel-name mymaster
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
A port is optional per entry and defaults to 26379. `--sentinel-name` is the master group name from your sentinel configuration and is required. `--sentinel` and `--redis` are mutually exclusive, and passing both is an error rather than a silent preference for one.
|
|
88
|
+
|
|
89
|
+
ioredis resolves the current master through the sentinels listed and follows a failover on its own, so the whole dashboard moves with it: queue reads, the Bull subscriber, and `--history` recording all share the one connection.
|
|
90
|
+
|
|
91
|
+
Credentials in sentinel mode come from their own flags, since there is no URL to carry them. `--redis-username`, `--redis-password` and `--redis-db` apply to the Redis nodes behind the sentinels, while `--sentinel-password` authenticates to the sentinel nodes themselves, which commonly have a different password. Passing any of them alongside a Redis URL is an error, because ioredis would take the URL's own credentials and ignore them.
|
|
92
|
+
|
|
93
|
+
For anything beyond that, including TLS to the sentinel nodes, the config file's `redis` key accepts a full [ioredis options object](https://github.com/redis/ioredis#connect-to-redis) and is passed through untouched:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
// bull-board.config.js
|
|
97
|
+
module.exports = {
|
|
98
|
+
redis: {
|
|
99
|
+
sentinels: [
|
|
100
|
+
{ host: 's1.internal', port: 26379 },
|
|
101
|
+
{ host: 's2.internal', port: 26379 },
|
|
102
|
+
],
|
|
103
|
+
name: 'mymaster',
|
|
104
|
+
sentinelPassword: process.env.SENTINEL_PASSWORD,
|
|
105
|
+
enableTLSForSentinelMode: true,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
```
|
|
109
|
+
|
|
70
110
|
## Historical metrics
|
|
71
111
|
|
|
72
112
|
`--history` turns on the long-retention metrics that otherwise need `@bull-board/metrics` wired into an app of your own:
|
package/dist/bin.js
CHANGED
|
@@ -30,18 +30,6 @@ async function main() {
|
|
|
30
30
|
explicitPath: flags.config || process.env.BULL_BOARD_CONFIG,
|
|
31
31
|
});
|
|
32
32
|
const config = (0, resolve_1.resolveConfig)({ flags, env: process.env, file });
|
|
33
|
-
if (!config.redisUrl.startsWith('/')) {
|
|
34
|
-
let parsed;
|
|
35
|
-
try {
|
|
36
|
-
parsed = new URL(config.redisUrl);
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
throw new Error(`Invalid Redis URL: ${config.redisUrl}`);
|
|
40
|
-
}
|
|
41
|
-
if (!['redis:', 'rediss:'].includes(parsed.protocol)) {
|
|
42
|
-
throw new Error(`Redis URL must use redis:// or rediss://, got "${parsed.protocol}//"`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
33
|
const board = await (0, index_1.run)(config, console, {
|
|
46
34
|
beforeReady: (close) => {
|
|
47
35
|
for (const signal of ['SIGINT', 'SIGTERM']) {
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;AACA,wCAA+C;AAC/C,0CAA4C;AAC5C,8CAAiD;AACjD,iCAA8B;AAC9B,mCAA8B;AAC9B,+CAA4C;AAE5C,KAAK,UAAU,IAAI;IACjB,IAAI,KAAoC,CAAC;IACzC,IAAI,CAAC;QACH,KAAK,GAAG,IAAA,kBAAU,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,GAAI,KAAe,CAAC,OAAO,oCAAoC,CAAC,CAAC;IACnF,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACf,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,WAAI,CAAC,CAAC;QAClB,OAAO;IACT,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,EAAE,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AAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RedisOptions } from 'ioredis';
|
|
2
|
+
import type { FlagValues } from './flags';
|
|
3
|
+
import type { FileConfig } from './types';
|
|
4
|
+
export type ConnectionConfig = {
|
|
5
|
+
mode: 'url';
|
|
6
|
+
url: string;
|
|
7
|
+
options: RedisOptions;
|
|
8
|
+
} | {
|
|
9
|
+
mode: 'sentinel';
|
|
10
|
+
options: RedisOptions;
|
|
11
|
+
} | {
|
|
12
|
+
mode: 'options';
|
|
13
|
+
options: RedisOptions;
|
|
14
|
+
};
|
|
15
|
+
export declare function resolveConnection({ flags, env, file, }: {
|
|
16
|
+
flags: FlagValues;
|
|
17
|
+
env: NodeJS.ProcessEnv;
|
|
18
|
+
file: FileConfig;
|
|
19
|
+
}): ConnectionConfig;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveConnection = resolveConnection;
|
|
4
|
+
const DEFAULT_REDIS_URL = 'redis://localhost:6379';
|
|
5
|
+
const DEFAULT_SENTINEL_PORT = 26379;
|
|
6
|
+
function firstDefined(...values) {
|
|
7
|
+
return values.find((value) => value !== undefined && value !== '');
|
|
8
|
+
}
|
|
9
|
+
function parseSentinel(entry) {
|
|
10
|
+
// A bare IPv6 literal is all colons, so bracket it before the URL parser sees a port.
|
|
11
|
+
const bracketed = !entry.startsWith('[') && entry.indexOf(':') !== entry.lastIndexOf(':') ? `[${entry}]` : entry;
|
|
12
|
+
let parsed;
|
|
13
|
+
try {
|
|
14
|
+
parsed = new URL(`redis://${bracketed}`);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
throw new Error(`Invalid sentinel address "${entry}": expected host or host:port.`);
|
|
18
|
+
}
|
|
19
|
+
const port = parsed.port === '' ? DEFAULT_SENTINEL_PORT : Number(parsed.port);
|
|
20
|
+
if (!parsed.hostname || parsed.pathname || parsed.search || port === 0) {
|
|
21
|
+
throw new Error(`Invalid sentinel address "${entry}": expected host or host:port.`);
|
|
22
|
+
}
|
|
23
|
+
return { host: parsed.hostname.replace(/^\[|\]$/g, ''), port };
|
|
24
|
+
}
|
|
25
|
+
function parseSentinels(value) {
|
|
26
|
+
return value
|
|
27
|
+
.split(',')
|
|
28
|
+
.map((entry) => entry.trim())
|
|
29
|
+
.filter(Boolean)
|
|
30
|
+
.map(parseSentinel);
|
|
31
|
+
}
|
|
32
|
+
function assertUsableUrl(url) {
|
|
33
|
+
if (url.startsWith('/'))
|
|
34
|
+
return;
|
|
35
|
+
let parsed;
|
|
36
|
+
try {
|
|
37
|
+
parsed = new URL(url);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
throw new Error(`Invalid Redis URL: ${url}`);
|
|
41
|
+
}
|
|
42
|
+
if (!['redis:', 'rediss:'].includes(parsed.protocol)) {
|
|
43
|
+
throw new Error(`Redis URL must use redis:// or rediss://, got "${parsed.protocol}//"`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function credentialOptions({ flags, env }) {
|
|
47
|
+
const options = {};
|
|
48
|
+
const names = [];
|
|
49
|
+
const add = (name, key, value) => {
|
|
50
|
+
if (value === undefined)
|
|
51
|
+
return;
|
|
52
|
+
options[key] = value;
|
|
53
|
+
names.push(name);
|
|
54
|
+
};
|
|
55
|
+
const db = firstDefined(flags['redis-db'], env.BULL_BOARD_REDIS_DB);
|
|
56
|
+
if (db !== undefined && (!Number.isInteger(Number(db)) || Number(db) < 0)) {
|
|
57
|
+
throw new Error(`Invalid --redis-db: ${db}`);
|
|
58
|
+
}
|
|
59
|
+
add('--sentinel-password', 'sentinelPassword', firstDefined(flags['sentinel-password'], env.BULL_BOARD_SENTINEL_PASSWORD));
|
|
60
|
+
add('--redis-username', 'username', firstDefined(flags['redis-username'], env.BULL_BOARD_REDIS_USERNAME));
|
|
61
|
+
add('--redis-password', 'password', firstDefined(flags['redis-password'], env.BULL_BOARD_REDIS_PASSWORD));
|
|
62
|
+
add('--redis-db', 'db', db === undefined ? undefined : Number(db));
|
|
63
|
+
return { options, names };
|
|
64
|
+
}
|
|
65
|
+
function resolveConnection({ flags, env, file, }) {
|
|
66
|
+
var _a;
|
|
67
|
+
const explicitUrl = firstDefined(flags.redis, env.BULL_BOARD_REDIS_URL);
|
|
68
|
+
const sentinelList = firstDefined(flags.sentinel, env.BULL_BOARD_SENTINELS);
|
|
69
|
+
const sentinelName = firstDefined(flags['sentinel-name'], env.BULL_BOARD_SENTINEL_NAME);
|
|
70
|
+
const credentials = credentialOptions({ flags, env });
|
|
71
|
+
if (sentinelList && explicitUrl) {
|
|
72
|
+
throw new Error('Use either a Redis URL or --sentinel, not both.');
|
|
73
|
+
}
|
|
74
|
+
if (sentinelList) {
|
|
75
|
+
if (!sentinelName) {
|
|
76
|
+
throw new Error('--sentinel needs --sentinel-name, the Redis master group name.');
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
mode: 'sentinel',
|
|
80
|
+
options: {
|
|
81
|
+
sentinels: parseSentinels(sentinelList),
|
|
82
|
+
name: sentinelName,
|
|
83
|
+
...credentials.options,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
const fileRedis = file.redis;
|
|
88
|
+
if (!explicitUrl && typeof fileRedis === 'object') {
|
|
89
|
+
const options = { ...fileRedis, ...credentials.options };
|
|
90
|
+
return fileRedis.sentinels ? { mode: 'sentinel', options } : { mode: 'options', options };
|
|
91
|
+
}
|
|
92
|
+
const url = (_a = explicitUrl !== null && explicitUrl !== void 0 ? explicitUrl : (typeof fileRedis === 'string' ? fileRedis : undefined)) !== null && _a !== void 0 ? _a : DEFAULT_REDIS_URL;
|
|
93
|
+
assertUsableUrl(url);
|
|
94
|
+
if (credentials.names.length > 0) {
|
|
95
|
+
throw new Error(`${credentials.names.join(', ')} cannot be combined with a Redis URL. Put credentials in the URL itself, or connect through --sentinel.`);
|
|
96
|
+
}
|
|
97
|
+
return { mode: 'url', url, options: {} };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../src/config/connection.ts"],"names":[],"mappings":";;AAoGA,8CAmDC;AA9ID,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AACnD,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,SAAS,YAAY,CAAI,GAAG,MAA4B;IACtD,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC;AACrE,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,sFAAsF;IACtF,MAAM,SAAS,GACb,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAEjG,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,WAAW,SAAS,EAAE,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,gCAAgC,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9E,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,gCAAgC,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,IAAI,CAAC,IAAI,CAAC,yGAAyG,CACzI,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC3C,CAAC"}
|
package/dist/config/flags.d.ts
CHANGED
|
@@ -3,6 +3,24 @@ export declare const FLAG_OPTIONS: {
|
|
|
3
3
|
readonly type: "string";
|
|
4
4
|
readonly short: "r";
|
|
5
5
|
};
|
|
6
|
+
readonly sentinel: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
};
|
|
9
|
+
readonly 'sentinel-name': {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
};
|
|
12
|
+
readonly 'sentinel-password': {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
};
|
|
15
|
+
readonly 'redis-username': {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
};
|
|
18
|
+
readonly 'redis-password': {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
};
|
|
21
|
+
readonly 'redis-db': {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
};
|
|
6
24
|
readonly port: {
|
|
7
25
|
readonly type: "string";
|
|
8
26
|
readonly short: "p";
|
|
@@ -63,6 +81,12 @@ export declare const FLAG_OPTIONS: {
|
|
|
63
81
|
};
|
|
64
82
|
export declare function parseFlags(argv: string[]): {
|
|
65
83
|
redis?: string | undefined;
|
|
84
|
+
sentinel?: string | undefined;
|
|
85
|
+
'sentinel-name'?: string | undefined;
|
|
86
|
+
'sentinel-password'?: string | undefined;
|
|
87
|
+
'redis-username'?: string | undefined;
|
|
88
|
+
'redis-password'?: string | undefined;
|
|
89
|
+
'redis-db'?: string | undefined;
|
|
66
90
|
port?: string | undefined;
|
|
67
91
|
host?: string | undefined;
|
|
68
92
|
prefix?: string | undefined;
|
package/dist/config/flags.js
CHANGED
|
@@ -5,6 +5,12 @@ exports.parseFlags = parseFlags;
|
|
|
5
5
|
const node_util_1 = require("node:util");
|
|
6
6
|
exports.FLAG_OPTIONS = {
|
|
7
7
|
redis: { type: 'string', short: 'r' },
|
|
8
|
+
sentinel: { type: 'string' },
|
|
9
|
+
'sentinel-name': { type: 'string' },
|
|
10
|
+
'sentinel-password': { type: 'string' },
|
|
11
|
+
'redis-username': { type: 'string' },
|
|
12
|
+
'redis-password': { type: 'string' },
|
|
13
|
+
'redis-db': { type: 'string' },
|
|
8
14
|
port: { type: 'string', short: 'p' },
|
|
9
15
|
host: { type: 'string' },
|
|
10
16
|
prefix: { type: 'string' },
|
package/dist/config/flags.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flags.js","sourceRoot":"","sources":["../../src/config/flags.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"flags.js","sourceRoot":"","sources":["../../src/config/flags.ts"],"names":[],"mappings":";;;AA8BA,gCAIC;AAlCD,yCAAsC;AAEzB,QAAA,YAAY,GAAG;IAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;IACrC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACnC,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACvC,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACpC,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACpC,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC9B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;IACpC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACnC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC/B,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAChC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACjC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5B,wBAAwB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9B,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACrC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACxC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;CACnB,CAAC;AAEX,SAAgB,UAAU,CAAC,IAAc;IACvC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAS,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAY,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC;IAE7F,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/config/resolve.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveConfig = resolveConfig;
|
|
4
|
+
const connection_1 = require("./connection");
|
|
4
5
|
const DEFAULTS = {
|
|
5
|
-
redisUrl: 'redis://localhost:6379',
|
|
6
6
|
port: 3000,
|
|
7
7
|
host: '127.0.0.1',
|
|
8
8
|
prefixes: ['bull'],
|
|
@@ -40,7 +40,7 @@ function normalizeBasePath(value) {
|
|
|
40
40
|
return trimmed === '' ? '' : `/${trimmed}`;
|
|
41
41
|
}
|
|
42
42
|
function resolveConfig({ flags, env, file, }) {
|
|
43
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0
|
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
44
44
|
const explicitQueues = Array.isArray(file.queues) ? file.queues : undefined;
|
|
45
45
|
const queueOptions = (file.queues && !Array.isArray(file.queues) ? file.queues : {});
|
|
46
46
|
const user = firstDefined(flags.user, env.BULL_BOARD_USER, file.user);
|
|
@@ -60,20 +60,20 @@ function resolveConfig({ flags, env, file, }) {
|
|
|
60
60
|
uiConfig.showMetrics = (_d = uiConfig.showMetrics) !== null && _d !== void 0 ? _d : true;
|
|
61
61
|
}
|
|
62
62
|
return {
|
|
63
|
-
|
|
64
|
-
port: (
|
|
65
|
-
host: (
|
|
66
|
-
prefixes: (
|
|
67
|
-
queueNames: (
|
|
68
|
-
scanInterval: (
|
|
69
|
-
basePath: (
|
|
63
|
+
connection: (0, connection_1.resolveConnection)({ flags, env, file }),
|
|
64
|
+
port: (_g = (_f = (_e = toNumber(flags.port, 'port')) !== null && _e !== void 0 ? _e : toNumber(env.BULL_BOARD_PORT, 'port')) !== null && _f !== void 0 ? _f : toNumber(file.port, 'port')) !== null && _g !== void 0 ? _g : DEFAULTS.port,
|
|
65
|
+
host: (_h = firstDefined(flags.host, env.BULL_BOARD_HOST, file.host)) !== null && _h !== void 0 ? _h : DEFAULTS.host,
|
|
66
|
+
prefixes: (_l = (_k = (_j = toList(flags.prefix)) !== null && _j !== void 0 ? _j : toList(env.BULL_BOARD_PREFIX)) !== null && _k !== void 0 ? _k : toList(file.prefix)) !== null && _l !== void 0 ? _l : DEFAULTS.prefixes,
|
|
67
|
+
queueNames: (_p = (_o = (_m = toList(flags.queues)) !== null && _m !== void 0 ? _m : toList(env.BULL_BOARD_QUEUES)) !== null && _o !== void 0 ? _o : toList(explicitQueues)) !== null && _p !== void 0 ? _p : null,
|
|
68
|
+
scanInterval: (_s = (_r = (_q = toNumber(flags['scan-interval'], 'scan-interval')) !== null && _q !== void 0 ? _q : toNumber(env.BULL_BOARD_SCAN_INTERVAL, 'scan-interval')) !== null && _r !== void 0 ? _r : toNumber(file.scanInterval, 'scan-interval')) !== null && _s !== void 0 ? _s : DEFAULTS.scanInterval,
|
|
69
|
+
basePath: (_v = (_u = (_t = normalizeBasePath(flags['base-path'])) !== null && _t !== void 0 ? _t : normalizeBasePath(env.BULL_BOARD_BASE_PATH)) !== null && _u !== void 0 ? _u : normalizeBasePath(file.basePath)) !== null && _v !== void 0 ? _v : '',
|
|
70
70
|
readOnly,
|
|
71
71
|
auth: user && password ? { user, password } : null,
|
|
72
|
-
open: flags['no-open'] === true ? false : ((
|
|
72
|
+
open: flags['no-open'] === true ? false : ((_x = (_w = toBoolean(env.BULL_BOARD_OPEN)) !== null && _w !== void 0 ? _w : file.open) !== null && _x !== void 0 ? _x : true),
|
|
73
73
|
browser: firstDefined(flags.browser, env.BULL_BOARD_BROWSER, env.BROWSER, file.browser),
|
|
74
74
|
uiConfig,
|
|
75
75
|
queueOptions,
|
|
76
|
-
noRetry: (
|
|
76
|
+
noRetry: (_0 = (_z = (_y = flags['no-retry']) !== null && _y !== void 0 ? _y : toBoolean(env.BULL_BOARD_NO_RETRY)) !== null && _z !== void 0 ? _z : file.noRetry) !== null && _0 !== void 0 ? _0 : false,
|
|
77
77
|
history,
|
|
78
78
|
};
|
|
79
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":";;AAgDA,sCAqEC;
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRo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AAC,mCAAI,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,mCAAI,IAAI,CAAC,OAAO,mCAAI,KAAK;QACzF,OAAO;KACR,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,KAAK,EACL,GAAG,EACH,IAAI,EACJ,QAAQ,GAMT;;IACC,MAAM,WAAW,GACf,OAAO,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC;IACvF,MAAM,OAAO,GACX,MAAA,MAAA,MAAA,KAAK,CAAC,OAAO,mCAAI,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,mCAAI,WAAW,CAAC,OAAO,mCAAI,KAAK,CAAC;IACrF,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,OAAO;QACL,uEAAuE;QACvE,MAAM,EAAE,MAAA,WAAW,CAAC,MAAM,mCAAI,CAAC,QAAQ;QACvC,aAAa,EACX,MAAA,MAAA,QAAQ,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC,mCACnE,QAAQ,CAAC,GAAG,CAAC,iCAAiC,EAAE,wBAAwB,CAAC,mCACzE,QAAQ,CAAC,WAAW,CAAC,aAAa,EAAE,wBAAwB,CAAC;QAC/D,SAAS,EAAE,WAAW,CAAC,SAAS;QAChC,OAAO,EAAE,MAAA,WAAW,CAAC,OAAO,mCAAI,IAAI;QACpC,kBAAkB,EAAE,WAAW,CAAC,kBAAkB;KACnD,CAAC;AACJ,CAAC"}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { QueueAdapterOptions, UIConfig } from '@bull-board/api/typings/app';
|
|
2
2
|
import type { Retention } from '@bull-board/metrics';
|
|
3
|
+
import type { RedisOptions } from 'ioredis';
|
|
4
|
+
import type { ConnectionConfig } from './connection';
|
|
3
5
|
export interface FileHistoryConfig {
|
|
4
6
|
enabled?: boolean;
|
|
5
7
|
/** Write snapshots from this process. Defaults to true unless the board is read-only. */
|
|
@@ -17,7 +19,7 @@ export interface HistoryConfig {
|
|
|
17
19
|
snapshotIntervalMs?: number;
|
|
18
20
|
}
|
|
19
21
|
export interface FileConfig {
|
|
20
|
-
redis?: string;
|
|
22
|
+
redis?: string | RedisOptions;
|
|
21
23
|
port?: number;
|
|
22
24
|
host?: string;
|
|
23
25
|
prefix?: string | string[];
|
|
@@ -34,7 +36,7 @@ export interface FileConfig {
|
|
|
34
36
|
history?: boolean | FileHistoryConfig;
|
|
35
37
|
}
|
|
36
38
|
export interface CliConfig {
|
|
37
|
-
|
|
39
|
+
connection: ConnectionConfig;
|
|
38
40
|
port: number;
|
|
39
41
|
host: string;
|
|
40
42
|
prefixes: string[];
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
import type { ConnectionConfig } from './config/connection';
|
|
1
2
|
export declare const RETRY_INTERVAL_MS = 3000;
|
|
2
3
|
export type ConnectionState = {
|
|
3
4
|
status: 'connecting';
|
|
4
|
-
|
|
5
|
+
redis: string;
|
|
5
6
|
attempts: number;
|
|
6
7
|
} | {
|
|
7
8
|
status: 'connected';
|
|
8
|
-
|
|
9
|
+
redis: string;
|
|
9
10
|
attempts: number;
|
|
10
11
|
} | {
|
|
11
12
|
status: 'unavailable';
|
|
12
|
-
|
|
13
|
+
redis: string;
|
|
13
14
|
attempts: number;
|
|
14
15
|
lastError: string;
|
|
15
16
|
} | {
|
|
16
17
|
status: 'degraded';
|
|
17
|
-
|
|
18
|
+
redis: string;
|
|
18
19
|
attempts: number;
|
|
19
20
|
lastError: string;
|
|
20
21
|
};
|
|
22
|
+
export declare function describeConnection(connection: ConnectionConfig): string;
|
|
21
23
|
export declare function maskRedisUrl(redisUrl: string): string;
|
package/dist/connectionState.js
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RETRY_INTERVAL_MS = void 0;
|
|
4
|
+
exports.describeConnection = describeConnection;
|
|
4
5
|
exports.maskRedisUrl = maskRedisUrl;
|
|
5
6
|
exports.RETRY_INTERVAL_MS = 3000;
|
|
7
|
+
function describeConnection(connection) {
|
|
8
|
+
if (connection.mode === 'url')
|
|
9
|
+
return maskRedisUrl(connection.url);
|
|
10
|
+
const { name, sentinels, host, port, path } = connection.options;
|
|
11
|
+
if (sentinels) {
|
|
12
|
+
const addresses = sentinels
|
|
13
|
+
.map((sentinel) => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
const host = (_a = sentinel.host) !== null && _a !== void 0 ? _a : 'localhost';
|
|
16
|
+
return `${host.includes(':') ? `[${host}]` : host}:${(_b = sentinel.port) !== null && _b !== void 0 ? _b : 26379}`;
|
|
17
|
+
})
|
|
18
|
+
.join(',');
|
|
19
|
+
return `sentinel://${name}@${addresses}`;
|
|
20
|
+
}
|
|
21
|
+
return path !== null && path !== void 0 ? path : `redis://${host !== null && host !== void 0 ? host : 'localhost'}:${port !== null && port !== void 0 ? port : 6379}`;
|
|
22
|
+
}
|
|
6
23
|
function maskRedisUrl(redisUrl) {
|
|
7
24
|
if (redisUrl.startsWith('/'))
|
|
8
25
|
return redisUrl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionState.js","sourceRoot":"","sources":["../src/connectionState.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"connectionState.js","sourceRoot":"","sources":["../src/connectionState.ts"],"names":[],"mappings":";;;AAUA,gDAiBC;AAED,oCAuBC;AAlDY,QAAA,iBAAiB,GAAG,IAAI,CAAC;AAQtC,SAAgB,kBAAkB,CAAC,UAA4B;IAC7D,IAAI,UAAU,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAEnE,MAAM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C,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBACpC,OAAO,GAAG,IAAI,CAAC;YACjB,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/diagnosticPage.js
CHANGED
|
@@ -119,7 +119,7 @@ function renderDiagnosticPage(state) {
|
|
|
119
119
|
<h1>bull-board is waiting for Redis</h1>
|
|
120
120
|
<p class="status">${headline}</p>
|
|
121
121
|
<dl>
|
|
122
|
-
<dt>Redis
|
|
122
|
+
<dt>Redis</dt><dd><code>${escapeHtml(state.redis)}</code></dd>
|
|
123
123
|
<dt>Error</dt><dd><code>${escapeHtml(error)}</code></dd>
|
|
124
124
|
${attemptsRow}
|
|
125
125
|
</dl>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnosticPage.js","sourceRoot":"","sources":["../src/diagnosticPage.ts"],"names":[],"mappings":";;;AA2DA,oDAoGC;AA/JD,uDAA4E;AAE/D,QAAA,WAAW,GAAG,0BAA0B,CAAC;AAEtD,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,aAAa,CAAC,KAAsB;IAK3C,MAAM,YAAY,GAAG,mCAAiB,GAAG,IAAI,CAAC;IAE9C,IAAI,KAAK,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QAChC,MAAM,aAAa,GACjB,KAAK,CAAC,QAAQ,GAAG,CAAC,CAA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K,EAAE,MAAM,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACzD,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,wBAAwB,KAAK,CAAC,QAAQ,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5F,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;IAEhE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAkEa,QAAQ;;8BAEA,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC;8BACvB,UAAU,CAAC,KAAK,CAAC;MACzC,WAAW;;;IAGb,MAAM;qBACW,MAAM;;;;YAIf,IAAI,CAAC,SAAS,CAAC,mBAAW,CAAC;;;;;;;;;;;;;;;;CAgBtC,CAAC;AACF,CAAC"}
|
package/dist/help.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HELP = "\nbull-board - run the bull-board dashboard against a Redis instance\n\nUsage:\n bull-board [options]\n npx @bull-board/cli [options]\n\nOptions:\n -r, --redis <url> Redis connection URL [redis://localhost:6379]\n -p, --port <port> Port to listen on [3000]\n --host <address> Interface to bind [127.0.0.1]\n --prefix <list> Comma separated key prefixes [bull]\n --queues <list> Use these queue names instead of discovering\n --scan-interval <s> Seconds between rescans, 0 to scan once [10]\n --base-path <path> Serve the dashboard under a path prefix\n --read-only Disable every destructive action\n --user <name> Basic auth user (requires --password)\n --password <pass> Basic auth password (requires --user)\n --board-title <s> Dashboard title\n --history Record and serve long-retention metrics history\n --history-retention-days <n>\n Days of history to keep [90]\n --config <file> Path to a config file\n --browser <command> Command to open the browser with [$BROWSER]\n --no-open Do not open a browser\n --no-retry Exit if Redis is unreachable instead of retrying\n -h, --help Show this help\n -v, --version Show the version\n\nIf Redis is unreachable at startup, bull-board still opens: it serves a\ndiagnostic page explaining why, keeps retrying every 3 seconds, and switches\nto the real dashboard on its own once Redis answers. That only covers\nstartup: once the dashboard is live it stays live, even if Redis goes away\nlater. The diagnostic page does not come back; API requests just stop\nreturning until Redis is reachable again, and Ctrl-C still works.\nPass --no-retry to get the old behaviour back instead: print the error and\nexit 1 immediately, without opening a port.\n\n--history turns on historical metrics: the dashboard gains a range selector\nper queue and a cross-queue Metrics history page, and this process records\nthroughput, latency and queue age into Redis under the bull-board:metrics:\nnamespace once a minute. --read-only stops the recording but keeps serving\nwhatever another process has recorded.\n\nEnvironment variables mirror every flag, for example BULL_BOARD_REDIS_URL,\
|
|
1
|
+
export declare const HELP = "\nbull-board - run the bull-board dashboard against a Redis instance\n\nUsage:\n bull-board [options]\n npx @bull-board/cli [options]\n\nOptions:\n -r, --redis <url> Redis connection URL [redis://localhost:6379]\n --sentinel <list> Comma separated sentinel host:port list, port [26379]\n --sentinel-name <n> Redis master group name, required with --sentinel\n --sentinel-password <pass>\n Password for the sentinel nodes themselves\n --redis-username <name>\n Username for the Redis nodes behind the sentinels\n --redis-password <pass>\n Password for the Redis nodes behind the sentinels\n --redis-db <n> Database to select behind the sentinels\n -p, --port <port> Port to listen on [3000]\n --host <address> Interface to bind [127.0.0.1]\n --prefix <list> Comma separated key prefixes [bull]\n --queues <list> Use these queue names instead of discovering\n --scan-interval <s> Seconds between rescans, 0 to scan once [10]\n --base-path <path> Serve the dashboard under a path prefix\n --read-only Disable every destructive action\n --user <name> Basic auth user (requires --password)\n --password <pass> Basic auth password (requires --user)\n --board-title <s> Dashboard title\n --history Record and serve long-retention metrics history\n --history-retention-days <n>\n Days of history to keep [90]\n --config <file> Path to a config file\n --browser <command> Command to open the browser with [$BROWSER]\n --no-open Do not open a browser\n --no-retry Exit if Redis is unreachable instead of retrying\n -h, --help Show this help\n -v, --version Show the version\n\nIf Redis is unreachable at startup, bull-board still opens: it serves a\ndiagnostic page explaining why, keeps retrying every 3 seconds, and switches\nto the real dashboard on its own once Redis answers. That only covers\nstartup: once the dashboard is live it stays live, even if Redis goes away\nlater. The diagnostic page does not come back; API requests just stop\nreturning until Redis is reachable again, and Ctrl-C still works.\nPass --no-retry to get the old behaviour back instead: print the error and\nexit 1 immediately, without opening a port.\n\n--history turns on historical metrics: the dashboard gains a range selector\nper queue and a cross-queue Metrics history page, and this process records\nthroughput, latency and queue age into Redis under the bull-board:metrics:\nnamespace once a minute. --read-only stops the recording but keeps serving\nwhatever another process has recorded.\n\n--sentinel connects through Redis Sentinel instead of a URL, and the two are\nmutually exclusive. ioredis resolves the current master through the sentinels\nlisted and follows a failover on its own, so queue reads, the Bull subscriber\nand --history recording all move with it. The credential flags above apply to\nsentinel mode only; with a Redis URL, put credentials in the URL itself.\n\nEnvironment variables mirror every flag, for example BULL_BOARD_REDIS_URL,\nBULL_BOARD_SENTINELS, BULL_BOARD_SENTINEL_NAME, BULL_BOARD_PORT,\nBULL_BOARD_READ_ONLY.\n\nExamples:\n bull-board\n bull-board -r redis://localhost:6379 -p 4000\n bull-board --prefix tenant-a,tenant-b --read-only\n bull-board --user admin --password secret --host 0.0.0.0\n bull-board --sentinel s1:26379,s2:26379 --sentinel-name mymaster\n";
|
package/dist/help.js
CHANGED
|
@@ -10,6 +10,15 @@ Usage:
|
|
|
10
10
|
|
|
11
11
|
Options:
|
|
12
12
|
-r, --redis <url> Redis connection URL [redis://localhost:6379]
|
|
13
|
+
--sentinel <list> Comma separated sentinel host:port list, port [26379]
|
|
14
|
+
--sentinel-name <n> Redis master group name, required with --sentinel
|
|
15
|
+
--sentinel-password <pass>
|
|
16
|
+
Password for the sentinel nodes themselves
|
|
17
|
+
--redis-username <name>
|
|
18
|
+
Username for the Redis nodes behind the sentinels
|
|
19
|
+
--redis-password <pass>
|
|
20
|
+
Password for the Redis nodes behind the sentinels
|
|
21
|
+
--redis-db <n> Database to select behind the sentinels
|
|
13
22
|
-p, --port <port> Port to listen on [3000]
|
|
14
23
|
--host <address> Interface to bind [127.0.0.1]
|
|
15
24
|
--prefix <list> Comma separated key prefixes [bull]
|
|
@@ -45,13 +54,21 @@ throughput, latency and queue age into Redis under the bull-board:metrics:
|
|
|
45
54
|
namespace once a minute. --read-only stops the recording but keeps serving
|
|
46
55
|
whatever another process has recorded.
|
|
47
56
|
|
|
57
|
+
--sentinel connects through Redis Sentinel instead of a URL, and the two are
|
|
58
|
+
mutually exclusive. ioredis resolves the current master through the sentinels
|
|
59
|
+
listed and follows a failover on its own, so queue reads, the Bull subscriber
|
|
60
|
+
and --history recording all move with it. The credential flags above apply to
|
|
61
|
+
sentinel mode only; with a Redis URL, put credentials in the URL itself.
|
|
62
|
+
|
|
48
63
|
Environment variables mirror every flag, for example BULL_BOARD_REDIS_URL,
|
|
49
|
-
BULL_BOARD_PORT,
|
|
64
|
+
BULL_BOARD_SENTINELS, BULL_BOARD_SENTINEL_NAME, BULL_BOARD_PORT,
|
|
65
|
+
BULL_BOARD_READ_ONLY.
|
|
50
66
|
|
|
51
67
|
Examples:
|
|
52
68
|
bull-board
|
|
53
69
|
bull-board -r redis://localhost:6379 -p 4000
|
|
54
70
|
bull-board --prefix tenant-a,tenant-b --read-only
|
|
55
71
|
bull-board --user admin --password secret --host 0.0.0.0
|
|
72
|
+
bull-board --sentinel s1:26379,s2:26379 --sentinel-name mymaster
|
|
56
73
|
`;
|
|
57
74
|
//# sourceMappingURL=help.js.map
|
package/dist/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEnB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -37,15 +37,29 @@ async function closeWithGrace(promise, ms, onTimeout) {
|
|
|
37
37
|
onTimeout();
|
|
38
38
|
}
|
|
39
39
|
async function run(config, log = console, { beforeReady, } = {}) {
|
|
40
|
-
const
|
|
40
|
+
const redisOptions = {
|
|
41
41
|
maxRetriesPerRequest: null,
|
|
42
42
|
lazyConnect: true,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
// ioredis retries unreachable sentinels forever, so connect() never rejects and --no-retry
|
|
44
|
+
// would hang. The retrying path keeps ioredis's own backoff, which re-resolves a promoted
|
|
45
|
+
// master faster than a flat interval would.
|
|
46
|
+
...(config.noRetry
|
|
47
|
+
? { sentinelRetryStrategy: () => null }
|
|
48
|
+
: { retryStrategy: () => connectionState_1.RETRY_INTERVAL_MS }),
|
|
49
|
+
...config.connection.options,
|
|
50
|
+
};
|
|
51
|
+
const client = config.connection.mode === 'url'
|
|
52
|
+
? new ioredis_1.Redis(config.connection.url, redisOptions)
|
|
53
|
+
: new ioredis_1.Redis(redisOptions);
|
|
54
|
+
const redisLabel = (0, connectionState_1.describeConnection)(config.connection);
|
|
45
55
|
let attemptError;
|
|
46
56
|
client.on('error', (error) => {
|
|
47
57
|
attemptError !== null && attemptError !== void 0 ? attemptError : (attemptError = error);
|
|
48
58
|
});
|
|
59
|
+
// For the same reason, the first error rather than connect() is what releases startup onto
|
|
60
|
+
// the diagnostic page.
|
|
61
|
+
const firstError = new Promise((_, reject) => client.once('error', reject));
|
|
62
|
+
firstError.catch(() => undefined);
|
|
49
63
|
if (!isLoopbackHost(config.host) && !config.auth) {
|
|
50
64
|
log.warn(`Warning: bull-board is listening on ${config.host}, which accepts connections from ` +
|
|
51
65
|
'outside this machine, with no --user/--password set. Anyone who can reach it can ' +
|
|
@@ -115,7 +129,7 @@ async function run(config, log = console, { beforeReady, } = {}) {
|
|
|
115
129
|
await client.connect();
|
|
116
130
|
}
|
|
117
131
|
catch (error) {
|
|
118
|
-
throw new Error(`Could not connect to Redis at ${
|
|
132
|
+
throw new Error(`Could not connect to Redis at ${redisLabel}: ${(0, describeError_1.describeError)(attemptError !== null && attemptError !== void 0 ? attemptError : error)}`);
|
|
119
133
|
}
|
|
120
134
|
const count = await scan();
|
|
121
135
|
await startHistory();
|
|
@@ -135,7 +149,7 @@ async function run(config, log = console, { beforeReady, } = {}) {
|
|
|
135
149
|
};
|
|
136
150
|
beforeReady === null || beforeReady === void 0 ? void 0 : beforeReady(close);
|
|
137
151
|
log.log(`bull-board listening on ${server.url}`);
|
|
138
|
-
log.log(`Redis: ${
|
|
152
|
+
log.log(`Redis: ${redisLabel}`);
|
|
139
153
|
log.log(`Prefix: ${config.prefixes.join(', ')}`);
|
|
140
154
|
logIfIdle(count);
|
|
141
155
|
scheduleRescan();
|
|
@@ -143,7 +157,7 @@ async function run(config, log = console, { beforeReady, } = {}) {
|
|
|
143
157
|
}
|
|
144
158
|
let state = {
|
|
145
159
|
status: 'connecting',
|
|
146
|
-
|
|
160
|
+
redis: redisLabel,
|
|
147
161
|
attempts: 0,
|
|
148
162
|
};
|
|
149
163
|
const getState = () => state;
|
|
@@ -176,13 +190,13 @@ async function run(config, log = console, { beforeReady, } = {}) {
|
|
|
176
190
|
}
|
|
177
191
|
state = {
|
|
178
192
|
status: 'unavailable',
|
|
179
|
-
|
|
193
|
+
redis: redisLabel,
|
|
180
194
|
attempts: state.attempts + 1,
|
|
181
195
|
lastError: message,
|
|
182
196
|
};
|
|
183
197
|
if (!everFailed) {
|
|
184
198
|
everFailed = true;
|
|
185
|
-
log.warn(`Could not connect to Redis at ${
|
|
199
|
+
log.warn(`Could not connect to Redis at ${redisLabel}: ${message}`);
|
|
186
200
|
log.warn(`Serving a diagnostic page at ${server.url} and retrying every ` +
|
|
187
201
|
`${connectionState_1.RETRY_INTERVAL_MS / 1000}s. Pass --no-retry to exit instead of waiting.`);
|
|
188
202
|
}
|
|
@@ -201,7 +215,7 @@ async function run(config, log = console, { beforeReady, } = {}) {
|
|
|
201
215
|
return;
|
|
202
216
|
state = {
|
|
203
217
|
status: 'connected',
|
|
204
|
-
|
|
218
|
+
redis: redisLabel,
|
|
205
219
|
attempts: state.attempts,
|
|
206
220
|
};
|
|
207
221
|
scheduleRescan();
|
|
@@ -221,7 +235,7 @@ async function run(config, log = console, { beforeReady, } = {}) {
|
|
|
221
235
|
const message = error.message;
|
|
222
236
|
state = {
|
|
223
237
|
status: 'degraded',
|
|
224
|
-
|
|
238
|
+
redis: redisLabel,
|
|
225
239
|
attempts: state.attempts,
|
|
226
240
|
lastError: message,
|
|
227
241
|
};
|
|
@@ -234,7 +248,9 @@ async function run(config, log = console, { beforeReady, } = {}) {
|
|
|
234
248
|
return inFlight;
|
|
235
249
|
};
|
|
236
250
|
try {
|
|
237
|
-
|
|
251
|
+
const connecting = client.connect();
|
|
252
|
+
connecting.catch(() => undefined);
|
|
253
|
+
await Promise.race([connecting, firstError]);
|
|
238
254
|
}
|
|
239
255
|
catch (error) {
|
|
240
256
|
markUnavailable((0, describeError_1.describeError)(attemptError !== null && attemptError !== void 0 ? attemptError : error));
|
|
@@ -243,7 +259,7 @@ async function run(config, log = console, { beforeReady, } = {}) {
|
|
|
243
259
|
await becomeConnected(true);
|
|
244
260
|
}
|
|
245
261
|
log.log(`bull-board listening on ${server.url}`);
|
|
246
|
-
log.log(`Redis: ${
|
|
262
|
+
log.log(`Redis: ${redisLabel}`);
|
|
247
263
|
log.log(`Prefix: ${config.prefixes.join(', ')}`);
|
|
248
264
|
if (deferredIdleCount !== undefined)
|
|
249
265
|
logIfIdle(deferredIdleCount);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAsDA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAsDA,kBAuSC;AA7VD,yCAAkD;AAClD,iDAAqD;AACrD,qCAAgC;AAEhC,uDAAgG;AAChG,mDAAgD;AAOvC,8FAP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EAAE,GAAG,EAAE;QACtB,cAAc,GAAG,KAAK,CAAC;QACvB,KAAK,eAAe,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE;QAClC,eAAe,CAAC,IAAA,6BAAa,EAAC,KAAK,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bull-board/cli",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.8.0",
|
|
4
4
|
"description": "Run the bull-board dashboard against a Redis instance from the command line.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bull",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"test": "jest"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@bull-board/api": "9.
|
|
42
|
-
"@bull-board/express": "9.
|
|
43
|
-
"@bull-board/metrics": "9.
|
|
41
|
+
"@bull-board/api": "9.8.0",
|
|
42
|
+
"@bull-board/express": "9.8.0",
|
|
43
|
+
"@bull-board/metrics": "9.8.0",
|
|
44
44
|
"bull": "^4.16.5",
|
|
45
45
|
"bullmq": "^5.81.3",
|
|
46
46
|
"express": "^5.2.1",
|
|
@@ -49,8 +49,10 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/express": "^5.0.6",
|
|
51
51
|
"@types/jest": "^30.0.0",
|
|
52
|
+
"@types/redis-parser": "^3.0.3",
|
|
52
53
|
"@types/supertest": "^7.2.1",
|
|
53
54
|
"jest": "^30.4.2",
|
|
55
|
+
"redis-parser": "^3.0.0",
|
|
54
56
|
"supertest": "^7.2.2",
|
|
55
57
|
"ts-jest": "^29.4.12",
|
|
56
58
|
"typescript": "^5.9.3"
|