@base44-preview/cli 0.0.17-pr.93.f6d87d6 → 0.0.17-pr.95.543227e
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/README.md +3 -1
- package/bin/dev.js +12 -0
- package/bin/run.js +12 -0
- package/dist/{cli/index.js → index.js} +62 -7
- package/package.json +7 -8
- /package/dist/{cli/templates → templates}/backend-and-client/.nvmrc +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/README.md +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/app.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/entities/task.jsonc +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/components.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/index.html +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/jsconfig.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/package.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/postcss.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/App.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/button.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/input.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/index.css +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/main.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/tailwind.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/vite.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-only/base44/app.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-only/base44/config.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/templates.json +0 -0
package/README.md
CHANGED
|
@@ -45,7 +45,6 @@ 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 |
|
|
49
48
|
| [`link`](https://docs.base44.com/developers/references/cli/commands/link) | Link a local project to a project on Base44 |
|
|
50
49
|
| [`dashboard`](https://docs.base44.com/developers/references/cli/commands/dashboard) | Open the app dashboard in your browser |
|
|
51
50
|
| [`login`](https://docs.base44.com/developers/references/cli/commands/login) | Authenticate with Base44 |
|
|
@@ -55,6 +54,9 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
|
|
|
55
54
|
| [`functions deploy`](https://docs.base44.com/developers/references/cli/commands/functions-deploy) | Deploy local functions to Base44 |
|
|
56
55
|
| [`site deploy`](https://docs.base44.com/developers/references/cli/commands/site-deploy) | Deploy built site files to Base44 hosting |
|
|
57
56
|
|
|
57
|
+
|
|
58
|
+
<!--| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app | -->
|
|
59
|
+
|
|
58
60
|
## Help
|
|
59
61
|
|
|
60
62
|
```bash
|
package/bin/dev.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { createRequire } from "node:module";
|
|
3
2
|
import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
|
|
4
3
|
import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
@@ -30586,6 +30585,21 @@ async function getUserInfo(accessToken) {
|
|
|
30586
30585
|
return result.data;
|
|
30587
30586
|
}
|
|
30588
30587
|
|
|
30588
|
+
//#endregion
|
|
30589
|
+
//#region src/cli/errors.ts
|
|
30590
|
+
/**
|
|
30591
|
+
* Error thrown to signal a controlled CLI exit with a specific exit code.
|
|
30592
|
+
* This allows proper error propagation without calling process.exit() directly,
|
|
30593
|
+
* making the code more testable and maintaining a single exit point.
|
|
30594
|
+
*/
|
|
30595
|
+
var CLIExitError = class extends Error {
|
|
30596
|
+
constructor(code$1) {
|
|
30597
|
+
super(`CLI exited with code ${code$1}`);
|
|
30598
|
+
this.code = code$1;
|
|
30599
|
+
this.name = "CLIExitError";
|
|
30600
|
+
}
|
|
30601
|
+
};
|
|
30602
|
+
|
|
30589
30603
|
//#endregion
|
|
30590
30604
|
//#region node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
30591
30605
|
const ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -31152,7 +31166,7 @@ async function runCommand(commandFn, options) {
|
|
|
31152
31166
|
} catch (e$1) {
|
|
31153
31167
|
if (e$1 instanceof Error) M.error(e$1.stack ?? e$1.message);
|
|
31154
31168
|
else M.error(String(e$1));
|
|
31155
|
-
|
|
31169
|
+
throw new CLIExitError(1);
|
|
31156
31170
|
}
|
|
31157
31171
|
}
|
|
31158
31172
|
|
|
@@ -38031,6 +38045,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38031
38045
|
//#region src/cli/commands/project/create.ts
|
|
38032
38046
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38033
38047
|
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38048
|
+
const SUPPORTED_AGENTS = [{
|
|
38049
|
+
value: "cursor",
|
|
38050
|
+
label: "Cursor"
|
|
38051
|
+
}, {
|
|
38052
|
+
value: "claude-code",
|
|
38053
|
+
label: "Claude Code"
|
|
38054
|
+
}];
|
|
38034
38055
|
async function getTemplateById(templateId) {
|
|
38035
38056
|
const templates = await listTemplates();
|
|
38036
38057
|
const template = templates.find((t) => t.id === templateId);
|
|
@@ -38093,6 +38114,7 @@ async function createInteractive(options) {
|
|
|
38093
38114
|
description: result.description || void 0,
|
|
38094
38115
|
projectPath: result.projectPath,
|
|
38095
38116
|
deploy: options.deploy,
|
|
38117
|
+
skills: options.skills,
|
|
38096
38118
|
isInteractive: true
|
|
38097
38119
|
});
|
|
38098
38120
|
}
|
|
@@ -38103,10 +38125,11 @@ async function createNonInteractive(options) {
|
|
|
38103
38125
|
description: options.description,
|
|
38104
38126
|
projectPath: options.path,
|
|
38105
38127
|
deploy: options.deploy,
|
|
38128
|
+
skills: options.skills,
|
|
38106
38129
|
isInteractive: false
|
|
38107
38130
|
});
|
|
38108
38131
|
}
|
|
38109
|
-
async function executeCreate({ template, name: rawName, description, projectPath, deploy, isInteractive }) {
|
|
38132
|
+
async function executeCreate({ template, name: rawName, description, projectPath, deploy, skills, isInteractive }) {
|
|
38110
38133
|
const name$1 = rawName.trim();
|
|
38111
38134
|
const resolvedPath = resolve(projectPath);
|
|
38112
38135
|
const { projectId } = await runTask("Setting up your project...", async () => {
|
|
@@ -38166,12 +38189,45 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38166
38189
|
finalAppUrl = appUrl;
|
|
38167
38190
|
}
|
|
38168
38191
|
}
|
|
38192
|
+
let selectedAgents = [];
|
|
38193
|
+
if (isInteractive) {
|
|
38194
|
+
const result = await fe({
|
|
38195
|
+
message: "Add AI agent skills? (Select agents to configure)",
|
|
38196
|
+
options: SUPPORTED_AGENTS,
|
|
38197
|
+
initialValues: SUPPORTED_AGENTS.map((agent) => agent.value),
|
|
38198
|
+
required: false
|
|
38199
|
+
});
|
|
38200
|
+
if (!pD(result)) selectedAgents = result;
|
|
38201
|
+
} else if (skills) selectedAgents = SUPPORTED_AGENTS.map((agent) => agent.value);
|
|
38202
|
+
if (selectedAgents.length > 0) {
|
|
38203
|
+
const agentArgs = selectedAgents.flatMap((agent) => ["-a", agent]);
|
|
38204
|
+
M.step("Installing skills for: " + selectedAgents.join(", "));
|
|
38205
|
+
await runTask("Installing skills for: " + selectedAgents.join(", "), async () => {
|
|
38206
|
+
await execa("npx", [
|
|
38207
|
+
"-y",
|
|
38208
|
+
"add-skill",
|
|
38209
|
+
"base44/skills",
|
|
38210
|
+
"-y",
|
|
38211
|
+
"-s",
|
|
38212
|
+
"base44-cli",
|
|
38213
|
+
"-s",
|
|
38214
|
+
"base44-sdk",
|
|
38215
|
+
...agentArgs
|
|
38216
|
+
], {
|
|
38217
|
+
cwd: resolvedPath,
|
|
38218
|
+
stdio: "inherit"
|
|
38219
|
+
});
|
|
38220
|
+
}, {
|
|
38221
|
+
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
38222
|
+
errorMessage: "Failed to add AI agent skills - you can add them later with: npx add-skill base44/skills"
|
|
38223
|
+
});
|
|
38224
|
+
}
|
|
38169
38225
|
M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
|
|
38170
38226
|
M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
|
|
38171
38227
|
if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
38172
38228
|
return { outroMessage: "Your project is set up and ready to use" };
|
|
38173
38229
|
}
|
|
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) => {
|
|
38230
|
+
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) => {
|
|
38175
38231
|
await chooseCreate(options);
|
|
38176
38232
|
});
|
|
38177
38233
|
|
|
@@ -38900,7 +38956,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
|
|
|
38900
38956
|
var version = "0.0.17";
|
|
38901
38957
|
|
|
38902
38958
|
//#endregion
|
|
38903
|
-
//#region src/cli/
|
|
38959
|
+
//#region src/cli/program.ts
|
|
38904
38960
|
const program = new Command();
|
|
38905
38961
|
program.name("base44").description("Base44 CLI - Unified interface for managing Base44 applications").version(version);
|
|
38906
38962
|
program.configureHelp({ sortSubcommands: true });
|
|
@@ -38914,7 +38970,6 @@ program.addCommand(linkCommand);
|
|
|
38914
38970
|
program.addCommand(entitiesPushCommand);
|
|
38915
38971
|
program.addCommand(functionsDeployCommand);
|
|
38916
38972
|
program.addCommand(siteDeployCommand);
|
|
38917
|
-
program.parse();
|
|
38918
38973
|
|
|
38919
38974
|
//#endregion
|
|
38920
|
-
export {
|
|
38975
|
+
export { CLIExitError, program };
|
package/package.json
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base44-preview/cli",
|
|
3
|
-
"version": "0.0.17-pr.
|
|
3
|
+
"version": "0.0.17-pr.95.543227e",
|
|
4
4
|
"description": "Base44 CLI - Unified interface for managing Base44 applications",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./dist/cli/index.js"
|
|
6
|
+
"bin": {
|
|
7
|
+
"base44": "./bin/run.js"
|
|
10
8
|
},
|
|
11
9
|
"files": [
|
|
12
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"bin"
|
|
13
12
|
],
|
|
14
13
|
"scripts": {
|
|
15
14
|
"build": "tsdown",
|
|
16
15
|
"typecheck": "tsc --noEmit",
|
|
17
|
-
"dev": "
|
|
18
|
-
"start": "
|
|
16
|
+
"dev": "./bin/dev.js",
|
|
17
|
+
"start": "./bin/run.js",
|
|
19
18
|
"clean": "rm -rf dist",
|
|
20
19
|
"lint": "eslint src",
|
|
21
20
|
"test": "vitest run",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|