
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
md-file-tree-enhanced
Advanced tools
Generate markdown tree of all the files in a directory, recursively.Custom directory name, file name 生成文件目录列表到Markdown文件中,可以设置过滤的文件后缀名,或自定义目录名、文件名
options extends readdir-enhanced
Basic
import readdir from "@jsdevtools/readdir-enhanced";
// Find all .txt files
readdir("my/directory", {filter: "*.txt"});
// Find all package.json files
readdir("my/directory", {filter: "**/package.json", deep: true});
const defaultOptions = {
formatFileName,
formatDirectoryName,
deep: stats => ignoreNodeModules(stats, defaultOptions),
filter: stats => myFilter(stats, defaultOptions),
outputFilePath: 'list.md',
prefix: ['.html'],
ignore: ['node_modules', '.git', '.idea'],
}
const {generateMdTree} = require('md-file-tree-enhanced')
generateMdTree('.', {
outputFilePath: 'readme.md',
prefix: ['.html', '.js'],
ignore: ['node_modules', '.git', '.idea'],
formatDirectoryName: (name)=>{
return name+'1'+'\n'
},
formatFileName: (name, path)=>{
return name+path+'\n'
},
// or
// filter: myFilter,
}).then(({ output, files }) => {
// console.log(res);
})
This generates the list.md
file with:
- __CSS__
- [IEMUSTGODIE.html](CSS/IEMUSTGODIE.html)
- [Love Heart.js](CSS/Love Heart.js)
- [WebpackIcon.html](CSS/WebpackIcon.html)
- [border-arrow.html](CSS/border-arrow.html)
- __box-shadow__
- [box-shadow.html](CSS/box-shadow/box-shadow.html)
- [aaa.js](CSS/box-shadow/aaa.js)
- [linear-gradient.html](CSS/linear-gradient.html)
- [photo-3d.html](CSS/photo-3d.html)
FAQs
生成文件目录列表到Markdown文件中
We found that md-file-tree-enhanced demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.