motebit 0.6.1 → 0.6.3
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/index.js +19 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5315,7 +5315,7 @@ var init_config2 = __esm({
|
|
|
5315
5315
|
"src/config.ts"() {
|
|
5316
5316
|
"use strict";
|
|
5317
5317
|
init_esm_shims();
|
|
5318
|
-
VERSION = true ? "0.6.
|
|
5318
|
+
VERSION = true ? "0.6.3" : "0.0.0-dev";
|
|
5319
5319
|
CONFIG_DIR = path2.join(os.homedir(), ".motebit");
|
|
5320
5320
|
CONFIG_PATH = path2.join(CONFIG_DIR, "config.json");
|
|
5321
5321
|
}
|
|
@@ -29267,14 +29267,18 @@ async function main() {
|
|
|
29267
29267
|
const envPassphrase = process.env["MOTEBIT_PASSPHRASE"];
|
|
29268
29268
|
let passphrase;
|
|
29269
29269
|
if (fullConfig.cli_encrypted_key) {
|
|
29270
|
-
passphrase = envPassphrase ?? await promptPassphrase("Passphrase: ");
|
|
29270
|
+
passphrase = envPassphrase ?? await promptPassphrase(" Passphrase: ");
|
|
29271
29271
|
try {
|
|
29272
29272
|
await decryptPrivateKey(fullConfig.cli_encrypted_key, passphrase);
|
|
29273
29273
|
} catch {
|
|
29274
|
-
console.
|
|
29275
|
-
console.
|
|
29276
|
-
|
|
29277
|
-
);
|
|
29274
|
+
console.log();
|
|
29275
|
+
console.log(` ${dim("\u2500")} ${bold("Incorrect passphrase.")}`);
|
|
29276
|
+
console.log();
|
|
29277
|
+
console.log(` ${dim("Try again, or reset your identity:")}`);
|
|
29278
|
+
console.log();
|
|
29279
|
+
console.log(` ${dim("rm ~/.motebit/config.json")}`);
|
|
29280
|
+
console.log(` ${dim("motebit")}`);
|
|
29281
|
+
console.log();
|
|
29278
29282
|
process.exit(1);
|
|
29279
29283
|
}
|
|
29280
29284
|
} else if (fullConfig.cli_private_key != null && fullConfig.cli_private_key !== "") {
|
|
@@ -29290,9 +29294,16 @@ async function main() {
|
|
|
29290
29294
|
saveFullConfig2(fullConfig);
|
|
29291
29295
|
console.log("Private key encrypted and plaintext removed.");
|
|
29292
29296
|
} else {
|
|
29293
|
-
|
|
29297
|
+
console.log();
|
|
29298
|
+
console.log(` ${dim("\u2500")} ${bold("motebit")}${dim(" is creating your identity")}`);
|
|
29299
|
+
console.log();
|
|
29300
|
+
console.log(` ${dim("Your mote gets its own Ed25519 keypair \u2014 a cryptographic")}`);
|
|
29301
|
+
console.log(` ${dim("identity that signs everything it does. The passphrase")}`);
|
|
29302
|
+
console.log(` ${dim("encrypts this key on disk. You'll need it each session.")}`);
|
|
29303
|
+
console.log();
|
|
29304
|
+
passphrase = envPassphrase ?? await promptPassphrase(" Set a passphrase: ");
|
|
29294
29305
|
if (!passphrase) {
|
|
29295
|
-
console.error("Error: passphrase cannot be empty.");
|
|
29306
|
+
console.error(" Error: passphrase cannot be empty.");
|
|
29296
29307
|
process.exit(1);
|
|
29297
29308
|
}
|
|
29298
29309
|
}
|