@base44-preview/cli 0.2.7-pr.687.d213a6e → 0.2.7-pr.687.f53a85d

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
@@ -238253,24 +238253,19 @@ async function pullAllConnectors() {
238253
238253
  return connectors;
238254
238254
  }
238255
238255
  // src/core/resources/connector/push.ts
238256
- async function pushConnectors(connectors) {
238257
- if (connectors.length === 0) {
238258
- return { results: [] };
238259
- }
238256
+ async function pushConnectors(connectors, { prune = true } = {}) {
238260
238257
  const stripeConnector = connectors.find((c) => c.type === STRIPE_CONNECTOR_TYPE);
238261
238258
  const oauthConnectors = connectors.filter((c) => c.type !== STRIPE_CONNECTOR_TYPE);
238262
- const oauthResults = await syncOAuthConnectors(oauthConnectors);
238263
- const stripeResult = await syncStripeConnector(stripeConnector);
238259
+ const oauthResults = await syncOAuthConnectors(oauthConnectors, prune);
238260
+ const stripeResult = stripeConnector || prune ? await syncStripeConnector(stripeConnector) : null;
238264
238261
  const results = [...oauthResults];
238265
238262
  if (stripeResult) {
238266
238263
  results.push(stripeResult);
238267
238264
  }
238268
238265
  return { results };
238269
238266
  }
238270
- async function syncOAuthConnectors(connectors) {
238267
+ async function syncOAuthConnectors(connectors, prune) {
238271
238268
  const results = [];
238272
- const upstream = await listConnectors();
238273
- const localTypes = new Set(connectors.map((c) => c.type));
238274
238269
  for (const connector of connectors) {
238275
238270
  try {
238276
238271
  const response = await setConnector(connector.type, connector.scopes ?? []);
@@ -238283,6 +238278,11 @@ async function syncOAuthConnectors(connectors) {
238283
238278
  });
238284
238279
  }
238285
238280
  }
238281
+ if (!prune) {
238282
+ return results;
238283
+ }
238284
+ const upstream = await listConnectors();
238285
+ const localTypes = new Set(connectors.map((c) => c.type));
238286
238286
  for (const upstreamConnector of upstream.integrations) {
238287
238287
  if (!localTypes.has(upstreamConnector.integrationType)) {
238288
238288
  try {
@@ -246982,7 +246982,9 @@ async function deployAll(projectData, options) {
246982
246982
  await agentSkillResource.push(agentSkills);
246983
246983
  await agentResource.push(agents);
246984
246984
  await authConfigResource.push(authConfig);
246985
- const { results: connectorResults } = await pushConnectors(connectors);
246985
+ const { results: connectorResults } = await pushConnectors(connectors, {
246986
+ prune: false
246987
+ });
246986
246988
  const appUrl = await deployProjectSite(project, options);
246987
246989
  return appUrl ? { appUrl, connectorResults } : { connectorResults };
246988
246990
  }
@@ -251362,7 +251364,7 @@ async function pushConnectorsAction({ isNonInteractive, log, runTask, jsonMode }
251362
251364
  const connectors = await readConnectorsToPush(options);
251363
251365
  if (!jsonMode) {
251364
251366
  if (connectors.length === 0) {
251365
- log.info("No local connectors found - nothing to push");
251367
+ log.info("No local connectors found - checking for remote connectors to remove");
251366
251368
  } else {
251367
251369
  const connectorNames = connectors.map((c) => c.type).join(", ");
251368
251370
  log.info(`Found ${connectors.length} connectors to push: ${connectorNames}`);
@@ -252116,6 +252118,10 @@ ${summaryLines.join(`
252116
252118
  if (stripeResult?.action === "provisioned") {
252117
252119
  printStripeResult(stripeResult, log);
252118
252120
  }
252121
+ for (const r of connectorResults) {
252122
+ if (r.action === "error")
252123
+ log.error(`Failed: ${r.type} - ${r.error}`);
252124
+ }
252119
252125
  log.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
252120
252126
  if (result.appUrl) {
252121
252127
  log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
@@ -274983,4 +274989,4 @@ export {
274983
274989
  runCLI
274984
274990
  };
274985
274991
 
274986
- //# debugId=286ECC3B93B7320F64756E2164756E21
274992
+ //# debugId=4C75853E117A86FD64756E2164756E21