feat(connectors): add connectors to deploy command#211
Conversation
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.31-pr.211.1c10469Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.31-pr.211.1c10469"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.31-pr.211.1c10469"
}
}
Preview published to npm registry — try new features instantly! |
7bfb43f to
7b418ac
Compare
68ece4e to
11d6ca5
Compare
Code reviewFound 1 issue that needs attention: Unused variable in OAuth handling (src/cli/commands/project/deploy.ts:98) Compare with the analogous code in Suggested fix: 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. |
3fc2e0c to
ec69f63
Compare
5b09e45 to
0ca9c91
Compare
|
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({ |
There was a problem hiding this comment.
the pWaitFor should be in cli not in core
kfirstri
left a comment
There was a problem hiding this comment.
return the pwaitFor back to cli/
|
README check ran. 6 issue(s) found and applied: (1) Added missing |
b64af37 to
d0a32e7
Compare
|
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. |
|
README check ran. README is up to date. |
732b62c to
664438b
Compare
- 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>
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>
This reverts commit 6bb9e93.
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>
8642eba to
421ba41
Compare
|
README check ran. 3 issues found and applied: (1) Updated |
|
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. |
Note
Description
This PR adds connector deployment support to the unified
base44 deploycommand 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
Changes Made
oauth-prompt.tsmodule to extract and reuse OAuth flow logic fromconnectors pushcommandpromptOAuthFlows()andfilterPendingOAuth()helper functions for OAuth authorization promptspush.tsto use the new reusable OAuth prompt logicdeploy.tscommand to include connectors in the deployment workflowdeployAll()incore/project/deploy.tsto push connectors and return connector resultshasResourcesToDeploy()to check for connectorsTesting
npm test)Checklist
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