fix: prefer explicit hook mappings
This commit is contained in:
@@ -114,11 +114,11 @@ export function resolveHookMappings(
|
|||||||
): HookMappingResolved[] {
|
): HookMappingResolved[] {
|
||||||
const presets = hooks?.presets ?? [];
|
const presets = hooks?.presets ?? [];
|
||||||
const mappings: HookMappingConfig[] = [];
|
const mappings: HookMappingConfig[] = [];
|
||||||
|
if (hooks?.mappings) mappings.push(...hooks.mappings);
|
||||||
for (const preset of presets) {
|
for (const preset of presets) {
|
||||||
const presetMappings = hookPresetMappings[preset];
|
const presetMappings = hookPresetMappings[preset];
|
||||||
if (presetMappings) mappings.push(...presetMappings);
|
if (presetMappings) mappings.push(...presetMappings);
|
||||||
}
|
}
|
||||||
if (hooks?.mappings) mappings.push(...hooks.mappings);
|
|
||||||
if (mappings.length === 0) return [];
|
if (mappings.length === 0) return [];
|
||||||
|
|
||||||
const configDir = path.dirname(CONFIG_PATH_CLAWDIS);
|
const configDir = path.dirname(CONFIG_PATH_CLAWDIS);
|
||||||
|
|||||||
Reference in New Issue
Block a user