feat(pull-zone): Add 'Verknüpfung trennen' alongside delete#34
Merged
Conversation
Patches two medium-severity advisories in `nitro` route-rules: - GHSA-9phm-9p8f-hw5m: Open Redirect via Protocol-Relative URL - GHSA-5w89-w975-hf9q: Proxy scope bypass via percent-encoded path Lockfile + package.json bump only; no behavioural changes. npm audit --omit=dev: 0 vulnerabilities. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Users can now choose between two outcomes when removing the CDN setup: 'Komplett löschen' (destroys the bunny.net pull zone + DB state, existing behaviour) or 'Verknüpfung trennen' (drops the DB link only; the bunny.net zone stays so the user can keep managing it from the bunny.net dashboard). - New `detachPullZone` domain function + `detachPullZoneFn` server-fn; both leave bunny.net untouched. - Confirm step in AccountTab now shows two side-by-side options with hints, plus cancel. - 3 new unit tests for the detach path; total 224 / 224 green. Use case: deinstall mStudio extension without losing the configured pull zone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets users choose between two outcomes when removing the CDN setup from the extension:
Use case: uninstall the mStudio extension without losing a configured pull zone.
Bundled in this PR: bump
nitroto^3.0.260429-beta(separate commit) — patches two medium-severity advisories (GHSA-9phm-9p8f-hw5m,GHSA-5w89-w975-hf9q) inrouteRules.What changed
detachPullZonedomain function (src/domain/pull-zone.ts) — drops the DB row, leaves bunny.net + CNAME untouched.detachPullZoneFnserver-fn (src/serverFunctions/pull-zone.ts) — same auth/scope path asdeletePullZoneFn.BunnyCdnGhost.detachPullZone()wired insrc/ghosts.ts.AccountTabreworked: two side-by-side options with hints (detachHint/deleteHint) + cancel.dangerZone.detachFinal,detachHint,detaching, restructureddescription).Test plan
npm test— 224 / 224 (+3 new detach tests)npm run typecheck— cleannpm run code-check— cleannpm run build— cleannpm audit --omit=dev— 0 vulnerabilitiesNew tests
detachPullZonedeletes the DB row and does not callbunny.deletePullZone/bunny.removeHostnamedetachPullZonethrowsNOT_FOUNDwhen no pull zone is linkeddetachPullZoneworks without an API key (no bunny interaction needed)Follow-up
The webhook handler
handleInstanceRemovedstill does a best-effort bunny-delete on uninstall (src/server/webhooks/handler.ts:85-114). With detach available, the intended flow is: user clicks Detach in extension → DB row gone → user uninstalls extension via mStudio → webhook finds no pull zone → no-op. So no webhook change is needed for v1.🤖 Generated with Claude Code