@base44-preview/cli 0.1.5-pr.571.4d6a59e → 0.1.5-pr.573.8f87fa4
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.
|
@@ -2,8 +2,4 @@ import { createClient } from '@base44/sdk';
|
|
|
2
2
|
|
|
3
3
|
export const base44 = createClient({
|
|
4
4
|
appId: '<%= projectId %>',
|
|
5
|
-
// `base44 dev` injects VITE_BASE44_APP_BASE_URL (http://localhost:<port>) so the
|
|
6
|
-
// SDK targets the local dev backend; unset in prod builds, so it falls back to
|
|
7
|
-
// the SDK's default server.
|
|
8
|
-
serverUrl: import.meta.env.VITE_BASE44_APP_BASE_URL || undefined,
|
|
9
5
|
});
|
package/dist/cli/index.js
CHANGED
|
@@ -251342,6 +251342,25 @@ 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
|
+
}
|
|
251345
251364
|
// src/cli/utils/json.ts
|
|
251346
251365
|
function toJsonStdout(result) {
|
|
251347
251366
|
return `${JSON.stringify(result, null, 2)}
|
|
@@ -251634,12 +251653,18 @@ function getAgentsPullCommand() {
|
|
|
251634
251653
|
}
|
|
251635
251654
|
|
|
251636
251655
|
// src/cli/commands/agents/push.ts
|
|
251637
|
-
async function pushAgentsAction({
|
|
251638
|
-
log,
|
|
251639
|
-
runTask: runTask2
|
|
251640
|
-
}) {
|
|
251656
|
+
async function pushAgentsAction({ isNonInteractive, log, runTask: runTask2 }, options) {
|
|
251641
251657
|
const { agents } = await readProjectConfig();
|
|
251642
251658
|
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
|
+
}
|
|
251643
251668
|
const result = await runTask2("Pushing agents to Base44", async () => {
|
|
251644
251669
|
return await pushAgents(agents);
|
|
251645
251670
|
}, {
|
|
@@ -251658,7 +251683,7 @@ async function pushAgentsAction({
|
|
|
251658
251683
|
return { outroMessage: "Agents pushed to Base44" };
|
|
251659
251684
|
}
|
|
251660
251685
|
function getAgentsPushCommand() {
|
|
251661
|
-
return new Base44Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").action(pushAgentsAction);
|
|
251686
|
+
return new Base44Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").option("-y, --yes", "Skip confirmation prompt").action(pushAgentsAction);
|
|
251662
251687
|
}
|
|
251663
251688
|
|
|
251664
251689
|
// src/cli/commands/agents/index.ts
|
|
@@ -253023,6 +253048,15 @@ async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2,
|
|
|
253023
253048
|
log.info(`Found ${connectors.length} connectors to push: ${connectorNames}`);
|
|
253024
253049
|
}
|
|
253025
253050
|
}
|
|
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
|
+
}
|
|
253026
253060
|
const { results } = await runTask2("Pushing connectors to Base44", async () => {
|
|
253027
253061
|
return await pushConnectors(connectors);
|
|
253028
253062
|
});
|
|
@@ -253046,7 +253080,7 @@ async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2,
|
|
|
253046
253080
|
return { outroMessage };
|
|
253047
253081
|
}
|
|
253048
253082
|
function getConnectorsPushCommand() {
|
|
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);
|
|
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)").option("-y, --yes", "Skip confirmation prompt").action(pushConnectorsAction);
|
|
253050
253084
|
}
|
|
253051
253085
|
|
|
253052
253086
|
// src/cli/commands/connectors/index.ts
|
|
@@ -253074,16 +253108,22 @@ function getDashboardCommand() {
|
|
|
253074
253108
|
}
|
|
253075
253109
|
|
|
253076
253110
|
// src/cli/commands/entities/push.ts
|
|
253077
|
-
async function pushEntitiesAction({
|
|
253078
|
-
log,
|
|
253079
|
-
runTask: runTask2
|
|
253080
|
-
}) {
|
|
253111
|
+
async function pushEntitiesAction({ isNonInteractive, log, runTask: runTask2 }, options) {
|
|
253081
253112
|
const { entities } = await readProjectConfig();
|
|
253082
253113
|
if (entities.length === 0) {
|
|
253083
253114
|
return { outroMessage: "No entities found in project" };
|
|
253084
253115
|
}
|
|
253085
253116
|
const entityNames = entities.map((e2) => e2.name).join(", ");
|
|
253086
253117
|
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
|
+
}
|
|
253087
253127
|
const result = await runTask2("Pushing entities to Base44", async () => {
|
|
253088
253128
|
return await pushEntities(entities);
|
|
253089
253129
|
}, {
|
|
@@ -253102,7 +253142,7 @@ async function pushEntitiesAction({
|
|
|
253102
253142
|
return { outroMessage: "Entities pushed to Base44" };
|
|
253103
253143
|
}
|
|
253104
253144
|
function getEntitiesPushCommand() {
|
|
253105
|
-
return new Command("entities").description("Manage project entities").addCommand(new Base44Command("push").description("Push local entities to Base44").action(pushEntitiesAction));
|
|
253145
|
+
return new Command("entities").description("Manage project entities").addCommand(new Base44Command("push").description("Push local entities to Base44").option("-y, --yes", "Skip confirmation prompt").action(pushEntitiesAction));
|
|
253106
253146
|
}
|
|
253107
253147
|
|
|
253108
253148
|
// src/cli/commands/functions/delete.ts
|
|
@@ -262952,4 +262992,4 @@ export {
|
|
|
262952
262992
|
CLIExitError
|
|
262953
262993
|
};
|
|
262954
262994
|
|
|
262955
|
-
//# debugId=
|
|
262995
|
+
//# debugId=90826EFBD09EACF564756E2164756E21
|