{"name":"ipfs-unixfs-importer","version":"17.1.1","description":"JavaScript implementation of the UnixFs importer used by IPFS","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs-unixfs/tree/main/packages/ipfs-unixfs-importer#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-unixfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs-unixfs/issues"},"publishConfig":{"access":"public","provenance":true},"keywords":["IPFS"],"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js","module-sync":"./dist/src/index.js"},"./chunker":{"types":"./dist/src/chunker/index.d.ts","import":"./dist/src/chunker/index.js","module-sync":"./dist/src/chunker/index.js"},"./layout":{"types":"./dist/src/layout/index.d.ts","import":"./dist/src/layout/index.js","module-sync":"./dist/src/layout/index.js"},"./utils":{"types":"./dist/src/utils/index.d.ts","import":"./dist/src/utils/index.js","module-sync":"./dist/src/utils/index.js"}},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["CHANGELOG.md","package.json"]}]]},"scripts":{"test":"aegir test","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","build":"aegir build","clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","doc-check":"aegir doc-check","release":"aegir release"},"dependencies":{"@ipld/dag-pb":"^4.2.0","@multiformats/murmur3":"^2.2.5","blockstore-core":"^7.0.1","hamt-sharding":"^3.0.8","interface-blockstore":"^7.0.1","ipfs-unixfs":"^13.0.0","it-all":"^3.0.11","it-batch":"^3.0.11","it-first":"^3.0.11","it-parallel-batch":"^3.0.11","multiformats":"^14.0.0","progress-events":"^1.1.0","rabin-wasm":"^0.1.5","uint8arraylist":"^3.0.2","uint8arrays":"^6.1.1"},"devDependencies":{"@noble/ciphers":"^2.2.0","aegir":"^48.0.4","it-last":"^3.0.11","wherearewe":"^2.0.1"},"browser":{"fs":false},"sideEffects":false,"gitHead":"2d3af5568a948232746ab6acf1781ce602d3ba28","_id":"ipfs-unixfs-importer@17.1.1","_nodeVersion":"24.20.0","_npmVersion":"11.19.1","dist":{"integrity":"sha512-Yw91sINTxlImpXc7/D6S9SZ/SwDr/kCiy4vE6VIdbOhnbS9EsXeLnJl8TDywFP/U0bwKfWC6LuJwP8dKDQ//OA==","shasum":"30ace2ab983fb6d95f43206659a870bacd896368","tarball":"http://registry-npm.ywwl.com/ipfs-unixfs-importer/download/ipfs-unixfs-importer-17.1.1.tgz","fileCount":130,"unpackedSize":753235,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/ipfs-unixfs-importer@17.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCJcO6VI2aOvQhUY9ba9XlVqyOeG81QidYOrxubj5BtSQIgROH63eWybZ8YTxgw06UOHtNiEi6rHu47jUHoH0vu+dw="}],"size":175447,"noattachment":false,"key":"/ipfs-unixfs-importer/-/ipfs-unixfs-importer-17.1.1.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d955d2e0-b116-4946-a4ea-2c6e10b66674"}},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@ipfs.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ipfs-unixfs-importer_17.1.1_1788778918197_0.3875093646416954"},"_hasShrinkwrap":false,"readme":"# ipfs-unixfs-importer\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs-unixfs)\n[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs-unixfs/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/ipfs/js-ipfs-unixfs/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> JavaScript implementation of the UnixFs importer used by IPFS\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\n## Example\n\nLet's create a little directory to import:\n\n```console\n> cd /tmp\n> mkdir foo\n> echo 'hello' > foo/bar\n> echo 'world' > foo/quux\n```\n\nAnd write the importing logic:\n\n```TypeScript\nimport { importer } from 'ipfs-unixfs-importer'\nimport { MemoryBlockstore } from 'blockstore-core/memory'\nimport * as fs from 'node:fs'\n\n// Where the blocks will be stored\nconst blockstore = new MemoryBlockstore()\n\n// Import path /tmp/foo/\nconst source = [{\n  path: '/tmp/foo/bar',\n  content: fs.createReadStream('/tmp/foo/bar')\n}, {\n  path: '/tmp/foo/quxx',\n  content: fs.createReadStream('/tmp/foo/quux')\n}]\n\nfor await (const entry of importer(source, blockstore)) {\n  console.info(entry)\n}\n```\n\nWhen run, metadata about DAGNodes in the created tree is printed until the root:\n\n```\n{\n  cid: CID, // see https://github.com/multiformats/js-cid\n  path: 'tmp/foo/bar',\n  unixfs: UnixFS // see https://github.com/ipfs/js-ipfs-unixfs\n}\n{\n  cid: CID, // see https://github.com/multiformats/js-cid\n  path: 'tmp/foo/quxx',\n  unixfs: UnixFS // see https://github.com/ipfs/js-ipfs-unixfs\n}\n{\n  cid: CID, // see https://github.com/multiformats/js-cid\n  path: 'tmp/foo',\n  unixfs: UnixFS // see https://github.com/ipfs/js-ipfs-unixfs\n}\n{\n  cid: CID, // see https://github.com/multiformats/js-cid\n  path: 'tmp',\n  unixfs: UnixFS // see https://github.com/ipfs/js-ipfs-unixfs\n}\n```\n\n# Install\n\n```console\n$ npm i ipfs-unixfs-importer\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `IpfsUnixfsImporter` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-unixfs-importer/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://ipfs.github.io/js-ipfs-unixfs/modules/ipfs-unixfs-importer.html>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-ipfs-unixfs/blob/main/packages/ipfs-unixfs-importer/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/ipfs/js-ipfs-unixfs/blob/main/packages/ipfs-unixfs-importer/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribute\n\nContributions welcome! Please check out [the issues](https://github.com/ipfs/js-ipfs-unixfs/issues).\n\nAlso see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.\n\nPlease be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)\n","publish_time":1788778918362,"_cnpm_publish_time":1788778918362,"dist-tags":{"latest":"17.1.1","next":"9.0.7-rc.7"}}