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