@base44-preview/cli 0.1.14-pr.618.6b8b5cf → 0.1.14-pr.619.5a268b0

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
@@ -239945,10 +239945,46 @@ async function resolveWorkerBuild(projectRoot, progress) {
239945
239945
  }
239946
239946
  async function readIndexHtml(assetsDir, assets) {
239947
239947
  if (!assetsDir || !assets.manifest["/index.html"]) {
239948
- throw new InvalidInputError(`No index.html found in "${assetsDir ?? "the site output directory"}" — a static site needs one at the output directory root.`);
239948
+ throw await missingIndexHtmlError(assetsDir, assets);
239949
239949
  }
239950
239950
  return new Uint8Array(await readFile3(join17(assetsDir, "index.html")));
239951
239951
  }
239952
+ var BUILD_FIRST_HINT = {
239953
+ message: "Run 'base44 build' first (it injects your app id; a bare 'npm run build' does not)"
239954
+ };
239955
+ var REDIRECT_FILE_IN_COPY = ".wrangler/deploy/config.json";
239956
+ var NO_ARTIFACT_HINT = {
239957
+ message: `A build that emits ${REDIRECT_FILE_IN_COPY} deploys its server too; without one, only the files in the output directory are deployed.`
239958
+ };
239959
+ async function missingIndexHtmlError(assetsDir, assets) {
239960
+ if (!assetsDir) {
239961
+ return new InvalidInputError(`No site output to deploy: this build emitted no ${REDIRECT_FILE_IN_COPY}, and the project config sets no 'site.outputDirectory' to fall back to.`, {
239962
+ hints: [
239963
+ {
239964
+ message: `Add 'site.outputDirectory' to your config.jsonc (e.g., "site": { "outputDirectory": "dist" })`
239965
+ }
239966
+ ]
239967
+ });
239968
+ }
239969
+ if (!await pathExists(assetsDir)) {
239970
+ return new InvalidInputError(`Output directory does not exist: ${assetsDir}. Make sure to build your project first.`, { hints: [BUILD_FIRST_HINT] });
239971
+ }
239972
+ const paths = Object.keys(assets.manifest);
239973
+ if (paths.length === 0) {
239974
+ return new InvalidInputError(`No files found in output directory: ${assetsDir}. Make sure to build your project first.`, { hints: [BUILD_FIRST_HINT] });
239975
+ }
239976
+ const nested = paths.filter((path) => path.endsWith("/index.html")).sort();
239977
+ return new InvalidInputError(`No index.html at the root of "${assetsDir}" — the build emitted ${paths.length} ${paths.length === 1 ? "file" : "files"} there, none of them an entry point.`, {
239978
+ hints: [
239979
+ ...nested.length > 0 ? [
239980
+ {
239981
+ message: `Found an index.html deeper in the output: ${nested.join(", ")} — point 'site.outputDirectory' at that directory, or have the build emit an entry point at the root.`
239982
+ }
239983
+ ] : [],
239984
+ NO_ARTIFACT_HINT
239985
+ ]
239986
+ });
239987
+ }
239952
239988
  function buildAssetsConfig(assetsConfig, progress) {
239953
239989
  if (!assetsConfig)
239954
239990
  return null;
@@ -246529,7 +246565,7 @@ async function deployAll(projectData, options) {
246529
246565
  options?.onVisibilitySet?.(project.visibility);
246530
246566
  }
246531
246567
  await entityResource.push(entities);
246532
- const functionResults = await deployFunctionsSequentially(functions, {
246568
+ await deployFunctionsSequentially(functions, {
246533
246569
  onStart: options?.onFunctionStart,
246534
246570
  onResult: options?.onFunctionResult
246535
246571
  });
@@ -246541,9 +246577,9 @@ async function deployAll(projectData, options) {
246541
246577
  if (project.site?.outputDirectory) {
246542
246578
  const outputDir = resolve5(project.root, project.site.outputDirectory);
246543
246579
  const { appUrl } = await deploySite(outputDir);
246544
- return { appUrl, connectorResults, functionResults };
246580
+ return { appUrl, connectorResults };
246545
246581
  }
246546
- return { connectorResults, functionResults };
246582
+ return { connectorResults };
246547
246583
  }
246548
246584
  // src/core/clients/base44-client.ts
246549
246585
  var retriedRequests = new WeakSet;
@@ -249561,11 +249597,6 @@ ${summaryLines.join(`
249561
249597
  if (result.appUrl) {
249562
249598
  log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
249563
249599
  }
249564
- const failedFunctions = result.functionResults.filter((functionResult) => functionResult.status === "error").length;
249565
- if (failedFunctions > 0) {
249566
- log.warn(`${failedFunctions} ${failedFunctions === 1 ? "function" : "functions"} failed to deploy`);
249567
- throw new CLIExitError(1);
249568
- }
249569
249600
  return { outroMessage: "App deployed successfully" };
249570
249601
  }
249571
249602
  function getDeployCommand2() {
@@ -259494,4 +259525,4 @@ export {
259494
259525
  runCLI
259495
259526
  };
259496
259527
 
259497
- //# debugId=948085031B0FBD6764756E2164756E21
259528
+ //# debugId=EF071BA24F80624564756E2164756E21