MCPcopy Create free account
hub / github.com/pingdotgg/t3code / formatClientMetadata

Function formatClientMetadata

apps/server/src/cliAuthFormat.ts:12–21  ·  view source on GitHub ↗
(metadata: AuthClientMetadata)

Source from the content-addressed store, hash-verified

10}
11
12function formatClientMetadata(metadata: AuthClientMetadata): string {
13 const details = serializeOptionalFields([
14 metadata.label,
15 metadata.deviceType !== "unknown" ? metadata.deviceType : undefined,
16 metadata.os,
17 metadata.browser,
18 metadata.ipAddress,
19 ]);
20 return details.length > 0 ? details.join(" | ") : "unlabeled client";
21}
22
23function toIsoString(value: DateTime.DateTime | DateTime.Utc): string {
24 return DateTime.formatIso(DateTime.toUtc(value));

Callers 2

formatIssuedSessionFunction · 0.85
formatSessionListFunction · 0.85

Calls 1

serializeOptionalFieldsFunction · 0.85

Tested by

no test coverage detected