numux 1.4.0 → 1.5.1
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 +27 -17
- package/dist/bin.js +2611 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.js +7 -0
- package/dist/types.d.ts +53 -0
- package/package.json +13 -9
- package/src/cli.ts +0 -217
- package/src/completions.ts +0 -121
- package/src/config/expand-scripts.ts +0 -96
- package/src/config/interpolate.ts +0 -50
- package/src/config/loader.ts +0 -76
- package/src/config/resolver.ts +0 -67
- package/src/config/validator.ts +0 -150
- package/src/config.ts +0 -8
- package/src/index.ts +0 -258
- package/src/process/manager.ts +0 -379
- package/src/process/ready.ts +0 -45
- package/src/process/runner.ts +0 -243
- package/src/types.ts +0 -57
- package/src/ui/app.ts +0 -454
- package/src/ui/pane.ts +0 -125
- package/src/ui/prefix.ts +0 -207
- package/src/ui/status-bar.ts +0 -58
- package/src/ui/tabs.ts +0 -246
- package/src/utils/color.ts +0 -93
- package/src/utils/env-file.ts +0 -58
- package/src/utils/log-writer.ts +0 -48
- package/src/utils/logger.ts +0 -32
- package/src/utils/shutdown.ts +0 -39
- package/src/utils/watcher.ts +0 -53
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ This creates a starter `numux.config.ts` with commented-out examples. Edit it, t
|
|
|
22
22
|
|
|
23
23
|
### Config file
|
|
24
24
|
|
|
25
|
-
Create `numux.config.ts` (or `.js
|
|
25
|
+
Create `numux.config.ts` (or `.js`):
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
28
|
import { defineConfig } from 'numux'
|
|
@@ -209,12 +209,17 @@ A watched process is only restarted if it's currently running, ready, or failed
|
|
|
209
209
|
|
|
210
210
|
Config values support `${VAR}` syntax for environment variable substitution:
|
|
211
211
|
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
```ts
|
|
213
|
+
export default defineConfig({
|
|
214
|
+
processes: {
|
|
215
|
+
api: {
|
|
216
|
+
command: 'node server.js --port ${PORT:-3000}',
|
|
217
|
+
env: {
|
|
218
|
+
DATABASE_URL: '${DATABASE_URL:?DATABASE_URL must be set}',
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
})
|
|
218
223
|
```
|
|
219
224
|
|
|
220
225
|
| Syntax | Behavior |
|
|
@@ -229,15 +234,20 @@ Interpolation applies to all string values in the config (command, cwd, env, env
|
|
|
229
234
|
|
|
230
235
|
Use `condition` to run a process only when an environment variable is set:
|
|
231
236
|
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
```ts
|
|
238
|
+
export default defineConfig({
|
|
239
|
+
processes: {
|
|
240
|
+
seed: {
|
|
241
|
+
command: 'bun run seed',
|
|
242
|
+
persistent: false,
|
|
243
|
+
condition: 'SEED_DB', // only runs when SEED_DB is set and truthy
|
|
244
|
+
},
|
|
245
|
+
storybook: {
|
|
246
|
+
command: 'bun run storybook',
|
|
247
|
+
condition: '!CI', // skipped in CI environments
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
})
|
|
241
251
|
```
|
|
242
252
|
|
|
243
253
|
Falsy values: unset, empty string, `"0"`, `"false"`, `"no"`, `"off"` (case-insensitive). If a conditional process is skipped, its dependents are also skipped.
|
|
@@ -264,7 +274,7 @@ Persistent processes that crash are auto-restarted with exponential backoff (1s
|
|
|
264
274
|
| `Alt+L` | Clear active pane output |
|
|
265
275
|
| `Alt+1`–`Alt+9` | Jump to tab |
|
|
266
276
|
| `Alt+Left/Right` | Cycle tabs |
|
|
267
|
-
| `Up/Down` |
|
|
277
|
+
| `Up/Down` | Navigate between tabs |
|
|
268
278
|
| `PageUp/PageDown` | Scroll output by page (non-interactive panes) |
|
|
269
279
|
| `Home/End` | Scroll to top/bottom (non-interactive panes) |
|
|
270
280
|
| `Alt+PageUp/PageDown` | Scroll output up/down |
|