@base44-preview/cli 0.1.33-pr.643.3107411 → 0.1.33-pr.643.44738be

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
@@ -236598,13 +236598,6 @@ var FinalizeDeploymentResponseSchema = object({
236598
236598
  }).transform((data) => ({
236599
236599
  deploymentId: data.deployment_id
236600
236600
  }));
236601
- var PublishDeploymentResponseSchema = object({
236602
- git_commit_hash: string2(),
236603
- deployed_at: string2()
236604
- }).transform((data) => ({
236605
- gitHash: data.git_commit_hash,
236606
- deployedAt: data.deployed_at
236607
- }));
236608
236601
 
236609
236602
  // src/core/project/api.ts
236610
236603
  var PUBLIC_SETTINGS = {
@@ -239690,20 +239683,15 @@ async function finalizeDeployment(deploymentId, sessionId, payload) {
239690
239683
  }
239691
239684
  async function publishDeployment(gitHash) {
239692
239685
  const appClient = getAppClient();
239693
- let response;
239694
239686
  try {
239695
- response = await appClient.post("deploy", {
239687
+ await appClient.post("deploy", {
239696
239688
  json: { git_commit_hash: gitHash },
239697
239689
  timeout: 120000
239698
239690
  });
239699
239691
  } catch (error) {
239700
239692
  throw await ApiError.fromHttpError(error, "publishing deployment");
239701
239693
  }
239702
- const result = PublishDeploymentResponseSchema.safeParse(await response.json());
239703
- if (!result.success) {
239704
- throw new SchemaValidationError("Invalid response from server", result.error);
239705
- }
239706
- return { ...result.data, appUrl: await getSiteUrl() };
239694
+ return { gitHash, appUrl: await getSiteUrl() };
239707
239695
  }
239708
239696
  // src/core/site/config.ts
239709
239697
  async function getSiteFilePaths(outputDir) {
@@ -246996,9 +246984,6 @@ async function shipCommit(projectRoot, outputDir, gitHash, options) {
246996
246984
  onAssets: ({ totalAssets, newAssets }) => options?.onSiteProgress?.(`Found ${totalAssets} static assets (${newAssets} new)`)
246997
246985
  }
246998
246986
  });
246999
- if (options?.publish === false) {
247000
- return;
247001
- }
247002
246987
  try {
247003
246988
  const { appUrl } = await publishDeployment(gitHash);
247004
246989
  return appUrl;
@@ -247653,6 +247638,13 @@ function normalizeDatetime(value) {
247653
247638
  return value;
247654
247639
  return `${value}Z`;
247655
247640
  }
247641
+ // src/cli/utils/git-hash.ts
247642
+ function parseGitHash(value) {
247643
+ if (!isGitCommitHash(value)) {
247644
+ throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
247645
+ }
247646
+ return value;
247647
+ }
247656
247648
  // src/cli/utils/json.ts
247657
247649
  function toJsonStdout(result, options = {}) {
247658
247650
  return `${JSON.stringify(result, null, options.compact ? undefined : 2)}
@@ -252068,7 +252060,6 @@ ${summaryLines.join(`
252068
252060
  let actorCompleted = 0;
252069
252061
  const result = await deployAll(projectData, {
252070
252062
  gitHash: options.gitHash,
252071
- publish: options.publish,
252072
252063
  onSiteProgress: (message) => {
252073
252064
  log.message(theme.styles.dim(message));
252074
252065
  },
@@ -252107,7 +252098,7 @@ ${summaryLines.join(`
252107
252098
  return { outroMessage: "App deployed successfully" };
252108
252099
  }
252109
252100
  function getDeployCommand3() {
252110
- return new Base44Command("deploy").description("Deploy all project resources (entities, functions, actors, 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)").option("--no-publish", "Deploy the site without serving it in production yet").addOption(new Option2("--git-hash <hash>", "Commit the built site came from (defaults to the checkout's HEAD)").argParser(parseGitHash)).action(deployAction);
252101
+ return new Base44Command("deploy").description("Deploy all project resources (entities, functions, actors, 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)").addOption(new Option2("--git-hash <hash>", "Commit the built site came from (defaults to the checkout's HEAD)").argParser(parseGitHash)).action(deployAction);
252111
252102
  }
252112
252103
  async function handleOAuthConnectors(connectorResults, isNonInteractive, options, log) {
252113
252104
  const needsOAuth = filterPendingOAuth(connectorResults);
@@ -252128,12 +252119,6 @@ function printStripeResult(r, log) {
252128
252119
  }
252129
252120
  log.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
252130
252121
  }
252131
- function parseGitHash(value) {
252132
- if (!isGitCommitHash(value)) {
252133
- throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
252134
- }
252135
- return value;
252136
- }
252137
252122
 
252138
252123
  // src/cli/commands/project/app-id-options.ts
252139
252124
  function readExplicitAppId(command) {
@@ -264298,12 +264283,7 @@ function targetOption() {
264298
264283
  return new Option2("--target <name>", "Environment to serve the version at");
264299
264284
  }
264300
264285
  function gitHashOption() {
264301
- return new Option2("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser((value) => {
264302
- if (!isGitCommitHash(value)) {
264303
- throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
264304
- }
264305
- return value;
264306
- });
264286
+ return new Option2("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser(parseGitHash);
264307
264287
  }
264308
264288
  function concurrencyOption() {
264309
264289
  return new Option2("--concurrency <n>", "Parallel file uploads").default(DEFAULT_VERSION_UPLOAD_CONCURRENCY).argParser((value) => {
@@ -264867,13 +264847,7 @@ function siteOutputDir(project) {
264867
264847
  return resolve16(project.root, outputDirectory);
264868
264848
  }
264869
264849
  function getSiteDeployCommand() {
264870
- return 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)").option("--publish", "Serve this build in production once it is deployed").addOption(new Option2("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser(parseGitHash2)).addOption(new Option2("--concurrency <n>", "Parallel asset uploads").default(DEFAULT_UPLOAD_CONCURRENCY).argParser(parseConcurrency)).action(deployAction2);
264871
- }
264872
- function parseGitHash2(value) {
264873
- if (!isGitCommitHash(value)) {
264874
- throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
264875
- }
264876
- return value;
264850
+ return 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)").option("--publish", "Serve this build in production once it is deployed").addOption(new Option2("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser(parseGitHash)).addOption(new Option2("--concurrency <n>", "Parallel asset uploads").default(DEFAULT_UPLOAD_CONCURRENCY).argParser(parseConcurrency)).action(deployAction2);
264877
264851
  }
264878
264852
  function parseConcurrency(value) {
264879
264853
  const parsed = Number(value);
@@ -274018,4 +273992,4 @@ export {
274018
273992
  runCLI
274019
273993
  };
274020
273994
 
274021
- //# debugId=32AD23ED17452F4764756E2164756E21
273995
+ //# debugId=F146228674371CF664756E2164756E21