MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / isMergeableConfig

Function isMergeableConfig

src/config/loader.ts:77–79  ·  view source on GitHub ↗

* A config file must parse to a plain object to be mergeable. A YAML file that * is syntactically valid but collapses to a scalar (`42`, `just a string`) or a * top-level array (`- a\n- b`) would otherwise be handed to deepMerge, whose * "type mismatch → override wins" rule replaces the ENTIRE co

(parsed: unknown)

Source from the content-addressed store, hash-verified

75 * We reject those here instead of clobbering.
76 */
77function isMergeableConfig(parsed: unknown): parsed is Partial<QodexConfig> {
78 return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed);
79}
80
81export async function loadConfig(cwd: string = process.cwd()): Promise<QodexConfig> {
82 await ensureQodexHome();

Callers 1

loadConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected