codeplay-common 4.11.11 → 4.11.12

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.
@@ -1003,6 +1003,10 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
1003
1003
  // Conditionally set the new file name
1004
1004
  let newFileName;
1005
1005
  let storeName = storeNames[id];
1006
+ // Amazon previously received version code 10000 for this package.
1007
+ const storeVersionCode = _appPackageId === 'computer.shortcut.keys.app' && String(id) === '7'
1008
+ ? String(10000 + Number(finalVersionCode))
1009
+ : finalVersionCode;
1006
1010
 
1007
1011
 
1008
1012
  if (
@@ -1020,19 +1024,19 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
1020
1024
  if (isOnlyOneAPK && ["MiStore","OppoStore","VivoStore"].includes(storeName)) {
1021
1025
 
1022
1026
  newFileName =
1023
- `${_appUniqueId}_${_appName.replaceAll(" ","_")}-VI_MI_OPPO-b${finalVersionCode}-v${finalVersionName.replace(/\./g,'_')}.aab`;
1027
+ `${_appUniqueId}_${_appName.replaceAll(" ","_")}-VI_MI_OPPO-b${storeVersionCode}-v${finalVersionName.replace(/\./g,'_')}.aab`;
1024
1028
 
1025
1029
  }
1026
1030
  else if (storeName === "SamsungStore") {
1027
1031
 
1028
1032
  newFileName =
1029
- `${_appUniqueId}_${_appName.replaceAll(" ","_")}-${(storeName.toUpperCase()).replace("STORE","")}-b${finalVersionCode}-v${finalVersionName.replace(/\./g,'_')}.aab`;
1033
+ `${_appUniqueId}_${_appName.replaceAll(" ","_")}-${(storeName.toUpperCase()).replace("STORE","")}-b${storeVersionCode}-v${finalVersionName.replace(/\./g,'_')}.aab`;
1030
1034
 
1031
1035
  }
1032
1036
  else {
1033
1037
 
1034
1038
  newFileName =
1035
- `${_appUniqueId}_${_appName.replaceAll(" ","_")}-${(storeName.toUpperCase()).replace("STORE","")}-b${finalVersionCode}-v${finalVersionName}.aab`;
1039
+ `${_appUniqueId}_${_appName.replaceAll(" ","_")}-${(storeName.toUpperCase()).replace("STORE","")}-b${storeVersionCode}-v${finalVersionName}.aab`;
1036
1040
 
1037
1041
  }
1038
1042
 
@@ -1152,12 +1156,25 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
1152
1156
  ].filter(Boolean).join(' ');
1153
1157
  }
1154
1158
 
1155
- if (buildType === "APK") {
1156
- console.log("📦 Using custom Node signing script for APK build...");
1157
- execFileSync(process.execPath, [join(process.cwd(), 'buildCodeplay', 'apk-store-builder.js')], { stdio: 'inherit', env: releaseBuildEnv });
1158
- } else {
1159
- execSync(`npx cap build android --androidreleasetype=${buildType}`, { stdio: 'inherit', env: releaseBuildEnv });
1160
- signReleaseBundleWithSha256();
1159
+ const hasStoreVersionOverride = String(storeVersionCode) !== String(finalVersionCode);
1160
+ try {
1161
+ if (hasStoreVersionOverride) {
1162
+ const storeGradleContent = readFileSync(gradleFilePath, 'utf8');
1163
+ writeFileSync(gradleFilePath, storeGradleContent.replace(/versionCode\s+\d+/, `versionCode ${storeVersionCode}`), 'utf8');
1164
+ console.log(`📦 ${storeName} versionCode: ${storeVersionCode} (base: ${finalVersionCode})`);
1165
+ }
1166
+ if (buildType === "APK") {
1167
+ console.log("📦 Using custom Node signing script for APK build...");
1168
+ execFileSync(process.execPath, [join(process.cwd(), 'buildCodeplay', 'apk-store-builder.js')], { stdio: 'inherit', env: releaseBuildEnv });
1169
+ } else {
1170
+ execSync(`npx cap build android --androidreleasetype=${buildType}`, { stdio: 'inherit', env: releaseBuildEnv });
1171
+ signReleaseBundleWithSha256();
1172
+ }
1173
+ } finally {
1174
+ if (hasStoreVersionOverride) {
1175
+ const storeGradleContent = readFileSync(gradleFilePath, 'utf8');
1176
+ writeFileSync(gradleFilePath, storeGradleContent.replace(/versionCode\s+\d+/, `versionCode ${finalVersionCode}`), 'utf8');
1177
+ }
1161
1178
  }
1162
1179
 
1163
1180
 
@@ -1179,7 +1196,7 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
1179
1196
  if (existsSync(oldFilePath)) {
1180
1197
  renameSync(oldFilePath, checkFullPath);
1181
1198
  console.log(`✅ Renamed output ${newExt.toUpperCase()} file to: ${path.basename(checkFullPath)}`);
1182
- syncReleaseToCodeplay(storeName, finalVersionName, finalVersionCode, new Date().toISOString().slice(0, 10));
1199
+ syncReleaseToCodeplay(storeName, finalVersionName, storeVersionCode, new Date().toISOString().slice(0, 10));
1183
1200
  } else {
1184
1201
  console.error(`❌ ${newExt.toUpperCase()} file not found after build.`);
1185
1202
  }
@@ -2710,6 +2710,7 @@ function createDeviceFrameHtml(
2710
2710
  ${createScreenshotCopyMarkup(screenshotCopy)}
2711
2711
  ${framelessPhone ? `<style>
2712
2712
  .device.android-phone.frameless-phone {
2713
+ position: absolute;
2713
2714
  padding: 0; border: 0; border-radius: 0; background: transparent;
2714
2715
  box-shadow: 0 1vh 3vh rgba(15,23,42,0.15);
2715
2716
  }
@@ -3722,7 +3723,7 @@ async function frameExistingScreenshots(
3722
3723
  );
3723
3724
  const foundScreenshotNames = new Set();
3724
3725
 
3725
- for (const profile of selectedProfiles.filter((item) => item.frameType === 'native-apple')) {
3726
+ for (const profile of selectedProfiles.filter((item) => item.frameType === 'native-apple' || item.name === 'apple-watch')) {
3726
3727
  await recoverMissingAppleScreenshots(profile, selectedScreenshotNames);
3727
3728
  }
3728
3729
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "4.11.11",
3
+ "version": "4.11.12",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",