MCPcopy Index your code
hub / github.com/anomalyco/opencode / parseRoutersJSON

Function parseRoutersJSON

packages/opencode/src/plugin/digitalocean.ts:211–222  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

209}
210
211function parseRoutersJSON(raw: string | undefined): RouterEntry[] {
212 if (!raw) return []
213 try {
214 const parsed = JSON.parse(raw)
215 if (!Array.isArray(parsed)) return []
216 return parsed.flatMap((r) =>
217 r && typeof r.name === "string" ? [{ name: r.name, uuid: r.uuid, description: r.description }] : [],
218 )
219 } catch {
220 return []
221 }
222}
223
224export async function DigitalOceanAuthPlugin(input: PluginInput): Promise<Hooks> {
225 return {

Callers 1

modelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected