@dotrino/vault 0.45.0 → 0.45.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/bin/dotrino-env.js +14 -5
- package/package.json +1 -1
package/bin/dotrino-env.js
CHANGED
|
@@ -104,7 +104,11 @@ async function cmdEnroll () {
|
|
|
104
104
|
}
|
|
105
105
|
})
|
|
106
106
|
console.log('\nListo. Identidad del servicio en: %s', path.join(dir, 'service-identity.json'))
|
|
107
|
-
|
|
107
|
+
// El papel ya no vence: vale mientras el acta lo diga. Decir «vence» era describir un
|
|
108
|
+
// reloj que ya no existe, y encima REVENTABA —`new Date(undefined).toISOString()` lanza
|
|
109
|
+
// RangeError—, o sea que el comando de diagnóstico se caía justo cuando lo necesitas.
|
|
110
|
+
console.log('Certificado con scope: %s (%s)', (cert.scope || []).join(', '),
|
|
111
|
+
typeof cert.seq === 'number' ? `acta #${cert.seq}` : `del modelo viejo, vence ${new Date(cert.exp).toISOString().slice(0, 10)}`)
|
|
108
112
|
console.log('\nEn tu app: import \'@dotrino/vault/config\' (con DOTRINO_NS=%s)', ns)
|
|
109
113
|
}
|
|
110
114
|
|
|
@@ -116,10 +120,15 @@ function cmdStatus () {
|
|
|
116
120
|
}
|
|
117
121
|
for (const ns of found) {
|
|
118
122
|
const id = readServiceIdentity(serviceDir(ns))
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
const c = id?.cert
|
|
124
|
+
// El papel se describe por el ACTA a la que se ató. Uno del modelo viejo se dice tal
|
|
125
|
+
// cual, con su fecha, porque ESO sí importa: es lo único que todavía caduca, y sabrá
|
|
126
|
+
// el operador que le queda una migración por hacer.
|
|
127
|
+
const papel = typeof c?.seq === 'number'
|
|
128
|
+
? `acta #${c.seq}`
|
|
129
|
+
: (typeof c?.exp === 'number' ? `modelo viejo · vence ${new Date(c.exp).toISOString().slice(0, 10)}` : '?')
|
|
130
|
+
console.log('%s\n dir: %s\n vault: %s…\n scope: %s\n cert: %s',
|
|
131
|
+
ns, serviceDir(ns), String(id.iss).slice(0, 24), (c?.scope || []).join(', '), papel)
|
|
123
132
|
}
|
|
124
133
|
}
|
|
125
134
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotrino/vault",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.1",
|
|
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",
|