bullmq-dash 0.2.1 → 0.2.3

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.
Files changed (80) hide show
  1. package/README.md +78 -17
  2. package/dist/index.js +766 -222
  3. package/dist/index.js.map +15 -13
  4. package/package.json +6 -6
  5. package/dist/app.d.ts +0 -18
  6. package/dist/app.d.ts.map +0 -1
  7. package/dist/config.d.ts +0 -116
  8. package/dist/config.d.ts.map +0 -1
  9. package/dist/config.test.d.ts +0 -2
  10. package/dist/config.test.d.ts.map +0 -1
  11. package/dist/data/jobs.d.ts +0 -81
  12. package/dist/data/jobs.d.ts.map +0 -1
  13. package/dist/data/jobs.test.d.ts +0 -2
  14. package/dist/data/jobs.test.d.ts.map +0 -1
  15. package/dist/data/metrics.d.ts +0 -26
  16. package/dist/data/metrics.d.ts.map +0 -1
  17. package/dist/data/queues.d.ts +0 -35
  18. package/dist/data/queues.d.ts.map +0 -1
  19. package/dist/data/redis.d.ts +0 -6
  20. package/dist/data/redis.d.ts.map +0 -1
  21. package/dist/data/schedulers.d.ts +0 -89
  22. package/dist/data/schedulers.d.ts.map +0 -1
  23. package/dist/data/sqlite.d.ts +0 -118
  24. package/dist/data/sqlite.d.ts.map +0 -1
  25. package/dist/data/sqlite.test.d.ts +0 -2
  26. package/dist/data/sqlite.test.d.ts.map +0 -1
  27. package/dist/data/sync.d.ts +0 -73
  28. package/dist/data/sync.d.ts.map +0 -1
  29. package/dist/data/sync.test.d.ts +0 -2
  30. package/dist/data/sync.test.d.ts.map +0 -1
  31. package/dist/errors.d.ts +0 -2
  32. package/dist/errors.d.ts.map +0 -1
  33. package/dist/formatters.d.ts +0 -48
  34. package/dist/formatters.d.ts.map +0 -1
  35. package/dist/index.d.ts +0 -2
  36. package/dist/index.d.ts.map +0 -1
  37. package/dist/json-reporter.d.ts +0 -3
  38. package/dist/json-reporter.d.ts.map +0 -1
  39. package/dist/polling.d.ts +0 -14
  40. package/dist/polling.d.ts.map +0 -1
  41. package/dist/state.d.ts +0 -73
  42. package/dist/state.d.ts.map +0 -1
  43. package/dist/ui/colors.d.ts +0 -27
  44. package/dist/ui/colors.d.ts.map +0 -1
  45. package/dist/ui/config-prompt.d.ts +0 -7
  46. package/dist/ui/config-prompt.d.ts.map +0 -1
  47. package/dist/ui/confirm-dialog.d.ts +0 -11
  48. package/dist/ui/confirm-dialog.d.ts.map +0 -1
  49. package/dist/ui/global-metrics.d.ts +0 -10
  50. package/dist/ui/global-metrics.d.ts.map +0 -1
  51. package/dist/ui/global-metrics.test.d.ts +0 -2
  52. package/dist/ui/global-metrics.test.d.ts.map +0 -1
  53. package/dist/ui/job-detail.d.ts +0 -14
  54. package/dist/ui/job-detail.d.ts.map +0 -1
  55. package/dist/ui/job-list.d.ts +0 -12
  56. package/dist/ui/job-list.d.ts.map +0 -1
  57. package/dist/ui/layout.d.ts +0 -16
  58. package/dist/ui/layout.d.ts.map +0 -1
  59. package/dist/ui/page-jump.d.ts +0 -13
  60. package/dist/ui/page-jump.d.ts.map +0 -1
  61. package/dist/ui/queue-list.d.ts +0 -11
  62. package/dist/ui/queue-list.d.ts.map +0 -1
  63. package/dist/ui/queue-stats.d.ts +0 -10
  64. package/dist/ui/queue-stats.d.ts.map +0 -1
  65. package/dist/ui/scheduler-detail.d.ts +0 -14
  66. package/dist/ui/scheduler-detail.d.ts.map +0 -1
  67. package/dist/ui/scheduler-list.d.ts +0 -14
  68. package/dist/ui/scheduler-list.d.ts.map +0 -1
  69. package/dist/ui/status-filter.d.ts +0 -10
  70. package/dist/ui/status-filter.d.ts.map +0 -1
  71. package/dist/ui/status-filter.test.d.ts +0 -2
  72. package/dist/ui/status-filter.test.d.ts.map +0 -1
  73. package/dist/ui/utils.d.ts +0 -7
  74. package/dist/ui/utils.d.ts.map +0 -1
  75. package/dist/ui/utils.test.d.ts +0 -2
  76. package/dist/ui/utils.test.d.ts.map +0 -1
  77. package/dist/web-server.d.ts +0 -4
  78. package/dist/web-server.d.ts.map +0 -1
  79. package/dist/web-server.test.d.ts +0 -2
  80. package/dist/web-server.test.d.ts.map +0 -1
package/README.md CHANGED
@@ -34,11 +34,11 @@ npx bullmq-dash
34
34
  ### Quick Start
35
35
 
36
36
  ```bash
37
- # Interactive setup (prompts for Redis connection)
38
- bullmq-dash
37
+ # Interactive setup (prompts for a Redis URL)
38
+ bullmq-dash --tui
39
39
 
40
- # Connect with CLI options
41
- bullmq-dash --redis-host localhost --redis-port 6379
40
+ # Connect with a URL
41
+ bullmq-dash --tui --redis-url redis://localhost:6379
42
42
  ```
