1 const YAML
= require("yaml");
3 globalThis
.YAML_SILENCE_WARNINGS
= true;
4 globalThis
.YAML_SILENCE_DEPRECATION_WARNINGS
= true;
6 function configYAMLAdapter(configString
) {
7 const parsedConfig
= YAML
.parse(configString
);
8 if (parsedConfig
=== null) return {};
9 const config
= Object
.assign({}, parsedConfig
.global
);
10 if (parsedConfig
.hosts
) config
.configVHost
= parsedConfig
.hosts
;
11 else delete config
.configVHost
;
15 module
.exports
= configYAMLAdapter
;