3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 04:25:01 +00:00

chore: update dependencies

This commit is contained in:
Dragory 2023-04-01 20:31:44 +03:00
parent a6750da5da
commit c21aa7fbbf
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
5 changed files with 8266 additions and 4059 deletions

View file

@ -5,7 +5,10 @@ import { validateNoObjectAliases } from "./validateNoObjectAliases";
* Loads a YAML file safely while removing object anchors/aliases (including arrays)
*/
export function loadYamlSafely(yamlStr: string): any {
const loaded = yaml.safeLoad(yamlStr);
let loaded = yaml.safeLoad(yamlStr);
if (loaded == null || typeof loaded !== "object") {
loaded = {};
}
validateNoObjectAliases(loaded);
return loaded;
}