create-bw-app 0.24.1 → 0.24.2
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/src/upgrade.mjs +8 -5
package/package.json
CHANGED
package/src/upgrade.mjs
CHANGED
|
@@ -62,14 +62,17 @@ export async function upgradeBrightwebApp(moduleKey, argvOptions = {}, runtimeOp
|
|
|
62
62
|
for (const [key, entry] of Object.entries(appManifest.modules)) {
|
|
63
63
|
if (catalog[key]?.packageRoot) entry.version = catalog[key].version;
|
|
64
64
|
}
|
|
65
|
-
for (const write of plan.fileWrites
|
|
65
|
+
for (const write of plan.fileWrites) {
|
|
66
66
|
const relativePath = write.relativePath;
|
|
67
|
+
const existingRecord = appManifest.scaffoldFiles[relativePath];
|
|
68
|
+
if (!existingRecord && write.type !== "starter") continue;
|
|
67
69
|
const targetPath = resolveSafeRelativePath(targetDir, relativePath, "Manifest scaffold file path");
|
|
68
|
-
if (protectedPaths.has(relativePath)
|
|
70
|
+
if (write.type === "starter" && protectedPaths.has(relativePath)) continue;
|
|
71
|
+
if (!(await pathExists(targetPath))) continue;
|
|
69
72
|
const hash = await hashFile(targetPath);
|
|
70
|
-
if (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
if (existingRecord) {
|
|
74
|
+
existingRecord.hash = hash;
|
|
75
|
+
existingRecord.status = "current";
|
|
73
76
|
} else {
|
|
74
77
|
appManifest.scaffoldFiles[relativePath] = {
|
|
75
78
|
module: write.moduleKey || "platform-base",
|