mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
Summary: - Use Node's pathToFileURL for the base-config schema generator entrypoint guard so Windows backslash paths are recognized correctly. - Keep the schema generation logic unchanged and preserve the current changelog attribution. Verification: - node --import tsx scripts/generate-base-config-schema.ts --check - pnpm build - pnpm check - GitHub CI passed, including Real behavior proof, auto-response, ClawSweeper dispatch, and full repository checks. Co-authored-by: Fusion future <23738961+easyteacher@users.noreply.github.com>
24 lines
714 B
JavaScript
24 lines
714 B
JavaScript
#!/usr/bin/env node
|
|
import { pathToFileURL } from "node:url";
|
|
import { computeBaseConfigSchemaResponse } from "../src/config/schema-base.js";
|
|
|
|
export function checkBaseConfigSchema(): void {
|
|
computeBaseConfigSchemaResponse({
|
|
generatedAt: "2026-05-05T00:00:00.000Z",
|
|
});
|
|
}
|
|
|
|
const args = new Set(process.argv.slice(2));
|
|
if (args.has("--check") && args.has("--write")) {
|
|
throw new Error("Use either --check or --write, not both.");
|
|
}
|
|
|
|
if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) {
|
|
checkBaseConfigSchema();
|
|
if (args.has("--write")) {
|
|
console.log("[base-config-schema] runtime-computed; no generated file to write");
|
|
} else {
|
|
console.log("[base-config-schema] ok");
|
|
}
|
|
}
|