@base44-preview/cli 0.0.45-pr.425.bdf59d4 → 0.0.45-pr.425.ce72a21
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 +22 -20
- package/dist/cli/index.js.map +22 -22
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -238855,7 +238855,9 @@ async function saveAuthData(response, userInfo) {
|
|
|
238855
238855
|
name: userInfo.name
|
|
238856
238856
|
});
|
|
238857
238857
|
}
|
|
238858
|
-
async function login({
|
|
238858
|
+
async function login({
|
|
238859
|
+
log: logger
|
|
238860
|
+
}) {
|
|
238859
238861
|
const deviceCodeResponse = await generateAndDisplayDeviceCode(logger);
|
|
238860
238862
|
const token = await waitForAuthentication(deviceCodeResponse.deviceCode, deviceCodeResponse.expiresIn, deviceCodeResponse.interval);
|
|
238861
238863
|
const userInfo = await getUserInfo(token.accessToken);
|
|
@@ -238869,7 +238871,7 @@ async function login({ logger }) {
|
|
|
238869
238871
|
async function ensureAuth(ctx) {
|
|
238870
238872
|
const loggedIn = await isLoggedIn();
|
|
238871
238873
|
if (!loggedIn) {
|
|
238872
|
-
ctx.
|
|
238874
|
+
ctx.log.info("You need to login first to continue.");
|
|
238873
238875
|
await login(ctx);
|
|
238874
238876
|
}
|
|
238875
238877
|
try {
|
|
@@ -246874,7 +246876,7 @@ async function parseEnvFile(filePath) {
|
|
|
246874
246876
|
}
|
|
246875
246877
|
// src/cli/commands/agents/pull.ts
|
|
246876
246878
|
async function pullAgentsAction({
|
|
246877
|
-
|
|
246879
|
+
log: logger2
|
|
246878
246880
|
}) {
|
|
246879
246881
|
const { project: project2 } = await readProjectConfig();
|
|
246880
246882
|
const configDir = dirname7(project2.configPath);
|
|
@@ -246910,7 +246912,7 @@ function getAgentsPullCommand() {
|
|
|
246910
246912
|
|
|
246911
246913
|
// src/cli/commands/agents/push.ts
|
|
246912
246914
|
async function pushAgentsAction({
|
|
246913
|
-
|
|
246915
|
+
log: logger2
|
|
246914
246916
|
}) {
|
|
246915
246917
|
const { agents } = await readProjectConfig();
|
|
246916
246918
|
logger2.info(agents.length === 0 ? "No local agents found - this will delete all remote agents" : `Found ${agents.length} agents to push`);
|
|
@@ -246971,7 +246973,7 @@ function getWhoamiCommand() {
|
|
|
246971
246973
|
|
|
246972
246974
|
// src/cli/commands/connectors/list-available.ts
|
|
246973
246975
|
async function listAvailableAction({
|
|
246974
|
-
|
|
246976
|
+
log: logger2
|
|
246975
246977
|
}) {
|
|
246976
246978
|
const { integrations } = await runTask("Fetching available integrations from Base44", async () => {
|
|
246977
246979
|
return await listAvailableIntegrations();
|
|
@@ -247000,7 +247002,7 @@ function getConnectorsListAvailableCommand() {
|
|
|
247000
247002
|
// src/cli/commands/connectors/pull.ts
|
|
247001
247003
|
import { dirname as dirname8, join as join12 } from "node:path";
|
|
247002
247004
|
async function pullConnectorsAction({
|
|
247003
|
-
|
|
247005
|
+
log: logger2
|
|
247004
247006
|
}) {
|
|
247005
247007
|
const { project: project2 } = await readProjectConfig();
|
|
247006
247008
|
const configDir = dirname8(project2.configPath);
|
|
@@ -247789,7 +247791,7 @@ function printSummary(results, oauthOutcomes, logger2) {
|
|
|
247789
247791
|
}
|
|
247790
247792
|
async function pushConnectorsAction({
|
|
247791
247793
|
isNonInteractive,
|
|
247792
|
-
|
|
247794
|
+
log: logger2
|
|
247793
247795
|
}) {
|
|
247794
247796
|
const { connectors } = await readProjectConfig();
|
|
247795
247797
|
if (connectors.length === 0) {
|
|
@@ -247843,7 +247845,7 @@ function getDashboardCommand() {
|
|
|
247843
247845
|
|
|
247844
247846
|
// src/cli/commands/entities/push.ts
|
|
247845
247847
|
async function pushEntitiesAction({
|
|
247846
|
-
|
|
247848
|
+
log: logger2
|
|
247847
247849
|
}) {
|
|
247848
247850
|
const { entities } = await readProjectConfig();
|
|
247849
247851
|
if (entities.length === 0) {
|
|
@@ -247982,7 +247984,7 @@ function buildDeploySummary(results) {
|
|
|
247982
247984
|
parts.push(`${failed} error${failed !== 1 ? "s" : ""}`);
|
|
247983
247985
|
return parts.join(", ") || "No functions deployed";
|
|
247984
247986
|
}
|
|
247985
|
-
async function deployFunctionsAction({
|
|
247987
|
+
async function deployFunctionsAction({ log: logger2 }, names, options) {
|
|
247986
247988
|
if (options.force && names.length > 0) {
|
|
247987
247989
|
throw new InvalidInputError("--force cannot be used when specifying function names");
|
|
247988
247990
|
}
|
|
@@ -248036,7 +248038,7 @@ function getDeployCommand() {
|
|
|
248036
248038
|
|
|
248037
248039
|
// src/cli/commands/functions/list.ts
|
|
248038
248040
|
async function listFunctionsAction({
|
|
248039
|
-
|
|
248041
|
+
log: logger2
|
|
248040
248042
|
}) {
|
|
248041
248043
|
const { functions } = await runTask("Fetching functions...", async () => listDeployedFunctions(), { errorMessage: "Failed to fetch functions" });
|
|
248042
248044
|
if (functions.length === 0) {
|
|
@@ -248057,7 +248059,7 @@ function getListCommand() {
|
|
|
248057
248059
|
|
|
248058
248060
|
// src/cli/commands/functions/pull.ts
|
|
248059
248061
|
import { dirname as dirname9, join as join13 } from "node:path";
|
|
248060
|
-
async function pullFunctionsAction({
|
|
248062
|
+
async function pullFunctionsAction({ log: logger2 }, name2) {
|
|
248061
248063
|
const { project: project2 } = await readProjectConfig();
|
|
248062
248064
|
const configDir = dirname9(project2.configPath);
|
|
248063
248065
|
const functionsDir = join13(configDir, project2.functionsDir);
|
|
@@ -248269,7 +248271,7 @@ async function executeCreate({
|
|
|
248269
248271
|
}
|
|
248270
248272
|
return { outroMessage: "Your project is set up and ready to use" };
|
|
248271
248273
|
}
|
|
248272
|
-
async function createAction({
|
|
248274
|
+
async function createAction({ log: logger2, isNonInteractive }, name2, options) {
|
|
248273
248275
|
if (name2 && !options.path) {
|
|
248274
248276
|
options.path = `./${import_kebabCase.default(name2)}`;
|
|
248275
248277
|
}
|
|
@@ -248300,7 +248302,7 @@ Examples:
|
|
|
248300
248302
|
}
|
|
248301
248303
|
|
|
248302
248304
|
// src/cli/commands/project/deploy.ts
|
|
248303
|
-
async function deployAction({ isNonInteractive,
|
|
248305
|
+
async function deployAction({ isNonInteractive, log: logger2 }, options = {}) {
|
|
248304
248306
|
if (isNonInteractive && !options.yes) {
|
|
248305
248307
|
throw new InvalidInputError("--yes is required in non-interactive mode");
|
|
248306
248308
|
}
|
|
@@ -248463,7 +248465,7 @@ async function promptForExistingProject(linkableProjects) {
|
|
|
248463
248465
|
return selectedProject;
|
|
248464
248466
|
}
|
|
248465
248467
|
async function link(ctx, options) {
|
|
248466
|
-
const {
|
|
248468
|
+
const { log: logger2, isNonInteractive } = ctx;
|
|
248467
248469
|
const skipPrompts = !!options.create || !!options.projectId;
|
|
248468
248470
|
if (!skipPrompts && isNonInteractive) {
|
|
248469
248471
|
throw new InvalidInputError("--create with --name, or --projectId, is required in non-interactive mode");
|
|
@@ -248676,7 +248678,7 @@ function getSecretsDeleteCommand() {
|
|
|
248676
248678
|
|
|
248677
248679
|
// src/cli/commands/secrets/list.ts
|
|
248678
248680
|
async function listSecretsAction({
|
|
248679
|
-
|
|
248681
|
+
log: logger2
|
|
248680
248682
|
}) {
|
|
248681
248683
|
const secrets = await runTask("Fetching secrets from Base44", async () => {
|
|
248682
248684
|
return await listSecrets();
|
|
@@ -248727,7 +248729,7 @@ function validateInput(entries, options) {
|
|
|
248727
248729
|
throw new InvalidInputError("Provide KEY=VALUE pairs or --env-file, but not both.");
|
|
248728
248730
|
}
|
|
248729
248731
|
}
|
|
248730
|
-
async function setSecretsAction({
|
|
248732
|
+
async function setSecretsAction({ log: logger2 }, entries, options) {
|
|
248731
248733
|
validateInput(entries, options);
|
|
248732
248734
|
let secrets;
|
|
248733
248735
|
if (options.envFile) {
|
|
@@ -251709,7 +251711,7 @@ async function createDevServer(options8) {
|
|
|
251709
251711
|
}
|
|
251710
251712
|
|
|
251711
251713
|
// src/cli/commands/dev.ts
|
|
251712
|
-
async function devAction({
|
|
251714
|
+
async function devAction({ log: logger2 }, options8) {
|
|
251713
251715
|
const port = options8.port ? Number(options8.port) : undefined;
|
|
251714
251716
|
const { port: resolvedPort } = await createDevServer({
|
|
251715
251717
|
logger: logger2,
|
|
@@ -251732,7 +251734,7 @@ function getDevCommand() {
|
|
|
251732
251734
|
import { resolve as resolve8 } from "node:path";
|
|
251733
251735
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
251734
251736
|
async function eject(ctx, options8) {
|
|
251735
|
-
const {
|
|
251737
|
+
const { log: logger2, isNonInteractive } = ctx;
|
|
251736
251738
|
if (isNonInteractive && !options8.projectId) {
|
|
251737
251739
|
throw new InvalidInputError("--project-id is required in non-interactive mode");
|
|
251738
251740
|
}
|
|
@@ -256073,7 +256075,7 @@ async function runCLI(options8) {
|
|
|
256073
256075
|
errorReporter,
|
|
256074
256076
|
isNonInteractive,
|
|
256075
256077
|
distribution: options8?.distribution ?? "npm",
|
|
256076
|
-
|
|
256078
|
+
log: logger3
|
|
256077
256079
|
};
|
|
256078
256080
|
const program2 = createProgram(context);
|
|
256079
256081
|
try {
|
|
@@ -256099,4 +256101,4 @@ export {
|
|
|
256099
256101
|
CLIExitError
|
|
256100
256102
|
};
|
|
256101
256103
|
|
|
256102
|
-
//# debugId=
|
|
256104
|
+
//# debugId=4B557C4731F0681C64756E2164756E21
|