feat(tunneling): implement the ngrok tunnel provider#59
Open
ishanj12 wants to merge 1 commit into
Open
Conversation
Replaces the ngrok provider stub with a real implementation built on @ngrok/ngrok (agent) and @ngrok/ngrok-api (reserved domains). Supports both the free-tier auto-assigned dev-domain and paid custom-domain reservation, with a TunnelAgent adapter around @ngrok/ngrok's join()-based lifecycle. Verified against a live ngrok account. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
|
which feature needs this ? |
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
ProviderNotImplementedError), matching the shape of the existing Oblien provider.@ngrok/ngrok(agent SDK) to open/manage the tunnel, and@ngrok/ngrok-api(optional, needsNGROK_API_KEY) to reserve a custom domain wheninput.slugis given.NGROK_AUTHTOKENset) get their auto-assigned dev-domain —create()probe-connects once to learn the hostname, thenconnect()opens the real long-lived listener against it.TunnelAgentadapter wraps@ngrok/ngrok'sListener(which has no native disconnect/error events, onlylistener.join()) into thedisconnect/closeeventsmanager.ts's reconnect-with-backoff expects.Test plan
tsc --noEmitclean acrossapps/apiapps/api/test/modules/tunneling/ngrok.provider.test.ts, 22 tests, mocked SDKs) covering preflight, both create() paths (with/without API key, no-slug probe path), conflict/ownership disambiguation, delete()'s resource-id gating, and the TunnelAgent adapter's close-vs-drop event distinctionbun run test)