mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
refactor: compact generated protocol metadata
This commit is contained in:
@@ -160,12 +160,16 @@ async function compareGeneratedProtocolMirror(
|
||||
failures.push(`protocol-generated/json/${schema}: missing local schema (${String(error)})`);
|
||||
continue;
|
||||
}
|
||||
if (source !== target) {
|
||||
if (normalizeJsonSchema(source) !== normalizeJsonSchema(target)) {
|
||||
failures.push(`protocol-generated/json/${schema}: differs from source schema`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function normalizeJsonSchema(source: string): string {
|
||||
return JSON.stringify(JSON.parse(source));
|
||||
}
|
||||
|
||||
async function listFiles(root: string, suffix: string): Promise<string[]> {
|
||||
const files: string[] = [];
|
||||
async function visit(dir: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user