{"name":"@ndelangen/get-tarball","version":"3.0.7--canary.49a7f05.0","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","auto":"^10.42.1","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","got":"^12.5.3","typescript":"^4.9.5"},"dependencies":{"gunzip-maybe":"^1.4.2","pump":"^3.0.0","tar-fs":"^2.1.1"},"publishConfig":{"access":"public"},"auto":{"plugins":["npm"]},"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://ghub.io/gunzip-maybe): Transform stream that gunzips its input if it is gzipped and just echoes it if not\n- [pump](https://ghub.io/pump): pipe streams together and close all of them if one of them closes\n- [tar-fs](https://ghub.io/tar-fs): filesystem bindings for tar-stream\n\n## Dev Dependencies\n\n- [@types/gunzip-maybe](https://ghub.io/@types/gunzip-maybe): TypeScript definitions for gunzip-maybe\n- [@types/jest](https://ghub.io/@types/jest): TypeScript definitions for Jest\n- [@types/node](https://ghub.io/@types/node): TypeScript definitions for Node.js\n- [@types/pump](https://ghub.io/@types/pump): TypeScript definitions for pump\n- [@types/tar-fs](https://ghub.io/@types/tar-fs): TypeScript definitions for tar-fs\n- [http-test-server](https://ghub.io/http-test-server): Create a simple http server for tests\n- [jest](https://ghub.io/jest): Delightful JavaScript Testing.\n- [package-json-to-readme](https://ghub.io/package-json-to-readme): Generate a README.md from package.json contents\n- [tar-stream](https://ghub.io/tar-stream): tar-stream is a streaming tar parser and generator and nothing else. It operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.\n- [tmp](https://ghub.io/tmp): Temporary file and directory creator\n- [ts-jest](https://ghub.io/ts-jest): A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript\n- [tsup](https://ghub.io/tsup): Bundle your TypeScript library with no config, powered by esbuild\n- [got](https://ghub.io/got): Human-friendly and powerful HTTP request library for Node.js\n- [typescript](https://ghub.io/typescript): TypeScript is a language for application scale JavaScript development\n\n## License\n\nMIT\n","readmeFilename":"readme.md","gitHead":"49a7f0567164fda11a9998c0813af9d4cc7d5a98","_id":"@ndelangen/get-tarball@3.0.7--canary.49a7f05.0","_nodeVersion":"18.14.1","_npmVersion":"9.3.1","dist":{"integrity":"sha512-VqOfNpxKXhtYtfZG4NqWli1jc2oZeHbcFGbZaeJrp1Q3zXUxoN/j1wBSU+fiq2M2MXG97+OWkZU9RAMgSRbQHA==","shasum":"4b28283c3169960be720e84d19e26d396da59039","tarball":"http://registry-npm.ywwl.com/@ndelangen/get-tarball/download/@ndelangen/get-tarball-3.0.7--canary.49a7f05.0.tgz","fileCount":8,"unpackedSize":584419,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnn+6D95Aorii5z/HnBZef2hE4RqvTRVFU+/+MgpIrVQIgV7jdO3JfggvtemZJbS3kt8DX+UYDXu8bpxOPpBOnGLY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAGtjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqG6BAAhivWui83JJFYVxiowkGB0mdElJgdbirDug+QnAxLjdHdIMgJ\r\nfS8SO3ZYQMZ54eL0PpmGUx2UkVKGFpeH3XsmW7uC23BfuwFTLqlKd5h9wzTx\r\npOKrOKgbt3j5uE6CfEXu53xgW7wd72rVwuspg5wEZHqqkB8Wtt0zJ2JBNQAo\r\nr3l9iKW/0SIXX6heYWxt+hzkq1eXg9WTvpj8aOJ5rDzTDP4IkDk8510gqE8u\r\nFQ+AxN3vp8wHVhX3L4vAxTKcFRovfzdQh4zZeI8uFqCcKQqSI4S9fMxxQAp0\r\nqW3RsT11hmLRoWpZunDOP0oOQ0UFKUaiQ9EOwjBWPapkQxtfm/4nHuWCvB33\r\ncjz0mv3JKXOVvJiSitV3OZwra3q2wg5giOBrsmzE62wSYAC0EbfNlRBEhoQy\r\nmBY7x7A2BS/ZQHsXPkY73X0/ovN3aoWcViaVrPoyromB6cIOs334hUREylBC\r\nVSJVPfQTsztJ4DDTI6g0oXBoSAupL/1/T3i5JsMfLfr7JDV2w6NQEdQfvv3Y\r\ncb1/V1fayeIpEzTSWBTBKYwDOwkVTG5Ll7V8gF99Kzqe2iQqbC8xDZkd9fQj\r\nNHA8+pxkDXtYx1iYKIWcRqIeOlfFequ9YzI+aKvW44NOAW71EeiPnpmTypa/\r\nwRtGuLwjVecoE5P8wksS4+WDgj9velgAr/w=\r\n=u3Y9\r\n-----END PGP SIGNATURE-----\r\n","size":123397,"noattachment":false,"key":"/@ndelangen/get-tarball/-/@ndelangen/get-tarball-3.0.7--canary.49a7f05.0.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.7--canary.49a7f05.0_1677749091607_0.1859533189417628"},"_hasShrinkwrap":false,"publish_time":1677749091744,"_cnpm_publish_time":1677749091744,"dist-tags":{"canary":"3.0.7--canary.49a7f05.0","latest":"3.0.9"}}