@base44-preview/cli 0.1.7-pr.585.2c79e0b → 0.1.7-pr.585.44bc526

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
@@ -255057,7 +255057,7 @@ function hasResourcesToDeploy(projectData) {
255057
255057
  connectors,
255058
255058
  authConfig
255059
255059
  } = projectData;
255060
- const hasSite = Boolean(project.site?.outputDirectory || project.site?.buildCommand);
255060
+ const hasSite = Boolean(project.site?.outputDirectory);
255061
255061
  const hasEntities = entities.length > 0;
255062
255062
  const hasFunctions = functions.length > 0;
255063
255063
  const hasAgents = agents.length > 0;
@@ -255091,7 +255091,7 @@ async function deployAll(projectData, options) {
255091
255091
  await authConfigResource.push(authConfig);
255092
255092
  const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
255093
255093
  const connectorResults = skipConnectorSync ? [] : (await pushConnectors(connectors)).results;
255094
- if ((options?.site ?? true) && project.site?.outputDirectory) {
255094
+ if (project.site?.outputDirectory) {
255095
255095
  const outputDir = resolve4(project.root, project.site.outputDirectory);
255096
255096
  const { appUrl } = await deploySite(outputDir);
255097
255097
  return { appUrl, connectorResults };
@@ -258025,48 +258025,6 @@ Examples:
258025
258025
  $ base44 create my-app --workspace 507f1f77bcf86cd799439011 Creates a base44 project in the given workspace`).hook("preAction", validateCreateOptions).action(createAction);
258026
258026
  }
258027
258027
 
258028
- // src/cli/commands/site/run-app-deploy.ts
258029
- var TASK_LABELS = {
258030
- "static-deployment": {
258031
- start: "Deploying site...",
258032
- success: "Site deployed",
258033
- error: "Site deploy failed"
258034
- },
258035
- static: {
258036
- start: "Creating archive and deploying site...",
258037
- success: "Site deployed successfully",
258038
- error: "Deployment failed"
258039
- }
258040
- };
258041
- async function runAppSiteDeploy({ runTask: runTask2, log, staticDeployments }, target, options = {}) {
258042
- const kind = detectAppDeployKind(target, { staticDeployments });
258043
- if (kind === "none")
258044
- return { kind: "none" };
258045
- const labels = TASK_LABELS[kind];
258046
- const progressLines = [];
258047
- const result = await runTask2(labels.start, async (updateMessage) => await deployAppSite(target, {
258048
- staticDeployments,
258049
- gitHash: options.gitHash,
258050
- progress: {
258051
- onAssets: ({ totalAssets, newAssets }) => {
258052
- const line = `Found ${totalAssets} static assets (${newAssets} new)`;
258053
- progressLines.push(line);
258054
- updateMessage(line);
258055
- },
258056
- onAssetUpload: ({ uploadedFiles, totalFiles }) => {
258057
- updateMessage(`Uploaded ${uploadedFiles} of ${totalFiles} assets`);
258058
- }
258059
- }
258060
- }), {
258061
- successMessage: labels.success,
258062
- errorMessage: labels.error
258063
- });
258064
- for (const line of progressLines) {
258065
- log.message(theme.styles.dim(line));
258066
- }
258067
- return result;
258068
- }
258069
-
258070
258028
  // src/cli/commands/project/deploy.ts
258071
258029
  async function deployAction(ctx, options = {}) {
258072
258030
  const { isNonInteractive, log } = ctx;
@@ -258074,12 +258032,12 @@ async function deployAction(ctx, options = {}) {
258074
258032
  throw new InvalidInputError("--yes is required in non-interactive mode");
258075
258033
  }
258076
258034
  const projectData = await readProjectConfig(options.projectRoot);
258077
- const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
258078
258035
  if (!hasResourcesToDeploy(projectData)) {
258079
258036
  return {
258080
258037
  outroMessage: "No resources found to deploy"
258081
258038
  };
258082
258039
  }
258040
+ const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
258083
258041
  const summaryLines = [];
258084
258042
  if (entities.length > 0) {
258085
258043
  summaryLines.push(` - ${entities.length} ${entities.length === 1 ? "entity" : "entities"}`);
@@ -258121,7 +258079,6 @@ ${summaryLines.join(`
258121
258079
  let functionCompleted = 0;
258122
258080
  const functionTotal = functions.length;
258123
258081
  const result = await deployAll(projectData, {
258124
- site: false,
258125
258082
  onVisibilitySet: (level) => {
258126
258083
  log.success(`App visibility set to ${level}`);
258127
258084
  },
@@ -258134,7 +258091,6 @@ ${summaryLines.join(`
258134
258091
  formatDeployResult(r, log);
258135
258092
  }
258136
258093
  });
258137
- const siteResult = await runAppSiteDeploy(ctx, project2);
258138
258094
  const connectorResults = result.connectorResults ?? [];
258139
258095
  await handleOAuthConnectors(connectorResults, isNonInteractive, options, log);
258140
258096
  const stripeResult = connectorResults.find((r) => r.type === "stripe");
@@ -258142,24 +258098,10 @@ ${summaryLines.join(`
258142
258098
  printStripeResult(stripeResult, log);
258143
258099
  }
258144
258100
  log.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
258145
- if (siteResult.kind === "static") {
258146
- log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(siteResult.appUrl)}`);
258101
+ if (result.appUrl) {
258102
+ log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
258147
258103
  }
258148
- const deployment = siteResult.kind === "static-deployment" ? siteResult : undefined;
258149
- if (deployment) {
258150
- printDeploymentSummary(deployment, log);
258151
- }
258152
- return {
258153
- outroMessage: "App deployed successfully",
258154
- stdout: ctx.jsonMode && deployment ? `${JSON.stringify({
258155
- deploymentId: deployment.deploymentId,
258156
- gitHash: deployment.gitHash
258157
- }, null, 2)}
258158
- ` : undefined
258159
- };
258160
- }
258161
- function printDeploymentSummary(deployment, log) {
258162
- log.message(`${theme.styles.header("Deployment")}: ${deployment.deploymentId} ${theme.styles.dim(`(commit ${deployment.gitHash.slice(0, 12)})`)}`);
258104
+ return { outroMessage: "App deployed successfully" };
258163
258105
  }
258164
258106
  function getDeployCommand2() {
258165
258107
  return new Base44Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").option("--build", "Build the site before deploying (skips the prompt)").option("--no-build", "Deploy without building (skips the prompt)").action(deployAction);
@@ -259026,6 +258968,48 @@ function getSecretsCommand() {
259026
258968
  return new Command("secrets").description("Manage project secrets (environment variables)").addCommand(getSecretsListCommand()).addCommand(getSecretsSetCommand()).addCommand(getSecretsDeleteCommand());
259027
258969
  }
259028
258970
 
258971
+ // src/cli/commands/site/run-app-deploy.ts
258972
+ var TASK_LABELS = {
258973
+ "static-deployment": {
258974
+ start: "Deploying site...",
258975
+ success: "Site deployed",
258976
+ error: "Site deploy failed"
258977
+ },
258978
+ static: {
258979
+ start: "Creating archive and deploying site...",
258980
+ success: "Site deployed successfully",
258981
+ error: "Deployment failed"
258982
+ }
258983
+ };
258984
+ async function runAppSiteDeploy({ runTask: runTask2, log, staticDeployments }, target, options = {}) {
258985
+ const kind = detectAppDeployKind(target, { staticDeployments });
258986
+ if (kind === "none")
258987
+ return { kind: "none" };
258988
+ const labels = TASK_LABELS[kind];
258989
+ const progressLines = [];
258990
+ const result = await runTask2(labels.start, async (updateMessage) => await deployAppSite(target, {
258991
+ staticDeployments,
258992
+ gitHash: options.gitHash,
258993
+ progress: {
258994
+ onAssets: ({ totalAssets, newAssets }) => {
258995
+ const line = `Found ${totalAssets} static assets (${newAssets} new)`;
258996
+ progressLines.push(line);
258997
+ updateMessage(line);
258998
+ },
258999
+ onAssetUpload: ({ uploadedFiles, totalFiles }) => {
259000
+ updateMessage(`Uploaded ${uploadedFiles} of ${totalFiles} assets`);
259001
+ }
259002
+ }
259003
+ }), {
259004
+ successMessage: labels.success,
259005
+ errorMessage: labels.error
259006
+ });
259007
+ for (const line of progressLines) {
259008
+ log.message(theme.styles.dim(line));
259009
+ }
259010
+ return result;
259011
+ }
259012
+
259029
259013
  // src/cli/commands/site/deploy.ts
259030
259014
  async function deployAction2(ctx, options) {
259031
259015
  const { isNonInteractive } = ctx;
@@ -259067,9 +259051,9 @@ async function deployAction2(ctx, options) {
259067
259051
  }
259068
259052
  return { outroMessage: "Nothing to deploy" };
259069
259053
  }
259070
- function getSiteDeployCommand(staticDeployments = false) {
259054
+ function getSiteDeployCommand() {
259071
259055
  const command2 = new Base44Command("deploy").description("Deploy built site files to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").option("--build", "Build the site before deploying (skips the prompt)").option("--no-build", "Deploy without building (skips the prompt)");
259072
- if (staticDeployments) {
259056
+ if (staticDeploymentsEnabled()) {
259073
259057
  command2.addOption(new Option("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)"));
259074
259058
  }
259075
259059
  return command2.action(deployAction2);
@@ -259090,8 +259074,8 @@ function getSiteOpenCommand() {
259090
259074
  }
259091
259075
 
259092
259076
  // src/cli/commands/site/index.ts
259093
- function getSiteCommand(staticDeployments = false) {
259094
- return new Command("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand(staticDeployments)).addCommand(getSiteOpenCommand());
259077
+ function getSiteCommand() {
259078
+ return new Command("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand()).addCommand(getSiteOpenCommand());
259095
259079
  }
259096
259080
 
259097
259081
  // src/core/types/generator.ts
@@ -263614,7 +263598,7 @@ function createProgram(context) {
263614
263598
  program2.addCommand(getSecretsCommand());
263615
263599
  program2.addCommand(getSandboxCommand());
263616
263600
  program2.addCommand(getAuthCommand());
263617
- program2.addCommand(getSiteCommand(context.staticDeployments));
263601
+ program2.addCommand(getSiteCommand());
263618
263602
  program2.addCommand(getTypesCommand());
263619
263603
  program2.addCommand(getExecCommand());
263620
263604
  program2.addCommand(getDevCommand());
@@ -267838,7 +267822,6 @@ async function runCLI(options8) {
267838
267822
  errorReporter,
267839
267823
  isNonInteractive,
267840
267824
  jsonMode,
267841
- staticDeployments: staticDeploymentsEnabled(),
267842
267825
  distribution: options8?.distribution ?? "npm",
267843
267826
  log,
267844
267827
  runTask: runTask2
@@ -267867,4 +267850,4 @@ export {
267867
267850
  CLIExitError
267868
267851
  };
267869
267852
 
267870
- //# debugId=0B63A6F418531C2064756E2164756E21
267853
+ //# debugId=2A92EE13E93D45AB64756E2164756E21