(target: string)
| 213 | } |
| 214 | |
| 215 | export async function readPluginPackage(target: string): Promise<PluginPackage> { |
| 216 | const file = target.startsWith("file://") ? fileURLToPath(target) : target |
| 217 | const stat = await Filesystem.statAsync(file) |
| 218 | const dir = stat?.isDirectory() ? file : path.dirname(file) |
| 219 | const pkg = path.join(dir, "package.json") |
| 220 | const json = await Filesystem.readJson<Record<string, unknown>>(pkg) |
| 221 | return { dir, pkg, json } |
| 222 | } |
| 223 | |
| 224 | export async function createPluginEntry(spec: string, target: string, kind: PluginKind): Promise<PluginEntry> { |
| 225 | const source = pluginSource(spec) |
no outgoing calls
no test coverage detected