{"id":13515327,"url":"https://github.com/morris/vinyl-ftp","last_synced_at":"2025-05-16T13:03:14.082Z","repository":{"id":25887724,"uuid":"29328136","full_name":"morris/vinyl-ftp","owner":"morris","description":"Blazing fast vinyl adapter for FTP","archived":false,"fork":false,"pushed_at":"2024-01-12T07:17:08.000Z","size":90,"stargazers_count":389,"open_issues_count":60,"forks_count":31,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-09T10:04:15.993Z","etag":null,"topics":["deployment","ftp","gulp","vinyl"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/morris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-01-16T02:06:06.000Z","updated_at":"2024-11-23T21:26:30.000Z","dependencies_parsed_at":"2024-01-14T16:15:57.013Z","dependency_job_id":"1597c2de-8983-4026-bc14-4a0dd616fd4a","html_url":"https://github.com/morris/vinyl-ftp","commit_stats":{"total_commits":75,"total_committers":7,"mean_commits":"10.714285714285714","dds":0.36,"last_synced_commit":"1cb307f639ce238ddee9ad3d8c4f77b340913945"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morris%2Fvinyl-ftp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morris%2Fvinyl-ftp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morris%2Fvinyl-ftp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morris%2Fvinyl-ftp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morris","download_url":"https://codeload.github.com/morris/vinyl-ftp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535826,"owners_count":22087398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment","ftp","gulp","vinyl"],"created_at":"2024-08-01T05:01:09.544Z","updated_at":"2025-05-16T13:03:14.049Z","avatar_url":"https://github.com/morris.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# vinyl-ftp\n\n[![version](https://img.shields.io/npm/v/vinyl-ftp.svg)](https://www.npmjs.com/package/vinyl-ftp)\n[![downloads](https://img.shields.io/npm/dm/vinyl-ftp.svg)](https://www.npmjs.com/package/vinyl-ftp)\n\nBlazing fast vinyl adapter for FTP.\nSupports parallel transfers, conditional transfers, buffered or streamed files, and more.\nOften performs better than your favorite desktop FTP client.\n\n## Usage\n\nNice and gulpy deployment task:\n\n```javascript\nvar gulp = require( 'gulp' );\nvar gutil = require( 'gulp-util' );\nvar ftp = require( 'vinyl-ftp' );\n\ngulp.task( 'deploy', function () {\n\n\tvar conn = ftp.create( {\n\t\thost:     'mywebsite.tld',\n\t\tuser:     'me',\n\t\tpassword: 'mypass',\n\t\tparallel: 10,\n\t\tlog:      gutil.log\n\t} );\n\n\tvar globs = [\n\t\t'src/**',\n\t\t'css/**',\n\t\t'js/**',\n\t\t'fonts/**',\n\t\t'index.html'\n\t];\n\n\t// using base = '.' will transfer everything to /public_html correctly\n\t// turn off buffering in gulp.src for best performance\n\n\treturn gulp.src( globs, { base: '.', buffer: false } )\n\t\t.pipe( conn.newer( '/public_html' ) ) // only upload newer files\n\t\t.pipe( conn.dest( '/public_html' ) );\n\n} );\n```\n\nWithout Gulp:\n\n```javascript\nvar fs = require( 'vinyl-fs' );\nvar ftp = require( 'vinyl-ftp' );\n\nvar conn = new ftp( /* ... */ );\n\nfs.src( [ './src/**' ], { buffer: false } )\n\t.pipe( conn.dest( '/dst' ) );\n```\n\n*Remember not to push FTP credentials to public repos!*\n\n\n## API\n\n`var ftp = require( 'vinyl-ftp' )`\n\n### ftp.create( config )\n\nReturn a new `vinyl-ftp` instance with the given config. Config options:\n\n- __host:__        FTP host,     default is localhost\n- __user:__        FTP user,     default is anonymous\n- __pass[word]:__  FTP password, default is anonymous@\n- __port:__        FTP port,     default is 21\n- __log:__         Log function, default is null\n- __timeOffset:__  Offset server time by this number of minutes, default is 0\n- __parallel:__    Number of parallel transfers, default is 3\n- __maxConnections:__ Maximum number of connections, should be greater or\nequal to \"parallel\". Default is 5, or the parallel setting.\nDon't worry about setting this too high, vinyl-ftp\nrecovers from \"Too many connections\" errors nicely.\n- __reload:__      Clear caches before (each) stream, default is false\n- __idleTimeout:__ Time to keep idle FTP connections (milliseconds), default is 100\n- __debug:__       A debug callback that gets extensive debug information, default is null\n- __secure:__      Set `true` for secured FTP connections\n- __secureOptions:__ Set `{ rejectUnauthorized: false }` for self-signed or expired secure FTP connections\n\nYou can override `parallel` and `reload` per stream in their `options`.\n\n\u003chr\u003e\n\n`var conn = ftp.create( config )`\n\n### conn.src( globs[, options] ) \u003csmall\u003eSTREAM\u003c/small\u003e\n\nReturns a vinyl file stream that emits remote files matched by the given\nglobs.\nThe remote files have a `file.ftp` property containing remote information.\nPossible options:\n\n- __cwd:__ Set as file.cwd, default is `/`.\n- __base:__ Set as file.base, default is glob beginning. This is used to determine the file names when saving in .dest().\n- __since:__ Only emit files modified after this date.\n- __buffer:__ Should the file be buffered (complete download) before emitting? Default is true.\n- __read:__ Should the file be read? Default is true. False will emit null files.\n\nGlob-related options are documented at [minimatch](https://www.npmjs.com/package/minimatch).\n\n\u003chr\u003e\n\n### conn.dest( remoteFolder[, options] ) \u003csmall\u003eSTREAM\u003c/small\u003e\n\nReturns a transform stream that transfers input files to a remote folder.\nAll directories are created automatically.\nPasses input files through.\n\n### conn.mode( remoteFolder, mode[, options] ) \u003csmall\u003eSTREAM\u003c/small\u003e\n\nReturns a transform stream that sets remote file permissions for each file.\n`mode` must be a string between '0000' and '0777'.\n\n### conn.newer( remoteFolder[, options] ) \u003csmall\u003eSTREAM\u003c/small\u003e\n\nReturns a transform stream which filters the input for files\nwhich are newer than their remote counterpart.\n\n### conn.differentSize( remoteFolder[, options] ) \u003csmall\u003eSTREAM\u003c/small\u003e\n\nReturns a transform stream which filters the input for files\nwhich have a different file size than their remote counterpart.\n\n### conn.newerOrDifferentSize( remoteFolder[, options] ) \u003csmall\u003eSTREAM\u003c/small\u003e\n\nSee above.\n\n### conn.filter( remoteFolder, filter[, options] ) \u003csmall\u003eSTREAM\u003c/small\u003e\n\nReturns a transform stream that filters the input using a callback.\nThe callback should be of this form:\n\n```javascript\nfunction ( localFile, remoteFile, callback ) {\n\n\t// localFile and remoteFile are vinyl files.\n\t// Check remoteFile.ftp for remote information.\n\t// Decide wether localFile should be emitted and call callback with boolean.\n\t// callback is a function( error, emit )\n\n\tcallback( null, emit );\n\n}\n```\n\n### conn.delete( path, cb ) \u003csmall\u003eCALLBACK\u003c/small\u003e\n\nDeletes a file.\n\n### conn.rmdir( path, cb ) \u003csmall\u003eCALLBACK\u003c/small\u003e\n\nRemoves a directory, recursively.\n\n### conn.clean( globs, local[, options] ) \u003csmall\u003eSTREAM\u003c/small\u003e\n\nGlobs remote files, tests if they are locally available at `\u003clocal\u003e/\u003cremote.relative\u003e` and removes them if not.\n\n## Development\n\n- Run tests with `CONFIG=test/config/yourserver.json npm test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorris%2Fvinyl-ftp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorris%2Fvinyl-ftp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorris%2Fvinyl-ftp/lists"}