@base44-preview/cli 0.0.17-pr.111.e15ffa8 → 0.0.17-pr.19.1b258d9

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/bin/dev.cmd ADDED
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ npx tsx "%~dp0\dev.js" %*
package/bin/run.cmd ADDED
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ node "%~dp0\run.js" %*
package/dist/index.js CHANGED
@@ -30402,11 +30402,31 @@ async function deployAll(projectData) {
30402
30402
  //#region src/core/project/app-config.ts
30403
30403
  let cache = null;
30404
30404
  /**
30405
+ * Load app config from BASE44_CLI_TEST_OVERRIDES env var.
30406
+ * @returns true if override was applied, false otherwise
30407
+ */
30408
+ function loadFromTestOverrides() {
30409
+ const overrides = process.env.BASE44_CLI_TEST_OVERRIDES;
30410
+ if (!overrides) return false;
30411
+ try {
30412
+ const data = JSON.parse(overrides);
30413
+ if (data.appConfig?.id && data.appConfig?.projectRoot) {
30414
+ cache = {
30415
+ id: data.appConfig.id,
30416
+ projectRoot: data.appConfig.projectRoot
30417
+ };
30418
+ return true;
30419
+ }
30420
+ } catch {}
30421
+ return false;
30422
+ }
30423
+ /**
30405
30424
  * Initialize app config by reading from .app.jsonc.
30406
30425
  * Must be called before using getAppConfig().
30407
30426
  * @throws Error if no project found or .app.jsonc missing
30408
30427
  */
30409
30428
  async function initAppConfig() {
30429
+ if (loadFromTestOverrides()) return;
30410
30430
  if (cache) return;
30411
30431
  const projectRoot = await findProjectRoot();
30412
30432
  if (!projectRoot) throw new Error("No Base44 project found. Run this command from a project directory with a config.jsonc file.");
@@ -31336,7 +31356,8 @@ const logoutCommand = new Command("logout").description("Logout from current dev
31336
31356
  async function pushEntitiesAction() {
31337
31357
  const { entities } = await readProjectConfig();
31338
31358
  if (entities.length === 0) return { outroMessage: "No entities found in project" };
31339
- M.info(`Found ${entities.length} entities to push`);
31359
+ const entityNames = entities.map((e$1) => e$1.name).join(", ");
31360
+ M.info(`Found ${entities.length} entities to push: ${entityNames}`);
31340
31361
  const result = await runTask("Pushing entities to Base44", async () => {
31341
31362
  return await pushEntities(entities);
31342
31363
  }, {
@@ -38045,6 +38066,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
38045
38066
  //#region src/cli/commands/project/create.ts
38046
38067
  var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
38047
38068
  const DEFAULT_TEMPLATE_ID = "backend-only";
38069
+ const SUPPORTED_AGENTS = [{
38070
+ value: "cursor",
38071
+ label: "Cursor"
38072
+ }, {
38073
+ value: "claude-code",
38074
+ label: "Claude Code"
38075
+ }];
38048
38076
  async function getTemplateById(templateId) {
38049
38077
  const templates = await listTemplates();
38050
38078
  const template = templates.find((t) => t.id === templateId);
@@ -38182,35 +38210,45 @@ async function executeCreate({ template, name: rawName, description, projectPath
38182
38210
  finalAppUrl = appUrl;
38183
38211
  }
38184
38212
  }
38185
- let shouldAddSkills = false;
38213
+ let selectedAgents = [];
38186
38214
  if (isInteractive) {
38187
- const result = await ye({ message: "Add AI agent skills?" });
38188
- shouldAddSkills = !pD(result) && result;
38189
- } else shouldAddSkills = !!skills;
38190
- if (shouldAddSkills) await runTask("Installing AI agent skills...", async () => {
38191
- await execa("npx", [
38192
- "-y",
38193
- "add-skill",
38194
- "base44/skills",
38195
- "-y",
38196
- "-s",
38197
- "base44-cli",
38198
- "-s",
38199
- "base44-sdk"
38200
- ], {
38201
- cwd: resolvedPath,
38202
- stdio: "inherit"
38215
+ const result = await fe({
38216
+ message: "Add AI agent skills? (Select agents to configure)",
38217
+ options: SUPPORTED_AGENTS,
38218
+ initialValues: SUPPORTED_AGENTS.map((agent) => agent.value),
38219
+ required: false
38203
38220
  });
38204
- }, {
38205
- successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
38206
- errorMessage: "Failed to add AI agent skills - you can add them later with: npx add-skill base44/skills"
38207
- });
38221
+ if (!pD(result)) selectedAgents = result;
38222
+ } else if (skills) selectedAgents = SUPPORTED_AGENTS.map((agent) => agent.value);
38223
+ if (selectedAgents.length > 0) {
38224
+ const agentArgs = selectedAgents.flatMap((agent) => ["-a", agent]);
38225
+ M.step(`Installing skills for: ${selectedAgents.join(", ")}`);
38226
+ await runTask(`Installing skills for: ${selectedAgents.join(", ")}`, async () => {
38227
+ await execa("npx", [
38228
+ "-y",
38229
+ "add-skill",
38230
+ "base44/skills",
38231
+ "-y",
38232
+ "-s",
38233
+ "base44-cli",
38234
+ "-s",
38235
+ "base44-sdk",
38236
+ ...agentArgs
38237
+ ], {
38238
+ cwd: resolvedPath,
38239
+ stdio: "inherit"
38240
+ });
38241
+ }, {
38242
+ successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
38243
+ errorMessage: "Failed to add AI agent skills - you can add them later with: npx add-skill base44/skills"
38244
+ });
38245
+ }
38208
38246
  M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
38209
38247
  M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
38210
38248
  if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
38211
38249
  return { outroMessage: "Your project is set up and ready to use" };
38212
38250
  }
38213
- const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--skills", "Add AI agent skills").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
38251
+ const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--skills", "Add AI agent skills (Cursor, Claude Code)").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
38214
38252
  await chooseCreate(options);
38215
38253
  });
38216
38254
 
@@ -38757,7 +38795,7 @@ var open_default = open;
38757
38795
  //#region src/cli/commands/project/dashboard.ts
38758
38796
  async function openDashboard() {
38759
38797
  const dashboardUrl = getDashboardUrl();
38760
- await open_default(dashboardUrl);
38798
+ if (!process.env.CI) await open_default(dashboardUrl);
38761
38799
  return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
38762
38800
  }
38763
38801
  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.17-pr.111.e15ffa8",
3
+ "version": "0.0.17-pr.19.1b258d9",
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",