20 lines · 613 B · TypeScript
RawDownload
import { buildHostedPairingUrl } from "../../hostedPairing";import { setPairingTokenOnUrl } from "../../pairingUrl"; export function resolveDesktopPairingUrl(endpointUrl: string, credential: string): string {  const url = new URL(endpointUrl);  url.pathname = "/pair";  return setPairingTokenOnUrl(url, credential).toString();} export function resolveHostedPairingUrl(endpointUrl: string, credential: string): string | null {  const url = new URL(endpointUrl);  if (url.protocol !== "https:") {    return null;  }   return buildHostedPairingUrl({    host: endpointUrl,    token: credential,  });}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t