@base44-preview/cli 0.0.3-pr.20.62256c0 → 0.0.3-pr.20.c1a0030
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 +15 -1
- package/dist/cli/index.js +3 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,10 @@ base44 create
|
|
|
25
25
|
|
|
26
26
|
# 3. Push entities to Base44
|
|
27
27
|
base44 entities push
|
|
28
|
+
|
|
29
|
+
# 4. Build and deploy your site
|
|
30
|
+
npm run build
|
|
31
|
+
base44 site deploy
|
|
28
32
|
```
|
|
29
33
|
|
|
30
34
|
## Commands
|
|
@@ -49,6 +53,12 @@ base44 entities push
|
|
|
49
53
|
|---------|-------------|
|
|
50
54
|
| `base44 entities push` | Push local entity schemas to Base44 |
|
|
51
55
|
|
|
56
|
+
### Site Deployment
|
|
57
|
+
|
|
58
|
+
| Command | Description |
|
|
59
|
+
|---------|-------------|
|
|
60
|
+
| `base44 site deploy` | Deploy built site files to Base44 hosting |
|
|
61
|
+
|
|
52
62
|
## Configuration
|
|
53
63
|
|
|
54
64
|
### Project Configuration
|
|
@@ -61,7 +71,10 @@ Base44 projects are configured via a `config.jsonc` (or `config.json`) file in t
|
|
|
61
71
|
"id": "your-app-id", // Set after project creation
|
|
62
72
|
"name": "My Project",
|
|
63
73
|
"entitiesDir": "./entities", // Default: ./entities
|
|
64
|
-
"functionsDir": "./functions"
|
|
74
|
+
"functionsDir": "./functions", // Default: ./functions
|
|
75
|
+
"site": {
|
|
76
|
+
"outputDirectory": "../dist" // Path to built site files
|
|
77
|
+
}
|
|
65
78
|
}
|
|
66
79
|
```
|
|
67
80
|
|
|
@@ -91,6 +104,7 @@ my-project/
|
|
|
91
104
|
│ │ ├── user.jsonc
|
|
92
105
|
│ │ └── product.jsonc
|
|
93
106
|
├── src/ # Your frontend code
|
|
107
|
+
├── dist/ # Built site files (for deployment)
|
|
94
108
|
└── package.json
|
|
95
109
|
```
|
|
96
110
|
|
package/dist/cli/index.js
CHANGED
|
@@ -18763,22 +18763,6 @@ const logoutCommand = new Command("logout").description("Logout from current dev
|
|
|
18763
18763
|
await runCommand(logout, { requireAuth: true });
|
|
18764
18764
|
});
|
|
18765
18765
|
|
|
18766
|
-
//#endregion
|
|
18767
|
-
//#region src/cli/commands/project/show-project.ts
|
|
18768
|
-
async function showProject() {
|
|
18769
|
-
const projectData = await runTask("Reading project configuration", async () => {
|
|
18770
|
-
return await readProjectConfig();
|
|
18771
|
-
}, {
|
|
18772
|
-
successMessage: "Project configuration loaded",
|
|
18773
|
-
errorMessage: "Failed to load project configuration"
|
|
18774
|
-
});
|
|
18775
|
-
const jsonOutput = JSON.stringify(projectData, null, 2);
|
|
18776
|
-
M.info(jsonOutput);
|
|
18777
|
-
}
|
|
18778
|
-
const showProjectCommand = new Command("show-project").description("Display project configuration, entities, and functions").action(async () => {
|
|
18779
|
-
await runCommand(showProject);
|
|
18780
|
-
});
|
|
18781
|
-
|
|
18782
18766
|
//#endregion
|
|
18783
18767
|
//#region src/core/site/schema.ts
|
|
18784
18768
|
/**
|
|
@@ -18821,8 +18805,9 @@ async function getSiteFilePaths(outputDir) {
|
|
|
18821
18805
|
*/
|
|
18822
18806
|
async function uploadSite(archivePath) {
|
|
18823
18807
|
const archiveBuffer = await readFile$1(archivePath);
|
|
18808
|
+
const blob = new Blob([archiveBuffer], { type: "application/gzip" });
|
|
18824
18809
|
const formData = new FormData();
|
|
18825
|
-
formData.append("file",
|
|
18810
|
+
formData.append("file", blob, "dist.tar.gz");
|
|
18826
18811
|
const response = await getAppClient().post("deploy-dist", { body: formData });
|
|
18827
18812
|
return DeployResponseSchema.parse(await response.json());
|
|
18828
18813
|
}
|
|
@@ -24370,7 +24355,7 @@ async function deployAction() {
|
|
|
24370
24355
|
M.success(`Site deployed to: ${result.app_url}`);
|
|
24371
24356
|
}
|
|
24372
24357
|
const siteDeployCommand = new Command("site").description("Manage site deployments").addCommand(new Command("deploy").description("Deploy built site files to Base44 hosting").action(async () => {
|
|
24373
|
-
await runCommand(deployAction);
|
|
24358
|
+
await runCommand(deployAction, { requireAuth: true });
|
|
24374
24359
|
}));
|
|
24375
24360
|
|
|
24376
24361
|
//#endregion
|
|
@@ -24385,7 +24370,6 @@ program.addCommand(loginCommand);
|
|
|
24385
24370
|
program.addCommand(whoamiCommand);
|
|
24386
24371
|
program.addCommand(logoutCommand);
|
|
24387
24372
|
program.addCommand(createCommand);
|
|
24388
|
-
program.addCommand(showProjectCommand);
|
|
24389
24373
|
program.addCommand(entitiesPushCommand);
|
|
24390
24374
|
program.addCommand(siteDeployCommand);
|
|
24391
24375
|
program.parse();
|
package/package.json
CHANGED