@base44-preview/cli 0.1.7-pr.585.818cbdc → 0.1.7-pr.585.85db235

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
@@ -248415,12 +248415,6 @@ async function buildAssetManifest(assetsDir, appId) {
248415
248415
  import { readFile as readFile4 } from "node:fs/promises";
248416
248416
  import { join as join16 } from "node:path";
248417
248417
 
248418
- // src/core/utils/git.ts
248419
- var GIT_HASH_PATTERN = /^[a-fA-F0-9]{7,64}$/;
248420
- function isGitCommitHash(value) {
248421
- return GIT_HASH_PATTERN.test(value);
248422
- }
248423
-
248424
248418
  // src/core/site/upload.ts
248425
248419
  import { readFile as readFile3 } from "node:fs/promises";
248426
248420
  var UPLOAD_CONCURRENCY = 3;
@@ -248472,9 +248466,6 @@ function sleep3(ms) {
248472
248466
  // src/core/site/static-site.ts
248473
248467
  async function deployStaticSite(options) {
248474
248468
  const { outputDir, gitHash, progress } = options;
248475
- if (!isGitCommitHash(gitHash)) {
248476
- throw new InvalidInputError(`'${gitHash}' is not a git commit hash.`);
248477
- }
248478
248469
  const assets = await buildAssetManifest(outputDir, getAppContext().id);
248479
248470
  if (!assets.manifest["/index.html"]) {
248480
248471
  throw new InvalidInputError(`No index.html found in "${outputDir}" — a static site needs one at the output directory root.`);
@@ -255716,6 +255707,11 @@ function verifyDenoInstalled(context) {
255716
255707
  });
255717
255708
  }
255718
255709
  }
255710
+ // src/core/utils/git.ts
255711
+ var GIT_HASH_PATTERN = /^[a-fA-F0-9]{7,64}$/;
255712
+ function isGitCommitHash(value) {
255713
+ return GIT_HASH_PATTERN.test(value);
255714
+ }
255719
255715
  // src/core/workspace/schema.ts
255720
255716
  var WorkspaceSchema = exports_external.object({
255721
255717
  id: exports_external.string(),
@@ -258977,7 +258973,12 @@ async function deployTarball({ runTask: runTask2 }, outputDir) {
258977
258973
  function getSiteDeployCommand() {
258978
258974
  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)");
258979
258975
  if (staticDeploymentsEnabled()) {
258980
- command2.addOption(new Option("--git-hash <hash>", "Commit the build came from — deploys through the deployments API"));
258976
+ command2.addOption(new Option("--git-hash <hash>", "Commit the build came from — deploys through the deployments API").argParser((value) => {
258977
+ if (!isGitCommitHash(value)) {
258978
+ throw new InvalidArgumentError("Expected a git commit hash (7-64 hex chars).");
258979
+ }
258980
+ return value;
258981
+ }));
258981
258982
  }
258982
258983
  return command2.action(deployAction2);
258983
258984
  }
@@ -267773,4 +267774,4 @@ export {
267773
267774
  CLIExitError
267774
267775
  };
267775
267776
 
267776
- //# debugId=7E09388401C6A22064756E2164756E21
267777
+ //# debugId=54C8BB5F436D9BDE64756E2164756E21