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

Function hasMainTarget

packages/opencode/src/plugin/install.ts:139–143  ·  view source on GitHub ↗
(pkg: Record<string, unknown>)

Source from the content-addressed store, hash-verified

137}
138
139function hasMainTarget(pkg: Record<string, unknown>) {
140 const main = pkg.main
141 if (typeof main !== "string") return false
142 return Boolean(main.trim())
143}
144
145function packageTargets(pkg: { json: Record<string, unknown>; dir: string; pkg: string }) {
146 const spec =

Callers 1

packageTargetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected