1082815dcSEvan Baconimport { ExportedConfig, Mod, ModPlatform } from '../Plugin.types';
29b26454eSBartosz Kaszubowskiexport type BaseModOptions = {
3*edc75823SEvan Bacon    /** Officially supports `'ios' | 'android'` (`ModPlatform`). Arbitrary strings are supported for adding out-of-tree platforms. */
4*edc75823SEvan Bacon    platform: ModPlatform & string;
5082815dcSEvan Bacon    mod: string;
6082815dcSEvan Bacon    isProvider?: boolean;
7082815dcSEvan Bacon    skipEmptyMod?: boolean;
8082815dcSEvan Bacon    saveToInternal?: boolean;
9082815dcSEvan Bacon    /**
10082815dcSEvan Bacon     * If the mod supports introspection, and avoids making any filesystem modifications during compilation.
11082815dcSEvan Bacon     * By enabling, this mod, and all of its descendants will be run in introspection mode.
12082815dcSEvan Bacon     * This should only be used for static files like JSON or XML, and not for application files that require regexes,
13082815dcSEvan Bacon     * or complex static files that require other files to be generated like Xcode `.pbxproj`.
14082815dcSEvan Bacon     */
15082815dcSEvan Bacon    isIntrospective?: boolean;
16082815dcSEvan Bacon};
17082815dcSEvan Bacon/**
18082815dcSEvan Bacon * Plugin to intercept execution of a given `mod` with the given `action`.
19082815dcSEvan Bacon * If an action was already set on the given `config` config for `mod`, then it
20082815dcSEvan Bacon * will be provided to the `action` as `nextMod` when it's evaluated, otherwise
21082815dcSEvan Bacon * `nextMod` will be an identity function.
22082815dcSEvan Bacon *
23082815dcSEvan Bacon * @param config exported config
24082815dcSEvan Bacon * @param platform platform to target (ios or android)
25082815dcSEvan Bacon * @param mod name of the platform function to intercept
26082815dcSEvan Bacon * @param skipEmptyMod should skip running the action if there is no existing mod to intercept
27082815dcSEvan Bacon * @param saveToInternal should save the results to `_internal.modResults`, only enable this when the results are pure JSON.
28082815dcSEvan Bacon * @param isProvider should provide data up to the other mods.
29082815dcSEvan Bacon * @param action method to run on the mod when the config is compiled
30082815dcSEvan Bacon */
31082815dcSEvan Baconexport declare function withBaseMod<T>(config: ExportedConfig, { platform, mod, action, skipEmptyMod, isProvider, isIntrospective, saveToInternal, }: BaseModOptions & {
32082815dcSEvan Bacon    action: Mod<T>;
33082815dcSEvan Bacon}): ExportedConfig;
34082815dcSEvan Bacon/**
35082815dcSEvan Bacon * Plugin to extend a mod function in the plugins config.
36082815dcSEvan Bacon *
37082815dcSEvan Bacon * @param config exported config
38082815dcSEvan Bacon * @param platform platform to target (ios or android)
39082815dcSEvan Bacon * @param mod name of the platform function to extend
40082815dcSEvan Bacon * @param action method to run on the mod when the config is compiled
41082815dcSEvan Bacon */
42082815dcSEvan Baconexport declare function withMod<T>(config: ExportedConfig, { platform, mod, action, }: {
43082815dcSEvan Bacon    platform: ModPlatform;
44082815dcSEvan Bacon    mod: string;
45082815dcSEvan Bacon    action: Mod<T>;
46082815dcSEvan Bacon}): ExportedConfig;
47