// `rnx get url` — prints the current page URL the bridge is attached to. import { inspectUrl } from './core' import { printJson, wantsJson } from './shared' import type { WsBridge } from '../../ws-bridge' export async function runUrlSubcommand( bridge: WsBridge, opts: { args: string[] } = { args: [] }, ): Promise { const result = await inspectUrl(bridge) if (wantsJson(opts.args)) { printJson(result) return } console.log(result.url) }