Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
demand: true,
type: "string",
},
}).argv;
try {
// process input
let input = await readInput(argv.i);
// parse input
const inputParser = "yaml";
const parsedInput = inputParsers[inputParser].parse(input);
// process config
const config = presets[argv.config];
// process type
const type = config[argv.t];
// perform action
const output = hashTreeRoot(expandYamlValue(parsedInput,type), type);
// parse output
const outputParser = "hex";
const parsedOutput = outputParsers[outputParser].dump(output);
// write output
await writeOutput(parsedOutput, argv.o);
} catch (e) {
console.error(e.message);
}
})();
demand: true,
type: "string",
},
}).argv;
try {
// process input
const input = await readInput(argv.i);
// parse input
const inputParser = "yaml";
const parsedInput = inputParsers[inputParser].parse(input);
// process config
const config = presets[argv.config];
// process type
const type = config[argv.t];
// perform action
const output = serialize(expandYamlValue(parsedInput,type), type);
// parse output
const outputParser = "hex";
const parsedOutput = outputParsers[outputParser].dump(output);
// write output
await writeOutput(parsedOutput, argv.o);
} catch (e) {
console.error(e.message);
}
})();