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

Function createPluginEntry

packages/opencode/src/plugin/shared.ts:224–236  ·  view source on GitHub ↗
(spec: string, target: string, kind: PluginKind)

Source from the content-addressed store, hash-verified

222}
223
224export async function createPluginEntry(spec: string, target: string, kind: PluginKind): Promise<PluginEntry> {
225 const source = pluginSource(spec)
226 const pkg =
227 source === "npm" ? await readPluginPackage(target) : await readPluginPackage(target).catch(() => undefined)
228 const entry = await resolvePluginEntrypoint(spec, target, kind, pkg)
229 return {
230 spec,
231 source,
232 target,
233 pkg,
234 entry,
235 }
236}
237
238export function readPackageThemes(spec: string, pkg: PluginPackage) {
239 const field = pkg.json["oc-themes"]

Callers 1

resolveFunction · 0.90

Calls 3

pluginSourceFunction · 0.85
readPluginPackageFunction · 0.85
resolvePluginEntrypointFunction · 0.85

Tested by

no test coverage detected