codeplay-common 1.3.4 → 1.3.5

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.
@@ -47,20 +47,19 @@ try {
47
47
  const commonFileContent = fs.readFileSync(resolvedCommonPath, 'utf-8');
48
48
 
49
49
  // Extract _storeid value
50
- const storeIdPattern = /export\s+let\s+_storeid\s*=\s*(?:import\.meta\.env\.VITE_STORE_ID\|\|)?(\d+)/;
50
+ const storeIdPattern = /export\s+let\s+_storeid\s*=\s*import\.meta\.env\.VITE_STORE_ID\s*\|\|\s*(\d+)\s*;/;
51
+
51
52
  const storeMatch = commonFileContent.match(storeIdPattern);
53
+
52
54
 
53
55
  if (!storeMatch) {
54
56
  console.error(`Error: _storeid not found in ${resolvedCommonPath}`);
55
57
  process.exit(1);
56
58
  }
57
-
59
+
58
60
  const _storeid = parseInt(storeMatch[1], 10);
59
-
61
+
60
62
  // Determine the store name based on _storeid
61
-
62
-
63
-
64
63
  let storeName = "";
65
64
  if (_storeid === 1) {
66
65
  storeName = "PlayStore";
@@ -68,11 +67,11 @@ try {
68
67
  storeName = "SamsungStore";
69
68
  } else if (_storeid === 7) {
70
69
  storeName = "AmazonStore";
71
- }
72
- else {
70
+ } else {
73
71
  console.error(`Error: Unsupported _storeid value: ${_storeid}`);
74
72
  process.exit(1);
75
73
  }
74
+
76
75
 
77
76
  // Call managePackages with the determined store name
78
77
  managePackages(storeName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",