@base44-preview/cli 0.1.15-pr.626.6cd5550 → 0.1.15-pr.626.71e30f2

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
@@ -247054,6 +247054,12 @@ async function ensureAppContext(ctx, options = {}) {
247054
247054
  ctx.app = appContext;
247055
247055
  ctx.errorReporter.setContext({ appId: appContext.id });
247056
247056
  }
247057
+ function requireApp(ctx) {
247058
+ if (!ctx.app) {
247059
+ throw new InternalError("This command read an app context it never resolved — it is declared with requireAppContext: false.");
247060
+ }
247061
+ return ctx.app;
247062
+ }
247057
247063
 
247058
247064
  // src/cli/utils/version-check.ts
247059
247065
  async function checkForUpgrade() {
@@ -249869,15 +249875,15 @@ async function readSettingsIfPresent(projectRoot) {
249869
249875
  }
249870
249876
  // src/cli/commands/project/build.ts
249871
249877
  async function buildAction(ctx) {
249872
- const { app } = ctx;
249873
- const target = await resolvePublishTarget(app?.projectRoot);
249878
+ const app = requireApp(ctx);
249879
+ const target = await resolvePublishTarget(app.projectRoot);
249874
249880
  await runSiteBuild(ctx, {
249875
249881
  root: target.root,
249876
249882
  buildCommand: target.buildCommand,
249877
- appId: app?.id ?? ""
249883
+ appId: app.id
249878
249884
  });
249879
249885
  return {
249880
- outroMessage: `Site built with app id ${theme.styles.bold(app?.id ?? "")}`
249886
+ outroMessage: `Site built with app id ${theme.styles.bold(app.id)}`
249881
249887
  };
249882
249888
  }
249883
249889
  function getBuildCommand() {
@@ -250837,15 +250843,16 @@ function concurrencyOption() {
250837
250843
 
250838
250844
  // src/cli/commands/publish.ts
250839
250845
  async function publishAction(ctx, options) {
250840
- const { runTask, log, jsonMode, app } = ctx;
250841
- const target = await resolvePublishTarget(app?.projectRoot, {
250846
+ const { runTask, log, jsonMode } = ctx;
250847
+ const app = requireApp(ctx);
250848
+ const target = await resolvePublishTarget(app.projectRoot, {
250842
250849
  outputDir: options.outputDir
250843
250850
  });
250844
250851
  if (options.build !== false) {
250845
250852
  await tagStep("build", () => runSiteBuild(ctx, {
250846
250853
  root: target.root,
250847
250854
  buildCommand: target.buildCommand,
250848
- appId: app?.id ?? ""
250855
+ appId: app.id
250849
250856
  }));
250850
250857
  }
250851
250858
  const gitHash = await resolveProvenanceCommit(target.root, options.gitHash);
@@ -260346,4 +260353,4 @@ export {
260346
260353
  runCLI
260347
260354
  };
260348
260355
 
260349
- //# debugId=6F5FA046DBD3D8D164756E2164756E21
260356
+ //# debugId=7DA2F8B50E7BAF0364756E2164756E21