{"_id":"@1pete/s3-streams","_rev":"1-430b6ce489addf2a82d181e663bb7e16","name":"@1pete/s3-streams","dist-tags":{"latest":"0.1.0-beta.0"},"versions":{"0.1.0-beta.0":{"name":"@1pete/s3-streams","version":"0.1.0-beta.0","description":"Use readable/writeable streams for manipulating S3 objects.","keywords":["s3","stream","upload","download"],"license":"CC0-1.0","homepage":"https://github.com/1pete/s3-streams","repository":{"type":"git","url":"git+https://github.com/1pete/s3-streams.git"},"bugs":{"url":"https://github.com/1pete/s3-streams/issues"},"main":"lib/s3.js","files":["lib"],"scripts":{"test":"npm run lint && npm run spec && npm run coverage","spec":"nyc mocha -r test/helpers/chai -r test/helpers/sinon -R spec test/spec","lint":"eslint --ignore-path .gitignore .","coverage":"nyc report --reporter=lcov"},"dependencies":{"lodash":"^4.17.10","readable-stream":"^2.0.0"},"peerDependencies":{"aws-sdk":"^2.200.0"},"devDependencies":{"chai":"^4.1.0","chai-as-promised":"^7.1.0","chai-things":"^0.2.0","eslint":"^4.19.0","mocha":"^5.2.0","nyc":"^11.0.0","sinon":"^6.1.0","sinon-chai":"^3.2.0"},"engines":{"node":">= 4"},"gitHead":"a93e3e096ef023afb3459915588cb264b380da67","_id":"@1pete/s3-streams@0.1.0-beta.0","_npmVersion":"6.1.0","_nodeVersion":"10.9.0","_npmUser":{"name":"1pete","email":"the.pete.the.pete@gmail.com"},"dist":{"integrity":"sha512-FPEmS3mH6cCVzTjhPSv+zhB2Wnt4r6qhUYelNxZbbNYhxYDl/Ba8VNytqHqhIEdj5Tw64PaIU2jZw+BoqqYGeQ==","shasum":"05a6fe199d77b9c1fbfdab286eef406eba55eba0","tarball":"https://registry.npmjs.org/@1pete/s3-streams/-/s3-streams-0.1.0-beta.0.tgz","fileCount":6,"unpackedSize":14627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgBvLCRA9TVsSAnZWagAA0g0P/RFqN0flHQ42Odwm6ayn\nT5DkETiFOImLtFGf1SbMzp0WIu2t/J31rEO7rz4I90x5xmrsmBHmEbDekHev\nw4K3xBcefsDiUIbJxoEr3NNJfrCuXi6SH6PGaNJvPZlb3Bf4aBogvthCbDL/\nhonHwQ95oDaMgqlAnSldTDk40Q8xhbaTJdSOGTxpCFOSGEnKSELjwOy2c1mf\n9oqfTIB46EjFFL80i2v3O5GPMyM703rbuLX53zL4RF9WrGrgkIxh+/6gxpG+\nxfhU/eLhTOU+AHmoMMlLPO9oiQ94U6e+c0z45upC6pT/ODLOfdxwH5SrR8xb\nkmK+6qlczJhF0Ow6JLKj2RbdpWu3uDPMw84XRDUXA8aAq1arJRrkw3OVJUVw\n1GFtkNgR+1lWFUIA2REK80dov6CK04U1oH8WWRy75qpsGJ1k7F8hCNzLzr9L\nEKWHLfTDqiazapzUxq+LRb4f2OgZ6VtXhD5aBvtKVaaC4mO42huDPlWByl/x\ni1JSMdnt4QP3SiDIhY+NL7ETIY+sw0ad71kmPzlEgHe0iPFBp1QjbQ5RudZp\n6cdVRRDaW5JWHjSNPvvr/9foe3bYj1tHWlMlTIQBt9Ius6H5kmup70lGQCYf\nExJAZKpDP1HWDzSTB4HVZACkvQzcpfaSXg5ChTK9d8Lmptxtuwk8aKfgt+EY\n+Xmy\r\n=LvCL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIASNeFCRNO604GTagufu7o/ZwP0DQG/10vJplY/eB8S5AiEAvBysxE4jJOwD6MGCyaDUniyqL7ygEQLOBCOp4Dr7Qgs="}]},"maintainers":[{"name":"1pete","email":"the.pete.the.pete@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/s3-streams_0.1.0-beta.0_1535122379038_0.6406555089302204"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-24T14:52:58.770Z","0.1.0-beta.0":"2018-08-24T14:52:59.190Z","modified":"2022-04-04T10:34:14.283Z"},"maintainers":[{"name":"1pete","email":"the.pete.the.pete@gmail.com"}],"description":"Use readable/writeable streams for manipulating S3 objects.","homepage":"https://github.com/1pete/s3-streams","keywords":["s3","stream","upload","download"],"repository":{"type":"git","url":"git+https://github.com/1pete/s3-streams.git"},"bugs":{"url":"https://github.com/1pete/s3-streams/issues"},"license":"CC0-1.0","readme":"# s3-streams\n\nSupport for streaming reads and writes from and to S3 using Amazon's native API.\n\nAmazon makes it a giant pain to do anything stream-like when it comes to S3 (given the general restriction that every request needs a `Content-Length` header). We provide native stream classes (both `Readable` and `Writable`) that wrap `aws-sdk` S3 requests and responses to make your life easier.\n\nIMPORTANT: This library uses the `streams3` API. In order to provide compatibility with older versions of node we make use of [readable-stream]. This is unlikely to have any effect on your code but has not yet been well tested.\n\nIf you are using `node 0.8` you must ensure your version of `npm` is at least `1.4.6`.\n\nFeatures:\n * Native read streams,\n * Native write streams,\n * Smart piping.\n\n## Usage\n\n```sh\nnpm install s3-streams\n```\n\n### Write Streams\n\nCreate streams for uploading to S3:\n```javascript\nvar S3 = require('aws-sdk').S3,\n\tS3S = require('s3-streams');\n\nvar upload = S3S.WriteStream(new S3(), {\n\tBucket: 'my-bucket',\n\tKey: 'my-key',\n\t// Any other AWS SDK options\n\t// ContentType: 'application/json'\n\t// Expires: new Date('2099-01-01')\n\t// ...\n});\n```\n\n### Read Streams\n\nCreate streams for downloading from S3:\n```javascript\nvar S3 = require('aws-sdk').S3,\n\tS3S = require('s3-streams');\n\nvar download = S3S.ReadStream(new S3(), {\n\tBucket: 'my-bucket',\n\tKey: 'my-key',\n\t// Any other AWS SDK options\n});\n```\n\n### Smart Piping\n\nSmart pipe files over HTTP:\n\n```javascript\nvar http = require('http'),\n    S3 = require('aws-sdk').S3,\n\tS3S = require('s3-streams');\n\nhttp.createServer(function(req, res) {\n    var src = S3S.ReadStream(...);\n    // Automatically sets the correct HTTP headers\n    src.pipe(res);\n})\n```\n\nSmart pipe files on S3:\n```javascript\nvar S3 = require('aws-sdk').S3,\n\tS3S = require('s3-streams');\n\nvar src = S3S.ReadStream(...),\n\tdst = S3S.WriteStream(...);\n\n// No data ever gets downloaded locally.\nsrc.pipe(dst);\n```\n\n### Extras\n\nYou can create streams with different settings by creating a partial for the specific S3 instance you have:\n\n```javascript\nvar instance = new S3(), s3 = {\n\tcreateReadStream: _.partial(S3ReadStream, instance),\n\tcreateWriteStream: _.partial(S3WriteStream, instance)\n}\n\nvar stream = s3.createReadStream({ Bucket: 'my-bucket', Key: 'my-key' });\n```\n\nExisting frameworks:\n * knox (doesn't use native AWS SDK, no true streaming support)\n * s3-upload-stream (doesn't use node streams API, no support for streaming downloads)\n * s3-download-stream (only does downloads, downloads are streamed by S3 part, not by individual buffer chunks)\n * streaming-s3 (overall terrible API; no actual streams)\n * create-s3-object-write-stream (probably one of the better ones)\n\n[readable-stream]: http://www.nearform.com/nodecrunch/dont-use-nodes-core-stream-module/\n","readmeFilename":"README.md"}