@base44-preview/cli 0.0.41-pr.381.83d161e → 0.0.41-pr.389.50585af
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 +7 -82
- package/dist/cli/index.js.map +6 -9
- package/package.json +1 -4
package/dist/cli/index.js
CHANGED
|
@@ -231169,16 +231169,6 @@ async function deployFunctions(functions) {
|
|
|
231169
231169
|
}
|
|
231170
231170
|
return result.data;
|
|
231171
231171
|
}
|
|
231172
|
-
async function deleteSingleFunction(name2) {
|
|
231173
|
-
const appClient = getAppClient();
|
|
231174
|
-
try {
|
|
231175
|
-
await appClient.delete(`backend-functions/${encodeURIComponent(name2)}`, {
|
|
231176
|
-
timeout: 60000
|
|
231177
|
-
});
|
|
231178
|
-
} catch (error48) {
|
|
231179
|
-
throw await ApiError.fromHttpError(error48, `deleting function "${name2}"`);
|
|
231180
|
-
}
|
|
231181
|
-
}
|
|
231182
231172
|
function buildLogsQueryString(filters) {
|
|
231183
231173
|
const params = new URLSearchParams;
|
|
231184
231174
|
if (filters.since) {
|
|
@@ -231481,8 +231471,6 @@ var package_default = {
|
|
|
231481
231471
|
dev: "./bin/dev.ts",
|
|
231482
231472
|
start: "./bin/run.js",
|
|
231483
231473
|
clean: "rm -rf dist && mkdir -p dist",
|
|
231484
|
-
lint: "biome check src tests",
|
|
231485
|
-
"lint:fix": "biome check --write src tests",
|
|
231486
231474
|
test: "vitest run",
|
|
231487
231475
|
"test:watch": "vitest",
|
|
231488
231476
|
"build:binaries": "bun run infra/build-binaries.ts",
|
|
@@ -231500,7 +231488,6 @@ var package_default = {
|
|
|
231500
231488
|
url: "https://github.com/base44/cli"
|
|
231501
231489
|
},
|
|
231502
231490
|
devDependencies: {
|
|
231503
|
-
"@biomejs/biome": "^2.0.0",
|
|
231504
231491
|
"@clack/prompts": "^1.0.1",
|
|
231505
231492
|
"@seald-io/nedb": "^4.1.2",
|
|
231506
231493
|
"@types/bun": "^1.2.15",
|
|
@@ -240347,63 +240334,6 @@ function getEntitiesPushCommand(context) {
|
|
|
240347
240334
|
}));
|
|
240348
240335
|
}
|
|
240349
240336
|
|
|
240350
|
-
// src/cli/utils/parseNames.ts
|
|
240351
|
-
function parseNames(args) {
|
|
240352
|
-
return args.flatMap((arg) => arg.split(",")).map((n2) => n2.trim()).filter(Boolean);
|
|
240353
|
-
}
|
|
240354
|
-
|
|
240355
|
-
// src/cli/commands/functions/delete.ts
|
|
240356
|
-
async function deleteFunctionsAction(names) {
|
|
240357
|
-
let deleted = 0;
|
|
240358
|
-
let notFound = 0;
|
|
240359
|
-
let errors4 = 0;
|
|
240360
|
-
let completed = 0;
|
|
240361
|
-
const total = names.length;
|
|
240362
|
-
for (const name2 of names) {
|
|
240363
|
-
R2.step(theme.styles.dim(`[${completed + 1}/${total}] Deleting ${name2}...`));
|
|
240364
|
-
try {
|
|
240365
|
-
await deleteSingleFunction(name2);
|
|
240366
|
-
R2.success(`${name2.padEnd(25)} deleted`);
|
|
240367
|
-
deleted++;
|
|
240368
|
-
} catch (error48) {
|
|
240369
|
-
if (error48 instanceof ApiError && error48.statusCode === 404) {
|
|
240370
|
-
R2.warn(`${name2.padEnd(25)} not found`);
|
|
240371
|
-
notFound++;
|
|
240372
|
-
} else {
|
|
240373
|
-
R2.error(`${name2.padEnd(25)} error: ${error48 instanceof Error ? error48.message : String(error48)}`);
|
|
240374
|
-
errors4++;
|
|
240375
|
-
}
|
|
240376
|
-
}
|
|
240377
|
-
completed++;
|
|
240378
|
-
}
|
|
240379
|
-
if (names.length === 1) {
|
|
240380
|
-
if (deleted)
|
|
240381
|
-
return { outroMessage: `Function "${names[0]}" deleted` };
|
|
240382
|
-
if (notFound)
|
|
240383
|
-
return { outroMessage: `Function "${names[0]}" not found` };
|
|
240384
|
-
return { outroMessage: `Failed to delete "${names[0]}"` };
|
|
240385
|
-
}
|
|
240386
|
-
const parts = [];
|
|
240387
|
-
if (deleted > 0)
|
|
240388
|
-
parts.push(`${deleted}/${total} deleted`);
|
|
240389
|
-
if (notFound > 0)
|
|
240390
|
-
parts.push(`${notFound} not found`);
|
|
240391
|
-
if (errors4 > 0)
|
|
240392
|
-
parts.push(`${errors4} error${errors4 !== 1 ? "s" : ""}`);
|
|
240393
|
-
return { outroMessage: parts.join(", ") };
|
|
240394
|
-
}
|
|
240395
|
-
function getDeleteCommand(context) {
|
|
240396
|
-
return new Command("delete").description("Delete deployed functions").argument("<names...>", "Function names to delete").action(async (rawNames) => {
|
|
240397
|
-
await runCommand(() => {
|
|
240398
|
-
const names = parseNames(rawNames);
|
|
240399
|
-
if (names.length === 0) {
|
|
240400
|
-
throw new InvalidInputError("At least one function name is required");
|
|
240401
|
-
}
|
|
240402
|
-
return deleteFunctionsAction(names);
|
|
240403
|
-
}, { requireAuth: true }, context);
|
|
240404
|
-
});
|
|
240405
|
-
}
|
|
240406
|
-
|
|
240407
240337
|
// src/cli/commands/functions/deploy.ts
|
|
240408
240338
|
async function deployFunctionsAction() {
|
|
240409
240339
|
const { functions } = await readProjectConfig();
|
|
@@ -240436,15 +240366,10 @@ async function deployFunctionsAction() {
|
|
|
240436
240366
|
}
|
|
240437
240367
|
return { outroMessage: "Functions deployed to Base44" };
|
|
240438
240368
|
}
|
|
240439
|
-
function
|
|
240440
|
-
return new Command("deploy").description("Deploy local functions to Base44").action(async () => {
|
|
240369
|
+
function getFunctionsDeployCommand(context) {
|
|
240370
|
+
return new Command("functions").description("Manage project functions").addCommand(new Command("deploy").description("Deploy local functions to Base44").action(async () => {
|
|
240441
240371
|
await runCommand(deployFunctionsAction, { requireAuth: true }, context);
|
|
240442
|
-
});
|
|
240443
|
-
}
|
|
240444
|
-
|
|
240445
|
-
// src/cli/commands/functions/index.ts
|
|
240446
|
-
function getFunctionsCommand(context) {
|
|
240447
|
-
return new Command("functions").description("Manage backend functions").addCommand(getDeployCommand(context)).addCommand(getDeleteCommand(context));
|
|
240372
|
+
}));
|
|
240448
240373
|
}
|
|
240449
240374
|
|
|
240450
240375
|
// src/cli/commands/project/create.ts
|
|
@@ -240686,7 +240611,7 @@ ${summaryLines.join(`
|
|
|
240686
240611
|
}
|
|
240687
240612
|
return { outroMessage: "App deployed successfully" };
|
|
240688
240613
|
}
|
|
240689
|
-
function
|
|
240614
|
+
function getDeployCommand(context) {
|
|
240690
240615
|
return new Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
|
|
240691
240616
|
await runCommand(() => deployAction({
|
|
240692
240617
|
...options,
|
|
@@ -243923,13 +243848,13 @@ function createProgram(context) {
|
|
|
243923
243848
|
program2.addCommand(getLogoutCommand(context));
|
|
243924
243849
|
program2.addCommand(getCreateCommand(context));
|
|
243925
243850
|
program2.addCommand(getDashboardCommand(context));
|
|
243926
|
-
program2.addCommand(
|
|
243851
|
+
program2.addCommand(getDeployCommand(context));
|
|
243927
243852
|
program2.addCommand(getLinkCommand(context));
|
|
243928
243853
|
program2.addCommand(getEjectCommand(context));
|
|
243929
243854
|
program2.addCommand(getEntitiesPushCommand(context));
|
|
243930
243855
|
program2.addCommand(getAgentsCommand(context));
|
|
243931
243856
|
program2.addCommand(getConnectorsCommand(context));
|
|
243932
|
-
program2.addCommand(
|
|
243857
|
+
program2.addCommand(getFunctionsDeployCommand(context));
|
|
243933
243858
|
program2.addCommand(getSecretsCommand(context));
|
|
243934
243859
|
program2.addCommand(getSiteCommand(context));
|
|
243935
243860
|
program2.addCommand(getTypesCommand(context));
|
|
@@ -248175,4 +248100,4 @@ export {
|
|
|
248175
248100
|
CLIExitError
|
|
248176
248101
|
};
|
|
248177
248102
|
|
|
248178
|
-
//# debugId=
|
|
248103
|
+
//# debugId=9FBB6054DA506D6064756E2164756E21
|