Parses command‑line flags using node util parseArgs with predefined options.
// Source: https://github.com/felixmosh/bull-board | License: MIT | Copyright 2019 Vitor Capretz (capretzvitor@gmail.com)
// Provided via justclaw.it.com; keep this notice with the code.
import { parseArgs } from 'node:util';
export const FLAG_OPTIONS = {
redis: { type: 'string', short: 'r' },
sentinel: { type: 'string' },
'sentinel-name': { type: 'string' },
'sentinel-password': { type: 'string' },
cluster: { type: 'string' },
'redis-username': { type: 'string' },
'redis-password': { type: 'string' },
'redis-db': { type: 'string' },
port: { type: 'string', short: 'p' },
host: { type: 'string' },
prefix: { type: 'string' },
queues: { type: 'string' },
'scan-interval': { type: 'string' },
'base-path': { type: 'string' },
'read-only': { type: 'boolean' },
use
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key