(value: unknown)
| 69 | } |
| 70 | |
| 71 | function extractExportValue(value: unknown): string | undefined { |
| 72 | if (typeof value === "string") return value |
| 73 | if (!isRecord(value)) return undefined |
| 74 | for (const key of ["import", "default"]) { |
| 75 | const nested = value[key] |
| 76 | if (typeof nested === "string") return nested |
| 77 | } |
| 78 | return undefined |
| 79 | } |
| 80 | |
| 81 | function packageMain(pkg: PluginPackage) { |
| 82 | const value = pkg.json.main |
no test coverage detected