mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:10:45 +00:00
refactor: compact generated protocol metadata
This commit is contained in:
@@ -20,7 +20,11 @@ try {
|
||||
|
||||
for (const schema of selectedCodexAppServerJsonSchemas) {
|
||||
await fs.mkdir(path.dirname(path.join(targetRoot, "json", schema)), { recursive: true });
|
||||
await fs.copyFile(path.join(source.jsonRoot, schema), path.join(targetRoot, "json", schema));
|
||||
const schemaSource = await fs.readFile(path.join(source.jsonRoot, schema), "utf8");
|
||||
await fs.writeFile(
|
||||
path.join(targetRoot, "json", schema),
|
||||
`${JSON.stringify(JSON.parse(schemaSource))}\n`,
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
await source.cleanup();
|
||||
|
||||
Reference in New Issue
Block a user