* 从文件系统读取并解析 plugin.json * @param configPath - plugin.json 的绝对路径 * @returns 解析后的 JSON 对象 * @throws 文件不存在或 JSON 格式错误时抛出
(configPath: string)
| 69 | * @throws 文件不存在或 JSON 格式错误时抛出 |
| 70 | */ |
| 71 | async function readPluginConfigFromFile(configPath: string): Promise<any> { |
| 72 | const content = await fs.readFile(configPath, 'utf-8') |
| 73 | return JSON.parse(content) |
| 74 | } |
| 75 | |
| 76 | // ============================================================ |
| 77 | // Dev Projects API |
no outgoing calls
no test coverage detected