ipfs-unixfs-exporter
Advanced tools
Comparing version
@@ -6,3 +6,4 @@ import { CID } from 'multiformats/cid'; | ||
import type { Bucket } from 'hamt-sharding'; | ||
export interface ExporterOptions { | ||
import type { ProgressOptions } from 'progress-events'; | ||
export interface ExporterOptions extends ProgressOptions { | ||
offset?: number; | ||
@@ -9,0 +10,0 @@ length?: number; |
@@ -5,3 +5,3 @@ import { CID } from 'multiformats/cid'; | ||
const resolve = async (cid, name, path, toResolve, resolve, depth, blockstore, options) => { | ||
const block = await blockstore.get(cid); | ||
const block = await blockstore.get(cid, options); | ||
const object = dagCbor.decode(block); | ||
@@ -8,0 +8,0 @@ let subObject = object; |
@@ -58,5 +58,3 @@ import extractDataFromBlock from '../../../utils/extract-data-from-block.js'; | ||
return async () => { | ||
const block = await blockstore.get(op.link.Hash, { | ||
signal: options.signal | ||
}); | ||
const block = await blockstore.get(op.link.Hash, options); | ||
return { | ||
@@ -63,0 +61,0 @@ ...op, |
@@ -22,3 +22,3 @@ import parallel from 'it-parallel'; | ||
// descend into subshard | ||
const block = await blockstore.get(link.Hash); | ||
const block = await blockstore.get(link.Hash, options); | ||
node = decode(block); | ||
@@ -25,0 +25,0 @@ return { entries: listDirectory(node, path, resolve, depth, blockstore, options) }; |
{ | ||
"name": "ipfs-unixfs-exporter", | ||
"version": "13.0.0", | ||
"version": "13.0.1", | ||
"description": "JavaScript implementation of the UnixFs exporter used by IPFS", | ||
@@ -153,2 +153,3 @@ "license": "Apache-2.0 OR MIT", | ||
"p-queue": "^7.3.0", | ||
"progress-events": "^1.0.0", | ||
"uint8arrays": "^4.0.2" | ||
@@ -155,0 +156,0 @@ }, |
@@ -9,4 +9,5 @@ import errCode from 'err-code' | ||
import type { Bucket } from 'hamt-sharding' | ||
import type { ProgressOptions } from 'progress-events' | ||
export interface ExporterOptions { | ||
export interface ExporterOptions extends ProgressOptions { | ||
offset?: number | ||
@@ -13,0 +14,0 @@ length?: number |
@@ -7,3 +7,3 @@ import { CID } from 'multiformats/cid' | ||
const resolve: Resolver = async (cid, name, path, toResolve, resolve, depth, blockstore, options) => { | ||
const block = await blockstore.get(cid) | ||
const block = await blockstore.get(cid, options) | ||
const object = dagCbor.decode<any>(block) | ||
@@ -10,0 +10,0 @@ let subObject = object |
@@ -75,5 +75,3 @@ import extractDataFromBlock from '../../../utils/extract-data-from-block.js' | ||
return async () => { | ||
const block = await blockstore.get(op.link.Hash, { | ||
signal: options.signal | ||
}) | ||
const block = await blockstore.get(op.link.Hash, options) | ||
@@ -80,0 +78,0 @@ return { |
@@ -30,3 +30,3 @@ import parallel from 'it-parallel' | ||
// descend into subshard | ||
const block = await blockstore.get(link.Hash) | ||
const block = await blockstore.get(link.Hash, options) | ||
node = decode(block) | ||
@@ -33,0 +33,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
204372
0.09%17
6.25%32418
-12.79%1969
-0.1%+ Added
+ Added