Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

previewTunnel.ts

12 lines562 Bytes

1import { createPreviewTunnelUrlReader } from "@t3tools/client-runtime/state/previewTunnel";
2​
3import { connectionAtomRuntime } from "../connection/runtime";
4import { appAtomRegistry } from "./atom-registry";
5import { environmentSession } from "./session";
6​
7/** The environment's tunnel WebSocket URL with a live media ticket, or null when unreachable. */
8export const readPreviewTunnelUrl = createPreviewTunnelUrlReader({
9 runtime: connectionAtomRuntime,
10 registry: appAtomRegistry,
11 preparedConnectionAtom: environmentSession.preparedConnectionValueAtom,
12});