@base44-preview/cli 0.0.49-pr.452.a028d51 → 0.0.49-pr.452.d405d21

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/index.js CHANGED
@@ -234683,6 +234683,21 @@ class UserError extends CLIError {
234683
234683
 
234684
234684
  class SystemError extends CLIError {
234685
234685
  }
234686
+ class AuthExpiredError extends UserError {
234687
+ code = "AUTH_EXPIRED";
234688
+ constructor(message = "Authentication has expired", options) {
234689
+ super(message, {
234690
+ hints: options?.hints ?? [
234691
+ {
234692
+ message: "Run 'base44 login' to re-authenticate",
234693
+ command: "base44 login"
234694
+ }
234695
+ ],
234696
+ cause: options?.cause
234697
+ });
234698
+ }
234699
+ }
234700
+
234686
234701
  class ConfigNotFoundError extends UserError {
234687
234702
  code = "CONFIG_NOT_FOUND";
234688
234703
  constructor(message = "No Base44 project found in this directory", options) {
@@ -243629,12 +243644,12 @@ async function waitForAuthentication(deviceCode, expiresIn, interval) {
243629
243644
  });
243630
243645
  } catch (error48) {
243631
243646
  if (error48 instanceof Error && error48.message.includes("timed out")) {
243632
- throw new Error("Authentication timed out. Please try again.");
243647
+ throw new AuthExpiredError("Authentication timed out. Please try again.");
243633
243648
  }
243634
243649
  throw error48;
243635
243650
  }
243636
243651
  if (tokenResponse === undefined) {
243637
- throw new Error("Failed to retrieve authentication token.");
243652
+ throw new InternalError("Failed to retrieve authentication token.");
243638
243653
  }
243639
243654
  return tokenResponse;
243640
243655
  }
@@ -250233,7 +250248,7 @@ async function checkSkillVersions(projectRoot) {
250233
250248
  return results.filter((r) => r !== null);
250234
250249
  }
250235
250250
  function startSkillVersionCheck(projectRoot) {
250236
- return checkSkillVersions(projectRoot).catch(() => null);
250251
+ return checkSkillVersions(projectRoot);
250237
250252
  }
250238
250253
  function formatSkillWarning(staleSkills) {
250239
250254
  const { shinyOrange } = theme.colors;
@@ -250344,8 +250359,10 @@ async function showCommandStart(fullBanner) {
250344
250359
  }
250345
250360
  }
250346
250361
  async function showCommandEnd(result, options) {
250347
- await printUpgradeNotification(options.upgradeCheck, options.distribution);
250348
- await printSkillVersionWarning(options.skillCheck);
250362
+ await Promise.all([
250363
+ printUpgradeNotification(options.upgradeCheck, options.distribution),
250364
+ printSkillVersionWarning(options.skillCheck)
250365
+ ]);
250349
250366
  Le(result.outroMessage || "");
250350
250367
  if (result.stdout) {
250351
250368
  process.stdout.write(result.stdout);
@@ -250425,7 +250442,11 @@ class Base44Command extends Command {
250425
250442
  }
250426
250443
  if (this._commandOptions.requireAppConfig) {
250427
250444
  await ensureAppConfig(this.context);
250428
- skillCheckPromise = startSkillVersionCheck(getAppConfig().projectRoot);
250445
+ const errorReporter = this.context.errorReporter;
250446
+ skillCheckPromise = startSkillVersionCheck(getAppConfig().projectRoot).catch((error48) => {
250447
+ errorReporter.captureException(error48 instanceof Error ? error48 : new Error(String(error48)));
250448
+ return null;
250449
+ });
250429
250450
  }
250430
250451
  const result = await fn(this.context, ...args) ?? {};
250431
250452
  if (!quiet) {
@@ -250442,12 +250463,14 @@ class Base44Command extends Command {
250442
250463
  if (result.stdout) {
250443
250464
  process.stdout.write(result.stdout);
250444
250465
  }
250445
- const upgradeInfo = await upgradeCheckPromise;
250466
+ const [upgradeInfo, staleSkills] = await Promise.all([
250467
+ upgradeCheckPromise,
250468
+ skillCheckPromise
250469
+ ]);
250446
250470
  if (upgradeInfo) {
250447
250471
  process.stderr.write(`${formatPlainUpgradeMessage(upgradeInfo, this.context.distribution)}
250448
250472
  `);
250449
250473
  }
250450
- const staleSkills = await skillCheckPromise;
250451
250474
  if (staleSkills && staleSkills.length > 0) {
250452
250475
  process.stderr.write(`${formatPlainSkillWarning(staleSkills)}
250453
250476
  `);
@@ -260257,4 +260280,4 @@ export {
260257
260280
  CLIExitError
260258
260281
  };
260259
260282
 
260260
- //# debugId=C4931A4AAC344DAA64756E2164756E21
260283
+ //# debugId=CBDDB58DC64FA23E64756E2164756E21