MCPcopy Create free account
hub / github.com/tiann/hapi / resolveNamespace

Method resolveNamespace

hub/src/sync/syncEngine.ts:168–179  ·  view source on GitHub ↗
(event: SyncEvent)

Source from the content-addressed store, hash-verified

166 }
167
168 private resolveNamespace(event: SyncEvent): string | undefined {
169 if (event.namespace) {
170 return event.namespace
171 }
172 if ('sessionId' in event) {
173 return this.getSession(event.sessionId)?.namespace
174 }
175 if ('machineId' in event) {
176 return this.machineCache.getMachine(event.machineId)?.namespace
177 }
178 return undefined
179 }
180
181 getSessions(): Session[] {
182 return this.sessionCache.getSessions()

Callers 2

constructorMethod · 0.95
emitMethod · 0.80

Calls 2

getSessionMethod · 0.95
getMachineMethod · 0.45

Tested by

no test coverage detected