Skip to content

feat(connectors): add connectors to deploy command#211

Merged
Paveltarno merged 12 commits intomainfrom
task-2-publish-connectors
Feb 15, 2026
Merged

feat(connectors): add connectors to deploy command#211
Paveltarno merged 12 commits intomainfrom
task-2-publish-connectors

Conversation

@Paveltarno
Copy link
Collaborator

@Paveltarno Paveltarno commented Feb 9, 2026

Note

Description

This PR adds connector deployment support to the unified base44 deploy command and refactors the OAuth flow prompting logic into a reusable module. Connectors are now automatically pushed during deployment alongside entities, functions, agents, and sites, with improved handling for connectors that require browser-based OAuth authorization.

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

  • Created oauth-prompt.ts module to extract and reuse OAuth flow logic from connectors push command
  • Added promptOAuthFlows() and filterPendingOAuth() helper functions for OAuth authorization prompts
  • Updated push.ts to use the new reusable OAuth prompt logic
  • Modified deploy.ts command to include connectors in the deployment workflow
  • Updated deployAll() in core/project/deploy.ts to push connectors and return connector results
  • Added connector count to the deployment summary display
  • Enhanced OAuth handling in deploy command with reminder messages when authorization is needed
  • Added test coverage for connector deployment scenarios (successful deploy, OAuth required)
  • Updated hasResourcesToDeploy() to check for connectors

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 refactoring improves code reuse by extracting the OAuth prompt logic that was previously duplicated. The deploy command now provides a more complete deployment experience by handling all resource types including connectors. CI environments automatically skip OAuth prompts with helpful messages.


🤖 Generated by Claude | 2026-02-15 00:00 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.31-pr.211.1c10469

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.31-pr.211.1c10469"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.31-pr.211.1c10469"
  }
}

Preview published to npm registry — try new features instantly!

@Paveltarno Paveltarno changed the base branch from main to pavelta-connectors-1 February 9, 2026 12:14
@dor-chaouat dor-chaouat moved this from Backlog to In progress in CLI Development Feb 9, 2026
@Paveltarno Paveltarno force-pushed the task-2-publish-connectors branch from 68ece4e to 11d6ca5 Compare February 10, 2026 15:28
@claude
Copy link

claude bot commented Feb 11, 2026

Code review

Found 1 issue that needs attention:

Unused variable in OAuth handling (src/cli/commands/project/deploy.ts:98)
The variable pending is assigned but never used in the log message on lines 99-101. Users won't be informed which connectors need authorization.

Compare with the analogous code in src/cli/commands/connectors/push.ts lines 91-96 where pending is correctly interpolated into the message to show users which connectors are pending (e.g., "Pending: google_calendar, slack").

Suggested fix:
Change line 99-101 from:

log.info(
  `To authorize, run 'base44 connectors push' or open the links above in your browser.`
);

To:

log.info(
  `Pending: ${pending}. To authorize, run 'base44 connectors push' or open the links above in your browser.`
);

This will provide users with actionable information about which specific connectors require their attention.


Checked for bugs and CLAUDE.md compliance. All other changes follow the established patterns correctly.

@Paveltarno
Copy link
Collaborator Author

Re: comment

Fixed in f4d2ac1 - Added mockConnectorSet() to the deploy connector test.

@Paveltarno Paveltarno force-pushed the pavelta-connectors-1 branch 2 times, most recently from 3fc2e0c to ec69f63 Compare February 12, 2026 12:04
Base automatically changed from pavelta-connectors-1 to main February 12, 2026 13:27
@Paveltarno Paveltarno force-pushed the task-2-publish-connectors branch from 5b09e45 to 0ca9c91 Compare February 12, 2026 14:08
@claude
Copy link

claude bot commented Feb 12, 2026

README check ran. 10 discrepancies found between code and documentation. Manual review required: command descriptions need updating for create, deploy, link, logout, whoami, agents pull, agents push, and entities push. Additionally, eject and connectors push commands need to be added to the table.

