@gachlab/devup 0.2.0 → 0.4.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/CHANGELOG.md +63 -3
- package/README.md +114 -2
- package/dist/config/cli.d.ts +4 -2
- package/dist/config/cli.d.ts.map +1 -1
- package/dist/config/types.d.ts +27 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/validator.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1007 -288
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/dry-run.d.ts.map +1 -1
- package/dist/orchestrator/once.d.ts.map +1 -1
- package/dist/orchestrator/subcommands.d.ts +20 -0
- package/dist/orchestrator/subcommands.d.ts.map +1 -0
- package/dist/process/external.d.ts +30 -0
- package/dist/process/external.d.ts.map +1 -0
- package/dist/process/manager.d.ts +10 -0
- package/dist/process/manager.d.ts.map +1 -1
- package/dist/process/types.d.ts +2 -0
- package/dist/process/types.d.ts.map +1 -1
- package/dist/tui/App.d.ts +4 -0
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/ServiceList.d.ts.map +1 -1
- package/dist/tui/StatsPanel.d.ts +3 -0
- package/dist/tui/StatsPanel.d.ts.map +1 -1
- package/dist/tui/hooks/useProcessManager.d.ts +1 -0
- package/dist/tui/hooks/useProcessManager.d.ts.map +1 -1
- package/dist/tui/tips.d.ts +17 -0
- package/dist/tui/tips.d.ts.map +1 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,64 @@ All notable changes to `@gachlab/devup` are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.0] — 2026-05-21
|
|
9
|
+
|
|
10
|
+
Polish + standalone CLI release. Eight focused improvements landed as a single PR with one commit per issue.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **`devup --version` / `-v` and `devup --help` / `-h`** (#6). Both short-circuit before any config loading and exit `0`. Version is read from `package.json` at runtime so dev (via tsx) and the published tarball both report the right number.
|
|
14
|
+
- **Standalone subcommands** (#17): `devup logs <service> [--follow|-f]`, `devup install`, `devup status`, `devup help [<subcommand>]`. Reuse the persistent log files and the health-check primitives without launching the TUI. `logs --follow` tails new lines via `watchFile` and exits cleanly on SIGINT. `install` runs `npm install` across every service.cwd in parallel (max 4 at a time), skipping ones whose `.install-stamp` matches. `status` probes each service's healthCheck and prints a table.
|
|
15
|
+
- **Pre-flight check for `--watch-path` arguments** (#5). Before spawning a service, devup scans its args for `--watch` / `--watch-path` (both `--flag value` and `--flag=value` forms) and verifies every referenced path exists relative to the service's `cwd`. Missing paths mark the service `crashed` with one grouped error line instead of letting Node 22 die with a cryptic message after a rebase that renamed directories.
|
|
16
|
+
- **Browser open respects proxy + TLS** (#10). Pressing `o` in the TUI now opens `https://<sub>.<domain>` when `--proxy` is active and the service has a route. Falls back to `http://localhost:<port>` otherwise. Honors `proxy.tls: false` by using `http://` on the subdomain.
|
|
17
|
+
- **Crash-loop badge** (#11). Services that exhausted their auto-restart budget (`status === 'crashed' && restarts >= MAX_RESTARTS`) now render with `✖` (red, bold), status label `looping`, and a `⚠ N need attention` counter in the stats panel header. Easy to spot in a long service list.
|
|
18
|
+
- **Fuzzy filter in `ServiceList` modal** (#18). All three picker modals (`f`, `r`, `o`) now accept typed characters to filter the list in real time. Backspace removes a character. First Esc clears the filter, second Esc closes the modal. Sub-second selection on stacks with 30+ services.
|
|
19
|
+
- **Contextual tips** (#22). At teachable moments the TUI shows a dim one-liner in the header bar (e.g. "tip: press / to search in logs" once logs exceed 1000 lines, or "tip: press r to restart" when a service crash-loops). Each tip shows at most once per session and auto-clears after 12 s. Priority order favors actionable tips (crash → search → filter).
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- **`npm pkg fix` cleanup** (#7). `bin.devup` normalised to `dist/index.js` (no leading `./`), `repository.url` to `git+https://...`. New `prepack` script runs `npm pkg fix` on every publish so the warnings from 0.2.0 don't reappear.
|
|
23
|
+
- `ServiceList` footer hint updated: `type to filter ↑↓ navigate Enter select Esc clear/close`.
|
|
24
|
+
- README gets a new "CLI subcommands" section and additions to the Features list ("Pre-flight validation", "Subcommands").
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- Reordering inside the TUI key-binding handler so `Ctrl+F` (PgDn) never falls through to the filter modal (`f`). Same fix applied to other `Ctrl`-modified bindings.
|
|
28
|
+
|
|
29
|
+
### Internals
|
|
30
|
+
- Exported `extractWatchPaths(args)` from `process/manager.ts` (handles `--watch X`, `--watch-path X`, `--watch=X`, `--watch-path=X`; ignores `--watch-path` followed by another flag; doesn't match unrelated flags like `--watcher`).
|
|
31
|
+
- Exported `isCrashLooped(st)` + `MAX_RESTARTS` constant from `tui/StatsPanel.tsx` for test reuse and to drive the crash-loop banner.
|
|
32
|
+
- Exported `buildServiceUrl(name, port, proxyActive, proxyOpts)` from `tui/App.tsx` for testability.
|
|
33
|
+
- New `src/tui/tips.ts` with a pure `pickTip(state)` function — easy to extend by appending to the priority list.
|
|
34
|
+
- New `src/orchestrator/subcommands.ts` with `detectSubcommand`, `runLogs`, `runInstall`, `runStatus`, `runHelp`.
|
|
35
|
+
- Test suite grown to ~274.
|
|
36
|
+
|
|
37
|
+
## [0.3.0] — 2026-05-21
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- **Profiles / scenarios** (#4). New `profiles: Record<string, string[]>` field on `DevStackConfig` plus a `--profile <name>` CLI flag. Lets you save common service-subset combinations under a name (e.g. `'check-in'`, `'pickup'`) and boot them with one short command instead of typing `--services` every time. Composable with `--skip`. Unknown profile names produce a friendly error listing what's available.
|
|
41
|
+
- **`readyPattern` for instant up detection** (#13). New per-service field accepting a plain string or vim-style `/pattern/flags` regex. On the first matching stdout/stderr line devup flips the service to `up` immediately, short-circuiting the next 3-second health-check poll. Speeds up phase transitions when frameworks print recognisable boot lines (Vite's `ready in 423 ms`, Angular's `Compiled successfully`, Fastify's `server listening`). The periodic health-check still runs as a fallback.
|
|
42
|
+
- **`preBuild` and `watchBuild` hooks** (#12). The fields existed in the type but were ignored. Now implemented properly:
|
|
43
|
+
- `preBuild` runs synchronously before the spawn through the platform shell (`sh -c` / `cmd /c`); non-zero exit marks the service `crashed` and skips the spawn.
|
|
44
|
+
- `watchBuild` is spawned as a sibling process and killed (kill-tree) on stop/restart/cleanup.
|
|
45
|
+
- Output is tagged `[build]` / `[watch]` in the logs panel and flows through the same line buffer + log sink pipeline.
|
|
46
|
+
- Replaces the awkward `sh -c 'npm run build && (npx tsup --watch &) && node ...'` workaround in projects with TypeScript services.
|
|
47
|
+
- **`external` / pre hooks for external dependencies** (#14). New top-level `external: ExternalService[]` field for databases, queues, etc. Externals run **before phase 0** through the platform shell with optional `healthCheck` gating and `stopCmd` on shutdown. devup aborts the boot (and runs every `stopCmd`) if any external fails its healthCheck within `startTimeout` (default 60 s). Closes the "do `docker compose up -d` then run devup" loop. Logs are tagged `ext:<name>` and persisted to `~/.devup/logs/<proj>/ext_<name>.log`.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- `filterServices()` now accepts an optional `config` arg to resolve `--profile`. Calls from `index.ts` updated.
|
|
51
|
+
- `--dry-run` header now shows the active profile and a new `Externals (N):` section with each entry's healthCheck tag.
|
|
52
|
+
- `ProcessState` gains an optional `watchProc` field tracking the `watchBuild` side-car.
|
|
53
|
+
- `useProcessManager` exposes `pushLog()` so non-service log lines (externals, future side-cars) flow through the same pause buffer and log sink as regular service lines.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
- Validator catches profile entries that reference unknown services or are empty arrays.
|
|
57
|
+
- Validator catches invalid `readyPattern` regex and empty strings.
|
|
58
|
+
- Validator catches empty `preBuild` / `watchBuild` strings.
|
|
59
|
+
- Validator catches external dependencies with missing `cmd`, duplicate names, missing `port` when a healthCheck is set, or `http` healthCheck paths without a leading `/`.
|
|
60
|
+
|
|
61
|
+
### Internals
|
|
62
|
+
- New module `src/process/external.ts` (`startExternals` / `stopExternals`).
|
|
63
|
+
- Test suite grown from 200 to ~237 — new suites: `ready-pattern`, `external` (Unix-only, follows the existing skip-on-Windows convention used by integration tests), validator coverage for every new field.
|
|
64
|
+
- Shell-dependent `preBuild`/`watchBuild` integration tests skipped on Windows. The feature itself works on both platforms because the runtime code path already routes through `sh -c` / `cmd /c`; only writing a single test command that exercises spawn behaviour across both shells without per-platform branching is awkward.
|
|
65
|
+
|
|
8
66
|
## [0.2.0] — 2026-05-21
|
|
9
67
|
|
|
10
68
|
### Added
|
|
@@ -77,6 +135,8 @@ Initial release.
|
|
|
77
135
|
- Config file resolution order: `devup.config.ts` → `.js` → `.json`, with `--config <path>` override. TypeScript loaded via the `tsx` import hook.
|
|
78
136
|
- CLI flags: `--only`, `--services`, `--skip`, `--lazy`/`--no-lazy`, `--timeout`, `--proxy`, `--proxy-host`, `--proxy-conf`, `--proxy-tls`/`--no-proxy-tls`, `--proxy-entrypoint`, `--config`.
|
|
79
137
|
|
|
80
|
-
[0.
|
|
81
|
-
[0.
|
|
82
|
-
[0.
|
|
138
|
+
[0.4.0]: https://github.com/gachlab/devup/releases/tag/0.4.0
|
|
139
|
+
[0.3.0]: https://github.com/gachlab/devup/releases/tag/0.3.0
|
|
140
|
+
[0.2.0]: https://github.com/gachlab/devup/releases/tag/0.2.0
|
|
141
|
+
[0.1.1]: https://github.com/gachlab/devup/releases/tag/0.1.1
|
|
142
|
+
[0.1.0]: https://github.com/gachlab/devup/releases/tag/0.1.0
|
package/README.md
CHANGED
|
@@ -20,6 +20,8 @@ Built with TypeScript 6, Ink (React for terminals), and zero test dependencies (
|
|
|
20
20
|
- **npm install management** — automatic dependency installation with hash-based stamps to skip redundant installs
|
|
21
21
|
- **Auto-restart with backoff** — crashed services restart automatically with exponential backoff (2s → 4s → 8s), max 3 attempts; manual restart resets the counter
|
|
22
22
|
- **Port conflict detection** — checks if a port is already in use before starting a service; also validates lazy `port + 10000` collisions at config-load time
|
|
23
|
+
- **Pre-flight validation** — `--watch-path` arguments are checked against disk before spawn so a stale config after a rebase fails loudly instead of silently
|
|
24
|
+
- **Subcommands** — `devup logs <svc>`, `devup install`, `devup status` work without launching the TUI
|
|
23
25
|
|
|
24
26
|
## Quick start
|
|
25
27
|
|
|
@@ -85,6 +87,25 @@ npx devup
|
|
|
85
87
|
| `services` | `ServiceConfig[]` | ✅ | List of services to manage |
|
|
86
88
|
| `lazy` | `LazyConfig` | | Lazy mode configuration |
|
|
87
89
|
| `proxy` | `ProxyConfig` | | Reverse proxy config generation |
|
|
90
|
+
| `profiles` | `Record<string, string[]>` | | Named lists of services to boot. Select with `--profile <name>` |
|
|
91
|
+
| `external` | `ExternalService[]` | | Dependencies started **before** phase 0 (databases, queues, etc.) |
|
|
92
|
+
|
|
93
|
+
#### Profiles
|
|
94
|
+
|
|
95
|
+
A profile is a named subset of `services`. Instead of memorising service names for `--services`, you give your common workflows a name:
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
export default defineConfig({
|
|
99
|
+
// ...
|
|
100
|
+
profiles: {
|
|
101
|
+
'check-in': ['configurations-api', 'authorization-api', 'app-api', 'check-in-api', 'app-web'],
|
|
102
|
+
'pickup': ['configurations-api', 'pickup-api', 'pickup-drivers-web'],
|
|
103
|
+
'frontends': ['app-web', 'admin-web', 'staff-web'],
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then `devup --profile check-in` boots that subset. Composable with `--skip`. The validator catches typos at config-load time. Unknown profile names produce a friendly error listing what's available.
|
|
88
109
|
|
|
89
110
|
### `ServiceConfig`
|
|
90
111
|
|
|
@@ -98,11 +119,12 @@ npx devup
|
|
|
98
119
|
| `port` | `number` | ✅ | Port the service listens on. Must be unique |
|
|
99
120
|
| `phase` | `number` | ✅ | Startup phase (0 = first). Services in the same phase start together; devup waits for all APIs in a phase to be ready before starting the next phase |
|
|
100
121
|
| `maxMem` | `number` | | Max memory in MB. Injects `--max-old-space-size` for `node` commands, or `NODE_OPTIONS` for `npx` |
|
|
101
|
-
| `preBuild` | `string` | |
|
|
102
|
-
| `watchBuild` | `string` | |
|
|
122
|
+
| `preBuild` | `string` | | Shell command run **before** the service starts. If it exits non-zero the service is marked `crashed` and skipped. Output is tagged `[build]` in the logs panel |
|
|
123
|
+
| `watchBuild` | `string` | | Shell command spawned **alongside** the service (e.g. `npx tsup --watch`). Killed automatically when the service stops/restarts. Output is tagged `[watch]` in the logs panel |
|
|
103
124
|
| `nodeArgs` | `string[]` | | Extra Node.js arguments |
|
|
104
125
|
| `extraEnv` | `Record<string, string>` | | Extra environment variables for this service |
|
|
105
126
|
| `healthCheck` | `HealthCheckConfig` | | Override the readiness check for this service. Default: TCP probe on `port` |
|
|
127
|
+
| `readyPattern` | `string` | | Regex matched against stdout/stderr lines. On match, service is marked `up` immediately, short-circuiting the next health-check poll. Plain string or vim-style `/pattern/flags`. Case-insensitive by default |
|
|
106
128
|
|
|
107
129
|
### `HealthCheckConfig`
|
|
108
130
|
|
|
@@ -122,6 +144,81 @@ npx devup
|
|
|
122
144
|
{ name: 'api', /* ... */, healthCheck: { type: 'http', path: '/health', expect: [200, 204] } }
|
|
123
145
|
```
|
|
124
146
|
|
|
147
|
+
#### readyPattern
|
|
148
|
+
|
|
149
|
+
A regex matched against each line of the service's stdout/stderr. The first matching line flips the service to `up` immediately, without waiting for the next 3-second health-check poll. The periodic health-check still runs as a fallback. Useful for tools that print recognisable boot lines:
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
// Vite: "ready in 423 ms"
|
|
153
|
+
{ name: 'web', cmd: 'npx', args: ['vite'], readyPattern: 'ready in' }
|
|
154
|
+
|
|
155
|
+
// Angular: "Compiled successfully"
|
|
156
|
+
{ name: 'app', cmd: 'npx', args: ['ng', 'serve'], readyPattern: '/compiled successfully/i' }
|
|
157
|
+
|
|
158
|
+
// Fastify: "Server listening at"
|
|
159
|
+
{ name: 'api', cmd: 'node', args: ['index.js'], readyPattern: 'server listening' }
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Both plain strings and vim-style `/pattern/flags` are accepted. Strings are case-insensitive by default.
|
|
163
|
+
|
|
164
|
+
#### Build hooks: `preBuild` and `watchBuild`
|
|
165
|
+
|
|
166
|
+
For TypeScript services or anything that needs a compile step, two hooks remove the usual `sh -c 'npm run build && (npx tsup --watch &) && node ...'` workaround:
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
{
|
|
170
|
+
name: 'orders-api',
|
|
171
|
+
cwd: 'orders/api',
|
|
172
|
+
cmd: 'node', args: ['dist/index.js'],
|
|
173
|
+
type: 'api', port: 3031, phase: 1,
|
|
174
|
+
preBuild: 'npm run build', // runs once, must succeed before the service starts
|
|
175
|
+
watchBuild: 'npx tsup --watch', // runs in parallel; killed when the service stops
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
- **`preBuild`** runs synchronously before the spawn. Non-zero exit marks the service as `crashed` (the spawn is skipped). Output is tagged `[build]` in the logs panel.
|
|
180
|
+
- **`watchBuild`** runs as a sibling process. devup kills it when the service stops, restarts, or the TUI exits. Output is tagged `[watch]`.
|
|
181
|
+
|
|
182
|
+
Both are passed through the platform shell (`sh -c` on Unix, `cmd /c` on Windows), so pipes and `&&` work.
|
|
183
|
+
|
|
184
|
+
### `ExternalService`
|
|
185
|
+
|
|
186
|
+
External dependencies (databases, message queues, etc.) launched **before** phase 0. devup waits for each `healthCheck` (when set) to pass before starting any service. Typical use: `docker compose up -d`.
|
|
187
|
+
|
|
188
|
+
| Field | Type | Required | Description |
|
|
189
|
+
|---|---|---|---|
|
|
190
|
+
| `name` | `string` | ✅ | Friendly name shown in logs (logs use the prefix `ext:<name>`) |
|
|
191
|
+
| `cmd` | `string` | ✅ | Shell command (passed through `sh -c` / `cmd /c`). Pipes and `&&` work |
|
|
192
|
+
| `cwd` | `string` | | Working directory relative to the project root |
|
|
193
|
+
| `extraEnv` | `Record<string, string>` | | Extra env vars merged on top of the project env |
|
|
194
|
+
| `healthCheck` | `HealthCheckConfig` | | Readiness probe. devup waits for `up` before starting phase 0 |
|
|
195
|
+
| `port` | `number` | when `healthCheck` is set | Port to probe |
|
|
196
|
+
| `startTimeout` | `number` | | Max seconds to wait for healthCheck. Default: `60` |
|
|
197
|
+
| `stopCmd` | `string` | | Shell command run on shutdown (e.g. `docker compose down`) |
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
export default defineConfig({
|
|
201
|
+
// ...
|
|
202
|
+
external: [
|
|
203
|
+
{
|
|
204
|
+
name: 'mongo',
|
|
205
|
+
cmd: 'docker compose -f docker-compose.dev.yml up -d mongo',
|
|
206
|
+
port: 27017,
|
|
207
|
+
healthCheck: { type: 'tcp' },
|
|
208
|
+
stopCmd: 'docker compose -f docker-compose.dev.yml stop mongo',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: 'redis',
|
|
212
|
+
cmd: 'docker compose -f docker-compose.dev.yml up -d redis',
|
|
213
|
+
port: 6379,
|
|
214
|
+
healthCheck: { type: 'tcp' },
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
});
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
If any external fails its healthCheck within `startTimeout` seconds, devup aborts the boot, runs each external's `stopCmd` (best-effort), and exits.
|
|
221
|
+
|
|
125
222
|
### `LazyConfig`
|
|
126
223
|
|
|
127
224
|
| Field | Type | Required | Description |
|
|
@@ -144,6 +241,20 @@ When lazy mode is active (default), services not in `alwaysOn` start a TCP proxy
|
|
|
144
241
|
|
|
145
242
|
The proxy config is only generated when `--proxy` is passed on the CLI. Only services with `health === 'up'` are included in the generated config.
|
|
146
243
|
|
|
244
|
+
## CLI subcommands
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
devup # launch the interactive TUI (default)
|
|
248
|
+
devup logs <service> [--follow] # print the persisted log file
|
|
249
|
+
devup install # parallel npm install across services
|
|
250
|
+
devup status # health-check every service in config
|
|
251
|
+
devup help [<subcommand>] # show usage
|
|
252
|
+
devup --version # print version
|
|
253
|
+
devup --help # print flag summary
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
All subcommands need the project's `devup.config.ts` to be resolvable (use `--config <path>` to override).
|
|
257
|
+
|
|
147
258
|
## CLI flags
|
|
148
259
|
|
|
149
260
|
```
|
|
@@ -157,6 +268,7 @@ devup [options]
|
|
|
157
268
|
| `--only apis` | Only start API services |
|
|
158
269
|
| `--only webs` | Only start web services |
|
|
159
270
|
| `--services api,web,auth` | Start only the named services |
|
|
271
|
+
| `--profile <name>` | Start the services in the named profile (see `profiles` in the config) |
|
|
160
272
|
| `--skip tasks-api,pickup-api` | Start everything except these |
|
|
161
273
|
| `--config path/to/config.ts` | Use a custom config file |
|
|
162
274
|
|
package/dist/config/cli.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { ServiceConfig } from './types.js';
|
|
1
|
+
import type { DevStackConfig, ServiceConfig } from './types.js';
|
|
2
2
|
export interface CliArgs {
|
|
3
3
|
configPath?: string;
|
|
4
4
|
only?: string;
|
|
5
5
|
skip: string[];
|
|
6
6
|
services?: string[];
|
|
7
|
+
profile?: string;
|
|
7
8
|
lazy: boolean;
|
|
8
9
|
lazyTimeout: number;
|
|
9
10
|
proxy: boolean;
|
|
@@ -17,6 +18,7 @@ export interface CliArgs {
|
|
|
17
18
|
logFile: boolean;
|
|
18
19
|
logDir?: string;
|
|
19
20
|
}
|
|
21
|
+
export declare const USAGE = "devup \u2014 terminal UI dev stack runner\n\nUsage: devup [options]\n\nService selection:\n --only apis | webs Start only APIs or only webs\n --services a,b,c Start only the named services\n --profile <name> Start the services in a named profile (see ROADMAP)\n --skip a,b,c Start everything except these\n --config <path> Use a custom config file\n\nLazy mode:\n --lazy Enable lazy mode (default)\n --no-lazy Start every service immediately\n --timeout <minutes> Idle timeout for lazy services. Default: 10\n\nReverse proxy:\n --proxy Enable proxy config generation\n --proxy-host <host> Override the target host (Docker/local)\n --proxy-conf <path> Override the generated config file path\n --proxy-tls Enable TLS in the generated config (default)\n --no-proxy-tls Disable TLS\n --proxy-entrypoint <n> Override entrypoint name (Traefik only)\n\nCI / scripting:\n --dry-run Print the resolved boot plan and exit\n --once Boot, wait for readiness, exit 0/1 (no TUI)\n --once-timeout <s> Max seconds to wait in --once mode. Default: 90\n\nLog files:\n --no-log-file Disable persistent log files\n --log-dir <path> Override log root (default: ~/.devup/logs)\n\nOther:\n -h, --help Show this help and exit\n -v, --version Show version and exit\n\nSee https://github.com/gachlab/devup for the full documentation.";
|
|
20
22
|
export declare function parseCliArgs(argv: string[]): CliArgs;
|
|
21
|
-
export declare function filterServices(services: ServiceConfig[], args: CliArgs): ServiceConfig[];
|
|
23
|
+
export declare function filterServices(services: ServiceConfig[], args: CliArgs, config?: Pick<DevStackConfig, 'profiles'>): ServiceConfig[];
|
|
22
24
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/config/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/config/cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/config/cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhE,MAAM,WAAW,OAAO;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAKD,eAAO,MAAM,KAAK,8gDAqC+C,CAAC;AAElE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CA0CpD;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,aAAa,EAAE,EACzB,IAAI,EAAE,OAAO,EACb,MAAM,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GACxC,aAAa,EAAE,CA6BjB"}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export interface ServiceConfig {
|
|
|
12
12
|
nodeArgs?: string[];
|
|
13
13
|
extraEnv?: Record<string, string>;
|
|
14
14
|
healthCheck?: HealthCheckConfig;
|
|
15
|
+
/** Case-insensitive regex. When a line of the service's stdout/stderr matches,
|
|
16
|
+
* the service is immediately marked as `up` without waiting for the next
|
|
17
|
+
* health-check poll. Speeds up phase transitions on cold boots.
|
|
18
|
+
* Examples: '/ready in \\d+ ms/' (Vite), '/compiled successfully/' (Angular). */
|
|
19
|
+
readyPattern?: string;
|
|
15
20
|
}
|
|
16
21
|
export interface HealthCheckConfig {
|
|
17
22
|
/** 'tcp' (default) checks that the port accepts connections. 'http' makes an HTTP GET. */
|
|
@@ -37,6 +42,24 @@ export interface ProxyConfig {
|
|
|
37
42
|
tls?: boolean;
|
|
38
43
|
entrypoint?: string;
|
|
39
44
|
}
|
|
45
|
+
export interface ExternalService {
|
|
46
|
+
/** Friendly name (used in logs and the stats panel). Must be unique within `external`. */
|
|
47
|
+
name: string;
|
|
48
|
+
/** Shell command to start. Will be passed through `sh -c` / `cmd /c`. */
|
|
49
|
+
cmd: string;
|
|
50
|
+
/** Optional working directory (relative to the project root). */
|
|
51
|
+
cwd?: string;
|
|
52
|
+
/** Extra env vars merged on top of the project env. */
|
|
53
|
+
extraEnv?: Record<string, string>;
|
|
54
|
+
/** Optional readiness probe. devup waits for this to return `up` before starting phase 0. */
|
|
55
|
+
healthCheck?: HealthCheckConfig;
|
|
56
|
+
/** Port to probe when `healthCheck` is set. Required for tcp checks. */
|
|
57
|
+
port?: number;
|
|
58
|
+
/** Max seconds to wait for healthCheck to pass before giving up. Default: 60. */
|
|
59
|
+
startTimeout?: number;
|
|
60
|
+
/** Optional shell command run on shutdown (e.g. `docker compose down`). */
|
|
61
|
+
stopCmd?: string;
|
|
62
|
+
}
|
|
40
63
|
export interface DevStackConfig {
|
|
41
64
|
name: string;
|
|
42
65
|
icon?: string;
|
|
@@ -45,6 +68,10 @@ export interface DevStackConfig {
|
|
|
45
68
|
services: ServiceConfig[];
|
|
46
69
|
lazy?: LazyConfig;
|
|
47
70
|
proxy?: ProxyConfig;
|
|
71
|
+
/** Named lists of service names — selectable with --profile <name>. */
|
|
72
|
+
profiles?: Record<string, string[]>;
|
|
73
|
+
/** Optional external dependencies (DBs, queues) started before phase 0. */
|
|
74
|
+
external?: ExternalService[];
|
|
48
75
|
}
|
|
49
76
|
export declare function defineConfig(config: DevStackConfig): DevStackConfig;
|
|
50
77
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,EAAE,CAAC;I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,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAEnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/config/validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/config/validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,EAAE,CAwKrF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAExE"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChG,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC"}
|