{"bugs":{"url":"https://github.com/ipfs/js-ipfs-http-response/issues"},"dist":{"shasum":"72bbc36a40ad51ee0bfd2c88e6acd248665b04d3","tarball":"https://registry.npmjs.org/ipfs-http-response/-/ipfs-http-response-1.0.6-rc.12.tgz","fileCount":30,"integrity":"sha512-BFS6Wx9oED+5Qs/f1tfHrptygLu73VNAN87k5MlRnoHmydmnp2Fcr06zYtxREe4VZ+PAfFxdfrp6Zdslt7naDA==","signatures":[{"sig":"MEYCIQDGDkj7O9BtBvJUo7OctUDNn2iJXFaErBxEUJwTu8KlQQIhANjrF+OYGPDiTfRGMALaLLbp2/iH5KPn/d3ExtZ/RBcI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueUjCRA9TVsSAnZWagAABPgP/jlEDQMCk/rM1f0+YSne\nMmWPa95aIJNXXO6Y/IKhNSF378STEWRyvqJCHMwSpJ4d0rRX/HFhAIQTQqeU\nqoEYuBDpmYy4AjRVBJa8CABHWwJwCS58y81a5l1jBQQ/BU1qTi7ShGCNcQqg\nYq5j4huxYsRkE0QfS9GtUt9bX7iPzq1IkdD0bbv2UBPcA7H61HInGKaG6EaL\nxs2uzWJAsJyMG0HYddaY5W6f3oS2IP+MzDEpTiODK/k469WgvmhKS5GYDFkR\nLVhXO5HgagoCiWCxuWVnC7luBW16BhFZgdN/vtMrDnSVDE2wesaG6sKABiwz\niO3bU9FZgS68GgcZpKbISoDrqRLWvGDanVIOU2o8oLOxXS5Qz6t5Vyg3uBzb\nKJ3IIEQuaG+hsP2x7LfhcUezLbvYEHdTq5mtTCd9/e1RAkq4c4Tlmy6lBuFp\n0++N3K9uSRJDbN2N24qyzIpFXGBZaC4K2j9hSv8DvqqIFdWjg0sFbZfEJigw\ngmqpjZD6HpxVrBpTCh/P7GZHosLoIHEYX+bAQ1bCKbCO0RjJpG+FpOSm5WXB\nvByXxJX0X9Csgk8nIHHiSMjyOeppKHkNDjYKkviGCSO1wIRfDIlR4baH20V2\ngA2MhawcPe61/15c2AoSEzlGshYZXeVwGRFAygJqrIhrN77tVFvhjL3e80lM\nXRno\r\n=tazR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./cjs/src/index.js","name":"ipfs-http-response","types":"types/src/index.d.ts","author":{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},"readme":"# js-ipfs-http-response\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\n[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![standard-readme](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> Creates an HTTP response from an IPFS Hash\n\n## Lead Maintainer\n\n[Vasco Santos](https://github.com/vasco-santos).\n\n### Installation\n\n> npm install ipfs-http-response\n\n## Usage\n\n\n### Creating HTTP Response\n\nThis project creates a HTTP response for an IPFS Path. This response can be a file, a HTML with directory listing or the entry point of a web page.\n\n```js\nimport { getResponse } from 'ipfs-http-response'\n\nconst result = await getResponse(ipfsNode, ipfsPath)\nconsole.log(result)\n```\n\n### Using protocol-agnostic resolver\n\nThis module also exports the used ipfs `resolver`, which should be used when the response needs to be customized or non-HTTP transport is used:\n\n```js\nimport { resolver } from 'ipfs-http-response'\n\nconst result = await resolver.cid(ipfsNode, ipfsPath)\nconsole.log(result)\n```\n\nIf `ipfsPath` points at a directory, `resolver.cid` will throw Error `This dag node is a directory` with a `cid` attribute that can be passed to `resolver.directory`:\n\n\n```js\nimport { resolver } from 'ipfs-http-response'\n\nconst result = await resolver.directory(ipfsNode, ipfsPath, cid)\nconsole.log(result)\n```\n\n`result` will be either a `string` with HTML directory listing or an array with CIDs of `index` pages present in inspected directory.\n\n![ipfs-http-response usage](docs/ipfs-http-response.png \"ipfs-http-response usage\")\n","browser":{".":"./cjs/src/index.js"},"exports":{".":{"import":"./esm/src/index.js","browser":"./esm/src/index.js","require":"./cjs/src/index.js"}},"gitHead":"6eeaca452c36fa13be42d704575c577e4ca938f1","license":"MIT","scripts":{"lint":"aegir ts -p check && aegir lint","test":"aegir test -t node","build":"aegir build --no-bundle","clean":"rimraf ./dist","pretest":"aegir build --esm-tests","dep-check":"aegir dep-check -i rimraf -i global","test:node":"aegir test -t node"},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"homepage":"https://github.com/ipfs/js-ipfs-http-response#readme","keywords":["ipfs","http","response"],"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details","repository":{"url":"git+https://github.com/ipfs/js-ipfs-http-response.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","description":"Creates an HTTP response from an IPFS Hash","directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_nodeVersion":"16.13.1","contributors":[{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Hector Sanjuan","email":"code@hector.link"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"André Cruz","email":"andremiguelcruz@msn.com"},{"name":"Irakli Gozalishvili","email":"rfobic@gmail.com"},{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"}],"dependencies":{"ejs":"^3.1.6","debug":"^4.3.1","filesize":"^8.0.0","file-type":"^16.0.0","it-buffer":"^0.1.1","it-concat":"^2.0.0","it-reader":"^3.0.0","mime-types":"^2.1.30","p-try-each":"^1.0.1","it-to-stream":"^1.0.0"},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"typesVersions":{"*":{"*":["types/*","types/src/*"],"types/*":["types/*","types/src/*"]}},"_hasShrinkwrap":false,"leadMaintainer":"Vasco Santos <vasco.santos@moxy.studio>","readmeFilename":"README.md","devDependencies":{"aegir":"^36.0.1","global":"^4.4.0","it-all":"^1.0.4","rimraf":"^3.0.2","ipfs-core":"^0.12.3-rc.12+6eeaca45","ipfsd-ctl":"^10.0.4","@types/ejs":"^3.1.0","get-stream":"^6.0.0","uint8arrays":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ipfs-http-response_1.0.6-rc.12_1639572771737_0.9673565141181613","host":"s3://npm-registry-packages"},"_id":"ipfs-http-response@1.0.6-rc.12","version":"1.0.6-rc.12"}