{"_id":"@antongolub/tgz-modify","_rev":"4-4cdeb035cb870696592ba30c81461508","name":"@antongolub/tgz-modify","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.4":{"name":"@antongolub/tgz-modify","version":"1.0.4","description":"modify .tgz file entries:","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Greg Hedin"},"license":"MIT","dependencies":{"tar-stream":"^1.6.2"},"devDependencies":{"chalk":"^1.1.3"},"repository":{"type":"git","url":"git+https://github.com/antongolub/tgz-modify.git"},"keywords":["tar","tgz","modify","change"],"bugs":{"url":"https://github.com/antongolub/tgz-modify/issues"},"typings":"index.d.ts","homepage":"https://github.com/antongolub/tgz-modify#readme","gitHead":"25df922e9ae116f21d0211fda6f18585bb03a6cc","_id":"@antongolub/tgz-modify@1.0.4","_nodeVersion":"16.14.0","_npmVersion":"8.5.4","dist":{"integrity":"sha512-0NipH+lN76uaM4eaF8zf/UxiGGSOPh+jDe4MmzWVuknjTpaBApH9xuwUnTlHOiWCva6ErtwhBXVumxP6yFXQGw==","shasum":"d5161867b793f144aead4ee71008e0e81d33d083","tarball":"https://registry.npmjs.org/@antongolub/tgz-modify/-/tgz-modify-1.0.4.tgz","fileCount":10,"unpackedSize":7059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOf5aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3xA/9GvGilAKM59DJTo0bKK89s7ADOeqsNUozTJiw2GQ0FfNLUJ2O\r\npMiaFfbaSFyPgf2MOkWjMO4Mm5zBN3hF+QuzHDgupiOZKQCyz7YVyOA1XcDk\r\nDH4a+l54gu8FF7H0DClN/ST+PIeoGpImBCB73xlSGk6h8xn+gmUORhzPAyx8\r\nPFrOSPMLLnEShEOJilfjCbidjkVPcwzX1KtqXSpGiuIgNlTCrrG3NlNvtUmz\r\nrMGMO6rrARdapQlQzvblq2RbBdVT328Z/u9emYWYsp4m1RX9E/1GMspJ6YqM\r\n7n0xQJ+EiRSQUazm7wkb2P6CHuEj2WHcusrc+4S27u1iGjqnaoOhjzLqHgV/\r\nFSrMAQZotHdPpDEkKk/YK9vM1tR/37pHmOvcw+lMH7zkFOW7Z5HAwSlw5DO8\r\nipLIYVJe7gaBIo5sauONNMHD+nE03JqFScDvjNGI7A5VDgTYWyYazSBVvqOZ\r\nm5QKRmObTD5uNXXRYFb2bRE/ntJ55VKPI7B5+GGT1EU4iwN1AJC+JAJU9eww\r\nCErcL5mRtQOmsN8J49BMV8kZ9Wb8rjHdgwFrvRstBSsIAL9soeW0YDzeJAwA\r\n9ZkgkI7Q70Ss4qbC2xxAimosWlSgpDK3pTywlsYqGaeO4pCQjSg78ZNdNSH/\r\nu22MHDkCsA2oS8K4HoSgCre/GViia+2oEbg=\r\n=3xM2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjAAQn9/hdYnjNwiS94U9LX5nqXJT6Q6UyNwWqWoaSAQIgFv4+3jY8j5IcNUfMdjuKEnH9R3hIxyVLg7K8VB8ycoE="}]},"_npmUser":{"name":"antongolub","email":"golub.anton@gmail.com"},"directories":{},"maintainers":[{"name":"antongolub","email":"golub.anton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tgz-modify_1.0.4_1647967834698_0.569394582061916"},"_hasShrinkwrap":false},"1.0.5":{"name":"@antongolub/tgz-modify","version":"1.0.5","description":"modify .tgz file entries:","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Greg Hedin"},"license":"MIT","dependencies":{"tar-stream":"^2.2.0"},"devDependencies":{"chalk":"^1.1.3"},"repository":{"type":"git","url":"git+https://github.com/antongolub/tgz-modify.git"},"keywords":["tar","tgz","modify","change"],"bugs":{"url":"https://github.com/antongolub/tgz-modify/issues"},"typings":"index.d.ts","homepage":"https://github.com/antongolub/tgz-modify#readme","gitHead":"25df922e9ae116f21d0211fda6f18585bb03a6cc","_id":"@antongolub/tgz-modify@1.0.5","_nodeVersion":"16.14.0","_npmVersion":"8.5.4","dist":{"integrity":"sha512-ExfEg5TTFIIcHDLwatZm8PXhqYgtvGntu+1sQSISzu6LdLtoCtEGEXwU0U6KmxlaXPG8X0yyxVH7SdIa0NjYzg==","shasum":"672f731b882a0a9e7f3b4a2454bbc34b01c5280e","tarball":"https://registry.npmjs.org/@antongolub/tgz-modify/-/tgz-modify-1.0.5.tgz","fileCount":10,"unpackedSize":7059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOgbrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZtA/8C1wtWhy8qZxwffanBWNU/lP1I+6Ls4l8dJYhhVjkRcLogAae\r\nZtw9DwhqsPlKqnbcTz45vq4K01+VcQsuJgbLxqYEqo7hzSBqQw6ApdYcMrsu\r\nE05jQ6u1Wj0O2jVXEenV3wBD2utZirOOURp8fJHOARs9I4q6jaZMJGuMuBk8\r\nHnxzyotNys/SS3Y9OhbJQv3znbHHuLRraT7X6BieBBx/Ca66c/N/8d9QSPJQ\r\nSzvlXnMASvVl5vBVgjjVsvh6GzEwtahm+x/zXVmJptkYjjLKLpCnzlWw6RG4\r\n+A3kVikP0go44oO0zXd5KZWGGZ/5QRxoG++HeHp0RpPXagaCqAAKD6eTl2jO\r\n7t5+KoWqMy1I+owLXRQku8WJ6TeZRODzVVfsh+lmk0ndqrEBNcIT0BFQ8MhM\r\nBQx52RuO/oOjnawJgorZfrfK7/briHtABe3I7fxQE3kWLJDRORe8vb4DV79N\r\ne8w5eWSa8yw+UrxRDD78JObcbNqy64D73e3jxaoJki4eyy6ybPfdR80RHxJV\r\njIE6MkekjOkvMmAKddQb9GWTtHl2MQ4FgzWbBW8VNgzeB8HAKJuui5N5yHwy\r\n8ungsjgfawRnRCScPRfdutCSWt83wWpalCGdqkurIhnRyOjAiEirkRjpLnYT\r\nElIf+JrXEp6JStASoHrIIcnPAt6bXVAl83E=\r\n=Dozj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEkn1dPKdvtOORANdGFW+nomlFJzjxWs5ZaPrsDFrLg1AiEAjzEIMYW7DDOOhNte/ERXveGPhuOWwYukd9Rv/J63j14="}]},"_npmUser":{"name":"antongolub","email":"golub.anton@gmail.com"},"directories":{},"maintainers":[{"name":"antongolub","email":"golub.anton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tgz-modify_1.0.5_1647970027843_0.9236562579381771"},"_hasShrinkwrap":false},"2.0.0":{"name":"@antongolub/tgz-modify","version":"2.0.0","description":"modify .tgz file entries:","main":"index.js","scripts":{"test":"node tests/test.js"},"author":{"name":"Greg Hedin"},"license":"MIT","dependencies":{"tar-stream":"^2.2.0"},"devDependencies":{"chalk":"^1.1.3"},"repository":{"type":"git","url":"git+https://github.com/antongolub/tgz-modify.git"},"keywords":["tar","tgz","modify","change"],"bugs":{"url":"https://github.com/antongolub/tgz-modify/issues"},"typings":"index.d.ts","homepage":"https://github.com/antongolub/tgz-modify#readme","gitHead":"479e8ed984487364643260d2a33310773390ecf7","_id":"@antongolub/tgz-modify@2.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.5.4","dist":{"integrity":"sha512-vyUqsmW6Akg9grxYxuUsED5jP4n8F1o329QlBjVOudjp08qYaN3tZFr396DTof8rhHcS2i92gIk/K95R2Es97Q==","shasum":"34ce663c0b92429a3f10bab98e1412e96548aaed","tarball":"https://registry.npmjs.org/@antongolub/tgz-modify/-/tgz-modify-2.0.0.tgz","fileCount":10,"unpackedSize":8643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPbFWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKKA//U7HluJWgSdzefJyL8X61w8FLb/SH/ghZqcj+IG0KOQ+fGbtS\r\ngLsZsQ7hvENBc9CjRkGgmYQPkhShvxTFTtr3RUbenU6aBmdFAwqHv3c8JWb5\r\niYopcPHDp3nLKYrMpziUCkTW09tJFaT79tRnhr4pPBAmRWW/e+I4FMrRY5Qo\r\nWNdn4li6WHOABV7LRhMTYn2hmxd9nxjQfrqicJ2loCkUQlguux3Q04Th3XRT\r\nvT+QcE8rSZXAOoDBeKjX4mrBGVAQNba/BD46I6un6OSqgLqlivn27Q2kU7Ie\r\njfX2RHkwa8Dbsyx5swoRnJOh9emgE1jeIJFjO4AF/rCpCmSv+XGZmtGlgf8x\r\nDUm2/i3AZatE4YHVV64fhgHIv0MiZS73iTpcKg0hWVeKTgX/ZnfAcKXAJJm2\r\np9FeTyfId5N41OD7Bbk+3dcvH8H4lrejKV/UUczgCK0ryy8jgucuNuVlec8c\r\nw1395mfVwfVWWKyLrjY2lwMYvu5Y8iqlRcklLGu2+TIRtrRJa4MWn1gXEzkg\r\nyZhQutcvJathQhQMEhKr9JmTGBzMEPuLGK50/oA8W4EkcB7UtrZsBsSO/M9F\r\nEYiDCSPdfToPAgIWLcTKodFs0pzzgz81QPio/QyG+IceCDdl6cAG940k5Rah\r\nOzsl/8V4TZhFLflzutgkhYJmq/n65WSM6t8=\r\n=ByDI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOwGumZ1SWmcQYJWmrzvLPmJWKmF20tkvjOd5ykrexNAIhAMvaSUt0RyVHQv7wa5Jd4l3xuYoV82kOfyGyTQjhNr4b"}]},"_npmUser":{"name":"antongolub","email":"golub.anton@gmail.com"},"directories":{},"maintainers":[{"name":"antongolub","email":"golub.anton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tgz-modify_2.0.0_1648210262780_0.5465261154622099"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-22T16:50:34.697Z","1.0.4":"2022-03-22T16:50:34.881Z","modified":"2022-04-04T14:23:14.835Z","1.0.5":"2022-03-22T17:27:07.988Z","2.0.0":"2022-03-25T12:11:02.907Z"},"maintainers":[{"name":"antongolub","email":"golub.anton@gmail.com"}],"description":"modify .tgz file entries:","homepage":"https://github.com/antongolub/tgz-modify#readme","keywords":["tar","tgz","modify","change"],"repository":{"type":"git","url":"git+https://github.com/antongolub/tgz-modify.git"},"author":{"name":"Greg Hedin"},"bugs":{"url":"https://github.com/antongolub/tgz-modify/issues"},"license":"MIT","readme":"# @antongolub/tgz-modify\nmodify **.tgz** file entries\n\n> Fork of [gforceg/tgz-modify](https://github.com/gforceg/tgz-modify) that brings async api\n\n## Install\n```bash\n# npm\nnpm i @antongolub/tgz-modify\n\n# yarn\nyarn add @antongolub/tgz-modify\n```\n\n## Usage\n* Open `./files/package.tgz`. \n* Make some changes to `package/package.json` and remove `README.md` all together.\n* Then output to a new .tgz file: `./output/package.tgz`\n\n```javascript \nconst tgz_modify = require('@antongolub/tgz-modify')\n\ntgz_modify('files/package.tgz', 'output/package.tgz', (header, data) => {\n  switch(header.name) {\n    case 'package/package.json':\n      let obj = JSON.parse(data)\n      obj.name = 'some-other-project'\n      obj.author = 'Some Jerk'\n      data = JSON.stringify(obj, null, '\\t')\n      break;\n    case 'package/README.md':\n      return null // returning null will skip the file.\n  }\n  return data\n})\n\n// to handle `onFinish` event pass an additional callback\ntgz_modify('files/package.tgz', 'output/package.tgz', (h, d) => d, (err) => {})\n\n// or just await a promise\nawait tgz_modify('files/package.tgz', 'output/package.tgz', ...)\n```\n\nTo overwrite the **.tgz** file, simply use the same filename for the output file: \n\n```javascript\ntgz.modify('./input.tgz', './input.tgz', ...)\n```\n\n## License\nMIT\n","readmeFilename":"README.md"}