@gachlab/devup 0.1.0 → 0.2.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +87 -11
  3. package/dist/config/cli.d.ts +5 -0
  4. package/dist/config/cli.d.ts.map +1 -1
  5. package/dist/config/types.d.ts +13 -0
  6. package/dist/config/types.d.ts.map +1 -1
  7. package/dist/config/validator.d.ts.map +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +693 -114
  10. package/dist/index.js.map +1 -1
  11. package/dist/lazy/proxy.d.ts.map +1 -1
  12. package/dist/orchestrator/dry-run.d.ts +15 -0
  13. package/dist/orchestrator/dry-run.d.ts.map +1 -0
  14. package/dist/orchestrator/once.d.ts +19 -0
  15. package/dist/orchestrator/once.d.ts.map +1 -0
  16. package/dist/process/health.d.ts +10 -1
  17. package/dist/process/health.d.ts.map +1 -1
  18. package/dist/process/installer.d.ts +0 -10
  19. package/dist/process/installer.d.ts.map +1 -1
  20. package/dist/process/log-sink.d.ts +23 -0
  21. package/dist/process/log-sink.d.ts.map +1 -0
  22. package/dist/process/manager.d.ts +5 -3
  23. package/dist/process/manager.d.ts.map +1 -1
  24. package/dist/proxy-config/caddy.d.ts +10 -0
  25. package/dist/proxy-config/caddy.d.ts.map +1 -0
  26. package/dist/proxy-config/detect.d.ts.map +1 -1
  27. package/dist/proxy-config/nginx.d.ts +10 -0
  28. package/dist/proxy-config/nginx.d.ts.map +1 -0
  29. package/dist/tui/App.d.ts +3 -1
  30. package/dist/tui/App.d.ts.map +1 -1
  31. package/dist/tui/LogsPanel.d.ts +3 -1
  32. package/dist/tui/LogsPanel.d.ts.map +1 -1
  33. package/dist/tui/StatsPanel.d.ts +3 -1
  34. package/dist/tui/StatsPanel.d.ts.map +1 -1
  35. package/dist/tui/hooks/useKeyBindings.d.ts +6 -0
  36. package/dist/tui/hooks/useKeyBindings.d.ts.map +1 -1
  37. package/dist/tui/hooks/useProcessManager.d.ts +6 -3
  38. package/dist/tui/hooks/useProcessManager.d.ts.map +1 -1
  39. package/dist/tui/hooks/useProxySync.d.ts.map +1 -1
  40. package/dist/utils.d.ts +0 -5
  41. package/dist/utils.d.ts.map +1 -1
  42. package/package.json +19 -8
