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

Function normalizeSession

packages/ci-proxy-worker/src/index.ts:287–299  ·  view source on GitHub ↗
(session: EncodedSession)

Source from the content-addressed store, hash-verified

285}
286
287function normalizeSession(session: EncodedSession): EncodedSession {
288 if (session.v !== 1) {
289 throw new Error("Unsupported session payload version.");
290 }
291 const upstream = new URL(session.upstream);
292 if (upstream.protocol !== "https:") {
293 throw new Error("SimDeck CI upstream must use https.");
294 }
295 return {
296 ...session,
297 upstream: upstream.origin,
298 };
299}
300
301async function decryptToken(
302 cipher: CipherPayload,

Callers 1

parseEncodedSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected