@theholocron/cli 5.0.0-alpha.365 → 5.0.0-alpha.366
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/dist/cli.mjs +3 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +5 -0
- package/package.json +9 -9
package/dist/cli.mjs
CHANGED
|
@@ -1533,10 +1533,11 @@ async function checkToken(token, module, env, readToken, now) {
|
|
|
1533
1533
|
const stored = fromEnv ? void 0 : findCredential(...vendorEnvName ? [envName, vendorEnvName] : [envName]);
|
|
1534
1534
|
const value = fromEnv ? env.get(fromEnv) : stored?.value ?? readToken(keyringKey);
|
|
1535
1535
|
if (!value) return row$8(keyringKey, "skip", `not set (${vendorEnvName ? `${envName} / ${vendorEnvName}` : envName}, or \`holocron auth set ${keyringKey}\`)`);
|
|
1536
|
-
|
|
1536
|
+
const verify = token.verify ?? (token.verifiable === false ? void 0 : module.verifyToken);
|
|
1537
|
+
if (!verify) return row$8(keyringKey, "skip", "set, but its plugin cannot verify it");
|
|
1537
1538
|
const from = fromEnv ?? stored?.source ?? "keyring";
|
|
1538
1539
|
try {
|
|
1539
|
-
const verified = await
|
|
1540
|
+
const verified = await verify(value);
|
|
1540
1541
|
if (!verified.ok) return row$8(keyringKey, "fail", `rejected (${from}): ${verified.message}`);
|
|
1541
1542
|
const expiry = verified.expiresAt ? describeExpiry(verified.expiresAt, now) : void 0;
|
|
1542
1543
|
if (!expiry) return row$8(keyringKey, "ok", `${verified.subject} (${from})`);
|