@base44-preview/cli 0.0.38-pr.367.f37f692 → 0.0.38-pr.370.7812daf
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 +31 -0
- package/dist/cli/index.js +25 -78
- package/dist/cli/index.js.map +9 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,3 +96,34 @@ 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
|
@@ -226169,11 +226169,15 @@ var SiteConfigSchema = exports_external.object({
|
|
|
226169
226169
|
outputDirectory: exports_external.string().optional(),
|
|
226170
226170
|
installCommand: exports_external.string().optional()
|
|
226171
226171
|
});
|
|
226172
|
+
var VisibilitySchema = exports_external.enum(["public", "private"], {
|
|
226173
|
+
error: 'Invalid visibility value. Allowed values: "public", "private"'
|
|
226174
|
+
});
|
|
226172
226175
|
var ProjectConfigSchema = exports_external.object({
|
|
226173
226176
|
name: exports_external.string({
|
|
226174
226177
|
error: "App name cannot be empty"
|
|
226175
226178
|
}).min(1, "App name cannot be empty"),
|
|
226176
226179
|
description: exports_external.string().optional(),
|
|
226180
|
+
visibility: VisibilitySchema.optional(),
|
|
226177
226181
|
site: SiteConfigSchema.optional(),
|
|
226178
226182
|
entitiesDir: exports_external.string().optional().default("entities"),
|
|
226179
226183
|
functionsDir: exports_external.string().optional().default("functions"),
|
|
@@ -232234,6 +232238,21 @@ async function createProject(projectName, description) {
|
|
|
232234
232238
|
projectId: result.data.id
|
|
232235
232239
|
};
|
|
232236
232240
|
}
|
|
232241
|
+
var VISIBILITY_TO_PUBLIC_SETTINGS = {
|
|
232242
|
+
public: "public_without_login",
|
|
232243
|
+
private: "private"
|
|
232244
|
+
};
|
|
232245
|
+
async function updateProjectVisibility(projectId, visibility) {
|
|
232246
|
+
try {
|
|
232247
|
+
await base44Client.patch(`api/apps/${projectId}`, {
|
|
232248
|
+
json: {
|
|
232249
|
+
public_settings: VISIBILITY_TO_PUBLIC_SETTINGS[visibility]
|
|
232250
|
+
}
|
|
232251
|
+
});
|
|
232252
|
+
} catch (error48) {
|
|
232253
|
+
throw await ApiError.fromHttpError(error48, "updating project visibility");
|
|
232254
|
+
}
|
|
232255
|
+
}
|
|
232237
232256
|
async function listProjects() {
|
|
232238
232257
|
let response;
|
|
232239
232258
|
try {
|
|
@@ -233475,43 +233494,6 @@ var RemoveConnectorResponseSchema = exports_external.object({
|
|
|
233475
233494
|
status: data.status,
|
|
233476
233495
|
integrationType: data.integration_type
|
|
233477
233496
|
}));
|
|
233478
|
-
var ConnectionConfigFieldSchema = exports_external.object({
|
|
233479
|
-
name: exports_external.string(),
|
|
233480
|
-
display_name: exports_external.string(),
|
|
233481
|
-
description: exports_external.string(),
|
|
233482
|
-
placeholder: exports_external.string(),
|
|
233483
|
-
required: exports_external.boolean(),
|
|
233484
|
-
validation_pattern: exports_external.string().nullable().optional(),
|
|
233485
|
-
validation_error: exports_external.string().nullable().optional()
|
|
233486
|
-
});
|
|
233487
|
-
var AvailableIntegrationSchema = exports_external.object({
|
|
233488
|
-
integration_type: exports_external.string(),
|
|
233489
|
-
display_name: exports_external.string(),
|
|
233490
|
-
description: exports_external.string(),
|
|
233491
|
-
notes: exports_external.string().nullable(),
|
|
233492
|
-
usage_guide: exports_external.string().nullable(),
|
|
233493
|
-
connection_config_fields: exports_external.array(ConnectionConfigFieldSchema)
|
|
233494
|
-
});
|
|
233495
|
-
var ListAvailableIntegrationsResponseSchema = exports_external.object({
|
|
233496
|
-
available_integrations: exports_external.array(AvailableIntegrationSchema)
|
|
233497
|
-
}).transform((data) => ({
|
|
233498
|
-
availableIntegrations: data.available_integrations.map((i) => ({
|
|
233499
|
-
integrationType: i.integration_type,
|
|
233500
|
-
displayName: i.display_name,
|
|
233501
|
-
description: i.description,
|
|
233502
|
-
notes: i.notes,
|
|
233503
|
-
usageGuide: i.usage_guide,
|
|
233504
|
-
connectionConfigFields: i.connection_config_fields.map((f) => ({
|
|
233505
|
-
name: f.name,
|
|
233506
|
-
displayName: f.display_name,
|
|
233507
|
-
description: f.description,
|
|
233508
|
-
placeholder: f.placeholder,
|
|
233509
|
-
required: f.required,
|
|
233510
|
-
validationPattern: f.validation_pattern,
|
|
233511
|
-
validationError: f.validation_error
|
|
233512
|
-
}))
|
|
233513
|
-
}))
|
|
233514
|
-
}));
|
|
233515
233497
|
|
|
233516
233498
|
// src/core/resources/connector/api.ts
|
|
233517
233499
|
async function listConnectors() {
|
|
@@ -233565,20 +233547,6 @@ async function getOAuthStatus(integrationType, connectionId) {
|
|
|
233565
233547
|
}
|
|
233566
233548
|
return result.data;
|
|
233567
233549
|
}
|
|
233568
|
-
async function listAvailableIntegrations() {
|
|
233569
|
-
const appClient = getAppClient();
|
|
233570
|
-
let response;
|
|
233571
|
-
try {
|
|
233572
|
-
response = await appClient.get("external-auth/available-integrations");
|
|
233573
|
-
} catch (error48) {
|
|
233574
|
-
throw await ApiError.fromHttpError(error48, "listing available integrations");
|
|
233575
|
-
}
|
|
233576
|
-
const result = ListAvailableIntegrationsResponseSchema.safeParse(await response.json());
|
|
233577
|
-
if (!result.success) {
|
|
233578
|
-
throw new SchemaValidationError("Invalid response from server", result.error);
|
|
233579
|
-
}
|
|
233580
|
-
return result.data;
|
|
233581
|
-
}
|
|
233582
233550
|
async function removeConnector(integrationType) {
|
|
233583
233551
|
const appClient = getAppClient();
|
|
233584
233552
|
let response;
|
|
@@ -234448,6 +234416,10 @@ async function deployAll(projectData) {
|
|
|
234448
234416
|
await functionResource.push(functions);
|
|
234449
234417
|
await agentResource.push(agents);
|
|
234450
234418
|
const { results: connectorResults } = await pushConnectors(connectors);
|
|
234419
|
+
if (project.visibility) {
|
|
234420
|
+
const { id: appId } = getAppConfig();
|
|
234421
|
+
await updateProjectVisibility(appId, project.visibility);
|
|
234422
|
+
}
|
|
234451
234423
|
if (project.site?.outputDirectory) {
|
|
234452
234424
|
const outputDir = resolve(project.root, project.site.outputDirectory);
|
|
234453
234425
|
const { appUrl } = await deploySite(outputDir);
|
|
@@ -242272,31 +242244,6 @@ function getWhoamiCommand(context) {
|
|
|
242272
242244
|
});
|
|
242273
242245
|
}
|
|
242274
242246
|
|
|
242275
|
-
// src/cli/commands/connectors/list-available.ts
|
|
242276
|
-
async function listAvailableAction() {
|
|
242277
|
-
const { availableIntegrations } = await runTask("Fetching available integrations from Base44", async () => {
|
|
242278
|
-
return await listAvailableIntegrations();
|
|
242279
|
-
}, {
|
|
242280
|
-
successMessage: "Available integrations fetched successfully",
|
|
242281
|
-
errorMessage: "Failed to fetch available integrations"
|
|
242282
|
-
});
|
|
242283
|
-
if (availableIntegrations.length === 0) {
|
|
242284
|
-
return { outroMessage: "No available integrations found." };
|
|
242285
|
-
}
|
|
242286
|
-
for (const integration of availableIntegrations) {
|
|
242287
|
-
R2.info(`${theme.styles.bold(integration.displayName)} ${theme.styles.dim(`(${integration.integrationType})`)}${integration.description ? `
|
|
242288
|
-
${theme.styles.dim(integration.description)}` : ""}`);
|
|
242289
|
-
}
|
|
242290
|
-
return {
|
|
242291
|
-
outroMessage: `Found ${availableIntegrations.length} available integrations.`
|
|
242292
|
-
};
|
|
242293
|
-
}
|
|
242294
|
-
function getConnectorsListAvailableCommand(context) {
|
|
242295
|
-
return new Command("list-available").description("List all available integration types").action(async () => {
|
|
242296
|
-
await runCommand(listAvailableAction, { requireAuth: true }, context);
|
|
242297
|
-
});
|
|
242298
|
-
}
|
|
242299
|
-
|
|
242300
242247
|
// src/cli/commands/connectors/pull.ts
|
|
242301
242248
|
import { dirname as dirname9, join as join10 } from "node:path";
|
|
242302
242249
|
async function pullConnectorsAction() {
|
|
@@ -243097,7 +243044,7 @@ function getConnectorsPushCommand(context) {
|
|
|
243097
243044
|
|
|
243098
243045
|
// src/cli/commands/connectors/index.ts
|
|
243099
243046
|
function getConnectorsCommand(context) {
|
|
243100
|
-
return new Command("connectors").description("Manage project connectors (OAuth integrations)").addCommand(
|
|
243047
|
+
return new Command("connectors").description("Manage project connectors (OAuth integrations)").addCommand(getConnectorsPullCommand(context)).addCommand(getConnectorsPushCommand(context));
|
|
243101
243048
|
}
|
|
243102
243049
|
|
|
243103
243050
|
// src/cli/commands/dashboard/open.ts
|
|
@@ -250912,4 +250859,4 @@ export {
|
|
|
250912
250859
|
CLIExitError
|
|
250913
250860
|
};
|
|
250914
250861
|
|
|
250915
|
-
//# debugId=
|
|
250862
|
+
//# debugId=80642F24B975078764756E2164756E21
|