@base44-preview/cli 0.0.32-pr.253.ed8d752 → 0.0.32-pr.254.87a1a82
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 -21
- package/dist/cli/index.js.map +11 -11
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -186756,12 +186756,12 @@ var BANNER_LINES = [
|
|
|
186756
186756
|
"██████╔╝██║ ██║███████║███████╗ ██║ ██║",
|
|
186757
186757
|
"╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝"
|
|
186758
186758
|
];
|
|
186759
|
-
async function printBanner() {
|
|
186760
|
-
if (
|
|
186761
|
-
await printAnimatedLines(BANNER_LINES);
|
|
186762
|
-
} else {
|
|
186759
|
+
async function printBanner(isNonInteractive) {
|
|
186760
|
+
if (isNonInteractive) {
|
|
186763
186761
|
console.log(theme.colors.base44Orange(BANNER_LINES.join(`
|
|
186764
186762
|
`)));
|
|
186763
|
+
} else {
|
|
186764
|
+
await printAnimatedLines(BANNER_LINES);
|
|
186765
186765
|
}
|
|
186766
186766
|
}
|
|
186767
186767
|
// src/cli/errors.ts
|
|
@@ -193565,7 +193565,7 @@ async function printUpgradeNotificationIfAvailable() {
|
|
|
193565
193565
|
async function runCommand(commandFn, options, context) {
|
|
193566
193566
|
console.log();
|
|
193567
193567
|
if (options?.fullBanner) {
|
|
193568
|
-
await printBanner();
|
|
193568
|
+
await printBanner(context.isNonInteractive);
|
|
193569
193569
|
Ie("");
|
|
193570
193570
|
} else {
|
|
193571
193571
|
Ie(theme.colors.base44OrangeBackground(" Base 44 "));
|
|
@@ -194495,7 +194495,7 @@ function printSummary(results, oauthOutcomes) {
|
|
|
194495
194495
|
M2.error(`Failed: ${r2.type}${r2.error ? ` - ${r2.error}` : ""}`);
|
|
194496
194496
|
}
|
|
194497
194497
|
}
|
|
194498
|
-
async function pushConnectorsAction() {
|
|
194498
|
+
async function pushConnectorsAction(isNonInteractive) {
|
|
194499
194499
|
const { connectors } = await readProjectConfig();
|
|
194500
194500
|
if (connectors.length === 0) {
|
|
194501
194501
|
M2.info("No local connectors found - checking for remote connectors to remove");
|
|
@@ -194509,18 +194509,18 @@ async function pushConnectorsAction() {
|
|
|
194509
194509
|
const needsOAuth = filterPendingOAuth(results);
|
|
194510
194510
|
let outroMessage = "Connectors pushed to Base44";
|
|
194511
194511
|
const oauthOutcomes = await promptOAuthFlows(needsOAuth, {
|
|
194512
|
-
skipPrompt:
|
|
194512
|
+
skipPrompt: isNonInteractive
|
|
194513
194513
|
});
|
|
194514
194514
|
const allAuthorized = oauthOutcomes.size > 0 && [...oauthOutcomes.values()].every((s) => s === "ACTIVE");
|
|
194515
194515
|
if (needsOAuth.length > 0 && !allAuthorized) {
|
|
194516
|
-
outroMessage =
|
|
194516
|
+
outroMessage = isNonInteractive ? "Skipped OAuth in non-interactive mode. Run 'base44 connectors push' locally or open the links above to authorize." : "Some connectors still require authorization. Run 'base44 connectors push' or open the links above to authorize.";
|
|
194517
194517
|
}
|
|
194518
194518
|
printSummary(results, oauthOutcomes);
|
|
194519
194519
|
return { outroMessage };
|
|
194520
194520
|
}
|
|
194521
194521
|
function getConnectorsPushCommand(context) {
|
|
194522
194522
|
return new Command("push").description("Push local connectors to Base44 (overwrites connectors on Base44)").action(async () => {
|
|
194523
|
-
await runCommand(pushConnectorsAction, { requireAuth: true }, context);
|
|
194523
|
+
await runCommand(() => pushConnectorsAction(context.isNonInteractive), { requireAuth: true }, context);
|
|
194524
194524
|
});
|
|
194525
194525
|
}
|
|
194526
194526
|
|
|
@@ -194530,16 +194530,16 @@ function getConnectorsCommand(context) {
|
|
|
194530
194530
|
}
|
|
194531
194531
|
|
|
194532
194532
|
// src/cli/commands/dashboard/open.ts
|
|
194533
|
-
async function openDashboard() {
|
|
194533
|
+
async function openDashboard(isNonInteractive) {
|
|
194534
194534
|
const dashboardUrl = getDashboardUrl();
|
|
194535
|
-
if (!
|
|
194535
|
+
if (!isNonInteractive) {
|
|
194536
194536
|
await open_default(dashboardUrl);
|
|
194537
194537
|
}
|
|
194538
194538
|
return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
|
|
194539
194539
|
}
|
|
194540
194540
|
function getDashboardOpenCommand(context) {
|
|
194541
194541
|
return new Command("open").description("Open the app dashboard in your browser").action(async () => {
|
|
194542
|
-
await runCommand(openDashboard, { requireAuth: true }, context);
|
|
194542
|
+
await runCommand(() => openDashboard(context.isNonInteractive), { requireAuth: true }, context);
|
|
194543
194543
|
});
|
|
194544
194544
|
}
|
|
194545
194545
|
|
|
@@ -194845,7 +194845,7 @@ ${summaryLines.join(`
|
|
|
194845
194845
|
const needsOAuth = filterPendingOAuth(result.connectorResults ?? []);
|
|
194846
194846
|
if (needsOAuth.length > 0) {
|
|
194847
194847
|
const oauthOutcomes = await promptOAuthFlows(needsOAuth, {
|
|
194848
|
-
skipPrompt: options.yes ||
|
|
194848
|
+
skipPrompt: options.yes || options.isNonInteractive
|
|
194849
194849
|
});
|
|
194850
194850
|
const allAuthorized = oauthOutcomes.size > 0 && [...oauthOutcomes.values()].every((s) => s === "ACTIVE");
|
|
194851
194851
|
if (!allAuthorized) {
|
|
@@ -194860,7 +194860,10 @@ ${summaryLines.join(`
|
|
|
194860
194860
|
}
|
|
194861
194861
|
function getDeployCommand(context) {
|
|
194862
194862
|
return new Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
|
|
194863
|
-
await runCommand(() => deployAction(
|
|
194863
|
+
await runCommand(() => deployAction({
|
|
194864
|
+
...options,
|
|
194865
|
+
isNonInteractive: context.isNonInteractive
|
|
194866
|
+
}), { requireAuth: true }, context);
|
|
194864
194867
|
});
|
|
194865
194868
|
}
|
|
194866
194869
|
|
|
@@ -195042,21 +195045,24 @@ async function deployAction2(options) {
|
|
|
195042
195045
|
}
|
|
195043
195046
|
function getSiteDeployCommand(context) {
|
|
195044
195047
|
return new Command("deploy").description("Deploy built site files to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
|
|
195045
|
-
await runCommand(() => deployAction2(
|
|
195048
|
+
await runCommand(() => deployAction2({
|
|
195049
|
+
...options,
|
|
195050
|
+
isNonInteractive: context.isNonInteractive
|
|
195051
|
+
}), { requireAuth: true }, context);
|
|
195046
195052
|
});
|
|
195047
195053
|
}
|
|
195048
195054
|
|
|
195049
195055
|
// src/cli/commands/site/open.ts
|
|
195050
|
-
async function openAction() {
|
|
195056
|
+
async function openAction(isNonInteractive) {
|
|
195051
195057
|
const siteUrl = await getSiteUrl();
|
|
195052
|
-
if (!
|
|
195058
|
+
if (!isNonInteractive) {
|
|
195053
195059
|
await open_default(siteUrl);
|
|
195054
195060
|
}
|
|
195055
195061
|
return { outroMessage: `Site opened at ${siteUrl}` };
|
|
195056
195062
|
}
|
|
195057
195063
|
function getSiteOpenCommand(context) {
|
|
195058
195064
|
return new Command("open").description("Open the published site in your browser").action(async () => {
|
|
195059
|
-
await runCommand(openAction, { requireAuth: true }, context);
|
|
195065
|
+
await runCommand(() => openAction(context.isNonInteractive), { requireAuth: true }, context);
|
|
195060
195066
|
});
|
|
195061
195067
|
}
|
|
195062
195068
|
|
|
@@ -195459,7 +195465,7 @@ async function eject(options8) {
|
|
|
195459
195465
|
}
|
|
195460
195466
|
function getEjectCommand(context) {
|
|
195461
195467
|
return new Command("eject").description("Download the code for an existing Base44 project").option("-p, --path <path>", "Path where to write the project").option("--project-id <id>", "Project ID to eject (skips interactive selection)").option("-y, --yes", "Skip confirmation prompts").action(async (options8) => {
|
|
195462
|
-
await runCommand(() => eject(options8), { requireAuth: true, requireAppConfig: false }, context);
|
|
195468
|
+
await runCommand(() => eject({ ...options8, isNonInteractive: context.isNonInteractive }), { requireAuth: true, requireAppConfig: false }, context);
|
|
195463
195469
|
});
|
|
195464
195470
|
}
|
|
195465
195471
|
|
|
@@ -199726,7 +199732,8 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
|
|
|
199726
199732
|
async function runCLI() {
|
|
199727
199733
|
const errorReporter = new ErrorReporter;
|
|
199728
199734
|
errorReporter.registerProcessErrorHandlers();
|
|
199729
|
-
const
|
|
199735
|
+
const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
|
|
199736
|
+
const context = { errorReporter, isNonInteractive };
|
|
199730
199737
|
const program2 = createProgram(context);
|
|
199731
199738
|
try {
|
|
199732
199739
|
const userInfo = await readAuth();
|
|
@@ -199751,4 +199758,4 @@ export {
|
|
|
199751
199758
|
CLIExitError
|
|
199752
199759
|
};
|
|
199753
199760
|
|
|
199754
|
-
//# debugId=
|
|
199761
|
+
//# debugId=8F512541E4B9E47964756E2164756E21
|