import type { EnvironmentConfiguration } from "../../config/types.js"; import type { Recipe } from "../schema/recipe.js"; /** * Environment-language resolution for the compiler's `availableLanguages` * input. * * `availableLanguages` is a COMPILE-time input: dictionary translations and * `__Standard Values` locale-map defaults are EMITTED (or skipped) based on * it, so `recipe push` and `recipe compile` MUST resolve it identically — * otherwise a precompiled artifact (`push --from-compiled`) would carry a * different localized surface than a per-invocation compiling push. This * module is the single source of that resolution, shared by both tasks. */ /** * Case-insensitive `--languages` scope match: a scope entry matches its * exact code (`fr-FR`) and, for bare base-language entries, every regional * variant (`fr` matches `fr-FR` / `fr-CA`) — mirroring the compiler's own * base-language expansion for `__Standard Values` locale maps. */ export declare const languageScopeMatches: (scope: readonly string[], code: string) => boolean; /** * True when a component-/content-template recipe authors any per-locale * `__Standard Values` default — a field or param whose `default` (or * `sitecore.defaultValue`) is a `{ en, de, … }` locale map rather than a * plain string. * * Such a recipe needs the environment's registered languages resolved for * the SAME reason a dictionary does: the compiler fans a bare base-language * key (`ar`) out to the tenant's registered regional variants (`ar-AE`, * `ar-SA`) only when `availableLanguages` is known. Without it, the * standalone-compile branch emits each key verbatim — so `ar` lands on the * bare `ar` version, a language the site never renders, instead of the * regional `ar-AE` it actually uses. Gating language resolution on * dictionaries alone left a component-only push (no dictionary in the set) * writing localized SV to the wrong language. */ export declare const recipeHasLocaleMapDefaults: (recipe: Recipe) => boolean; export declare const resolveScopedLanguages: (recipes: readonly Recipe[], environment: EnvironmentConfiguration, languagesOption: readonly string[] | undefined, provisionLanguages?: boolean) => Promise;