Skip to content

feat(connectors): treat connectors as explicit-delete, like functions - #687

Merged
Paveltarno merged 6 commits into
mainfrom
fix/dev3-deploy-connector-removal
Nov 2, 2026
Merged

Paveltarno merged 6 commits into
mainfrom
fix/dev3-deploy-connector-removal

Conversation

@Paveltarno

@Paveltarno Paveltarno commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

base44 deploy -y removed every connector missing from base44/connectors/, Stripe included (sandbox, keys, claim link), and printed nothing. It hit an agent-built app whose Stripe came from the API; the template has no connectors folder.

Explicit-delete vs mirrored

This PR names a split that already existed implicitly, and documents it in docs/resources.md:

  • Mirrored (entities, agents, agent skills): the remote is made to match the folder, so deleting a local file deletes it remotely.
  • Explicit-delete (functions, actors, and now connectors): deploy only adds and updates; removal takes an explicit step (--force, actors delete).

A resource belongs in explicit-delete when its remote copy holds something the folder can't restore (credentials, a Stripe sandbox, durable storage) or can be created outside the folder. Connectors fit both.

Change

Before After (same as functions)
deploy removes connectors missing locally adds and updates only
connectors push removes connectors missing locally removes only with --force (warning + --yes)
Empty folder removes all removes nothing, even with --force
Connector fails during deploy ignored, exit 0 fails the deploy (after the site ships)

Breaking: scripts relying on connectors push to prune need --force.

Tests

New deploy / connectors push cases for each row above. Full suite, typecheck and lint pass locally.

🤖 Generated with Claude Code

…red locally

`deploy` (and `connectors push`) treated a project with no connectors folder
as "remove every remote connector", so a routine deploy wiped Stripe that was
installed through the API or MCP, along with its sandbox, keys and claim link.

Entities, agents and agent skills already skip their sync when the local list
is empty. Connectors now do the same, which also drops the workspace-API-key
special case in deployAll. Removal still happens when at least one connector
is configured locally.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.2.7-pr.687.1ccc695

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.2.7-pr.687.1ccc695"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.2.7-pr.687.1ccc695"
  }
}

Preview published to npm registry — try new features instantly!

Paveltarno and others added 4 commits November 1, 2026 13:54
Connector sync now only runs when at least one connector is configured
locally, so tests that relied on an empty project to trigger removal or the
connectors stage now copy a connector fixture in.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
deploy dropped connector `removed` and `error` results without a word, so a
deploy that pruned or failed to sync a connector still looked clean. Print
them the way entities/agents push and connectors push already do.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reworks the earlier empty-folder skip. deploy removed remote connectors that
weren't in base44/connectors/, so a project whose Stripe came from the API or
MCP lost it on a routine `deploy -y` - with no folder at all, or with an
unrelated local connector such as gmail.

deploy now treats connectors like functions: it adds and updates what's local
and never removes remote-only ones. pushConnectors takes `prune` (default
true); deployAll passes `prune: false`, which also skips the remote list call,
so the workspace-API-key special case goes away. `connectors push` keeps
pruning, as on main - it's the explicit "make the app match the folder"
command and already warns and requires --yes.

deploy keeps printing connectors that failed to sync; the "Removed connectors"
line is dropped since deploy can no longer remove any.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Paveltarno Paveltarno changed the title fix(connectors): don't remove remote connectors when none are configured locally fix(deploy): never remove connectors, leave pruning to connectors push Nov 1, 2026
Connectors now follow the same rules as functions:
- `connectors push` removes remote-only connectors only with --force (with
  the existing warning, and --yes when non-interactive); without it, it only
  adds and updates. pushConnectors' `prune` now defaults to false.
- An empty connectors folder never prunes, even with --force.
- A connector that fails to sync fails `deploy` (ResourceDeploymentError),
  after the site has shipped.

docs/resources.md names the two groups: explicit-delete (functions, actors,
connectors) and mirrored (entities, agents, agent skills).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Paveltarno Paveltarno changed the title fix(deploy): never remove connectors, leave pruning to connectors push feat(connectors): treat connectors as explicit-delete, like functions Nov 2, 2026
@Paveltarno
Paveltarno merged commit 08390c8 into main Nov 2, 2026
17 checks passed
@Paveltarno
Paveltarno deleted the fix/dev3-deploy-connector-removal branch November 2, 2026 11:13
wixysam added a commit to base44/skills that referenced this pull request Nov 2, 2026
…tors push (#179)

Follows base44/cli#687 (v0.3.0): deploy never removes connectors, and
connectors push only removes remote-only connectors with --force. An
empty connectors directory never removes anything.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant