codeplay-common 1.1.58 → 1.1.61

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.1.58",
3
+ "version": "1.1.61",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js"
@@ -34,7 +34,7 @@ function getLatestFile(prefix) {
34
34
  return files[0];
35
35
  }
36
36
 
37
- // List of file prefixes
37
+ // List of file prefixes to be copied to buildCodeplay
38
38
  const filePrefixes = [
39
39
  "add-splash-screen-",
40
40
  "codeplayBeforeBuild-",
@@ -42,6 +42,8 @@ const filePrefixes = [
42
42
  "setSplashAnimation-"
43
43
  ];
44
44
 
45
+ const copiedFiles = new Set();
46
+
45
47
  // Copy required files to buildCodeplay
46
48
  filePrefixes.forEach(prefix => {
47
49
  const latestFile = getLatestFile(prefix);
@@ -51,6 +53,7 @@ filePrefixes.forEach(prefix => {
51
53
  try {
52
54
  fs.copyFileSync(sourcePath, destPath);
53
55
  process.stdout.write(`✅ Copied file: ${latestFile} -> ${destPath}\n`);
56
+ copiedFiles.add(latestFile);
54
57
  } catch (error) {
55
58
  process.stderr.write(`⚠️ Failed to copy file: ${latestFile} - ${error.message}\n`);
56
59
  }
@@ -62,8 +65,28 @@ const splashXmlSource = path.join(commonBuildPath, "splashxml");
62
65
  const splashXmlDest = path.join(buildCodeplayPath, "splashxml");
63
66
  if (fs.existsSync(splashXmlSource)) {
64
67
  copyFolderSync(splashXmlSource, splashXmlDest);
68
+ copiedFiles.add("splashxml");
65
69
  }
66
70
 
71
+ // Copy remaining files to the project root
72
+ fs.readdirSync(commonBuildPath).forEach(file => {
73
+ const sourcePath = path.join(commonBuildPath, file);
74
+ const destPath = path.join(projectRoot, file);
75
+
76
+ if (!copiedFiles.has(file)) {
77
+ if (fs.statSync(sourcePath).isDirectory()) {
78
+ copyFolderSync(sourcePath, destPath);
79
+ } else {
80
+ try {
81
+ fs.copyFileSync(sourcePath, destPath);
82
+ process.stdout.write(`✅ Copied file: ${file} -> ${destPath}\n`);
83
+ } catch (error) {
84
+ process.stderr.write(`⚠️ Failed to copy file: ${file} - ${error.message}\n`);
85
+ }
86
+ }
87
+ }
88
+ });
89
+
67
90
  // Update package.json
68
91
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
69
92
  packageJson.scripts = packageJson.scripts || {};