UNPKG

771 BPlain TextView Raw
1
2import { loadTemplatizedYaml } from './renderer';
3
4
5
6// --------- Public Types --------- //
7export interface RawVdevConfig {
8 system: string;
9 baseBlockDir: string;
10 k8sDir: string;
11 realms: { [name: string]: any };
12 blocks: (string | any)[];
13
14 versionFiles: string[];
15}
16// --------- /Public Types --------- //
17
18
19// --------- Public Loaders --------- //
20export async function loadVersionFiles() {
21 const rawConfig = await loadVdevConfig();
22 return rawConfig.versionFiles || [];
23}
24
25/** Parse the ./vdev.yaml and return as is */
26export async function loadVdevConfig(): Promise<RawVdevConfig> {
27 const conf = await loadTemplatizedYaml('./vdev.yaml');
28 // TODO: probably need to do some checks here.
29 return conf as RawVdevConfig;
30}
31// --------- /Public Loaders --------- //
\No newline at end of file