package/CHANGELOG.md ADDED
@@ -0,0 +1,82 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@gachlab/devup` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.2.0] — 2026-05-21
9
+
10
+ ### Added
11
+ - **HTTP health-checks per service.** New `healthCheck` config field on `ServiceConfig`. Supports `type: 'tcp'` (default) and `type: 'http'` with configurable `path`, `expect` (status code or list), `host`, and `timeoutMs`. Used by both the periodic in-TUI health poll and `--once`.
12
+ - **Persistent log files.** Every line streamed to `~/.devup/logs/<project>/<service>.log`, prefixed with an ISO-8601 timestamp. On each launch the previous file is rotated to `<service>.log.prev`. New flags `--no-log-file` (disable) and `--log-dir <path>` (override root).
13
+ - **`--dry-run`.** Prints the resolved boot plan — phases, commands with their final args/env, lazy proxies with their `realPort`, and the proxy YAML/conf that would be generated — then exits `0` without starting anything.
14
+ - **`--once` (+ `--once-timeout N`).** Boots every service phase-by-phase without rendering the TUI, waits for each API to become healthy, and exits `0` (all up) or `1` (timeout). Default timeout: 90s. Built for CI smoke tests.
15
+ - **Nginx proxy provider.** Generates one `server { }` block per healthy service, with TLS / non-TLS variants and WebSocket-upgrade headers wired by default.
16
+ - **Caddy proxy provider.** Generates a Caddyfile with `reverse_proxy` directives; TLS provisioning is delegated to Caddy by default.
17
+ - **Scroll indicators.** `[SCROLL]` badge appears in the Logs and Stats panel headers when the view is off the natural anchor (bottom for logs, top for stats).
18
+ - **`fmtUptime` now formats days.** Services running longer than a day display as `2d3h` instead of `120h0m`.
19
+
20
+ ### Changed
21
+ - **TUI scroll completely rewritten.** Logs now use a `bottomOffset` model (0 = follow latest, N = N lines back); Stats use a coherent `topOffset` model. Arrow keys, `[`/`]`, `Ctrl+B`/`Ctrl+F`, and `Ctrl+A`/`Ctrl+E` always move in the expected visual direction regardless of which panel is focused.
22
+ - **Auto-pause when scrolling Logs.** New lines are buffered (capped at 5,000) while you're scrolled up, then replayed when you return to the bottom (`Ctrl+E`). The `p` key still works manually.
23
+ - **`p` (pause logs) actually pauses.** Before, it only changed the header label while logs kept streaming.
24
+ - **`c` (clear logs) actually clears.** Was a no-op; now properly cabled to `pm.clearLogs()`.
25
+ - **Manual `r` (restart) resets the auto-restart counter to 0.** Lets the user grant a fresh budget after fixing a flapping service.
26
+ - **`install()` accepts an explicit `colorIdx`.** Install logs no longer all appear in cyan; they match the service's tag color.
27
+ - **`cleanup()` is now async** and the TUI awaits it before `process.exit(0)`. Ensures the SIGKILL fallback (3 s after SIGTERM) actually has time to run.
28
+ - **`useProxySync` no longer recreates its interval on every state change** and skips writes when the generated content hasn't changed.
29
+ - **Reverse proxy provider docs.** README now covers Traefik, Nginx, and Caddy each with a code snippet.
30
+
31
+ ### Fixed
32
+ - **Lazy proxy idle timer respects active connections.** Long-lived connections (WebSockets, SSE, HTTP/2 keep-alive) no longer get the underlying service killed mid-flight. The timer only fires when there are no active connections and no recent activity.
33
+ - **Lazy proxy fails cleanly when the on-demand start fails.** Pending connections are destroyed with a logged error instead of being piped to a dead target.
34
+ - **Log lines are no longer split mid-message.** Per-stream line buffer (`lineBuffer`) reassembles partial chunks from stdout/stderr.
35
+ - **`stderr` error count is no longer inflated.** Was counting blank lines from chunk splits; now counts one error per real line.
36
+ - **Terminal resize is now respected.** `stdout.on('resize')` re-renders the layout. Before, the height was captured on first paint and never updated.
37
+ - **Validator detects lazy-port collisions** between `service.port` and `otherService.port + 10000` and reports them at config-load time.
38
+ - **Validator validates `healthCheck` shape.** Rejects unknown `type` values and paths without a leading `/`.
39
+ - **Key bindings: `Ctrl+F` (page down) no longer triggers the filter modal.** Reordered handler so ctrl-modified keys are checked before single-letter shortcuts.
40
+
41
+ ### Removed
42
+ - Dead `blessed`-style helpers from `utils.ts`: `highlightSearch`, `findSearchMatch`, `formatLogLine`, `shouldLogLine`, `buildLogsLabel`. The TUI is fully Ink-based and never used them.
43
+ - `installBatch` from `installer.ts`. Unused, with a subtle race in its `Promise.race` cleanup.
44
+
45
+ ### Internals
46
+ - Test suite grown from 122 to 200 (`+78`). New: `health.test.ts` HTTP cases, `log-sink.test.ts`, `dry-run.test.ts`, `once.test.ts` (integration), `nginx.test.ts`, `caddy.test.ts`.
47
+ - New `src/orchestrator/` directory (`dry-run.ts`, `once.ts`) separates non-TUI flows from the React layer.
48
+
49
+ ## [0.1.1] — 2026-05-07
50
+
51
+ ### Added
52
+ - TUI panel navigation: `Tab` to switch focus between Logs and Stats, with focused-border highlighting.
53
+
54
+ ### Fixed
55
+ - Cross-platform glob quoting in `test:*` npm scripts (Windows).
56
+ - Integration tests: more socket-error codes accepted (Windows), `os.tmpdir()` in validator test (Windows), longer timeouts on macOS CI, lifecycle test enabled on macOS while skipped on Windows.
57
+
58
+ ### CI / packaging
59
+ - GitHub Actions workflow runs on Linux, macOS, and Windows.
60
+ - Split unit (every branch, 3 OSes) and integration (main only, 3 OSes) jobs.
61
+ - Upgraded actions to v5 / Node 24 runner.
62
+ - Publish workflow added — triggered by GitHub Release, runs tests on 3 OSes, then publishes to npm using trusted publishing (OIDC, no `NPM_TOKEN`).
63
+
64
+ ## [0.1.0] — 2026-05-01
65
+
66
+ Initial release.
67
+
68
+ ### Added
69
+ - Phased startup of services with TCP port-readiness detection.
70
+ - Lazy mode: on-demand start via a TCP proxy on the public port; service runs on `port + 10000`; idle timeout to stop the underlying process.
71
+ - Cross-platform process management (Linux/macOS via `ps` + `kill -pid`; Windows via `wmic` + `taskkill /T /F`) and browser-opening (`xdg-open`, `open`, `cmd /c start`).
72
+ - TUI dashboard built with Ink: live logs (filter, search, pause, timestamps), stats panel (CPU, memory, health, errors, restarts) with sort modes.
73
+ - Reverse-proxy config generation: Traefik file provider (YAML), health-aware (only `health === 'up'` services routed).
74
+ - Automatic dependency installation with hash-based stamps to skip redundant `npm install`s.
75
+ - Auto-restart with exponential backoff (2s → 4s → 8s), capped at 3 attempts.
76
+ - Port-in-use detection before starting a service.
77
+ - Config file resolution order: `devup.config.ts` → `.js` → `.json`, with `--config <path>` override. TypeScript loaded via the `tsx` import hook.
78
+ - CLI flags: `--only`, `--services`, `--skip`, `--lazy`/`--no-lazy`, `--timeout`, `--proxy`, `--proxy-host`, `--proxy-conf`, `--proxy-tls`/`--no-proxy-tls`, `--proxy-entrypoint`, `--config`.
79
+
80
+ [0.2.0]: https://github.com/gachlab/devup/releases/tag/v0.2.0
81
+ [0.1.1]: https://github.com/gachlab/devup/releases/tag/v0.1.1
82
+ [0.1.0]: https://github.com/gachlab/devup/releases/tag/v0.1.0
package/README.md CHANGED
@@ -9,14 +9,17 @@ Built with TypeScript 6, Ink (React for terminals), and zero test dependencies (
9
9
  ## Features
10
10
 
11
11
  - **Phased startup** — boot services in dependency order with automatic port readiness detection
12
- - **Lazy mode** — only start services when they receive traffic. Idle services shut down after a configurable timeout
13
- - **TUI dashboard** — live logs and process stats (CPU, memory, health, errors, restarts) in a split-panel terminal UI
12
+ - **Lazy mode** — only start services when they receive traffic. Idle services shut down after a configurable timeout (respects active connections, no killing mid-WebSocket)
13
+ - **TUI dashboard** — live logs and process stats (CPU, memory, health, errors, restarts) in a split-panel terminal UI with scrolling, search, filter, and auto-pause when you scroll up
14
14
  - **Cross-platform** — Linux, macOS, and Windows. Platform-specific process management, stats collection, and browser opening
15
- - **Reverse proxy config** — generate Traefik (or other) dynamic config from running services. Health-aware: only routes to healthy services
15
+ - **HTTP or TCP health checks** — per-service `healthCheck` config: TCP probe (default) or HTTP GET with configurable path and status codes
16
+ - **Reverse proxy config** — generate Traefik, Nginx, or Caddy config from running services. Health-aware: only routes to healthy services
17
+ - **Persistent logs** — every line streamed to `~/.devup/logs/<project>/<svc>.log` with rotation on each launch
18
+ - **CI-ready** — `--dry-run` prints the boot plan; `--once` boots, waits for readiness, exits `0/1` without a TUI
16
19
  - **Project-agnostic** — works with any Node.js monorepo. Your project defines a `devup.config.ts`, devup does the rest
17
20
  - **npm install management** — automatic dependency installation with hash-based stamps to skip redundant installs
18
- - **Auto-restart with backoff** — crashed services restart automatically with exponential backoff (2s → 4s → 8s), max 3 attempts
19
- - **Port conflict detection** — checks if a port is already in use before starting a service
21
+ - **Auto-restart with backoff** — crashed services restart automatically with exponential backoff (2s → 4s → 8s), max 3 attempts; manual restart resets the counter
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
20
23
 
21
24
  ## Quick start
22
25
 
@@ -99,6 +102,25 @@ npx devup
99
102
  | `watchBuild` | `string` | | Watch command to run alongside the service (e.g., `npx tsup --watch`) |
100
103
  | `nodeArgs` | `string[]` | | Extra Node.js arguments |
101
104
  | `extraEnv` | `Record<string, string>` | | Extra environment variables for this service |
105
+ | `healthCheck` | `HealthCheckConfig` | | Override the readiness check for this service. Default: TCP probe on `port` |
106
+
107
+ ### `HealthCheckConfig`
108
+
109
+ | Field | Type | Required | Description |
110
+ |---|---|---|---|
111
+ | `type` | `'tcp' \| 'http'` | ✅ | `tcp` (default) just opens a socket; `http` issues an HTTP GET and inspects the status code |
112
+ | `path` | `string` | | HTTP-only request path. Default: `/`. Must start with `/` |
113
+ | `expect` | `number \| number[]` | | HTTP-only acceptable status code(s). Default: any 2xx (200-299) |
114
+ | `host` | `string` | | Override target host for the HTTP check. Default: `127.0.0.1` |
115
+ | `timeoutMs` | `number` | | Per-check socket/request timeout in ms. Default: `2000` |
116
+
117
+ ```typescript
118
+ // Wait for /healthz to return 200 before considering the service up
119
+ { name: 'api', /* ... */, healthCheck: { type: 'http', path: '/healthz' } }
120
+
121
+ // Accept 200 or 204
122
+ { name: 'api', /* ... */, healthCheck: { type: 'http', path: '/health', expect: [200, 204] } }
123
+ ```
102
124
 
103
125
  ### `LazyConfig`
104
126
 
@@ -113,7 +135,7 @@ When lazy mode is active (default), services not in `alwaysOn` start a TCP proxy
113
135
 
114
136
  | Field | Type | Required | Description |
115
137
  |---|---|---|---|
116
- | `provider` | `string` | ✅ | Proxy provider name. Currently: `'traefik'` |
138
+ | `provider` | `string` | ✅ | Proxy provider name. One of: `'traefik'`, `'nginx'`, `'caddy'` |
117
139
  | `routes` | `Record<string, string>` | ✅ | Map of service name → subdomain. Empty string = root domain |
118
140
  | `confPath` | `string` | | Path to write the config file. Default: `~/.traefik/traefik_conf.yaml` |
119
141
  | `host` | `string` | | Target host for proxy URLs. Default: auto-detected per platform |
@@ -155,7 +177,24 @@ devup [options]
155
177
  | `--proxy-conf /path/to/file` | Override config file path |
156
178
  | `--proxy-tls` | Enable TLS (default) |
157
179
  | `--no-proxy-tls` | Disable TLS |
158
- | `--proxy-entrypoint web` | Override entrypoint name |
180
+ | `--proxy-entrypoint web` | Override entrypoint name (Traefik-only) |
181
+
182
+ ### CI / scripting
183
+
184
+ | Flag | Description |
185
+ |---|---|
186
+ | `--dry-run` | Print the resolved boot plan (phases, commands, proxy YAML) and exit. Doesn't start any process |
187
+ | `--once` | Boot services, wait until every API is healthy, then exit `0` (or `1` on timeout). Skips the TUI — meant for CI smoke tests |
188
+ | `--once-timeout 60` | Max seconds to wait in `--once` mode. Default: `90` |
189
+
190
+ ### Log files
191
+
192
+ | Flag | Description |
193
+ |---|---|
194
+ | `--no-log-file` | Disable persistent log files |
195
+ | `--log-dir /path` | Override log root. Default: `~/.devup/logs/<project>/<service>.log` |
196
+
197
+ devup writes a separate `.log` file per service to disk. Lines are prefixed with an ISO timestamp. On each fresh launch the previous file is rotated to `<service>.log.prev`, so you always have at most two runs of history per service.
159
198
 
160
199
  ## TUI keybindings
161
200
 
@@ -163,10 +202,13 @@ devup [options]
163
202
  |---|---|
164
203
  | `q` / `Ctrl+C` | Quit and stop all services |
165
204
  | `Tab` | Switch focus between Logs and Stats panels |
205
+ | `↑` / `↓` | Scroll the focused panel by 1 line/row |
206
+ | `[` / `]` (or `Ctrl+B` / `Ctrl+F`) | Page up / page down |
207
+ | `Ctrl+A` / `Ctrl+E` | Jump to top / bottom of the focused panel |
166
208
  | `f` | Filter logs by service |
167
209
  | `a` | Show all logs (clear filter) |
168
210
  | `/` | Search in logs |
169
- | `p` | Pause/resume log output |
211
+ | `p` | Pause/resume log output (auto-engaged when you scroll up) |
170
212
  | `t` | Toggle timestamps |
171
213
  | `c` | Clear logs |
172
214
  | `s` | Cycle sort mode (name → memory → errors) |
@@ -174,6 +216,8 @@ devup [options]
174
216
  | `o` | Open a web service in browser |
175
217
  | `T` | Toggle reverse proxy config sync |
176
218
 
219
+ When you scroll the Logs panel up, devup auto-pauses the log stream so new lines don't push your reading position. New lines are buffered and replay when you return to the bottom (`Ctrl+E` or scroll all the way down).
220
+
177
221
  ## Config file formats
178
222
 
179
223
  devup looks for config files in this order:
@@ -227,7 +271,7 @@ Services listed in `lazy.alwaysOn` skip the proxy and start normally.
227
271
 
228
272
  ## Reverse proxy providers
229
273
 
230
- devup generates dynamic config for reverse proxies. Currently supported:
274
+ devup generates dynamic config for reverse proxies. Three providers are built in: **Traefik**, **Nginx**, and **Caddy**. Only services with `health === 'up'` are included — flapping services are silently dropped from the generated config and re-added when they recover.
231
275
 
232
276
  ### Traefik
233
277
 
@@ -245,7 +289,39 @@ services:
245
289
  devup --proxy --proxy-host 172.17.0.1
246
290
  ```