const oauthResult = await runTask(
`Waiting for ${connector.type} authorization...`,
async () => {
return await runOAuthFlow({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the pWaitFor should be in cli not in core

Copy link
Collaborator

@kfirstri kfirstri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return the pwaitFor back to cli/

@github-project-automation github-project-automation bot moved this from In progress to Ready in CLI Development Feb 12, 2026
@kfirstri kfirstri moved this from Ready to In progress in CLI Development Feb 12, 2026
@claude
Copy link

claude bot commented Feb 12, 2026

README check ran. 6 issue(s) found and applied: (1) Added missing eject command, (2) Added missing connectors push command, (3) Updated create description, (4) Updated deploy description, (5) Updated link description, (6) Updated logout, whoami, agents pull, and agents push descriptions to match codebase. README.md has been updated in this branch.

@base44 base44 deleted a comment from claude bot Feb 12, 2026
@Paveltarno Paveltarno requested a review from kfirstri February 12, 2026 16:12
@Paveltarno Paveltarno force-pushed the task-2-publish-connectors branch from b64af37 to d0a32e7 Compare February 15, 2026 09:17
@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. 7 issues found and applied: (1) Added missing 'eject' command to command table, (2) Added missing 'connectors push' command to command table, (3) Updated 'create' description to match code, (4) Updated 'deploy' description to match code, (5) Updated 'link' description to match code, (6) Updated 'logout' description to match code, (7) Updated command descriptions for 'agents pull/push' to include clarifications. README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. README is up to date.

@Paveltarno Paveltarno force-pushed the task-2-publish-connectors branch from 732b62c to 664438b Compare February 15, 2026 09:32
Paveltarno and others added 2 commits February 15, 2026 11:58
- Update deployAll() to push connectors alongside entities, functions, and agents
- Update hasResourcesToDeploy() to check for connectors
- Display connector count in deployment summary
- Add test for connector deployment

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Extract the OAuth prompt flow from connectors/push.ts into a shared
helper (oauth-prompt.ts) so both `connectors push` and `deploy` can
reuse it. The deploy command now surfaces connector results from
deployAll() and prompts the user to authorize when not in -y/CI mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Paveltarno and others added 10 commits February 15, 2026 11:58
The oauth-prompt helper should not know about process.env.CI — callers
pass skipPrompt: true when they detect CI, keeping the helper generic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The connector names are already shown in the authorization URLs above,
so repeating them in the skip message is unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move browser-open + polling logic from inline push.ts into a shared
runOAuthFlow helper so both push and deploy reuse the same core code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace broken runOAuthFlow core import with the actual browser-open
and polling logic inline, matching the pattern from push.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…iled

The authorization reminder was only shown when the OAuth prompt was
declined entirely (empty outcomes map). Now it also triggers when
individual connectors were skipped via Esc, timed out, or failed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Paveltarno Paveltarno force-pushed the task-2-publish-connectors branch from 8642eba to 421ba41 Compare February 15, 2026 09:58
@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. 3 issues found and applied: (1) Updated logout description to match code: 'Logout from current device'. (2) Uncommented eject command - it exists as a non-hidden command in the codebase. (3) Added missing connectors push command to the table. README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. 7 issue(s) found and applied: (1) Added eject command (uncommented), (2) Added connectors push command (was missing), (3) Updated create description (removed 'from a template'), (4) Updated deploy description (full list of resources), (5) Updated link description (added create new or link existing), (6) Updated logout description (matches code), (7) Updated agents pull/push descriptions (added clarification about replacing configs). README.md has been updated in this branch.

@Paveltarno Paveltarno requested a review from kfirstri February 15, 2026 10:52
@github-project-automation github-project-automation bot moved this from In progress to In review in CLI Development Feb 15, 2026
@Paveltarno Paveltarno merged commit 35700ee into main Feb 15, 2026
11 checks passed
@Paveltarno Paveltarno deleted the task-2-publish-connectors branch February 15, 2026 10:55
@github-project-automation github-project-automation bot moved this from In review to Done in CLI Development Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants