(config: Config, name: string)
| 224 | } |
| 225 | |
| 226 | export async function getCapacitorPackage(config: Config, name: string): Promise<PackageJson | null> { |
| 227 | const packagePath = resolveNode(config.app.rootDir, `@capacitor/${name}`, 'package.json'); |
| 228 | |
| 229 | if (!packagePath) { |
| 230 | return null; |
| 231 | } |
| 232 | |
| 233 | return readJSON(packagePath); |
| 234 | } |
| 235 | |
| 236 | export async function requireCapacitorPackage(config: Config, name: string): Promise<PackageJson> { |
| 237 | const pkg = await getCapacitorPackage(config, name); |
no test coverage detected