fix(cli): recognize branch-specific settings and encryption_key files

Extends the getTypeStrFromPath function to recognize branch-specific
variants of settings.yaml and encryption_key.yaml (e.g., settings.main.yaml,
encryption_key.dev.yaml). Previously, only base filenames were recognized,
causing branch-specific files to throw "Could not infer type of path" errors.

This follows the same fix pattern applied to folder.meta files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-01-20 19:11:20 +00:00
parent 5f4b4eb845
commit ebe65a8817

View File

@@ -293,6 +293,14 @@ export function getTypeStrFromPath(
if (parsed.name === "folder.meta" || /^folder\.[^.]+\.meta$/.test(parsed.name)) {
return "folder";
}
// Match settings (base) or settings.<branch> (branch-specific)
if (parsed.name === "settings" || /^settings\.[^.]+$/.test(parsed.name)) {
return "settings";
}
// Match encryption_key (base) or encryption_key.<branch> (branch-specific)
if (parsed.name === "encryption_key" || /^encryption_key\.[^.]+$/.test(parsed.name)) {
return "encryption_key";
}
const typeEnding = parsed.name.split(".").at(-1);
if (