UNPKG

myst-cli

Version:
45 lines 2.01 kB
import type { ProjectConfig, SiteConfig } from 'myst-config'; import { VFile } from 'vfile'; import type { ISession } from './session/types.js'; export declare function defaultConfigFile(session: ISession, path: string): string; export declare function configFromPath(session: ISession, path: string): string | undefined; /** * Mutate config object to coerce deprecated frontmatter fields to valid schema */ export declare function handleDeprecatedFields(conf: { site?: Record<string, any>; project?: Record<string, any>; }, file: string, vfile: VFile): void; /** * Load site/project config from local path to redux store * * Errors if config file does not exist or if config file exists but is invalid. */ export declare function loadConfig(session: ISession, path: string, opts?: { reloadProject?: boolean; }): Promise<import("./store/types.js").ValidatedRawConfig | { site: SiteConfig | undefined; project: ProjectConfig | undefined; extend: string[] | undefined; } | undefined>; export declare function resolveToAbsolute(session: ISession, basePath: string, relativePath: string, opts?: { allowNotExist?: boolean; allowRemote?: boolean; }): Promise<string>; /** * Write site config and config to path, if available * * If newConfigs are provided, the redux store will be updated with these * configs before writing. * * If a config file exists on the path, this will override the * site portion of the config and leave the rest. */ export declare function writeConfigs(session: ISession, path: string, newConfigs?: { siteConfig?: Record<string, any>; projectConfig?: Record<string, any>; }): Promise<void>; export declare function findCurrentProjectAndLoad(session: ISession, path: string): Promise<string | undefined>; export declare function findCurrentSiteAndLoad(session: ISession, path: string): Promise<string | undefined>; export declare function reloadAllConfigsForCurrentSite(session: ISession): Promise<void>; //# sourceMappingURL=config.d.ts.map