codeplay-common 1.0.48 → 1.0.50

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,9 +1,9 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
-
6
+ "postinstall":"node scripts/sync-files.js",
7
7
  "preinstall": "node scripts/uninstall.js"
8
8
  },
9
9
  "repository": {
@@ -33,34 +33,15 @@ filesInProject.forEach(file => {
33
33
  }
34
34
  });
35
35
 
36
- // Step 3: Remove ALL outdated versions, even if latest is missing
37
- /*
38
- filesInProject.forEach(file => {
39
- const baseName = getBaseName(file);
40
- const version = extractVersion(file);
41
- const filePath = path.join(projectRoot, file);
42
-
43
- if (version !== null && latestVersions[baseName] && version < latestVersions[baseName].version) {
44
- try {
45
- fs.unlinkSync(filePath);
46
- console.log(`🗑️ Removed outdated file: ${filePath}`);
47
- } catch (error) {
48
- console.warn(`⚠️ Failed to remove ${filePath}: ${error.message}`);
49
- }
50
- }
51
- });
52
- */
53
-
54
-
55
36
 
56
37
  // Define file prefixes to delete
57
38
  const filePrefixes = ["add-splash-screen", "setSplashAnimation", "codeplayBeforeBuild"];
58
39
 
59
40
  // Step 1: Find all matching files in the project directory
60
- const filesInProject = fs.readdirSync(projectRoot)
41
+ const filesInProject1 = fs.readdirSync(projectRoot)
61
42
  .filter(file => filePrefixes.some(prefix => file.startsWith(prefix)));
62
43
 
63
- filesInProject.forEach(file => {
44
+ filesInProject1.forEach(file => {
64
45
  const filePath = path.join(projectRoot, file);
65
46
  try {
66
47
  fs.unlinkSync(filePath);
@@ -74,7 +55,7 @@ filesInProject.forEach(file => {
74
55
 
75
56
 
76
57
 
77
- // Step 4: Remove files listed in commonBuildPath
58
+ // Remove files listed in commonBuildPath
78
59
  if (fs.existsSync(commonBuildPath)) {
79
60
  fs.readdirSync(commonBuildPath).forEach(file => {
80
61
  const destPath = path.join(projectRoot, file);