betterstart-cli 0.0.87 → 0.0.88

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.js CHANGED
@@ -27883,6 +27883,7 @@ async function runInitCommand(name, options) {
27883
27883
  }
27884
27884
  }
27885
27885
  let seedEmail;
27886
+ let seedPassword;
27886
27887
  let seedSuccess = false;
27887
27888
  let adminAccountReady = false;
27888
27889
  if (dbPushed && options.skipAdminCreation) {
@@ -27955,6 +27956,7 @@ async function runInitCommand(name, options) {
27955
27956
  }
27956
27957
  );
27957
27958
  seedEmail = credentials.email;
27959
+ seedPassword = credentials.password;
27958
27960
  const credentialPromptRows = clackPromptRows("Admin email", credentials.email) + clackPromptRows("Admin password", p24.S_PASSWORD_MASK.repeat(credentials.password.length));
27959
27961
  let rowsBelowCredentialPrompts = 0;
27960
27962
  let seedOverwriteMode = replaceExistingAdmin ? "admin" : void 0;
@@ -28096,12 +28098,10 @@ Run manually: ${pc10.cyan(betterstartExecCommand(pm, "seed"))}`,
28096
28098
  });
28097
28099
  if (!p24.isCancel(startDev) && startDev) {
28098
28100
  disposeCancelGuard();
28099
- await startManagedDevServer(
28100
- cwd,
28101
- devCmd,
28102
- adminLoginUrl,
28103
- seedSuccess && seedEmail ? seedEmail : void 0
28104
- );
28101
+ await startManagedDevServer(cwd, devCmd, adminLoginUrl, {
28102
+ email: seedSuccess && seedEmail ? seedEmail : void 0,
28103
+ password: seedSuccess && seedPassword ? seedPassword : void 0
28104
+ });
28105
28105
  return;
28106
28106
  }
28107
28107
  }
@@ -28515,7 +28515,10 @@ function stripAnsi2(value) {
28515
28515
  }
28516
28516
  function printAdminReadyNote(state) {
28517
28517
  const lines = [`Admin: ${pc10.cyan(state.adminLoginUrl)}`];
28518
- if (state.adminEmail) {
28518
+ if (state.adminEmail && state.adminPassword) {
28519
+ lines.unshift(`Password: ${pc10.cyan(state.adminPassword)}`);
28520
+ lines.unshift(`Admin user: ${pc10.cyan(state.adminEmail)}`);
28521
+ } else if (state.adminEmail) {
28519
28522
  lines.unshift(`Admin user: ${pc10.cyan(state.adminEmail)}`);
28520
28523
  }
28521
28524
  p24.note(lines.join("\n"), "Admin ready");
@@ -28581,7 +28584,7 @@ function pipeManagedDevServerStream(stream, target, state) {
28581
28584
  flushBuffer(true);
28582
28585
  });
28583
28586
  }
28584
- function startManagedDevServer(cwd, devCmd, adminLoginUrl, adminEmail) {
28587
+ function startManagedDevServer(cwd, devCmd, adminLoginUrl, adminCredentials) {
28585
28588
  return new Promise((resolve, reject) => {
28586
28589
  const [bin, ...args] = devCmd.split(" ");
28587
28590
  const child = spawn6(bin, args, {
@@ -28592,7 +28595,8 @@ function startManagedDevServer(cwd, devCmd, adminLoginUrl, adminEmail) {
28592
28595
  suppressStartup: true,
28593
28596
  readyLogged: false,
28594
28597
  adminLoginUrl,
28595
- adminEmail
28598
+ adminEmail: adminCredentials?.email,
28599
+ adminPassword: adminCredentials?.password
28596
28600
  };
28597
28601
  const forwardSignal = (signal) => {
28598
28602
  if (!child.killed) {