import { load , FAILSAFE_SCHEMA , Type } from "js-yaml" ; export function loadConfigYaml ( configYaml ) { return load ( configYaml , { schema } ) as Record < string , unknown > ; } export const schema = FAILSAFE_SCHEMA . extend ( { implicit : [ new Type ( "tag:yaml.org,2002:str" , { kind : "scalar" , construct : function ( data ) { return data !== null ? data : "" ; } , } ) , ] , } ) ;