@base44-preview/cli 0.0.56-pr.549.64e11b5 → 0.0.56-pr.550.7e7ee9d
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"),
|
|
@@ -243426,7 +243431,7 @@ var ListFunctionsResponseSchema = exports_external.object({
|
|
|
243426
243431
|
var LogLevelSchema = exports_external.enum(["info", "warning", "error", "debug"]);
|
|
243427
243432
|
var FunctionLogEntrySchema = exports_external.object({
|
|
243428
243433
|
time: exports_external.string(),
|
|
243429
|
-
level:
|
|
243434
|
+
level: LogLevelSchema,
|
|
243430
243435
|
message: exports_external.string()
|
|
243431
243436
|
});
|
|
243432
243437
|
var FunctionLogsResponseSchema = exports_external.array(FunctionLogEntrySchema);
|
|
@@ -244101,6 +244106,30 @@ async function createProjectFilesForExistingProject(options) {
|
|
|
244101
244106
|
// src/core/project/deploy.ts
|
|
244102
244107
|
import { resolve as resolve2 } from "node:path";
|
|
244103
244108
|
|
|
244109
|
+
// src/core/project/visibility.ts
|
|
244110
|
+
var PUBLIC_SETTINGS = {
|
|
244111
|
+
public: "public_without_login",
|
|
244112
|
+
private: "private_with_login",
|
|
244113
|
+
workspace: "workspace_with_login"
|
|
244114
|
+
};
|
|
244115
|
+
async function setAppVisibility(visibility) {
|
|
244116
|
+
const { id } = getAppContext();
|
|
244117
|
+
try {
|
|
244118
|
+
await base44Client.put(`api/apps/${id}`, {
|
|
244119
|
+
json: { public_settings: PUBLIC_SETTINGS[visibility] }
|
|
244120
|
+
});
|
|
244121
|
+
} catch (error48) {
|
|
244122
|
+
throw await ApiError.fromHttpError(error48, "updating app visibility");
|
|
244123
|
+
}
|
|
244124
|
+
}
|
|
244125
|
+
async function writeVisibilityToConfig(configPath, visibility) {
|
|
244126
|
+
const text = await readTextFile(configPath);
|
|
244127
|
+
const existing = /("visibility"\s*:\s*")(?:public|private|workspace)(")/;
|
|
244128
|
+
const next = existing.test(text) ? text.replace(existing, `$1${visibility}$2`) : text.replace("{", `{
|
|
244129
|
+
"visibility": "${visibility}",`);
|
|
244130
|
+
await writeFile(configPath, next);
|
|
244131
|
+
}
|
|
244132
|
+
|
|
244104
244133
|
// src/core/site/api.ts
|
|
244105
244134
|
async function uploadSite(archivePath) {
|
|
244106
244135
|
const archiveBuffer = await readFile(archivePath);
|
|
@@ -244175,10 +244204,14 @@ function hasResourcesToDeploy(projectData) {
|
|
|
244175
244204
|
const hasAgents = agents.length > 0;
|
|
244176
244205
|
const hasConnectors = connectors.length > 0;
|
|
244177
244206
|
const hasAuthConfig = authConfig.length > 0;
|
|
244178
|
-
|
|
244207
|
+
const hasVisibility = Boolean(project.visibility);
|
|
244208
|
+
return hasEntities || hasFunctions || hasAgents || hasConnectors || hasAuthConfig || hasVisibility || hasSite;
|
|
244179
244209
|
}
|
|
244180
244210
|
async function deployAll(projectData, options) {
|
|
244181
244211
|
const { project, entities, functions, agents, connectors, authConfig } = projectData;
|
|
244212
|
+
if (project.visibility) {
|
|
244213
|
+
await setAppVisibility(project.visibility);
|
|
244214
|
+
}
|
|
244182
244215
|
await entityResource.push(entities);
|
|
244183
244216
|
await deployFunctionsSequentially(functions, {
|
|
244184
244217
|
onStart: options?.onFunctionStart,
|
|
@@ -253240,6 +253273,9 @@ async function deployAction({ isNonInteractive, log }, options = {}) {
|
|
|
253240
253273
|
if (authConfig.length > 0) {
|
|
253241
253274
|
summaryLines.push(" - Auth config");
|
|
253242
253275
|
}
|
|
253276
|
+
if (project2.visibility) {
|
|
253277
|
+
summaryLines.push(` - Visibility: ${project2.visibility}`);
|
|
253278
|
+
}
|
|
253243
253279
|
if (project2.site?.outputDirectory) {
|
|
253244
253280
|
summaryLines.push(` - Site from ${project2.site.outputDirectory}`);
|
|
253245
253281
|
}
|
|
@@ -253659,6 +253695,20 @@ Examples:
|
|
|
253659
253695
|
$ base44 scaffold my-app --app-id app_123 Scaffolds the current dir, named "my-app"`).action(scaffoldAction);
|
|
253660
253696
|
}
|
|
253661
253697
|
|
|
253698
|
+
// src/cli/commands/project/visibility.ts
|
|
253699
|
+
async function visibilityAction({ runTask: runTask2 }, level) {
|
|
253700
|
+
const { project: project2 } = await readProjectConfig();
|
|
253701
|
+
await runTask2("Updating local config", () => writeVisibilityToConfig(project2.configPath, level));
|
|
253702
|
+
return {
|
|
253703
|
+
outroMessage: `Visibility set to ${level} in local config. Run \`base44 deploy\` to apply.`
|
|
253704
|
+
};
|
|
253705
|
+
}
|
|
253706
|
+
function getVisibilityCommand() {
|
|
253707
|
+
return new Base44Command("visibility").description("Set app visibility (public, private, or workspace)").addArgument(new Argument("<level>", "Visibility level").choices([
|
|
253708
|
+
...VISIBILITY_LEVELS
|
|
253709
|
+
])).action(visibilityAction);
|
|
253710
|
+
}
|
|
253711
|
+
|
|
253662
253712
|
// src/cli/commands/secrets/delete.ts
|
|
253663
253713
|
async function deleteSecretAction({ runTask: runTask2 }, key) {
|
|
253664
253714
|
await runTask2(`Deleting secret "${key}"`, async () => {
|
|
@@ -257720,6 +257770,7 @@ function createProgram(context) {
|
|
|
257720
257770
|
program2.addCommand(getScaffoldCommand());
|
|
257721
257771
|
program2.addCommand(getDashboardCommand());
|
|
257722
257772
|
program2.addCommand(getDeployCommand2());
|
|
257773
|
+
program2.addCommand(getVisibilityCommand());
|
|
257723
257774
|
program2.addCommand(getLinkCommand());
|
|
257724
257775
|
program2.addCommand(getEjectCommand());
|
|
257725
257776
|
program2.addCommand(getEntitiesPushCommand());
|
|
@@ -261978,4 +262029,4 @@ export {
|
|
|
261978
262029
|
CLIExitError
|
|
261979
262030
|
};
|
|
261980
262031
|
|
|
261981
|
-
//# debugId=
|
|
262032
|
+
//# debugId=25CD73953FB041AA64756E2164756E21
|