-
Notifications
You must be signed in to change notification settings - Fork 6
Description
First of all, thank you for creating this package.
I've been using the latest version the cloudflared cli and the connections promise coming from tunnel no longer resolves.
pesudo code:
import { tunnel } from 'cloudflared';
async function setupTunnel() {
const {
url,
connections
} = tunnel({
'--url': 'localhost:4000'
});
await Promise.all(connections); // this promise never resolves
const url = await pendingUrl;
}Having tracked down the problem, it appears that the log output has changed and so the regexes are failing to trigger. It seems that I don't need to wait for connections to resolve, but we were previously awaiting connections, as is the case in the tunnels example. For our usecase, awaiting just url seems to be sufficient, however I wanted to report it here in case you'd like to update the example.
I would attempt to fix this for this library, but I don't know if logs are coming from the CLI or are being streamed from a service. If they are coming from the CLI, then updating the regex could result in a breaking change for consumers of this package that have pinned their CLI version.