@starship-ci/generator
Version:
Kubernetes manifest generator for Starship deployments
104 lines (103 loc) • 3.22 kB
TypeScript
import { Chain, Exposer, FaucetConfig, Relayer, Script, StarshipConfig } from '@starship-ci/types';
import { DefaultsConfig } from './types';
/**
* Deep merge utility for nested objects
*/
export declare function deepMerge(target: any, source: any): any;
export declare class DefaultsManager {
private defaultsData;
private defaultsPath;
private config;
constructor(defaultsPath?: string);
/**
* Load defaults from the YAML file
*/
private loadDefaults;
/**
* Get chain defaults for a specific chain name
*/
getChainDefaults(chainName: string): Chain | undefined;
/**
* Get faucet defaults for a specific faucet type
*/
getFaucetDefaults(faucetType: string): FaucetConfig | undefined;
/**
* Get default scripts
*/
getDefaultScripts(): Record<string, Script>;
/**
* Get default relayers
*/
getDefaultRelayers(): Record<string, any>;
/**
* Get default relayer configuration for a specific type
*/
getRelayerDefaults(relayerType: string): any;
/**
* Get default cometmock configuration
*/
getDefaultCometmock(): any;
/**
* Process explorer configuration by merging with defaults
*/
processExplorer(explorerConfig?: any): any;
/**
* Process registry configuration by merging with defaults
*/
processRegistry(registryConfig?: any): any;
/**
* Process faucet configuration by merging with defaults
*/
processFaucet(faucetConfig?: any): any;
/**
* Process monitoring configuration by merging with defaults
*/
processMonitoring(monitoringConfig?: any): any;
/**
* Process ingress configuration by merging with defaults
*/
processIngress(ingressConfig?: any): any;
/**
* Process exposer configuration by merging with defaults
*/
processExposer(exposerConfig?: Exposer): Exposer;
/**
* Process images configuration by merging with defaults
*/
processImages(imagesConfig?: any): any;
/**
* Process resources configuration by merging with defaults
*/
processResources(resourcesConfig?: any): any;
/**
* Process timeouts configuration by merging with defaults
*/
processTimeouts(timeoutsConfig?: any): any;
/**
* Process a relayer configuration by merging with defaults
* This handles partial overrides properly using deep merge
*/
processRelayer(relayerConfig: Relayer): Relayer;
/**
* Process a chain configuration by merging with defaults
* This replaces the complex _chains.tpl logic
*/
processChain(chainConfig: Chain): Chain;
/**
* Get all available chain types from defaults
*/
getAvailableChainTypes(): string[];
/**
* Check if a chain type is supported
*/
isChainTypeSupported(chainName: string): boolean;
/**
* Get all defaults data (for debugging or advanced usage)
*/
getAllDefaults(): DefaultsConfig;
}
/**
* Apply defaults to a StarshipConfig
* This is a standalone function that processes all chains, relayers, and global configs
*/
export declare function applyDefaults(config: StarshipConfig): StarshipConfig;