chore: remove legacy SSR checks and consolidate migration maintenance

This commit is contained in:
maoyingjie
2026-10-26 10:32:22 +08:00
parent 52a0bef851
commit 60af6ee40b
169 changed files with 958 additions and 8422 deletions
+12 -2
View File
@@ -8,8 +8,18 @@ const git = (...args) =>
encoding: "utf8",
stdio: ["ignore", "pipe", "pipe"],
}).trim();
const tasks = JSON.parse(
fs.readFileSync(path.join(root, "docs/tasks/tasks.json"), "utf8"),
// Task metadata lives only in each card's JSON metadata comment.
const tasks = Object.fromEntries(
fs
.readdirSync(path.join(root, "docs/tasks"))
.filter((name) => name.endsWith(".md"))
.flatMap((name) => {
const text = fs.readFileSync(path.join(root, "docs/tasks", name), "utf8");
const match = text.match(
/^<!-- task-metadata\r?\n(\{[\s\S]*?\})\r?\n-->/,
);
return match ? [[name.slice(0, -3), JSON.parse(match[1])]] : [];
}),
);
const id = process.argv[2];
if (!id || !Object.hasOwn(tasks, id)) {