mimi-seed 0.25.0 → 0.25.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.
|
@@ -349,14 +349,26 @@ var R = catalog(
|
|
|
349
349
|
missingTool: (cmd) => `${cmd} \uBA85\uB839\uC774 \uC5C6\uC74C`,
|
|
350
350
|
timeout: (cmd) => `${cmd} \uC751\uB2F5 \uC5C6\uC74C(\uC2DC\uAC04 \uCD08\uACFC)`,
|
|
351
351
|
badKey: "\uC800\uC7A5\uB41C \uD0A4\uC758 \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC74C",
|
|
352
|
-
noBackend: (platform) => `\uC774 OS(${platform})\uC5D0\uB294 \uC9C0\uC6D0\uD558\uB294 \uD0A4 \uC800\uC7A5\uC18C\uAC00 \uC5C6\uC74C
|
|
352
|
+
noBackend: (platform) => `\uC774 OS(${platform})\uC5D0\uB294 \uC9C0\uC6D0\uD558\uB294 \uD0A4 \uC800\uC7A5\uC18C\uAC00 \uC5C6\uC74C`,
|
|
353
|
+
lockedRemote: (keychain) => `\uB85C\uADF8\uC778 \uD0A4\uCCB4\uC778\uC774 \uC7A0\uACA8 \uC788\uC74C \u2014 SSH\xB7\uC6D0\uACA9 \uC138\uC158(VS Code Remote-SSH \uD3EC\uD568)\uC5D0\uC11C\uB294 \uD654\uBA74 \uC138\uC158\uACFC \uB530\uB85C \uC7A0\uAE30\uACE0 \uD655\uC778 \uCC3D\uB3C4 \uB728\uC9C0 \uC54A\uB294\uB2E4. \`security unlock-keychain ${keychain}\` \uB85C \uC774 \uC138\uC158\uC5D0\uC11C \uD480\uAC70\uB098, \uC8FC\uB85C \uC6D0\uACA9\uC73C\uB85C \uC4F0\uB294 \uCEF4\uD4E8\uD130\uB77C\uBA74 \`mimi-seed credentials mode file\``,
|
|
354
|
+
lockedLocal: "\uB85C\uADF8\uC778 \uD0A4\uCCB4\uC778\uC774 \uC7A0\uACA8 \uC788\uC74C \u2014 \uD0A4\uCCB4\uC778 \uC811\uADFC(Keychain Access)\uC5D0\uC11C \uC7A0\uAE08\uC744 \uD574\uC81C\uD558\uC138\uC694",
|
|
355
|
+
wrongPassword: "\uB85C\uADF8\uC778 \uD0A4\uCCB4\uC778 \uBE44\uBC00\uBC88\uD638\uAC00 \uB9DE\uC9C0 \uC54A\uC74C(\uB85C\uADF8\uC778 \uBE44\uBC00\uBC88\uD638\uC640 \uC5B4\uAE0B\uB0AC\uC744 \uC218 \uC788\uC74C)",
|
|
356
|
+
noKeychain: "\uAE30\uBCF8 \uD0A4\uCCB4\uC778\uC774 \uC5C6\uAC70\uB098 \uCC3E\uC744 \uC218 \uC5C6\uC74C",
|
|
357
|
+
cancelled: "\uD0A4\uCCB4\uC778 \uD655\uC778 \uCC3D\uC5D0\uC11C \uCDE8\uC18C\uB428",
|
|
358
|
+
waiting: "\uD0A4\uCCB4\uC778 \uD655\uC778 \uCC3D\uC774 \uC751\uB2F5\uC744 \uAE30\uB2E4\uB9AC\uB2E4 \uC2DC\uAC04\uC774 \uCD08\uACFC\uB428"
|
|
353
359
|
},
|
|
354
360
|
{
|
|
355
361
|
exit: (cmd, status) => `${cmd} exited with status ${status}`,
|
|
356
362
|
missingTool: (cmd) => `${cmd} is not installed`,
|
|
357
363
|
timeout: (cmd) => `${cmd} did not respond (timed out)`,
|
|
358
364
|
badKey: "the stored key is not in the expected format",
|
|
359
|
-
noBackend: (platform) => `no supported key store on this OS (${platform})
|
|
365
|
+
noBackend: (platform) => `no supported key store on this OS (${platform})`,
|
|
366
|
+
lockedRemote: (keychain) => `the login keychain is locked \u2014 an SSH or remote session (including VS Code Remote-SSH) has its own lock and cannot show the unlock dialog. Run \`security unlock-keychain ${keychain}\` to unlock it for this session, or use \`mimi-seed credentials mode file\` on a machine you mostly use remotely`,
|
|
367
|
+
lockedLocal: "the login keychain is locked \u2014 unlock it in Keychain Access",
|
|
368
|
+
wrongPassword: "the login keychain password is wrong (it may be out of sync with the login password)",
|
|
369
|
+
noKeychain: "there is no default keychain, or it cannot be found",
|
|
370
|
+
cancelled: "the keychain dialog was cancelled",
|
|
371
|
+
waiting: "timed out waiting for the keychain dialog"
|
|
360
372
|
}
|
|
361
373
|
);
|
|
362
374
|
var SPAWN_TIMEOUT_MS = 2e4;
|
|
@@ -380,13 +392,42 @@ function decodeKey(text, backend) {
|
|
|
380
392
|
const key = Buffer.from(text.trim(), "base64");
|
|
381
393
|
return key.length === DATA_KEY_BYTES ? { state: "ok", key, backend } : { state: "unavailable", backend, reason: R().badKey };
|
|
382
394
|
}
|
|
383
|
-
function
|
|
395
|
+
function errorCode(result) {
|
|
396
|
+
const error = result.error;
|
|
397
|
+
return error?.code;
|
|
398
|
+
}
|
|
399
|
+
function macosLoginKeychain(home = os2.homedir()) {
|
|
400
|
+
return path2.join(home, "Library", "Keychains", "login.keychain-db");
|
|
401
|
+
}
|
|
402
|
+
function isRemoteSession() {
|
|
403
|
+
if (process.env.SSH_CONNECTION || process.env.SSH_TTY || process.env.SSH_CLIENT) return true;
|
|
404
|
+
const manager = run("/bin/launchctl", ["managername"]);
|
|
405
|
+
return manager.status === 0 && manager.stdout.trim() !== "Aqua";
|
|
406
|
+
}
|
|
407
|
+
function macosFailure(status, keychain) {
|
|
384
408
|
const backend = "macOS Keychain";
|
|
385
|
-
|
|
409
|
+
switch (status) {
|
|
410
|
+
case 36:
|
|
411
|
+
return { state: "unavailable", backend, locked: true, reason: isRemoteSession() ? R().lockedRemote(keychain) : R().lockedLocal };
|
|
412
|
+
case 51:
|
|
413
|
+
return { state: "unavailable", backend, reason: R().wrongPassword };
|
|
414
|
+
case 37:
|
|
415
|
+
case 50:
|
|
416
|
+
return { state: "unavailable", backend, reason: R().noKeychain };
|
|
417
|
+
case 128:
|
|
418
|
+
return { state: "unavailable", backend, reason: R().cancelled };
|
|
419
|
+
default:
|
|
420
|
+
return { state: "unavailable", backend, reason: R().exit("security", String(status)) };
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
function macosLookup(home = os2.homedir()) {
|
|
424
|
+
const backend = "macOS Keychain";
|
|
425
|
+
const keychain = macosLoginKeychain(home);
|
|
426
|
+
const result = run("/usr/bin/security", ["find-generic-password", "-s", KEYCHAIN_SERVICE, "-a", KEYCHAIN_ACCOUNT, "-w", keychain]);
|
|
386
427
|
const problem = spawnProblem("security", result);
|
|
387
|
-
if (problem) return { state: "unavailable", backend, reason: problem };
|
|
428
|
+
if (problem) return { state: "unavailable", backend, reason: errorCode(result) === "ETIMEDOUT" ? R().waiting : problem };
|
|
388
429
|
if (result.status === 44) return { state: "absent", backend };
|
|
389
|
-
if (result.status !== 0) return
|
|
430
|
+
if (result.status !== 0) return macosFailure(result.status, keychain);
|
|
390
431
|
return decodeKey(result.stdout, backend);
|
|
391
432
|
}
|
|
392
433
|
var DPAPI_UNPROTECT = [
|
|
@@ -420,18 +461,20 @@ function linuxLookup() {
|
|
|
420
461
|
if (result.status !== 0) return { state: "unavailable", backend, reason: R().exit("secret-tool", String(result.status)) };
|
|
421
462
|
return decodeKey(result.stdout, backend);
|
|
422
463
|
}
|
|
423
|
-
function macosCreate() {
|
|
464
|
+
function macosCreate(home = os2.homedir()) {
|
|
465
|
+
const keychain = macosLoginKeychain(home);
|
|
466
|
+
const target = /^[^\s"'\\]+$/.test(keychain) ? ` ${keychain}` : "";
|
|
424
467
|
const key = randomBytes2(DATA_KEY_BYTES).toString("base64");
|
|
425
|
-
const command = `add-generic-password -s ${KEYCHAIN_SERVICE} -a ${KEYCHAIN_ACCOUNT} -w ${key}
|
|
468
|
+
const command = `add-generic-password -s ${KEYCHAIN_SERVICE} -a ${KEYCHAIN_ACCOUNT} -w ${key}${target}
|
|
426
469
|
`;
|
|
427
470
|
const result = run("/usr/bin/security", ["-i"], command);
|
|
428
471
|
const problem = spawnProblem("security", result);
|
|
429
|
-
if (problem)
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
return { state: "unavailable", backend: "macOS Keychain", reason: R().exit("security", String(result.status)) };
|
|
472
|
+
if (problem) {
|
|
473
|
+
const timedOut = errorCode(result) === "ETIMEDOUT";
|
|
474
|
+
return { state: "unavailable", backend: "macOS Keychain", reason: timedOut ? R().waiting : problem };
|
|
433
475
|
}
|
|
434
|
-
return
|
|
476
|
+
if (result.status !== 0 && result.status !== 45) return macosFailure(result.status, keychain);
|
|
477
|
+
return macosLookup(home);
|
|
435
478
|
}
|
|
436
479
|
var DPAPI_PROTECT = DPAPI_UNPROTECT.replace("::Unprotect(", "::Protect(");
|
|
437
480
|
function windowsCreate(home) {
|
|
@@ -502,13 +545,13 @@ function linuxCreate(home) {
|
|
|
502
545
|
}
|
|
503
546
|
}
|
|
504
547
|
function osCreateDataKey(home = os2.homedir(), platform = process.platform) {
|
|
505
|
-
if (platform === "darwin") return macosCreate();
|
|
548
|
+
if (platform === "darwin") return macosCreate(home);
|
|
506
549
|
if (platform === "win32") return windowsCreate(home);
|
|
507
550
|
if (platform === "linux") return linuxCreate(home);
|
|
508
551
|
return { state: "unavailable", backend: platform, reason: R().noBackend(platform) };
|
|
509
552
|
}
|
|
510
553
|
function osDataKeySource(home = os2.homedir(), platform = process.platform) {
|
|
511
|
-
if (platform === "darwin") return macosLookup();
|
|
554
|
+
if (platform === "darwin") return macosLookup(home);
|
|
512
555
|
if (platform === "win32") return windowsLookup(home);
|
|
513
556
|
if (platform === "linux") return linuxLookup();
|
|
514
557
|
return { state: "unavailable", backend: platform, reason: R().noBackend(platform) };
|
|
@@ -540,6 +583,9 @@ function obtainDataKey() {
|
|
|
540
583
|
}
|
|
541
584
|
return made;
|
|
542
585
|
}
|
|
586
|
+
function forgetFailedDataKeyLookup() {
|
|
587
|
+
failed = void 0;
|
|
588
|
+
}
|
|
543
589
|
|
|
544
590
|
// ../core/src/credential-read.ts
|
|
545
591
|
var R2 = catalog(
|
|
@@ -1367,7 +1413,7 @@ import path7 from "path";
|
|
|
1367
1413
|
import { fileURLToPath } from "url";
|
|
1368
1414
|
|
|
1369
1415
|
// package.json
|
|
1370
|
-
var version = "0.25.
|
|
1416
|
+
var version = "0.25.1";
|
|
1371
1417
|
|
|
1372
1418
|
// src/lib/windows-path.ts
|
|
1373
1419
|
import path6 from "path";
|
|
@@ -3611,8 +3657,10 @@ export {
|
|
|
3611
3657
|
isLang,
|
|
3612
3658
|
resolveLang,
|
|
3613
3659
|
catalog,
|
|
3660
|
+
macosLoginKeychain,
|
|
3614
3661
|
lookupDataKey,
|
|
3615
3662
|
obtainDataKey,
|
|
3663
|
+
forgetFailedDataKeyLookup,
|
|
3616
3664
|
CREDENTIAL_STORE_ENV,
|
|
3617
3665
|
isCredentialStoreMode,
|
|
3618
3666
|
credentialStoreReport,
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
detectHints,
|
|
21
21
|
fetchWithTimeout,
|
|
22
22
|
findProjectLink,
|
|
23
|
+
forgetFailedDataKeyLookup,
|
|
23
24
|
getEffectiveConfig,
|
|
24
25
|
hasAnyProjectSignal,
|
|
25
26
|
isCredentialStoreMode,
|
|
@@ -28,6 +29,7 @@ import {
|
|
|
28
29
|
linkProject,
|
|
29
30
|
lookupDataKey,
|
|
30
31
|
lookupProjectManifest,
|
|
32
|
+
macosLoginKeychain,
|
|
31
33
|
manifestServiceEntries,
|
|
32
34
|
migrateLegacyJenkins,
|
|
33
35
|
obtainDataKey,
|
|
@@ -43,7 +45,7 @@ import {
|
|
|
43
45
|
writeConfig,
|
|
44
46
|
writeCredentialFile,
|
|
45
47
|
writeSettings
|
|
46
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VDPT3HBY.js";
|
|
47
49
|
|
|
48
50
|
// src/index.ts
|
|
49
51
|
import kleur12 from "kleur";
|
|
@@ -297,7 +299,7 @@ async function cmdAuth(args) {
|
|
|
297
299
|
if (sub === "threads") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["threads", ...rest]));
|
|
298
300
|
if (sub === "tiktok") return void exitWith(await runMcpBin("mimi-seed-tiktok-business-auth", rest));
|
|
299
301
|
if (sub === "ci") {
|
|
300
|
-
const { cmdSetup: cmdSetup2 } = await import("./setup-
|
|
302
|
+
const { cmdSetup: cmdSetup2 } = await import("./setup-CCB43UTW.js");
|
|
301
303
|
await cmdSetup2(["--only", "github,gitlab", "--reconnect", "github,gitlab"]);
|
|
302
304
|
return;
|
|
303
305
|
}
|
|
@@ -5563,6 +5565,8 @@ import fs12 from "fs";
|
|
|
5563
5565
|
import os3 from "os";
|
|
5564
5566
|
import path15 from "path";
|
|
5565
5567
|
import kleur10 from "kleur";
|
|
5568
|
+
import { spawnSync } from "child_process";
|
|
5569
|
+
import { createInterface as createInterface3 } from "readline/promises";
|
|
5566
5570
|
|
|
5567
5571
|
// src/help.ts
|
|
5568
5572
|
import kleur9 from "kleur";
|
|
@@ -5904,6 +5908,8 @@ var M10 = catalog(
|
|
|
5904
5908
|
pinned: (where, version2) => `${where} \uC5D0 Mimi Seed MCP \uC11C\uBC84\uAC00 ${version2} \uC73C\uB85C \uACE0\uC815\uB3FC \uC788\uC2B5\uB2C8\uB2E4. \uADF8 \uBC84\uC804\uC740 \uC554\uD638\uD654\uB41C \uC790\uACA9\uC99D\uBA85\uC744 \uC77D\uC9C0 \uBABB\uD569\uB2C8\uB2E4 \u2014 @latest \uB85C \uBC14\uAFB8\uAC70\uB098 0.24.0 \uBCF4\uB2E4 \uB192\uC740 \uBC84\uC804\uC73C\uB85C \uC62C\uB9B0 \uB4A4 \uB2E4\uC2DC \uC2E4\uD589\uD558\uC138\uC694 (\uBB34\uC2DC\uD558\uB824\uBA74 --force).`,
|
|
5905
5909
|
envOverrides: (env, value) => `\uC8FC\uC758: ${env}=${value} \uAC00 \uC124\uC815\uB3FC \uC788\uC5B4 \uADF8 \uAC12\uC774 \uC774 \uC124\uC815\uBCF4\uB2E4 \uC6B0\uC120\uD569\uB2C8\uB2E4. \uBC14\uAFBC \uBAA8\uB4DC\uB97C \uC4F0\uB824\uBA74 \uD658\uACBD \uBCC0\uC218\uB97C \uC9C0\uC6B0\uC138\uC694.`,
|
|
5906
5910
|
storeNeeded: (backend, why) => `${backend}\uC5D0 \uB2FF\uC9C0 \uBABB\uD574 \uC554\uD638\uD654\uB97C \uCF24 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${why}`,
|
|
5911
|
+
unlockAsk: "\uB85C\uADF8\uC778 \uD0A4\uCCB4\uC778\uC774 \uC7A0\uACA8 \uC788\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08 \uC7A0\uAE08\uC744 \uD574\uC81C\uD560\uAE4C\uC694? \uD0A4\uCCB4\uC778 \uBE44\uBC00\uBC88\uD638(\uBCF4\uD1B5 \uB85C\uADF8\uC778 \uBE44\uBC00\uBC88\uD638)\uB97C \uBB3B\uC2B5\uB2C8\uB2E4. (y/N) ",
|
|
5912
|
+
autoPending: (why) => `\uC9C0\uAE08\uC740 \uD0A4 \uC800\uC7A5\uC18C\uC5D0 \uB2FF\uC9C0 \uBABB\uD574(${why}) \uD0A4 \uC800\uC7A5\uC18C\uAC00 \uC900\uBE44\uB420 \uB54C\uAE4C\uC9C0 \uD3C9\uBB38\uC73C\uB85C \uC800\uC7A5\uB429\uB2C8\uB2E4.`,
|
|
5907
5913
|
modeSaved: (mode) => `\uC800\uC7A5 \uBAA8\uB4DC\uB97C ${mode}(\uC73C)\uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4. \uC55E\uC73C\uB85C \uC4F0\uB294 \uC790\uACA9\uC99D\uBA85\uC5D0 \uC801\uC6A9\uB429\uB2C8\uB2E4.`,
|
|
5908
5914
|
modeFileNote: "\uC774\uBBF8 \uC554\uD638\uD654\uB41C \uD30C\uC77C\uC740 \uADF8\uB300\uB85C \uB0A8\uACE0, \uD0A4\uAC00 \uC788\uB294 \uD55C \uACC4\uC18D \uC77D\uD799\uB2C8\uB2E4. \uD3C9\uBB38\uC73C\uB85C \uB418\uB3CC\uB9AC\uB824\uBA74: mimi-seed credentials decrypt",
|
|
5909
5915
|
encryptNeedsMode: "\uBA3C\uC800 \uC554\uD638\uD654 \uBAA8\uB4DC\uB97C \uCF1C\uC138\uC694: mimi-seed credentials mode keychain (\uB610\uB294 auto)",
|
|
@@ -5931,6 +5937,8 @@ var M10 = catalog(
|
|
|
5931
5937
|
pinned: (where, version2) => `${where} pins the Mimi Seed MCP server to ${version2}, which cannot read encrypted credentials. Change it to @latest or a version newer than 0.24.0, then run this again (--force to ignore).`,
|
|
5932
5938
|
envOverrides: (env, value) => `Note: ${env}=${value} is set and wins over this setting. Unset it to use the mode you just chose.`,
|
|
5933
5939
|
storeNeeded: (backend, why) => `Cannot turn on encryption: ${backend} could not be reached: ${why}`,
|
|
5940
|
+
unlockAsk: "The login keychain is locked. Unlock it now? You will be asked for the keychain password (usually your login password). (y/N) ",
|
|
5941
|
+
autoPending: (why) => `The key store can't be reached right now (${why}), so credentials stay plaintext until it is.`,
|
|
5934
5942
|
modeSaved: (mode) => `Storage mode set to ${mode}. It applies to credentials saved from now on.`,
|
|
5935
5943
|
modeFileNote: "Files already encrypted stay encrypted and keep working while the key exists. To turn them back into plaintext: mimi-seed credentials decrypt",
|
|
5936
5944
|
encryptNeedsMode: "Turn on an encrypting mode first: mimi-seed credentials mode keychain (or auto)",
|
|
@@ -5997,30 +6005,44 @@ function fail(message) {
|
|
|
5997
6005
|
log4(kleur10.red(message));
|
|
5998
6006
|
process.exit(1);
|
|
5999
6007
|
}
|
|
6000
|
-
function
|
|
6008
|
+
async function obtainKeyInteractively() {
|
|
6009
|
+
const key = obtainDataKey();
|
|
6010
|
+
if (key.state !== "unavailable" || !key.locked || process.platform !== "darwin" || !process.stdin.isTTY || !process.stdout.isTTY) {
|
|
6011
|
+
return key;
|
|
6012
|
+
}
|
|
6013
|
+
const rl = createInterface3({ input: process.stdin, output: process.stdout });
|
|
6014
|
+
const answer = (await rl.question(M10().unlockAsk)).trim().toLowerCase();
|
|
6015
|
+
rl.close();
|
|
6016
|
+
if (answer !== "y" && answer !== "yes") return key;
|
|
6017
|
+
spawnSync("/usr/bin/security", ["unlock-keychain", macosLoginKeychain()], { stdio: "inherit" });
|
|
6018
|
+
forgetFailedDataKeyLookup();
|
|
6019
|
+
return obtainDataKey();
|
|
6020
|
+
}
|
|
6021
|
+
async function setMode(value, force) {
|
|
6001
6022
|
const m = M10();
|
|
6002
6023
|
if (!isCredentialStoreMode(value)) fail(m.badMode(value ?? ""));
|
|
6024
|
+
let pending;
|
|
6003
6025
|
if (value !== "file") {
|
|
6004
6026
|
const pins = force ? [] : findOldMcpPins();
|
|
6005
6027
|
if (pins.length > 0) fail(pins.map((pin) => m.pinned(pin.where, pin.version)).join("\n"));
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
}
|
|
6028
|
+
const key = await obtainKeyInteractively();
|
|
6029
|
+
if (value === "keychain" && key.state !== "ok") fail(m.storeNeeded(key.backend, key.state === "unavailable" ? key.reason : "no key"));
|
|
6030
|
+
if (value === "auto" && key.state === "unavailable") pending = key.reason;
|
|
6010
6031
|
}
|
|
6011
6032
|
writeSettings({ credentialStore: value });
|
|
6012
6033
|
log4(kleur10.green(m.modeSaved(m.modeLabel[value])));
|
|
6034
|
+
if (pending) log4(kleur10.yellow(m.autoPending(pending)));
|
|
6013
6035
|
const env = process.env[CREDENTIAL_STORE_ENV]?.trim().toLowerCase();
|
|
6014
6036
|
if (isCredentialStoreMode(env) && env !== value) log4(kleur10.yellow(m.envOverrides(CREDENTIAL_STORE_ENV, env)));
|
|
6015
6037
|
if (value === "file") log4(kleur10.dim(m.modeFileNote));
|
|
6016
6038
|
else log4(kleur10.dim(m.plainHint));
|
|
6017
6039
|
}
|
|
6018
|
-
function convert(target) {
|
|
6040
|
+
async function convert(target) {
|
|
6019
6041
|
const m = M10();
|
|
6020
6042
|
const report = credentialStoreReport();
|
|
6021
6043
|
if (target === "encrypted") {
|
|
6022
6044
|
if (report.effective === "file") fail(m.encryptNeedsMode);
|
|
6023
|
-
const key =
|
|
6045
|
+
const key = await obtainKeyInteractively();
|
|
6024
6046
|
if (key.state !== "ok") fail(m.storeNeeded(key.backend, key.state === "unavailable" ? key.reason : "no key"));
|
|
6025
6047
|
} else if (report.effective !== "file") {
|
|
6026
6048
|
const env = process.env[CREDENTIAL_STORE_ENV]?.trim().toLowerCase();
|
|
@@ -6043,13 +6065,13 @@ async function cmdCredentials(args) {
|
|
|
6043
6065
|
printStatus();
|
|
6044
6066
|
return;
|
|
6045
6067
|
case "mode":
|
|
6046
|
-
setMode(rest.find((a) => !a.startsWith("-"))?.toLowerCase(), rest.includes("--force"));
|
|
6068
|
+
await setMode(rest.find((a) => !a.startsWith("-"))?.toLowerCase(), rest.includes("--force"));
|
|
6047
6069
|
return;
|
|
6048
6070
|
case "encrypt":
|
|
6049
|
-
convert("encrypted");
|
|
6071
|
+
await convert("encrypted");
|
|
6050
6072
|
return;
|
|
6051
6073
|
case "decrypt":
|
|
6052
|
-
convert("plaintext");
|
|
6074
|
+
await convert("plaintext");
|
|
6053
6075
|
return;
|
|
6054
6076
|
default:
|
|
6055
6077
|
printCommandHelp("credentials");
|
package/package.json
CHANGED