43
43
 
44
44
  ### CLI Options
@@ -47,41 +47,102 @@ bullmq-dash --redis-host localhost --redis-port 6379
47
47
  bullmq-dash [options]
48
48
 
49
49
  Options:
50
- --redis-host <host> Redis host (default: localhost)
51
- --redis-port <port> Redis port (default: 6379)
52
- --redis-password <pass> Redis password
53
- --redis-db <db> Redis database number (default: 0)
50
+ --profile <name> Use a named profile from the config file
51
+ --config <path> Path to config file
52
+ (default: ~/.config/bullmq-dash/config.json)
53
+ --redis-url <url> Full connection URL: redis://[user:pass@]host[:port][/db]
54
+ (rediss:// for TLS)
54
55
  --poll-interval <ms> Polling interval in milliseconds (default: 3000)
55
56
  --queues <names> Comma-separated queue names to monitor
56
57
  -v, --version Show version
57
58
  -h, --help Show help
58
59
  ```
59
60
 
61
+ Connections are always specified as a single Redis URL — the discrete
62
+ `--redis-host` / `--redis-port` / `--redis-password` / `--redis-db` flags
63
+ were retired so there is one obvious way to point bullmq-dash at a server.
64
+
60
65
  ### Examples
61
66
 
62
67
  ```bash
63
- # Interactive setup
64
- bullmq-dash
68
+ # Interactive setup (prompts for a URL)
69
+ bullmq-dash --tui
70
+
71
+ # Connect via a URL
72
+ bullmq-dash --tui --redis-url redis://localhost:6379
73
+ bullmq-dash --tui --redis-url redis://user:pass@redis.example.com:6379/0
65
74
 
66
- # Connect to remote Redis
67
- bullmq-dash --redis-host 192.168.1.100 --redis-port 6380
75
+ # Use TLS (rediss://) and percent-encode special chars in passwords
76
+ bullmq-dash --tui --redis-url rediss://default:p%40ss@redis.upstash.io:6379
68
77
 
69
- # Connect with password
70
- bullmq-dash --redis-host redis.example.com --redis-password secret
78
+ # Connect via a named profile from the config file
79
+ bullmq-dash --tui --profile prod
71
80
 
72
81
  # Monitor specific queues only
73
- bullmq-dash --queues email,notifications,payments
82
+ bullmq-dash --tui --redis-url redis://localhost --queues email,notifications,payments
74
83
 
75
84
  # Custom polling interval (5 seconds)
76
- bullmq-dash --poll-interval 5000
85
+ bullmq-dash --tui --redis-url redis://localhost --poll-interval 5000
86
+ ```
87
+
88
+ ## Connection Profiles
89
+
90
+ Save Redis connections as named profiles so you don't have to remember (or paste)
91
+ hosts and ports every time. Drop a JSON file at `~/.config/bullmq-dash/config.json`
92
+ and reference it with `--profile`:
93
+
94
+ ```json
95
+ {
96
+ "defaultProfile": "local",
97
+ "profiles": {
98
+ "local": { "redis": { "url": "redis://localhost:6379" } },
99
+ "prod": {
100
+ "redis": { "url": "${REDIS_PROD_URL}" },
101
+ "queues": ["payments", "notifications"]
102
+ },
103
+ "upstash": { "redis": { "url": "${REDIS_URL}" } }
104
+ }
105
+ }
77
106
  ```
78
107
 
108
+ Each profile carries a single `redis.url`. The `${VAR}` form interpolates an environment variable as the **whole value** (partial substitution is intentionally not supported), which pairs nicely with managed providers (Upstash, Heroku Redis, Render, Railway, Fly) that hand you a single `REDIS_URL` env var. For inline auth, percent-encode any special characters in the password.
109
+
110
+ ```bash
111
+ # Connect using the default profile (defaultProfile field above)
112
+ bullmq-dash --tui
113
+
114
+ # Pick a specific profile
115
+ bullmq-dash --tui --profile prod
116
+ bullmq-dash queues list --profile prod
117
+
118
+ # A direct --redis-url overrides whatever the profile would have selected
119
+ bullmq-dash queues list --profile prod --redis-url redis://localhost:6380
120
+ ```
121
+
122
+ **Resolution order** (highest precedence first):
123
+
124
+ 1. `--redis-url <url>`
125
+ 2. `redis.url` from `--profile <name>` or the file's `defaultProfile`
126
+ 3. Otherwise: the interactive prompt (TUI mode) or `CONFIG_ERROR` (subcommands / `--web`)
127
+
128
+ **File location** — the first match wins:
129
+
130
+ 1. `--config <path>`
131
+ 2. `$BULLMQ_DASH_CONFIG`
132
+ 3. `$XDG_CONFIG_HOME/bullmq-dash/config.json`
133
+ 4. `~/.config/bullmq-dash/config.json`
134
+
135
+ **Secrets via environment variables.** Any string value of the exact form
136
+ `${VAR_NAME}` is substituted from the environment at load time. If the variable
137
+ is unset, the command fails fast with `CONFIG_ERROR` rather than connecting
138
+ without auth — keep passwords out of the file itself.
139
+
79
140
  ## Browser Terminal Mode
80
141
 
81
142
  `bullmq-dash` includes a built-in web terminal mode powered by a Fastify + PTY bridge.
82
143
 
83
144
  ```bash
84
- bullmq-dash --web --redis-host localhost --redis-port 6379
145
+ bullmq-dash --web --redis-url redis://localhost:6379
85
146
  ```
86
147
 
87
148
  Then open: