codeplay-common 1.4.6 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -463,12 +463,12 @@ function copyFolderSync(source, target) {
|
|
|
463
463
|
function checkAndCopyResources() {
|
|
464
464
|
if (fileExists(resourcesPath)) {
|
|
465
465
|
copyFolderSync(resourcesPath, androidResPath);
|
|
466
|
-
console.log('Successfully copied resources/res to android/app/src/main/res.');
|
|
466
|
+
console.log(' ✅ Successfully copied resources/res to android/app/src/main/res.');
|
|
467
467
|
} else {
|
|
468
468
|
console.log('resources/res folder not found.');
|
|
469
469
|
|
|
470
470
|
if (fileExists(localNotificationsPluginPath)) {
|
|
471
|
-
throw new Error('resources/res is required for @capacitor/local-notifications. Stopping execution.');
|
|
471
|
+
throw new Error('❌ resources/res is required for @capacitor/local-notifications. Stopping execution.');
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
}
|
|
@@ -477,14 +477,14 @@ function checkAndCopyResources() {
|
|
|
477
477
|
|
|
478
478
|
function getAdMobConfig() {
|
|
479
479
|
if (!fileExists(configPath)) {
|
|
480
|
-
throw new Error('capacitor.config.json not found. Ensure this is a Capacitor project.');
|
|
480
|
+
throw new Error('❌ capacitor.config.json not found. Ensure this is a Capacitor project.');
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
484
484
|
const admobConfig = config.plugins?.AdMob;
|
|
485
485
|
|
|
486
486
|
if (!admobConfig) {
|
|
487
|
-
throw new Error('AdMob configuration is missing in capacitor.config.json.');
|
|
487
|
+
throw new Error('❌ AdMob configuration is missing in capacitor.config.json.');
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
// Default to true if ADMOB_ENABLED is not specified
|
|
@@ -495,7 +495,7 @@ function getAdMobConfig() {
|
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
if (!admobConfig.APP_ID_ANDROID || !admobConfig.APP_ID_IOS) {
|
|
498
|
-
throw new Error('AdMob configuration is incomplete. Ensure APP_ID_ANDROID and APP_ID_IOS are defined.');
|
|
498
|
+
throw new Error(' ❌ AdMob configuration is incomplete. Ensure APP_ID_ANDROID and APP_ID_IOS are defined.');
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
return {
|
|
@@ -508,7 +508,7 @@ function getAdMobConfig() {
|
|
|
508
508
|
|
|
509
509
|
function updatePluginXml(admobConfig) {
|
|
510
510
|
if (!fileExists(pluginPath)) {
|
|
511
|
-
console.error('plugin.xml not found. Ensure the plugin is installed.');
|
|
511
|
+
console.error(' ❌ plugin.xml not found. Ensure the plugin is installed.');
|
|
512
512
|
return;
|
|
513
513
|
}
|
|
514
514
|
|
|
@@ -519,12 +519,12 @@ function updatePluginXml(admobConfig) {
|
|
|
519
519
|
.replace(/<preference name="APP_ID_IOS" default=".*?" \/>/, `<preference name="APP_ID_IOS" default="${admobConfig.APP_ID_IOS}" />`);
|
|
520
520
|
|
|
521
521
|
fs.writeFileSync(pluginPath, pluginContent, 'utf8');
|
|
522
|
-
console.log('AdMob IDs successfully updated in plugin.xml');
|
|
522
|
+
console.log('✅ AdMob IDs successfully updated in plugin.xml');
|
|
523
523
|
}
|
|
524
524
|
|
|
525
525
|
function updateInfoPlist(admobConfig) {
|
|
526
526
|
if (!fileExists(infoPlistPath)) {
|
|
527
|
-
console.error('Info.plist not found. Ensure you have built the iOS project.');
|
|
527
|
+
console.error(' ❌ Info.plist not found. Ensure you have built the iOS project.');
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
530
530
|
|
|
@@ -542,7 +542,7 @@ function updateInfoPlist(admobConfig) {
|
|
|
542
542
|
|
|
543
543
|
try {
|
|
544
544
|
if (!fileExists(configPath)) {
|
|
545
|
-
throw new Error('capacitor.config.json not found. Skipping setup.');
|
|
545
|
+
throw new Error(' ❌ capacitor.config.json not found. Skipping setup.');
|
|
546
546
|
}
|
|
547
547
|
|
|
548
548
|
if (!fileExists(androidPlatformPath) && !fileExists(iosPlatformPath)) {
|