Skip to content

feat(connectors): add pull command#214

Merged
Paveltarno merged 5 commits intomainfrom
task-1-connectors-pull
Feb 15, 2026
Merged

feat(connectors): add pull command#214
Paveltarno merged 5 commits intomainfrom
task-1-connectors-pull

Conversation

@Paveltarno
Copy link
Collaborator

@Paveltarno Paveltarno commented Feb 9, 2026

Note

Description

Adds a new base44 connectors pull command that syncs OAuth connector configurations from Base44 to local files. The command fetches remote integrations and intelligently updates local connector files - adding new ones, updating changed configurations while preserving comments/formatting, and deleting connectors that no longer exist remotely.

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 pull CLI command with authentication requirement
  • Implemented writeConnectors() function in core/resources/connector/config.ts for file-based syncing:
    • Creates/updates connector files from remote data
    • Deletes local files for removed remote connectors
    • Uses deep equality checks to preserve comments and formatting when data is unchanged
    • Resolves connectors by type rather than filename (allows custom filenames)
  • Refactored readAllConnectors() to use internal file-entry mapping system for better code reuse
  • Added comprehensive unit tests for writeConnectors() covering edge cases (empty lists, custom filenames, unchanged data, directory creation)
  • Added CLI integration tests for the pull command

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 implementation uses isDeepStrictEqual to avoid unnecessary file rewrites, preserving user comments and custom formatting in JSONC files. The type-based resolution system allows users to rename connector files (e.g., my-slack-integration.jsonc instead of slack.jsonc) without breaking functionality - the system matches by type field, not filename.

This command complements the existing connectors push command, providing bidirectional sync capabilities for connector configurations.


🤖 Generated by Claude | 2026-02-15 10:30 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.214.27ce774

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.214.27ce774"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.31-pr.214.27ce774"
  }
}

Preview published to npm registry — try new features instantly!

@dor-chaouat dor-chaouat moved this from Backlog to In progress in CLI Development Feb 9, 2026
@Paveltarno Paveltarno force-pushed the task-1-connectors-pull branch from f4d2ac1 to 02d5fd7 Compare February 11, 2026 08:34
@base44 base44 deleted a comment from claude bot Feb 11, 2026
@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-1-connectors-pull branch from df772e3 to ffe1f67 Compare February 12, 2026 14:09
@claude
Copy link

claude bot commented Feb 12, 2026

README check ran. 10 issue(s) found and applied: Added missing connectors push and connectors pull commands; Updated eject command (uncommented and corrected description); Fixed descriptions for create, deploy, link, logout, whoami, agents pull, agents push, and entities push to match source code. README.md has been updated in this branch.

kfirstri
kfirstri previously approved these changes Feb 12, 2026
@github-project-automation github-project-automation bot moved this from In progress to In review in CLI Development Feb 12, 2026
@Paveltarno Paveltarno force-pushed the task-1-connectors-pull branch from ffe1f67 to d0530cc Compare February 12, 2026 16:21
@claude
Copy link

claude bot commented Feb 12, 2026

README check ran. 6 issues found and applied: (1) Added missing eject command, (2) Added missing connectors push command, (3) Added missing connectors pull command, (4) Updated command descriptions to match codebase exactly, (5) Removed vague phrasing for clarity. A commit has been created (39970a7) but automatic push requires approval - please approve or manually push.

@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. 7 issue(s) found and applied: added eject command, added connectors pull and push subcommands, updated 4 command descriptions to match CLI code. README.md has been updated in this branch.

@Paveltarno Paveltarno force-pushed the task-1-connectors-pull branch from 88009a8 to e378393 Compare February 15, 2026 09:59
@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. 3 issue(s) found and applied: Added missing 'eject' command, added 'connectors pull' command, and added 'connectors push' command. README.md has been updated in this branch.

@Paveltarno Paveltarno requested a review from kfirstri February 15, 2026 10:52
Paveltarno and others added 5 commits February 15, 2026 13:26
Implements fetchConnectors() API, writeConnectors() for file sync,
and the CLI pull command following the agents pull pattern.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@Paveltarno Paveltarno force-pushed the task-1-connectors-pull branch from e378393 to 6552c85 Compare February 15, 2026 11:26
@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. Found discrepancies and applied fixes: added 3 missing commands (eject, connectors pull, connectors push) and updated 10 command descriptions to match actual CLI implementation. README.md has been committed locally (commit d1cfe36) but could not be automatically pushed - please manually push or merge this commit.

connectorsDir: string,
): Promise<ConnectorResource[]> {
const entries = await readConnectorFiles(connectorsDir);
const typeToEntry = buildTypeToEntryMap(entries);
Copy link
Collaborator

Choose a reason for hiding this comment

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

we don't really need this here, we can just grab the data form entries no?
Or is it here for validation there are no two of the same?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes exactly, we do validation here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

readConnectorFiles and buildTypeToEntryMap can be consolidated into one function but I thought it's nicer to separate the loading from the validation/indexation

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.

just one comment :)

@Paveltarno Paveltarno merged commit 1f06fba into main Feb 15, 2026
16 checks passed
@Paveltarno Paveltarno deleted the task-1-connectors-pull branch February 15, 2026 12:41
@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