247
291
 
248
- Adding a new provider (Nginx, Caddy, etc.) requires implementing the `ProxyConfigProvider` interface:
292
+ ### Nginx
293
+
294
+ Generates an Nginx file with one `server { }` block per healthy service. Drop it into `/etc/nginx/conf.d/` (or `include` it from your main config) and reload Nginx — devup rewrites the file in place every 3 seconds.
295
+
296
+ ```typescript
297
+ proxy: {
298
+ provider: 'nginx',
299
+ confPath: '/etc/nginx/conf.d/devup.conf',
300
+ routes: { 'app-web': '', 'api': 'api' },
301
+ }
302
+ ```
303
+
304
+ With `tls: true` (default) each block listens on `:443 ssl` and points to `/etc/nginx/certs/<server_name>.crt` and `.key`. With `tls: false` it listens on `:80`. WebSocket / HTTP-upgrade headers are forwarded by default.
305
+
306
+ > **Note:** Nginx doesn't watch files automatically — you'll need `nginx -s reload` (or `nginx-reload` sidecar) to pick up devup's updates. For a watch-and-reload workflow, prefer Traefik or Caddy.
307
+
308
+ ### Caddy
309
+
310
+ Generates a Caddyfile with one `reverse_proxy` directive per healthy service. Caddy auto-reloads its file on change (`caddy run --watch`), so devup's updates take effect without intervention.
311
+
312
+ ```typescript
313
+ proxy: {
314
+ provider: 'caddy',
315
+ confPath: '/etc/caddy/devup.Caddyfile',
316
+ routes: { 'app-web': '', 'api': 'api' },
317
+ }
318
+ ```
319
+
320
+ With `tls: true` (default) Caddy provisions TLS automatically (Let's Encrypt or local CA). With `tls: false` each site is prefixed with `http://`.
321
+
322
+ ### Adding a custom provider
323
+
324
+ Implement the `ProxyConfigProvider` interface and register it manually before calling `render(<App />)`:
249
325
 
250
326
  ```typescript
251
327
  interface ProxyConfigProvider {
@@ -323,7 +399,7 @@ git clone https://github.com/gachlab/devup.git
323
399
  cd devup
324
400
  npm install
325
401
  npm run build
326
- npm test # 112 tests, node:test native
402
+ npm test # 200 tests, node:test native
327
403
  npm run test:coverage # coverage report
328
404
  ```
329
405
 
@@ -11,6 +11,11 @@ export interface CliArgs {
11
11
  proxyConf?: string;
12
12
  proxyTls: boolean;
13
13
  proxyEntrypoint: string;
14
+ dryRun: boolean;
15
+ once: boolean;
16
+ onceTimeout: number;
17
+ logFile: boolean;
18
+ logDir?: string;
14
19
  }
15
20
  export declare function parseCliArgs(argv: string[]): CliArgs;
16
21
  export declare function filterServices(services: ServiceConfig[], args: CliArgs): ServiceConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/config/cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAA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AM,CAAC,EAAE,MAAM,CAAC;CACjB;AAKD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAyCpD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,GAAG,aAAa,EAAE,CAoBxF"}
@@ -11,6 +11,19 @@ export interface ServiceConfig {
11
11
  watchBuild?: string;
12
12
  nodeArgs?: string[];
13
13
  extraEnv?: Record<string, string>;
14
+ healthCheck?: HealthCheckConfig;
15
+ }
16
+ export interface HealthCheckConfig {
17
+ /** 'tcp' (default) checks that the port accepts connections. 'http' makes an HTTP GET. */
18
+ type: 'tcp' | 'http';
19
+ /** HTTP-only: request path. Default: '/' */
20
+ path?: string;
21
+ /** HTTP-only: acceptable status code(s). Default: 200-299 */
22
+ expect?: number | number[];
23
+ /** Override host for the HTTP check. Default: 127.0.0.1 */
24
+ host?: string;
25
+ /** Per-check socket timeout in ms. Default: 2000 */
26
+ timeoutMs?: number;
14
27
  }
15
28
  export interface LazyConfig {
16
29
  alwaysOn: string[];
@@ -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;IACf,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACn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AEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,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,CAuErF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAExE"}
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,CAoGrF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAExE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,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"}