@base44-preview/cli 0.0.38-pr.370.7812daf → 0.0.38-pr.370.cac524d
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 +0 -31
- package/dist/cli/index.js +30 -11
- package/dist/cli/index.js.map +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,34 +96,3 @@ Found a bug? [Open an issue](https://github.com/base44/cli/issues).
|
|
|
96
96
|
## License
|
|
97
97
|
|
|
98
98
|
MIT
|
|
99
|
-
|
|
100
|
-
## Configuration reference
|
|
101
|
-
|
|
102
|
-
The `base44/config.jsonc` file controls project settings:
|
|
103
|
-
|
|
104
|
-
| Field | Type | Default | Description |
|
|
105
|
-
| ----- | ---- | ------- | ----------- |
|
|
106
|
-
| `name` | string | required | App name |
|
|
107
|
-
| `description` | string | — | App description |
|
|
108
|
-
| `visibility` | `"public"` \| `"private"` | — | App visibility. When set, `base44 deploy` syncs this to the server. `"public"` makes the app accessible without login; `"private"` restricts access. Omit to leave the current server setting unchanged. |
|
|
109
|
-
| `site.buildCommand` | string | — | Command to build the site |
|
|
110
|
-
| `site.outputDirectory` | string | — | Directory containing built site files |
|
|
111
|
-
| `site.serveCommand` | string | — | Command to serve the site locally |
|
|
112
|
-
| `site.installCommand` | string | — | Command to install site dependencies |
|
|
113
|
-
| `entitiesDir` | string | `entities` | Directory for entity schemas |
|
|
114
|
-
| `functionsDir` | string | `functions` | Directory for serverless functions |
|
|
115
|
-
| `agentsDir` | string | `agents` | Directory for AI agent configs |
|
|
116
|
-
| `connectorsDir` | string | `connectors` | Directory for connector configs |
|
|
117
|
-
|
|
118
|
-
### Example
|
|
119
|
-
|
|
120
|
-
```jsonc
|
|
121
|
-
{
|
|
122
|
-
"name": "my-app",
|
|
123
|
-
"visibility": "public",
|
|
124
|
-
"site": {
|
|
125
|
-
"buildCommand": "npm run build",
|
|
126
|
-
"outputDirectory": "dist"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
```
|
package/dist/cli/index.js
CHANGED
|
@@ -225313,6 +225313,9 @@ var UserInfoSchema = exports_external.object({
|
|
|
225313
225313
|
name: exports_external.string()
|
|
225314
225314
|
});
|
|
225315
225315
|
|
|
225316
|
+
// src/core/clients/base44-client.ts
|
|
225317
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
225318
|
+
|
|
225316
225319
|
// node_modules/ky/distribution/errors/HTTPError.js
|
|
225317
225320
|
class HTTPError extends Error {
|
|
225318
225321
|
response;
|
|
@@ -232224,7 +232227,7 @@ async function createProject(projectName, description) {
|
|
|
232224
232227
|
name: projectName,
|
|
232225
232228
|
user_description: description ?? `Backend for '${projectName}'`,
|
|
232226
232229
|
is_managed_source_code: false,
|
|
232227
|
-
public_settings: "
|
|
232230
|
+
public_settings: "private"
|
|
232228
232231
|
}
|
|
232229
232232
|
});
|
|
232230
232233
|
} catch (error48) {
|
|
@@ -232242,9 +232245,10 @@ var VISIBILITY_TO_PUBLIC_SETTINGS = {
|
|
|
232242
232245
|
public: "public_without_login",
|
|
232243
232246
|
private: "private"
|
|
232244
232247
|
};
|
|
232245
|
-
async function updateProjectVisibility(
|
|
232248
|
+
async function updateProjectVisibility(visibility) {
|
|
232249
|
+
const appClient = getAppClient();
|
|
232246
232250
|
try {
|
|
232247
|
-
await
|
|
232251
|
+
await appClient.patch("", {
|
|
232248
232252
|
json: {
|
|
232249
232253
|
public_settings: VISIBILITY_TO_PUBLIC_SETTINGS[visibility]
|
|
232250
232254
|
}
|
|
@@ -234417,8 +234421,7 @@ async function deployAll(projectData) {
|
|
|
234417
234421
|
await agentResource.push(agents);
|
|
234418
234422
|
const { results: connectorResults } = await pushConnectors(connectors);
|
|
234419
234423
|
if (project.visibility) {
|
|
234420
|
-
|
|
234421
|
-
await updateProjectVisibility(appId, project.visibility);
|
|
234424
|
+
await updateProjectVisibility(project.visibility);
|
|
234422
234425
|
}
|
|
234423
234426
|
if (project.site?.outputDirectory) {
|
|
234424
234427
|
const outputDir = resolve(project.root, project.site.outputDirectory);
|
|
@@ -234451,8 +234454,12 @@ async function handleUnauthorized(request, _options, response) {
|
|
|
234451
234454
|
return;
|
|
234452
234455
|
}
|
|
234453
234456
|
retriedRequests.add(request);
|
|
234457
|
+
const requestId = request.headers.get("X-Request-ID");
|
|
234454
234458
|
return distribution_default(request.clone(), {
|
|
234455
|
-
headers: {
|
|
234459
|
+
headers: {
|
|
234460
|
+
...requestId && { "X-Request-ID": requestId },
|
|
234461
|
+
Authorization: `Bearer ${newAccessToken}`
|
|
234462
|
+
}
|
|
234456
234463
|
});
|
|
234457
234464
|
}
|
|
234458
234465
|
var base44Client = distribution_default.create({
|
|
@@ -234462,6 +234469,9 @@ var base44Client = distribution_default.create({
|
|
|
234462
234469
|
},
|
|
234463
234470
|
hooks: {
|
|
234464
234471
|
beforeRequest: [
|
|
234472
|
+
(request) => {
|
|
234473
|
+
request.headers.set("X-Request-ID", randomUUID2());
|
|
234474
|
+
},
|
|
234465
234475
|
captureRequestBody,
|
|
234466
234476
|
async (request) => {
|
|
234467
234477
|
try {
|
|
@@ -234487,10 +234497,18 @@ function getAppClient() {
|
|
|
234487
234497
|
});
|
|
234488
234498
|
}
|
|
234489
234499
|
// src/core/clients/oauth-client.ts
|
|
234500
|
+
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
234490
234501
|
var oauthClient = distribution_default.create({
|
|
234491
234502
|
prefixUrl: getBase44ApiUrl(),
|
|
234492
234503
|
headers: {
|
|
234493
234504
|
"User-Agent": "Base44 CLI"
|
|
234505
|
+
},
|
|
234506
|
+
hooks: {
|
|
234507
|
+
beforeRequest: [
|
|
234508
|
+
(request) => {
|
|
234509
|
+
request.headers.set("X-Request-ID", randomUUID3());
|
|
234510
|
+
}
|
|
234511
|
+
]
|
|
234494
234512
|
}
|
|
234495
234513
|
});
|
|
234496
234514
|
// src/core/auth/api.ts
|
|
@@ -234635,7 +234653,8 @@ async function deleteSecret(name2) {
|
|
|
234635
234653
|
let response;
|
|
234636
234654
|
try {
|
|
234637
234655
|
response = await appClient.delete("secrets", {
|
|
234638
|
-
searchParams: { secret_name: name2 }
|
|
234656
|
+
searchParams: { secret_name: name2 },
|
|
234657
|
+
timeout: false
|
|
234639
234658
|
});
|
|
234640
234659
|
} catch (error48) {
|
|
234641
234660
|
throw await ApiError.fromHttpError(error48, "deleting secret");
|
|
@@ -244607,7 +244626,7 @@ function createEntityRoutes(db2, logger, remoteProxy, broadcast) {
|
|
|
244607
244626
|
// src/cli/dev/dev-server/routes/integrations.ts
|
|
244608
244627
|
var import_express3 = __toESM(require_express(), 1);
|
|
244609
244628
|
var import_multer = __toESM(require_multer(), 1);
|
|
244610
|
-
import { randomUUID as
|
|
244629
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
244611
244630
|
import fs28 from "node:fs";
|
|
244612
244631
|
import path18 from "node:path";
|
|
244613
244632
|
function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger) {
|
|
@@ -244618,7 +244637,7 @@ function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger) {
|
|
|
244618
244637
|
destination: mediaFilesDir,
|
|
244619
244638
|
filename: (_req, file2, cb2) => {
|
|
244620
244639
|
const ext = path18.extname(file2.originalname);
|
|
244621
|
-
cb2(null, `${
|
|
244640
|
+
cb2(null, `${randomUUID4()}${ext}`);
|
|
244622
244641
|
}
|
|
244623
244642
|
});
|
|
244624
244643
|
const MAX_FILE_SIZE = 50 * 1024 * 1024;
|
|
@@ -244645,7 +244664,7 @@ function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger) {
|
|
|
244645
244664
|
res.status(400).json({ error: "file_uri is required" });
|
|
244646
244665
|
return;
|
|
244647
244666
|
}
|
|
244648
|
-
const signature =
|
|
244667
|
+
const signature = randomUUID4();
|
|
244649
244668
|
const signed_url = `${baseUrl}/media/${file_uri}?signature=${signature}`;
|
|
244650
244669
|
res.json({ signed_url });
|
|
244651
244670
|
});
|
|
@@ -250859,4 +250878,4 @@ export {
|
|
|
250859
250878
|
CLIExitError
|
|
250860
250879
|
};
|
|
250861
250880
|
|
|
250862
|
-
//# debugId=
|
|
250881
|
+
//# debugId=29B3A9446AA5803764756E2164756E21
|