1 |
|
2 | import { loadTemplatizedYaml } from './renderer';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | export 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 |
|
17 |
|
18 |
|
19 |
|
20 | export async function loadVersionFiles() {
|
21 | const rawConfig = await loadVdevConfig();
|
22 | return rawConfig.versionFiles || [];
|
23 | }
|
24 |
|
25 |
|
26 | export async function loadVdevConfig(): Promise<RawVdevConfig> {
|
27 | const conf = await loadTemplatizedYaml('./vdev.yaml');
|
28 |
|
29 | return conf as RawVdevConfig;
|
30 | }
|
31 |
|
\ | No newline at end of file |