@base44-preview/cli 0.1.16-pr.634.3cc42b9 → 0.1.16-pr.634.619a424

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
@@ -230705,10 +230705,10 @@ var TemplatesConfigSchema = object({
230705
230705
  templates: array(TemplateSchema)
230706
230706
  });
230707
230707
  var SiteConfigSchema = object({
230708
- buildCommand: string2().optional().default("npm run build"),
230709
- serveCommand: string2().optional().default("npm run dev"),
230710
- outputDirectory: string2().optional().default("./dist"),
230711
- installCommand: string2().optional().default("npm install")
230708
+ buildCommand: string2().default("npm run build"),
230709
+ serveCommand: string2().optional(),
230710
+ outputDirectory: string2().optional(),
230711
+ installCommand: string2().default("npm install")
230712
230712
  });
230713
230713
  var PluginMetadataSchema = object({
230714
230714
  namespace: string2().min(1, "Plugin namespace cannot be empty").regex(/^[a-zA-Z0-9_-]+$/, "Plugin namespace can only contain letters, numbers, underscores, and dashes")
@@ -246691,7 +246691,7 @@ function hasResourcesToDeploy(projectData) {
246691
246691
  connectors,
246692
246692
  authConfig
246693
246693
  } = projectData;
246694
- const hasSite = project.site !== undefined;
246694
+ const hasSite = Boolean(project.site?.outputDirectory);
246695
246695
  const hasEntities = entities.length > 0;
246696
246696
  const hasFunctions = functions.length > 0;
246697
246697
  const hasActors = actors.length > 0;
@@ -251020,7 +251020,7 @@ async function deployTarball({ runTask }, project) {
251020
251020
  throw new ConfigNotFoundError("No site configuration found.", {
251021
251021
  hints: [
251022
251022
  {
251023
- message: `Add a 'site' block to your config.jsonc (e.g., "site": { "outputDirectory": "dist" }). Inside one, outputDirectory defaults to "./dist".`
251023
+ message: `Add 'site.outputDirectory' to your config.jsonc (e.g., "site": { "outputDirectory": "dist" })`
251024
251024
  }
251025
251025
  ]
251026
251026
  });
@@ -255561,7 +255561,7 @@ function startServeCommand(runner, backend) {
255561
255561
  async function remoteDevAction(app) {
255562
255562
  const site = await resolveConfiguredSite(app);
255563
255563
  if (!site) {
255564
- throw new ConfigInvalidError(`base44 dev --remote serves the frontend against the production backend, but this project has no 'site' block in base44/config.jsonc. Add one; inside it serveCommand defaults to "npm run dev".`);
255564
+ throw new ConfigInvalidError("base44 dev --remote serves the frontend against the production backend, but this project has no site.serveCommand in base44/config.jsonc.");
255565
255565
  }
255566
255566
  const appBaseUrl = await getSiteUrl();
255567
255567
  const runner = createServeCommandRunner({
@@ -255812,17 +255812,22 @@ async function eject(ctx, options, command) {
255812
255812
  errorMessage: "Failed to pull project"
255813
255813
  });
255814
255814
  const { project } = await readProjectConfig(resolvedPath);
255815
- const installCommand = project.site?.installCommand;
255816
- const buildCommand = project.site?.buildCommand;
255817
- if (installCommand && buildCommand) {
255815
+ const site = project.site;
255816
+ if (site) {
255818
255817
  const shouldDeploy = options.yes ? true : await Re({
255819
255818
  message: "Would you like to deploy your project now?"
255820
255819
  });
255821
255820
  if (!Ct(shouldDeploy) && shouldDeploy) {
255822
255821
  await runTask("Installing dependencies...", async (updateMessage) => {
255823
- await execa({ cwd: resolvedPath, shell: true })`${installCommand}`;
255822
+ await execa({
255823
+ cwd: resolvedPath,
255824
+ shell: true
255825
+ })`${site.installCommand}`;
255824
255826
  updateMessage("Building project...");
255825
- await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
255827
+ await execa({
255828
+ cwd: resolvedPath,
255829
+ shell: true
255830
+ })`${site.buildCommand}`;
255826
255831
  }, {
255827
255832
  successMessage: theme.colors.base44Orange("Project built successfully"),
255828
255833
  errorMessage: "Failed to build project"
@@ -259929,4 +259934,4 @@ export {
259929
259934
  runCLI
259930
259935
  };
259931
259936
 
259932
- //# debugId=E2C8B2D4450DEEB964756E2164756E21
259937
+ //# debugId=520138F1270451C464756E2164756E21