@base44-preview/cli 0.0.25-pr.149.49cb3ba → 0.0.25-pr.19.69c560c

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.
Files changed (2) hide show
  1. package/dist/index.js +30 -12
  2. package/package.json +8 -2
package/dist/index.js CHANGED
@@ -30612,27 +30612,25 @@ async function createArchive(pathToArchive, targetArchivePath) {
30612
30612
  * Checks if there are any resources to deploy in the project.
30613
30613
  *
30614
30614
  * @param projectData - The project configuration and resources
30615
- * @returns true if there are entities, functions, agents, or a configured site to deploy
30615
+ * @returns true if there are entities, functions, or a configured site to deploy
30616
30616
  */
30617
30617
  function hasResourcesToDeploy(projectData) {
30618
- const { project, entities, functions, agents } = projectData;
30618
+ const { project, entities, functions } = projectData;
30619
30619
  const hasSite = Boolean(project.site?.outputDirectory);
30620
30620
  const hasEntities = entities.length > 0;
30621
30621
  const hasFunctions = functions.length > 0;
30622
- const hasAgents = agents.length > 0;
30623
- return hasEntities || hasFunctions || hasAgents || hasSite;
30622
+ return hasEntities || hasFunctions || hasSite;
30624
30623
  }
30625
30624
  /**
30626
- * Deploys all project resources (entities, functions, agents, and site) to Base44.
30625
+ * Deploys all project resources (entities, functions, and site) to Base44.
30627
30626
  *
30628
30627
  * @param projectData - The project configuration and resources to deploy
30629
30628
  * @returns The deployment result including app URL if site was deployed
30630
30629
  */
30631
30630
  async function deployAll(projectData) {
30632
- const { project, entities, functions, agents } = projectData;
30631
+ const { project, entities, functions } = projectData;
30633
30632
  await entityResource.push(entities);
30634
30633
  await functionResource.push(functions);
30635
- await agentResource.push(agents);
30636
30634
  if (project.site?.outputDirectory) {
30637
30635
  const { appUrl } = await deploySite(resolve(project.root, project.site.outputDirectory));
30638
30636
  return { appUrl };
@@ -30644,11 +30642,31 @@ async function deployAll(projectData) {
30644
30642
  //#region src/core/project/app-config.ts
30645
30643
  let cache = null;
30646
30644
  /**
30645
+ * Load app config from BASE44_CLI_TEST_OVERRIDES env var.
30646
+ * @returns true if override was applied, false otherwise
30647
+ */
30648
+ function loadFromTestOverrides() {
30649
+ const overrides = process.env.BASE44_CLI_TEST_OVERRIDES;
30650
+ if (!overrides) return false;
30651
+ try {
30652
+ const data = JSON.parse(overrides);
30653
+ if (data.appConfig?.id && data.appConfig?.projectRoot) {
30654
+ cache = {
30655
+ id: data.appConfig.id,
30656
+ projectRoot: data.appConfig.projectRoot
30657
+ };
30658
+ return true;
30659
+ }
30660
+ } catch {}
30661
+ return false;
30662
+ }
30663
+ /**
30647
30664
  * Initialize app config by reading from .app.jsonc.
30648
30665
  * Must be called before using getAppConfig().
30649
30666
  * @throws Error if no project found or .app.jsonc missing
30650
30667
  */
30651
30668
  async function initAppConfig() {
30669
+ if (loadFromTestOverrides()) return;
30652
30670
  if (cache) return;
30653
30671
  const projectRoot = await findProjectRoot();
30654
30672
  if (!projectRoot) throw new Error("No Base44 project found. Run this command from a project directory with a config.jsonc file.");
@@ -31597,7 +31615,8 @@ const logoutCommand = new Command("logout").description("Logout from current dev
31597
31615
  async function pushEntitiesAction() {
31598
31616
  const { entities } = await readProjectConfig();
31599
31617
  if (entities.length === 0) return { outroMessage: "No entities found in project" };
31600
- M.info(`Found ${entities.length} entities to push`);
31618
+ const entityNames = entities.map((e$1) => e$1.name).join(", ");
31619
+ M.info(`Found ${entities.length} entities to push: ${entityNames}`);
31601
31620
  const result = await runTask("Pushing entities to Base44", async () => {
31602
31621
  return await pushEntities(entities);
31603
31622
  }, {
@@ -39060,7 +39079,7 @@ var open_default = open;
39060
39079
  //#region src/cli/commands/project/dashboard.ts
39061
39080
  async function openDashboard() {
39062
39081
  const dashboardUrl = getDashboardUrl();
39063
- await open_default(dashboardUrl);
39082
+ if (!process.env.CI) await open_default(dashboardUrl);
39064
39083
  return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
39065
39084
  }
39066
39085
  const dashboardCommand = new Command("dashboard").description("Open the app dashboard in your browser").action(async () => {
@@ -39072,11 +39091,10 @@ const dashboardCommand = new Command("dashboard").description("Open the app dash
39072
39091
  async function deployAction$1(options) {
39073
39092
  const projectData = await readProjectConfig();
39074
39093
  if (!hasResourcesToDeploy(projectData)) return { outroMessage: "No resources found to deploy" };
39075
- const { project, entities, functions, agents } = projectData;
39094
+ const { project, entities, functions } = projectData;
39076
39095
  const summaryLines = [];
39077
39096
  if (entities.length > 0) summaryLines.push(` - ${entities.length} ${entities.length === 1 ? "entity" : "entities"}`);
39078
39097
  if (functions.length > 0) summaryLines.push(` - ${functions.length} ${functions.length === 1 ? "function" : "functions"}`);
39079
- if (agents.length > 0) summaryLines.push(` - ${agents.length} ${agents.length === 1 ? "agent" : "agents"}`);
39080
39098
  if (project.site?.outputDirectory) summaryLines.push(` - Site from ${project.site.outputDirectory}`);
39081
39099
  if (!options.yes) {
39082
39100
  M.warn(`This will update your Base44 app with:\n${summaryLines.join("\n")}`);
@@ -39093,7 +39111,7 @@ async function deployAction$1(options) {
39093
39111
  if (result.appUrl) M.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
39094
39112
  return { outroMessage: "App deployed successfully" };
39095
39113
  }
39096
- const deployCommand = new Command("deploy").description("Deploy all project resources (entities, functions, agents, and site)").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
39114
+ const deployCommand = new Command("deploy").description("Deploy all project resources (entities, functions, and site)").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
39097
39115
  await runCommand(() => deployAction$1(options), { requireAuth: true });
39098
39116
  });
39099
39117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/cli",
3
- "version": "0.0.25-pr.149.49cb3ba",
3
+ "version": "0.0.25-pr.19.69c560c",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,7 +16,7 @@
16
16
  "dev": "./bin/dev.js",
17
17
  "start": "./bin/run.js",
18
18
  "clean": "rm -rf dist",
19
- "lint": "eslint src",
19
+ "lint": "eslint src tests",
20
20
  "test": "vitest run",
21
21
  "test:watch": "vitest"
22
22
  },
@@ -52,9 +52,12 @@
52
52
  "json5": "^2.2.3",
53
53
  "ky": "^1.14.2",
54
54
  "lodash.kebabcase": "^4.1.1",
55
+ "msw": "^2.12.7",
55
56
  "open": "^11.0.0",
56
57
  "p-wait-for": "^6.0.0",
58
+ "strip-ansi": "^7.1.2",
57
59
  "tar": "^7.5.4",
60
+ "tmp-promise": "^3.0.3",
58
61
  "tsdown": "^0.12.4",
59
62
  "tsx": "^4.19.2",
60
63
  "typescript": "^5.7.2",
@@ -64,5 +67,8 @@
64
67
  },
65
68
  "engines": {
66
69
  "node": ">=20.19.0"
70
+ },
71
+ "optionalDependencies": {
72
+ "@rollup/rollup-linux-x64-gnu": "^4.56.0"
67
73
  }
68
74
  }