{"_id":"kraken","_rev":"41-e4b696d46c369c6c9a6965deb51845c6","name":"kraken","description":"Plug into the power and speed of Kraken.io Image Optimizer","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"kraken","version":"0.0.1","author":{"name":"Przemek Matylla","email":"przemek@matylla.pl"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","main":"./lib/kraken","repository":{"type":"git","url":"git://github.com/matylla/node-kraken.git"},"keywords":["kraken","kraken.io","image optimizer"],"license":"MIT","engine":{"node":">=0.4"},"_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"_id":"kraken@0.0.1","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"f7ef5795132ef83a428802a4422371c40a598a5b","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.0.1.tgz","integrity":"sha512-ZZveHGlU/473hykYW26Mb1jHNboTyQSSzhFzjCaB05nG7Sj8PZ4FijncXvraFUhXQuGyzn53/7bj6dE72s0stA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsLMhe60m5R59PNlvDGmi1naX77oF509txBOCb/MGnzQIgazYK5UjLmwV8I9hD8iaQBKwstyjV46jJ9aSc5cNsxQE="}]},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.1.0":{"name":"kraken","version":"0.1.0","author":{"name":"Przemek Matylla","email":"przemek@matylla.pl"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","main":"./lib/kraken","repository":{"type":"git","url":"git://github.com/matylla/node-kraken.git"},"keywords":["kraken","kraken.io","image optimizer"],"license":"MIT","engine":{"node":">=0.4"},"_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"_id":"kraken@0.1.0","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"3001989e7f658c7075edc5b751d000f52b9ee2d9","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.1.0.tgz","integrity":"sha512-9IdNF0w/kbjcEDVehJ0u+Uj1tSaUTPoqSucqQalQfq6fBMNhX6Tcr/LEFynroOd8yT+9g4vJi0mRHZ2U5VhcwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDua03N+7Ij2gZIyFJWPqylRKkNM++di9cT8er9GvTajgIgN9SbIqXFKWfaUWOep6SqhrOfbOSAItZN/v+/+8hDhzg="}]},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.1.2":{"name":"kraken","version":"0.1.2","author":{"name":"Przemek Matylla","email":"przemek@matylla.pl"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/matylla/node-kraken","main":"./lib/kraken","repository":{"type":"git","url":"git://github.com/matylla/node-kraken.git"},"keywords":["kraken","kraken.io","image optimizer"],"license":"MIT","engine":{"node":">=0.4"},"_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"_id":"kraken@0.1.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"499cf3b2524dcdf97832d1a516f05aef748bff62","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.1.2.tgz","integrity":"sha512-Y4qaLC1758JCLxyG8HUsp1/qyF0um1rGtxhzA/mX9x5Iub4XodfS0hH50EFbOen/3J3+ZESxwk90QdaSPwc5cA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9gy1CvC5KxqtMkmyc3VkPQZa4TIULusaqjk7nqIYLXAIhAJYmFbgmYnMDa5OgUQ+/buiIksAJHrvtvGWB0PxfHBzn"}]},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.2.0":{"name":"kraken","version":"0.2.0","author":{"name":"Przemek Matylla","email":"przemek@matylla.pl"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer"],"license":"MIT","engine":{"node":">=0.6"},"dependencies":{"multiparter":"0.1.4","mime":"1.2.9"},"bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.2.0","dist":{"shasum":"b5903dd7e01781529e7249a974987804a0b6de61","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.2.0.tgz","integrity":"sha512-o48LgcU5okiN+YM6h+3Ho6SOWPBNkqA/XfBPoMd22iOa6v87ccNGYA/859kVJCOtKFJ9w87Uz0z5B7BQQpJtzA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+C1CoeU8R46wkP8I6uRdoXr7aGxwSlOHhpH0shqbyDwIgJ/BewZJS1VCQFLUr3ZJCjo8e4hzHTljsKyaA/CuUtis="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.2.1":{"name":"kraken","version":"0.2.1","author":{"name":"Przemek Matylla","email":"przemek@matylla.pl"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer"],"license":"MIT","engine":{"node":">=0.6"},"dependencies":{"multiparter":"0.1.4","mime":"1.2.9"},"bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.2.1","dist":{"shasum":"877055149538d1b9b587f17fa4df0143ad90c267","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.2.1.tgz","integrity":"sha512-kCs33m/tYsjuZb77Co+YhcgJFFASTdpGVIdq7F7SF27RmS+xbZ91Ea6CFmD1x84F7T/fv/9FA8TupZHMfGwxbQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6WD/uQ0Ws9MkhAScPl6pLIxQlkKMpDwfIRE2+306TiwIgPz2uPUMSTv9ThOuzS+XSR7WWzAb1Y1az56mPw52bVPQ="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.3.0":{"name":"kraken","version":"0.3.0","author":{"name":"Kraken.io","email":"support@kraken.io"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer","image optimiser"],"license":"MIT","engine":{"node":">=0.8"},"dependencies":{"mime":"1.2.9","multiparter":"0.1.4","request":"^2.67.0"},"gitHead":"3219cd4eda808c5bf2a2aac0729ca1e50dd6c824","bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.3.0","scripts":{},"_shasum":"cce8bf7b89d6d6198b722c2723f8eff3efed656c","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"dist":{"shasum":"cce8bf7b89d6d6198b722c2723f8eff3efed656c","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.3.0.tgz","integrity":"sha512-bJ5/vjwZ5OqT5fG5XHIB3gcCBDQ+KQLJL76gkQQd2/KYr/sNoAwNX3L+fAEpO9zz56kDsxJazZN/qBFCWdZRJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4CyD46vd9dtdoLIqLZ62f6NxH8+QWviY43ns0dhjZiQIgcq9/DqEDZ6Q2xHvSreNybedmrtEMhsLj8mYWZ86Cg5g="}]},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.3.1":{"name":"kraken","version":"0.3.1","author":{"name":"Kraken.io","email":"support@kraken.io"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer","image optimiser"],"license":"MIT","engine":{"node":">=0.8"},"dependencies":{"mime":"1.2.9","multiparter":"0.1.4","request":"^2.67.0"},"gitHead":"e6e4ef274654a6a2de51972fda9ca381c54755d0","bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.3.1","scripts":{},"_shasum":"8291eb040e9c446b0ab6c2a0726260aabd7a969a","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"dist":{"shasum":"8291eb040e9c446b0ab6c2a0726260aabd7a969a","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.3.1.tgz","integrity":"sha512-TCOYLI6kTHth7M7h/EJkvypo36SRBicJ15NMSxfLYgUAABhqFReKlt6JLWPpx9DYCSEMoagAozSI8+oaUnce7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0Wzg8Ib8OEXpLyADiEuqUBRO2gr9rWi82x06MS9gAQAIgPid5h9N14hrrT0IgQ3tAQK9AG4xFaApM+uZl0gldfPs="}]},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.3.2":{"name":"kraken","version":"0.3.2","author":{"name":"Kraken.io","email":"support@kraken.io"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer","image optimiser"],"license":"MIT","engine":{"node":">=0.8"},"dependencies":{"mime":"1.2.9","multiparter":"0.1.4","request":"^2.67.0"},"gitHead":"57b7abc9cf038868ef53ea86c9980d20174995d3","bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.3.2","scripts":{},"_shasum":"524ad328bc91f9db4433c0c39cb4b8a926e80df0","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"dist":{"shasum":"524ad328bc91f9db4433c0c39cb4b8a926e80df0","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.3.2.tgz","integrity":"sha512-5lqhN+pnlxRxlT7EhP9v/LhmBZrVbOxIKIw1/R++sZnpqEtobhX5aShreqcx/l7MvX9R/G2OEPk0/yMQfBcVKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0KQKlVGBejz1hsdaBawXmXKYO/9RXOaIgpayIm9ppRwIgD85UpA8GNqI12pENd23b5vJVq+zhzOrNkwQjWs7T1FM="}]},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.3.3":{"name":"kraken","version":"0.3.3","author":{"name":"Kraken.io","email":"support@kraken.io"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer","image optimiser"],"license":"MIT","engine":{"node":">=0.8"},"dependencies":{"mime":"1.2.9","request":"^2.67.0"},"gitHead":"dc4d24a16215b82fcc264314a7d203f1822104bf","bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.3.3","scripts":{},"_shasum":"6e70cc2a46fbda832cb248fdf0498ccef24b4d87","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"dist":{"shasum":"6e70cc2a46fbda832cb248fdf0498ccef24b4d87","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.3.3.tgz","integrity":"sha512-nGDJVYrZm26eoQPZ1GbRew4zYIFLVZArfR8+k0UnjNSvDDDD0Y+5rDU/9tFj0WjakEgDU/iTYFRTvL5pKnCEOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDDKAtDdl10DdJHWBqb4zfWmcFA+lgkBLQwCiKPgYMPhAiEAt+WmKNcQX+22EuEyOj85B4XMGykYr1X2NOwzL6IZgbQ="}]},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{}},"0.3.5":{"name":"kraken","version":"0.3.5","author":{"name":"Kraken.io","email":"support@kraken.io"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"git+https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer","image optimiser"],"license":"MIT","engine":{"node":">=0.8"},"dependencies":{"request":"^2.67.0"},"gitHead":"2af80e9e713b5befb3331e14437082532b3ca29d","bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.3.5","_npmVersion":"5.5.1","_nodeVersion":"9.0.0","_npmUser":{"name":"matylla","email":"przemek@matylla.pl"},"dist":{"integrity":"sha512-QpaO6sGWQ7y3zJbIPlfRZdcAIGLfqIdro8Wujf+JXdRL7OJAx3l/y+UmDG8lFqsaWfsw8c6Mis7Zwjy0HpmmKQ==","shasum":"6033fe28c1237cb54dd093d5aa5b4bf2ed38485e","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.3.5.tgz","fileCount":5,"unpackedSize":17955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBq88CRA9TVsSAnZWagAAFP0QAJcvYU3a7S5nBW2YgLbv\nlrSSrISJzlFoyjpGkloSLUj0/O2JKJxdfoGhkuXWnRXOQZsB2vVb0gbwnUqM\n13HyRACUpWGnqYgf7HVIYxuKreLBATpTiMJrXdWIuF3KRHmjoZJeNpvw1JAG\nQTjvG6Xolq1eLNjb/TQTW+e0W70p9/01dZgVWvnkEzxr8GGa36KYp9F/m6gI\nl/fIQaOg/nx1ikwf1X8177sWQRinCC4RJBmLe7BycksVnJmdzOHrXMC8r7Yj\npGymLr4uGrrnB7wI99SAlIaFRBlDt5yP9bscayoP6PgIK5EfyaUz2IrboMMP\nSVG+pHkJ/Dhp9L4vt8ljy8+Wta6Rb6nPQJLCdrKcz2d6imb5qPRFANaFp93g\nP8rIxMflRAbzihVykqejsGOphRGVWu/h/xRlfGIOCKbWGpegT8KyRBcEWjjg\n1haZQz9duj/g5U9Sg7kph4pN/Fhqp2NO+4V695ks1dtpVmffYvYEOfjRFAsD\nbNjGmDPWi+EIJE1gWAPMaOmW3cwLDeUK/8XRL3SYaoBzgY2s5EPhYQeR0Liu\nuNt2jclTFvIjS7/ZgTct2kYnuyIqyEUUzo37c5yQAM7qo6x0FnBNjTdQnFxD\nkqKrEUONi884V9ShXI8iLIbPLrBVpGjUPSUxxpY/ftQ7r470b205a4FQQXC3\nMIfq\r\n=b6/c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/4IJeA5ERSUpRYSgrDkGnOp58xgqo04CvoFtNxFzJwgIgL+LW/cHaSndC6BdeOc68I4UzH1GVuTHWTHr4RgDFqCU="}]},"maintainers":[{"name":"matylla","email":"przemek@matylla.pl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kraken_0.3.5_1527164730925_0.7238520261057753"},"_hasShrinkwrap":false,"deprecated":"This version accidentally included a breaking change; upgrade to 0.4.x for error-first callbacks, or use 0.3.6 for the legacy callback"},"0.3.6":{"name":"kraken","version":"0.3.6","author":{"name":"Kraken.io","email":"support@kraken.io"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"git+https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer","image optimiser"],"license":"MIT","engine":{"node":">=0.8"},"dependencies":{"request":"^2.67.0"},"gitHead":"f8db6fd6565d8d2d78f8f2cb055ebf9e28753cc3","bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.3.6","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"kraken-io","email":"admin@kraken.io"},"dist":{"integrity":"sha512-lmAyif9rTLTXzwZ1rulvanNomL8t6/DzMWPBIiAtTH7I7ZA8R5Fa2WxsQLdrFhSsp2w+7Vd0gx4SCC9yF/WShA==","shasum":"8cd1ed8b6f53e7d23a50ed65ca81860273bd3e38","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.3.6.tgz","fileCount":5,"unpackedSize":17747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM9eqCRA9TVsSAnZWagAAf9EP/j3uKLNncRd12SYax8m/\nl1qEQG3zIs0o+NnHSsCIE7TvF2wYVhDrRl01GU6uWyikKxzlwhfE6iw/4xos\n2IPcDPAwr93PPgnjRsKDpqLZwyfC9rhJ69jPS87vFBitod7hgYH/0PoJSeFU\n10I/u988dYicjybeXxBDJPnMf31hZZgUgXOx+dXZ4pAVKhj8bWuuA8kaWBv5\ngI9pOXAD/RKl25bSKJPoknlRD6pSO0INadPf0eBF3RhJisxtkFaFIbWG6YwD\nqCRnUXt1hC/GEQ8XEJFzT+7+yRKk8nZFVmeNSzuIqoSnqiZqqrcXYipKApEA\nk7qFDeXzEB9BnJV06LUowtdtYzni/McqphsNKXQzPRIUyHs0qIKEMOwq5uoN\ngNq080JLeYu+lKK473521pqXYRymll/noHDwFdJajOGfDPNe/YehPKSK3Eq/\nnJY52HMq1X+PIlQe3RCcXsFpxeZOw+73DaV1OOt54hvrmIHQLI2m647HlYNQ\n5BmZdoV5nCYgLLcud4tlL5SNzEYVUnKLDFVHnxtl3+ca50FKuC7jczDNhB+a\nWLzhXX9hJg+FzeUNOXdix1cOC3wNZVyBxhYhyzUK+2JCtEJm9WI2290lPqhL\nP6zgIpgGc3W2D5tTZCxWwFBm0uTcMXsHIQdsi53Oku76u0YfCdAY9GtqKvBk\n6vEr\r\n=Odq4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3W40y70YNZ8cifV7uMWFI49io9O4bkoCEdVzU9khlmQIgc/tnSzelFPzpXCoaABaie1o42COeE58tzXXLO7OqeCo="}]},"maintainers":[{"email":"admin@kraken.io","name":"kraken-io"},{"email":"przemek@matylla.pl","name":"matylla"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kraken_0.3.6_1530124202017_0.6249358501767477"},"_hasShrinkwrap":false},"0.4.0":{"name":"kraken","version":"0.4.0","author":{"name":"Kraken.io","email":"support@kraken.io"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./lib/kraken","repository":{"type":"git","url":"git+https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer","image optimiser"],"license":"MIT","engine":{"node":">=0.8"},"dependencies":{"request":"^2.67.0"},"gitHead":"fd375ec3c1c11748b9baa56d5e7a5173e2db4fc5","bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@0.4.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"kraken-io","email":"admin@kraken.io"},"dist":{"integrity":"sha512-klomyD+upk2hVPT1uvrnwfifFLyBFgrZeANFcrV3ASaCsb1y/tsuCvTXlUnmSLqXooIQRvQ9lPbOGJJeirgReg==","shasum":"97a3abf0a8cd45927fa93995cfd646d9e2017ff5","tarball":"https://registry.npmjs.org/kraken/-/kraken-0.4.0.tgz","fileCount":5,"unpackedSize":17955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2xW4CRA9TVsSAnZWagAAPL8P/1FGrftAvOZUVkJSm88/\nb81+tjrF7OvUM/ooj0RNwdyJuRXvAmg6YW0e4IckjAIAOxLlxGNSCKLHkzjm\nrEFF6BK4Eo2E6lc93ijyBhW/cNDKA1QCnWLQvdeFriIuz0XHNrBT+ObuobZg\nC0zRwFfZ4gDRBnLb0UnmnzNc6OzkoCir2O6EgKqAkKceDY+4rjNy5xlEU1mS\nX+b00epfLkA1kSCgCcZlSr1Iwzrf29eR7oogGusfe/dj5WwDS2mxjgk9ofNu\nr/00NeAdLLJ5nhRH7UuZSg+juWZuNSSFtZ8SHwwL1ZobQvxjenecLF68HF0I\njY2fgPTmQGvy+I4tnx92sXau2smQoiFuHix3kTuDfU1hgeGUyBdVefMZtgtH\nn/gCSMdwTxUQOE6beGPaY5yRQb0MEb61khvSAwKZ3BNKQ3mGwbr/RBHmccvB\nbq8tsanZ/ra0h5iXfP/TgFttMU6h1r+5VnoJNDRyiiP2+6gUwZbeOW4OR8WQ\nOU35+NfpdCJf8IpEH6GyIgRkl3y6HobJqOS4cWye9m9H0dIarQ1QugvUE/EZ\nFun7FSp2SOZL00nA0OQybFUZ19DIiOVjAYFXlgYXNWIMUZAli6NQgnIt4flZ\nl8YhZE/Uk5yixHiHgE6JkG0B9vmLfNJMNcBaEuxA53gV74l8x38xxtTZGPbm\nZIa3\r\n=p3ef\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGoMkgQrUzEKOhhyNPpGdIXEIVjXQrYJPHyR2dLUqSc2AiBjNaR00Gd83dDT1NMr0udxBJAJIfZ6wYEZEUptsTywQA=="}]},"maintainers":[{"email":"admin@kraken.io","name":"kraken-io"},{"email":"przemek@matylla.pl","name":"matylla"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kraken_0.4.0_1530124300620_0.7354894351862147"},"_hasShrinkwrap":false},"1.0.1":{"name":"kraken","version":"1.0.1","author":{"name":"Kraken.io","email":"support@kraken.io"},"description":"Plug into the power and speed of Kraken.io Image Optimizer","homepage":"https://github.com/kraken-io/kraken-node","main":"./src/kraken","repository":{"type":"git","url":"git+https://github.com/kraken-io/kraken-node.git"},"keywords":["kraken","kraken.io","image optimizer","image optimiser"],"license":"MIT","engine":{"node":">=12.20.0"},"dependencies":{"axios":"^0.24.0","form-data":"^4.0.0"},"devDependencies":{"dotenv":"^16.3.1","eslint":"^8.2.0","jest":"^28.1.3","prettier":"^2.4.1"},"scripts":{"test":"node --trace-warnings node_modules/.bin/jest --no-cache","buildDocs":"documentation build src/** -f md --github > docs/code/README.md"},"jest":{"collectCoverage":true,"coverageDirectory":"coverage","coverageProvider":"v8","coverageReporters":["json","text","lcov","clover"]},"eslintConfig":{"parserOptions":{"ecmaVersion":2017},"env":{"es6":true}},"prettier":{"printWidth":80,"tabWidth":4,"singleQuote":true,"trailingComma":"none","bracketSpacing":true,"semi":false,"useTabs":false,"overrides":[{"files":"*.yml","options":{"tabWidth":2}}]},"gitHead":"6f0f1af1ad307ccb4f2330ae904490afc8263bec","bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"_id":"kraken@1.0.1","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-UWyab1UDbL2+z1Lc1X6XIUAXZyqbfg7P09UvsVobhVH1Ybn1DWCedevvn3WEQP16g0Wcpx2mPVwIhPL4YJ7Pzw==","shasum":"7ce09438b89d7a82c1d51b8c3b257d0cf69d51fb","tarball":"https://registry.npmjs.org/kraken/-/kraken-1.0.1.tgz","fileCount":17,"unpackedSize":57056,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHfUD2IOgi3LoiFSZh5+QK1oaaMt0o3vvHJqJz9LFEQPAiB0Vjw/83Zd3QgYcXrhlNUwhyJCc1riY0eX76LT76TRJA=="}]},"_npmUser":{"name":"erenalic","email":"eren.burak.alic@toptal.com"},"directories":{},"maintainers":[{"name":"voidvolker","email":"vvr@tutanota.com"},{"name":"kraken.io","email":"admin@kraken.io"},{"name":"erenalic","email":"eren.burak.alic@toptal.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kraken_1.0.1_1690891965586_0.5837029478572777"},"_hasShrinkwrap":false}},"readme":"# Node.js module for Kraken.io API\n\n[![Build Status](https://app.travis-ci.com/kraken-io/kraken-node.svg?branch=master)](https://app.travis-ci.com/kraken-io/kraken-node)\n\nWith this Node module you can plug into the power and speed of [Kraken.io](http://kraken.io/) Image Optimizer.\n\n- [Node.js module for Kraken.io API](#nodejs-module-for-krakenio-api)\n  - [Installation](#installation)\n  - [Requirements](#requirements)\n  - [Dependencies](#dependencies)\n  - [Getting Started](#getting-started)\n  - [Downloading Images](#downloading-images)\n  - [How to use](#how-to-use)\n  - [Wait and Callback URL](#wait-and-callback-url)\n    - [Wait option](#wait-option)\n    - [Callback URL](#callback-url)\n  - [Promises](#promises)\n  - [Async/Await](#asyncawait)\n  - [Authentication](#authentication)\n  - [Usage - Image URL](#usage---image-url)\n  - [Usage - Image Upload](#usage---image-upload)\n  - [Usage - User status](#usage---user-status)\n  - [Lossy Optimization](#lossy-optimization)\n    - [PNG Images](#png-images)\n    - [JPEG Images](#jpeg-images)\n  - [Image Resizing](#image-resizing)\n  - [WebP Compression](#webp-compression)\n  - [Amazon S3 and Rackspace Cloud Files](#amazon-s3-and-rackspace-cloud-files)\n    - [Amazon S3](#amazon-s3)\n    - [Rackspace Cloud Files](#rackspace-cloud-files)\n- [LICENSE - MIT](#license---mit)\n\n## Installation\n\n    npm install kraken --save\n\n## Requirements\n\n-   Minimum NodeJS version: `12.20.0`\n\n## Dependencies\n\n-   [`form-data`](https://www.npmjs.com/package/form-data)\n-   [`axios`](https://www.npmjs.com/package/axios)\n\n## Getting Started\n\nFirst you need to sign-up for the [Kraken API](https://kraken.io/plans/) and obtain your unique **API Key** and **API Secret**. You will find both under [API Credentials](https://kraken.io/account/api-credentials). Once you have set up your account, you can start using Kraken.io's image optimization API in your applications.\n\n## Downloading Images\n\nRemember: never link to optimized images offered to download. You have to download them first, and then replace them in your websites or applications. Optimized images are available on our servers **for one hour** only, after which they are permanently deleted.\n\n## How to use\n\nYou can optimize your images in two ways - by providing an URL of the image you want to optimize or by uploading an image file directly to Kraken API.\n\nThe first option (image URL) is great for images that are already in production or any other place on the Internet. The second one (direct upload) is ideal for your deployment process, build script or the on-the-fly processing of your user's uploads where you don't have the images available online yet.\n\n## Wait and Callback URL\n\nKraken gives you two options for fetching optimization results. With the `wait` option set the results will be returned immediately in the response. With the `callback_url` option set the results will be posted to the URL specified in your request.\n\n### Wait option\n\nWith the `wait` option turned on for every request to the API, the connection will be held open unil the image has been optimized. Once this is done you will get an immediate response with a JSON object containing your optimization results. To use this option simply set `\"wait\": true` in your request.\n\n**Request:**\n\n```javascript\n{\n    \"auth\": {\n        \"api_key\": \"your-api-key\",\n        \"api_secret\": \"your-api-secret\"\n    },\n    \"url\": \"http://awesome-website.com/images/header.jpg\",\n    \"wait\": true\n}\n```\n\n**Response**\n\n```javascript\n{\n    \"success\": true,\n    \"file_name\": \"header.jpg\",\n    \"original_size\": 324520,\n    \"kraked_size\": 165358,\n    \"saved_bytes\": 159162,\n    \"kraked_url\": \"http://dl.kraken.io/d1aacd2a2280c2ffc7b4906a09f78f46/header.jpg\"\n}\n```\n\n### Callback URL\n\nWith the Callback URL the HTTPS connection will be terminated immediately and a unique `id` will be returned in the response body. After the optimization is over Kraken will POST a message to the `callback_url` specified in your request. The ID in the response will reflect the ID in the results posted to your Callback URL.\n\nWe recommend [RequestBin.com](http://requestbin.com) as an easy way to capture optimization results for initial testing.\n\n**Request:**\n\n```javascript\n{\n    \"auth\": {\n        \"api_key\": \"your-api-key\",\n        \"api_secret\": \"your-api-secret\"\n    },\n    \"url\": \"http://image-url.com/file.jpg\",\n    \"callback_url\": \"http://awesome-website.com/kraken_results\"\n}\n```\n\n**Response:**\n\n```javascript\n{\n    \"id\": \"18fede37617a787649c3f60b9f1f280d\"\n}\n```\n\n**Results posted to the Callback URL:**\n\n```javascript\n{\n    \"id\": \"18fede37617a787649c3f60b9f1f280d\"\n    \"success\": true,\n    \"file_name\": \"file.jpg\",\n    \"original_size\": 324520,\n    \"kraked_size\": 165358,\n    \"saved_bytes\": 159162,\n    \"kraked_url\": \"http://dl.kraken.io/18fede37617a787649c3f60b9f1f280d/file.jpg\"\n}\n```\n\n## Promises\n\nAll Kraken.io API methods returns promises and `cb` argument is optional:\n\n```javascript\nvar Kraken = require('kraken')\n\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n\nkraken\n    .userStatus()\n    .then((status) => console.log('Kraken user status:', status))\n    .catch((error) =>\n        console.error('Error while requesting user status:', error)\n    )\n```\n\n## Async/Await\n\nAll Kraken.io API methods support async/await syntax:\n\n```javascript\nvar Kraken = require('kraken')\n\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n\nasync function exampleAsynFunction() {\n    let result = await kraken.userStatus()\n    console.log('Kraken user status:', result)\n}\n\nexampleAsynFunction()\n```\n\n## Authentication\n\nThe first step is to authenticate to Kraken API by providing your unique API Key and API Secret while creating a new Kraken instance:\n\n```javascript\nvar Kraken = require('kraken')\n\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n```\n\n## Usage - Image URL\n\nTo optimize an image by providing image URL use the `kraken.url()` method. You will need to provide two mandatory parameters - `url` to the image and `wait` or `callback_url`:\n\n```javascript\nvar Kraken = require('kraken')\n\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n\nvar opts = {\n    url: 'http://image-url.com/file.jpg',\n    wait: true\n}\n\n// with callbacks\nkraken.url(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promises\nkraken.url(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\nDepending on a choosen response option (Wait or Callback URL) in the `data` object you will find either the optimization ID or optimization results containing a `success` property, file name, original file size, kraked file size, amount of savings and optimized image URL:\n\n```javascript\n{\n    success: true,\n    file_name: 'file.jpg',\n    original_size: 30664,\n    kraked_size: 577,\n    saved_bytes: 30087,\n    kraked_url: 'http://dl.kraken.io/d1aacd2a2280c2ffc7b4906a09f78f46/file.jpg'\n}\n```\n\nIf no saving were found, the API will return an object containing `\"success\":true` and will report saved_bytes of 0:\n\n```javascript\n{\n    success: true,\n    saved_bytes: 0,\n}\n```\n\n## Usage - Image Upload\n\nIf you want to upload your images directly to Kraken API use the `kraken.upload()` method. You will need to provide two mandatory parameters - `file` and `wait` or `callback_url`.\n\n`file` parameter have next options:\n\n-   `String` - if file parameter is a string type, then it will be interpreted as a path to file and will be loaded using `fs.createReadStream()` function\n-   `Stream` | `Buffer` | `String` - file content, will be generated random filename\n-   `Object` with next properties:\n    -   _mandatory_ `path` or `value` - if `path` is present, `value` is ignored\n    -   `path` - path to file, will be loaded using `fs.createReadStream()` function\n    -   `value` - file content, supported types: `Stream` | `Buffer` | `String`\n    -   [`filename`] - new file name to be sended to server, this parameter allow to send different file name to server\n\nIn the `data` object you will find the same optimization properties as with `url` option above.\n\n```javascript\nvar Kraken = require('kraken'),\n    fs = require('fs')\n\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n\nvar opts = {\n    file: 'file.jpg',\n    wait: true\n}\n\n// with callback\nkraken.upload(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promise\nkraken.upload(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\nBuffer as file, filename is ommited - it will be random:\n\n```javascript\nvar opts = {\n    file: fs.readFileSync('file.jpg'),\n    wait: true\n}\n\n// with callback\nkraken.upload(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promise\nkraken.upload(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\nStream as file, filename is ommited - it will be random:\n\n```javascript\nvar opts = {\n    file: fs.createReadStream('file.jpg'),\n    wait: true\n}\n\n// with callback\nkraken.upload(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promise\nkraken.upload(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\nObject as file options with path parameter:\n\n```javascript\nvar opts = {\n    file: {\n        path: 'file.jpg',\n        fileName: 'example.jpg'\n    },\n    wait: true\n}\n\n// with callback\nkraken.upload(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promise\nkraken.upload(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\nObject as file options with buffer as value:\n\n```javascript\nvar opts = {\n    file: {\n        value: fs.readFileSync('file.jpg'),\n        fileName: 'new_file_name.jpg'\n    }\n    wait: true\n}\n\n// with callback\nkraken.upload(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promise\nkraken.upload(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\n## Usage - User status\n\nIf you want to check your quotas or your account status, you can use [userStatus](https://kraken.io/docs/user-status) which will return something like:\n\n```json\n{\n    \"success\": true,\n    \"active\": true,\n    \"plan_name\": \"Enterprise\",\n    \"quota_total\": 64424509440,\n    \"quota_used\": 313271610,\n    \"quota_remaining\": 64111237830\n}\n```\n\n```javascript\nvar Kraken = require('kraken')\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n\n// with callback\nkraken.userStatus(function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success', {\n            success: data.success,\n            active: data.active,\n            quota_total: formatBytes(data.quota_total, 2),\n            quota_used: formatBytes(data.quota_used, 2),\n            quota_remaining: formatBytes(data.quota_remaining, 2)\n        })\n    }\n}) //formatBytes(data,2)\n\n// with promise\nkraken.userStatus()\n    .then(data => {\n        console.log('Success', {\n            success: data.success,\n            active: data.active,\n            quota_total: formatBytes(data.quota_total, 2),\n            quota_used: formatBytes(data.quota_used, 2),\n            quota_remaining: formatBytes(data.quota_remaining, 2)\n        })\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })//formatBytes(data,2)\n\n// Optional function which will format the bytes value\nfunction formatBytes(value, decimal) {\n    if (0 == value) return '0 Bytes'\n    var c = 1024,\n        d = decimal || 2,\n        e = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n        f = Math.floor(Math.log(value) / Math.log(c))\n    return parseFloat((value / Math.pow(c, f)).toFixed(d)) + ' ' + e[f]\n}\n```\n\n## Lossy Optimization\n\nWhen you decide to sacrifice just a small amount of image quality (usually unnoticeable to the human eye), you will be able to save up to 90% of the initial file weight. Lossy optimization will give you outstanding results with just a fraction of image quality loss.\n\nTo use lossy optimizations simply set `lossy: true` in your request:\n\n```javascript\nvar opts = {\n    file: '/path/to/image/file.jpg',\n    lossy: true,\n    wait: true\n}\n```\n\n### PNG Images\n\nPNG images will be converted from 24-bit to paletted 8-bit with full alpha channel. This process is called PNG quantization in RGBA format and means the amout of colours used in an image will be reduced to 256 while maintaining all information about alpha transparency.\n\n### JPEG Images\n\nFor lossy JPEG optimizations Kraken will generate multiple copies of a input image with a different quality settings. It will then intelligently pick the one with the best quality to filesize ration. This ensures your JPEG image will be at the smallest size with the highest possible quality, without the need for a human to select the optimal image.\n\n## Image Resizing\n\nImage resizing option is great for creating thumbnails or preview images in your applications. Kraken will first resize the given image and then optimize it with its vast array of optimization algorithms. The `resize` option needs a few parameters to be passed like desired `width` and/or `height` and a mandatory `strategy` property. For example:\n\n```javascript\nvar Kraken = require('kraken')\n\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n\nvar opts = {\n    file: '/path/to/image/file.jpg',\n    wait: true,\n    resize: {\n        width: 100,\n        height: 75,\n        strategy: 'crop'\n    }\n}\n\n// with callback\nkraken.upload(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promise\nkraken.upload(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\nThe `strategy` property can have one of the following values:\n\n-   `exact` - Resize by exact width/height. No aspect ratio will be maintained.\n-   `portrait` - Exact width will be set, height will be adjusted according to aspect ratio.\n-   `landscape` - Exact height will be set, width will be adjusted according to aspect ratio.\n-   `auto` - The best strategy (portrait or landscape) will be selected for a given image according to aspect ratio.\n-   `crop` - This option will crop your image to the exact size you specify with no distortion.\n\n## WebP Compression\n\nWebP is a new image format introduced by Google in 2010 which supports both lossy and lossless compression. According to [Google](https://developers.google.com/speed/webp/), WebP lossless images are **26% smaller** in size compared to PNGs and WebP lossy images are **25-34% smaller** in size compared to JPEG images.\n\nTo recompress your PNG or JPEG files into WebP format simply set `\"webp\": true` flag in your request JSON. You can also optionally set `\"lossy\": true` flag to leverage WebP's lossy compression:\n\n```javascript\nvar opts = {\n    file: '/path/to/image/file.jpg',\n    wait: true,\n    webp: true,\n    lossy: true\n}\n```\n\n## Amazon S3 and Rackspace Cloud Files\n\nKraken API allows you to store optimized images directly in your S3 bucket or Cloud Files container. With just a few additional parameters your optimized images will be pushed to your external storage in no time.\n\n### Amazon S3\n\n**Mandatory Parameters:**\n\n-   `key` - Your unique Amazon \"Access Key ID\".\n-   `secret` - Your unique Amazon \"Secret Access Key\".\n-   `bucket` - Name of a destination container on your Amazon S3 account.\n-   `region` - Name of the region your S3 bucket is located in.\n\n**Optional Parameters:**\n\n-   `path` - Destination path in your S3 bucket (e.g. `\"images/layout/header.jpg\"`). Defaults to root `\"/\"`.\n-   `acl` - Permissions of a destination object. This can be `\"public_read\"` or `\"private\"`. Defaults to `\"public_read\"`.\n\nThe above parameters must be passed in a `s3_store` object:\n\n```javascript\nvar Kraken = require('kraken')\n\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n\nvar opts = {\n    file: '/path/to/image/file.jpg',\n    wait: true,\n    s3_store: {\n        key: 'your-amazon-access-key',\n        secret: 'your-amazon-secret-key',\n        bucket: 'destination-bucket',\n        region: 'us-east-1'\n    }\n}\n\n// with callback\nkraken.upload(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promise\nkraken.upload(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\nThe `data` object will contain `kraked_url` key pointing directly to the optimized file in your Amazon S3 account:\n\n```javascript\n{\n    kraked_url: 'http://s3.amazonaws.com/YOUR_CONTAINER/path/to/file.jpg'\n}\n```\n\n### Rackspace Cloud Files\n\n**Mandatory Parameters:**\n\n-   `user` - Your Rackspace username.\n-   `key` - Your unique Cloud Files API Key.\n-   `container` - Name of a destination container on your Cloud Files account.\n\n**Optional Parameters:**\n\n-   `path` - Destination path in your container (e.g. `\"images/layout/header.jpg\"`). Defaults to root `\"/\"`.\n\nThe above parameters must be passed in a `cf_store` object:\n\n```javascript\nvar Kraken = require('kraken')\n\nvar kraken = new Kraken({\n    api_key: 'your-api-key',\n    api_secret: 'your-api-secret'\n})\n\nvar opts = {\n    file: '/path/to/image/file.jpg',\n    wait: true,\n    cf_store: {\n        user: 'your-rackspace-username',\n        key: 'your-rackspace-api-key',\n        container: 'destination-container'\n    }\n}\n\n\n// with callback\nkraken.upload(opts, function (err, data) {\n    if (err) {\n        console.log('Failed. Error message: %s', err)\n    } else {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    }\n})\n\n// with promise\nkraken.upload(opts)\n    .then(data => {\n        console.log('Success. Optimized image URL: %s', data.kraked_url)\n    })\n    .catch(err => {\n        console.log('Failed. Error message: %s', err)\n    })\n```\n\nIf your container is CDN-enabled, the optimization results will contain `kraked_url` which points directly to the optimized file location in your Cloud Files account, for example:\n\n```javascript\nkraked_url: 'http://e9ffc04970a269a54eeb-cc00fdd2d4f11dffd931005c9e8de53a.r2.cf1.rackcdn.com/path/to/file.jpg'\n```\n\nIf your container is not CDN-enabled `kraked_url` will point to the optimized image URL in the Kraken API:\n\n```javascript\nkraked_url: 'http://dl.kraken.io/ecdfa5c55d5668b1b5fe9e420554c4ee/file.jpg'\n```\n\n# LICENSE - MIT\n\nCopyright (c) 2013-2021 Nekkra UG\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"name":"voidvolker","email":"vvr@tutanota.com"},{"name":"kraken.io","email":"admin@kraken.io"},{"name":"erenalic","email":"eren.burak.alic@toptal.com"}],"time":{"modified":"2023-08-01T12:12:45.889Z","created":"2012-05-11T09:08:52.233Z","0.0.1":"2012-05-11T09:08:55.110Z","0.1.0":"2012-05-17T15:47:05.157Z","0.1.2":"2012-05-18T08:31:38.411Z","0.2.0":"2013-08-04T08:47:47.633Z","0.2.1":"2014-09-18T05:58:05.165Z","0.3.0":"2016-01-08T14:08:25.401Z","0.3.1":"2016-01-08T14:12:12.458Z","0.3.2":"2016-01-12T14:13:45.144Z","0.3.3":"2016-01-19T10:55:25.376Z","0.3.5":"2018-05-24T12:25:30.997Z","0.3.6":"2018-06-27T18:30:02.622Z","0.4.0":"2018-06-27T18:31:40.680Z","1.0.1":"2023-08-01T12:12:45.745Z"},"author":{"name":"Kraken.io","email":"support@kraken.io"},"repository":{"type":"git","url":"git+https://github.com/kraken-io/kraken-node.git"},"users":{"prabhash1785":true,"parkerproject":true,"tdmalone":true,"sorin89":true,"weathermaker":true},"homepage":"https://github.com/kraken-io/kraken-node","keywords":["kraken","kraken.io","image optimizer","image optimiser"],"bugs":{"url":"https://github.com/kraken-io/kraken-node/issues"},"license":"MIT","readmeFilename":"README.md"}