Skip to content

Commit e6fddba

Browse files
committed
feat: add package.json and package-lock.json for dependency management
- Introduced package.json to define development dependencies for the project, including `oxfmt` and `oxlint`. - Added package-lock.json to lock the versions of dependencies, ensuring consistent installations across environments. - Updated sync-readme-tools.mjs to enhance error handling for missing tools table in README.md.
1 parent 5572e3e commit e6fddba

3 files changed

Lines changed: 827 additions & 0 deletions

File tree

mcp-server/scripts/sync-readme-tools.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,17 @@ const table = [header, separator, ...rows].join("\n");
8686
// ── Splice the table into README.md ─────────────────────────────
8787
const readme = readFileSync(readmePath, "utf-8");
8888
const tableStart = readme.indexOf("| Tool");
89+
90+
if (tableStart === -1) {
91+
const msg = 'Cannot find tools table anchor ("| Tool") in README.md';
92+
if (checkOnly) {
93+
console.error(`${msg} — cannot verify table freshness.`);
94+
} else {
95+
console.error(`${msg} — cannot update.`);
96+
}
97+
process.exit(1);
98+
}
99+
89100
const tableEndMarker = readme.indexOf("\n\n", tableStart);
90101
const tableEnd = tableEndMarker === -1 ? readme.length : tableEndMarker;
91102

0 commit comments

Comments
 (0)