@base44-preview/cli 0.0.17-pr.19.e5e923a → 0.0.17-pr.93.f6d87d6

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 (30) hide show
  1. package/README.md +1 -32
  2. package/dist/{index.js → cli/index.js} +9 -85
  3. package/package.json +9 -14
  4. package/bin/dev.cmd +0 -2
  5. package/bin/dev.js +0 -12
  6. package/bin/run.cmd +0 -2
  7. package/bin/run.js +0 -12
  8. /package/dist/{templates → cli/templates}/backend-and-client/.nvmrc +0 -0
  9. /package/dist/{templates → cli/templates}/backend-and-client/README.md +0 -0
  10. /package/dist/{templates → cli/templates}/backend-and-client/base44/app.jsonc.ejs +0 -0
  11. /package/dist/{templates → cli/templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
  12. /package/dist/{templates → cli/templates}/backend-and-client/base44/entities/task.jsonc +0 -0
  13. /package/dist/{templates → cli/templates}/backend-and-client/components.json +0 -0
  14. /package/dist/{templates → cli/templates}/backend-and-client/index.html +0 -0
  15. /package/dist/{templates → cli/templates}/backend-and-client/jsconfig.json +0 -0
  16. /package/dist/{templates → cli/templates}/backend-and-client/package.json +0 -0
  17. /package/dist/{templates → cli/templates}/backend-and-client/postcss.config.js +0 -0
  18. /package/dist/{templates → cli/templates}/backend-and-client/src/App.jsx +0 -0
  19. /package/dist/{templates → cli/templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
  20. /package/dist/{templates → cli/templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
  21. /package/dist/{templates → cli/templates}/backend-and-client/src/components/ui/button.jsx +0 -0
  22. /package/dist/{templates → cli/templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
  23. /package/dist/{templates → cli/templates}/backend-and-client/src/components/ui/input.jsx +0 -0
  24. /package/dist/{templates → cli/templates}/backend-and-client/src/index.css +0 -0
  25. /package/dist/{templates → cli/templates}/backend-and-client/src/main.jsx +0 -0
  26. /package/dist/{templates → cli/templates}/backend-and-client/tailwind.config.js +0 -0
  27. /package/dist/{templates → cli/templates}/backend-and-client/vite.config.js +0 -0
  28. /package/dist/{templates → cli/templates}/backend-only/base44/app.jsonc.ejs +0 -0
  29. /package/dist/{templates → cli/templates}/backend-only/base44/config.jsonc.ejs +0 -0
  30. /package/dist/{templates → cli/templates}/templates.json +0 -0
package/README.md CHANGED
@@ -45,6 +45,7 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
45
45
  | ------- | ----------- |
46
46
  | [`create`](https://docs.base44.com/developers/references/cli/commands/create) | Create a new Base44 project from a template |
47
47
  | [`deploy`](https://docs.base44.com/developers/references/cli/commands/deploy) | Deploy resources and site to Base44 |
48
+ | [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app |
48
49
  | [`link`](https://docs.base44.com/developers/references/cli/commands/link) | Link a local project to a project on Base44 |
49
50
  | [`dashboard`](https://docs.base44.com/developers/references/cli/commands/dashboard) | Open the app dashboard in your browser |
50
51
  | [`login`](https://docs.base44.com/developers/references/cli/commands/login) | Authenticate with Base44 |
@@ -54,38 +55,6 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
54
55
  | [`functions deploy`](https://docs.base44.com/developers/references/cli/commands/functions-deploy) | Deploy local functions to Base44 |
55
56
  | [`site deploy`](https://docs.base44.com/developers/references/cli/commands/site-deploy) | Deploy built site files to Base44 hosting |
56
57
 
57
-
58
- <!--| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app | -->
59
-
60
- ## AI Agent Skills
61
-
62
- When creating a project, you'll be prompted to install AI agent skills for your preferred coding assistants:
63
-
64
- ```
65
- ◆ Add AI agent skills? (Select agents to configure)
66
- │ ◼ Cursor
67
- │ ◼ Claude Code
68
-
69
- ```
70
-
71
- This installs [base44/skills](https://github.com/base44/skills) which helps AI agents understand how to work with Base44 projects.
72
-
73
- **Non-interactive mode:**
74
-
75
- ```bash
76
- # Install skills for all supported agents
77
- base44 create --name my-app --path ./my-app --skills
78
-
79
- # Skip skills installation
80
- base44 create --name my-app --path ./my-app
81
- ```
82
-
83
- **Manual installation:**
84
-
85
- ```bash
86
- npx add-skill base44/skills
87
- ```
88
-
89
58
  ## Help
90
59
 
91
60
  ```bash
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import { createRequire } from "node:module";
2
3
  import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
3
4
  import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
@@ -30402,31 +30403,11 @@ async function deployAll(projectData) {
30402
30403
  //#region src/core/project/app-config.ts
30403
30404
  let cache = null;
30404
30405
  /**
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
- /**
30424
30406
  * Initialize app config by reading from .app.jsonc.
30425
30407
  * Must be called before using getAppConfig().
30426
30408
  * @throws Error if no project found or .app.jsonc missing
30427
30409
  */
30428
30410
  async function initAppConfig() {
30429
- if (loadFromTestOverrides()) return;
30430
30411
  if (cache) return;
30431
30412
  const projectRoot = await findProjectRoot();
30432
30413
  if (!projectRoot) throw new Error("No Base44 project found. Run this command from a project directory with a config.jsonc file.");
@@ -30605,21 +30586,6 @@ async function getUserInfo(accessToken) {
30605
30586
  return result.data;
30606
30587
  }
30607
30588
 
30608
- //#endregion
30609
- //#region src/cli/errors.ts
30610
- /**
30611
- * Error thrown to signal a controlled CLI exit with a specific exit code.
30612
- * This allows proper error propagation without calling process.exit() directly,
30613
- * making the code more testable and maintaining a single exit point.
30614
- */
30615
- var CLIExitError = class extends Error {
30616
- constructor(code$1) {
30617
- super(`CLI exited with code ${code$1}`);
30618
- this.code = code$1;
30619
- this.name = "CLIExitError";
30620
- }
30621
- };
30622
-
30623
30589
  //#endregion
30624
30590
  //#region node_modules/chalk/source/vendor/ansi-styles/index.js
30625
30591
  const ANSI_BACKGROUND_OFFSET = 10;
@@ -31186,7 +31152,7 @@ async function runCommand(commandFn, options) {
31186
31152
  } catch (e$1) {
31187
31153
  if (e$1 instanceof Error) M.error(e$1.stack ?? e$1.message);
31188
31154
  else M.error(String(e$1));
31189
- throw new CLIExitError(1);
31155
+ process.exit(1);
31190
31156
  }
31191
31157
  }
31192
31158
 
@@ -31356,8 +31322,7 @@ const logoutCommand = new Command("logout").description("Logout from current dev
31356
31322
  async function pushEntitiesAction() {
31357
31323
  const { entities } = await readProjectConfig();
31358
31324
  if (entities.length === 0) return { outroMessage: "No entities found in project" };
31359
- const entityNames = entities.map((e$1) => e$1.name).join(", ");
31360
- M.info(`Found ${entities.length} entities to push: ${entityNames}`);
31325
+ M.info(`Found ${entities.length} entities to push`);
31361
31326
  const result = await runTask("Pushing entities to Base44", async () => {
31362
31327
  return await pushEntities(entities);
31363
31328
  }, {
@@ -38066,13 +38031,6 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
38066
38031
  //#region src/cli/commands/project/create.ts
38067
38032
  var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
38068
38033
  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
- }];
38076
38034
  async function getTemplateById(templateId) {
38077
38035
  const templates = await listTemplates();
38078
38036
  const template = templates.find((t) => t.id === templateId);
@@ -38135,7 +38093,6 @@ async function createInteractive(options) {
38135
38093
  description: result.description || void 0,
38136
38094
  projectPath: result.projectPath,
38137
38095
  deploy: options.deploy,
38138
- skills: options.skills,
38139
38096
  isInteractive: true
38140
38097
  });
38141
38098
  }
@@ -38146,11 +38103,10 @@ async function createNonInteractive(options) {
38146
38103
  description: options.description,
38147
38104
  projectPath: options.path,
38148
38105
  deploy: options.deploy,
38149
- skills: options.skills,
38150
38106
  isInteractive: false
38151
38107
  });
38152
38108
  }
38153
- async function executeCreate({ template, name: rawName, description, projectPath, deploy, skills, isInteractive }) {
38109
+ async function executeCreate({ template, name: rawName, description, projectPath, deploy, isInteractive }) {
38154
38110
  const name$1 = rawName.trim();
38155
38111
  const resolvedPath = resolve(projectPath);
38156
38112
  const { projectId } = await runTask("Setting up your project...", async () => {
@@ -38210,45 +38166,12 @@ async function executeCreate({ template, name: rawName, description, projectPath
38210
38166
  finalAppUrl = appUrl;
38211
38167
  }
38212
38168
  }
38213
- let selectedAgents = [];
38214
- if (isInteractive) {
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
38220
- });
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
- }
38246
38169
  M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
38247
38170
  M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
38248
38171
  if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
38249
38172
  return { outroMessage: "Your project is set up and ready to use" };
38250
38173
  }
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) => {
38174
+ 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").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
38252
38175
  await chooseCreate(options);
38253
38176
  });
38254
38177
 
@@ -38795,7 +38718,7 @@ var open_default = open;
38795
38718
  //#region src/cli/commands/project/dashboard.ts
38796
38719
  async function openDashboard() {
38797
38720
  const dashboardUrl = getDashboardUrl();
38798
- if (!process.env.CI) await open_default(dashboardUrl);
38721
+ await open_default(dashboardUrl);
38799
38722
  return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
38800
38723
  }
38801
38724
  const dashboardCommand = new Command("dashboard").description("Open the app dashboard in your browser").action(async () => {
@@ -38977,7 +38900,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
38977
38900
  var version = "0.0.17";
38978
38901
 
38979
38902
  //#endregion
38980
- //#region src/cli/program.ts
38903
+ //#region src/cli/index.ts
38981
38904
  const program = new Command();
38982
38905
  program.name("base44").description("Base44 CLI - Unified interface for managing Base44 applications").version(version);
38983
38906
  program.configureHelp({ sortSubcommands: true });
@@ -38991,6 +38914,7 @@ program.addCommand(linkCommand);
38991
38914
  program.addCommand(entitiesPushCommand);
38992
38915
  program.addCommand(functionsDeployCommand);
38993
38916
  program.addCommand(siteDeployCommand);
38917
+ program.parse();
38994
38918
 
38995
38919
  //#endregion
38996
- export { CLIExitError, program };
38920
+ export { };
package/package.json CHANGED
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "name": "@base44-preview/cli",
3
- "version": "0.0.17-pr.19.e5e923a",
3
+ "version": "0.0.17-pr.93.f6d87d6",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
- "bin": {
7
- "base44": "./bin/run.js"
6
+ "main": "./dist/cli/index.js",
7
+ "bin": "./dist/cli/index.js",
8
+ "exports": {
9
+ ".": "./dist/cli/index.js"
8
10
  },
9
11
  "files": [
10
- "dist",
11
- "bin"
12
+ "dist"
12
13
  ],
13
14
  "scripts": {
14
15
  "build": "tsdown",
15
16
  "typecheck": "tsc --noEmit",
16
- "dev": "./bin/dev.js",
17
- "start": "./bin/run.js",
17
+ "dev": "tsx src/cli/index.ts",
18
+ "start": "node dist/cli/index.js",
18
19
  "clean": "rm -rf dist",
19
- "lint": "eslint src tests",
20
+ "lint": "eslint src",
20
21
  "test": "vitest run",
21
22
  "test:watch": "vitest"
22
23
  },
@@ -52,12 +53,9 @@
52
53
  "json5": "^2.2.3",
53
54
  "ky": "^1.14.2",
54
55
  "lodash.kebabcase": "^4.1.1",
55
- "msw": "^2.12.7",
56
56
  "open": "^11.0.0",
57
57
  "p-wait-for": "^6.0.0",
58
- "strip-ansi": "^7.1.2",
59
58
  "tar": "^7.5.4",
60
- "tmp-promise": "^3.0.3",
61
59
  "tsdown": "^0.12.4",
62
60
  "tsx": "^4.19.2",
63
61
  "typescript": "^5.7.2",
@@ -67,8 +65,5 @@
67
65
  },
68
66
  "engines": {
69
67
  "node": ">=20.19.0"
70
- },
71
- "optionalDependencies": {
72
- "@rollup/rollup-linux-x64-gnu": "^4.56.0"
73
68
  }
74
69
  }
package/bin/dev.cmd DELETED
@@ -1,2 +0,0 @@
1
- @echo off
2
- npx tsx "%~dp0\dev.js" %*
package/bin/dev.js DELETED
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env tsx
2
- import { program, CLIExitError } from "../src/cli/index.ts";
3
-
4
- try {
5
- await program.parseAsync();
6
- } catch (error) {
7
- if (error instanceof CLIExitError) {
8
- process.exit(error.code);
9
- }
10
- console.error(error);
11
- process.exit(1);
12
- }
package/bin/run.cmd DELETED
@@ -1,2 +0,0 @@
1
- @echo off
2
- node "%~dp0\run.js" %*
package/bin/run.js DELETED
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- import { program, CLIExitError } from "../dist/index.js";
3
-
4
- try {
5
- await program.parseAsync();
6
- } catch (error) {
7
- if (error instanceof CLIExitError) {
8
- process.exit(error.code);
9
- }
10
- console.error(error);
11
- process.exit(1);
12
- }