@base44-preview/cli 0.0.49-pr.370.093ccc2 → 0.0.49-pr.443.bf24511
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 +24 -33
- package/dist/cli/index.js.map +12 -12
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -234565,15 +234565,11 @@ var SiteConfigSchema = exports_external.object({
|
|
|
234565
234565
|
outputDirectory: exports_external.string().optional(),
|
|
234566
234566
|
installCommand: exports_external.string().optional()
|
|
234567
234567
|
});
|
|
234568
|
-
var VisibilitySchema = exports_external.enum(["public", "private", "workspace"], {
|
|
234569
|
-
error: 'Invalid visibility value. Allowed values: "public", "private", "workspace"'
|
|
234570
|
-
});
|
|
234571
234568
|
var ProjectConfigSchema = exports_external.object({
|
|
234572
234569
|
name: exports_external.string({
|
|
234573
234570
|
error: "App name cannot be empty"
|
|
234574
234571
|
}).min(1, "App name cannot be empty"),
|
|
234575
234572
|
description: exports_external.string().optional(),
|
|
234576
|
-
visibility: VisibilitySchema.optional(),
|
|
234577
234573
|
site: SiteConfigSchema.optional(),
|
|
234578
234574
|
entitiesDir: exports_external.string().optional().default("entities"),
|
|
234579
234575
|
functionsDir: exports_external.string().optional().default("functions"),
|
|
@@ -243069,7 +243065,7 @@ async function createProject(projectName, description) {
|
|
|
243069
243065
|
name: projectName,
|
|
243070
243066
|
user_description: description ?? `Backend for '${projectName}'`,
|
|
243071
243067
|
is_managed_source_code: false,
|
|
243072
|
-
public_settings: "
|
|
243068
|
+
public_settings: "public_without_login"
|
|
243073
243069
|
}
|
|
243074
243070
|
});
|
|
243075
243071
|
} catch (error48) {
|
|
@@ -243083,23 +243079,6 @@ async function createProject(projectName, description) {
|
|
|
243083
243079
|
projectId: result.data.id
|
|
243084
243080
|
};
|
|
243085
243081
|
}
|
|
243086
|
-
var VISIBILITY_TO_PUBLIC_SETTINGS = {
|
|
243087
|
-
public: "public_without_login",
|
|
243088
|
-
private: "private_with_login",
|
|
243089
|
-
workspace: "workspace_with_login"
|
|
243090
|
-
};
|
|
243091
|
-
async function updateProjectVisibility(visibility) {
|
|
243092
|
-
const { id } = getAppConfig();
|
|
243093
|
-
try {
|
|
243094
|
-
await base44Client.put(`api/apps/${id}`, {
|
|
243095
|
-
json: {
|
|
243096
|
-
public_settings: VISIBILITY_TO_PUBLIC_SETTINGS[visibility]
|
|
243097
|
-
}
|
|
243098
|
-
});
|
|
243099
|
-
} catch (error48) {
|
|
243100
|
-
throw await ApiError.fromHttpError(error48, "updating project visibility");
|
|
243101
|
-
}
|
|
243102
|
-
}
|
|
243103
243082
|
async function listProjects() {
|
|
243104
243083
|
let response;
|
|
243105
243084
|
try {
|
|
@@ -243433,9 +243412,6 @@ async function deployAll(projectData, options) {
|
|
|
243433
243412
|
await agentResource.push(agents);
|
|
243434
243413
|
await authConfigResource.push(authConfig);
|
|
243435
243414
|
const { results: connectorResults } = await pushConnectors(connectors);
|
|
243436
|
-
if (project.visibility) {
|
|
243437
|
-
await updateProjectVisibility(project.visibility);
|
|
243438
|
-
}
|
|
243439
243415
|
if (project.site?.outputDirectory) {
|
|
243440
243416
|
const outputDir = resolve(project.root, project.site.outputDirectory);
|
|
243441
243417
|
const { appUrl } = await deploySite(outputDir);
|
|
@@ -252901,22 +252877,37 @@ var $setGracefulCleanup = tmp.setGracefulCleanup;
|
|
|
252901
252877
|
var colorByType = {
|
|
252902
252878
|
error: theme.styles.error,
|
|
252903
252879
|
warn: theme.styles.warn,
|
|
252904
|
-
log: (
|
|
252880
|
+
log: (input) => input
|
|
252881
|
+
};
|
|
252882
|
+
var stringify = (item) => {
|
|
252883
|
+
if (typeof item === "string") {
|
|
252884
|
+
return item;
|
|
252885
|
+
}
|
|
252886
|
+
if (item instanceof Error) {
|
|
252887
|
+
return item.toString();
|
|
252888
|
+
}
|
|
252889
|
+
try {
|
|
252890
|
+
return JSON.stringify(item) ?? String(item);
|
|
252891
|
+
} catch {
|
|
252892
|
+
return String(item);
|
|
252893
|
+
}
|
|
252905
252894
|
};
|
|
252906
252895
|
function createDevLogger() {
|
|
252907
|
-
const print = (type,
|
|
252896
|
+
const print = (type, ...args) => {
|
|
252908
252897
|
const colorize = colorByType[type];
|
|
252909
|
-
console[type](
|
|
252898
|
+
console[type](...args.map((item) => {
|
|
252899
|
+
return colorize(stringify(item));
|
|
252900
|
+
}));
|
|
252910
252901
|
};
|
|
252911
252902
|
return {
|
|
252912
|
-
log: (
|
|
252903
|
+
log: (...args) => print("log", ...args),
|
|
252913
252904
|
error: (msg, err) => {
|
|
252914
252905
|
print("error", msg);
|
|
252915
252906
|
if (err) {
|
|
252916
|
-
print("error",
|
|
252907
|
+
print("error", err);
|
|
252917
252908
|
}
|
|
252918
252909
|
},
|
|
252919
|
-
warn: (
|
|
252910
|
+
warn: (...args) => print("warn", ...args)
|
|
252920
252911
|
};
|
|
252921
252912
|
}
|
|
252922
252913
|
|
|
@@ -255535,7 +255526,7 @@ class WatchBase44 extends EventEmitter4 {
|
|
|
255535
255526
|
this.emit("change", name2, relative6(targetPath, path19));
|
|
255536
255527
|
}, WATCH_DEBOUNCE_MS));
|
|
255537
255528
|
watcher.on("error", (err) => {
|
|
255538
|
-
this.logger.error(`Watch handler failed for ${targetPath}`, err
|
|
255529
|
+
this.logger.error(`Watch handler failed for ${targetPath}`, err);
|
|
255539
255530
|
});
|
|
255540
255531
|
return watcher;
|
|
255541
255532
|
}
|
|
@@ -260151,4 +260142,4 @@ export {
|
|
|
260151
260142
|
CLIExitError
|
|
260152
260143
|
};
|
|
260153
260144
|
|
|
260154
|
-
//# debugId=
|
|
260145
|
+
//# debugId=39D9DA5AB48E676A64756E2164756E21
|