codeplay-common 1.0.46 → 1.0.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
 
@@ -17,7 +17,7 @@ const getBaseName = (filename) => filename.replace(/-\d+\.\d+\.js$/, "");
17
17
 
18
18
  // Step 1: Find all versioned files in the project directory
19
19
  const filesInProject = fs.readdirSync(projectRoot)
20
- .filter(file => file.match(/(add-splash-screen|setSplashAnimation|codeplayBeforeBuild)-\d+\.\d+\.js/));
20
+ .filter(file => file.match(/(add-splash-screen-|setSplashAnimation-|codeplayBeforeBuild-)-\d+\.\d+\.js/));
21
21
 
22
22
  const latestVersions = {};
23
23
 
@@ -34,6 +34,7 @@ filesInProject.forEach(file => {
34
34
  });
35
35
 
36
36
  // Step 3: Remove ALL outdated versions, even if latest is missing
37
+ /*
37
38
  filesInProject.forEach(file => {
38
39
  const baseName = getBaseName(file);
39
40
  const version = extractVersion(file);
@@ -48,6 +49,30 @@ filesInProject.forEach(file => {
48
49
  }
49
50
  }
50
51
  });
52
+ */
53
+
54
+
55
+
56
+ // Define file prefixes to delete
57
+ const filePrefixes = ["add-splash-screen", "setSplashAnimation", "codeplayBeforeBuild"];
58
+
59
+ // Step 1: Find all matching files in the project directory
60
+ const filesInProject = fs.readdirSync(projectRoot)
61
+ .filter(file => filePrefixes.some(prefix => file.startsWith(prefix)));
62
+
63
+ filesInProject.forEach(file => {
64
+ const filePath = path.join(projectRoot, file);
65
+ try {
66
+ fs.unlinkSync(filePath);
67
+ console.log(`🗑️ Removed file: ${filePath}`);
68
+ } catch (error) {
69
+ console.warn(`⚠️ Failed to remove ${filePath}: ${error.message}`);
70
+ }
71
+ });
72
+
73
+
74
+
75
+
51
76
 
52
77
  // Step 4: Remove files listed in commonBuildPath
53
78
  if (fs.existsSync(commonBuildPath)) {