fluxy-bot 0.10.18 → 0.10.19

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.
@@ -88,13 +88,33 @@ export function registerUpdateCommand(program: Command) {
88
88
  fs.cpSync(wsSrc, path.join(DATA_DIR, 'workspace'), { recursive: true });
89
89
  }
90
90
 
91
- // Always update index.html contains splash screen, SW registration,
92
- // and meta tags that ship with each version. Safe to overwrite since
93
- // users don't edit this file (their code lives in src/ and backend/).
94
- const indexSrc = path.join(extracted, 'workspace', 'client', 'index.html');
95
- const indexDst = path.join(DATA_DIR, 'workspace', 'client', 'index.html');
96
- if (fs.existsSync(indexSrc)) {
97
- fs.cpSync(indexSrc, indexDst, { force: true });
91
+ // Always update framework files that ship with each version.
92
+ // These are not user-editable user code lives in src/components/, src/pages/, backend/, etc.
93
+ const frameworkFiles = [
94
+ 'workspace/client/index.html', // splash screen, SW registration, meta tags
95
+ 'workspace/client/src/main.tsx', // React entry point, app-ready signal
96
+ ];
97
+ for (const rel of frameworkFiles) {
98
+ const src = path.join(extracted, rel);
99
+ const dst = path.join(DATA_DIR, rel);
100
+ if (fs.existsSync(src)) {
101
+ fs.cpSync(src, dst, { force: true });
102
+ }
103
+ }
104
+
105
+ // Always update public assets that ship with the framework (animation spritesheet, icons).
106
+ // Only copy specific files — never overwrite user-added public assets.
107
+ const frameworkAssets = [
108
+ 'spritesheet.webp',
109
+ ];
110
+ const publicSrc = path.join(extracted, 'workspace', 'client', 'public');
111
+ const publicDst = path.join(DATA_DIR, 'workspace', 'client', 'public');
112
+ for (const asset of frameworkAssets) {
113
+ const src = path.join(publicSrc, asset);
114
+ const dst = path.join(publicDst, asset);
115
+ if (fs.existsSync(src)) {
116
+ fs.cpSync(src, dst, { force: true });
117
+ }
98
118
  }
99
119
 
100
120
  for (const file of ['package.json', 'vite.config.ts', 'vite.fluxy.config.ts', 'tsconfig.json', 'postcss.config.js', 'components.json']) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxy-bot",
3
- "version": "0.10.18",
3
+ "version": "0.10.19",
4
4
  "releaseNotes": [
5
5
  "Adding a way for users to claim their fluxies on the fluxy.bot dashboard",
6
6
  "2. ",