1 | import { Lazy } from "lazy-val";
|
2 | export interface ReadConfigResult<T> {
|
3 | readonly result: T;
|
4 | readonly configFile: string | null;
|
5 | }
|
6 | export declare function findAndReadConfig<T>(request: ReadConfigRequest): Promise<ReadConfigResult<T> | null>;
|
7 | export declare function orNullIfFileNotExist<T>(promise: Promise<T>): Promise<T | null>;
|
8 | export declare function orIfFileNotExist<T>(promise: Promise<T>, fallbackValue: T): Promise<T>;
|
9 | export interface ReadConfigRequest {
|
10 | packageKey: string;
|
11 | configFilename: string;
|
12 | projectDir: string;
|
13 | packageMetadata: Lazy<{
|
14 | [key: string]: any;
|
15 | } | null> | null;
|
16 | }
|
17 | export declare function loadConfig<T>(request: ReadConfigRequest): Promise<ReadConfigResult<T> | null>;
|
18 | export declare function getConfig<T>(request: ReadConfigRequest, configPath?: string | null): Promise<ReadConfigResult<T> | null>;
|
19 | export declare function loadParentConfig<T>(request: ReadConfigRequest, spec: string): Promise<ReadConfigResult<T>>;
|
20 | export declare function loadEnv(envFile: string): Promise<import("dotenv").DotenvParseOutput | null>;
|