MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / buildSchema

Method buildSchema

packages/hydrooj/src/loader.ts:99–105  ·  view source on GitHub ↗
(schema: Schema<any>, scope?: string)

Source from the content-addressed store, hash-verified

97 }
98
99 buildSchema(schema: Schema<any>, scope?: string) {
100 if (!scope) return schema;
101 const cache = this.schemaCache.get(schema) || {};
102 cache[scope] ||= Schema.object({ [scope]: schema });
103 this.schemaCache.set(schema, cache);
104 return cache[scope];
105 }
106
107 async resolveConfig(plugin: any, configScope: string, dynamic = true) {
108 const schema = plugin['Config'] || plugin['schema'];

Callers 1

resolveConfigMethod · 0.95

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected