{"id":16890309,"url":"https://github.com/marak/vinyl-http","last_synced_at":"2025-04-11T13:09:46.598Z","repository":{"id":20874115,"uuid":"24161179","full_name":"Marak/vinyl-http","owner":"Marak","description":"push and receive streams of vinyl over http","archived":false,"fork":false,"pushed_at":"2016-04-20T09:32:39.000Z","size":8,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T10:38:47.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"www.gulpjs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Marak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-17T20:26:28.000Z","updated_at":"2022-03-23T23:30:33.000Z","dependencies_parsed_at":"2022-07-23T07:32:06.418Z","dependency_job_id":null,"html_url":"https://github.com/Marak/vinyl-http","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2Fvinyl-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2Fvinyl-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2Fvinyl-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2Fvinyl-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marak","download_url":"https://codeload.github.com/Marak/vinyl-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248404912,"owners_count":21097855,"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":[],"created_at":"2024-10-13T17:02:24.063Z","updated_at":"2025-04-11T13:09:46.578Z","avatar_url":"https://github.com/Marak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vinyl-http\n\n## Unreleased v0.0.0\n\n## Information\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003ePackage\u003c/td\u003e\u003ctd\u003evinyl-http\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDescription\u003c/td\u003e\n\u003ctd\u003eVinyl adapter for HTTP\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eNode Version\u003c/td\u003e\n\u003ctd\u003e\u003e= 0.10\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Purpose\n\nThis vinyl adapter allows you to either either post or receive streams of vinyl from an HTTP server.\n\nThis enables the ability to quickly push or retrieve streams of files to or from remote sources.\n\nAn HTTP server component is required and shipped with this module. It can be used as a stand-alone server or as middleware for your existing http server.\n\nAlternatives to using this module could be `gulp-sftp`, but that would necessitate an open ssh server while `vinyl-http` requires only an open http server.\n\n## Usage\n\n### Start the server\n\n```javascript\nvar server = require('vinyl-http').createServer();\nserver.listen(8888);\n```\n\n### Push local to remote\n\n```javascript\nvar vhttp = require('../index');\nvar vfs = require('vinyl-fs');\nvar map = require(\"map-stream\");\n\nvar log = function(file, cb) {\n  console.log(file)\n  cb(null, file);\n};\n\nvfs.src('test/fixtures/**') \n.pipe(vhttp.dest('http://localhost:8888/upload'))\n.pipe(map(log));\n\n```\n\n### Pull remote to local\n\n```javascript\nvar vhttp = require('../index');\nvar vfs = require('vinyl-fs');\nvar map = require(\"map-stream\");\n\nvar log = function(file, cb) {\n  console.log(file)\n  cb(null, file);\n};\n\nvhttp.src('http://localhost:8888/test/fixtures/**')\n .pipe(map(log))\n .pipe(vfs.dest('./download'));\n\n```\n\n### Stream from remote to remote\n\n```javascript\nvar vhttp = require('../index');\nvar vfs = require('vinyl-fs');\nvar map = require(\"map-stream\");\n\nvar log = function(file, cb) {\n  console.log(file)\n  cb(null, file);\n};\n\nvhttp.src('http://localhost:8888/test/fixtures/**')\n .pipe(map(log))\n .pipe(vhttp.dest('http://localhost:8888/upload2'));\n\n```\n\n## API\n\n### src(globs[, opt])\n\n- Takes a glob string or an array of glob strings as the first argument.\n- Returns a Readable/Writable stream.\n- On write the stream will simply pass items through.\n- This stream emits matching [vinyl] File objects\n\n\n### dest(folder[, opt])\n\n- Takes a folder path as the first argument.\n- Possible options for the second argument:\n- Returns a Readable/Writable stream.\n\n## TODO\n  - Add Tests\n  - Investigate adding compression\n  - Add protection for directory traversals on server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarak%2Fvinyl-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarak%2Fvinyl-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarak%2Fvinyl-http/lists"}