@base44-preview/cli 0.0.25-pr.149.49cb3ba → 0.0.25-pr.149.9771d4b

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 +28 -2
  2. package/package.json +8 -2
package/dist/index.js CHANGED
@@ -16889,6 +16889,11 @@ async function writeAgents(agentsDir, remoteAgents) {
16889
16889
  //#endregion
16890
16890
  //#region src/core/resources/agent/api.ts
16891
16891
  async function pushAgents(agents) {
16892
+ if (agents.length === 0) return {
16893
+ created: [],
16894
+ updated: [],
16895
+ deleted: []
16896
+ };
16892
16897
  const response = await getAppClient().put("agent-configs", {
16893
16898
  json: agents,
16894
16899
  throwHttpErrors: false
@@ -30644,11 +30649,31 @@ async function deployAll(projectData) {
30644
30649
  //#region src/core/project/app-config.ts
30645
30650
  let cache = null;
30646
30651
  /**
30652
+ * Load app config from BASE44_CLI_TEST_OVERRIDES env var.
30653
+ * @returns true if override was applied, false otherwise
30654
+ */
30655
+ function loadFromTestOverrides() {
30656
+ const overrides = process.env.BASE44_CLI_TEST_OVERRIDES;
30657
+ if (!overrides) return false;
30658
+ try {
30659
+ const data = JSON.parse(overrides);
30660
+ if (data.appConfig?.id && data.appConfig?.projectRoot) {
30661
+ cache = {
30662
+ id: data.appConfig.id,
30663
+ projectRoot: data.appConfig.projectRoot
30664
+ };
30665
+ return true;
30666
+ }
30667
+ } catch {}
30668
+ return false;
30669
+ }
30670
+ /**
30647
30671
  * Initialize app config by reading from .app.jsonc.
30648
30672
  * Must be called before using getAppConfig().
30649
30673
  * @throws Error if no project found or .app.jsonc missing
30650
30674
  */
30651
30675
  async function initAppConfig() {
30676
+ if (loadFromTestOverrides()) return;
30652
30677
  if (cache) return;
30653
30678
  const projectRoot = await findProjectRoot();
30654
30679
  if (!projectRoot) throw new Error("No Base44 project found. Run this command from a project directory with a config.jsonc file.");
@@ -31597,7 +31622,8 @@ const logoutCommand = new Command("logout").description("Logout from current dev
31597
31622
  async function pushEntitiesAction() {
31598
31623
  const { entities } = await readProjectConfig();
31599
31624
  if (entities.length === 0) return { outroMessage: "No entities found in project" };
31600
- M.info(`Found ${entities.length} entities to push`);
31625
+ const entityNames = entities.map((e$1) => e$1.name).join(", ");
31626
+ M.info(`Found ${entities.length} entities to push: ${entityNames}`);
31601
31627
  const result = await runTask("Pushing entities to Base44", async () => {
31602
31628
  return await pushEntities(entities);
31603
31629
  }, {
@@ -39060,7 +39086,7 @@ var open_default = open;
39060
39086
  //#region src/cli/commands/project/dashboard.ts
39061
39087
  async function openDashboard() {
39062
39088
  const dashboardUrl = getDashboardUrl();
39063
- await open_default(dashboardUrl);
39089
+ if (!process.env.CI) await open_default(dashboardUrl);
39064
39090
  return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
39065
39091
  }
39066
39092
  const dashboardCommand = new Command("dashboard").description("Open the app dashboard in your browser").action(async () => {
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.149.9771d4b",
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
  }