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.
Blazing fast vinyl adapter for FTP. Supports parallel transfers, conditional transfers, buffered or streamed files, and more. Often performs better than your favorite desktop FTP client.
Nice and gulpy deployment task:
var gulp = require( 'gulp' );
var gutil = require( 'gulp-util' );
var ftp = require( 'vinyl-ftp' );
gulp.task( 'deploy', function () {
var conn = ftp.create( {
host: 'mywebsite.tld',
user: 'me',
password: 'mypass',
parallel: 10,
log: gutil.log
} );
var globs = [
'src/**',
'css/**',
'js/**',
'fonts/**',
'index.html'
];
// using base = '.' will transfer everything to /public_html correctly
// turn off buffering in gulp.src for best performance
return gulp.src( globs, { base: '.', buffer: false } )
.pipe( conn.newer( '/public_html' ) ) // only upload newer files
.pipe( conn.dest( '/public_html' ) );
} );
Without Gulp:
var fs = require( 'vinyl-fs' );
var ftp = require( 'vinyl-ftp' );
var conn = new ftp( /* ... */ );
fs.src( [ './src/**' ], { buffer: false } )
.pipe( conn.dest( '/dst' ) );
Remember not to push FTP credentials to public repos!
var ftp = require( 'vinyl-ftp' )
Return a new vinyl-ftp
instance with the given config. Config options:
true
for secured FTP connections{ rejectUnauthorized: false }
for self-signed or expired secure FTP connectionsYou can override parallel
and reload
per stream in their options
.
var conn = ftp.create( config )
Returns a vinyl file stream that emits remote files matched by the given
globs.
The remote files have a file.ftp
property containing remote information.
Possible options:
/
.Glob-related options are documented at minimatch.
Returns a transform stream that transfers input files to a remote folder. All directories are created automatically. Passes input files through.
Returns a transform stream that sets remote file permissions for each file.
mode
must be a string between '0000' and '0777'.
Returns a transform stream which filters the input for files which are newer than their remote counterpart.
Returns a transform stream which filters the input for files which have a different file size than their remote counterpart.
See above.
Returns a transform stream that filters the input using a callback. The callback should be of this form:
function ( localFile, remoteFile, callback ) {
// localFile and remoteFile are vinyl files.
// Check remoteFile.ftp for remote information.
// Decide wether localFile should be emitted and call callback with boolean.
// callback is a function( error, emit )
callback( null, emit );
}
Deletes a file.
Removes a directory, recursively.
Globs remote files, tests if they are locally available at <local>/<remote.relative>
and removes them if not.
CONFIG=test/config/yourserver.json npm test
FAQs
Vinyl adapter for FTP
The npm package vinyl-ftp receives a total of 2,573 weekly downloads. As such, vinyl-ftp popularity was classified as popular.
We found that vinyl-ftp 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
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.