codeplay-common 2.0.9 → 2.1.0
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.
|
@@ -1129,17 +1129,17 @@ const REQUIRED_CONFIG_KEYS = [
|
|
|
1129
1129
|
|
|
1130
1130
|
|
|
1131
1131
|
|
|
1132
|
-
let
|
|
1132
|
+
let admobConfigInJson;
|
|
1133
1133
|
|
|
1134
1134
|
try {
|
|
1135
|
-
|
|
1135
|
+
admobConfigInJson = JSON.parse(readFileSync(admobConfigPath, "utf8"));
|
|
1136
1136
|
} catch (err) {
|
|
1137
1137
|
console.error("❌ Failed to read admob-ad-configuration.json", err);
|
|
1138
1138
|
process.exit(1);
|
|
1139
1139
|
}
|
|
1140
1140
|
|
|
1141
1141
|
// ✅ Validate config object exists
|
|
1142
|
-
if (!
|
|
1142
|
+
if (!admobConfigInJson.config) {
|
|
1143
1143
|
console.error('❌ "config" object is missing in admob-ad-configuration.json');
|
|
1144
1144
|
process.exit(1);
|
|
1145
1145
|
}
|
|
@@ -1147,13 +1147,13 @@ const REQUIRED_CONFIG_KEYS = [
|
|
|
1147
1147
|
|
|
1148
1148
|
const admobConfigMinVersion="1.4"
|
|
1149
1149
|
|
|
1150
|
-
if (compareVersion(
|
|
1150
|
+
if (compareVersion(admobConfigInJson.VERSION, admobConfigMinVersion) < 0) {
|
|
1151
1151
|
console.error(`❌ Please use at-least version ${admobConfigMinVersion} in "src/js/Ads/admob-ad-configuration.json"`);
|
|
1152
1152
|
process.exit(1);
|
|
1153
1153
|
}
|
|
1154
1154
|
|
|
1155
1155
|
|
|
1156
|
-
const config =
|
|
1156
|
+
const config = admobConfigInJson.config;
|
|
1157
1157
|
|
|
1158
1158
|
// ✅ Find missing properties
|
|
1159
1159
|
const missingKeys = REQUIRED_CONFIG_KEYS.filter(
|