INNER CODE UNIT · JavaScript

loadFlowYaml

rpldy/react-uploady · .github/actions/save-versions-to-wf/index.js:8

const loadFlowYaml = (wfPath) => {
	let doc;

	console.log(`Loading WF from: ${wfPath}`);
	try {
		doc = yaml.load(fs.readFileSync(wfPath, "utf8"));
	} catch (ex) {
		console.error(`Failed to read yaml file: ${wfPath}`, ex);
		throw new Error("Unable to load WF YAML");
	}

	return doc;
};

const saveFlowYaml = (doc, wfPath) => {
	console.log(`Saving WF to: ${wfPath}`);

	try {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…