codeplay-common 3.2.17 → 3.2.19
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.
|
@@ -217,13 +217,24 @@ function checkPackageVersion() {
|
|
|
217
217
|
const latestVersion = getLatestVersion(packageName);
|
|
218
218
|
|
|
219
219
|
if (!installedVersion) {
|
|
220
|
-
console.error(`${packageName} is not installed.
|
|
221
|
-
|
|
220
|
+
console.error(`${packageName} is not installed. Installing now...`);
|
|
221
|
+
execSync(`npm install ${packageName}`, { stdio: 'inherit' });
|
|
222
|
+
return;
|
|
222
223
|
}
|
|
223
224
|
|
|
224
225
|
if (installedVersion !== latestVersion) {
|
|
225
|
-
console.
|
|
226
|
-
|
|
226
|
+
console.log(`${packageName} is outdated (installed: ${installedVersion}, latest: ${latestVersion}). Updating now...`);
|
|
227
|
+
|
|
228
|
+
try {
|
|
229
|
+
execSync(`npm uninstall ${packageName}`, { stdio: 'inherit' });
|
|
230
|
+
execSync(`npm install ${packageName}`, { stdio: 'inherit' });
|
|
231
|
+
console.log(`${packageName} successfully updated.`);
|
|
232
|
+
} catch (err) {
|
|
233
|
+
console.error(`Failed to update ${packageName}:`, err.message);
|
|
234
|
+
process.exit(1);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return;
|
|
227
238
|
}
|
|
228
239
|
|
|
229
240
|
console.log(`${packageName} is up to date (version ${installedVersion}).`);
|
|
@@ -85,4 +85,6 @@ Note: This changes are added with my old(current) code. Might we need to integra
|
|
|
85
85
|
INFO.PLIST START
|
|
86
86
|
|
|
87
87
|
4) In "codeplayBeforeBuild-6.1.js" file following whole method is replaced. Due to add ads related permission to info.plist file
|
|
88
|
-
updateInfoPlist()
|
|
88
|
+
updateInfoPlist()
|
|
89
|
+
|
|
90
|
+
5) The "checkPackageVersion()" metod is updated. Now check the "codeplay-common" latest version and uninstall/install automatically.
|