@stacksjs/buddy 0.70.187 → 0.70.189

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.
@@ -22,6 +22,7 @@ async function loadUserModel() {
22
22
  if (User?.where)
23
23
  return User;
24
24
  log.error("Could not find a User model. Looked in app/Models, the framework defaults and @stacksjs/orm.");
25
+ await log.flush();
25
26
  process.exit(ExitCode.FatalError);
26
27
  }
27
28
  export function user(buddy) {
@@ -29,12 +30,14 @@ export function user(buddy) {
29
30
  const address = String(email || "").trim().toLowerCase();
30
31
  if (!address.includes("@")) {
31
32
  log.error(`\`${email}\` is not an email address.`);
33
+ await log.flush();
32
34
  process.exit(ExitCode.FatalError);
33
35
  }
34
36
  const password = options.password || generatePassword(), generated = !options.password, name = options.name || address.split("@")[0], User = await loadUserModel();
35
37
  let account = await User.where("email", address).first();
36
38
  if (account && !options.update) {
37
39
  log.error(`${address} already exists. Pass --update to reset its password and role.`);
40
+ await log.flush();
38
41
  process.exit(ExitCode.FatalError);
39
42
  }
40
43
  if (account) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.187",
5
+ "version": "0.70.189",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [