@dotrino/vaultd 0.7.1 → 0.7.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.
@@ -14,6 +14,22 @@
14
14
  */
15
15
  import { runDaemon } from '../src/daemon.js'
16
16
  import { qrToString } from '../src/qr.js'
17
+ import { daemonAlive } from '../src/vaultControl.js'
18
+
19
+ // `--tui` con una bóveda YA CORRIENDO en otra ventana: se engancha a ella y abre solo la
20
+ // interfaz. Antes intentaba levantar una segunda bóveda sobre los mismos datos, chocaba
21
+ // con el candado y se cerraba la ventana de golpe — que desde fuera se ve como un crash.
22
+ // Es el caso normal, no el raro: la gente deja el daemon en una consola y abre la TUI en
23
+ // otra.
24
+ if (process.argv.includes('--tui') && daemonAlive()) {
25
+ if (!process.stdout.isTTY) {
26
+ console.error('--tui necesita un terminal interactivo (TTY).')
27
+ process.exit(2)
28
+ }
29
+ const { runTui } = await import('../src/tui/app.js')
30
+ await runTui()
31
+ process.exit(0)
32
+ }
17
33
 
18
34
  const mgr = await runDaemon()
19
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotrino/vaultd",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "description": "Certificador personal de Dotrino: daemon headless que custodia la clave maestra y delega capacidades a tus dispositivos por el proxy. Tu CA propia.",
6
6
  "bin": {