@base44-preview/cli 0.0.56-pr.549.64e11b5 → 0.0.56-pr.550.1f906b8
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.
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
{
|
|
6
6
|
"name": "<%= name %>"<% if (description) { %>,
|
|
7
|
-
"description": "<%= description %>"<% }
|
|
7
|
+
"description": "<%= description %>"<% } %>,
|
|
8
|
+
|
|
9
|
+
"visibility": "public"
|
|
8
10
|
|
|
9
11
|
// Site/hosting configuration
|
|
10
12
|
// Docs: https://docs.base44.com/configuration/hosting
|
package/dist/cli/index.js
CHANGED
|
@@ -233809,6 +233809,9 @@ class ApiError extends SystemError {
|
|
|
233809
233809
|
}
|
|
233810
233810
|
];
|
|
233811
233811
|
}
|
|
233812
|
+
if (statusCode && statusCode < 500) {
|
|
233813
|
+
return [];
|
|
233814
|
+
}
|
|
233812
233815
|
return [{ message: "Check your network connection and try again" }];
|
|
233813
233816
|
}
|
|
233814
233817
|
static getReasonHints(parsedResponse) {
|
|
@@ -236012,11 +236015,13 @@ var PluginMetadataSchema = exports_external.object({
|
|
|
236012
236015
|
var PluginReferenceSchema = exports_external.object({
|
|
236013
236016
|
source: exports_external.string().min(1, "Plugin source cannot be empty")
|
|
236014
236017
|
});
|
|
236018
|
+
var VISIBILITY_LEVELS = ["public", "private", "workspace"];
|
|
236015
236019
|
var ProjectConfigSchema = exports_external.object({
|
|
236016
236020
|
name: exports_external.string({
|
|
236017
236021
|
error: "App name cannot be empty"
|
|
236018
236022
|
}).min(1, "App name cannot be empty"),
|
|
236019
236023
|
description: exports_external.string().optional(),
|
|
236024
|
+
visibility: exports_external.enum(VISIBILITY_LEVELS).optional(),
|
|
236020
236025
|
site: SiteConfigSchema.optional(),
|
|
236021
236026
|
entitiesDir: exports_external.string().optional().default("entities"),
|
|
236022
236027
|
functionsDir: exports_external.string().optional().default("functions"),
|
|
@@ -241799,6 +241804,11 @@ var PublishedUrlResponseSchema = exports_external.object({
|
|
|
241799
241804
|
});
|
|
241800
241805
|
|
|
241801
241806
|
// src/core/project/api.ts
|
|
241807
|
+
var PUBLIC_SETTINGS = {
|
|
241808
|
+
public: "public_without_login",
|
|
241809
|
+
private: "private_with_login",
|
|
241810
|
+
workspace: "workspace_with_login"
|
|
241811
|
+
};
|
|
241802
241812
|
async function createProject(projectName, description) {
|
|
241803
241813
|
let response;
|
|
241804
241814
|
try {
|
|
@@ -241807,7 +241817,7 @@ async function createProject(projectName, description) {
|
|
|
241807
241817
|
name: projectName,
|
|
241808
241818
|
user_description: description ?? `Backend for '${projectName}'`,
|
|
241809
241819
|
is_managed_source_code: false,
|
|
241810
|
-
public_settings:
|
|
241820
|
+
public_settings: PUBLIC_SETTINGS.public
|
|
241811
241821
|
}
|
|
241812
241822
|
});
|
|
241813
241823
|
} catch (error48) {
|
|
@@ -241821,6 +241831,18 @@ async function createProject(projectName, description) {
|
|
|
241821
241831
|
projectId: result.data.id
|
|
241822
241832
|
};
|
|
241823
241833
|
}
|
|
241834
|
+
async function setAppVisibility(visibility) {
|
|
241835
|
+
if (!visibility)
|
|
241836
|
+
return;
|
|
241837
|
+
const { id } = getAppContext();
|
|
241838
|
+
try {
|
|
241839
|
+
await base44Client.put(`api/apps/${id}`, {
|
|
241840
|
+
json: { public_settings: PUBLIC_SETTINGS[visibility] }
|
|
241841
|
+
});
|
|
241842
|
+
} catch (error48) {
|
|
241843
|
+
throw await ApiError.fromHttpError(error48, "updating app visibility");
|
|
241844
|
+
}
|
|
241845
|
+
}
|
|
241824
241846
|
async function listProjects() {
|
|
241825
241847
|
let response;
|
|
241826
241848
|
try {
|
|
@@ -243426,7 +243448,7 @@ var ListFunctionsResponseSchema = exports_external.object({
|
|
|
243426
243448
|
var LogLevelSchema = exports_external.enum(["info", "warning", "error", "debug"]);
|
|
243427
243449
|
var FunctionLogEntrySchema = exports_external.object({
|
|
243428
243450
|
time: exports_external.string(),
|
|
243429
|
-
level:
|
|
243451
|
+
level: LogLevelSchema,
|
|
243430
243452
|
message: exports_external.string()
|
|
243431
243453
|
});
|
|
243432
243454
|
var FunctionLogsResponseSchema = exports_external.array(FunctionLogEntrySchema);
|
|
@@ -244175,10 +244197,12 @@ function hasResourcesToDeploy(projectData) {
|
|
|
244175
244197
|
const hasAgents = agents.length > 0;
|
|
244176
244198
|
const hasConnectors = connectors.length > 0;
|
|
244177
244199
|
const hasAuthConfig = authConfig.length > 0;
|
|
244178
|
-
|
|
244200
|
+
const hasVisibility = Boolean(project.visibility);
|
|
244201
|
+
return hasEntities || hasFunctions || hasAgents || hasConnectors || hasAuthConfig || hasVisibility || hasSite;
|
|
244179
244202
|
}
|
|
244180
244203
|
async function deployAll(projectData, options) {
|
|
244181
244204
|
const { project, entities, functions, agents, connectors, authConfig } = projectData;
|
|
244205
|
+
await setAppVisibility(project.visibility);
|
|
244182
244206
|
await entityResource.push(entities);
|
|
244183
244207
|
await deployFunctionsSequentially(functions, {
|
|
244184
244208
|
onStart: options?.onFunctionStart,
|
|
@@ -253240,6 +253264,9 @@ async function deployAction({ isNonInteractive, log }, options = {}) {
|
|
|
253240
253264
|
if (authConfig.length > 0) {
|
|
253241
253265
|
summaryLines.push(" - Auth config");
|
|
253242
253266
|
}
|
|
253267
|
+
if (project2.visibility) {
|
|
253268
|
+
summaryLines.push(` - Visibility: ${project2.visibility}`);
|
|
253269
|
+
}
|
|
253243
253270
|
if (project2.site?.outputDirectory) {
|
|
253244
253271
|
summaryLines.push(` - Site from ${project2.site.outputDirectory}`);
|
|
253245
253272
|
}
|
|
@@ -253659,6 +253686,17 @@ Examples:
|
|
|
253659
253686
|
$ base44 scaffold my-app --app-id app_123 Scaffolds the current dir, named "my-app"`).action(scaffoldAction);
|
|
253660
253687
|
}
|
|
253661
253688
|
|
|
253689
|
+
// src/cli/commands/project/visibility.ts
|
|
253690
|
+
async function setVisibility({ runTask: runTask2 }, level) {
|
|
253691
|
+
await runTask2(`Setting app visibility to ${level}`, () => setAppVisibility(level));
|
|
253692
|
+
return { outroMessage: `App visibility set to ${level}` };
|
|
253693
|
+
}
|
|
253694
|
+
function getVisibilityCommand() {
|
|
253695
|
+
return new Base44Command("visibility").description("Set the app's visibility on the server (public, private, or workspace)").addArgument(new Argument("<level>", "Visibility level").choices([
|
|
253696
|
+
...VISIBILITY_LEVELS
|
|
253697
|
+
])).action(setVisibility);
|
|
253698
|
+
}
|
|
253699
|
+
|
|
253662
253700
|
// src/cli/commands/secrets/delete.ts
|
|
253663
253701
|
async function deleteSecretAction({ runTask: runTask2 }, key) {
|
|
253664
253702
|
await runTask2(`Deleting secret "${key}"`, async () => {
|
|
@@ -257720,6 +257758,7 @@ function createProgram(context) {
|
|
|
257720
257758
|
program2.addCommand(getScaffoldCommand());
|
|
257721
257759
|
program2.addCommand(getDashboardCommand());
|
|
257722
257760
|
program2.addCommand(getDeployCommand2());
|
|
257761
|
+
program2.addCommand(getVisibilityCommand());
|
|
257723
257762
|
program2.addCommand(getLinkCommand());
|
|
257724
257763
|
program2.addCommand(getEjectCommand());
|
|
257725
257764
|
program2.addCommand(getEntitiesPushCommand());
|
|
@@ -261978,4 +262017,4 @@ export {
|
|
|
261978
262017
|
CLIExitError
|
|
261979
262018
|
};
|
|
261980
262019
|
|
|
261981
|
-
//# debugId=
|
|
262020
|
+
//# debugId=653C38BE03EF90CC64756E2164756E21
|