ipfs-unixfs-importer 15.1.0 → 15.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -52,20 +52,21 @@ And write the importing logic:
|
|
|
52
52
|
```js
|
|
53
53
|
import { importer } from 'ipfs-unixfs-importer'
|
|
54
54
|
import { MemoryBlockstore } from 'blockstore-core/memory'
|
|
55
|
+
import * as fs from 'node:fs'
|
|
55
56
|
|
|
56
57
|
// Where the blocks will be stored
|
|
57
58
|
const blockstore = new MemoryBlockstore()
|
|
58
59
|
|
|
59
|
-
// Import path /tmp/foo/
|
|
60
|
+
// Import path /tmp/foo/
|
|
60
61
|
const source = [{
|
|
61
62
|
path: '/tmp/foo/bar',
|
|
62
|
-
content: fs.createReadStream(
|
|
63
|
+
content: fs.createReadStream('/tmp/foo/bar')
|
|
63
64
|
}, {
|
|
64
65
|
path: '/tmp/foo/quxx',
|
|
65
|
-
content: fs.createReadStream(
|
|
66
|
+
content: fs.createReadStream('/tmp/foo/quux')
|
|
66
67
|
}]
|
|
67
68
|
|
|
68
|
-
for await (const entry of importer(source, blockstore
|
|
69
|
+
for await (const entry of importer(source, blockstore)) {
|
|
69
70
|
console.info(entry)
|
|
70
71
|
}
|
|
71
72
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ipfs-unixfs-importer",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.1",
|
|
4
4
|
"description": "JavaScript implementation of the UnixFs importer used by IPFS",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/js-ipfs-unixfs/tree/master/packages/ipfs-unixfs-importer#readme",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"err-code": "^3.0.1",
|
|
165
165
|
"hamt-sharding": "^3.0.0",
|
|
166
166
|
"interface-blockstore": "^5.0.0",
|
|
167
|
-
"interface-store": "^
|
|
167
|
+
"interface-store": "^5.0.1",
|
|
168
168
|
"ipfs-unixfs": "^11.0.0",
|
|
169
169
|
"it-all": "^2.0.0",
|
|
170
170
|
"it-batch": "^2.0.0",
|