{"name":"unpack-stream","version":"6.0.2","description":"Unpack a tarball stream","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"pretest":"rimraf test/dest","test":"npm run tsc && preview && ts-node test --type-check","md":"preview && mos README.md","tsc":"rimraf dist && tsc","prepublishOnly":"npm run tsc"},"repository":{"type":"git","url":"git+https://github.com/zkochan/unpack-stream.git"},"keywords":["tarball","stream","unpack"],"author":{"name":"Zoltan Kochan","email":"z@kochan.io","url":"https://www.kochan.io"},"license":"MIT","bugs":{"url":"https://github.com/zkochan/unpack-stream/issues"},"homepage":"https://github.com/zkochan/unpack-stream#readme","dependencies":{"@types/ssri":"^6.0.1","decompress-maybe":"^1.0.0","ssri":"^8.0.0","tar-fs":"^2.0.0"},"devDependencies":{"@types/node":"^12.0.4","@types/tape":"^4.2.33","@types/tar-fs":"^1.16.1","got":"^10.0.0","ignorable":"^1.0.1","mos":"^2.0.0-alpha.3","mos-plugin-readme":"^1.0.4","package-preview":"^3.0.0","rimraf":"^3.0.0","tape":"^4.7.0","ts-node":"^8.0.2","typescript":"^3.0.0"},"mos":{"plugins":["readme"],"installation":{"useShortAlias":true}},"engines":{"node":">=8.15"},"gitHead":"0fe507928ed0b5955fc28437796c947121529fbf","_id":"unpack-stream@6.0.2","_nodeVersion":"12.14.1","_npmVersion":"6.13.7","dist":{"integrity":"sha512-hk6qO2kgRExAfcKmFFvZWUPL4D0IoZdGQyYSS/n5C2001eXdV00mv0q0bKv/WCRH6J4llvLp5QzXF0CUPRlW9A==","shasum":"bd08511479a54ec4e9009d99ba37fb72bb13c84a","tarball":"http://registry-npm.ywwl.com/unpack-stream/download/unpack-stream-6.0.2.tgz","fileCount":6,"unpackedSize":11581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTZYpCRA9TVsSAnZWagAA+4cP/02vfWDPkNT7EcSyz4gK\nAf3dLgB/VEScm2iI9suc7C7fn7kdvg0kvFyto4SirMEnwPCrkzPifeJ+CHKi\nEXGsC5I3zY6Bt6OzBZttvWXbvGYFzAz2S5S1gh97HVr4ZSoDf58P27694k9a\nQGsYSIAvPB6etIUYbJlBue3tMs5f38zWqk0rkzKfVcJZnB3+eGzmLk082olB\nYqwQoalVYYt+wrNvPWncHLa/TvWyojPTOXvbyX54ZsV2BfXdcTmmLhUOLgVz\nQvv8gQ5i65dUoQLt6EVQ71yPF4mqJ1vZ44g/mzY7hKx1pkapXvLyYohqafQW\no+vVbQoqKN8CgSWFaTmAFz7OIpZcRlIrKHFCPOllHk79jPtvCouwUKbz8pef\n1wPST8L6AK/AR/ygo+Ck8El93hjkt6KmTmk7Q2WuFOHzfi70PmGXjvqmIa/J\nBjuQBFpTwQP+QTY13GqwDcS4hw1VQm3klBKlJ40T/7brwTZDio4redDrSK1V\njz0KOYyTUnrB1/XviIxS3OpI4Y/2UBigyjHl3bvp0v1cQ4lpSits2rWOErcU\nsmq0dWEyGj/FaaHtZTynuVDcEhqGyZFFCNk+MhhO7qY5qo98m7C5AfxYP387\n7yf5LsvK/ZEP0QmfCl2UGJhR3GrIa73AQ5TFy1UGPFEzRNLtWinl3QXieEDa\ntGxc\r\n=8wm6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA3QaAIGnJW1rKBFG+LlwW1R35EJIE1GVmuFxpHtHDL1AiEA9mBaKDf9Xs76X1SM7H5yuIQu1HmLyEd7DS+olcEf46o="}],"size":4647,"noattachment":false,"key":"/unpack-stream/-/unpack-stream-6.0.2.tgz"},"maintainers":[{"name":"zkochan","email":"zoltan.kochan@gmail.com"}],"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unpack-stream_6.0.2_1582143016659_0.638565354932471"},"_hasShrinkwrap":false,"readme":"# unpack-stream\n\n> Unpack a tarball stream\n\n<!--@shields('npm', 'travis')-->\n[![npm version](https://img.shields.io/npm/v/unpack-stream.svg)](https://www.npmjs.com/package/unpack-stream) [![Build Status](https://img.shields.io/travis/zkochan/unpack-stream/master.svg)](https://travis-ci.org/zkochan/unpack-stream)\n<!--/@-->\n\n## Installation\n\n```sh\nnpm i -S unpack-stream\n```\n\n## Usage\n\n<!--@example('./example.js')-->\n```js\n'use strict'\nconst got = require('got')\nconst unpackStream = require('unpack-stream')\n\nconst tarball = 'https://registry.npmjs.org/is-negative/-/is-negative-2.1.0.tgz'\nconst stream = got.stream(tarball)\nunpackStream.remote(stream, './tmp')\n  .then(index =>\n    Promise.all(\n      Object.keys(index)\n        .map(filename =>\n          index[filename].generatingIntegrity.then(integrity => ({filename, integrity})))\n    )\n  )\n  .then(files => console.log(files))\n  //> [ { filename: 'package.json',\n  //      integrity: 'sha512-RA0APKvtxz85WYCFX3M/TkVeJZZBcylEwh+GrV7uO/NNJO4G3rzgTrpsypp9AU2hM2QBk9SxCHi1Gb9aaWzpYg==' },\n  //    { filename: 'index.js',\n  //      integrity: 'sha512-3dL1OHn8VWhVDT37f3ZBdou4NrYq2ll//W1lWqx7+4tKBW/WqUx3mDcGyqrBfBeWTIPCd+RiUdF7hp3MQYB9+g==' },\n  //    { filename: 'license',\n  //      integrity: 'sha512-lSw93JVg7wfwyVXKrg6yIFjF9Bidgr+tA/l6XNlrRhjnE6NhwkyPL3xNL47OZScS8qoQkYUwE6slmo7jGesH0Q==' },\n  //    { filename: 'readme.md',\n  //      integrity: 'sha512-fM882axp7XaC6nzj5XYuzB0KhYpYwwsR3RjyiqOcIrI6C0b9KxrEEug9VpKTfbSbqTOmZ2KEqZLPKrMXFW1Y+g==' } ]\n```\n<!--/@-->\n\n## API\n\n### `remote(stream, destination, [opts]): Promise<Index>`\n\nUnpacks a remote stream fetched via HTTP.\n\n**Arguments:**\n\n- `stream` - _Stream_\n- `destination` - _string_ - the directory to which the stream will be unpacked\n- `[opts.shasum]` - _string_ - shasum to verify tarball\n- `[opts.onStart]` - _Function_ - called on download start\n- `[opts.onProgress]` - _(downloaded, size) => void_ - tracks the download progress\n- `[opts.generateIntegrity]` - _Boolean_ - `true` by default. If `true`, generates [Subresource Integrity](https://w3c.github.io/webappsec-subresource-integrity/) for each unpacked file\n- `[opts.ignore]` - `(filename: string) => boolean` - a function that decides whether a file should be unpacked from the tarball.\n\n### `local(stream, destination, [opts]): Promise<Index>`\n\nUnpacks a stream from the local filesystem.\n\n**Arguments:**\n\n- `[opts.generateIntegrity]` - _Boolean_ - `true` by default. If `true`, generates [Subresource Integrity](https://w3c.github.io/webappsec-subresource-integrity/) for each unpacked file\n- `[opts.ignore]` - `(filename: string) => boolean` - a function that decides whether a file should be unpacked from the tarball.\n\n## License\n\n[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)\n","publish_time":1582143016760,"_cnpm_publish_time":1582143016760,"dist-tags":{"beta":"0.1.1","latest":"6.0.0","next":"5.0.1"}}