Skip to content

Commit

Permalink
fix security/detect-non-literal-fs-filename
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushik-rishi committed Mar 21, 2024
1 parent 7616cc8 commit bd31c62
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hooks/beautify-output.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ const beautifyAllOutputFiles = function(dirPath) {
*/
module.exports = {
'generate:after': (generator) => {
beautifyAllOutputFiles(path.resolve(generator.targetDir, 'src/api/handlers'));
beautifyAllOutputFiles(path.resolve(generator.targetDir, 'src/api/routes'));
beautifySingleFile(path.resolve(generator.targetDir, 'src/api/index.js'));
const entryPointFilePath = path.resolve(generator.targetDir, 'src/api/index.js');
const handlersPath = path.resolve(generator.targetDir, 'src/api/handlers');
const routesPath = path.resolve(generator.targetDir, 'src/api/routes');
beautifyAllOutputFiles(handlersPath);
beautifyAllOutputFiles(routesPath);
beautifySingleFile(entryPointFilePath);
}
};

0 comments on commit bd31c62

Please sign in to comment.