CloudflareTunnels
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:20
The Cloudflare implementation of the tunnels capability, backed by Cloudflare Tunnel in one account.
Implements
Section titled “Implements”Tunnels
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CloudflareTunnels(
client,accountId):CloudflareTunnels
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:26
Parameters
Section titled “Parameters”client
Section titled “client”() => Pick<CloudflareClient, "tunnels">
accountId
Section titled “accountId”string
Returns
Section titled “Returns”CloudflareTunnels
Properties
Section titled “Properties”
readonlykey:"tunnels"
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:22
The capability this class provides, always "tunnels".
Implementation of
Section titled “Implementation of”Tunnels.key
providerName
Section titled “providerName”
readonlyproviderName:"cloudflare"="cloudflare"
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:24
The provider name, "cloudflare".
Implementation of
Section titled “Implementation of”Tunnels.providerName
Methods
Section titled “Methods”ensureTunnel()
Section titled “ensureTunnel()”ensureTunnel(
route):Promise<EnsuredTunnel>
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:32
Finds the tunnel by name or makes it, then rewrites its routes only when they do not already serve the hostname.
Parameters
Section titled “Parameters”TunnelRoute
Returns
Section titled “Returns”Promise<EnsuredTunnel>
Implementation of
Section titled “Implementation of”Tunnels.ensureTunnel
tunnelToken()
Section titled “tunnelToken()”tunnelToken(
tunnelId):Promise<string>
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:50
The token cloudflared runs the tunnel with.
Parameters
Section titled “Parameters”tunnelId
Section titled “tunnelId”string
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Tunnels.tunnelToken
whoami()
Section titled “whoami()”whoami():
Promise<{ok:boolean;tunnels:number; }>
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:55
holocron doctor has no specific tunnel to check: lists the ones the token can see.
Returns
Section titled “Returns”Promise<{ ok: boolean; tunnels: number; }>
Implementation of
Section titled “Implementation of”Tunnels.whoami