MCPcopy
hub / github.com/MiniMax-AI/cli / buildSchema

Function buildSchema

src/args.ts:27–39  ·  view source on GitHub ↗
(options: OptionDef[])

Source from the content-addressed store, hash-verified

25}
26
27function buildSchema(options: OptionDef[]): FlagSchema {
28 const booleans = new Set<string>();
29 const numbers = new Set<string>();
30 const arrays = new Set<string>();
31 for (const opt of options) {
32 const key = flagKey(opt);
33 if (!key) continue;
34 if (isBooleanDef(opt)) booleans.add(key);
35 else if (opt.type === 'number') numbers.add(key);
36 else if (opt.type === 'array') arrays.add(key);
37 }
38 return { booleans, numbers, arrays };
39}
40
41/**
42 * Quick scan: collect positional (non-dash) args to determine the command path.

Callers 2

scanCommandPathFunction · 0.85
parseFlagsFunction · 0.85

Calls 2

flagKeyFunction · 0.85
isBooleanDefFunction · 0.85

Tested by

no test coverage detected