(schema)
| 854 | // The shared sections with every vendor section folded in: what the validators check, since |
| 855 | // vendor refs resolve into the shared types and vendor messages need the same guarantees. |
| 856 | function withVendor(schema) { |
| 857 | const sections = Object.values(schema.vendor ?? {}) |
| 858 | return { |
| 859 | ...schema, |
| 860 | commands: [...schema.commands, ...sections.flatMap((s) => s.commands ?? [])], |
| 861 | events: [...schema.events, ...sections.flatMap((s) => s.events ?? [])], |
| 862 | types: Object.assign({}, schema.types, ...sections.map((s) => s.types ?? {})), |
| 863 | } |
| 864 | } |
| 865 | |
| 866 | /** |
| 867 | * Fail-closed validation: every type reference resolves, and no type projects to |
no test coverage detected