UNPKG

557 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const js_yaml_1 = require("js-yaml");
4function parseConfigFile(ymlString) {
5 if (typeof process !== 'undefined' && 'env' in process) {
6 // debugLog(`[CLI] Interpolation of Environmental Variables`);
7 ymlString = ymlString.replace(/\$\{(.*)\}/g, (str, variable, index) => process.env[variable]);
8 }
9 // debugLog(`[CLI] Parsing YAML file`);
10 return js_yaml_1.safeLoad(ymlString);
11}
12exports.parseConfigFile = parseConfigFile;
13//# sourceMappingURL=yml.js.map
\No newline at end of file