Skip to content

Commit 9da41ed

Browse files
committed
Whitelist allowed extensions
1 parent 344a215 commit 9da41ed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/helpers/archiver.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ const archiveSpecs = (runSettings, filePath) => {
3535

3636
archive.pipe(output);
3737

38-
let filesToIgnore = [ '*.zip', '*.mp4', '*.png', '*.jpeg', '^.' ]
39-
archive.glob('**/*', { ignore: filesToIgnore, cwd: cypressFolderPath });
38+
let allowedFileTypes = [ 'js', 'json', 'txt', 'ts' ]
39+
allowedFileTypes.forEach(fileType => {
40+
archive.glob(`**/*.${fileType}`, { cwd: cypressFolderPath, matchBase: true });
41+
});
4042

4143
archive.finalize();
4244
});

0 commit comments

Comments
 (0)