@carlos-burelo/wyrm 1.0.1 → 1.0.2
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 +40 -21
- package/package.json +1 -1
- package/vendor/wyrm.exe +0 -0
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Wyrm
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
5
|
+
Gestor de procesos escrito en Rust para Windows Server. Mantiene aplicaciones Node.js, Next.js, Astro y Express en ejecución como servicio de Windows, con detección automática de `package.json`, `.next/standalone`, Astro y pnpm/yarn/bun.
|
|
6
|
+
|
|
7
|
+
- Supervisor con `JobObjects` (`KILL_ON_JOB_CLOSE`), auto-restart y restore al arrancar.
|
|
8
|
+
- IPC por Named Pipe con protocolo `Request/Response` NDJSON.
|
|
9
|
+
- CLI: `start/stop/restart/delete/list/status/logs/daemon/top/service`.
|
|
10
|
+
- TUI con Ratatui: lista, métricas CPU/MEM, logs en vivo, filtro y acciones.
|
|
9
11
|
- Logs por app en `%ProgramData%\wyrm\logs\<name>.log`.
|
|
10
12
|
- DB SQLite en `%ProgramData%\wyrm\wyrm.db`.
|
|
11
13
|
|
|
@@ -106,12 +108,15 @@ wyrm rollback <app> # git reset al último deploy ok + restart
|
|
|
106
108
|
```
|
|
107
109
|
|
|
108
110
|
Hooks en `wyrm.json` por app: `pre_deploy` / `post_deploy` (shell `cmd /C`).
|
|
109
|
-
|
|
111
|
+
El `wyrm.json` debe estar en el `cwd` de la app (no se buscan directorios
|
|
112
|
+
padre). Historial en SQLite (`deploys`).
|
|
110
113
|
|
|
111
114
|
## API local + métricas (plano de control)
|
|
112
115
|
|
|
113
116
|
El demonio sirve `http://127.0.0.1:8379` (`WYRM_API_ADDR`, off con
|
|
114
|
-
`WYRM_NO_API=1`). Auth Bearer con token en `%ProgramData%\wyrm\token
|
|
117
|
+
`WYRM_NO_API=1`). Auth Bearer con token en `%ProgramData%\wyrm\token`
|
|
118
|
+
(el token se aplica al arrancar el demonio; tras `token --rotate`
|
|
119
|
+
reinicia el demonio o servicio):
|
|
115
120
|
|
|
116
121
|
```powershell
|
|
117
122
|
wyrm token # muestra el token
|
|
@@ -146,7 +151,7 @@ wyrm service install
|
|
|
146
151
|
wyrm service uninstall
|
|
147
152
|
```
|
|
148
153
|
|
|
149
|
-
## TUI (`wyrm top`)
|
|
154
|
+
## TUI (`wyrm top`)
|
|
150
155
|
|
|
151
156
|
Dashboard dos paneles: lista + detalle + sparklines CPU/MEM + preview logs.
|
|
152
157
|
Tabs `1/2/3` o `tab` para Dashboard / Logs / Help.
|
|
@@ -177,7 +182,7 @@ CLI (clap) ──Named Pipe NDJSON──> Daemon
|
|
|
177
182
|
│ ├─ HashMap<String, ManagedApp>
|
|
178
183
|
│ ├─ JobObject por proceso
|
|
179
184
|
│ ├─ logs a archivo (append)
|
|
180
|
-
│ └─ supervise loop cada 2s
|
|
185
|
+
│ └─ supervise loop cada 2s
|
|
181
186
|
└─ fallback DB (SQLite) si demonio off
|
|
182
187
|
|
|
183
188
|
crates/wyrm/src:
|
|
@@ -195,7 +200,7 @@ crates/wyrm/src:
|
|
|
195
200
|
tui/ state/data/actions/events/theme/views
|
|
196
201
|
```
|
|
197
202
|
|
|
198
|
-
## Límites conocidos
|
|
203
|
+
## Límites conocidos
|
|
199
204
|
|
|
200
205
|
- **ACME real sin probar E2E**: `cert issue --prod` requiere DNS público
|
|
201
206
|
apuntando al servidor + `wyrm edge` en :80. Usa `--staging` primero.
|
|
@@ -205,6 +210,13 @@ crates/wyrm/src:
|
|
|
205
210
|
CTRL+BREAK elegante queda futuro.
|
|
206
211
|
- **Policies fuera de SQLite**: viven en `wyrm.json`/payload `START`;
|
|
207
212
|
el restore tras reinicio usa defaults.
|
|
213
|
+
- **Hooks solo con `wyrm.json` en el cwd de la app**: no se buscan
|
|
214
|
+
directorios padre; con layout multi-app de raíz se ignoran en silencio.
|
|
215
|
+
- **Token en memoria**: `token --rotate` aplica al reiniciar el demonio.
|
|
216
|
+
- **Un solo demonio**: dos instancias compiten por el pipe; antes de
|
|
217
|
+
arrancar, termina restos con `taskkill /F /IM wyrm.exe`.
|
|
218
|
+
- **Reintento inmediato**: el backoff calculado no espera; el loop de 2s
|
|
219
|
+
es el único intervalo entre reintentos.
|
|
208
220
|
- **API solo loopback** (`127.0.0.1:8379`); el token vive en archivo con los
|
|
209
221
|
permisos del FS del SO.
|
|
210
222
|
- **Single-node**: un demonio por pipe, sin clustering multi-máquina.
|
|
@@ -213,31 +225,38 @@ crates/wyrm/src:
|
|
|
213
225
|
|
|
214
226
|
## Release (mantenedores)
|
|
215
227
|
|
|
216
|
-
|
|
228
|
+
El tag `vX.Y.Z` dispara CI: `cargo test` → `pnpm test:e2e` → build x64
|
|
229
|
+
release → GitHub Release con `wyrm-x86_64-pc-windows-msvc.exe` + `.sha256`.
|
|
230
|
+
CI nunca publica a npm (sin token a propósito).
|
|
217
231
|
|
|
218
232
|
```powershell
|
|
219
233
|
git tag v0.1.0
|
|
220
234
|
git push origin v0.1.0
|
|
221
235
|
```
|
|
222
236
|
|
|
223
|
-
|
|
224
|
-
`wyrm-x86_64-pc-windows-msvc.exe` + `.sha256` → sync de versión en
|
|
225
|
-
`npm/package.json` → mete el exe en `npm/vendor/` → `npm publish`.
|
|
226
|
-
El tarball es autocontenido (sin postinstall: funciona con npm/pnpm/yarn/bun).
|
|
227
|
-
|
|
228
|
-
Requisitos: secret `NPM_TOKEN` en el repo. Verificación local previa:
|
|
237
|
+
Publicación en un comando (tu único trabajo: el OAuth de npm en el navegador):
|
|
229
238
|
|
|
230
239
|
```powershell
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
npm pack --dry-run # en npm/: confirma 4 archivos, sin vendor/
|
|
240
|
+
pnpm release # auto-bump: patch sobre lo último publicado
|
|
241
|
+
pnpm release 1.0.2 # versión exacta
|
|
234
242
|
```
|
|
235
243
|
|
|
244
|
+
El script verifica sesión npm + maintainer primero (un 404 al publicar
|
|
245
|
+
casi siempre es identidad sin permiso, no versión), sincroniza
|
|
246
|
+
`Cargo.toml`/`npm/package.json`, corre unit + e2e, compila, mete el exe en
|
|
247
|
+
`npm/vendor/`, hace smoke del wrapper y del tarball, pushea `main` + tag
|
|
248
|
+
`vX.Y.Z` (CI construye el GitHub Release) y publica con `pnpm publish`.
|
|
249
|
+
Falla rápido ante cualquier error.
|
|
250
|
+
Simula sin efectos con `pnpm release --dry-run`.
|
|
251
|
+
|
|
252
|
+
El tarball es autocontenido (sin postinstall: funciona con npm/pnpm/yarn/bun).
|
|
253
|
+
|
|
236
254
|
## Desarrollo
|
|
237
255
|
|
|
238
256
|
```powershell
|
|
239
257
|
cargo check -p wyrm
|
|
240
258
|
cargo test -p wyrm
|
|
259
|
+
pnpm test:e2e # e2e fuera de .rs: tests/e2e/ (deploy, ciclo CLI, prod)
|
|
241
260
|
cargo fmt
|
|
242
261
|
cargo clippy -p wyrm
|
|
243
262
|
```
|
package/package.json
CHANGED
package/vendor/wyrm.exe
CHANGED
|
Binary file
|