{"bugs":{"url":"https://github.com/ipfs/js-ipfs-http-response/issues"},"dist":{"shasum":"022dd4bc3fa5570c783e2b8aee0ee79588d1ee9c","tarball":"https://registry.npmjs.org/ipfs-http-response/-/ipfs-http-response-3.0.1-ddfb899f.0.tgz","fileCount":47,"integrity":"sha512-TBq/WlVTRqEy/Bf/z/WVMJOFiyn+cyTt7akiMSURZr4krOKNmTOKGxCEcRwR3WSpmhdLCJUfCKDMGEaY9x9qyw==","signatures":[{"sig":"MEUCIDYgUVyir3hpYXPJGNpi79+m52FXEjL1W7ZItrzyUq3YAiEA52v6787UA0RIylKz6+3vrs/ZfOXHwxBebfLlYVUb25U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1982445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilSGFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOFg/+IRRgVwGOolA2WPiPg9tUxAIHxee0Fep8m6iaRdvf3CUZWiaR\r\nIEaqKgwaV2TYMGdpkVa0kUyZ3RWAmTUllwKNQi7Uu/JnMLiXx11TkY+v2F2j\r\nToLuSDXACkjPLF19Y2HAVWDS8Esz4VMunRYRHHJNAVn+q3VJ2Y1e1gntuqFG\r\nCssQpAmYaH1mu8BThVWBSTetNRVQSbNjawvwAwtvRFG0gOQfNZeKKhFkSEME\r\nuKXk5OIcp3823vP9PqMcBY00AKR2Th7+wJ9YQAJ//TPHuCJKO+YEbdtHAEvB\r\nZBsgfPSP6C+f3Bg9ZQ66NXYtVEJFy/GuwL+6uTzpArfsOiFUMhTn9zl5Tv4g\r\nIbyzjxY5pvsU5nJglx+RKpkM92zMGP6LND3NMXvUNNzT06KOucQ5MKSJw8Fj\r\n7P+KA1lo7n1StwGdtvo8pmzQZwQpqkU54YkecGREPcr6Ylx2F16EbAd9DsLR\r\nb3W1szs2knOiwEyqybSsBI1iJq9RRwPaABUX4nvhfgnTqzgehMNzpBH5PY4c\r\nlOQ8H1Fh837eyDe2LJAnVyuQ0be391mM3AQtCbYAlFGCZCbfDosxyfA8Ot59\r\nISfqrN9kl/49h1JZqwOe31u0jtFWcMnFaUPNOscCz0PJ73ezFXy3jKzvA4oC\r\nqBMd1kCEEoGE08d9sGLNmwBiaCxqv/7I90E=\r\n=2OOC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","name":"ipfs-http-response","type":"module","types":"dist/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### 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":{"fs":false,"file-type":"file-type/browser"},"exports":{".":{"import":"./src/index.js"}},"gitHead":"87fbbf38470547cf82ced4c9fd2679df026170bd","license":"MIT","scripts":{"lint":"aegir lint","test":"aegir test -t node","build":"aegir build --no-bundle","clean":"aegir clean","dep-check":"aegir dep-check -i global","test:node":"aegir test -t node --cov"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"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.15.0+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.15.0","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","it-map":"^1.0.6","filesize":"^8.0.0","file-type":"^17.1.1","it-buffer":"^0.1.1","it-concat":"^2.0.0","it-reader":"^5.0.1","mime-types":"^2.1.30","p-try-each":"^1.0.1","it-to-stream":"^1.0.0","@libp2p/logger":"^1.1.4"},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"_hasShrinkwrap":false,"leadMaintainer":"Vasco Santos <vasco.santos@moxy.studio>","readmeFilename":"README.md","devDependencies":{"aegir":"^37.0.11","global":"^4.4.0","it-all":"^1.0.4","ipfs-core":"^0.15.1-ddfb899f.0","ipfsd-ctl":"^11.0.0","@types/ejs":"^3.1.0","get-stream":"^6.0.0","uint8arrays":"^3.0.0","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/ipfs-http-response_3.0.1-ddfb899f.0_1653940613230_0.9587520737563444","host":"s3://npm-registry-packages"},"_id":"ipfs-http-response@3.0.1-ddfb899f.0","version":"3.0.1-ddfb899f.0"}