@base44-preview/cli 0.1.5-pr.573.d0b3340 → 0.1.5-pr.574.218ee97
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 +30 -54
- package/dist/cli/index.js.map +9 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -251342,25 +251342,6 @@ class Base44Command extends Command {
|
|
|
251342
251342
|
});
|
|
251343
251343
|
}
|
|
251344
251344
|
}
|
|
251345
|
-
// src/cli/utils/confirm-push.ts
|
|
251346
|
-
async function confirmPush({
|
|
251347
|
-
isNonInteractive,
|
|
251348
|
-
yes,
|
|
251349
|
-
log,
|
|
251350
|
-
warning
|
|
251351
|
-
}) {
|
|
251352
|
-
if (isNonInteractive && !yes) {
|
|
251353
|
-
throw new InvalidInputError("--yes is required in non-interactive mode");
|
|
251354
|
-
}
|
|
251355
|
-
if (yes) {
|
|
251356
|
-
return true;
|
|
251357
|
-
}
|
|
251358
|
-
log.warn(warning);
|
|
251359
|
-
const proceed = await Re({
|
|
251360
|
-
message: "Are you sure you want to continue?"
|
|
251361
|
-
});
|
|
251362
|
-
return !Ct(proceed) && proceed;
|
|
251363
|
-
}
|
|
251364
251345
|
// src/cli/utils/json.ts
|
|
251365
251346
|
function toJsonStdout(result) {
|
|
251366
251347
|
return `${JSON.stringify(result, null, 2)}
|
|
@@ -251653,18 +251634,12 @@ function getAgentsPullCommand() {
|
|
|
251653
251634
|
}
|
|
251654
251635
|
|
|
251655
251636
|
// src/cli/commands/agents/push.ts
|
|
251656
|
-
async function pushAgentsAction({
|
|
251637
|
+
async function pushAgentsAction({
|
|
251638
|
+
log,
|
|
251639
|
+
runTask: runTask2
|
|
251640
|
+
}) {
|
|
251657
251641
|
const { agents } = await readProjectConfig();
|
|
251658
251642
|
log.info(agents.length === 0 ? "No local agents found - this will delete all remote agents" : `Found ${agents.length} agents to push`);
|
|
251659
|
-
const proceed = await confirmPush({
|
|
251660
|
-
isNonInteractive,
|
|
251661
|
-
yes: options.yes,
|
|
251662
|
-
log,
|
|
251663
|
-
warning: "This replaces all remote agent configs with your local agents. Remote agents not present locally will be deleted."
|
|
251664
|
-
});
|
|
251665
|
-
if (!proceed) {
|
|
251666
|
-
return { outroMessage: "Push cancelled" };
|
|
251667
|
-
}
|
|
251668
251643
|
const result = await runTask2("Pushing agents to Base44", async () => {
|
|
251669
251644
|
return await pushAgents(agents);
|
|
251670
251645
|
}, {
|
|
@@ -251683,7 +251658,7 @@ async function pushAgentsAction({ isNonInteractive, log, runTask: runTask2 }, op
|
|
|
251683
251658
|
return { outroMessage: "Agents pushed to Base44" };
|
|
251684
251659
|
}
|
|
251685
251660
|
function getAgentsPushCommand() {
|
|
251686
|
-
return new Base44Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").
|
|
251661
|
+
return new Base44Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").action(pushAgentsAction);
|
|
251687
251662
|
}
|
|
251688
251663
|
|
|
251689
251664
|
// src/cli/commands/agents/index.ts
|
|
@@ -253048,15 +253023,6 @@ async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2,
|
|
|
253048
253023
|
log.info(`Found ${connectors.length} connectors to push: ${connectorNames}`);
|
|
253049
253024
|
}
|
|
253050
253025
|
}
|
|
253051
|
-
const proceed = await confirmPush({
|
|
253052
|
-
isNonInteractive,
|
|
253053
|
-
yes: options.yes,
|
|
253054
|
-
log,
|
|
253055
|
-
warning: "This overwrites your app's connectors with your local copy. Remote connectors not present locally will be removed."
|
|
253056
|
-
});
|
|
253057
|
-
if (!proceed) {
|
|
253058
|
-
return { outroMessage: "Push cancelled" };
|
|
253059
|
-
}
|
|
253060
253026
|
const { results } = await runTask2("Pushing connectors to Base44", async () => {
|
|
253061
253027
|
return await pushConnectors(connectors);
|
|
253062
253028
|
});
|
|
@@ -253080,7 +253046,7 @@ async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2,
|
|
|
253080
253046
|
return { outroMessage };
|
|
253081
253047
|
}
|
|
253082
253048
|
function getConnectorsPushCommand() {
|
|
253083
|
-
return new Base44Command("push").description("Push local connectors to Base44 (overwrites connectors on Base44)").option("--dir <path>", "Directory to read connector files from (default: ./connectors when using --app-id)").
|
|
253049
|
+
return new Base44Command("push").description("Push local connectors to Base44 (overwrites connectors on Base44)").option("--dir <path>", "Directory to read connector files from (default: ./connectors when using --app-id)").action(pushConnectorsAction);
|
|
253084
253050
|
}
|
|
253085
253051
|
|
|
253086
253052
|
// src/cli/commands/connectors/index.ts
|
|
@@ -253108,22 +253074,16 @@ function getDashboardCommand() {
|
|
|
253108
253074
|
}
|
|
253109
253075
|
|
|
253110
253076
|
// src/cli/commands/entities/push.ts
|
|
253111
|
-
async function pushEntitiesAction({
|
|
253077
|
+
async function pushEntitiesAction({
|
|
253078
|
+
log,
|
|
253079
|
+
runTask: runTask2
|
|
253080
|
+
}) {
|
|
253112
253081
|
const { entities } = await readProjectConfig();
|
|
253113
253082
|
if (entities.length === 0) {
|
|
253114
253083
|
return { outroMessage: "No entities found in project" };
|
|
253115
253084
|
}
|
|
253116
253085
|
const entityNames = entities.map((e2) => e2.name).join(", ");
|
|
253117
253086
|
log.info(`Found ${entities.length} entities to push: ${entityNames}`);
|
|
253118
|
-
const proceed = await confirmPush({
|
|
253119
|
-
isNonInteractive,
|
|
253120
|
-
yes: options.yes,
|
|
253121
|
-
log,
|
|
253122
|
-
warning: "This overwrites your app's entities with your local copy. Remote entities not present locally will be deleted."
|
|
253123
|
-
});
|
|
253124
|
-
if (!proceed) {
|
|
253125
|
-
return { outroMessage: "Push cancelled" };
|
|
253126
|
-
}
|
|
253127
253087
|
const result = await runTask2("Pushing entities to Base44", async () => {
|
|
253128
253088
|
return await pushEntities(entities);
|
|
253129
253089
|
}, {
|
|
@@ -253142,7 +253102,7 @@ async function pushEntitiesAction({ isNonInteractive, log, runTask: runTask2 },
|
|
|
253142
253102
|
return { outroMessage: "Entities pushed to Base44" };
|
|
253143
253103
|
}
|
|
253144
253104
|
function getEntitiesPushCommand() {
|
|
253145
|
-
return new Command("entities").description("Manage project entities").addCommand(new Base44Command("push").description("Push local entities to Base44").
|
|
253105
|
+
return new Command("entities").description("Manage project entities").addCommand(new Base44Command("push").description("Push local entities to Base44").action(pushEntitiesAction));
|
|
253146
253106
|
}
|
|
253147
253107
|
|
|
253148
253108
|
// src/cli/commands/functions/delete.ts
|
|
@@ -256474,12 +256434,15 @@ function createCustomIntegrationRoutes(remoteProxy, logger2) {
|
|
|
256474
256434
|
// src/cli/dev/dev-server/serve-runner.ts
|
|
256475
256435
|
import { spawn as spawn3 } from "node:child_process";
|
|
256476
256436
|
import process21 from "node:process";
|
|
256437
|
+
var LOCALHOST_URL = /https?:\/\/(?:localhost|127\.0\.0\.1):\d+/;
|
|
256477
256438
|
|
|
256478
256439
|
class ServeRunner {
|
|
256479
256440
|
command;
|
|
256480
256441
|
cwd;
|
|
256481
256442
|
env;
|
|
256482
256443
|
logger;
|
|
256444
|
+
onUrl;
|
|
256445
|
+
urlReported = false;
|
|
256483
256446
|
child;
|
|
256484
256447
|
stopping = false;
|
|
256485
256448
|
stopPromise;
|
|
@@ -256489,6 +256452,7 @@ class ServeRunner {
|
|
|
256489
256452
|
this.cwd = options8.cwd;
|
|
256490
256453
|
this.env = options8.env;
|
|
256491
256454
|
this.logger = options8.logger;
|
|
256455
|
+
this.onUrl = options8.onUrl;
|
|
256492
256456
|
}
|
|
256493
256457
|
start() {
|
|
256494
256458
|
if (this.child) {
|
|
@@ -256569,9 +256533,20 @@ class ServeRunner {
|
|
|
256569
256533
|
this.logger.error(line3);
|
|
256570
256534
|
} else {
|
|
256571
256535
|
this.logger.log(line3);
|
|
256536
|
+
this.reportUrl(line3);
|
|
256572
256537
|
}
|
|
256573
256538
|
}
|
|
256574
256539
|
}
|
|
256540
|
+
reportUrl(line3) {
|
|
256541
|
+
if (this.urlReported || !this.onUrl) {
|
|
256542
|
+
return;
|
|
256543
|
+
}
|
|
256544
|
+
const match = line3.match(LOCALHOST_URL);
|
|
256545
|
+
if (match) {
|
|
256546
|
+
this.urlReported = true;
|
|
256547
|
+
this.onUrl(match[0]);
|
|
256548
|
+
}
|
|
256549
|
+
}
|
|
256575
256550
|
}
|
|
256576
256551
|
|
|
256577
256552
|
// src/cli/dev/dev-server/watcher.ts
|
|
@@ -258411,7 +258386,8 @@ async function createDevServer(options8) {
|
|
|
258411
258386
|
VITE_BASE44_APP_ID: options8.appId,
|
|
258412
258387
|
VITE_BASE44_APP_BASE_URL: baseUrl
|
|
258413
258388
|
},
|
|
258414
|
-
logger: createDevLogger("frontend", theme.colors.base44Orange)
|
|
258389
|
+
logger: createDevLogger("frontend", theme.colors.base44Orange),
|
|
258390
|
+
onUrl: (url3) => devLogger.log(`Open your app in the browser: ${theme.colors.links(url3)}`)
|
|
258415
258391
|
});
|
|
258416
258392
|
}
|
|
258417
258393
|
const handleShutdownError = (error48) => {
|
|
@@ -258487,7 +258463,7 @@ async function devAction(ctx, options8) {
|
|
|
258487
258463
|
return { functions, entities, project: project2, siteUrl };
|
|
258488
258464
|
}
|
|
258489
258465
|
});
|
|
258490
|
-
const outroMessage = isServingFrontend ? "Open your app
|
|
258466
|
+
const outroMessage = isServingFrontend ? "Open your app in the browser once the frontend URL is printed" : `Dev server is available at ${theme.colors.links(localServerUrl(resolvedPort))}`;
|
|
258491
258467
|
return { outroMessage };
|
|
258492
258468
|
}
|
|
258493
258469
|
function getDevCommand() {
|
|
@@ -262992,4 +262968,4 @@ export {
|
|
|
262992
262968
|
CLIExitError
|
|
262993
262969
|
};
|
|
262994
262970
|
|
|
262995
|
-
//# debugId=
|
|
262971
|
+
//# debugId=F062A81759675D6F64756E2164756E21
|