MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / detect

Function detect

src/tools/frontend/detect-stack.ts:170–178  ·  view source on GitHub ↗
(pkg: any, items: Array<{ name: string; pkg: string | null; evidence?: string }>)

Source from the content-addressed store, hash-verified

168}
169
170function detect(pkg: any, items: Array<{ name: string; pkg: string | null; evidence?: string }>) {
171 const found: { name: string; version?: string; note?: string }[] = [];
172 for (const it of items) {
173 if (!it.pkg) continue;
174 const ver = hasDep(pkg, it.pkg);
175 if (ver) found.push({ name: it.name, version: String(ver), note: it.evidence || undefined });
176 }
177 return found;
178}
179
180export class DetectFrontendStackTool extends Tool<z.infer<typeof DetectFrontendStackArgs>> {
181 name = 'detect_frontend_stack';

Callers 1

executeMethod · 0.85

Calls 2

hasDepFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected