Skip to content

connectors: base44 connectors push#194

Open
Paveltarno wants to merge 1 commit intopavelta-connectors-4from
pavelta-connectors-5
Open

connectors: base44 connectors push#194
Paveltarno wants to merge 1 commit intopavelta-connectors-4from
pavelta-connectors-5

Conversation

@Paveltarno
Copy link
Contributor

@Paveltarno Paveltarno commented Feb 4, 2026

Note

Description

This PR implements the complete connector management system for the CLI, adding the base44 connectors push command to sync OAuth integrations (like Google Calendar, Slack, Notion, etc.) from local configuration to the Base44 platform. It includes OAuth flow handling with browser redirect and polling, improved API client methods, comprehensive test coverage, and proper error handling for authorization failures and conflicts.

Related Issue

None

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • Added connectors CLI command group with push subcommand
  • Implemented OAuth flow handling with browser redirect, polling, and timeout (2 min)
  • Created comprehensive connector push logic that syncs local connectors and removes unlisted ones
  • Added smart user prompts for OAuth authorization with CI detection (skips interactive prompts in CI)
  • Updated API client to use PUT /external-auth/integrations/{type} (renamed from syncConnector to setConnector)
  • Added connector status schema updates (active/disconnected/expired lowercase enum values)
  • Implemented detailed result summary showing synced, added, removed, and failed connectors
  • Added connectors to project config loading (ProjectData.connectors field)
  • Created complete test suite with 8 test cases for various scenarios
  • Added API mock helpers for connector endpoints in testkit (mockConnectorsList, mockConnectorSet, etc.)
  • Removed filename validation requirement (connectors no longer need to match filename with type)
  • Removed unused test fixture connector-type-mismatch

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (npm test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated AGENTS.md if I made architectural changes

Additional Notes

The connector push flow works as follows:

  1. Reads local connector configs from connectors/ directory
  2. Calls API to set each connector's scopes (creates or updates)
  3. If OAuth is needed, API returns redirect URL and connection ID
  4. CLI prompts user to authorize in browser (skips in CI via process.env.CI)
  5. Polls for OAuth status completion with 2-minute timeout
  6. Removes any remote connectors not present locally
  7. Displays summary of synced, added, removed, and failed connectors

Error handling includes specific messages for different scenarios like "already connected by another user", network errors, and authorization timeouts.


🤖 Generated by Claude | 2026-02-04 21:47 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.28-pr.194.783854a

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.28-pr.194.783854a"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.28-pr.194.783854a"
  }
}

Preview published to npm registry — try new features instantly!

@Paveltarno Paveltarno changed the title connectors: final connectors: base44 connectors push Feb 4, 2026
@kfirstri kfirstri moved this from Backlog to In progress in CLI Development Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

1 participant