@base44-preview/cli 0.0.32-pr.250.8053fb1 → 0.0.32-pr.251.57184e2

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
@@ -17468,7 +17468,7 @@ var require_lodash2 = __commonJS((exports, module) => {
17468
17468
  function nth(array2, n2) {
17469
17469
  return array2 && array2.length ? baseNth(array2, toInteger(n2)) : undefined2;
17470
17470
  }
17471
- var pull = baseRest(pullAll);
17471
+ var pull2 = baseRest(pullAll);
17472
17472
  function pullAll(array2, values2) {
17473
17473
  return array2 && array2.length && values2 && values2.length ? basePullAll(array2, values2) : array2;
17474
17474
  }
@@ -19233,7 +19233,7 @@ __p += '`;
19233
19233
  lodash.pickBy = pickBy;
19234
19234
  lodash.property = property;
19235
19235
  lodash.propertyOf = propertyOf;
19236
- lodash.pull = pull;
19236
+ lodash.pull = pull2;
19237
19237
  lodash.pullAll = pullAll;
19238
19238
  lodash.pullAllBy = pullAllBy;
19239
19239
  lodash.pullAllWith = pullAllWith;
@@ -185051,6 +185051,14 @@ var TikTokConnectorSchema = exports_external.object({
185051
185051
  type: exports_external.literal("tiktok"),
185052
185052
  scopes: exports_external.array(exports_external.string()).default([])
185053
185053
  });
185054
+ var GoogleBigQueryConnectorSchema = exports_external.object({
185055
+ type: exports_external.literal("googlebigquery"),
185056
+ scopes: exports_external.array(exports_external.string()).default([])
185057
+ });
185058
+ var StripeConnectorSchema = exports_external.object({
185059
+ type: exports_external.literal("stripe"),
185060
+ scopes: exports_external.array(exports_external.string()).default([])
185061
+ });
185054
185062
  var CustomTypeSchema = exports_external.string().min(1).regex(/^[a-z0-9_-]+$/i);
185055
185063
  var GenericConnectorSchema = exports_external.object({
185056
185064
  type: CustomTypeSchema,
@@ -185063,12 +185071,14 @@ var ConnectorResourceSchema = exports_external.union([
185063
185071
  GoogleSheetsConnectorSchema,
185064
185072
  GoogleDocsConnectorSchema,
185065
185073
  GoogleSlidesConnectorSchema,
185074
+ GoogleBigQueryConnectorSchema,
185066
185075
  SlackConnectorSchema,
185067
185076
  NotionConnectorSchema,
185068
185077
  SalesforceConnectorSchema,
185069
185078
  HubspotConnectorSchema,
185070
185079
  LinkedInConnectorSchema,
185071
185080
  TikTokConnectorSchema,
185081
+ StripeConnectorSchema,
185072
185082
  GenericConnectorSchema
185073
185083
  ]);
185074
185084
  var KnownIntegrationTypes = [
@@ -185078,12 +185088,14 @@ var KnownIntegrationTypes = [
185078
185088
  "googlesheets",
185079
185089
  "googledocs",
185080
185090
  "googleslides",
185091
+ "googlebigquery",
185081
185092
  "slack",
185082
185093
  "notion",
185083
185094
  "salesforce",
185084
185095
  "hubspot",
185085
185096
  "linkedin",
185086
- "tiktok"
185097
+ "tiktok",
185098
+ "stripe"
185087
185099
  ];
185088
185100
  var IntegrationTypeSchema = exports_external.union([
185089
185101
  exports_external.enum(KnownIntegrationTypes),
@@ -185136,6 +185148,18 @@ var RemoveConnectorResponseSchema = exports_external.object({
185136
185148
  status: data.status,
185137
185149
  integrationType: data.integration_type
185138
185150
  }));
185151
+ var STRIPE_CONNECTOR_TYPE = "stripe";
185152
+ var InstallStripeResponseSchema = exports_external.object({
185153
+ already_installed: exports_external.boolean(),
185154
+ claim_url: exports_external.string().nullable()
185155
+ });
185156
+ var StripeStatusResponseSchema = exports_external.object({
185157
+ stripe_mode: exports_external.enum(["sandbox", "live"]).nullable(),
185158
+ sandbox_claim_url: exports_external.string().nullable().optional()
185159
+ });
185160
+ var RemoveStripeResponseSchema = exports_external.object({
185161
+ success: exports_external.boolean()
185162
+ });
185139
185163
 
185140
185164
  // src/core/resources/connector/api.ts
185141
185165
  async function listConnectors() {
@@ -185203,6 +185227,54 @@ async function removeConnector(integrationType) {
185203
185227
  }
185204
185228
  return result.data;
185205
185229
  }
185230
+ async function installStripe() {
185231
+ const appClient = getAppClient();
185232
+ let response;
185233
+ try {
185234
+ response = await appClient.post("payments/stripe/install", {
185235
+ timeout: 60000
185236
+ });
185237
+ } catch (error48) {
185238
+ throw await ApiError.fromHttpError(error48, "installing Stripe");
185239
+ }
185240
+ const result = InstallStripeResponseSchema.safeParse(await response.json());
185241
+ if (!result.success) {
185242
+ throw new SchemaValidationError("Invalid response from server", result.error);
185243
+ }
185244
+ return result.data;
185245
+ }
185246
+ async function getStripeStatus() {
185247
+ const appClient = getAppClient();
185248
+ let response;
185249
+ try {
185250
+ response = await appClient.get("payments/stripe/status", {
185251
+ timeout: 60000
185252
+ });
185253
+ } catch (error48) {
185254
+ throw await ApiError.fromHttpError(error48, "checking Stripe integration status");
185255
+ }
185256
+ const result = StripeStatusResponseSchema.safeParse(await response.json());
185257
+ if (!result.success) {
185258
+ throw new SchemaValidationError("Invalid response from server", result.error);
185259
+ }
185260
+ return result.data;
185261
+ }
185262
+ async function removeStripe() {
185263
+ const appClient = getAppClient();
185264
+ let response;
185265
+ try {
185266
+ response = await appClient.delete("payments/stripe", {
185267
+ timeout: 60000
185268
+ });
185269
+ } catch (error48) {
185270
+ throw await ApiError.fromHttpError(error48, "removing Stripe integration");
185271
+ }
185272
+ const result = RemoveStripeResponseSchema.safeParse(await response.json());
185273
+ if (!result.success) {
185274
+ throw new SchemaValidationError("Invalid response from server", result.error);
185275
+ }
185276
+ return result.data;
185277
+ }
185206
185278
  // src/core/resources/connector/config.ts
185207
185279
  import { join as join4 } from "node:path";
185208
185280
  import { isDeepStrictEqual } from "node:util";
@@ -185251,7 +185323,7 @@ async function readAllConnectors(connectorsDir) {
185251
185323
  async function writeConnectors(connectorsDir, remoteConnectors) {
185252
185324
  const entries = await readConnectorFiles(connectorsDir);
185253
185325
  const typeToEntry = buildTypeToEntryMap(entries);
185254
- const newTypes = new Set(remoteConnectors.map((c) => c.integrationType));
185326
+ const newTypes = new Set(remoteConnectors.map((c) => c.type));
185255
185327
  const deleted = [];
185256
185328
  for (const [type, entry] of typeToEntry) {
185257
185329
  if (!newTypes.has(type)) {
@@ -185261,22 +185333,44 @@ async function writeConnectors(connectorsDir, remoteConnectors) {
185261
185333
  }
185262
185334
  const written = [];
185263
185335
  for (const connector of remoteConnectors) {
185264
- const existing = typeToEntry.get(connector.integrationType);
185265
- const localConnector = {
185266
- type: connector.integrationType,
185267
- scopes: connector.scopes
185268
- };
185269
- if (existing && isDeepStrictEqual(existing.data, localConnector)) {
185336
+ const existing = typeToEntry.get(connector.type);
185337
+ if (existing && isDeepStrictEqual(existing.data, connector)) {
185270
185338
  continue;
185271
185339
  }
185272
- const filePath = existing?.filePath ?? join4(connectorsDir, `${connector.integrationType}.${CONFIG_FILE_EXTENSION}`);
185273
- await writeJsonFile(filePath, localConnector);
185274
- written.push(connector.integrationType);
185340
+ const filePath = existing?.filePath ?? join4(connectorsDir, `${connector.type}.${CONFIG_FILE_EXTENSION}`);
185341
+ await writeJsonFile(filePath, connector);
185342
+ written.push(connector.type);
185275
185343
  }
185276
185344
  return { written, deleted };
185277
185345
  }
185346
+ // src/core/resources/connector/pull.ts
185347
+ async function pullAllConnectors() {
185348
+ const [oauthResponse, stripeStatus] = await Promise.all([
185349
+ listConnectors(),
185350
+ getStripeStatus()
185351
+ ]);
185352
+ const connectors = oauthResponse.integrations.map((i) => ({
185353
+ type: i.integrationType,
185354
+ scopes: i.scopes
185355
+ }));
185356
+ if (stripeStatus.stripe_mode !== null) {
185357
+ connectors.push({ type: STRIPE_CONNECTOR_TYPE, scopes: [] });
185358
+ }
185359
+ return connectors;
185360
+ }
185278
185361
  // src/core/resources/connector/push.ts
185279
185362
  async function pushConnectors(connectors) {
185363
+ const stripeConnector = connectors.find((c) => c.type === STRIPE_CONNECTOR_TYPE);
185364
+ const oauthConnectors = connectors.filter((c) => c.type !== STRIPE_CONNECTOR_TYPE);
185365
+ const oauthResults = await syncOAuthConnectors(oauthConnectors);
185366
+ const stripeResult = await syncStripeConnector(stripeConnector);
185367
+ const results = [...oauthResults];
185368
+ if (stripeResult) {
185369
+ results.push(stripeResult);
185370
+ }
185371
+ return { results };
185372
+ }
185373
+ async function syncOAuthConnectors(connectors) {
185280
185374
  const results = [];
185281
185375
  const upstream = await listConnectors();
185282
185376
  const localTypes = new Set(connectors.map((c) => c.type));
@@ -185309,7 +185403,62 @@ async function pushConnectors(connectors) {
185309
185403
  }
185310
185404
  }
185311
185405
  }
185312
- return { results };
185406
+ return results;
185407
+ }
185408
+ async function syncStripeConnector(localStripe) {
185409
+ const remoteStatus = await fetchStripeRemoteStatus();
185410
+ if (remoteStatus === "error") {
185411
+ return localStripe ? stripeError("Failed to check Stripe integration status") : null;
185412
+ }
185413
+ const isRemoteInstalled = remoteStatus.stripe_mode !== null;
185414
+ const needsInstall = localStripe && !isRemoteInstalled;
185415
+ const alreadySynced = localStripe && isRemoteInstalled;
185416
+ const needsRemoval = !localStripe && isRemoteInstalled;
185417
+ if (needsInstall) {
185418
+ return handleStripeInstall();
185419
+ }
185420
+ if (alreadySynced) {
185421
+ return stripeSynced();
185422
+ }
185423
+ if (needsRemoval) {
185424
+ return handleStripeRemoval();
185425
+ }
185426
+ return null;
185427
+ }
185428
+ async function fetchStripeRemoteStatus() {
185429
+ try {
185430
+ return await getStripeStatus();
185431
+ } catch {
185432
+ return "error";
185433
+ }
185434
+ }
185435
+ async function handleStripeInstall() {
185436
+ try {
185437
+ const result = await installStripe();
185438
+ return stripeProvisioned(result.claim_url ?? undefined);
185439
+ } catch (err) {
185440
+ return stripeError(err instanceof Error ? err.message : String(err));
185441
+ }
185442
+ }
185443
+ async function handleStripeRemoval() {
185444
+ try {
185445
+ await removeStripe();
185446
+ return stripeRemoved();
185447
+ } catch (err) {
185448
+ return stripeError(err instanceof Error ? err.message : String(err));
185449
+ }
185450
+ }
185451
+ function stripeSynced() {
185452
+ return { type: STRIPE_CONNECTOR_TYPE, action: "synced" };
185453
+ }
185454
+ function stripeProvisioned(claimUrl) {
185455
+ return { type: STRIPE_CONNECTOR_TYPE, action: "provisioned", claimUrl };
185456
+ }
185457
+ function stripeRemoved() {
185458
+ return { type: STRIPE_CONNECTOR_TYPE, action: "removed" };
185459
+ }
185460
+ function stripeError(error48) {
185461
+ return { type: STRIPE_CONNECTOR_TYPE, action: "error", error: error48 };
185313
185462
  }
185314
185463
  function getConnectorSyncResult(type, response) {
185315
185464
  if (response.error === "different_user") {
@@ -185327,7 +185476,7 @@ function getConnectorSyncResult(type, response) {
185327
185476
  type,
185328
185477
  action: "needs_oauth",
185329
185478
  redirectUrl: response.redirectUrl,
185330
- connectionId: response.connectionId ?? undefined
185479
+ connectionId: response.connectionId ?? ""
185331
185480
  };
185332
185481
  }
185333
185482
  return { type, action: "synced" };
@@ -185340,7 +185489,10 @@ var connectorResource = {
185340
185489
  // src/core/resources/entity/schema.ts
185341
185490
  var FieldConditionSchema = exports_external.union([
185342
185491
  exports_external.string(),
185343
- exports_external.object({
185492
+ exports_external.number(),
185493
+ exports_external.boolean(),
185494
+ exports_external.null(),
185495
+ exports_external.looseObject({
185344
185496
  $in: exports_external.unknown().optional(),
185345
185497
  $nin: exports_external.unknown().optional(),
185346
185498
  $ne: exports_external.unknown().optional(),
@@ -185357,6 +185509,15 @@ var rlsConditionAllowedKeys = new Set([
185357
185509
  "user_condition",
185358
185510
  "created_by",
185359
185511
  "created_by_id",
185512
+ "id",
185513
+ "_id",
185514
+ "created_date",
185515
+ "updated_date",
185516
+ "app_id",
185517
+ "entity_name",
185518
+ "is_deleted",
185519
+ "deleted_date",
185520
+ "environment",
185360
185521
  "$or",
185361
185522
  "$and",
185362
185523
  "$nor"
@@ -185385,60 +185546,33 @@ var isValidFieldCondition = (value) => {
185385
185546
  }
185386
185547
  return false;
185387
185548
  };
185388
- var RefineRLSConditionSchema = RLSConditionSchema.refine((val) => Object.entries(val).every(([key, value]) => {
185389
- if (rlsConditionAllowedKeys.has(key)) {
185390
- return true;
185391
- }
185392
- if (!key.startsWith("data.")) {
185393
- return false;
185394
- }
185395
- return isValidFieldCondition(value);
185396
- }), "Keys must be known RLS keys or match data.* pattern with valid value");
185549
+ var RefineRLSConditionSchema = RLSConditionSchema.refine((val) => Object.entries(val).every(([key, value]) => rlsConditionAllowedKeys.has(key) || isValidFieldCondition(value)), "Field condition values must be a primitive or an operator object ($in, $nin, $ne, $all)");
185397
185550
  var RLSRuleSchema = exports_external.union([exports_external.boolean(), RefineRLSConditionSchema]);
185398
- var EntityRLSSchema = exports_external.strictObject({
185551
+ var EntityRLSSchema = exports_external.looseObject({
185399
185552
  create: RLSRuleSchema.optional(),
185400
185553
  read: RLSRuleSchema.optional(),
185401
185554
  update: RLSRuleSchema.optional(),
185402
185555
  delete: RLSRuleSchema.optional(),
185403
185556
  write: RLSRuleSchema.optional()
185404
185557
  });
185405
- var FieldRLSSchema = exports_external.strictObject({
185558
+ var FieldRLSSchema = exports_external.looseObject({
185406
185559
  read: RLSRuleSchema.optional(),
185407
185560
  write: RLSRuleSchema.optional(),
185408
185561
  create: RLSRuleSchema.optional(),
185409
185562
  update: RLSRuleSchema.optional(),
185410
185563
  delete: RLSRuleSchema.optional()
185411
185564
  });
185412
- var PropertyTypeSchema = exports_external.enum([
185413
- "string",
185414
- "number",
185415
- "integer",
185416
- "boolean",
185417
- "array",
185418
- "object"
185419
- ]);
185420
- var StringFormatSchema = exports_external.enum([
185421
- "date",
185422
- "date-time",
185423
- "time",
185424
- "email",
185425
- "uri",
185426
- "hostname",
185427
- "ipv4",
185428
- "ipv6",
185429
- "uuid"
185430
- ]);
185431
- var PropertyDefinitionSchema = exports_external.object({
185432
- type: PropertyTypeSchema,
185565
+ var PropertyDefinitionSchema = exports_external.looseObject({
185566
+ type: exports_external.string().optional(),
185433
185567
  title: exports_external.string().optional(),
185434
185568
  description: exports_external.string().optional(),
185435
185569
  minLength: exports_external.number().int().min(0).optional(),
185436
185570
  maxLength: exports_external.number().int().min(0).optional(),
185437
185571
  pattern: exports_external.string().optional(),
185438
- format: StringFormatSchema.optional(),
185572
+ format: exports_external.string().optional(),
185439
185573
  minimum: exports_external.number().optional(),
185440
185574
  maximum: exports_external.number().optional(),
185441
- enum: exports_external.array(exports_external.string()).optional(),
185575
+ enum: exports_external.array(exports_external.unknown()).optional(),
185442
185576
  enumNames: exports_external.array(exports_external.string()).optional(),
185443
185577
  default: exports_external.unknown().optional(),
185444
185578
  $ref: exports_external.string().optional(),
@@ -185451,12 +185585,12 @@ var PropertyDefinitionSchema = exports_external.object({
185451
185585
  return exports_external.record(exports_external.string(), PropertyDefinitionSchema).optional();
185452
185586
  }
185453
185587
  });
185454
- var EntitySchema = exports_external.object({
185455
- type: exports_external.literal("object"),
185456
- name: exports_external.string().regex(/^[a-zA-Z0-9]+$/, "Entity name must be alphanumeric only"),
185588
+ var EntitySchema = exports_external.looseObject({
185589
+ type: exports_external.literal("object").default("object"),
185590
+ name: exports_external.string().min(1).regex(/^[a-zA-Z0-9]+$/, "Entity name must be alphanumeric only"),
185457
185591
  title: exports_external.string().optional(),
185458
185592
  description: exports_external.string().optional(),
185459
- properties: exports_external.record(exports_external.string(), PropertyDefinitionSchema),
185593
+ properties: exports_external.record(exports_external.string(), PropertyDefinitionSchema).default({}),
185460
185594
  required: exports_external.array(exports_external.string()).optional(),
185461
185595
  rls: EntityRLSSchema.optional()
185462
185596
  });
@@ -193636,6 +193770,10 @@ function getDashboardUrl(projectId) {
193636
193770
  const id = projectId ?? getAppConfig().id;
193637
193771
  return `${getBase44ApiUrl()}/apps/${id}/editor/workspace/overview`;
193638
193772
  }
193773
+ function getConnectorsUrl(projectId) {
193774
+ const id = projectId ?? getAppConfig().id;
193775
+ return `${getBase44ApiUrl()}/apps/${id}/editor/workspace/app-connections`;
193776
+ }
193639
193777
  // src/cli/commands/agents/pull.ts
193640
193778
  async function pullAgentsAction() {
193641
193779
  const { project: project2 } = await readProjectConfig();
@@ -193740,13 +193878,13 @@ async function pullConnectorsAction() {
193740
193878
  const configDir = dirname8(project2.configPath);
193741
193879
  const connectorsDir = join10(configDir, project2.connectorsDir);
193742
193880
  const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
193743
- return await listConnectors();
193881
+ return await pullAllConnectors();
193744
193882
  }, {
193745
193883
  successMessage: "Connectors fetched successfully",
193746
193884
  errorMessage: "Failed to fetch connectors"
193747
193885
  });
193748
193886
  const { written, deleted } = await runTask("Syncing connector files", async () => {
193749
- return await writeConnectors(connectorsDir, remoteConnectors.integrations);
193887
+ return await writeConnectors(connectorsDir, remoteConnectors);
193750
193888
  }, {
193751
193889
  successMessage: "Connector files synced successfully",
193752
193890
  errorMessage: "Failed to sync connector files"
@@ -193761,7 +193899,7 @@ async function pullConnectorsAction() {
193761
193899
  M2.info("All connectors are already up to date");
193762
193900
  }
193763
193901
  return {
193764
- outroMessage: `Pulled ${remoteConnectors.integrations.length} connectors to ${connectorsDir}`
193902
+ outroMessage: `Pulled ${remoteConnectors.length} connectors to ${connectorsDir}`
193765
193903
  };
193766
193904
  }
193767
193905
  function getConnectorsPullCommand(context) {
@@ -194380,7 +194518,7 @@ var open_default = open;
194380
194518
  var POLL_INTERVAL_MS = 2000;
194381
194519
  var POLL_TIMEOUT_MS = 2 * 60 * 1000;
194382
194520
  function filterPendingOAuth(results) {
194383
- return results.filter((r2) => r2.action === "needs_oauth" && !!r2.redirectUrl && !!r2.connectionId);
194521
+ return results.filter((r2) => r2.action === "needs_oauth" && !!r2.connectionId);
194384
194522
  }
194385
194523
  async function runOAuthFlowWithSkip(connector2) {
194386
194524
  await open_default(connector2.redirectUrl);
@@ -194462,32 +194600,49 @@ Opening browser for ${connector2.type}...`);
194462
194600
  function printSummary(results, oauthOutcomes) {
194463
194601
  const synced = [];
194464
194602
  const added = [];
194603
+ let provisioned;
194465
194604
  const removed = [];
194466
194605
  const skipped = [];
194467
194606
  const failed = [];
194468
194607
  for (const r2 of results) {
194469
- const oauthStatus = oauthOutcomes.get(r2.type);
194470
- if (r2.action === "synced") {
194471
- synced.push(r2.type);
194472
- } else if (r2.action === "removed") {
194473
- removed.push(r2.type);
194474
- } else if (r2.action === "error") {
194475
- failed.push({ type: r2.type, error: r2.error });
194476
- } else if (r2.action === "needs_oauth") {
194477
- if (oauthStatus === "ACTIVE") {
194478
- added.push(r2.type);
194479
- } else if (oauthStatus === "SKIPPED") {
194480
- skipped.push(r2.type);
194481
- } else if (oauthStatus === "PENDING") {
194482
- failed.push({ type: r2.type, error: "authorization timed out" });
194483
- } else if (oauthStatus === "FAILED") {
194484
- failed.push({ type: r2.type, error: "authorization failed" });
194485
- } else {
194486
- failed.push({ type: r2.type, error: "needs authorization" });
194608
+ switch (r2.action) {
194609
+ case "provisioned":
194610
+ provisioned = r2;
194611
+ break;
194612
+ case "synced":
194613
+ synced.push(r2.type);
194614
+ break;
194615
+ case "removed":
194616
+ removed.push(r2.type);
194617
+ break;
194618
+ case "error":
194619
+ failed.push({ type: r2.type, error: r2.error });
194620
+ break;
194621
+ case "needs_oauth": {
194622
+ const oauthStatus = oauthOutcomes.get(r2.type);
194623
+ if (oauthStatus === "ACTIVE") {
194624
+ added.push(r2.type);
194625
+ } else if (oauthStatus === "SKIPPED") {
194626
+ skipped.push(r2.type);
194627
+ } else if (oauthStatus === "PENDING") {
194628
+ failed.push({ type: r2.type, error: "authorization timed out" });
194629
+ } else if (oauthStatus === "FAILED") {
194630
+ failed.push({ type: r2.type, error: "authorization failed" });
194631
+ } else {
194632
+ failed.push({ type: r2.type, error: "needs authorization" });
194633
+ }
194634
+ break;
194487
194635
  }
194488
194636
  }
194489
194637
  }
194490
194638
  M2.info(theme.styles.bold("Summary:"));
194639
+ if (provisioned) {
194640
+ M2.success("Provisioned: Stripe");
194641
+ if (provisioned.claimUrl) {
194642
+ M2.info(` Claim your Stripe account: ${theme.colors.links(provisioned.claimUrl)}`);
194643
+ }
194644
+ M2.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
194645
+ }
194491
194646
  if (synced.length > 0) {
194492
194647
  M2.success(`Synced: ${synced.join(", ")}`);
194493
194648
  }
@@ -194501,7 +194656,7 @@ function printSummary(results, oauthOutcomes) {
194501
194656
  M2.warn(`Skipped: ${skipped.join(", ")}`);
194502
194657
  }
194503
194658
  for (const r2 of failed) {
194504
- M2.error(`Failed: ${r2.type}${r2.error ? ` - ${r2.error}` : ""}`);
194659
+ M2.error(`Failed: ${r2.type} - ${r2.error}`);
194505
194660
  }
194506
194661
  }
194507
194662
  async function pushConnectorsAction() {
@@ -194535,7 +194690,7 @@ function getConnectorsPushCommand(context) {
194535
194690
 
194536
194691
  // src/cli/commands/connectors/index.ts
194537
194692
  function getConnectorsCommand(context) {
194538
- return new Command("connectors").description("Manage project connectors (OAuth integrations)").addCommand(getConnectorsPullCommand(context)).addCommand(getConnectorsPushCommand(context));
194693
+ return new Command("connectors").description("Manage project connectors").addCommand(getConnectorsPullCommand(context)).addCommand(getConnectorsPushCommand(context));
194539
194694
  }
194540
194695
 
194541
194696
  // src/cli/commands/dashboard/open.ts
@@ -194851,15 +195006,11 @@ ${summaryLines.join(`
194851
195006
  successMessage: theme.colors.base44Orange("Deployment completed"),
194852
195007
  errorMessage: "Deployment failed"
194853
195008
  });
194854
- const needsOAuth = filterPendingOAuth(result.connectorResults ?? []);
194855
- if (needsOAuth.length > 0) {
194856
- const oauthOutcomes = await promptOAuthFlows(needsOAuth, {
194857
- skipPrompt: options.yes || !!process.env.CI
194858
- });
194859
- const allAuthorized = oauthOutcomes.size > 0 && [...oauthOutcomes.values()].every((s) => s === "ACTIVE");
194860
- if (!allAuthorized) {
194861
- M2.info("Some connectors still require authorization. Run 'base44 connectors push' or open the links above in your browser.");
194862
- }
195009
+ const connectorResults = result.connectorResults ?? [];
195010
+ await handleOAuthConnectors(connectorResults, options);
195011
+ const stripeResult = connectorResults.find((r2) => r2.action === "provisioned");
195012
+ if (stripeResult) {
195013
+ printStripeResult(stripeResult);
194863
195014
  }
194864
195015
  M2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
194865
195016
  if (result.appUrl) {
@@ -194872,6 +195023,25 @@ function getDeployCommand(context) {
194872
195023
  await runCommand(() => deployAction(options), { requireAuth: true }, context);
194873
195024
  });
194874
195025
  }
195026
+ async function handleOAuthConnectors(connectorResults, options) {
195027
+ const needsOAuth = filterPendingOAuth(connectorResults);
195028
+ if (needsOAuth.length === 0)
195029
+ return;
195030
+ const oauthOutcomes = await promptOAuthFlows(needsOAuth, {
195031
+ skipPrompt: options.yes || !!process.env.CI
195032
+ });
195033
+ const allAuthorized = oauthOutcomes.size > 0 && [...oauthOutcomes.values()].every((s) => s === "ACTIVE");
195034
+ if (!allAuthorized) {
195035
+ M2.info("Some connectors still require authorization. Run 'base44 connectors push' or open the links above in your browser.");
195036
+ }
195037
+ }
195038
+ function printStripeResult(r2) {
195039
+ M2.success(`Provisioned: Stripe`);
195040
+ if (r2.claimUrl) {
195041
+ M2.info(` Claim your Stripe account: ${theme.colors.links(r2.claimUrl)}`);
195042
+ }
195043
+ M2.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
195044
+ }
194875
195045
 
194876
195046
  // src/cli/commands/project/link.ts
194877
195047
  function validateNonInteractiveFlags2(command) {
@@ -199760,4 +199930,4 @@ export {
199760
199930
  CLIExitError
199761
199931
  };
199762
199932
 
199763
- //# debugId=06A844C7F693D30164756E2164756E21
199933
+ //# debugId=E50C8137C00E44E864756E2164756E21