()
| 56 | } |
| 57 | |
| 58 | export async function checkPackage(): Promise<string | null> { |
| 59 | if (!(await pathExists('package.json'))) { |
| 60 | if (await pathExists('project.json')) { |
| 61 | return null; |
| 62 | } else { |
| 63 | return ( |
| 64 | `The Capacitor CLI needs to run at the root of an npm package or in a valid NX monorepo.\n` + |
| 65 | `Make sure you have a package.json or project.json file in the directory where you run the Capacitor CLI.\n` + |
| 66 | `More info: ${c.strong('https://docs.npmjs.com/cli/init')}` |
| 67 | ); |
| 68 | } |
| 69 | } |
| 70 | return null; |
| 71 | } |
| 72 | |
| 73 | export async function checkCapacitorPlatform(config: Config, platform: string): Promise<string | null> { |
| 74 | const pkg = await getCapacitorPackage(config, platform); |
no outgoing calls
no test coverage detected