vibe-design-system 2.8.46 → 2.8.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
CHANGED
|
@@ -3016,8 +3016,9 @@ function main() {
|
|
|
3016
3016
|
// ignore
|
|
3017
3017
|
}
|
|
3018
3018
|
|
|
3019
|
-
// Clear existing .stories.* files only on full regeneration (no filter arg),
|
|
3019
|
+
// Clear existing AUTO-GENERATED .stories.* files only on full regeneration (no filter arg),
|
|
3020
3020
|
// so that "node story-generator.mjs SomeName" doesn't wipe other stories.
|
|
3021
|
+
// Files WITHOUT @vds-regenerate tag are considered manually curated and are NEVER deleted.
|
|
3021
3022
|
if (!onlyName) {
|
|
3022
3023
|
try {
|
|
3023
3024
|
const existing = fs.readdirSync(STORIES_DIR);
|
|
@@ -3029,7 +3030,18 @@ function main() {
|
|
|
3029
3030
|
name.endsWith(".stories.jsx") ||
|
|
3030
3031
|
name.endsWith(".stories.js")
|
|
3031
3032
|
) {
|
|
3032
|
-
|
|
3033
|
+
const filePath = path.join(STORIES_DIR, name);
|
|
3034
|
+
try {
|
|
3035
|
+
const firstLine = fs.readFileSync(filePath, "utf-8").split("\n")[0] || "";
|
|
3036
|
+
if (!firstLine.includes("@vds-regenerate")) {
|
|
3037
|
+
// Manually curated story — do NOT delete
|
|
3038
|
+
continue;
|
|
3039
|
+
}
|
|
3040
|
+
} catch {
|
|
3041
|
+
// If we can't read it, don't delete it
|
|
3042
|
+
continue;
|
|
3043
|
+
}
|
|
3044
|
+
fs.unlinkSync(filePath);
|
|
3033
3045
|
}
|
|
3034
3046
|
}
|
|
3035
3047
|
} catch {
|