abtars 0.2.0 → 0.2.1-alpha.2

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.
@@ -413,6 +413,7 @@ function collectDir(dir, prefix, out) {
413
413
  init_log_and_swallow();
414
414
  import { mkdir, readFile, writeFile } from "node:fs/promises";
415
415
  import { dirname as dirname2, join as join6 } from "node:path";
416
+ import { homedir as homedir2 } from "node:os";
416
417
  import { fileURLToPath } from "node:url";
417
418
 
418
419
  // src/components/hints.ts
@@ -974,6 +975,15 @@ async function onboard(opts) {
974
975
  await writeFile(usersPath, JSON.stringify(users, null, 2) + "\n", { mode: 384 });
975
976
  process.stdout.write(`\u2713 users.json \u2192 ${usersPath}
976
977
  `);
978
+ try {
979
+ const manifestPath2 = join6(homedir2(), ".abmind", "manifest.json");
980
+ const manifest2 = JSON.parse((await import("node:fs")).readFileSync(manifestPath2, "utf-8"));
981
+ if (manifest2.encryptionUser && manifest2.encryptionUser !== answers.userName) {
982
+ process.stdout.write(`\u26A0\uFE0F abmind encryption uses name '${manifest2.encryptionUser}' but you entered '${answers.userName}'. Backup restore will need the encryption name ('${manifest2.encryptionUser}').
983
+ `);
984
+ }
985
+ } catch {
986
+ }
977
987
  }
978
988
  if (answers.userName) {
979
989
  const abmindHome = process.env["ABMIND_HOME"] ?? join6(dirname2(paths.home), ".abmind");