import { Result } from './result'; import { AppConfig, AppConfigErrorInfo } from './config_app'; import { RemoteConfig, RemoteConfigErrorInfo } from './config_remote'; import { UserConfig } from './config_user'; import { System } from './system'; import { UserError } from './error_utils'; export declare enum SystemConfigErrorName { SYSTEM_CONFIG_INVALID_REMOTE_NAME = "systemConfigInvalidRemoteName", SYSTEM_CONFIG_APP_DIRECTORY_NOT_FOUND = "systemConfigAppDirectoryNotFound" } export interface SystemConfigInvalidRemoteNameError { type: SystemConfigErrorName.SYSTEM_CONFIG_INVALID_REMOTE_NAME; name: string; } export interface SystemConfigAppDirectoryNotFoundError { type: SystemConfigErrorName.SYSTEM_CONFIG_APP_DIRECTORY_NOT_FOUND; } export type SystemConfigErrorInfo = SystemConfigInvalidRemoteNameError | SystemConfigAppDirectoryNotFoundError; export declare function findGlobalUserConfigAsync(sys: System): Promise; export declare function findAppDirectoryAsync(sys: System, dirpath: string): Promise; /** * Find the AppConfig file in the App's root directory. * * @param sys Host system to search * @param workingdir Directory to start search from */ export declare function findAppConfigAsync(sys: System, workingdir?: string): Promise; export declare function findRemoteConfigPathByNameAsync(sys: System, workingdir?: string, remoteName?: string): Promise; export declare function findAppDirectoryUserConfigAsync(sys: System, workingdir?: string): Promise; export declare function readAppConfigAsync(sys: System, appConfigPath: string): Promise>>; export declare function readRemoteConfigAsync(sys: System, remotePath: string): Promise>>; export declare function readGlobalUserConfigAsync(sys: System): Promise>; export declare function readAppDirectoryUserConfigAsync(sys: System): Promise>; export declare function writeGlobalUserConfigAsync(sys: System, config: UserConfig): Promise; export declare function writeAppDirectoryUserConfigAsync(sys: System, config: UserConfig): Promise; export declare function writeRemoteConfigAsync(sys: System, configPath: string, config: RemoteConfig): Promise; export declare function validateRemoteName(name: string): Result;