From a32354a77d6d9c1130b7498c644ef8091a7297f6 Mon Sep 17 00:00:00 2001 From: MOHITKOURAV01 Date: Fri, 21 Nov 2025 16:24:45 +0530 Subject: [PATCH] Fix async Cordova package generation --- cli/src/ios/doctor.ts | 2 +- cli/src/ios/update.ts | 8 +++++--- cli/src/tasks/add.ts | 2 +- cli/src/tasks/update.ts | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cli/src/ios/doctor.ts b/cli/src/ios/doctor.ts index 77d9b8b17..3a7db0cca 100644 --- a/cli/src/ios/doctor.ts +++ b/cli/src/ios/doctor.ts @@ -19,7 +19,7 @@ export async function doctorIOS(config: Config): Promise { // check online datebase of common errors // check if www folder is empty (index.html does not exist) try { - await check([() => checkBundler(config) || checkCocoaPods(config), () => checkWebDir(config), checkXcode]); + await check([() => checkBundler(config), () => checkCocoaPods(config), () => checkWebDir(config), checkXcode]); logSuccess('iOS looking great! 👌'); } catch (e: any) { fatal(e.stack ?? e); diff --git a/cli/src/ios/update.ts b/cli/src/ios/update.ts index e5aaea6c4..9d2ba1f40 100644 --- a/cli/src/ios/update.ts +++ b/cli/src/ios/update.ts @@ -68,9 +68,11 @@ async function updatePluginFiles(config: Config, plugins: Plugin[], deployment: } async function generateCordovaPackageFiles(cordovaPlugins: Plugin[], config: Config) { - cordovaPlugins.map((plugin: any) => { - generateCordovaPackageFile(plugin, config); - }); + await Promise.all( + cordovaPlugins.map(async (plugin) => { + await generateCordovaPackageFile(plugin, config); + }), + ); } async function generateCordovaPackageFile(p: Plugin, config: Config) { diff --git a/cli/src/tasks/add.ts b/cli/src/tasks/add.ts index f849132bf..4e3eefbfc 100644 --- a/cli/src/tasks/add.ts +++ b/cli/src/tasks/add.ts @@ -112,7 +112,7 @@ function printNextSteps(platformName: string) { function addChecks(config: Config, platformName: string): CheckFunction[] { if (platformName === config.ios.name) { - return [() => checkIOSPackage(config), () => checkBundler(config) || checkCocoaPods(config)]; + return [() => checkIOSPackage(config), () => checkBundler(config), () => checkCocoaPods(config)]; } else if (platformName === config.android.name) { return [() => checkAndroidPackage(config)]; } else if (platformName === config.web.name) { diff --git a/cli/src/tasks/update.ts b/cli/src/tasks/update.ts index a2b6cbe0d..dc085722c 100644 --- a/cli/src/tasks/update.ts +++ b/cli/src/tasks/update.ts @@ -50,7 +50,8 @@ export function updateChecks(config: Config, platforms: string[]): CheckFunction const checks: CheckFunction[] = []; for (const platformName of platforms) { if (platformName === config.ios.name) { - checks.push(() => checkBundler(config) || checkCocoaPods(config)); + checks.push(() => checkBundler(config)); + checks.push(() => checkCocoaPods(config)); } else if (platformName === config.android.name) { continue; } else if (platformName === config.web.name) {