@base44-preview/cli 0.0.56-pr.550.7e7ee9d → 0.0.56-pr.550.b83f0ca
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/dist/cli/index.js +28 -29
- package/dist/cli/index.js.map +7 -7
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -241804,6 +241804,11 @@ var PublishedUrlResponseSchema = exports_external.object({
|
|
|
241804
241804
|
});
|
|
241805
241805
|
|
|
241806
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
|
+
};
|
|
241807
241812
|
async function createProject(projectName, description) {
|
|
241808
241813
|
let response;
|
|
241809
241814
|
try {
|
|
@@ -241812,7 +241817,7 @@ async function createProject(projectName, description) {
|
|
|
241812
241817
|
name: projectName,
|
|
241813
241818
|
user_description: description ?? `Backend for '${projectName}'`,
|
|
241814
241819
|
is_managed_source_code: false,
|
|
241815
|
-
public_settings:
|
|
241820
|
+
public_settings: PUBLIC_SETTINGS.public
|
|
241816
241821
|
}
|
|
241817
241822
|
});
|
|
241818
241823
|
} catch (error48) {
|
|
@@ -241826,6 +241831,18 @@ async function createProject(projectName, description) {
|
|
|
241826
241831
|
projectId: result.data.id
|
|
241827
241832
|
};
|
|
241828
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
|
+
}
|
|
241829
241846
|
async function listProjects() {
|
|
241830
241847
|
let response;
|
|
241831
241848
|
try {
|
|
@@ -244106,30 +244123,6 @@ async function createProjectFilesForExistingProject(options) {
|
|
|
244106
244123
|
// src/core/project/deploy.ts
|
|
244107
244124
|
import { resolve as resolve2 } from "node:path";
|
|
244108
244125
|
|
|
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
|
-
|
|
244133
244126
|
// src/core/site/api.ts
|
|
244134
244127
|
async function uploadSite(archivePath) {
|
|
244135
244128
|
const archiveBuffer = await readFile(archivePath);
|
|
@@ -244209,9 +244202,7 @@ function hasResourcesToDeploy(projectData) {
|
|
|
244209
244202
|
}
|
|
244210
244203
|
async function deployAll(projectData, options) {
|
|
244211
244204
|
const { project, entities, functions, agents, connectors, authConfig } = projectData;
|
|
244212
|
-
|
|
244213
|
-
await setAppVisibility(project.visibility);
|
|
244214
|
-
}
|
|
244205
|
+
await setAppVisibility(project.visibility);
|
|
244215
244206
|
await entityResource.push(entities);
|
|
244216
244207
|
await deployFunctionsSequentially(functions, {
|
|
244217
244208
|
onStart: options?.onFunctionStart,
|
|
@@ -244227,6 +244218,14 @@ async function deployAll(projectData, options) {
|
|
|
244227
244218
|
}
|
|
244228
244219
|
return { connectorResults };
|
|
244229
244220
|
}
|
|
244221
|
+
// src/core/project/visibility.ts
|
|
244222
|
+
async function writeVisibilityToConfig(configPath, visibility) {
|
|
244223
|
+
const text = await readTextFile(configPath);
|
|
244224
|
+
const existing = /("visibility"\s*:\s*")(?:public|private|workspace)(")/;
|
|
244225
|
+
const next = existing.test(text) ? text.replace(existing, `$1${visibility}$2`) : text.replace(/^[ \t]*\{/m, (brace) => `${brace}
|
|
244226
|
+
"visibility": "${visibility}",`);
|
|
244227
|
+
await writeFile(configPath, next);
|
|
244228
|
+
}
|
|
244230
244229
|
// src/core/clients/base44-client.ts
|
|
244231
244230
|
var retriedRequests = new WeakSet;
|
|
244232
244231
|
async function captureRequestBody(request, options) {
|
|
@@ -262029,4 +262028,4 @@ export {
|
|
|
262029
262028
|
CLIExitError
|
|
262030
262029
|
};
|
|
262031
262030
|
|
|
262032
|
-
//# debugId=
|
|
262031
|
+
//# debugId=94516F32702CC42464756E2164756E21
|