{"name":"@ndelangen/get-tarball","version":"3.0.3","description":"Download a tarball (optionally gzipped) to a folder & extract it in the process. Uses the wonderful & super quick tar-fs & gunzip-maybe srcraries.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"release":"auto shipit","test":"jest","build":"tsup ./src/index.ts --clean --dts --format cjs,esm --target node16 --external tar-fs,gunzip-maybe,pump","watch":"yarn build -- --watch","prepublish":"npm run build","posttest":"readme package.json > readme.md"},"repository":{"type":"git","url":"git+https://github.com/ndelangen/download-tarball.git"},"author":{"name":"David Björklund","email":"david.bjorklund@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ndelangen/download-tarball/issues"},"homepage":"https://github.com/ndelangen/download-tarball#readme","devDependencies":{"@types/gunzip-maybe":"^1.4.0","@types/jest":"^29.4.0","@types/node":"^16.0.0","@types/pump":"^1.1.1","@types/tar-fs":"^2.0.1","got":"^12.5.3","http-test-server":"^2.0.1","jest":"^29.4.3","package-json-to-readme":"^2.1.1","tar-stream":"^3.0.0","tmp":"^0.2.1","ts-jest":"^29.0.5","tsup":"^6.6.3","typescript":"^4.9.5"},"dependencies":{"auto":"^10.42.1","gunzip-maybe":"^1.4.2","pump":"^3.0.0","tar-fs":"^2.1.1"},"publishConfig":{"access":"public"},"auto":{"plugins":["npm"]},"gitHead":"0b48978540f63234bcd41688c8d17c9b988c3ee8","_id":"@ndelangen/get-tarball@3.0.3","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-kydKL0VgrPgDAuE6IMv1lWnTDkKZh1OwfPdFcTAVujWBQujSSj/urdWYmD+3SI98yabGnmLhAPf+IvyiEiDdcA==","shasum":"bb29372e6666a9f01b12c219ed1053866c01afad","tarball":"http://registry-npm.ywwl.com/@ndelangen/get-tarball/download/@ndelangen/get-tarball-3.0.3.tgz","fileCount":8,"unpackedSize":584401,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmLNuFHBMIvLjGdD+KrauS/Kohsagx2IaetryPEMGGEgIgPA68X1ASMouP+o4CV1IGuQL2oEFg/9nzGXeG08HlfOU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9gQRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZuw//WhELP0ggijY8j67nD+y20+7G6yk5MhsziyZc+lHnp3DFS+TV\r\nOeqw3AM9y1BmVH+T8cnBmSJyLy71ffwIYg1P3cb1Q0fy7QPcMVxvpHzicxQe\r\n7ofhZ3l8wjtMq1qGc8TguAon59/+Fub7Moqc5Ei+lP9M0eTXy7iz6x7f5ZlO\r\nVMVKzFf4r26kc17wa+tKmWJm6cS3x9VW7Q7I+PktLZf+H6/6sOlYPlep4BxM\r\nMoeXik8g+okV80FOFDMBOL/q4kBHdE0P5lwctKU4kYb32YpsAXDzqiTdznmN\r\nW92CYlINtBySfXMN7p+pAPKxgYPVnyeREZnwvj1hRpHgSD0QLDWW00WvjLvF\r\nJ/bDfdUhnraBcodQq3NONavCusMmc5f1JWebDGZug9eCtqnF7vqnpeJ9BJQc\r\ncSfxIN7Tbl1Lw7q/pG/XksYJcr0Z66dc9CzW+qKV+BF39hf1IE4qEdshCLf4\r\nX4SUyPhyYEbZXbRMQot7k8mAkNVxP0lWRhj+g+A4lJjfimVaHdxhDzOinw1M\r\ntVTXwyhDNxoeZVqkYSOTM2vIY5lPONu8xieNM9rpAZHSt1EhXb18YIJVUXzJ\r\n+E91SkTmvv2d/T5+RmonGJkoSCHbFlVDc0IdAOPBu/CwDgtmJYpprJu1MvF+\r\n93Fg99d8mG+9+gk4dHKK8Bk7kqDOh9tjKsU=\r\n=EjOD\r\n-----END PGP SIGNATURE-----\r\n","size":123380,"noattachment":false,"key":"/@ndelangen/get-tarball/-/@ndelangen/get-tarball-3.0.3.tgz"},"_npmUser":{"name":"ndelangen","email":"ndelangen@me.com"},"directories":{},"maintainers":[{"name":"ndelangen","email":"ndelangen@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-tarball_3.0.3_1677067281378_0.8212501803926788"},"_hasShrinkwrap":false,"readme":"# download-tarball\n\nDownload a tarball (optionally gzipped) to a folder &amp; extract it in the process. Uses the wonderful &amp; super quick tar-fs &amp; gunzip-maybe srcraries.\n\n## Installation\n\nThis is a [Node.js](https://nodejs.org/) module available through the \n[npm registry](https://www.npmjs.com/). It can be installed using the \n[`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally)\nor \n[`yarn`](https://yarnpkg.com/en/)\ncommand line tools.\n\n```sh\nnpm install download-tarball --save\n```\n\n## Usage\n\n```js\n/* eslint-disable import/no-extraneous-dependencies */\n\nimport download from 'download-tarball';\n\ndownload({\n  url: 'http://link-to-tarball/file.tar.gz',\n  dir: '/dir/where/file/will/be/downloaded'\n}).then(() => {\n  console.log('file is now downloaded!');\n}).catch(err => {\n  console.log('oh crap the file could not be downloaded properly');\n  console.log(err);\n});\n\ndownload({\n  url: 'http://link-to-tarball/file.tar.gz',\n  dir: '/dir/where/file/will/be/downloaded',\n  // custom options that will be forwarded to got.stream(..., opts) can also be set\n  gotOpts: {\n    headers: {\n      beep: 'boop'\n    }\n  }\n}).then(() => {\n  console.log('file is now downloaded!');\n}).catch(err => {\n  console.log('oh crap the file could not be downloaded properly');\n  console.log(err);\n});\n\ndownload({\n  // neat, tar files works as well!\n  url: 'http://link-to-tarball/file.tar',\n  dir: '/dir/where/file/will/be/downloaded'\n}).then(() => {\n  console.log('file is now downloaded!');\n}).catch(err => {\n  console.log('oh crap the file could not be downloaded properly');\n  console.log(err);\n});\n\n```\n\n## Tests\n\n```sh\nnpm install\nnpm test\n```\n\n## Dependencies\n\n- [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe): Transform stream that gunzips its input if it is gzipped and just echoes it if not\n- [pump](https://github.com/mafintosh/pump): pipe streams together and close all of them if one of them closes\n- [tar-fs](https://github.com/mafintosh/tar-fs): filesystem bindings for tar-stream\n\n## License\n\nMIT\n","publish_time":1677067281548,"_cnpm_publish_time":1677067281548,"dist-tags":{"canary":"3.0.7--canary.49a7f05.0","latest":"3.0.9"}}