codeplay-common 1.0.47 → 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 +1 -1
- package/scripts/uninstall.js +25 -0
package/package.json
CHANGED
package/scripts/uninstall.js
CHANGED
|
@@ -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)) {
|