MCPcopy Index your code
hub / github.com/upstash/jstack / setupRoutes

Method setupRoutes

packages/jstack/src/server/router.ts:184–196  ·  view source on GitHub ↗
(procedures: Record<string, any>)

Source from the content-addressed store, hash-verified

182 }
183
184 private setupRoutes(procedures: Record<string, any>) {
185 Object.entries(procedures).forEach(([key, value]) => {
186 if (this.isOperationType(value)) {
187 this.registerOperation(key, value)
188 } else if (typeof value === "object" && value !== null) {
189 Object.entries(value).forEach(([subKey, subValue]) => {
190 if (this.isOperationType(subValue)) {
191 this.registerOperation(`${key}/${subKey}`, subValue)
192 }
193 })
194 }
195 })
196 }
197
198 private isOperationType(value: any): value is OperationType<any, any, any> {
199 return (

Callers 1

constructorMethod · 0.95

Calls 2

isOperationTypeMethod · 0.95
registerOperationMethod · 0.95

Tested by

no test coverage detected