@storm-software/config-tools
Version:
A package containing various utilities to support custom workspace configurations and environment management for Storm Software projects, including configuration file handling, environment variable management, and logging utilities.
45 lines (42 loc) • 1.7 kB
TypeScript
import { StormWorkspaceConfig } from '@storm-software/config/types';
/**
* Get the config for the current Storm workspace
*
* @param workspaceRoot - The root directory of the workspace
* @param skipLogs - Skip writing logs to the console
* @returns The config for the current Storm workspace
*/
declare function getConfig(workspaceRoot?: string, skipLogs?: boolean): Promise<StormWorkspaceConfig>;
type GetWorkspaceConfigOptions = {
/**
* The root directory of the workspace
*/
workspaceRoot?: string;
/**
* A directory inside the monorepo to start searching from
*/
cwd?: string;
/**
* Use the default config if no config file is found
*
* @defaultValue true
*/
useDefault?: boolean;
};
/**
* Get the config for the current Storm workspace
*
* @param skipLogs - Skip writing logs to the console
* @param options - Options for getting the workspace config
* @returns The config for the current Storm workspace, or throws an error if the config file could not be loaded
*/
declare function getWorkspaceConfig(skipLogs?: boolean, options?: GetWorkspaceConfigOptions): Promise<StormWorkspaceConfig>;
/**
* Try to get the config for the current Storm workspace
*
* @param skipLogs - Skip writing logs to the console
* @param options - Options for getting the workspace config
* @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
*/
declare function tryGetWorkspaceConfig(skipLogs?: boolean, options?: GetWorkspaceConfigOptions): Promise<StormWorkspaceConfig | undefined>;
export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig };