@base44-preview/cli 0.1.7-pr.585.a27bb8a → 0.1.7-pr.585.e329446

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