codeplay-common 2.1.7 → 2.1.9

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.
@@ -11,7 +11,7 @@ const configPath = path.join(process.cwd(), 'capacitor.config.json');
11
11
  // Expected plugin list with minimum versions
12
12
  const requiredPlugins = [
13
13
  { pattern: /backbutton-(\d+\.\d+)\.js$/, minVersion: '1.6', required: true },
14
- { pattern: /common-(\d+\.\d+)\.js$/, minVersion: '5.0', required: true },
14
+ { pattern: /common-(\d+\.\d+)\.js$/, minVersion: '5.1', required: true },
15
15
  { pattern: /localization_settings-(\d+\.\d+)\.js$/, minVersion: '1.1', required: true },
16
16
  { pattern: /localization-(\d+\.\d+)\.js$/, minVersion: '1.3', required: true },
17
17
  { pattern: /localNotification-(\d+\.\d+)\.js$/, minVersion: '2.2', required: true },
@@ -249,16 +249,30 @@ const ANDROID_FILE_REGEX = /^(?!\s*\/\/).*['"](?:.*\/)?saveToGalleryAndSaveAnyFi
249
249
  let iosImportFound = false;
250
250
  let androidImportFound = false;
251
251
 
252
+ // Files to skip completely (full or partial match)
253
+ const SKIP_FILES = [
254
+ 'pdf-3.11.174.min.js',
255
+ 'pdf.worker-3.11.174.min.js'
256
+ ];
257
+
258
+
252
259
  function scanDirectory(dir) {
253
260
 
254
261
  const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
255
262
  const appUniqueId = config.android?.APP_UNIQUE_ID;
256
- if(appUniqueId=="206")
257
- return;
263
+ if (appUniqueId == "206") return;
258
264
 
259
265
  const stat = fs.statSync(dir);
260
266
 
261
267
  if (stat.isFile()) {
268
+
269
+ // šŸ”„ Skip files in SKIP_FILES array
270
+ const baseName = path.basename(dir);
271
+ if (SKIP_FILES.includes(baseName)) {
272
+ // Just skip silently
273
+ return;
274
+ }
275
+
262
276
  // Only scan allowed file extensions
263
277
  if (ALLOWED_EXTENSIONS.some(ext => dir.endsWith(ext))) {
264
278
  process.stdout.write(`\ršŸ” Scanning: ${dir} `);
@@ -272,7 +286,8 @@ function scanDirectory(dir) {
272
286
  console.error(`🚫 STOPPED: This file should not be imported in Android/Windows/Linux builds.\n`);
273
287
  process.exit(1);
274
288
  }
275
- } else if (ANDROID_FILE_REGEX.test(content) && !content.includes('-ios.js')) {
289
+ }
290
+ else if (ANDROID_FILE_REGEX.test(content) && !content.includes('-ios.js')) {
276
291
  androidImportFound = true;
277
292
  }
278
293
  }
@@ -287,6 +302,7 @@ function scanDirectory(dir) {
287
302
  }
288
303
  }
289
304
 
305
+
290
306
  // Run scan on all specified paths
291
307
  for (let scanPath of SCAN_PATHS) {
292
308
  if (fs.existsSync(scanPath)) {
@@ -126,12 +126,15 @@ import android.os.Build;
126
126
  import android.os.Bundle;
127
127
  import com.getcapacitor.BridgeActivity;
128
128
 
129
+ import androidx.activity.EdgeToEdge;
129
130
 
130
131
  public class MainActivity extends BridgeActivity {
131
132
  @Override
132
133
  protected void onCreate(Bundle savedInstanceState) {
133
134
  super.onCreate(savedInstanceState);
134
135
 
136
+ EdgeToEdge.enable(this);
137
+
135
138
  // Handle custom splash screen exit animation
136
139
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
137
140
  getSplashScreen().setOnExitAnimationListener(splashScreenView -> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",