(spec: string, target: string, kind: PluginKind)
| 222 | } |
| 223 | |
| 224 | export 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 | |
| 238 | export function readPackageThemes(spec: string, pkg: PluginPackage) { |
| 239 | const field = pkg.json["oc-themes"] |
no test coverage detected