Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@shimo/gulp-build
Advanced tools
Compress your backend codes in private-deploy-env.
$ npm install --save-dev @shimo/gulp-build
The plug-in takes a option and process the current folder codes to a sub-dir for private-deploy.
const gulp = require('gulp');
const gulpBuild = require('@shimo/gulp-build');
gulp.task('private-deploy', () => gulpBuild({
dest: './release'
});
dest
The destination dir you want to generate to, like ./release
.
copyResources
The resource files you want to copy to dest without any change.
gulpBuild({
// dest, ...
copyResources: [
'./config/default.toml',
'./config/test.toml',
'./database/migrations/*',
'./test/**'
]
})
entries
The files you want to webpack.
gulpBuild({
// dest, ...
entries: [
'./server.js',
'./bin/migrate.js'
]
})
nodeModuleFilter
This is a function which can exclude some modules to the dest dir. you may not want to webpack some modules in node_modules dir which is in your own private npm registery. using this function you can do this.
gulpBuild({
// dest, ...
nodeModuleFilter (x) {
return x.indexOf('shimo') === -1 &&
x.indexOf('richdoc') === -1
}
})
modifyPkg
The function can modify the package.json in the dest dir. some modules is useless in clients' server and it may occur error if you not modify the package.json.
gulpBuild({
// dest, ...
modifyPkg (pkg) {
['dependencies', 'devDependencies'].forEach(bigKey => {
Object.keys(pkg[bigKey]).forEach(key => {
if (key.indexOf('shimo') > -1) {
delete pkg[bigKey][key]
}
})
})
delete pkg.scripts.preinstall
delete pkg.scripts.install
return pkg
}
})
MIT
FAQs
Compress your backend codes.
We found that @shimo/gulp-build demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.