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.
- package/cli/commands/update.ts +27 -7
- package/package.json +1 -1
package/cli/commands/update.ts
CHANGED
|
@@ -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
|
|
92
|
-
//
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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']) {
|