Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async default(inputs = {}) {
const cwd = process.cwd();
const rootFolder = path.resolve(inputs.path);
process.chdir(rootFolder);
inputs.template = path.join(rootFolder, "serverless.yml");
const config = {
root: rootFolder,
stateRoot: path.join(rootFolder, ".serverless"),
debug: inputs.debug,
entity: Template.constructor.name
};
const context = new Context(config);
const component = new Template(undefined, context);
await component.init();
const output = await component(inputs);
process.chdir(cwd);
return output;
}