@dotrino/vault 0.71.0 → 0.72.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/package.json +1 -1
- package/src/admin.js +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotrino/vault",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.0",
|
|
4
4
|
"description": "Usa ESTE dispositivo (navegador) como bóveda/CA del ecosistema Dotrino: atiende enrolamientos por el proxy y firma certificados de delegación a tus máquinas. Incluye el cliente de SERVICIO (Node): un proyecto se enrola una vez y jala sus credenciales del vault en vez del .env (`import '@dotrino/vault/config'`).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/src/admin.js
CHANGED
|
@@ -284,6 +284,12 @@ export function createAdminDesk ({
|
|
|
284
284
|
by
|
|
285
285
|
})
|
|
286
286
|
const keys = result?.keys || []
|
|
287
|
+
// EN ESPERA DE APROBACIÓN: todavía no cambió nada, así que no hay de qué avisar. El
|
|
288
|
+
// aviso sale cuando se aprueba y se escribe de verdad.
|
|
289
|
+
if (result?.pending) {
|
|
290
|
+
audit('admin.var.pending', { by, ns: toScope ? data.ns : null, id: result.pending, count: data.items.length })
|
|
291
|
+
return { ok: true, result }
|
|
292
|
+
}
|
|
287
293
|
audit('admin.var.set', { by, ns: toScope ? data.ns : null, device: toDevice ? await deviceIdOf(data.pub).catch(() => null) : null, keys })
|
|
288
294
|
await notify('vars', { by, keys, ns: toScope ? data.ns : null })
|
|
289
295
|
return { ok: true, result: result || { ok: true } }
|
|
@@ -308,6 +314,10 @@ export function createAdminDesk ({
|
|
|
308
314
|
caller: chk.device,
|
|
309
315
|
by
|
|
310
316
|
})
|
|
317
|
+
if (result?.pending) {
|
|
318
|
+
audit('admin.var.pending', { by, ns: toScope ? data.ns : null, id: result.pending, count: 1 })
|
|
319
|
+
return { ok: true, result }
|
|
320
|
+
}
|
|
311
321
|
audit('admin.var.set', { by, ns: toScope ? data.ns : null, device: toDevice ? await deviceIdOf(data.pub).catch(() => null) : null, key: data.key })
|
|
312
322
|
// Cambiar la configuración de un servicio a distancia no puede ser invisible: es
|
|
313
323
|
// la contrapartida de delegar (F3 de docs/consola-remota.md).
|