Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (triggerName !== undefined) {
break;
}
}
const srcDir = path.normalize(path.join(backendPath, category, String(triggerName), 'src'));
const event = eventObj;
const invokeOptions = {
packageFolder: srcDir,
fileName: `${srcDir}/index.js`,
handler: 'handler',
event,
};
invoke(invokeOptions);
});
}
run: async function(context) {
if (context.parameters.options.help) {
const header = `amplify mock ${this.name} \nDescriptions:
Mock Functions locally`;
context.amplify.showHelp(header, []);
return;
}
try {
await invokeWalkthroughRun(context);
} catch (e) {
context.print.error(e.message);
}
},
};