MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / simulatorControlSocketUrl

Function simulatorControlSocketUrl

packages/client/src/api/controls.ts:109–120  ·  view source on GitHub ↗
(udid: string)

Source from the content-addressed store, hash-verified

107}
108
109export function simulatorControlSocketUrl(udid: string) {
110 const url = new URL(
111 apiUrl(`/api/simulators/${encodeURIComponent(udid)}/control`),
112 window.location.href,
113 );
114 const token = accessTokenFromLocation();
115 if (token) {
116 url.searchParams.set("simdeckToken", token);
117 }
118 url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
119 return url.toString();
120}
121
122async function fetchSimulatorBlob(
123 path: string,

Callers 1

AppShellFunction · 0.90

Calls 4

apiUrlFunction · 0.90
accessTokenFromLocationFunction · 0.90
setMethod · 0.80
toStringMethod · 0.80

Tested by

no test coverage detected