@base44-preview/cli 0.1.33-pr.643.3107411 → 0.1.33-pr.643.5285041

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) {
@@ -247653,6 +247641,13 @@ function normalizeDatetime(value) {
247653
247641
  return value;
247654
247642
  return `${value}Z`;
247655
247643
  }
247644
+ // src/cli/utils/git-hash.ts
247645
+ function parseGitHash(value) {
247646
+ if (!isGitCommitHash(value)) {
247647
+ throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
247648
+ }
247649
+ return value;
247650
+ }
247656
247651
  // src/cli/utils/json.ts
247657
247652
  function toJsonStdout(result, options = {}) {
247658
247653
  return `${JSON.stringify(result, null, options.compact ? undefined : 2)}
@@ -252128,12 +252123,6 @@ function printStripeResult(r, log) {
252128
252123
  }
252129
252124
  log.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
252130
252125
  }
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
252126
 
252138
252127
  // src/cli/commands/project/app-id-options.ts
252139
252128
  function readExplicitAppId(command) {
@@ -264298,12 +264287,7 @@ function targetOption() {
264298
264287
  return new Option2("--target <name>", "Environment to serve the version at");
264299
264288
  }
264300
264289
  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
- });
264290
+ return new Option2("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser(parseGitHash);
264307
264291
  }
264308
264292
  function concurrencyOption() {
264309
264293
  return new Option2("--concurrency <n>", "Parallel file uploads").default(DEFAULT_VERSION_UPLOAD_CONCURRENCY).argParser((value) => {
@@ -264867,13 +264851,7 @@ function siteOutputDir(project) {
264867
264851
  return resolve16(project.root, outputDirectory);
264868
264852
  }
264869
264853
  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;
264854
+ 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
264855
  }
264878
264856
  function parseConcurrency(value) {
264879
264857
  const parsed = Number(value);
@@ -274018,4 +273996,4 @@ export {
274018
273996
  runCLI
274019
273997
  };
274020
273998
 
274021
- //# debugId=32AD23ED17452F4764756E2164756E21
273999
+ //# debugId=D4E502AA1650121164756E2164756E21