@dotrino/vaultd 0.195.0 → 0.195.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 +4 -0
- package/package.json +1 -1
- package/src/tui/app.js +39 -33
- package/src/tui/i18n.js +14 -6
package/README.md
CHANGED
|
@@ -449,6 +449,10 @@ dispositivos/variables que estás viendo:
|
|
|
449
449
|
valores), **agregar** una variable (con su scope) y **quitar** una variable o un
|
|
450
450
|
scope entero. Son las **compartidas**: las de UN aparato se ponen en la otra
|
|
451
451
|
pestaña, y esta lo dice en vez de repetirlas.
|
|
452
|
+
- **Contraseñas:** buscar por sitio (`Enter` o `f`, y un dominio o una URL) si hay
|
|
453
|
+
una contraseña o passkey guardada, con su usuario, y qué aparatos la abren o todavía
|
|
454
|
+
no. Solo mira: no enseña la contraseña ni cambia nada. Pide la bóveda abierta. Lo
|
|
455
|
+
mismo en la CLI: `dotrino-vault passwords find <dominio>`.
|
|
452
456
|
|
|
453
457
|
Y dentro de **Dispositivos**, con `e` sobre un servicio, sus **variables propias**:
|
|
454
458
|
las que lee solo él y le ganan a las del scope que se llamen igual. Cada cajón se
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotrino/vaultd",
|
|
3
|
-
"version": "0.195.
|
|
3
|
+
"version": "0.195.1",
|
|
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": {
|
package/src/tui/app.js
CHANGED
|
@@ -1406,15 +1406,6 @@ async function onKeyProfiles (term, st, key) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
await openBackup(term, st)
|
|
1408
1408
|
})
|
|
1409
|
-
} else if (ch === 'f' && cur) { // buscar una contraseña por sitio, con la bóveda abierta
|
|
1410
|
-
await ensureUnlocked(term, st, cur, async (p = cur) => {
|
|
1411
|
-
if (!p.current) {
|
|
1412
|
-
const r = await guard(term, st, i.switchingVault, () => vc.useProfile(p.id))
|
|
1413
|
-
if (!r.ok) return
|
|
1414
|
-
await refreshAll(term, st)
|
|
1415
|
-
}
|
|
1416
|
-
askPwFind(term, st)
|
|
1417
|
-
})
|
|
1418
1409
|
} else if (ch === 'y' && cur) { // las llaves: con qué se abre la bóveda
|
|
1419
1410
|
await ensureUnlocked(term, st, cur, async (p = cur) => {
|
|
1420
1411
|
st.doorsFor = p.id
|
|
@@ -2603,7 +2594,10 @@ function backupPlanRows (st, t) {
|
|
|
2603
2594
|
*/
|
|
2604
2595
|
function askPwFind (term, st) {
|
|
2605
2596
|
const i = L(st)
|
|
2606
|
-
|
|
2597
|
+
const p = activeProfile(st)
|
|
2598
|
+
if (!p) return
|
|
2599
|
+
// La huella del sitio sale de la llave del perfil, que solo abre la frase: bóveda abierta.
|
|
2600
|
+
return ensureUnlocked(term, st, p, () => setInput(st, {
|
|
2607
2601
|
label: i.pwFindLabel,
|
|
2608
2602
|
hint: i.pwFindHint,
|
|
2609
2603
|
onSubmit: async (q) => {
|
|
@@ -2616,9 +2610,8 @@ function askPwFind (term, st) {
|
|
|
2616
2610
|
const result = await vc.passwordsFind(query, activeId(st))
|
|
2617
2611
|
st.busy = null
|
|
2618
2612
|
st.pwFind = { query, result }
|
|
2619
|
-
st.sel.
|
|
2620
|
-
st.scroll.
|
|
2621
|
-
st.screen = 'pwfind'
|
|
2613
|
+
st.sel.passwords = 0
|
|
2614
|
+
st.scroll.passwords = { value: 0 }
|
|
2622
2615
|
} catch (e) {
|
|
2623
2616
|
st.busy = null
|
|
2624
2617
|
const msg = e?.code === 'BAD_SITE' ? i.pwFindBadSite : e?.code === 'NO_RECOVERY' ? i.pwFindNoRecovery : backupErr(e, st)
|
|
@@ -2626,13 +2619,20 @@ function askPwFind (term, st) {
|
|
|
2626
2619
|
}
|
|
2627
2620
|
},
|
|
2628
2621
|
onCancel: () => { st.input = null }
|
|
2629
|
-
})
|
|
2622
|
+
}))
|
|
2630
2623
|
}
|
|
2631
2624
|
|
|
2632
2625
|
function pwFindRows (st, t) {
|
|
2633
2626
|
const i = L(st)
|
|
2634
2627
|
const f = st.pwFind
|
|
2635
|
-
if (!f)
|
|
2628
|
+
if (!f) {
|
|
2629
|
+
return [
|
|
2630
|
+
{ text: ' ' + t.bold(i.pwFindIntro), sel: false },
|
|
2631
|
+
{ text: '', sel: false },
|
|
2632
|
+
{ text: ' ' + t.muted(i.pwFindIntroHow), sel: false },
|
|
2633
|
+
{ text: ' ' + t.muted(i.pwFindIntroSafe), sel: false }
|
|
2634
|
+
]
|
|
2635
|
+
}
|
|
2636
2636
|
const r = f.result
|
|
2637
2637
|
const rows = [{ text: ' ' + t.bold(i.pwFindFor(f.query)), sel: false }, { text: '', sel: false }]
|
|
2638
2638
|
if (!r.sealed) { rows.push({ text: ' ' + t.muted(r.entries ? i.pwFindOld : i.pwFindEmpty), sel: false }); return rows }
|
|
@@ -2663,12 +2663,11 @@ function pwFindRows (st, t) {
|
|
|
2663
2663
|
|
|
2664
2664
|
async function onKeyPwFind (term, st, key) {
|
|
2665
2665
|
const ch = key.name === 'char' ? key.ch.toLowerCase() : null
|
|
2666
|
-
if (key.name === 'escape' || ch === 'b' || !st.pwFind) { st.screen = 'profiles'; st.pwFind = null; return true }
|
|
2667
2666
|
if (['up', 'down', 'pageup', 'pagedown', 'home', 'end'].includes(key.name)) {
|
|
2668
|
-
moveSel(st, key, '
|
|
2667
|
+
moveSel(st, key, 'passwords', pwFindRows(st, makeTheme()).filter((r) => r.sel).length)
|
|
2669
2668
|
return true
|
|
2670
2669
|
}
|
|
2671
|
-
if (ch === 'f') { askPwFind(term, st); return true }
|
|
2670
|
+
if (ch === 'f' || key.name === 'enter') { await askPwFind(term, st); return true }
|
|
2672
2671
|
return true
|
|
2673
2672
|
}
|
|
2674
2673
|
|
|
@@ -2874,8 +2873,8 @@ async function onKeyBackupPlan (term, st, key) {
|
|
|
2874
2873
|
|
|
2875
2874
|
// Pestañas INTERNAS de una bóveda ya elegida: se cambian con ←→. La lista de
|
|
2876
2875
|
// bóvedas (profiles) es el nivel de arriba (se entra con Enter, no es una pestaña).
|
|
2877
|
-
const INNER_TABS = ['devices', 'secrets', 'logins', 'me']
|
|
2878
|
-
const tabLabel = (i, k) => ({ devices: i.tabDevices, secrets: i.tabSecrets, logins: i.tabLogins, me: i.tabMe })[k]
|
|
2876
|
+
const INNER_TABS = ['devices', 'secrets', 'passwords', 'logins', 'me']
|
|
2877
|
+
const tabLabel = (i, k) => ({ devices: i.tabDevices, secrets: i.tabSecrets, passwords: i.tabPasswords, logins: i.tabLogins, me: i.tabMe })[k]
|
|
2879
2878
|
|
|
2880
2879
|
/**
|
|
2881
2880
|
* Las teclas que se pueden usar AHORA, no el catálogo entero. Aprobar/rechazar sin nadie
|
|
@@ -2899,7 +2898,7 @@ const helpSegs = (i, screen, st = {}) => {
|
|
|
2899
2898
|
devvars: i.helpDevVars,
|
|
2900
2899
|
backup: i.helpBackup,
|
|
2901
2900
|
backupplan: i.helpBackupPlan,
|
|
2902
|
-
|
|
2901
|
+
passwords: i.helpPwFind
|
|
2903
2902
|
}[screen] || []
|
|
2904
2903
|
if (typeof segs !== 'function') return segs
|
|
2905
2904
|
// El aparato señalado ahora mismo: `e variables` solo tiene sentido en un servicio (es
|
|
@@ -2937,18 +2936,25 @@ const title = (i, screen) => ({
|
|
|
2937
2936
|
devvars: i.titleDevVars,
|
|
2938
2937
|
backup: i.titleBackup,
|
|
2939
2938
|
backupplan: i.titleBackupPlan,
|
|
2940
|
-
|
|
2939
|
+
passwords: i.titlePwFind
|
|
2941
2940
|
})[screen] || ''
|
|
2942
2941
|
|
|
2943
2942
|
/** Barra de pestañas horizontal (Dispositivos | Scopes y variables) de la bóveda entrada. */
|
|
2944
|
-
function renderTabs (st, t) {
|
|
2943
|
+
function renderTabs (st, t, cols = Infinity) {
|
|
2945
2944
|
const i = L(st)
|
|
2946
|
-
|
|
2945
|
+
// UN espacio entre pestañas, no tres. Y si aun así no cabe (con cinco pestañas, en 80
|
|
2946
|
+
// columnas), se aprieta: primero el relleno de las inactivas y al final un `│` entre ellas
|
|
2947
|
+
// en vez de espacios. Lo que no se puede perder es la pista de que se puede cambiar.
|
|
2948
|
+
const bar = (pad, sep, hint) => INNER_TABS.map((k) => {
|
|
2947
2949
|
const active = st.screen === k
|
|
2948
|
-
return active ? t.bold(t.accent('▐ ' + tabLabel(i, k) + ' ▌')) : t.muted(
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2950
|
+
return active ? t.bold(t.accent('▐ ' + tabLabel(i, k) + ' ▌')) : t.muted(pad + tabLabel(i, k) + pad)
|
|
2951
|
+
}).join(sep) + t.muted(hint)
|
|
2952
|
+
const tries = [[' ', ' ', i.tabsHint], [' ', ' ', i.tabsHint], ['', t.muted('│'), i.tabsHint]]
|
|
2953
|
+
for (const [pad, sep, hint] of tries) {
|
|
2954
|
+
const out = bar(pad, sep, hint)
|
|
2955
|
+
if (widthOf(out) + 2 <= cols) return out
|
|
2956
|
+
}
|
|
2957
|
+
return bar('', t.muted('│'), i.tabsHint)
|
|
2952
2958
|
}
|
|
2953
2959
|
|
|
2954
2960
|
function pairingBody (st, t, cols, height, { qr: withQr = true } = {}) {
|
|
@@ -3057,7 +3063,7 @@ function render (term, st) {
|
|
|
3057
3063
|
if (!lines[2] && st.update?.release) lines[2] = ' ' + t.warn(i.updateAvailable(st.update.release.version))
|
|
3058
3064
|
// Dispositivos/Scopes son pestañas de la bóveda activa (se entra desde Bóvedas);
|
|
3059
3065
|
// el resto muestra su título simple.
|
|
3060
|
-
lines[3] = INNER_TABS.includes(st.screen) ? ' ' + renderTabs(st, t) : ' ' + t.title('» ' + title(i, st.screen))
|
|
3066
|
+
lines[3] = INNER_TABS.includes(st.screen) ? ' ' + renderTabs(st, t, cols) : ' ' + t.title('» ' + title(i, st.screen))
|
|
3061
3067
|
lines[4] = ''
|
|
3062
3068
|
|
|
3063
3069
|
const help = helpLines(st, i, cols, rows)
|
|
@@ -3079,7 +3085,7 @@ function render (term, st) {
|
|
|
3079
3085
|
else if (st.screen === 'paircaps') body = renderList(pairCapsRows(st, t), st.sel.paircaps || 0, contentH, cols, t, scrollRef)
|
|
3080
3086
|
else if (st.screen === 'backup') body = renderList(backupRows(st, t), st.sel.backup || 0, contentH, cols, t, scrollRef)
|
|
3081
3087
|
else if (st.screen === 'backupplan') body = renderList(backupPlanRows(st, t), st.sel.backupplan || 0, contentH, cols, t, scrollRef)
|
|
3082
|
-
else if (st.screen === '
|
|
3088
|
+
else if (st.screen === 'passwords') body = renderList(pwFindRows(st, t), st.sel.passwords || 0, contentH, cols, t, scrollRef)
|
|
3083
3089
|
else if (st.screen === 'pairing') {
|
|
3084
3090
|
const pb = pairingBody(st, t, cols, contentH)
|
|
3085
3091
|
body = scrollBody(pb, contentH, scrollRef)
|
|
@@ -3125,7 +3131,7 @@ const LIST_SCREENS = {
|
|
|
3125
3131
|
paircaps: [pairCapsRows, 'paircaps'],
|
|
3126
3132
|
backup: [backupRows, 'backup'],
|
|
3127
3133
|
backupplan: [backupPlanRows, 'backupplan'],
|
|
3128
|
-
|
|
3134
|
+
passwords: [pwFindRows, 'passwords']
|
|
3129
3135
|
}
|
|
3130
3136
|
|
|
3131
3137
|
/**
|
|
@@ -3398,7 +3404,7 @@ export async function handleKey (term, st, key) {
|
|
|
3398
3404
|
// entrada). La pantalla de emparejamiento maneja su propio Esc (va a Dispositivos).
|
|
3399
3405
|
if ((key.name === 'escape' || ch === 'b') && INNER_TABS.includes(st.screen)) {
|
|
3400
3406
|
// El borrador es de ESTA bóveda: al salir de ella se guarda o se tira.
|
|
3401
|
-
unlessDrafts(st, () => { st.capsDrafts = {}; st.cnDrafts = {}; st.screen = 'profiles' })
|
|
3407
|
+
unlessDrafts(st, () => { st.capsDrafts = {}; st.cnDrafts = {}; st.pwFind = null; st.screen = 'profiles' })
|
|
3402
3408
|
return true
|
|
3403
3409
|
}
|
|
3404
3410
|
|
|
@@ -3415,7 +3421,7 @@ export async function handleKey (term, st, key) {
|
|
|
3415
3421
|
if (st.screen === 'paircaps') return onKeyPairCaps(term, st, key)
|
|
3416
3422
|
if (st.screen === 'backup') return onKeyBackup(term, st, key)
|
|
3417
3423
|
if (st.screen === 'backupplan') return onKeyBackupPlan(term, st, key)
|
|
3418
|
-
if (st.screen === '
|
|
3424
|
+
if (st.screen === 'passwords') return onKeyPwFind(term, st, key)
|
|
3419
3425
|
if (st.screen === 'pairing') return onKeyPairing(term, st, key)
|
|
3420
3426
|
if (st.screen === 'join') return onKeyJoin(term, st, key)
|
|
3421
3427
|
return true
|
package/src/tui/i18n.js
CHANGED
|
@@ -402,9 +402,13 @@ const es = {
|
|
|
402
402
|
// variables de UN aparato (Dispositivos → tecla e). Las del scope las comparten todos
|
|
403
403
|
// los aparatos que sirven ese namespace; estas las lee solo él, y le ganan.
|
|
404
404
|
titleDevVars: 'Variables del dispositivo',
|
|
405
|
-
// BUSCAR UNA CONTRASEÑA POR SITIO (
|
|
405
|
+
// BUSCAR UNA CONTRASEÑA POR SITIO (pestaña Contraseñas de la bóveda). Solo lee.
|
|
406
406
|
titlePwFind: 'Buscar contraseña',
|
|
407
|
-
|
|
407
|
+
tabPasswords: 'Contraseñas',
|
|
408
|
+
helpPwFind: ['←→ pestaña', 'f buscar', '↑↓', 'Esc bóvedas', 'l English', 'q salir'],
|
|
409
|
+
pwFindIntro: 'Buscar una contraseña o passkey por sitio',
|
|
410
|
+
pwFindIntroHow: 'Pulsa Enter o f y escribe un dominio (ejemplo.com) o una URL: verás si hay algo guardado y qué aparatos lo tienen.',
|
|
411
|
+
pwFindIntroSafe: 'Solo mira: no enseña la contraseña ni cambia nada.',
|
|
408
412
|
pwFindLabel: 'Sitio a buscar',
|
|
409
413
|
pwFindHint: 'un dominio (ejemplo.com) o una URL',
|
|
410
414
|
pwFinding: 'buscando…',
|
|
@@ -549,7 +553,7 @@ const es = {
|
|
|
549
553
|
// INGLÉS: new/rename/delete/password/unlock/locK/pair/approve/revoke/refresh/
|
|
550
554
|
// language/quit); lo único que se traduce es la palabra que las explica.
|
|
551
555
|
// Segmentos, no una línea: si no caben en una, el render los reparte en varias.
|
|
552
|
-
helpProfiles: ['↑↓', 'Enter entrar', 'p emparejar', 'j unirse', 'n nueva', 'r renombrar', 'd borrar', 'c clave', 'x quitar-clave', 'y llaves', 'o respaldo', '
|
|
556
|
+
helpProfiles: ['↑↓', 'Enter entrar', 'p emparejar', 'j unirse', 'n nueva', 'r renombrar', 'd borrar', 'c clave', 'x quitar-clave', 'y llaves', 'o respaldo', 'u desbloq', 'k bloquear', 's ajustes', 'l English', 'q salir'],
|
|
553
557
|
// La barra dice lo que se PUEDE hacer AHORA, no todo lo que existe: aprobar/rechazar solo
|
|
554
558
|
// valen si hay alguien esperando, y renombrar/revocar solo si hay un aparato seleccionado.
|
|
555
559
|
// Anunciar teclas muertas confunde y además las quema para otros usos.
|
|
@@ -972,9 +976,13 @@ const en = {
|
|
|
972
976
|
|
|
973
977
|
// variables de UN aparato (Dispositivos → tecla e)
|
|
974
978
|
titleDevVars: 'Device variables',
|
|
975
|
-
// FIND A PASSWORD BY SITE (
|
|
979
|
+
// FIND A PASSWORD BY SITE (Passwords tab of the vault). Read-only.
|
|
976
980
|
titlePwFind: 'Find a password',
|
|
977
|
-
|
|
981
|
+
tabPasswords: 'Passwords',
|
|
982
|
+
helpPwFind: ['←→ tab', 'f search', '↑↓', 'Esc vaults', 'l Español', 'q quit'],
|
|
983
|
+
pwFindIntro: 'Find a password or passkey by site',
|
|
984
|
+
pwFindIntroHow: 'Press Enter or f and type a domain (example.com) or a URL: you will see whether something is saved and which devices have it.',
|
|
985
|
+
pwFindIntroSafe: 'It only looks: it does not show the password or change anything.',
|
|
978
986
|
pwFindLabel: 'Site to look for',
|
|
979
987
|
pwFindHint: 'a domain (example.com) or a URL',
|
|
980
988
|
pwFinding: 'searching…',
|
|
@@ -1109,7 +1117,7 @@ const en = {
|
|
|
1109
1117
|
helpInput: 'Enter confirm · Esc cancel · Ctrl-U clear',
|
|
1110
1118
|
helpConfirm: 'y confirm · n/Esc cancel',
|
|
1111
1119
|
|
|
1112
|
-
helpProfiles: ['↑↓', 'Enter open', 'p pair', 'j join', 'n new', 'r rename', 'd delete', 'c password', 'x drop-password', 'y keys', 'o backup', '
|
|
1120
|
+
helpProfiles: ['↑↓', 'Enter open', 'p pair', 'j join', 'n new', 'r rename', 'd delete', 'c password', 'x drop-password', 'y keys', 'o backup', 'u unlock', 'k lock', 's settings', 'l Español', 'q quit'],
|
|
1113
1121
|
helpDevices: ({ pending, hasDevices, isService, drafts, curBlocked } = {}) => [
|
|
1114
1122
|
'←→ tab', '↑↓', 'p pair',
|
|
1115
1123
|
...(drafts ? ['g save permissions'] : []),
|