MCPcopy Create free account
hub / github.com/arctic-cli/interface / getContext

Function getContext

packages/arctic/src/telemetry/index.ts:54–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 }
53
54 async function getContext(): Promise<Context> {
55 if (contextCache) {
56 contextCache.date = new Date().toISOString().split("T")[0]
57 return contextCache
58 }
59 const deviceId = await Global.getDeviceId()
60 contextCache = {
61 deviceId,
62 os: os.platform(),
63 arch: os.arch(),
64 version: Installation.VERSION,
65 channel: Installation.CHANNEL,
66 date: new Date().toISOString().split("T")[0],
67 }
68 return contextCache
69 }
70
71 export async function track(event: string, properties?: Record<string, string | number | boolean>): Promise<void> {
72 if (!(await isEnabled())) return

Callers 1

flushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected