Bun Spawn -> node child process in tools and seed versioning

This commit is contained in:
2026-02-25 02:15:54 +00:00
parent 21fde3d989
commit f2da4c0300
8 changed files with 107 additions and 74 deletions
+10
View File
@@ -0,0 +1,10 @@
/**
* Extract the `version` field from YAML frontmatter.
* Returns 0 if no version is found.
*/
export function parseSeedVersion(content: string): number {
const match = content.match(/^---\n([\s\S]*?)\n---/);
if (!match) return 0;
const versionMatch = match[1]!.match(/^version:\s*(\d+)/m);
return versionMatch ? parseInt(versionMatch[1]!, 10) : 0;
}