codeplay-common 1.5.6 → 1.5.8

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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Merbin Joe
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Merbin Joe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
@@ -12,8 +12,8 @@ const requiredPlugins = [
12
12
  { pattern: /localNotification-(\d+\.\d+)\.js$/, minVersion: '2.2', required: true },
13
13
  { pattern: /localNotification_AppSettings-(\d+\.\d+)\.js$/, minVersion: '1.0', required: true },
14
14
  { pattern: /onesignal-(\d+\.\d+)\.js$/, minVersion: '2.1', required: true },
15
- { pattern: /saveToGalleryAndSaveAnyFile-(\d+\.\d+)(-ios)?\.js$/, minVersion: '2.4', required: true },
16
- { pattern: /Ads[\/\\]IAP-(\d+\.\d+)$/, minVersion: '2.1', isFolder: true },
15
+ { pattern: /saveToGalleryAndSaveAnyFile-(\d+\.\d+)(-ios)?\.js$/, minVersion: '2.5', required: true },
16
+ { pattern: /Ads[\/\\]IAP-(\d+\.\d+)$/, minVersion: '2.1', isFolder: true , required: true},
17
17
  { pattern: /Ads[\/\\]admob-emi-(\d+\.\d+)\.js$/, minVersion: '2.6', required: true }
18
18
  ];
19
19
 
@@ -609,20 +609,32 @@ function checkPlugins() {
609
609
  const files = walkSync(srcDir);
610
610
 
611
611
  for (const plugin of requiredPlugins) {
612
- if (plugin.isFolder) {
613
- const folderPath = path.join(srcDir, ...plugin.pattern.source.split(/[\/\\]/).slice(0, -1));
614
- if (fs.existsSync(folderPath)) {
615
- const versionMatch = plugin.pattern.exec(folderPath);
616
- if (versionMatch && compareVersions(versionMatch[1], plugin.minVersion) < 0) {
612
+ if (plugin.isFolder) {
613
+
614
+ let baseFolder = path.join(srcDir,'js', 'Ads'); // <- use known folder name
615
+
616
+ if (fs.existsSync(baseFolder)) {
617
+ const subDirs = fs.readdirSync(baseFolder)
618
+ .map(name => path.join(baseFolder, name))
619
+ .filter(p => fs.statSync(p).isDirectory());
620
+
621
+ for (const dir of subDirs) {
622
+ const relativePath = path.relative(srcDir, dir).replace(/\\/g, '/'); // e.g. Ads/IAP-2.0
623
+ const match = plugin.pattern.exec(relativePath);
624
+ if (match) {
625
+ const currentVersion = match[1];
626
+ if (compareVersions(currentVersion, plugin.minVersion) < 0) {
617
627
  outdatedPlugins.push({
618
- name: plugin.pattern,
619
- currentVersion: versionMatch[1],
628
+ name: relativePath,
629
+ currentVersion,
620
630
  requiredVersion: plugin.minVersion
621
631
  });
622
632
  }
623
633
  }
624
- continue;
625
634
  }
635
+ }
636
+ continue;
637
+ }
626
638
 
627
639
  const matchedFile = files.find(file => plugin.pattern.test(file));
628
640
  if (matchedFile) {
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.5.6",
3
+ "version": "1.5.8",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",
7
- "preinstall": "node scripts/uninstall.js",
8
- "postpublish": "git add . && git commit -m \"chore: publish v$npm_package_version\" && git push && git push --tags"
7
+ "preinstall": "node scripts/uninstall.js"
9
8
  },
10
9
  "repository": {
11
10
  "type": "git",
@@ -13,4 +12,5 @@
13
12
  },
14
13
  "author": "Codeplay Technologies",
15
14
  "license": "MIT"
16
- }
15
+ }
16
+