codeplay-common 4.4.1 → 4.4.3

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.
@@ -1,27 +1,27 @@
1
- {
2
- "plugins":[
3
- {"name":"backbutton","pattern":"backbutton-(\\d+\\.\\d+)\\.js$","minVersion":"2.1","baseDir":"js","mandatoryUpdate":true},
1
+ {
2
+ "plugins":[
3
+ {"name":"backbutton","pattern":"backbutton-(\\d+\\.\\d+)\\.js$","minVersion":"2.1","baseDir":"js","mandatoryUpdate":true},
4
4
  {"name":"common-js","pattern":"common-(\\d+\\.\\d+)(?:-beta-(\\d+))?\\.js$","minVersion":"6.7","baseDir":"js","mandatoryUpdate":true},
5
-
5
+
6
6
  {"name":"admob-emi-nextgen","pattern":"Ads[\\\\/]admob-emi-nextgen-(\\d+\\.\\d+)\\.js$","minVersion":"1.0","baseDir":"js","mandatoryUpdate":true},
7
- {"name":"video-player","pattern":"video-player-(\\d+\\.\\d+)\\.js$","minVersion":"1.6","baseDir":"js","mandatoryUpdate":true},
8
- {"name":"image-cropper","pattern":"image-cropper-(\\d+\\.\\d+)\\.js$","minVersion":"1.1","baseDir":"js","mandatoryUpdate":true},
9
- {"name":"beautify","pattern":"beautify-(\\d+\\.\\d+)\\.js$","minVersion":"1.1","baseDir":"js","mandatoryUpdate":true},
10
-
11
-
12
- {"name":"localization","pattern":"localization-(\\d+\\.\\d+)$","minVersion":"1.8","baseDir":"js/localization","mandatoryUpdate":true,"isFolder":true},
13
- {"name": "localization_settings","pattern": "localization_settings-(\\d+\\.\\d+)\\.js$","minVersion": "1.1","required": true,"baseDir": "js/localization","mandatoryUpdate": true},
14
-
15
-
16
- {"name":"editor","pattern":"editor-(\\d+\\.\\d+)$","minVersion":"2.0","baseDir":"js/editor","mandatoryUpdate":true,"isFolder":true},
17
- {"name":"ffmpeg","pattern":"ffmpeg-(\\d+\\.\\d+)$","minVersion":"1.6","baseDir":"js","mandatoryUpdate":true,"isFolder":true},
18
- {"name":"theme","pattern":"theme-(\\d+\\.\\d+)$","minVersion":"3.5","baseDir":"theme","destDir":"theme","mandatoryUpdate":true,"isFolder":true},
19
- {"name":"certificatejs","pattern":"certificatejs-(\\d+\\.\\d+)$","minVersion":"1.9","baseDir":"certificate","destDir":"certificate","mandatoryUpdate":true,"isFolder":true},
7
+ {"name":"video-player","pattern":"video-player-(\\d+\\.\\d+)\\.js$","minVersion":"1.6","baseDir":"js","mandatoryUpdate":true},
8
+ {"name":"image-cropper","pattern":"image-cropper-(\\d+\\.\\d+)\\.js$","minVersion":"1.1","baseDir":"js","mandatoryUpdate":true},
9
+ {"name":"beautify","pattern":"beautify-(\\d+\\.\\d+)\\.js$","minVersion":"1.1","baseDir":"js","mandatoryUpdate":true},
10
+
11
+
12
+ {"name":"localization","pattern":"localization-(\\d+\\.\\d+)$","minVersion":"1.8","baseDir":"js/localization","mandatoryUpdate":true,"isFolder":true},
13
+ {"name": "localization_settings","pattern": "localization_settings-(\\d+\\.\\d+)\\.js$","minVersion": "1.1","required": true,"baseDir": "js/localization","mandatoryUpdate": true},
14
+
15
+
16
+ {"name":"editor","pattern":"editor-(\\d+\\.\\d+)$","minVersion":"2.0","baseDir":"js/editor","mandatoryUpdate":true,"isFolder":true},
17
+ {"name":"ffmpeg","pattern":"ffmpeg-(\\d+\\.\\d+)$","minVersion":"1.6","baseDir":"js","mandatoryUpdate":true,"isFolder":true},
18
+ {"name":"theme","pattern":"theme-(\\d+\\.\\d+)$","minVersion":"3.5","baseDir":"theme","destDir":"theme","mandatoryUpdate":true,"isFolder":true},
19
+ {"name":"certificatejs","pattern":"certificatejs-(\\d+\\.\\d+)$","minVersion":"1.9","baseDir":"certificate","destDir":"certificate","mandatoryUpdate":true,"isFolder":true},
20
20
  {"name":"IAP","pattern":"IAP-(\\d+\\.\\d+)$","minVersion":"3.6","baseDir":"js/Ads","mandatoryUpdate":true,"isFolder":true},
21
- {"name":"common-less","pattern":"common-(\\d+\\.\\d+)\\.less$","minVersion":"1.8","baseDir":"assets/css","mandatoryUpdate":true},
22
- {"name":"localNotification_AppSettings","pattern":"localNotification_AppSettings-(\\d+\\.\\d+)\\.js$","minVersion":"1.0","baseDir":"js","mandatoryUpdate":true},
23
- {"name":"localNotification","pattern":"localNotification-(\\d+\\.\\d+)\\.js$","minVersion":"2.2","baseDir":"js","mandatoryUpdate":true},
24
- {"name":"onesignal","pattern":"onesignal-(\\d+\\.\\d+)\\.js$","minVersion":"2.4","baseDir":"js","mandatoryUpdate":true},
25
- {"name":"saveToGalleryAndSaveAnyFile","pattern":"saveToGalleryAndSaveAnyFile-(\\d+\\.\\d+)(-ios)?\\.js$","minVersion":"3.1","baseDir":"js","mandatoryUpdate":true}
26
- ]
21
+ {"name":"common-less","pattern":"common-(\\d+\\.\\d+)\\.less$","minVersion":"1.8","baseDir":"assets/css","mandatoryUpdate":true},
22
+ {"name":"localNotification_AppSettings","pattern":"localNotification_AppSettings-(\\d+\\.\\d+)\\.js$","minVersion":"1.0","baseDir":"js","mandatoryUpdate":true},
23
+ {"name":"localNotification","pattern":"localNotification-(\\d+\\.\\d+)\\.js$","minVersion":"2.2","baseDir":"js","mandatoryUpdate":true},
24
+ {"name":"onesignal","pattern":"onesignal-(\\d+\\.\\d+)\\.js$","minVersion":"2.4","baseDir":"js","mandatoryUpdate":true},
25
+ {"name":"saveToGalleryAndSaveAnyFile","pattern":"saveToGalleryAndSaveAnyFile-(\\d+\\.\\d+)(-ios)?\\.js$","minVersion":"3.1","baseDir":"js","mandatoryUpdate":true}
26
+ ]
27
27
  }
@@ -275,14 +275,14 @@ const checkIsAdsDisableByReturnStatement=()=>{
275
275
 
276
276
 
277
277
  const adsFolder = join('src', 'js', 'Ads');
278
- const filePattern = /^admob-emi-nextgen-(\d+\.)+\d+\.js$/;
278
+ const filePattern = /^admob-emi-nextgen-(\d+\.)+\d+\.js$/;
279
279
 
280
280
  // Step 1: Find the admob file
281
281
  const files = readdirSync(adsFolder);
282
282
  const admobFile = files.find(f => filePattern.test(f));
283
283
 
284
284
  if (!admobFile) {
285
- console.log('❌ No Admob nextgen file found.');
285
+ console.log('❌ No Admob nextgen file found.');
286
286
  process.exit(1);
287
287
  }
288
288
 
@@ -527,30 +527,30 @@ if (existsSync(aabOutputDir)) {
527
527
 
528
528
 
529
529
  // Extract version code and version name from build.gradle
530
- const gradleFilePath = join("android", "app", "build.gradle");
531
- const gradleContent = readFileSync(gradleFilePath, 'utf8');
532
-
533
- // Return the character range of a Gradle block, allowing nested blocks inside it.
534
- function findGradleBlock(content, headerPattern) {
535
- const headerMatch = content.match(headerPattern);
536
- if (!headerMatch) return null;
537
- const openingBrace = content.indexOf('{', headerMatch.index + headerMatch[0].length);
538
- if (openingBrace === -1) return null;
539
- let depth = 0;
540
- let quote = null;
541
- for (let index = openingBrace; index < content.length; index += 1) {
542
- const character = content[index];
543
- const previous = content[index - 1];
544
- if (quote) {
545
- if (character === quote && previous !== '\\') quote = null;
546
- continue;
547
- }
548
- if (character === '\"' || character === "'") quote = character;
549
- else if (character === '{') depth += 1;
550
- else if (character === '}' && --depth === 0) return { start: openingBrace + 1, end: index };
551
- }
552
- return null;
553
- }
530
+ const gradleFilePath = join("android", "app", "build.gradle");
531
+ const gradleContent = readFileSync(gradleFilePath, 'utf8');
532
+
533
+ // Return the character range of a Gradle block, allowing nested blocks inside it.
534
+ function findGradleBlock(content, headerPattern) {
535
+ const headerMatch = content.match(headerPattern);
536
+ if (!headerMatch) return null;
537
+ const openingBrace = content.indexOf('{', headerMatch.index + headerMatch[0].length);
538
+ if (openingBrace === -1) return null;
539
+ let depth = 0;
540
+ let quote = null;
541
+ for (let index = openingBrace; index < content.length; index += 1) {
542
+ const character = content[index];
543
+ const previous = content[index - 1];
544
+ if (quote) {
545
+ if (character === quote && previous !== '\\') quote = null;
546
+ continue;
547
+ }
548
+ if (character === '\"' || character === "'") quote = character;
549
+ else if (character === '{') depth += 1;
550
+ else if (character === '}' && --depth === 0) return { start: openingBrace + 1, end: index };
551
+ }
552
+ return null;
553
+ }
554
554
 
555
555
  const versionCodeMatch = gradleContent.match(/versionCode\s+(\d+)/);
556
556
  const versionNameMatch = gradleContent.match(/versionName\s+"([^"]+)"/);
@@ -617,26 +617,26 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
617
617
  `$1\n minifyEnabled ${desiredMinify}`
618
618
  );
619
619
  console.log(`✅ Inserted minifyEnabled ${desiredMinify} into release block.`);
620
- } else {
621
- console.log('⚠️ Warning: buildTypes > release block not found. minifyEnabled was not added.');
622
- }
623
-
624
- // Add native debug symbols for release AABs, but leave any existing setting untouched.
625
- const releaseBlock = findGradleBlock(updatedGradleContent, /buildTypes\s*\{[\s\S]*?\brelease\s*/);
626
- if (releaseBlock) {
627
- const releaseContent = updatedGradleContent.slice(releaseBlock.start, releaseBlock.end);
628
- if (/\bdebugSymbolLevel\b/.test(releaseContent)) {
629
- console.log('ℹ️ debugSymbolLevel already exists in buildTypes.release; leaving it unchanged.');
630
- } else {
631
- const ndkBlock = `\n ndk {\n debugSymbolLevel 'FULL'\n }`;
632
- updatedGradleContent = updatedGradleContent.slice(0, releaseBlock.end)
633
- + ndkBlock
634
- + updatedGradleContent.slice(releaseBlock.end);
635
- console.log("✅ Added debugSymbolLevel 'FULL' to buildTypes.release.");
636
- }
637
- } else {
638
- console.log('⚠️ Warning: buildTypes.release block not found. debugSymbolLevel was not added.');
639
- }
620
+ } else {
621
+ console.log('⚠️ Warning: buildTypes > release block not found. minifyEnabled was not added.');
622
+ }
623
+
624
+ // Add native debug symbols for release AABs, but leave any existing setting untouched.
625
+ const releaseBlock = findGradleBlock(updatedGradleContent, /buildTypes\s*\{[\s\S]*?\brelease\s*/);
626
+ if (releaseBlock) {
627
+ const releaseContent = updatedGradleContent.slice(releaseBlock.start, releaseBlock.end);
628
+ if (/\bdebugSymbolLevel\b/.test(releaseContent)) {
629
+ console.log('ℹ️ debugSymbolLevel already exists in buildTypes.release; leaving it unchanged.');
630
+ } else {
631
+ const ndkBlock = `\n ndk {\n debugSymbolLevel 'FULL'\n }`;
632
+ updatedGradleContent = updatedGradleContent.slice(0, releaseBlock.end)
633
+ + ndkBlock
634
+ + updatedGradleContent.slice(releaseBlock.end);
635
+ console.log("✅ Added debugSymbolLevel 'FULL' to buildTypes.release.");
636
+ }
637
+ } else {
638
+ console.log('⚠️ Warning: buildTypes.release block not found. debugSymbolLevel was not added.');
639
+ }
640
640
 
641
641
 
642
642
 
@@ -753,11 +753,11 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
753
753
 
754
754
 
755
755
  // Copy the built files to the appropriate folder
756
- const src = join("www");
757
- const dest = join("android", "app", "src", "main", "assets", "public");
758
-
759
- // Copy the web build with Node so releases work on every platform.
760
- fs.cpSync(src, dest, { recursive: true, force: true });
756
+ const src = join("www");
757
+ const dest = join("android", "app", "src", "main", "assets", "public");
758
+
759
+ // Copy the web build with Node so releases work on every platform.
760
+ fs.cpSync(src, dest, { recursive: true, force: true });
761
761
 
762
762
  // Build Android AAB file
763
763
  //child_process.execSync('cd android && ./gradlew bundleRelease', { stdio: 'inherit' });