@base44-preview/cli 0.0.45-pr.425.c43f1ad → 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 CHANGED
@@ -238804,14 +238804,14 @@ async function getUserInfo(accessToken) {
238804
238804
  return result.data;
238805
238805
  }
238806
238806
  // src/cli/commands/auth/login-flow.ts
238807
- async function generateAndDisplayDeviceCode(log) {
238807
+ async function generateAndDisplayDeviceCode(logger) {
238808
238808
  const deviceCodeResponse = await runTask("Generating device code...", async () => {
238809
238809
  return await generateDeviceCode();
238810
238810
  }, {
238811
238811
  successMessage: "Device code generated",
238812
238812
  errorMessage: "Failed to generate device code"
238813
238813
  });
238814
- log.info(`Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}` + `
238814
+ logger.info(`Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}` + `
238815
238815
  Please confirm this code at: ${deviceCodeResponse.verificationUri}`);
238816
238816
  return deviceCodeResponse;
238817
238817
  }
@@ -238855,8 +238855,8 @@ async function saveAuthData(response, userInfo) {
238855
238855
  name: userInfo.name
238856
238856
  });
238857
238857
  }
238858
- async function login({ log }) {
238859
- const deviceCodeResponse = await generateAndDisplayDeviceCode(log);
238858
+ async function login({ logger }) {
238859
+ const deviceCodeResponse = await generateAndDisplayDeviceCode(logger);
238860
238860
  const token = await waitForAuthentication(deviceCodeResponse.deviceCode, deviceCodeResponse.expiresIn, deviceCodeResponse.interval);
238861
238861
  const userInfo = await getUserInfo(token.accessToken);
238862
238862
  await saveAuthData(token, userInfo);
@@ -238869,7 +238869,7 @@ async function login({ log }) {
238869
238869
  async function ensureAuth(ctx) {
238870
238870
  const loggedIn = await isLoggedIn();
238871
238871
  if (!loggedIn) {
238872
- ctx.log.info("You need to login first to continue.");
238872
+ ctx.logger.info("You need to login first to continue.");
238873
238873
  await login(ctx);
238874
238874
  }
238875
238875
  try {
@@ -246874,7 +246874,7 @@ async function parseEnvFile(filePath) {
246874
246874
  }
246875
246875
  // src/cli/commands/agents/pull.ts
246876
246876
  async function pullAgentsAction({
246877
- log
246877
+ logger: logger2
246878
246878
  }) {
246879
246879
  const { project: project2 } = await readProjectConfig();
246880
246880
  const configDir = dirname7(project2.configPath);
@@ -246892,13 +246892,13 @@ async function pullAgentsAction({
246892
246892
  errorMessage: "Failed to sync agent files"
246893
246893
  });
246894
246894
  if (written.length > 0) {
246895
- log.success(`Written: ${written.join(", ")}`);
246895
+ logger2.success(`Written: ${written.join(", ")}`);
246896
246896
  }
246897
246897
  if (deleted.length > 0) {
246898
- log.warn(`Deleted: ${deleted.join(", ")}`);
246898
+ logger2.warn(`Deleted: ${deleted.join(", ")}`);
246899
246899
  }
246900
246900
  if (written.length === 0 && deleted.length === 0) {
246901
- log.info("All agents are already up to date");
246901
+ logger2.info("All agents are already up to date");
246902
246902
  }
246903
246903
  return {
246904
246904
  outroMessage: `Pulled ${remoteAgents.total} agents to ${agentsDir}`
@@ -246910,10 +246910,10 @@ function getAgentsPullCommand() {
246910
246910
 
246911
246911
  // src/cli/commands/agents/push.ts
246912
246912
  async function pushAgentsAction({
246913
- log
246913
+ logger: logger2
246914
246914
  }) {
246915
246915
  const { agents } = await readProjectConfig();
246916
- log.info(agents.length === 0 ? "No local agents found - this will delete all remote agents" : `Found ${agents.length} agents to push`);
246916
+ logger2.info(agents.length === 0 ? "No local agents found - this will delete all remote agents" : `Found ${agents.length} agents to push`);
246917
246917
  const result = await runTask("Pushing agents to Base44", async () => {
246918
246918
  return await pushAgents(agents);
246919
246919
  }, {
@@ -246921,13 +246921,13 @@ async function pushAgentsAction({
246921
246921
  errorMessage: "Failed to push agents"
246922
246922
  });
246923
246923
  if (result.created.length > 0) {
246924
- log.success(`Created: ${result.created.join(", ")}`);
246924
+ logger2.success(`Created: ${result.created.join(", ")}`);
246925
246925
  }
246926
246926
  if (result.updated.length > 0) {
246927
- log.success(`Updated: ${result.updated.join(", ")}`);
246927
+ logger2.success(`Updated: ${result.updated.join(", ")}`);
246928
246928
  }
246929
246929
  if (result.deleted.length > 0) {
246930
- log.warn(`Deleted: ${result.deleted.join(", ")}`);
246930
+ logger2.warn(`Deleted: ${result.deleted.join(", ")}`);
246931
246931
  }
246932
246932
  return { outroMessage: "Agents pushed to Base44" };
246933
246933
  }
@@ -246971,7 +246971,7 @@ function getWhoamiCommand() {
246971
246971
 
246972
246972
  // src/cli/commands/connectors/list-available.ts
246973
246973
  async function listAvailableAction({
246974
- log
246974
+ logger: logger2
246975
246975
  }) {
246976
246976
  const { integrations } = await runTask("Fetching available integrations from Base44", async () => {
246977
246977
  return await listAvailableIntegrations();
@@ -246985,7 +246985,7 @@ async function listAvailableAction({
246985
246985
  for (const { displayName, ...rest } of integrations) {
246986
246986
  const yaml2 = formatYaml(rest);
246987
246987
  const pad = " ".repeat(YAML_INDENT);
246988
- log.info(`${displayName}
246988
+ logger2.info(`${displayName}
246989
246989
  ${pad}${yaml2.replace(/\n/g, `
246990
246990
  ${pad}`)}`);
246991
246991
  }
@@ -247000,7 +247000,7 @@ function getConnectorsListAvailableCommand() {
247000
247000
  // src/cli/commands/connectors/pull.ts
247001
247001
  import { dirname as dirname8, join as join12 } from "node:path";
247002
247002
  async function pullConnectorsAction({
247003
- log
247003
+ logger: logger2
247004
247004
  }) {
247005
247005
  const { project: project2 } = await readProjectConfig();
247006
247006
  const configDir = dirname8(project2.configPath);
@@ -247018,13 +247018,13 @@ async function pullConnectorsAction({
247018
247018
  errorMessage: "Failed to sync connector files"
247019
247019
  });
247020
247020
  if (written.length > 0) {
247021
- log.success(`Written: ${written.join(", ")}`);
247021
+ logger2.success(`Written: ${written.join(", ")}`);
247022
247022
  }
247023
247023
  if (deleted.length > 0) {
247024
- log.warn(`Deleted: ${deleted.join(", ")}`);
247024
+ logger2.warn(`Deleted: ${deleted.join(", ")}`);
247025
247025
  }
247026
247026
  if (written.length === 0 && deleted.length === 0) {
247027
- log.info("All connectors are already up to date");
247027
+ logger2.info("All connectors are already up to date");
247028
247028
  }
247029
247029
  return {
247030
247030
  outroMessage: `Pulled ${remoteConnectors.length} connectors to ${connectorsDir}`
@@ -247693,14 +247693,14 @@ async function runOAuthFlowWithSkip(connector2) {
247693
247693
  }
247694
247694
  return finalStatus;
247695
247695
  }
247696
- async function promptOAuthFlows(pending, log, options) {
247696
+ async function promptOAuthFlows(pending, logger2, options) {
247697
247697
  const outcomes = new Map;
247698
247698
  if (pending.length === 0) {
247699
247699
  return outcomes;
247700
247700
  }
247701
- log.warn(`${pending.length} connector(s) require authorization in your browser:`);
247701
+ logger2.warn(`${pending.length} connector(s) require authorization in your browser:`);
247702
247702
  for (const connector2 of pending) {
247703
- log.info(` ${connector2.type}: ${theme.styles.dim(connector2.redirectUrl)}`);
247703
+ logger2.info(` ${connector2.type}: ${theme.styles.dim(connector2.redirectUrl)}`);
247704
247704
  }
247705
247705
  if (options?.skipPrompt) {
247706
247706
  return outcomes;
@@ -247713,11 +247713,11 @@ async function promptOAuthFlows(pending, log, options) {
247713
247713
  }
247714
247714
  for (const connector2 of pending) {
247715
247715
  try {
247716
- log.info(`Opening browser for ${connector2.type}...`);
247716
+ logger2.info(`Opening browser for ${connector2.type}...`);
247717
247717
  const status = await runOAuthFlowWithSkip(connector2);
247718
247718
  outcomes.set(connector2.type, status);
247719
247719
  } catch (err) {
247720
- log.error(`Failed to authorize ${connector2.type}: ${err instanceof Error ? err.message : String(err)}`);
247720
+ logger2.error(`Failed to authorize ${connector2.type}: ${err instanceof Error ? err.message : String(err)}`);
247721
247721
  outcomes.set(connector2.type, "FAILED");
247722
247722
  }
247723
247723
  }
@@ -247725,7 +247725,7 @@ async function promptOAuthFlows(pending, log, options) {
247725
247725
  }
247726
247726
 
247727
247727
  // src/cli/commands/connectors/push.ts
247728
- function printSummary(results, oauthOutcomes, log) {
247728
+ function printSummary(results, oauthOutcomes, logger2) {
247729
247729
  const synced = [];
247730
247730
  const added = [];
247731
247731
  let provisioned;
@@ -247763,54 +247763,54 @@ function printSummary(results, oauthOutcomes, log) {
247763
247763
  }
247764
247764
  }
247765
247765
  }
247766
- log.info(theme.styles.bold("Summary:"));
247766
+ logger2.info(theme.styles.bold("Summary:"));
247767
247767
  if (provisioned) {
247768
- log.success("Stripe sandbox provisioned");
247768
+ logger2.success("Stripe sandbox provisioned");
247769
247769
  if (provisioned.claimUrl) {
247770
- log.info(` Claim your Stripe sandbox: ${theme.colors.links(provisioned.claimUrl)}`);
247770
+ logger2.info(` Claim your Stripe sandbox: ${theme.colors.links(provisioned.claimUrl)}`);
247771
247771
  }
247772
- log.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
247772
+ logger2.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
247773
247773
  }
247774
247774
  if (synced.length > 0) {
247775
- log.success(`Synced: ${synced.join(", ")}`);
247775
+ logger2.success(`Synced: ${synced.join(", ")}`);
247776
247776
  }
247777
247777
  if (added.length > 0) {
247778
- log.success(`Added: ${added.join(", ")}`);
247778
+ logger2.success(`Added: ${added.join(", ")}`);
247779
247779
  }
247780
247780
  if (removed.length > 0) {
247781
- log.info(theme.styles.dim(`Removed: ${removed.join(", ")}`));
247781
+ logger2.info(theme.styles.dim(`Removed: ${removed.join(", ")}`));
247782
247782
  }
247783
247783
  if (skipped.length > 0) {
247784
- log.warn(`Skipped: ${skipped.join(", ")}`);
247784
+ logger2.warn(`Skipped: ${skipped.join(", ")}`);
247785
247785
  }
247786
247786
  for (const r of failed) {
247787
- log.error(`Failed: ${r.type} - ${r.error}`);
247787
+ logger2.error(`Failed: ${r.type} - ${r.error}`);
247788
247788
  }
247789
247789
  }
247790
247790
  async function pushConnectorsAction({
247791
247791
  isNonInteractive,
247792
- log
247792
+ logger: logger2
247793
247793
  }) {
247794
247794
  const { connectors } = await readProjectConfig();
247795
247795
  if (connectors.length === 0) {
247796
- log.info("No local connectors found - checking for remote connectors to remove");
247796
+ logger2.info("No local connectors found - checking for remote connectors to remove");
247797
247797
  } else {
247798
247798
  const connectorNames = connectors.map((c3) => c3.type).join(", ");
247799
- log.info(`Found ${connectors.length} connectors to push: ${connectorNames}`);
247799
+ logger2.info(`Found ${connectors.length} connectors to push: ${connectorNames}`);
247800
247800
  }
247801
247801
  const { results } = await runTask("Pushing connectors to Base44", async () => {
247802
247802
  return await pushConnectors(connectors);
247803
247803
  });
247804
247804
  const needsOAuth = filterPendingOAuth(results);
247805
247805
  let outroMessage = "Connectors pushed to Base44";
247806
- const oauthOutcomes = await promptOAuthFlows(needsOAuth, log, {
247806
+ const oauthOutcomes = await promptOAuthFlows(needsOAuth, logger2, {
247807
247807
  skipPrompt: isNonInteractive
247808
247808
  });
247809
247809
  const allAuthorized = oauthOutcomes.size > 0 && [...oauthOutcomes.values()].every((s) => s === "ACTIVE");
247810
247810
  if (needsOAuth.length > 0 && !allAuthorized) {
247811
247811
  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.";
247812
247812
  }
247813
- printSummary(results, oauthOutcomes, log);
247813
+ printSummary(results, oauthOutcomes, logger2);
247814
247814
  return { outroMessage };
247815
247815
  }
247816
247816
  function getConnectorsPushCommand() {
@@ -247843,14 +247843,14 @@ function getDashboardCommand() {
247843
247843
 
247844
247844
  // src/cli/commands/entities/push.ts
247845
247845
  async function pushEntitiesAction({
247846
- log
247846
+ logger: logger2
247847
247847
  }) {
247848
247848
  const { entities } = await readProjectConfig();
247849
247849
  if (entities.length === 0) {
247850
247850
  return { outroMessage: "No entities found in project" };
247851
247851
  }
247852
247852
  const entityNames = entities.map((e2) => e2.name).join(", ");
247853
- log.info(`Found ${entities.length} entities to push: ${entityNames}`);
247853
+ logger2.info(`Found ${entities.length} entities to push: ${entityNames}`);
247854
247854
  const result = await runTask("Pushing entities to Base44", async () => {
247855
247855
  return await pushEntities(entities);
247856
247856
  }, {
@@ -247858,13 +247858,13 @@ async function pushEntitiesAction({
247858
247858
  errorMessage: "Failed to push entities"
247859
247859
  });
247860
247860
  if (result.created.length > 0) {
247861
- log.success(`Created: ${result.created.join(", ")}`);
247861
+ logger2.success(`Created: ${result.created.join(", ")}`);
247862
247862
  }
247863
247863
  if (result.updated.length > 0) {
247864
- log.success(`Updated: ${result.updated.join(", ")}`);
247864
+ logger2.success(`Updated: ${result.updated.join(", ")}`);
247865
247865
  }
247866
247866
  if (result.deleted.length > 0) {
247867
- log.warn(`Deleted: ${result.deleted.join(", ")}`);
247867
+ logger2.warn(`Deleted: ${result.deleted.join(", ")}`);
247868
247868
  }
247869
247869
  return { outroMessage: "Entities pushed to Base44" };
247870
247870
  }
@@ -247929,15 +247929,15 @@ function getDeleteCommand() {
247929
247929
  function formatDuration(ms) {
247930
247930
  return `${(ms / 1000).toFixed(1)}s`;
247931
247931
  }
247932
- function formatDeployResult(result, log) {
247932
+ function formatDeployResult(result, logger2) {
247933
247933
  const label = result.name.padEnd(25);
247934
247934
  if (result.status === "deployed") {
247935
247935
  const timing = result.durationMs ? theme.styles.dim(` (${formatDuration(result.durationMs)})`) : "";
247936
- log.success(`${label} deployed${timing}`);
247936
+ logger2.success(`${label} deployed${timing}`);
247937
247937
  } else if (result.status === "unchanged") {
247938
- log.success(`${label} unchanged`);
247938
+ logger2.success(`${label} unchanged`);
247939
247939
  } else {
247940
- log.error(`${label} error: ${result.error}`);
247940
+ logger2.error(`${label} error: ${result.error}`);
247941
247941
  }
247942
247942
  }
247943
247943
 
@@ -247956,17 +247956,17 @@ function resolveFunctionsToDeploy(names, allFunctions) {
247956
247956
  }
247957
247957
  return allFunctions.filter((f) => names.includes(f.name));
247958
247958
  }
247959
- function formatPruneResult(pruneResult, log) {
247959
+ function formatPruneResult(pruneResult, logger2) {
247960
247960
  if (pruneResult.deleted) {
247961
- log.success(`${pruneResult.name.padEnd(25)} deleted`);
247961
+ logger2.success(`${pruneResult.name.padEnd(25)} deleted`);
247962
247962
  } else {
247963
- log.error(`${pruneResult.name.padEnd(25)} error: ${pruneResult.error}`);
247963
+ logger2.error(`${pruneResult.name.padEnd(25)} error: ${pruneResult.error}`);
247964
247964
  }
247965
247965
  }
247966
- function formatPruneSummary(pruneResults, log) {
247966
+ function formatPruneSummary(pruneResults, logger2) {
247967
247967
  if (pruneResults.length > 0) {
247968
247968
  const pruned = pruneResults.filter((r) => r.deleted).length;
247969
- log.info(`${pruned} deleted`);
247969
+ logger2.info(`${pruned} deleted`);
247970
247970
  }
247971
247971
  }
247972
247972
  function buildDeploySummary(results) {
@@ -247982,7 +247982,7 @@ function buildDeploySummary(results) {
247982
247982
  parts.push(`${failed} error${failed !== 1 ? "s" : ""}`);
247983
247983
  return parts.join(", ") || "No functions deployed";
247984
247984
  }
247985
- async function deployFunctionsAction({ log }, names, options) {
247985
+ async function deployFunctionsAction({ logger: logger2 }, names, options) {
247986
247986
  if (options.force && names.length > 0) {
247987
247987
  throw new InvalidInputError("--force cannot be used when specifying function names");
247988
247988
  }
@@ -247993,17 +247993,17 @@ async function deployFunctionsAction({ log }, names, options) {
247993
247993
  outroMessage: "No functions found. Create functions in the 'functions' directory."
247994
247994
  };
247995
247995
  }
247996
- log.info(`Found ${toDeploy.length} ${toDeploy.length === 1 ? "function" : "functions"} to deploy`);
247996
+ logger2.info(`Found ${toDeploy.length} ${toDeploy.length === 1 ? "function" : "functions"} to deploy`);
247997
247997
  let completed = 0;
247998
247998
  const total = toDeploy.length;
247999
247999
  const results = await deployFunctionsSequentially(toDeploy, {
248000
248000
  onStart: (startNames) => {
248001
248001
  const label = startNames.length === 1 ? startNames[0] : `${startNames.length} functions`;
248002
- log.step(theme.styles.dim(`[${completed + 1}/${total}] Deploying ${label}...`));
248002
+ logger2.step(theme.styles.dim(`[${completed + 1}/${total}] Deploying ${label}...`));
248003
248003
  },
248004
248004
  onResult: (result) => {
248005
248005
  completed++;
248006
- formatDeployResult(result, log);
248006
+ formatDeployResult(result, logger2);
248007
248007
  }
248008
248008
  });
248009
248009
  if (options.force) {
@@ -248014,16 +248014,16 @@ async function deployFunctionsAction({ log }, names, options) {
248014
248014
  onStart: (total2) => {
248015
248015
  pruneTotal = total2;
248016
248016
  if (total2 > 0) {
248017
- log.info(`Found ${total2} remote ${total2 === 1 ? "function" : "functions"} to delete`);
248017
+ logger2.info(`Found ${total2} remote ${total2 === 1 ? "function" : "functions"} to delete`);
248018
248018
  }
248019
248019
  },
248020
248020
  onBeforeDelete: (name2) => {
248021
248021
  pruneCompleted++;
248022
- log.step(theme.styles.dim(`[${pruneCompleted}/${pruneTotal}] Deleting ${name2}...`));
248022
+ logger2.step(theme.styles.dim(`[${pruneCompleted}/${pruneTotal}] Deleting ${name2}...`));
248023
248023
  },
248024
- onResult: (r) => formatPruneResult(r, log)
248024
+ onResult: (r) => formatPruneResult(r, logger2)
248025
248025
  });
248026
- formatPruneSummary(pruneResults, log);
248026
+ formatPruneSummary(pruneResults, logger2);
248027
248027
  }
248028
248028
  return { outroMessage: buildDeploySummary(results) };
248029
248029
  }
@@ -248036,7 +248036,7 @@ function getDeployCommand() {
248036
248036
 
248037
248037
  // src/cli/commands/functions/list.ts
248038
248038
  async function listFunctionsAction({
248039
- log
248039
+ logger: logger2
248040
248040
  }) {
248041
248041
  const { functions } = await runTask("Fetching functions...", async () => listDeployedFunctions(), { errorMessage: "Failed to fetch functions" });
248042
248042
  if (functions.length === 0) {
@@ -248045,7 +248045,7 @@ async function listFunctionsAction({
248045
248045
  for (const fn of functions) {
248046
248046
  const automationCount = fn.automations.length;
248047
248047
  const automationLabel = automationCount > 0 ? theme.styles.dim(` (${automationCount} automation${automationCount > 1 ? "s" : ""})`) : "";
248048
- log.message(` ${fn.name}${automationLabel}`);
248048
+ logger2.message(` ${fn.name}${automationLabel}`);
248049
248049
  }
248050
248050
  return {
248051
248051
  outroMessage: `${functions.length} function${functions.length !== 1 ? "s" : ""} on remote`
@@ -248057,7 +248057,7 @@ function getListCommand() {
248057
248057
 
248058
248058
  // src/cli/commands/functions/pull.ts
248059
248059
  import { dirname as dirname9, join as join13 } from "node:path";
248060
- async function pullFunctionsAction({ log }, name2) {
248060
+ async function pullFunctionsAction({ logger: logger2 }, name2) {
248061
248061
  const { project: project2 } = await readProjectConfig();
248062
248062
  const configDir = dirname9(project2.configPath);
248063
248063
  const functionsDir = join13(configDir, project2.functionsDir);
@@ -248084,10 +248084,10 @@ async function pullFunctionsAction({ log }, name2) {
248084
248084
  errorMessage: "Failed to write function files"
248085
248085
  });
248086
248086
  for (const name3 of written) {
248087
- log.success(`${name3.padEnd(25)} written`);
248087
+ logger2.success(`${name3.padEnd(25)} written`);
248088
248088
  }
248089
248089
  for (const name3 of skipped) {
248090
- log.info(`${name3.padEnd(25)} unchanged`);
248090
+ logger2.info(`${name3.padEnd(25)} unchanged`);
248091
248091
  }
248092
248092
  return {
248093
248093
  outroMessage: `Pulled ${toPull.length} function${toPull.length !== 1 ? "s" : ""} to ${functionsDir}`
@@ -248123,7 +248123,7 @@ function validateNonInteractiveFlags(command2) {
248123
248123
  command2.error("--path requires a project name argument. Usage: base44 create <name> --path <path>");
248124
248124
  }
248125
248125
  }
248126
- async function createInteractive(options, log) {
248126
+ async function createInteractive(options, logger2) {
248127
248127
  const templates = await listTemplates();
248128
248128
  const templateOptions = templates.map((t) => ({
248129
248129
  value: t,
@@ -248165,10 +248165,10 @@ async function createInteractive(options, log) {
248165
248165
  deploy: options.deploy,
248166
248166
  skills: options.skills,
248167
248167
  isInteractive: true
248168
- }, log);
248168
+ }, logger2);
248169
248169
  }
248170
- async function createNonInteractive(options, log) {
248171
- log.info(`Creating a new project at ${resolve2(options.path)}`);
248170
+ async function createNonInteractive(options, logger2) {
248171
+ logger2.info(`Creating a new project at ${resolve2(options.path)}`);
248172
248172
  const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
248173
248173
  return await executeCreate({
248174
248174
  template: template2,
@@ -248177,7 +248177,7 @@ async function createNonInteractive(options, log) {
248177
248177
  deploy: options.deploy,
248178
248178
  skills: options.skills,
248179
248179
  isInteractive: false
248180
- }, log);
248180
+ }, logger2);
248181
248181
  }
248182
248182
  async function executeCreate({
248183
248183
  template: template2,
@@ -248187,7 +248187,7 @@ async function executeCreate({
248187
248187
  deploy: deploy5,
248188
248188
  skills,
248189
248189
  isInteractive
248190
- }, log) {
248190
+ }, logger2) {
248191
248191
  const name2 = rawName.trim();
248192
248192
  const resolvedPath = resolve2(projectPath);
248193
248193
  const { projectId } = await runTask("Setting up your project...", async () => {
@@ -248262,14 +248262,14 @@ async function executeCreate({
248262
248262
  });
248263
248263
  } catch {}
248264
248264
  }
248265
- log.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name2)}`);
248266
- log.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
248265
+ logger2.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name2)}`);
248266
+ logger2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
248267
248267
  if (finalAppUrl) {
248268
- log.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
248268
+ logger2.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
248269
248269
  }
248270
248270
  return { outroMessage: "Your project is set up and ready to use" };
248271
248271
  }
248272
- async function createAction({ log, isNonInteractive }, name2, options) {
248272
+ async function createAction({ logger: logger2, isNonInteractive }, name2, options) {
248273
248273
  if (name2 && !options.path) {
248274
248274
  options.path = `./${import_kebabCase.default(name2)}`;
248275
248275
  }
@@ -248284,9 +248284,9 @@ async function createAction({ log, isNonInteractive }, name2, options) {
248284
248284
  });
248285
248285
  }
248286
248286
  if (skipPrompts) {
248287
- return await createNonInteractive({ name: options.name ?? name2, ...options }, log);
248287
+ return await createNonInteractive({ name: options.name ?? name2, ...options }, logger2);
248288
248288
  }
248289
- return await createInteractive({ name: name2, ...options }, log);
248289
+ return await createInteractive({ name: name2, ...options }, logger2);
248290
248290
  }
248291
248291
  function getCreateCommand() {
248292
248292
  return new Base44Command("create", {
@@ -248300,7 +248300,7 @@ Examples:
248300
248300
  }
248301
248301
 
248302
248302
  // src/cli/commands/project/deploy.ts
248303
- async function deployAction({ isNonInteractive, log }, options = {}) {
248303
+ async function deployAction({ isNonInteractive, logger: logger2 }, options = {}) {
248304
248304
  if (isNonInteractive && !options.yes) {
248305
248305
  throw new InvalidInputError("--yes is required in non-interactive mode");
248306
248306
  }
@@ -248328,7 +248328,7 @@ async function deployAction({ isNonInteractive, log }, options = {}) {
248328
248328
  summaryLines.push(` - Site from ${project2.site.outputDirectory}`);
248329
248329
  }
248330
248330
  if (!options.yes) {
248331
- log.warn(`This will update your Base44 app with:
248331
+ logger2.warn(`This will update your Base44 app with:
248332
248332
  ${summaryLines.join(`
248333
248333
  `)}`);
248334
248334
  const shouldDeploy = await Re({
@@ -248338,7 +248338,7 @@ ${summaryLines.join(`
248338
248338
  return { outroMessage: "Deployment cancelled" };
248339
248339
  }
248340
248340
  } else {
248341
- log.info(`Deploying:
248341
+ logger2.info(`Deploying:
248342
248342
  ${summaryLines.join(`
248343
248343
  `)}`);
248344
248344
  }
@@ -248347,46 +248347,46 @@ ${summaryLines.join(`
248347
248347
  const result = await deployAll(projectData, {
248348
248348
  onFunctionStart: (names) => {
248349
248349
  const label = names.length === 1 ? names[0] : `${names.length} functions`;
248350
- log.step(theme.styles.dim(`[${functionCompleted + 1}/${functionTotal}] Deploying ${label}...`));
248350
+ logger2.step(theme.styles.dim(`[${functionCompleted + 1}/${functionTotal}] Deploying ${label}...`));
248351
248351
  },
248352
248352
  onFunctionResult: (r) => {
248353
248353
  functionCompleted++;
248354
- formatDeployResult(r, log);
248354
+ formatDeployResult(r, logger2);
248355
248355
  }
248356
248356
  });
248357
248357
  const connectorResults = result.connectorResults ?? [];
248358
- await handleOAuthConnectors(connectorResults, isNonInteractive, options, log);
248358
+ await handleOAuthConnectors(connectorResults, isNonInteractive, options, logger2);
248359
248359
  const stripeResult = connectorResults.find((r) => r.type === "stripe");
248360
248360
  if (stripeResult?.action === "provisioned") {
248361
- printStripeResult(stripeResult, log);
248361
+ printStripeResult(stripeResult, logger2);
248362
248362
  }
248363
- log.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
248363
+ logger2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
248364
248364
  if (result.appUrl) {
248365
- log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
248365
+ logger2.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
248366
248366
  }
248367
248367
  return { outroMessage: "App deployed successfully" };
248368
248368
  }
248369
248369
  function getDeployCommand2() {
248370
248370
  return new Base44Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").action(deployAction);
248371
248371
  }
248372
- async function handleOAuthConnectors(connectorResults, isNonInteractive, options, log) {
248372
+ async function handleOAuthConnectors(connectorResults, isNonInteractive, options, logger2) {
248373
248373
  const needsOAuth = filterPendingOAuth(connectorResults);
248374
248374
  if (needsOAuth.length === 0)
248375
248375
  return;
248376
- const oauthOutcomes = await promptOAuthFlows(needsOAuth, log, {
248376
+ const oauthOutcomes = await promptOAuthFlows(needsOAuth, logger2, {
248377
248377
  skipPrompt: options.yes || isNonInteractive
248378
248378
  });
248379
248379
  const allAuthorized = oauthOutcomes.size > 0 && [...oauthOutcomes.values()].every((s) => s === "ACTIVE");
248380
248380
  if (!allAuthorized) {
248381
- log.info("Some connectors still require authorization. Run 'base44 connectors push' or open the links above in your browser.");
248381
+ logger2.info("Some connectors still require authorization. Run 'base44 connectors push' or open the links above in your browser.");
248382
248382
  }
248383
248383
  }
248384
- function printStripeResult(r, log) {
248385
- log.success("Stripe sandbox provisioned");
248384
+ function printStripeResult(r, logger2) {
248385
+ logger2.success("Stripe sandbox provisioned");
248386
248386
  if (r.claimUrl) {
248387
- log.info(` Claim your Stripe sandbox: ${theme.colors.links(r.claimUrl)}`);
248387
+ logger2.info(` Claim your Stripe sandbox: ${theme.colors.links(r.claimUrl)}`);
248388
248388
  }
248389
- log.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
248389
+ logger2.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
248390
248390
  }
248391
248391
 
248392
248392
  // src/cli/commands/project/link.ts
@@ -248463,7 +248463,7 @@ async function promptForExistingProject(linkableProjects) {
248463
248463
  return selectedProject;
248464
248464
  }
248465
248465
  async function link(ctx, options) {
248466
- const { log, isNonInteractive } = ctx;
248466
+ const { logger: logger2, isNonInteractive } = ctx;
248467
248467
  const skipPrompts = !!options.create || !!options.projectId;
248468
248468
  if (!skipPrompts && isNonInteractive) {
248469
248469
  throw new InvalidInputError("--create with --name, or --projectId, is required in non-interactive mode");
@@ -248531,7 +248531,7 @@ async function link(ctx, options) {
248531
248531
  setAppConfig({ id: projectId, projectRoot: projectRoot.root });
248532
248532
  finalProjectId = projectId;
248533
248533
  }
248534
- log.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(finalProjectId))}`);
248534
+ logger2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(finalProjectId))}`);
248535
248535
  return { outroMessage: "Project linked" };
248536
248536
  }
248537
248537
  function getLinkCommand() {
@@ -248676,7 +248676,7 @@ function getSecretsDeleteCommand() {
248676
248676
 
248677
248677
  // src/cli/commands/secrets/list.ts
248678
248678
  async function listSecretsAction({
248679
- log
248679
+ logger: logger2
248680
248680
  }) {
248681
248681
  const secrets = await runTask("Fetching secrets from Base44", async () => {
248682
248682
  return await listSecrets();
@@ -248689,7 +248689,7 @@ async function listSecretsAction({
248689
248689
  return { outroMessage: "No secrets configured." };
248690
248690
  }
248691
248691
  for (const name2 of names) {
248692
- log.info(name2);
248692
+ logger2.info(name2);
248693
248693
  }
248694
248694
  return {
248695
248695
  outroMessage: `Found ${names.length} secrets.`
@@ -248727,7 +248727,7 @@ function validateInput(entries, options) {
248727
248727
  throw new InvalidInputError("Provide KEY=VALUE pairs or --env-file, but not both.");
248728
248728
  }
248729
248729
  }
248730
- async function setSecretsAction({ log }, entries, options) {
248730
+ async function setSecretsAction({ logger: logger2 }, entries, options) {
248731
248731
  validateInput(entries, options);
248732
248732
  let secrets;
248733
248733
  if (options.envFile) {
@@ -248745,7 +248745,7 @@ async function setSecretsAction({ log }, entries, options) {
248745
248745
  successMessage: `${names.length} secrets set successfully`,
248746
248746
  errorMessage: "Failed to set secrets"
248747
248747
  });
248748
- log.info(`Set: ${names.join(", ")}`);
248748
+ logger2.info(`Set: ${names.join(", ")}`);
248749
248749
  return {
248750
248750
  outroMessage: "Secrets set successfully."
248751
248751
  };
@@ -251608,12 +251608,12 @@ async function createDevServer(options8) {
251608
251608
  const functionRoutes = createFunctionRouter(functionManager, devLogger);
251609
251609
  app.use("/api/apps/:appId/functions", functionRoutes);
251610
251610
  if (functionManager.getFunctionNames().length > 0) {
251611
- options8.log.info(`Loaded functions: ${functionManager.getFunctionNames().join(", ")}`);
251611
+ options8.logger.info(`Loaded functions: ${functionManager.getFunctionNames().join(", ")}`);
251612
251612
  }
251613
251613
  const db2 = new Database;
251614
251614
  db2.load(entities);
251615
251615
  if (db2.getCollectionNames().length > 0) {
251616
- options8.log.info(`Loaded entities: ${db2.getCollectionNames().join(", ")}`);
251616
+ options8.logger.info(`Loaded entities: ${db2.getCollectionNames().join(", ")}`);
251617
251617
  }
251618
251618
  let emitEntityEvent = () => {};
251619
251619
  const entityRoutes = createEntityRoutes(db2, devLogger, remoteProxy, (...args) => emitEntityEvent(...args));
@@ -251709,10 +251709,10 @@ async function createDevServer(options8) {
251709
251709
  }
251710
251710
 
251711
251711
  // src/cli/commands/dev.ts
251712
- async function devAction({ log }, options8) {
251712
+ async function devAction({ logger: logger2 }, options8) {
251713
251713
  const port = options8.port ? Number(options8.port) : undefined;
251714
251714
  const { port: resolvedPort } = await createDevServer({
251715
- log,
251715
+ logger: logger2,
251716
251716
  port,
251717
251717
  denoWrapperPath: getDenoWrapperPath(),
251718
251718
  loadResources: async () => {
@@ -251732,7 +251732,7 @@ function getDevCommand() {
251732
251732
  import { resolve as resolve8 } from "node:path";
251733
251733
  var import_kebabCase2 = __toESM(require_kebabCase(), 1);
251734
251734
  async function eject(ctx, options8) {
251735
- const { log, isNonInteractive } = ctx;
251735
+ const { logger: logger2, isNonInteractive } = ctx;
251736
251736
  if (isNonInteractive && !options8.projectId) {
251737
251737
  throw new InvalidInputError("--project-id is required in non-interactive mode");
251738
251738
  }
@@ -251754,7 +251754,7 @@ async function eject(ctx, options8) {
251754
251754
  });
251755
251755
  }
251756
251756
  selectedProject = foundProject;
251757
- log.info(`Selected project: ${theme.styles.bold(selectedProject.name)}`);
251757
+ logger2.info(`Selected project: ${theme.styles.bold(selectedProject.name)}`);
251758
251758
  } else {
251759
251759
  if (ejectableProjects.length === 0) {
251760
251760
  return { outroMessage: "No projects available to eject." };
@@ -256068,12 +256068,12 @@ async function runCLI(options8) {
256068
256068
  const errorReporter = new ErrorReporter;
256069
256069
  errorReporter.registerProcessErrorHandlers();
256070
256070
  const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
256071
- const log = isNonInteractive ? new SimpleLogger : new ClackLogger;
256071
+ const logger3 = isNonInteractive ? new SimpleLogger : new ClackLogger;
256072
256072
  const context = {
256073
256073
  errorReporter,
256074
256074
  isNonInteractive,
256075
256075
  distribution: options8?.distribution ?? "npm",
256076
- log
256076
+ logger: logger3
256077
256077
  };
256078
256078
  const program2 = createProgram(context);
256079
256079
  try {
@@ -256099,4 +256099,4 @@ export {
256099
256099
  CLIExitError
256100
256100
  };
256101
256101
 
256102
- //# debugId=C109B5AC280C561864756E2164756E21
256102
+ //# debugId=391F13E14962933D64756E2164756E21