From 2f24a1c93f63a060552a6446f78a19672685093e Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Tue, 16 Feb 2021 14:40:35 +0100 Subject: [PATCH 01/22] fix: use @ipld/dag-pb instead of ipld-dag-pb Use the rewrite of the dag-pb codec. --- packages/ipfs-unixfs-importer/package.json | 1 + .../src/dag-builder/dir.js | 8 +++-- .../src/dag-builder/file/buffer-importer.js | 8 +++-- .../src/dag-builder/file/index.js | 29 ++++++++++++----- packages/ipfs-unixfs-importer/src/dir-flat.js | 21 +++++++----- .../ipfs-unixfs-importer/src/dir-sharded.js | 32 ++++++++++++++----- 6 files changed, 69 insertions(+), 30 deletions(-) diff --git a/packages/ipfs-unixfs-importer/package.json b/packages/ipfs-unixfs-importer/package.json index 9263d40c..132b8043 100644 --- a/packages/ipfs-unixfs-importer/package.json +++ b/packages/ipfs-unixfs-importer/package.json @@ -50,6 +50,7 @@ "util": "^0.12.3" }, "dependencies": { + "@ipld/dag-pb": "0.0.1", "bl": "^5.0.0", "cids": "^1.1.5", "err-code": "^3.0.1", diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/dir.js b/packages/ipfs-unixfs-importer/src/dag-builder/dir.js index 36106c9e..ce9c9693 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/dir.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/dir.js @@ -3,8 +3,10 @@ const { UnixFS } = require('ipfs-unixfs') const persist = require('../utils/persist') const { - DAGNode -} = require('ipld-dag-pb') + encode, + prepare +// @ts-ignore +} = require('@ipld/dag-pb') /** * @typedef {import('../types').Directory} Directory @@ -20,7 +22,7 @@ const dirBuilder = async (item, block, options) => { mode: item.mode }) - const buffer = new DAGNode(unixfs.marshal()).serialize() + const buffer = encode(prepare({ Data: unixfs.marshal() })) const cid = await persist(buffer, block, options) const path = item.path diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js index b8179e89..b7f30e34 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js @@ -3,8 +3,10 @@ const { UnixFS } = require('ipfs-unixfs') const persist = require('../../utils/persist') const { - DAGNode -} = require('ipld-dag-pb') + encode, + prepare +// @ts-ignore +} = require('@ipld/dag-pb') /** * @typedef {import('../../types').BufferImporter} BufferImporter @@ -38,7 +40,7 @@ async function * bufferImporter (file, block, options) { mode: file.mode }) - buffer = new DAGNode(unixfs.marshal()).serialize() + buffer = encode(prepare({ Data: unixfs.marshal() })) } return { diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js index 152dac91..494b29ae 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js @@ -4,9 +4,11 @@ const errCode = require('err-code') const { UnixFS } = require('ipfs-unixfs') const persist = require('../../utils/persist') const { - DAGNode, - DAGLink -} = require('ipld-dag-pb') + encode, + prepare +// @ts-ignore +} = require('@ipld/dag-pb') +const all = require('it-all') const parallelBatch = require('it-parallel-batch') const mh = require('multihashing-async').multihash @@ -90,7 +92,7 @@ const reduce = (file, block, options) => { }) const multihash = mh.decode(leaf.cid.multihash) - buffer = new DAGNode(leaf.unixfs.marshal()).serialize() + buffer = encode(prepare({ Data: leaf.unixfs.marshal() })) leaf.cid = await persist(buffer, block, { ...options, @@ -133,7 +135,11 @@ const reduce = (file, block, options) => { // node is a leaf buffer f.addBlockSize(leaf.size) - return new DAGLink('', leaf.size, leaf.cid) + return { + Name: '', + Tsize: leaf.size, + Hash: leaf.cid + } } if (!leaf.unixfs || !leaf.unixfs.data) { @@ -144,11 +150,18 @@ const reduce = (file, block, options) => { f.addBlockSize(leaf.unixfs.data.length) } - return new DAGLink('', leaf.size, leaf.cid) + return { + Name: '', + Tsize: leaf.size, + Hash: leaf.cid + } }) - const node = new DAGNode(f.marshal(), links) - const buffer = node.serialize() + const node = { + Data: f.marshal(), + Links: links + } + const buffer = encode(prepare(node)) const cid = await persist(buffer, block, options) return { diff --git a/packages/ipfs-unixfs-importer/src/dir-flat.js b/packages/ipfs-unixfs-importer/src/dir-flat.js index 0a720e4a..efd45080 100644 --- a/packages/ipfs-unixfs-importer/src/dir-flat.js +++ b/packages/ipfs-unixfs-importer/src/dir-flat.js @@ -1,10 +1,11 @@ 'use strict' const { - DAGLink, - DAGNode -} = require('ipld-dag-pb') -const { UnixFS } = require('ipfs-unixfs') + encode, + prepare +// @ts-ignore +} = require('@ipld/dag-pb') +const UnixFS = require('ipfs-unixfs') const Dir = require('./dir') const persist = require('./utils/persist') @@ -92,7 +93,11 @@ class DirFlat extends Dir { } if (child.size != null && child.cid) { - links.push(new DAGLink(children[i], child.size, child.cid)) + links.push({ + Name: children[i], + Tsize: child.size, + Hash: child.cid + }) } } @@ -102,13 +107,13 @@ class DirFlat extends Dir { mode: this.mode }) - const node = new DAGNode(unixfs.marshal(), links) - const buffer = node.serialize() + const node = { Data: unixfs.marshal(), Links: links } + const buffer = encode(prepare(node)) const cid = await persist(buffer, block, this.options) const size = buffer.length + node.Links.reduce( /** * @param {number} acc - * @param {DAGLink} curr + * @param {{ Name: string, Tsize: number, Hash: CID }} curr */ (acc, curr) => acc + curr.Tsize, 0) diff --git a/packages/ipfs-unixfs-importer/src/dir-sharded.js b/packages/ipfs-unixfs-importer/src/dir-sharded.js index e0567838..3361ed76 100644 --- a/packages/ipfs-unixfs-importer/src/dir-sharded.js +++ b/packages/ipfs-unixfs-importer/src/dir-sharded.js @@ -1,9 +1,10 @@ 'use strict' const { - DAGLink, - DAGNode -} = require('ipld-dag-pb') + encode, + prepare +// @ts-ignore +} = require('@ipld/dag-pb') const { UnixFS } = require('ipfs-unixfs') const Dir = require('./dir') const persist = require('./utils/persist') @@ -119,7 +120,11 @@ async function * flush (bucket, block, shardRoot, options) { throw new Error('Could not flush sharded directory, no subshard found') } - links.push(new DAGLink(labelPrefix, shard.size, shard.cid)) + links.push({ + Name: labelPrefix, + Tsize: shard.size, + Hash: shard.cid + }) childrenSize += shard.size } else if (typeof child.value.flush === 'function') { const dir = child.value @@ -132,7 +137,11 @@ async function * flush (bucket, block, shardRoot, options) { } const label = labelPrefix + child.key - links.push(new DAGLink(label, flushedDir.size, flushedDir.cid)) + links.push({ + Name: label, + Tsize: flushedDir.size, + Hash: flushedDir.cid + }) childrenSize += flushedDir.size } else { @@ -145,7 +154,11 @@ async function * flush (bucket, block, shardRoot, options) { const label = labelPrefix + child.key const size = value.size - links.push(new DAGLink(label, size, value.cid)) + links.push({ + Name: label, + Tsize: size, + Hash: value.cid + }) childrenSize += size } } @@ -162,8 +175,11 @@ async function * flush (bucket, block, shardRoot, options) { mode: shardRoot && shardRoot.mode }) - const node = new DAGNode(dir.marshal(), links) - const buffer = node.serialize() + const node = { + Data: dir.marshal(), + Links: links + } + const buffer = encode(prepare(node)) const cid = await persist(buffer, block, options) const size = buffer.length + childrenSize From 8779482693c40c606aa09e54a933923e0b1fc5a5 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Wed, 24 Feb 2021 15:47:00 +0100 Subject: [PATCH 02/22] WIP: all in using js-multiformats for everying - One test suite is commented out - bignumber.js was added as dependency to work around a type bug - some types should work, but don't, hence there are too many `// @ts-ignores` - webworker tests are broken, due to a bug in js-multiformats --- packages/ipfs-unixfs-exporter/package.json | 10 +- packages/ipfs-unixfs-exporter/src/index.js | 36 +- .../src/resolvers/dag-cbor.js | 20 +- .../src/resolvers/identity.js | 11 +- .../src/resolvers/index.js | 21 +- .../ipfs-unixfs-exporter/src/resolvers/raw.js | 13 +- .../resolvers/unixfs-v1/content/directory.js | 4 +- .../src/resolvers/unixfs-v1/content/file.js | 47 ++- .../content/hamt-sharded-directory.js | 24 +- .../src/resolvers/unixfs-v1/content/raw.js | 2 +- .../src/resolvers/unixfs-v1/index.js | 23 +- packages/ipfs-unixfs-exporter/src/types.d.ts | 20 +- .../src/utils/find-cid-in-shard.js | 21 +- .../test/exporter-sharded.spec.js | 96 ++--- .../test/exporter-subtree.spec.js | 21 +- .../test/exporter.spec.js | 355 ++++++++++++------ .../test/helpers/block.js | 64 +--- .../test/helpers/collect-leaf-cids.js | 22 +- .../test/import-export-dir-sharding.spec.js | 42 +-- .../test/import-export-nested-dir.spec.js | 17 +- .../test/import-export.spec.js | 16 +- .../test/importer.spec.js | 119 +++--- packages/ipfs-unixfs-importer/package.json | 7 +- .../src/dag-builder/file/buffer-importer.js | 5 +- .../src/dag-builder/file/index.js | 21 +- .../src/dag-builder/file/trickle.js | 1 - packages/ipfs-unixfs-importer/src/dir-flat.js | 9 +- packages/ipfs-unixfs-importer/src/dir.js | 2 +- packages/ipfs-unixfs-importer/src/options.js | 3 +- packages/ipfs-unixfs-importer/src/types.d.ts | 27 +- .../ipfs-unixfs-importer/src/utils/persist.js | 32 +- .../test/benchmark.spec.js | 18 +- .../test/builder-balanced.spec.js | 14 +- .../test/builder-only-hash.spec.js | 14 +- .../ipfs-unixfs-importer/test/builder.spec.js | 239 ++++++------ .../test/chunker-custom.spec.js | 27 +- .../test/hash-parity-with-go-ipfs.spec.js | 13 +- .../test/helpers/block.js | 64 +--- 38 files changed, 794 insertions(+), 706 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/package.json b/packages/ipfs-unixfs-exporter/package.json index b9367685..e4d02512 100644 --- a/packages/ipfs-unixfs-exporter/package.json +++ b/packages/ipfs-unixfs-exporter/package.json @@ -43,15 +43,10 @@ "events": "^3.3.0", "ipfs-core-types": "^0.3.1", "ipfs-unixfs-importer": "^7.0.3", - "ipld": "^0.29.0", - "ipld-block": "^0.11.1", - "ipld-dag-pb": "^0.22.2", - "ipld-in-memory": "^8.0.0", "it-all": "^1.0.5", "it-buffer-stream": "^2.0.0", "it-first": "^1.0.6", "merge-options": "^3.0.4", - "multicodec": "^3.0.1", "native-abort-controller": "^1.0.3", "nyc": "^15.0.0", "readable-stream": "^3.6.0", @@ -61,11 +56,14 @@ "util": "^0.12.3" }, "dependencies": { - "cids": "^1.1.5", + "@ipld/dag-cbor": "^3.0.0", + "@ipld/dag-pb": "^0.0.1", "err-code": "^3.0.1", "hamt-sharding": "^2.0.0", "ipfs-unixfs": "^4.0.3", "it-last": "^1.0.5", + "multicodec": "^3.0.1", + "multiformats": "^4.6.1", "multihashing-async": "^2.1.0" }, "types": "dist/src/index.d.ts", diff --git a/packages/ipfs-unixfs-exporter/src/index.js b/packages/ipfs-unixfs-exporter/src/index.js index e9cefe62..bccd626d 100644 --- a/packages/ipfs-unixfs-exporter/src/index.js +++ b/packages/ipfs-unixfs-exporter/src/index.js @@ -1,14 +1,13 @@ 'use strict' const errCode = require('err-code') -const CID = require('cids') +const CID = require('multiformats/cid') const resolve = require('./resolvers') const last = require('it-last') /** * @typedef {import('ipfs-unixfs').UnixFS} UnixFS - * @typedef {import('ipld-dag-pb').DAGNode} DAGNode - * @typedef {import('ipld')} IPLD + * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockAPI * @typedef {import('./types').ExporterOptions} ExporterOptions * @typedef {import('./types').UnixFSFile} UnixFSFile * @typedef {import('./types').UnixFSDirectory} UnixFSDirectory @@ -31,15 +30,19 @@ const toPathComponents = (path = '') => { */ const cidAndRest = (path) => { if (path instanceof Uint8Array) { + console.log('vmx: index: path:', path) return { - cid: new CID(path), + // @ts-ignore + cid: CID.decode(path), toResolve: [] } } - if (CID.isCID(path)) { + // @ts-ignore + const cid = CID.asCID(path) + if (cid) { return { - cid: path, + cid, toResolve: [] } } @@ -52,7 +55,8 @@ const cidAndRest = (path) => { const output = toPathComponents(path) return { - cid: new CID(output[0]), + // @ts-ignore + cid: CID.parse(output[0]), toResolve: output.slice(1) } } @@ -62,10 +66,10 @@ const cidAndRest = (path) => { /** * @param {string | CID} path - * @param {IPLD} ipld + * @param {BlockAPI} blockService * @param {ExporterOptions} [options] */ -async function * walkPath (path, ipld, options = {}) { +async function * walkPath (path, blockService, options = {}) { let { cid, toResolve @@ -75,7 +79,7 @@ async function * walkPath (path, ipld, options = {}) { const startingDepth = toResolve.length while (true) { - const result = await resolve(cid, name, entryPath, toResolve, startingDepth, ipld, options) + const result = await resolve(cid, name, entryPath, toResolve, startingDepth, blockService, options) if (!result.entry && !result.next) { throw errCode(new Error(`Could not resolve ${path}`), 'ERR_NOT_FOUND') @@ -99,11 +103,11 @@ async function * walkPath (path, ipld, options = {}) { /** * @param {string | CID} path - * @param {IPLD} ipld + * @param {BlockAPI} blockService * @param {ExporterOptions} [options] */ -async function exporter (path, ipld, options = {}) { - const result = await last(walkPath(path, ipld, options)) +async function exporter (path, blockService, options = {}) { + const result = await last(walkPath(path, blockService, options)) if (!result) { throw errCode(new Error(`Could not resolve ${path}`), 'ERR_NOT_FOUND') @@ -114,11 +118,11 @@ async function exporter (path, ipld, options = {}) { /** * @param {string | CID} path - * @param {IPLD} ipld + * @param {BlockAPI} blockService * @param {ExporterOptions} [options] */ -async function * recursive (path, ipld, options = {}) { - const node = await exporter(path, ipld, options) +async function * recursive (path, blockService, options = {}) { + const node = await exporter(path, blockService, options) if (!node) { return diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js index 40f69809..1b4195d8 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js @@ -1,7 +1,9 @@ 'use strict' -const CID = require('cids') +const CID = require('multiformats/cid') const errCode = require('err-code') +// @ts-ignore +const dagCbor = require('@ipld/dag-cbor') /** * @typedef {import('../types').Resolver} Resolver @@ -10,9 +12,9 @@ const errCode = require('err-code') /** * @type {Resolver} */ -const resolve = async (cid, name, path, toResolve, resolve, depth, ipld, options) => { - const object = await ipld.get(cid, options) - const block = await ipld.get(new CID(1, 'raw', cid.multihash)) +const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, options) => { + const block = await blockService.get(cid) + const object = dagCbor.decode(block.bytes) let subObject = object let subPath = path @@ -24,14 +26,16 @@ const resolve = async (cid, name, path, toResolve, resolve, depth, ipld, options toResolve.shift() subPath = `${subPath}/${prop}` - if (CID.isCID(subObject[prop])) { + // @ts-ignore + const subObjectCid = CID.asCID(subObject[prop]) + if (subObjectCid) { return { entry: { type: 'object', name, path, cid, - node: block, + node: block.bytes, depth, size: block.length, content: async function * () { @@ -39,7 +43,7 @@ const resolve = async (cid, name, path, toResolve, resolve, depth, ipld, options } }, next: { - cid: subObject[prop], + cid: subObjectCid, name: prop, path: subPath, toResolve @@ -60,7 +64,7 @@ const resolve = async (cid, name, path, toResolve, resolve, depth, ipld, options name, path, cid, - node: block, + node: block.bytes, depth, size: block.length, content: async function * () { diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/identity.js b/packages/ipfs-unixfs-exporter/src/resolvers/identity.js index 080ee182..cc7b0cf9 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/identity.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/identity.js @@ -3,7 +3,7 @@ const errCode = require('err-code') const extractDataFromBlock = require('../utils/extract-data-from-block') const validateOffsetAndLength = require('../utils/validate-offset-and-length') -const mh = require('multihashing-async').multihash +const mh = require('multiformats/hashes/digest') /** * @typedef {import('../types').ExporterOptions} ExporterOptions @@ -32,22 +32,23 @@ const rawContent = (node) => { /** * @type {Resolver} */ -const resolve = async (cid, name, path, toResolve, resolve, depth, ipld, options) => { +const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, options) => { if (toResolve.length) { throw errCode(new Error(`No link named ${path} found in raw node ${cid}`), 'ERR_NOT_FOUND') } - - const buf = await mh.decode(cid.multihash) + // @ts-ignore + const buf = await mh.decode(cid.multihash.bytes) return { entry: { type: 'identity', name, path, + // @ts-ignore cid, content: rawContent(buf.digest), depth, - size: buf.length, + size: buf.digest.length, node: buf.digest } } diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/index.js b/packages/ipfs-unixfs-exporter/src/resolvers/index.js index ac304a1c..c873e544 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/index.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/index.js @@ -1,10 +1,10 @@ 'use strict' const errCode = require('err-code') +const multicodec = require('multicodec') /** - * @typedef {import('cids')} CID - * @typedef {import('ipld')} IPLD + * @typedef {import('../').BlockAPI} BlockAPI * @typedef {import('../types').ExporterOptions} ExporterOptions * @typedef {import('../types').UnixFSEntry} UnixFSEntry * @typedef {import('../types').Resolver} Resolver @@ -15,23 +15,24 @@ const errCode = require('err-code') * @type {{ [ key: string ]: Resolver }} */ const resolvers = { - 'dag-pb': require('./unixfs-v1'), - raw: require('./raw'), - 'dag-cbor': require('./dag-cbor'), - identity: require('./identity') + [multicodec.DAG_PB]: require('./unixfs-v1'), + [multicodec.RAW]: require('./raw'), + [multicodec.DAG_CBOR]: require('./dag-cbor'), + [multicodec.IDENTITY]: require('./identity') } /** * @type {Resolve} */ -function resolve (cid, name, path, toResolve, depth, ipld, options) { - const resolver = resolvers[cid.codec] +function resolve (cid, name, path, toResolve, depth, blockService, options) { + const resolver = resolvers[cid.code] if (!resolver) { - throw errCode(new Error(`No resolver for codec ${cid.codec}`), 'ERR_NO_RESOLVER') + // @ts-ignore - TODO vmx 2021-03-05: Add proper typing + throw errCode(new Error(`No resolver for codec ${multicodec.getName(cid.code)}`), 'ERR_NO_RESOLVER') } - return resolver(cid, name, path, toResolve, resolve, depth, ipld, options) + return resolver(cid, name, path, toResolve, resolve, depth, blockService, options) } module.exports = resolve diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/raw.js b/packages/ipfs-unixfs-exporter/src/resolvers/raw.js index 5ec94544..10198e53 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/raw.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/raw.js @@ -30,23 +30,26 @@ const rawContent = (node) => { /** * @type {import('../types').Resolver} */ -const resolve = async (cid, name, path, toResolve, resolve, depth, ipld, options) => { +const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, options) => { if (toResolve.length) { throw errCode(new Error(`No link named ${path} found in raw node ${cid}`), 'ERR_NOT_FOUND') } - const buf = await ipld.get(cid, options) + const block = await blockService.get(cid, options) return { entry: { type: 'raw', name, path, + // @ts-ignore cid, - content: rawContent(buf), + content: rawContent(block.bytes), depth, - size: buf.length, - node: buf + // TODO vmx 2021-03-24: Check if `size` is needed + size: 0, + // @ts-ignore + node: block.bytes } } } diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.js index f30fac00..17c46b4d 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.js @@ -9,7 +9,7 @@ /** * @type {UnixfsV1Resolver} */ -const directoryContent = (cid, node, unixfs, path, resolve, depth, ipld) => { +const directoryContent = (cid, node, unixfs, path, resolve, depth, blockService) => { /** * @param {ExporterOptions} [options] * @returns {UnixfsV1DirectoryContent} @@ -20,7 +20,7 @@ const directoryContent = (cid, node, unixfs, path, resolve, depth, ipld) => { const links = node.Links.slice(offset, length) for (const link of links) { - const result = await resolve(link.Hash, link.Name, `${path}/${link.Name}`, [], depth + 1, ipld, options) + const result = await resolve(link.Hash, link.Name, `${path}/${link.Name}`, [], depth + 1, blockService, options) if (result.entry) { yield result.entry diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js index 4bcdba4a..6ca4e9c3 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js @@ -4,23 +4,26 @@ const extractDataFromBlock = require('../../../utils/extract-data-from-block') const validateOffsetAndLength = require('../../../utils/validate-offset-and-length') const { UnixFS } = require('ipfs-unixfs') const errCode = require('err-code') +// @ts-ignore +const dagPb = require('@ipld/dag-pb') +// @ts-ignore +const dagCbor = require('@ipld/dag-cbor') +const mc = require('multicodec') /** * @typedef {import('../../../types').ExporterOptions} ExporterOptions - * @typedef {import('ipld')} IPLD - * @typedef {import('ipld-dag-pb').DAGNode} DAGNode - */ - -/** - * @param {IPLD} ipld - * @param {DAGNode} node + * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockService + * @typedef {import('../../../types').PbNode} PbNode + * + * @param {BlockService} blockService + * @param {PbNode} node * @param {number} start * @param {number} end * @param {number} streamPosition * @param {ExporterOptions} options * @returns {AsyncIterable} */ -async function * emitBytes (ipld, node, start, end, streamPosition = 0, options) { +async function * emitBytes (blockService, node, start, end, streamPosition = 0, options) { // a `raw` node if (node instanceof Uint8Array) { const buf = extractDataFromBlock(node, streamPosition, start, end) @@ -63,11 +66,29 @@ async function * emitBytes (ipld, node, start, end, streamPosition = 0, options) if ((start >= childStart && start < childEnd) || // child has offset byte (end > childStart && end <= childEnd) || // child has end byte (start < childStart && end > childEnd)) { // child is between offset and end bytes - const child = await ipld.get(childLink.Hash, { - signal: options.signal + const block = await blockService.get(childLink.Hash, { + signal: options.signal, }) + let child + switch (childLink.Hash.code) { + case mc.DAG_PB: + child = await dagPb.decode(block.bytes) + break + case mc.RAW: + child = block.bytes + break; + case mc.DAG_CBOR: + child = await dagCbor.decode(block.bytes) + break; + default: + // TODO vmx 2021-03-05: fix this type issue properly + // @ts-ignore + throw Error(`Unsupported codec: ${mc.getName(childLink.Hash.code)}`) + } + //console.log('file: childlink cid codec:', childLink.Hash.code) + //const child = await decode(block.bytes) - for await (const buf of emitBytes(ipld, child, start, end, streamPosition, options)) { + for await (const buf of emitBytes(blockService, child, start, end, streamPosition, options)) { streamPosition += buf.length yield buf @@ -82,7 +103,7 @@ async function * emitBytes (ipld, node, start, end, streamPosition = 0, options) /** * @type {import('../').UnixfsV1Resolver} */ -const fileContent = (cid, node, unixfs, path, resolve, depth, ipld) => { +const fileContent = (cid, node, unixfs, path, resolve, depth, blockService) => { /** * @param {ExporterOptions} options */ @@ -101,7 +122,7 @@ const fileContent = (cid, node, unixfs, path, resolve, depth, ipld) => { const start = offset const end = offset + length - return emitBytes(ipld, node, start, end, 0, options) + return emitBytes(blockService, node, start, end, 0, options) } return yieldFileContent diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js index 25d784b5..1a18aef8 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js @@ -1,54 +1,58 @@ 'use strict' +// @ts-ignore +const { decode } = require('@ipld/dag-pb') + /** - * @typedef {import('ipld-dag-pb').DAGNode} DAGNode - * @typedef {import('ipld')} IPLD + * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockAPI * @typedef {import('../../../types').ExporterOptions} ExporterOptions * @typedef {import('../../../types').Resolve} Resolve * @typedef {import('../../../types').UnixfsV1DirectoryContent} UnixfsV1DirectoryContent * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver + * @typedef {import('../../../types').PbNode} PbNode */ /** * @type {UnixfsV1Resolver} */ -const hamtShardedDirectoryContent = (cid, node, unixfs, path, resolve, depth, ipld) => { +const hamtShardedDirectoryContent = (cid, node, unixfs, path, resolve, depth, blockService) => { /** * @param {ExporterOptions} options * */ function yieldHamtDirectoryContent (options = {}) { - return listDirectory(node, path, resolve, depth, ipld, options) + return listDirectory(node, path, resolve, depth, blockService, options) } return yieldHamtDirectoryContent } /** - * @param {DAGNode} node + * @param {PbNode} node * @param {string} path * @param {Resolve} resolve * @param {number} depth - * @param {IPLD} ipld + * @param {BlockAPI} blockService * @param {ExporterOptions} options * * @returns {UnixfsV1DirectoryContent} */ -async function * listDirectory (node, path, resolve, depth, ipld, options) { +async function * listDirectory (node, path, resolve, depth, blockService, options) { const links = node.Links for (const link of links) { const name = link.Name.substring(2) if (name) { - const result = await resolve(link.Hash, name, `${path}/${name}`, [], depth + 1, ipld, options) + const result = await resolve(link.Hash, name, `${path}/${name}`, [], depth + 1, blockService, options) yield result.entry } else { // descend into subshard - node = await ipld.get(link.Hash) + const block = await blockService.get(link.Hash) + node = decode(block.bytes) - for await (const file of listDirectory(node, path, resolve, depth, ipld, options)) { + for await (const file of listDirectory(node, path, resolve, depth, blockService, options)) { yield file } } diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/raw.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/raw.js index 1ac4b17e..176da0a6 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/raw.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/raw.js @@ -11,7 +11,7 @@ const validateOffsetAndLength = require('../../../utils/validate-offset-and-leng /** * @type {UnixfsV1Resolver} */ -const rawContent = (cid, node, unixfs, path, resolve, depth, ipld) => { +const rawContent = (cid, node, unixfs, path, resolve, depth, blockService) => { /** * @param {ExporterOptions} options */ diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js index 441c17be..94e52a17 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js @@ -3,20 +3,21 @@ const errCode = require('err-code') const { UnixFS } = require('ipfs-unixfs') const findShardCid = require('../../utils/find-cid-in-shard') +// @ts-ignore +const { decode } = require('@ipld/dag-pb') /** - * @typedef {import('cids')} CID - * @typedef {import('ipld')} IPLD - * @typedef {import('ipld-dag-pb').DAGNode} DAGNode + * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} * @typedef {import('../../types').ExporterOptions} ExporterOptions * @typedef {import('../../types').UnixFSEntry} UnixFSEntry * @typedef {import('../../types').Resolve} Resolve * @typedef {import('../../types').Resolver} Resolver * @typedef {import('../../types').UnixfsV1Resolver} UnixfsV1Resolver + * @typedef {import('../../types').PbNode} PbNode */ /** - * @param {import('ipld-dag-pb').DAGNode} node + * @param {PbNode} node * @param {string} name */ const findLinkCid = (node, name) => { @@ -33,10 +34,10 @@ const contentExporters = { file: require('./content/file'), directory: require('./content/directory'), 'hamt-sharded-directory': require('./content/hamt-sharded-directory'), - metadata: (cid, node, unixfs, path, resolve, depth, ipld) => { + metadata: (cid, node, unixfs, path, resolve, depth, blockService) => { return () => [] }, - symlink: (cid, node, unixfs, path, resolve, depth, ipld) => { + symlink: (cid, node, unixfs, path, resolve, depth, blockService) => { return () => [] } } @@ -44,8 +45,9 @@ const contentExporters = { /** * @type {Resolver} */ -const unixFsResolver = async (cid, name, path, toResolve, resolve, depth, ipld, options) => { - const node = await ipld.get(cid, options) +const unixFsResolver = async (cid, name, path, toResolve, resolve, depth, blockService, options) => { + const block = await blockService.get(cid, options) + const node = decode(block.bytes) let unixfs let next @@ -69,7 +71,7 @@ const unixFsResolver = async (cid, name, path, toResolve, resolve, depth, ipld, if (unixfs && unixfs.type === 'hamt-sharded-directory') { // special case - unixfs v1 hamt shards - linkCid = await findShardCid(node, toResolve[0], ipld) + linkCid = await findShardCid(node, toResolve[0], blockService) } else { linkCid = findLinkCid(node, toResolve[0]) } @@ -95,9 +97,10 @@ const unixFsResolver = async (cid, name, path, toResolve, resolve, depth, ipld, type: unixfs.isDirectory() ? 'directory' : 'file', name, path, + // @ts-ignore cid, // @ts-ignore - content: contentExporters[unixfs.type](cid, node, unixfs, path, resolve, depth, ipld), + content: contentExporters[unixfs.type](cid, node, unixfs, path, resolve, depth, blockService), unixfs, depth, node, diff --git a/packages/ipfs-unixfs-exporter/src/types.d.ts b/packages/ipfs-unixfs-exporter/src/types.d.ts index 52f3bf1e..ee54ed86 100644 --- a/packages/ipfs-unixfs-exporter/src/types.d.ts +++ b/packages/ipfs-unixfs-exporter/src/types.d.ts @@ -1,4 +1,4 @@ -import CID from 'cids' +import { CID } from 'multiformats' import UnixFS from 'ipfs-unixfs' import DAGNode from 'ipld-dag-pb' @@ -67,3 +67,21 @@ type UnixfsV1FileContent = AsyncIterable | Iterable type UnixfsV1DirectoryContent = AsyncIterable | Iterable type UnixfsV1Content = UnixfsV1FileContent | UnixfsV1DirectoryContent type UnixfsV1Resolver = (cid: CID, node: DAGNode, unixfs: UnixFS, path: string, resolve: Resolve, depth: number, ipld: IPLD) => (options: ExporterOptions) => UnixfsV1Content + + +// TODO vmx 2021=03-24: Just temporary until js-dag-pb has porper types +interface PbLink { + Name: string, + Tsize: number, + Hash: CID +} + +interface PbNode { + Data: Uint8Array, + Links: PbLink[] +} + +interface Block { + cid: CID, + bytes: Uint8Array +} diff --git a/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js b/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js index 9b48fede..a4bc8d93 100644 --- a/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js +++ b/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js @@ -2,11 +2,15 @@ const { Bucket, createHAMT } = require('hamt-sharding') const multihashing = require('multihashing-async') +// @ts-ignore +const { decode } = require('@ipld/dag-pb') /** + * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockService + * @typedef {import('multiformats').CID} CID * @typedef {import('../types').ExporterOptions} ExporterOptions - * @typedef {import('ipld')} IPLD - * @typedef {import('cids')} CID + * @typedef {import('../types').PbNode} PbNode + * @typedef {import('../types').PbLink} PbLink */ // FIXME: this is copy/pasted from ipfs-unixfs-importer/src/dir-sharded.js @@ -32,7 +36,7 @@ const hashFn = async function (buf) { } /** - * @param {import('ipld-dag-pb').DAGLink[]} links + * @param {PbLink[]} links * @param {Bucket} bucket * @param {Bucket} rootBucket */ @@ -88,14 +92,14 @@ const toBucketPath = (position) => { * @property {Bucket} rootBucket * @property {Bucket} lastBucket * - * @param {import('ipld-dag-pb').DAGNode} node + * @param {PbNode} node * @param {string} name - * @param {IPLD} ipld + * @param {BlockService} blockService * @param {ShardTraversalContext} [context] * @param {ExporterOptions} [options] * @returns {Promise} */ -const findShardCid = async (node, name, ipld, context, options) => { +const findShardCid = async (node, name, blockService, context, options) => { if (!context) { const rootBucket = createHAMT({ hashFn @@ -147,9 +151,10 @@ const findShardCid = async (node, name, ipld, context, options) => { context.hamtDepth++ - node = await ipld.get(link.Hash, options) + const block = await blockService.get(link.Hash, options) + node = decode(block.bytes) - return findShardCid(node, name, ipld, context, options) + return findShardCid(node, name, blockService, context, options) } module.exports = findShardCid diff --git a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js index c4bce877..963f3cc3 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js @@ -2,28 +2,22 @@ 'use strict' const { expect } = require('aegir/utils/chai') -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const { UnixFS } = require('ipfs-unixfs') -const mh = require('multihashing-async').multihash -const mc = require('multicodec') const all = require('it-all') const last = require('it-last') const randomBytes = require('it-buffer-stream') const { exporter, walkPath } = require('../src') const { importer } = require('ipfs-unixfs-importer') -const { - DAGLink, - DAGNode -} = require('ipld-dag-pb') +// @ts-ignore - TODO vmx 2021-03-25 +const dagPb = require('@ipld/dag-pb') +const { sha256 } = require('multiformats/hashes/sha2') +const Block = require('multiformats/block') const blockApi = require('./helpers/block') const uint8ArrayConcat = require('uint8arrays/concat') const asAsyncIterable = require('./helpers/as-async-iterable') /** - * @typedef {import('cids')} CID + * @typedef {import('multiformats').CID} CID */ const SHARD_SPLIT_THRESHOLD = 10 @@ -31,10 +25,8 @@ const SHARD_SPLIT_THRESHOLD = 10 describe('exporter sharded', function () { this.timeout(30000) - /** @type {import('ipld')} */ - let ipld /** @type {import('ipfs-unixfs-importer/src/types').BlockAPI} */ - let block + const block = blockApi() /** * @param {number} numFiles @@ -72,11 +64,6 @@ describe('exporter sharded', function () { return result.cid } - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) - it('exports a sharded directory', async () => { /** @type {{ [key: string]: { content: Uint8Array, cid?: CID }}} */ const files = {} @@ -110,14 +97,16 @@ describe('exporter sharded', function () { files[imported.path].cid = imported.cid }) - const dir = await ipld.get(dirCid) + const encodedBlock = await block.get(dirCid) + const dir = dagPb.decode(encodedBlock.bytes) const dirMetadata = UnixFS.unmarshal(dir.Data) expect(dirMetadata.type).to.equal('hamt-sharded-directory') - const exported = await exporter(dirCid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(dirCid, block) - expect(exported.cid.equals(dirCid)).to.be.true() + expect(exported.cid.toString()).to.be.equal(dirCid.toString()) if (exported.type !== 'directory') { throw new Error('Expected directory') @@ -140,7 +129,8 @@ describe('exporter sharded', function () { const data = uint8ArrayConcat(await all(dirFile.content())) // validate the CID - expect(files[dirFile.name]).to.have.property('cid').that.deep.equals(dirFile.cid) + // @ts-ignore - TODO vmx 2021-03-25: fix that one + expect(files[dirFile.name].cid.toString()).that.deep.equals(dirFile.cid.toString()) // validate the exported file content expect(files[dirFile.name].content).to.deep.equal(data) @@ -150,7 +140,8 @@ describe('exporter sharded', function () { it('exports all files from a sharded directory with subshards', async () => { const numFiles = 31 const dirCid = await createShard(numFiles) - const exported = await exporter(dirCid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(dirCid, block) if (exported.type !== 'directory') { throw new Error('Unexpected type') @@ -172,42 +163,42 @@ describe('exporter sharded', function () { it('exports one file from a sharded directory', async () => { const dirCid = await createShard(31) - const exported = await exporter(`/ipfs/${dirCid}/file-14`, ipld) + const exported = await exporter(`/ipfs/${dirCid}/file-14`, block) expect(exported).to.have.property('name', 'file-14') }) it('exports one file from a sharded directory sub shard', async () => { const dirCid = await createShard(31) - const exported = await exporter(`/ipfs/${dirCid}/file-30`, ipld) + const exported = await exporter(`/ipfs/${dirCid}/file-30`, block) expect(exported.name).to.deep.equal('file-30') }) it('exports one file from a shard inside a shard inside a shard', async () => { const dirCid = await createShard(2568) - const exported = await exporter(`/ipfs/${dirCid}/file-2567`, ipld) + const exported = await exporter(`/ipfs/${dirCid}/file-2567`, block) expect(exported.name).to.deep.equal('file-2567') }) it('extracts a deep folder from the sharded directory', async () => { const dirCid = await createShardWithFileNames(31, (index) => `/foo/bar/baz/file-${index}`) - const exported = await exporter(`/ipfs/${dirCid}/foo/bar/baz`, ipld) + const exported = await exporter(`/ipfs/${dirCid}/foo/bar/baz`, block) expect(exported.name).to.deep.equal('baz') }) it('extracts an intermediate folder from the sharded directory', async () => { const dirCid = await createShardWithFileNames(31, (index) => `/foo/bar/baz/file-${index}`) - const exported = await exporter(`/ipfs/${dirCid}/foo/bar`, ipld) + const exported = await exporter(`/ipfs/${dirCid}/foo/bar`, block) expect(exported.name).to.deep.equal('bar') }) it('uses .path to extract all intermediate entries from the sharded directory', async () => { const dirCid = await createShardWithFileNames(31, (index) => `/foo/bar/baz/file-${index}`) - const exported = await all(walkPath(`/ipfs/${dirCid}/foo/bar/baz/file-1`, ipld)) + const exported = await all(walkPath(`/ipfs/${dirCid}/foo/bar/baz/file-1`, block)) expect(exported.length).to.equal(5) @@ -224,7 +215,7 @@ describe('exporter sharded', function () { it('uses .path to extract all intermediate entries from the sharded directory as well as the contents', async () => { const dirCid = await createShardWithFileNames(31, (index) => `/foo/bar/baz/file-${index}`) - const exported = await all(walkPath(`/ipfs/${dirCid}/foo/bar/baz`, ipld)) + const exported = await all(walkPath(`/ipfs/${dirCid}/foo/bar/baz`, block)) expect(exported.length).to.equal(4) @@ -252,23 +243,38 @@ describe('exporter sharded', function () { it('exports a file from a sharded directory inside a regular directory inside a sharded directory', async () => { const dirCid = await createShard(15) - const node = new DAGNode(new UnixFS({ type: 'directory' }).marshal(), [ - new DAGLink('shard', 5, dirCid) - ]) - const nodeCid = await ipld.put(node, mc.DAG_PB, { - cidVersion: 0, - hashAlg: mh.names['sha2-256'] + const node = dagPb.prepare({ + Data: new UnixFS({ type: 'directory' }).marshal(), + Links: [{ + Name: 'shard', + Tsize: 5, + Hash: dirCid + }] }) - - const shardNode = new DAGNode(new UnixFS({ type: 'hamt-sharded-directory' }).marshal(), [ - new DAGLink('75normal-dir', 5, nodeCid) - ]) - const shardNodeCid = await ipld.put(shardNode, mc.DAG_PB, { - cidVersion: 1, - hashAlg: mh.names['sha2-256'] + // TODO vmx 2021-02-23: Make it a CIDv0 + const nodeBlock = await Block.encode({ + value: node, + codec: dagPb, + hasher: sha256 + }) + await block.put(nodeBlock) + + const shardNode = dagPb.prepare({ + Data: new UnixFS({ type: 'hamt-sharded-directory' }).marshal(), + Links: [{ + Name: '75normal-dir', + Tsize: 5, + Hash: nodeBlock.cid.toV0() + }] + }) + const shardNodeBlock = await Block.encode({ + value: shardNode, + codec: dagPb, + hasher: sha256 }) + await block.put(shardNodeBlock) - const exported = await exporter(`/ipfs/${shardNodeCid}/normal-dir/shard/file-1`, ipld) + const exported = await exporter(`/ipfs/${shardNodeBlock.cid}/normal-dir/shard/file-1`, block) expect(exported.name).to.deep.equal('file-1') }) diff --git a/packages/ipfs-unixfs-exporter/test/exporter-subtree.spec.js b/packages/ipfs-unixfs-exporter/test/exporter-subtree.spec.js index 14a11332..d7e47032 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter-subtree.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter-subtree.spec.js @@ -2,10 +2,6 @@ 'use strict' const { expect } = require('aegir/utils/chai') -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const { importer } = require('ipfs-unixfs-importer') const all = require('it-all') const last = require('it-last') @@ -19,15 +15,8 @@ const ONE_MEG = Math.pow(1024, 2) const { exporter, walkPath } = require('./../src') describe('exporter subtree', () => { - /** @type {import('ipld')} */ - let ipld /** @type {import('ipfs-unixfs-importer/src/types').BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) + const block = blockApi() it('exports a file 2 levels down', async () => { const content = uint8ArrayConcat(await all(randomBytes(ONE_MEG))) @@ -44,7 +33,7 @@ describe('exporter subtree', () => { throw new Error('Nothing imported') } - const exported = await exporter(`${imported.cid}/level-1/200Bytes.txt`, ipld) + const exported = await exporter(`${imported.cid}/level-1/200Bytes.txt`, block) expect(exported).to.have.property('cid') expect(exported.name).to.equal('200Bytes.txt') @@ -74,7 +63,7 @@ describe('exporter subtree', () => { throw new Error('Nothing imported') } - const exported = await exporter(`${imported.cid}/level-1`, ipld) + const exported = await exporter(`${imported.cid}/level-1`, block) if (exported.type !== 'directory') { throw new Error('Unexpected type') @@ -108,7 +97,7 @@ describe('exporter subtree', () => { } try { - await exporter(`${imported.cid}/doesnotexist`, ipld) + await exporter(`${imported.cid}/doesnotexist`, block) } catch (err) { expect(err.code).to.equal('ERR_NOT_FOUND') } @@ -134,7 +123,7 @@ describe('exporter subtree', () => { throw new Error('Nothing imported') } - const exported = await all(walkPath(`${imported.cid}/level-1/level-2/200Bytes.txt`, ipld)) + const exported = await all(walkPath(`${imported.cid}/level-1/level-2/200Bytes.txt`, block)) expect(exported.length).to.equal(4) expect(exported[0].path).to.equal(imported.cid.toString()) diff --git a/packages/ipfs-unixfs-exporter/test/exporter.spec.js b/packages/ipfs-unixfs-exporter/test/exporter.spec.js index ee295045..270358e1 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter.spec.js @@ -2,17 +2,16 @@ 'use strict' const { expect } = require('aegir/utils/chai') -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const { UnixFS } = require('ipfs-unixfs') -const CID = require('cids') -const { - DAGNode, - DAGLink -} = require('ipld-dag-pb') -const mh = require('multihashing-async').multihash +const CID = require('multiformats/cid') +// @ts-ignore - TODO vmx 2021-03-25: add those typedefs +const dagPb = require('@ipld/dag-pb') +// @ts-ignore - TODO vmx 2021-03-25: add those typedefs +const dagCbor = require('@ipld/dag-cbor') +const rawCodec = require('multiformats/codecs/raw') +const { sha256 } = require('multiformats/hashes/sha2') +const Block = require('multiformats/block') +const mh = require('multiformats/hashes/digest') const mc = require('multicodec') const { exporter, recursive } = require('../src') const { importer } = require('ipfs-unixfs-importer') @@ -29,11 +28,14 @@ const asAsyncIterable = require('./helpers/as-async-iterable') const ONE_MEG = Math.pow(1024, 2) +/** + * @typedef {import('../src/types').PbLink} PbLink + * @typedef {import('../src/types').PbNode} PbNode + */ + describe('exporter', () => { - /** @type {import('ipld')} */ - let ipld /** @type {import('ipfs-unixfs-importer/src/types').BlockAPI} */ - let block + const block = blockApi() /** @type {Uint8Array} */ let bigFile /** @type {Uint8Array} */ @@ -48,7 +50,7 @@ describe('exporter', () => { * @param {object} [options] * @param {string} [options.type='file'] * @param {Uint8Array} [options.content] - * @param {DAGLink[]} [options.links=[]] + * @param {PbLink[]} [options.links=[]] */ async function dagPut (options = {}) { options.type = options.type || 'file' @@ -60,13 +62,18 @@ describe('exporter', () => { data: options.content }) - const node = new DAGNode(file.marshal(), options.links) - const cid = await ipld.put(node, mc.DAG_PB, { - cidVersion: 0, - hashAlg: mh.names['sha2-256'] + const node = dagPb.prepare({ + Data: file.marshal(), + Links: options.links + }) + const encodedBlock = await Block.encode({ + value: node, + codec: dagPb, + hasher: sha256 }) + await block.put(encodedBlock) - return { file: file, node: node, cid: cid } + return { file: file, node: node, cid: encodedBlock.cid.toV0() } } /** @@ -102,7 +109,8 @@ describe('exporter', () => { */ async function addAndReadTestFile ({ file, offset, length, strategy = 'balanced', path = '/foo', maxChunkSize, rawLeaves }) { const cid = await addTestFile({ file, strategy, path, maxChunkSize, rawLeaves }) - const entry = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const entry = await exporter(cid, block) if (entry.type !== 'file' && entry.type !== 'raw') { throw new Error('Unexpected type') @@ -135,12 +143,11 @@ describe('exporter', () => { } /** - * @param {import('ipld')} ipld * @param {'file' | 'directory' | 'raw'} type * @param {Uint8Array | ArrayLike | undefined} data - * @param {{ node: DAGNode, cid: CID }[]} children + * @param {{ node: PbNode, cid: CID }[]} children */ - async function createAndPersistNode (ipld, type, data, children) { + async function createAndPersistNode (type, data, children) { const file = new UnixFS({ type, data: data ? Uint8Array.from(data) : undefined }) const links = [] @@ -150,34 +157,41 @@ describe('exporter', () => { file.addBlockSize(leaf.fileSize()) - links.push(new DAGLink('', child.node.size, child.cid)) + links.push({ + Name: '', + // TODO vmx 2021-03-24: this might make the test fail, perhaps just use `0`? + Tsize: child.node.Data.length, + Hash: child.cid + }) } - const node = new DAGNode(file.marshal(), links) - const cid = await ipld.put(node, mc.DAG_PB, { - cidVersion: 1, - hashAlg: mh.names['sha2-256'] + const node = dagPb.prepare({ + Data: file.marshal(), + Links: links }) + const encodedBlock = await Block.encode({ + value: node, + codec: dagPb, + hasher: sha256 + }) + await block.put(encodedBlock) return { node, - cid + cid: encodedBlock.cid } } - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) - it('ensure hash inputs are sanitized', async () => { const result = await dagPut() - const node = await ipld.get(result.cid) + const encodedBlock = await block.get(result.cid) + const node = dagPb.decode(encodedBlock.bytes) const unmarsh = UnixFS.unmarshal(node.Data) expect(unmarsh.data).to.deep.equal(result.file.data) - const file = await exporter(result.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(result.cid, block) expect(file).to.have.property('cid') expect(file).to.have.property('path', result.cid.toString()) @@ -200,7 +214,7 @@ describe('exporter', () => { }], block)) const path = `/ipfs/${files[1].cid}/${fileName}` - const file = await exporter(path, ipld) + const file = await exporter(path, block) expect(file.name).to.equal(fileName) expect(file.path).to.equal(`${files[1].cid}/${fileName}`) @@ -216,7 +230,7 @@ describe('exporter', () => { }], block)) const path = `/ipfs/${files[1].cid}/${fileName}` - const file = await exporter(path, ipld) + const file = await exporter(path, block) expect(file.name).to.equal(fileName) expect(file.path).to.equal(`${files[1].cid}/${fileName}`) @@ -230,14 +244,16 @@ describe('exporter', () => { content: uint8ArrayConcat(await all(randomBytes(100))) }) - const node = await ipld.get(result.cid) + const encodedBlock = await block.get(result.cid) + const node = dagPb.decode(encodedBlock.bytes) const unmarsh = UnixFS.unmarshal(node.Data) if (!unmarsh.data) { throw new Error('Unexpected data') } - const file = await exporter(result.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(result.cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -257,18 +273,28 @@ describe('exporter', () => { type: 'raw', data: content.slice(0, 5) }) - const chunkNode1 = new DAGNode(chunk1.marshal()) - const chunkCid1 = await ipld.put(chunkNode1, mc.DAG_PB, { - cidVersion: 0, - hashAlg: mh.names['sha2-256'] + const chunkNode1 = dagPb.prepare({ Data: chunk1.marshal() }) + // TODO vmx 2022-02-23: Use CIv0 + const chunkBlock1 = await Block.encode({ + value: chunkNode1, + codec: dagPb, + hasher: sha256 }) + await block.put(chunkBlock1) const chunk2 = new UnixFS({ type: 'raw', data: content.slice(5) }) - const chunkNode2 = new DAGNode(chunk2.marshal()) - const chunkCid2 = await ipld.put(chunkNode2, mc.DAG_PB, { - cidVersion: 0, - hashAlg: mh.names['sha2-256'] + const chunkNode2 = dagPb.prepare({ + Data: chunk2.marshal(), + codec: dagPb, + hasher: sha256 + }) + // TODO vmx 2022-02-23: USE CIDv0 + const chunkBlock2 = await Block.encode({ + value: chunkNode2, + codec: dagPb, + hasher: sha256 }) + await block.put(chunkBlock2) const file = new UnixFS({ type: 'file' @@ -276,16 +302,28 @@ describe('exporter', () => { file.addBlockSize(5) file.addBlockSize(5) - const fileNode = new DAGNode(file.marshal(), [ - new DAGLink('', chunkNode1.size, chunkCid1), - new DAGLink('', chunkNode2.size, chunkCid2) - ]) - const fileCid = await ipld.put(fileNode, mc.DAG_PB, { - cidVersion: 0, - hashAlg: mh.names['sha2-256'] + const fileNode = dagPb.prepare({ + Data: file.marshal(), + Links: [{ + Name: '', + Tsize: chunkNode1.size, + Hash: chunkBlock1.cid + }, { + Name: '', + Tsize: chunkNode2.size, + Hash: chunkBlock2.cid + }] + }) + // TODO vmx 2022-02-23: Use CIDv0 + const fileBlock = await Block.encode({ + value: fileNode, + codec: dagPb, + hasher: sha256 }) + await block.put(fileBlock) - const exported = await exporter(fileCid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(fileBlock.cid, block) if (exported.type !== 'file') { throw new Error('Unexpected type') @@ -302,16 +340,19 @@ describe('exporter', () => { const chunk = await dagPut({ content: uint8ArrayConcat(await all(randomBytes(100))) }) const result = await dagPut({ content: uint8ArrayConcat(await all(randomBytes(100))), - links: [ - new DAGLink('', chunk.node.size, chunk.cid) - ] + links: [{ + Name: '', + Tsize: chunk.node.size, + Hash: chunk.cid + }] }) if (!result.file.data) { throw new Error('Expected data') } - const file = await exporter(result.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(result.cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -332,7 +373,8 @@ describe('exporter', () => { file: uint8ArrayConcat(await all(randomBytes(ONE_MEG * 6))) }) - const file = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -353,7 +395,8 @@ describe('exporter', () => { file: bytes }) - const file = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(cid, block) expect(file).to.have.property('path', cid.toString()) if (file.type !== 'file') { @@ -419,7 +462,8 @@ describe('exporter', () => { throw new Error('Nothing imported') } - const dir = await exporter(importedDir.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dir = await exporter(importedDir.cid, block) if (dir.type !== 'directory') { throw new Error('Unexpected type') @@ -467,7 +511,8 @@ describe('exporter', () => { throw new Error('Nothing imported') } - const dir = await exporter(importedDir.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dir = await exporter(importedDir.cid, block) if (dir.type !== 'directory') { throw new Error('Unexpected type') @@ -623,7 +668,8 @@ describe('exporter', () => { throw new Error('Nothing imported') } - const file = await exporter(imported.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(imported.cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -643,7 +689,8 @@ describe('exporter', () => { throw new Error('Nothing imported') } - const dir = await exporter(imported.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dir = await exporter(imported.cid, block) if (dir.type !== 'directory') { throw new Error('Unexpected type') @@ -762,7 +809,8 @@ describe('exporter', () => { file: bigFile, maxChunkSize: 1024 }) - const file = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -800,19 +848,22 @@ describe('exporter', () => { const hash = 'bafybeidu2qqwriogfndznz32swi5r4p2wruf6ztu5k7my53tsezwhncs5y' try { - await exporter(hash, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + await exporter(hash, block) } catch (err) { expect(err.code).to.equal('ERR_NOT_FOUND') } }) it('exports file with data on internal and leaf nodes', async () => { - const leaf = await createAndPersistNode(ipld, 'raw', [0x04, 0x05, 0x06, 0x07], []) - const node = await createAndPersistNode(ipld, 'file', [0x00, 0x01, 0x02, 0x03], [ + const leaf = await createAndPersistNode('raw', [0x04, 0x05, 0x06, 0x07], []) + const node = await createAndPersistNode('file', [0x00, 0x01, 0x02, 0x03], [ + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code leaf ]) - const file = await exporter(node.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(node.cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -835,23 +886,29 @@ describe('exporter', () => { // | \ // l l const leaves = await Promise.all([ - createAndPersistNode(ipld, 'raw', [0x00, 0x01, 0x02, 0x03], []), - createAndPersistNode(ipld, 'raw', [0x08, 0x09, 0x10, 0x11], []), - createAndPersistNode(ipld, 'raw', [0x12, 0x13, 0x14, 0x15], []) + createAndPersistNode('raw', [0x00, 0x01, 0x02, 0x03], []), + createAndPersistNode('raw', [0x08, 0x09, 0x10, 0x11], []), + createAndPersistNode('raw', [0x12, 0x13, 0x14, 0x15], []) ]) const internalNodes = await Promise.all([ - createAndPersistNode(ipld, 'raw', [0x04, 0x05, 0x06, 0x07], [leaves[1]]), - createAndPersistNode(ipld, 'raw', undefined, [leaves[2]]) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + createAndPersistNode('raw', [0x04, 0x05, 0x06, 0x07], [leaves[1]]), + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + createAndPersistNode('raw', undefined, [leaves[2]]) ]) - const node = await createAndPersistNode(ipld, 'file', undefined, [ + const node = await createAndPersistNode('file', undefined, [ + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code leaves[0], + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code internalNodes[0], + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code internalNodes[1] ]) - const file = await exporter(node.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(node.cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -868,12 +925,14 @@ describe('exporter', () => { }) it('exports file with data on internal and leaf nodes with an offset that only fetches data from leaf nodes', async () => { - const leaf = await createAndPersistNode(ipld, 'raw', [0x04, 0x05, 0x06, 0x07], []) - const node = await createAndPersistNode(ipld, 'file', [0x00, 0x01, 0x02, 0x03], [ + const leaf = await createAndPersistNode('raw', [0x04, 0x05, 0x06, 0x07], []) + const node = await createAndPersistNode('file', [0x00, 0x01, 0x02, 0x03], [ + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code leaf ]) - const file = await exporter(node.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(node.cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -900,7 +959,8 @@ describe('exporter', () => { throw new Error('Nothing imported') } - const file = await exporter(imported.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(imported.cid, block) if (file.type !== 'file') { throw new Error('Unexpected type') @@ -925,8 +985,10 @@ describe('exporter', () => { throw new Error('Nothing imported') } - const file = await exporter(imported.cid, ipld) - expect(CID.isCID(file.cid)).to.be.true() + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const file = await exporter(imported.cid, block) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + expect(CID.asCID(file.cid)).to.not.be.undefined() if (file.type !== 'raw') { throw new Error('Unexpected type') @@ -937,12 +999,16 @@ describe('exporter', () => { }) it('errors when exporting a non-existent key from a cbor node', async () => { - const cborNodeCid = await ipld.put({ - foo: 'bar' - }, mc.DAG_CBOR) + const cborBlock = await Block.encode({ + value: { foo: 'bar' }, + codec: dagCbor, + hasher: sha256 + }) + await block.put(cborBlock) try { - await exporter(`${cborNodeCid}/baz`, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + await exporter(`${cborBlock.cid}/baz`, block) } catch (err) { expect(err.code).to.equal('ERR_NO_PROP') } @@ -953,8 +1019,14 @@ describe('exporter', () => { foo: 'bar' } - const cborNodeCid = await ipld.put(node, mc.DAG_CBOR) - const exported = await exporter(`${cborNodeCid}`, ipld) + const cborBlock = await Block.encode({ + value: node, + codec: dagCbor, + hasher: sha256 + }) + await block.put(cborBlock) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(`${cborBlock.cid}`, block) if (exported.type !== 'object') { throw new Error('Unexpected type') @@ -964,50 +1036,80 @@ describe('exporter', () => { }) it('errors when exporting a node with no resolver', async () => { - const cid = new CID(1, 'git-raw', new CID('zdj7WkRPAX9o9nb9zPbXzwG7JEs78uyhwbUs8JSUayB98DWWY').multihash) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const cid = CID.create(1, mc.GIT_RAW, CID.parse('zdj7WkRPAX9o9nb9zPbXzwG7JEs78uyhwbUs8JSUayB98DWWY').multihash) try { - await exporter(`${cid}`, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + await exporter(`${cid}`, block) } catch (err) { expect(err.code).to.equal('ERR_NO_RESOLVER') } }) it('errors if we try to export links from inside a raw node', async () => { - const cid = await ipld.put(Uint8Array.from([0, 1, 2, 3, 4]), mc.RAW) + const rawBlock = await Block.encode({ + value: Uint8Array.from([0, 1, 2, 3, 4]), + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + codec: rawCodec, + hasher: sha256 + }) + await block.put(rawBlock) try { - await exporter(`${cid}/lol`, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + await exporter(`${rawBlock.cid}/lol`, block) } catch (err) { expect(err.code).to.equal('ERR_NOT_FOUND') } }) it('errors we export a non-unixfs dag-pb node', async () => { - const cid = await ipld.put(new DAGNode(Uint8Array.from([0, 1, 2, 3, 4])), mc.DAG_PB) + const dagpbBlock = await Block.encode({ + value: dagPb.prepare({ Data: Uint8Array.from([0, 1, 2, 3, 4]) }), + codec: dagPb, + hasher: sha256 + }) + await block.put(dagpbBlock) try { - await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + await exporter(dagpbBlock.cid, block) } catch (err) { expect(err.code).to.equal('ERR_NOT_UNIXFS') } }) it('errors we export a unixfs node that has a non-unixfs/dag-pb child', async () => { - const cborNodeCid = await ipld.put({ - foo: 'bar' - }, mc.DAG_CBOR) + const cborBlock = await Block.encode({ + value: { foo: 'bar' }, + codec: dagCbor, + hasher: sha256 + }) + await block.put(cborBlock) const file = new UnixFS({ type: 'file' }) file.addBlockSize(100) - const cid = await ipld.put(new DAGNode(file.marshal(), [ - new DAGLink('', 100, cborNodeCid) - ]), mc.DAG_PB) + const dagpbNode = dagPb.prepare({ + Data: file.marshal(), + Links: [{ + Name: '', + Tsize: 100, + Hash: cborBlock.cid + }] + }) + const dagpbBlock = await Block.encode({ + value: dagpbNode, + codec: dagPb, + hasher: sha256 + }) + await block.put(dagpbBlock) - const exported = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(dagpbBlock.cid, block) if (exported.type !== 'file') { throw new Error('Unexpected type') @@ -1026,7 +1128,8 @@ describe('exporter', () => { content: asAsyncIterable(uint8ArrayFromString('hello world')) }], block)) - const exported = await exporter(imported[0].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(imported[0].cid, block) expect(exported.depth).to.equal(0) }) @@ -1047,7 +1150,8 @@ describe('exporter', () => { throw new Error('Nothing imported') } - const exported = await all(recursive(dir.cid, ipld)) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await all(recursive(dir.cid, block)) const dirCid = dir.cid.toString() expect(exported[0].depth).to.equal(0) @@ -1072,10 +1176,12 @@ describe('exporter', () => { it('exports a CID encoded with the identity hash', async () => { const data = uint8ArrayFromString('hello world') - const hash = mh.encode(data, 'identity') - const cid = new CID(1, 'identity', hash) + const hash = mh.create(mc.IDENTITY, data) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const cid = CID.create(1, mc.IDENTITY, hash) - const exported = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(cid, block) if (exported.type !== 'identity') { throw new Error('Unexpected type') @@ -1089,10 +1195,12 @@ describe('exporter', () => { it('exports a CID encoded with the identity hash with an offset', async () => { const data = uint8ArrayFromString('hello world') - const hash = mh.encode(data, 'identity') - const cid = new CID(1, 'identity', hash) + const hash = mh.create(mc.IDENTITY, data) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const cid = CID.create(1, mc.IDENTITY, hash) - const exported = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(cid, block) if (exported.type !== 'identity') { throw new Error('Unexpected type') @@ -1107,10 +1215,12 @@ describe('exporter', () => { it('exports a CID encoded with the identity hash with a length', async () => { const data = uint8ArrayFromString('hello world') - const hash = mh.encode(data, 'identity') - const cid = new CID(1, 'identity', hash) + const hash = mh.create(mc.IDENTITY, data) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const cid = CID.create(1, mc.IDENTITY, hash) - const exported = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(cid, block) if (exported.type !== 'identity') { throw new Error('Unexpected type') @@ -1125,10 +1235,12 @@ describe('exporter', () => { it('exports a CID encoded with the identity hash with an offset and a length', async () => { const data = uint8ArrayFromString('hello world') - const hash = mh.encode(data, 'identity') - const cid = new CID(1, 'identity', hash) + const hash = mh.create(mc.IDENTITY, data) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const cid = CID.create(1, mc.IDENTITY, hash) - const exported = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const exported = await exporter(cid, block) if (exported.type !== 'identity') { throw new Error('Unexpected type') @@ -1147,8 +1259,9 @@ describe('exporter', () => { // data should not be in IPLD const data = uint8ArrayFromString(`hello world '${Math.random()}`) - const hash = mh.encode(data, 'sha2-256') - const cid = new CID(1, 'dag-pb', hash) + const hash = mh.create(mc.SHA2_256, data) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const cid = CID.create(1, mc.DAG_PB, hash) const message = `User aborted ${Math.random()}` setTimeout(() => { @@ -1157,7 +1270,7 @@ describe('exporter', () => { // regular test IPLD is offline-only, we need to mimic what happens when // we try to get a block from the network - const ipld = { + const customBlock = { /** * * @param {CID} cid @@ -1174,7 +1287,7 @@ describe('exporter', () => { } // @ts-ignore ipld implementation incomplete - await expect(exporter(cid, ipld, { + await expect(exporter(cid, customBlock, { signal: abortController.signal })).to.eventually.be.rejectedWith(message) }) diff --git a/packages/ipfs-unixfs-exporter/test/helpers/block.js b/packages/ipfs-unixfs-exporter/test/helpers/block.js index 64b718fd..3f35201a 100644 --- a/packages/ipfs-unixfs-exporter/test/helpers/block.js +++ b/packages/ipfs-unixfs-exporter/test/helpers/block.js @@ -1,60 +1,28 @@ 'use strict' -const { - DAGNode, - util -} = require('ipld-dag-pb') -const multicodec = require('multicodec') -const mh = require('multihashing-async').multihash -const CID = require('cids') -const Block = require('ipld-block') +function createBlockApi () { + /** @type {{[key: string]: Uint8Array}} */ + const blocks = {} -/** - * @param {import('ipld')} ipld - */ -function createBlockApi (ipld) { - // make ipld behave like the block api, some tests need to pull - // data from ipld so can't use a simple in-memory cid->block map - /** @type {import('ipfs-unixfs-importer/src/types').BlockAPI} */ + /** @type {import('ipfs-unixfs-importer').BlockAPI} */ const BlockApi = { - put: async (buf, options) => { - if (!options || !options.cid) { - throw new Error('No cid passed') + put: async ({ cid, bytes }, options) => { + if (!(options && options.onlyHash)) { + blocks[cid.toV1().toString()] = bytes } - const cid = new CID(options.cid) - - const multihash = mh.decode(cid.multihash) - - if (Block.isBlock(buf)) { - buf = buf.data - } - - /** @type {any} */ - let obj = buf - - if (cid.codec === 'dag-pb') { - obj = util.deserialize(buf) - } - - await ipld.put(obj, cid.codec === 'dag-pb' ? multicodec.DAG_PB : multicodec.RAW, { - cidVersion: cid.version, - hashAlg: multihash.code - }) - - return new Block(buf, cid) + return { cid, bytes } }, - get: async (cid, options) => { - cid = new CID(cid) - - /** @type {Uint8Array} */ - let buf = await ipld.get(cid, options) - - if (buf instanceof DAGNode) { - buf = buf.serialize() + get: async (cid, _options) => { + const bytes = blocks[cid.toV1().toString()] + if (bytes === undefined) { + const error = new Error() + // @ts-ignore - TODO vmx 2021-03-24: Should the error type be wrapped in a custom type? + error.code = 'ERR_NOT_FOUND' + throw(error) } - return new Block(buf, cid) + return { cid, bytes } } } diff --git a/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js b/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js index b8f04509..e4150bcc 100644 --- a/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js +++ b/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js @@ -1,15 +1,24 @@ 'use strict' +// @ts-ignore - TODO vmx 2021-03-25: add typedefs +const { decode } = require('@ipld/dag-pb') + +/** + * @typedef {import('../../src/types').PbLink} PbLink + */ + /** - * @param {import('cids')} cid - * @param {import('ipld')} ipld + * @param {import('multiformats/cid')} cid + * @param {import('ipfs-unixfs-importer/src/types').BlockAPI} blockService */ -module.exports = function (cid, ipld) { +module.exports = function (cid, blockService) { /** - * @param {import('cids')} cid + * @param {import('multiformats/cid')} cid */ async function * traverse (cid) { - const node = await ipld.get(cid) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const block = await blockService.get(cid) + const node = decode(block.bytes) if (node instanceof Uint8Array || !node.Links.length) { yield { @@ -22,8 +31,9 @@ module.exports = function (cid, ipld) { node.Links.forEach( /** - * @param {import('ipld-dag-pb').DAGLink} link + * @param {PbLink} link */ + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code link => traverse(link.Hash) ) } diff --git a/packages/ipfs-unixfs-exporter/test/import-export-dir-sharding.spec.js b/packages/ipfs-unixfs-exporter/test/import-export-dir-sharding.spec.js index 14cb081a..876260dc 100644 --- a/packages/ipfs-unixfs-exporter/test/import-export-dir-sharding.spec.js +++ b/packages/ipfs-unixfs-exporter/test/import-export-dir-sharding.spec.js @@ -5,10 +5,6 @@ const { importer } = require('ipfs-unixfs-importer') const { exporter } = require('../src') const { expect } = require('aegir/utils/chai') -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const all = require('it-all') const last = require('it-last') const blockApi = require('./helpers/block') @@ -23,15 +19,8 @@ const asAsyncIterable = require('./helpers/as-async-iterable') */ describe('builder: directory sharding', () => { - /** @type {import('ipld')} */ - let ipld /** @type {import('ipfs-unixfs-importer/src/types').BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) + const block = blockApi() describe('basic dirbuilder', () => { it('yields a non-sharded dir', async () => { @@ -48,7 +37,8 @@ describe('builder: directory sharding', () => { expect(nodes[0].path).to.equal('a/b') expect(nodes[1].path).to.equal('a') - const dirNode = await exporter(nodes[1].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dirNode = await exporter(nodes[1].cid, block) if (dirNode.type !== 'directory') { throw new Error('Unexpected type') @@ -56,7 +46,8 @@ describe('builder: directory sharding', () => { expect(dirNode.unixfs.type).to.equal('directory') - const fileNode = await exporter(nodes[0].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const fileNode = await exporter(nodes[0].cid, block) if (fileNode.type !== 'file') { throw new Error('Unexpected type') @@ -83,7 +74,8 @@ describe('builder: directory sharding', () => { expect(nodes[0].path).to.equal('a/b') expect(nodes[1].path).to.equal('a') - const node = await exporter(nodes[1].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node = await exporter(nodes[1].cid, block) if (node.type !== 'directory') { throw new Error('Unexpected type') @@ -103,7 +95,8 @@ describe('builder: directory sharding', () => { const nonShardedHash = nodes[1].cid - const dir = await exporter(nonShardedHash, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dir = await exporter(nonShardedHash, block) if (dir.type !== 'directory') { throw new Error('Unexpected type') @@ -140,7 +133,8 @@ describe('builder: directory sharding', () => { const shardedHash = nodes[1].cid - const dir = await exporter(shardedHash, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dir = await exporter(shardedHash, block) if (dir.type !== 'directory') { throw new Error('Unexpected type') @@ -207,7 +201,8 @@ describe('builder: directory sharding', () => { expect(nodes.length).to.equal(maxDirs + 1) // files plus the containing directory - const dir = await exporter(nodes[nodes.length - 1].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dir = await exporter(nodes[nodes.length - 1].cid, block) if (dir.type !== 'directory') { throw new Error('Unexpected type') @@ -229,7 +224,7 @@ describe('builder: directory sharding', () => { const maxDirs = 2000 const maxDepth = 3 - /** @type {import('cids')} */ + /** @type {import('multiformats').CID} */ let rootHash before(async () => { @@ -276,7 +271,8 @@ describe('builder: directory sharding', () => { }) it('imports a big dir', async () => { - const dir = await exporter(rootHash, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dir = await exporter(rootHash, block) /** * @param {UnixFSEntry} node @@ -351,7 +347,8 @@ describe('builder: directory sharding', () => { } } - const dir = await exporter(rootHash, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const dir = await exporter(rootHash, block) const entries = await collectContent(dir) let index = 0 @@ -365,7 +362,8 @@ describe('builder: directory sharding', () => { it('exports a big dir with subpath', async () => { const exportHash = rootHash.toString() + '/big/big/2000' - const node = await exporter(exportHash, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node = await exporter(exportHash, block) expect(node.path).to.equal(exportHash) if (node.type !== 'file') { diff --git a/packages/ipfs-unixfs-exporter/test/import-export-nested-dir.spec.js b/packages/ipfs-unixfs-exporter/test/import-export-nested-dir.spec.js index 12ad7061..94a0da81 100644 --- a/packages/ipfs-unixfs-exporter/test/import-export-nested-dir.spec.js +++ b/packages/ipfs-unixfs-exporter/test/import-export-nested-dir.spec.js @@ -2,10 +2,6 @@ 'use strict' const { expect } = require('aegir/utils/chai') -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const all = require('it-all') const { importer } = require('ipfs-unixfs-importer') const { exporter } = require('../src') @@ -17,15 +13,8 @@ const asAsyncIterable = require('./helpers/as-async-iterable') describe('import and export: directory', () => { const rootHash = 'QmdCrquDwd7RfZ6GCZFEVADwe8uyyw1YmF9mtAB7etDgmK' - /** @type {import('ipld')} */ - let ipld /** @type {import('ipfs-unixfs-importer/src/types').BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) + const block = blockApi() it('imports', async function () { this.timeout(20 * 1000) @@ -76,7 +65,7 @@ describe('import and export: directory', () => { it('exports', async function () { this.timeout(20 * 1000) - const dir = await exporter(rootHash, ipld) + const dir = await exporter(rootHash, block) const files = await recursiveExport(dir, rootHash) expect(files.sort(byPath)).to.eql([{ @@ -121,7 +110,7 @@ async function recursiveExport (node, path, entries = []) { } /** - * @param {{ path?: string, cid: import('cids') }} node + * @param {{ path?: string, cid: import('multiformats').CID }} node */ function normalizeNode (node) { return { diff --git a/packages/ipfs-unixfs-exporter/test/import-export.spec.js b/packages/ipfs-unixfs-exporter/test/import-export.spec.js index 245f830a..2120cc6b 100644 --- a/packages/ipfs-unixfs-exporter/test/import-export.spec.js +++ b/packages/ipfs-unixfs-exporter/test/import-export.spec.js @@ -4,10 +4,6 @@ const { expect } = require('aegir/utils/chai') // @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') -// @ts-ignore const loadFixture = require('aegir/utils/fixtures') // @ts-ignore const isNode = require('detect-node') @@ -31,15 +27,8 @@ describe('import and export', function () { const importerOptions = { strategy: strategy } describe('using builder: ' + strategy, () => { - /** @type {import('ipld')} */ - let ipld /** @type {import('ipfs-unixfs-importer/src/types').BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) + const block = blockApi() it('imports and exports', async () => { const path = `${strategy}-big.dat` @@ -49,7 +38,8 @@ describe('import and export', function () { for await (const file of importer(values, block, importerOptions)) { expect(file.path).to.eql(path) - const result = await exporter(file.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const result = await exporter(file.cid, block) if (result.type !== 'file') { throw new Error('Unexpected type') diff --git a/packages/ipfs-unixfs-exporter/test/importer.spec.js b/packages/ipfs-unixfs-exporter/test/importer.spec.js index a84d6f63..7062b3bd 100644 --- a/packages/ipfs-unixfs-exporter/test/importer.spec.js +++ b/packages/ipfs-unixfs-exporter/test/importer.spec.js @@ -6,10 +6,6 @@ const { exporter, recursive } = require('../src') const extend = require('merge-options') const { expect } = require('aegir/utils/chai') const sinon = require('sinon') -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const { UnixFS } = require('ipfs-unixfs') const collectLeafCids = require('./helpers/collect-leaf-cids') // @ts-ignore @@ -27,13 +23,16 @@ const uint8ArrayConcat = require('uint8arrays/concat') const uint8ArrayFromString = require('uint8arrays/from-string') const asAsyncIterable = require('./helpers/as-async-iterable') const last = require('it-last') -const CID = require('cids') +const CID = require('multiformats/cid') +const { base58btc } = require('multiformats/bases/base58') +// @ts-ignore - TODO vmx 2021-03-25: add the types +const { decode } = require('@ipld/dag-pb') const { parseMtime } = require('ipfs-unixfs') /** - * @typedef {import('ipld')} IPLD + * @typedef {import('ipfs-core-types/src/block-service').BlockService} BlockService * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockAPI - * @typedef {import('ipld-dag-pb').DAGNode} DAGNode + * @typedef {import('../src/types').PbNode} PbNode */ /** @@ -201,11 +200,10 @@ const strategyOverrides = { /** * @param {BlockAPI} block - * @param {IPLD} ipld * @param {import('ipfs-unixfs-importer').UserImporterOptions} options * @param {*} expected */ -const checkLeafNodeTypes = async (block, ipld, options, expected) => { +const checkLeafNodeTypes = async (block, options, expected) => { const file = await first(importer([{ path: 'foo', content: asAsyncIterable(new Uint8Array(262144 + 5).fill(1)) @@ -215,18 +213,21 @@ const checkLeafNodeTypes = async (block, ipld, options, expected) => { throw new Error('Nothing imported') } - /** @type {DAGNode} */ - const node = await ipld.get(file.cid) + // @type {Block} + const fileBlock = await block.get(file.cid) + /** @type {PbNode} */ + const node = decode(fileBlock.bytes) const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal('file') expect(node.Links.length).to.equal(2) - const linkedNodes = await Promise.all( - node.Links.map(link => ipld.get(link.Hash)) + const linkedBlocks = await Promise.all( + node.Links.map(link => block.get(link.Hash)) ) - linkedNodes.forEach(node => { + linkedBlocks.forEach(({ bytes}) => { + const node = decode(bytes) const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal(expected) }) @@ -234,16 +235,16 @@ const checkLeafNodeTypes = async (block, ipld, options, expected) => { /** * @param {BlockAPI} block - * @param {IPLD} ipld * @param {import('ipfs-unixfs-importer').UserImporterOptions} options * @param {*} expected */ -const checkNodeLinks = async (block, ipld, options, expected) => { +const checkNodeLinks = async (block, options, expected) => { for await (const file of importer([{ path: 'foo', content: asAsyncIterable(new Uint8Array(100).fill(1)) }], block, options)) { - const node = await ipld.get(file.cid) + const fileBlock = await block.get(file.cid) + const node = decode(fileBlock.bytes) const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal('file') @@ -341,7 +342,7 @@ strategies.forEach((strategy) => { const actualFile = actualFiles[i] expect(actualFile.path).to.equal(expectedFile.path) - expect(actualFile.cid.toString('base58btc')).to.equal(expectedFile.cid) + expect(actualFile.cid.toString(base58btc)).to.equal(expectedFile.cid.toString()) if (actualFile.unixfs) { expect(actualFile.unixfs.type).to.equal(expectedFile.type) @@ -356,10 +357,8 @@ strategies.forEach((strategy) => { describe('importer: ' + strategy, function () { this.timeout(30 * 1000) - /** @type {IPLD} */ - let ipld /** @type {BlockAPI} */ - let block + const block = blockApi() /** @type {import('ipfs-unixfs-importer').UserImporterOptions} */ const options = { // @ts-ignore @@ -372,11 +371,6 @@ strategies.forEach((strategy) => { options.reduceSingleLeafToSelf = false } - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) - it('fails on bad content', async () => { try { // @ts-expect-error bad content @@ -625,6 +619,7 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block, options)) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const result = stringifyMh(files) expect(result.length).to.equal(5) @@ -671,7 +666,7 @@ strategies.forEach((strategy) => { expect(file).to.exist() try { - await ipld.get(file.cid) + await block.get(file.cid) throw new Error('No error was thrown') } catch (err) { @@ -756,11 +751,12 @@ strategies.forEach((strategy) => { // Just check the intermediate directory can be retrieved if (!inputFile) { - await ipld.get(cid) + await block.get(cid) } // Check the imported content is correct - const node = await exporter(cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node = await exporter(cid, block) if (node.type !== 'file') { throw new Error('Unexpected type') @@ -771,25 +767,25 @@ strategies.forEach((strategy) => { }) it('imports file with raw leaf nodes when specified', () => { - return checkLeafNodeTypes(block, ipld, { + return checkLeafNodeTypes(block, { leafType: 'raw' }, 'raw') }) it('imports file with file leaf nodes when specified', () => { - return checkLeafNodeTypes(block, ipld, { + return checkLeafNodeTypes(block, { leafType: 'file' }, 'file') }) it('reduces file to single node when specified', () => { - return checkNodeLinks(block, ipld, { + return checkNodeLinks(block, { reduceSingleLeafToSelf: true }, 0) }) it('does not reduce file to single node when overidden by options', () => { - return checkNodeLinks(block, ipld, { + return checkNodeLinks(block, { reduceSingleLeafToSelf: false }, 1) }) @@ -805,7 +801,8 @@ strategies.forEach((strategy) => { path: '1.2MiB.txt', content: asAsyncIterable(bigFile) }], block, options)) { - for await (const { cid } of collectLeafCids(file.cid, ipld)) { + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + for await (const { cid } of collectLeafCids(file.cid, block)) { expect(cid).to.have.property('codec', 'raw') expect(cid).to.have.property('version', 1) } @@ -825,7 +822,8 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile), mtime: parseMtime(now) }], block, options)) { - const node = await exporter(file.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node = await exporter(file.cid, block) expect(node).to.have.deep.nested.property('unixfs.mtime', dateToTimespec(now)) } @@ -841,7 +839,8 @@ strategies.forEach((strategy) => { mtime: parseMtime(now) }], block)) - const node = await exporter(entries[0].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node = await exporter(entries[0].cid, block) expect(node).to.have.deep.nested.property('unixfs.mtime', dateToTimespec(now)) }) @@ -860,7 +859,8 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - const nodes = await all(recursive(entries[entries.length - 1].cid, ipld)) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const nodes = await all(recursive(entries[entries.length - 1].cid, block)) const node = nodes.filter(node => node.type === 'directory').pop() if (!node) { @@ -886,7 +886,8 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - const nodes = await all(recursive(entries[entries.length - 1].cid, ipld)) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const nodes = await all(recursive(entries[entries.length - 1].cid, block)) const node = nodes.filter(node => node.type === 'directory').pop() if (!node) { @@ -917,7 +918,8 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - const nodes = await all(recursive(entries[entries.length - 1].cid, ipld)) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const nodes = await all(recursive(entries[entries.length - 1].cid, block)) const node = nodes.filter(node => node.type === 'directory' && node.name === 'bar').pop() if (!node) { @@ -948,7 +950,8 @@ strategies.forEach((strategy) => { shardSplitThreshold: 0 })) - const nodes = await all(recursive(entries[entries.length - 1].cid, ipld)) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const nodes = await all(recursive(entries[entries.length - 1].cid, block)) const node = nodes.filter(node => node.type === 'directory' && node.unixfs.type === 'hamt-sharded-directory').pop() if (!node) { @@ -971,7 +974,8 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile), mode }], block, options)) { - const node = await exporter(file.cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node = await exporter(file.cid, block) expect(node).to.have.nested.property('unixfs.mode', mode) } @@ -987,7 +991,8 @@ strategies.forEach((strategy) => { mode }], block)) - const node = await exporter(entries[0].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node = await exporter(entries[0].cid, block) expect(node).to.have.nested.property('unixfs.mode', mode) }) @@ -1007,10 +1012,12 @@ strategies.forEach((strategy) => { mode: mode2 }], block)) - const node1 = await exporter(entries[0].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node1 = await exporter(entries[0].cid, block) expect(node1).to.have.nested.property('unixfs.mode', mode1) - const node2 = await exporter(entries[1].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node2 = await exporter(entries[1].cid, block) expect(node2).to.have.nested.property('unixfs.mode', mode2) }) @@ -1028,10 +1035,12 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - const node1 = await exporter(entries[0].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node1 = await exporter(entries[0].cid, block) expect(node1).to.have.nested.property('unixfs.mode', mode) - const node2 = await exporter(entries[1].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node2 = await exporter(entries[1].cid, block) expect(node2).to.have.nested.property('unixfs.mode').that.does.not.equal(mode) }) @@ -1043,29 +1052,25 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - const node1 = await exporter(entries[0].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node1 = await exporter(entries[0].cid, block) expect(node1).to.have.nested.property('unixfs.mode', 0o0644) - const node2 = await exporter(entries[1].cid, ipld) + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const node2 = await exporter(entries[1].cid, block) expect(node2).to.have.nested.property('unixfs.mode', 0o0755) }) }) }) describe('configuration', () => { - /** @type {IPLD} */ - let ipld /** @type {BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) + const block = blockApi() it('alllows configuring with custom dag and tree builder', async () => { let builtTree = false - const cid = new CID('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn') + // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code + const cid = CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn') const unixfs = new UnixFS({ type: 'directory' }) // @ts-expect-error custom dag builder expects weird data diff --git a/packages/ipfs-unixfs-importer/package.json b/packages/ipfs-unixfs-importer/package.json index 132b8043..e748fba0 100644 --- a/packages/ipfs-unixfs-importer/package.json +++ b/packages/ipfs-unixfs-importer/package.json @@ -39,11 +39,7 @@ "copy": "^0.3.2", "crypto-browserify": "^3.12.0", "events": "^3.3.0", - "ipld": "^0.29.0", - "ipld-block": "^0.11.1", - "ipld-in-memory": "^8.0.0", "it-buffer-stream": "^2.0.0", - "multicodec": "^3.0.1", "nyc": "^15.0.0", "readable-stream": "^3.6.0", "rimraf": "^3.0.2", @@ -56,12 +52,13 @@ "err-code": "^3.0.1", "hamt-sharding": "^2.0.0", "ipfs-unixfs": "^4.0.3", - "ipld-dag-pb": "^0.22.2", "it-all": "^1.0.5", "it-batch": "^1.0.8", "it-first": "^1.0.6", "it-parallel-batch": "^1.0.9", "merge-options": "^3.0.4", + "multicodec": "^3.0.1", + "multiformats": "^4.6.1", "multihashing-async": "^2.1.0", "rabin-wasm": "^0.1.4", "uint8arrays": "^2.1.2" diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js index b7f30e34..147d97af 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js @@ -7,6 +7,7 @@ const { prepare // @ts-ignore } = require('@ipld/dag-pb') +const mc = require('multicodec') /** * @typedef {import('../../types').BufferImporter} BufferImporter @@ -23,14 +24,14 @@ async function * bufferImporter (file, block, options) { /** @type {import('../../types').PersistOptions} */ const opts = { - codec: 'dag-pb', + codec: mc.DAG_PB, cidVersion: options.cidVersion, hashAlg: options.hashAlg, onlyHash: options.onlyHash } if (options.rawLeaves) { - opts.codec = 'raw' + opts.codec = mc.RAW opts.cidVersion = 1 } else { unixfs = new UnixFS({ diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js index 494b29ae..3df0b0ab 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js @@ -8,9 +8,10 @@ const { prepare // @ts-ignore } = require('@ipld/dag-pb') -const all = require('it-all') const parallelBatch = require('it-parallel-batch') -const mh = require('multihashing-async').multihash +const mc = require('multicodec') +const mh = require('multiformats/hashes/digest') +const RAW = require('multiformats/codecs/raw').code /** * @typedef {import('../../types').BlockAPI} BlockAPI @@ -79,10 +80,10 @@ const reduce = (file, block, options) => { if (leaves.length === 1 && leaves[0].single && options.reduceSingleLeafToSelf) { const leaf = leaves[0] - if (leaf.cid.codec === 'raw' && (file.mtime !== undefined || file.mode !== undefined)) { + if (leaf.cid.code === RAW && (file.mtime !== undefined || file.mode !== undefined)) { // only one leaf node which is a buffer - we have metadata so convert it into a // UnixFS entry otherwise we'll have nowhere to store the metadata - let { data: buffer } = await block.get(leaf.cid, options) + let { bytes: buffer } = await block.get(leaf.cid, options) leaf.unixfs = new UnixFS({ type: 'file', @@ -91,13 +92,15 @@ const reduce = (file, block, options) => { data: buffer }) - const multihash = mh.decode(leaf.cid.multihash) + // @ts-ignore + const multihash = mh.decode(leaf.cid.multihash.bytes) buffer = encode(prepare({ Data: leaf.unixfs.marshal() })) leaf.cid = await persist(buffer, block, { ...options, - codec: 'dag-pb', - hashAlg: multihash.name, + codec: mc.DAG_PB, + // @ts-ignore + hashAlg: multihash.code, cidVersion: options.cidVersion }) leaf.size = buffer.length @@ -120,7 +123,7 @@ const reduce = (file, block, options) => { const links = leaves .filter(leaf => { - if (leaf.cid.codec === 'raw' && leaf.size) { + if (leaf.cid.code === RAW && leaf.size) { return true } @@ -131,7 +134,7 @@ const reduce = (file, block, options) => { return Boolean(leaf.unixfs && leaf.unixfs.data && leaf.unixfs.data.length) }) .map((leaf) => { - if (leaf.cid.codec === 'raw') { + if (leaf.cid.code === RAW) { // node is a leaf buffer f.addBlockSize(leaf.size) diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/trickle.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/trickle.js index fc1c6aef..1de9c98c 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/trickle.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/trickle.js @@ -3,7 +3,6 @@ const batch = require('it-batch') /** - * @typedef {import('cids')} CID * @typedef {import('ipfs-unixfs').UnixFS} UnixFS * @typedef {import('../../types').ImporterOptions} ImporterOptions * @typedef {import('../../types').InProgressImportResult} InProgressImportResult diff --git a/packages/ipfs-unixfs-importer/src/dir-flat.js b/packages/ipfs-unixfs-importer/src/dir-flat.js index efd45080..872762eb 100644 --- a/packages/ipfs-unixfs-importer/src/dir-flat.js +++ b/packages/ipfs-unixfs-importer/src/dir-flat.js @@ -5,7 +5,7 @@ const { prepare // @ts-ignore } = require('@ipld/dag-pb') -const UnixFS = require('ipfs-unixfs') +const { UnixFS } = require('ipfs-unixfs') const Dir = require('./dir') const persist = require('./utils/persist') @@ -15,7 +15,8 @@ const persist = require('./utils/persist') * @typedef {import('./types').InProgressImportResult} InProgressImportResult * @typedef {import('./types').BlockAPI} BlockAPI * @typedef {import('./dir').DirProps} DirProps - * @typedef {import('cids')} CID + * @typedef {import('ipfs-unixfs-exporter/src/types').PbNode} PbNode + * @typedef {import('ipfs-unixfs-exporter/src/types').PbLink} PbLink */ class DirFlat extends Dir { @@ -101,19 +102,21 @@ class DirFlat extends Dir { } } + // @ts-ignore - TODO vmx 2021-03-24: figure out what's wrong and fix it const unixfs = new UnixFS({ type: 'directory', mtime: this.mtime, mode: this.mode }) + /** @type {PbNode} */ const node = { Data: unixfs.marshal(), Links: links } const buffer = encode(prepare(node)) const cid = await persist(buffer, block, this.options) const size = buffer.length + node.Links.reduce( /** * @param {number} acc - * @param {{ Name: string, Tsize: number, Hash: CID }} curr + * @param {PbLink} curr */ (acc, curr) => acc + curr.Tsize, 0) diff --git a/packages/ipfs-unixfs-importer/src/dir.js b/packages/ipfs-unixfs-importer/src/dir.js index 072d66a6..6fc53868 100644 --- a/packages/ipfs-unixfs-importer/src/dir.js +++ b/packages/ipfs-unixfs-importer/src/dir.js @@ -5,7 +5,7 @@ * @typedef {import('./types').ImportResult} ImportResult * @typedef {import('./types').InProgressImportResult} InProgressImportResult * @typedef {import('./types').BlockAPI} BlockAPI - * @typedef {import('cids')} CID + * @typedef {import('multiformats/cid')} CID * @typedef {object} DirProps * @property {boolean} root * @property {boolean} dir diff --git a/packages/ipfs-unixfs-importer/src/options.js b/packages/ipfs-unixfs-importer/src/options.js index 6e9f4a3c..6f1b0fdc 100644 --- a/packages/ipfs-unixfs-importer/src/options.js +++ b/packages/ipfs-unixfs-importer/src/options.js @@ -2,6 +2,7 @@ const mergeOptions = require('merge-options').bind({ ignoreUndefined: true }) const multihashing = require('multihashing-async') +const mc = require('multicodec') /** * @param {Uint8Array} buf @@ -38,7 +39,7 @@ const defaultOptions = { rawLeaves: false, onlyHash: false, reduceSingleLeafToSelf: true, - hashAlg: 'sha2-256', + hashAlg: mc.SHA2_256, leafType: 'file', // 'raw' cidVersion: 0, progress: () => () => {}, diff --git a/packages/ipfs-unixfs-importer/src/types.d.ts b/packages/ipfs-unixfs-importer/src/types.d.ts index eacedca3..98464a0b 100644 --- a/packages/ipfs-unixfs-importer/src/types.d.ts +++ b/packages/ipfs-unixfs-importer/src/types.d.ts @@ -1,7 +1,6 @@ import { UnixFS, Mtime } from 'ipfs-unixfs' -import CID, { CIDVersion } from 'cids' +import CID from 'multiformats/cid' import { HashName } from 'multihashes' -import Block from 'ipld-block' import { CodecName } from 'multicodec' interface ImportCandidate { @@ -53,7 +52,7 @@ interface UserImporterOptions { rawLeaves?: boolean onlyHash?: boolean reduceSingleLeafToSelf?: boolean - hashAlg?: HashName + hashAlg?: CodecCode leafType?: 'file' | 'raw' cidVersion?: CIDVersion progress?: ProgressHandler @@ -88,7 +87,7 @@ interface ImporterOptions { rawLeaves: boolean onlyHash: boolean reduceSingleLeafToSelf: boolean - hashAlg: HashName + hashAlg: CodecCode leafType: 'file' | 'raw' cidVersion: CIDVersion progress: ProgressHandler @@ -131,19 +130,26 @@ export interface TrickleDagNode { } export interface PersistOptions { - codec?: string + //codec?: string + codec?: number cidVersion: CIDVersion - hashAlg: HashName + hashAlg: CodecCode onlyHash: boolean preload?: boolean timeout?: number signal?: AbortSignal } +// TODO vmx 2021-03-24: decide where to put this +export interface Block { + cid: CID + bytes: Uint8Array +} + // TODO: remove this and get from core-ipfs-types export interface BlockAPI { - get: (cid: CID | string | Uint8Array, options?: BlockOptions) => Promise - put: (block: Block | Uint8Array, options?: PutOptions) => Promise + get: (cid: CID, options?: BlockOptions) => Promise + put: (block: Block, options?: PutOptions) => Promise } // TODO: remove this and get from core-ipfs-types @@ -155,9 +161,6 @@ export interface BlockOptions { // TODO: remove this and get from core-ipfs-types export interface PutOptions extends BlockOptions { - cid?: CID - format?: CodecName - mhtype?: HashName - version?: CIDVersion + onlyHash?: boolean pin?: boolean } diff --git a/packages/ipfs-unixfs-importer/src/utils/persist.js b/packages/ipfs-unixfs-importer/src/utils/persist.js index a4aba3be..c31b2d63 100644 --- a/packages/ipfs-unixfs-importer/src/utils/persist.js +++ b/packages/ipfs-unixfs-importer/src/utils/persist.js @@ -1,7 +1,8 @@ 'use strict' -const mh = require('multihashing-async') -const CID = require('cids') +const mc = require('multicodec') +const { sha256 } = require('multiformats/hashes/sha2') +const CID = require('multiformats/cid') /** * @param {Uint8Array} buffer @@ -10,7 +11,7 @@ const CID = require('cids') */ const persist = async (buffer, block, options) => { if (!options.codec) { - options.codec = 'dag-pb' + options.codec = mc.DAG_PB } if (!options.cidVersion) { @@ -18,24 +19,35 @@ const persist = async (buffer, block, options) => { } if (!options.hashAlg) { - options.hashAlg = 'sha2-256' + options.hashAlg = mc.SHA2_256 } - if (options.hashAlg !== 'sha2-256') { + if (options.hashAlg !== mc.SHA2_256) { options.cidVersion = 1 } - const multihash = await mh(buffer, options.hashAlg) - const cid = new CID(options.cidVersion, options.codec, multihash) + let multihash + switch (options.hashAlg) { + case mc.SHA2_256: + multihash = await sha256.digest(buffer) + break + default: + throw(`TODO vmx 2021-02-24: support other hash algorithms. ${options.hashAlg} not found.`) + } + // TODO vmx 2021-02-24: no idea why TypeScript fails here, it should work + // @ts-ignore + const cid = CID.create(options.cidVersion, options.codec, multihash) if (!options.onlyHash) { - // @ts-ignore block api takes uint8arrays or blocks but is missing from typedefs - await block.put(buffer, { + await block.put({ + // @ts-ignore TODO vmx 2021-03-17 + bytes: buffer, + cid + }, { // @ts-ignore pin option is missing from block api typedefs pin: options.pin, preload: options.preload, timeout: options.timeout, - cid }) } diff --git a/packages/ipfs-unixfs-importer/test/benchmark.spec.js b/packages/ipfs-unixfs-importer/test/benchmark.spec.js index 73079e54..c6e7e1ff 100644 --- a/packages/ipfs-unixfs-importer/test/benchmark.spec.js +++ b/packages/ipfs-unixfs-importer/test/benchmark.spec.js @@ -3,12 +3,7 @@ const { importer } = require('../src') -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const bufferStream = require('it-buffer-stream') -const all = require('it-all') const blockApi = require('./helpers/block') const REPEATS = 10 @@ -18,15 +13,8 @@ const CHUNK_SIZE = 65536 describe.skip('benchmark', function () { this.timeout(30 * 1000) - /** @type {import('ipld')} */ - let ipld /** @type {import('../src').BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) + const block = blockApi() /** @type {number[]} */ const times = [] @@ -67,7 +55,7 @@ describe.skip('benchmark', function () { const buf = new Uint8Array(CHUNK_SIZE).fill(0) - await all(importer([{ + await importer([{ path: '200Bytes.txt', content: bufferStream(size, { chunkSize: CHUNK_SIZE, @@ -75,7 +63,7 @@ describe.skip('benchmark', function () { return buf } }) - }], block, options)) + }], block, options) }) } }) diff --git a/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js b/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js index 91d830b2..05088949 100644 --- a/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js @@ -3,7 +3,7 @@ const { expect } = require('aegir/utils/chai') const builder = require('../src/dag-builder/file/balanced') -const CID = require('cids') +const CID = require('multiformats/cid') const defaultOptions = require('../src/options') /** @@ -31,7 +31,8 @@ const options = { describe('builder: balanced', () => { it('reduces one value into itself', async () => { const source = [{ - cid: new CID('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), + // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2339: Property 'parse' does not exist on type 'typeof import("/js-multiformats/dist/types/cid")' + cid: CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), size: 0 }] @@ -44,13 +45,16 @@ describe('builder: balanced', () => { it('reduces 3 values into parent', async () => { const source = [{ - cid: new CID('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), + // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2339: Property 'parse' does not exist on type 'typeof import("/js-multiformats/dist/types/cid")' + cid: CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), size: 0 }, { - cid: new CID('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), + // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2339: Property 'parse' does not exist on type 'typeof import("/js-multiformats/dist/types/cid")' + cid: CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), size: 0 }, { - cid: new CID('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), + // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2339: Property 'parse' does not exist on type 'typeof import("/js-multiformats/dist/types/cid")' + cid: CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), size: 0 }] diff --git a/packages/ipfs-unixfs-importer/test/builder-only-hash.spec.js b/packages/ipfs-unixfs-importer/test/builder-only-hash.spec.js index 42e22930..3ad17cf2 100644 --- a/packages/ipfs-unixfs-importer/test/builder-only-hash.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder-only-hash.spec.js @@ -2,9 +2,6 @@ 'use strict' const { expect } = require('aegir/utils/chai') -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const builder = require('../src/dag-builder') const all = require('it-all') const blockApi = require('./helpers/block') @@ -12,15 +9,8 @@ const defaultOptions = require('../src/options') const asAsyncIterable = require('./helpers/as-async-iterable') describe('builder: onlyHash', () => { - /** @type {IPLD} */ - let ipld /** @type {import('../src/types').BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) + const block = blockApi() it('will only chunk and hash if passed an "onlyHash" option', async () => { const nodes = await all(builder([{ @@ -34,7 +24,7 @@ describe('builder: onlyHash', () => { expect(nodes.length).to.equal(1) try { - await ipld.get((await nodes[0]()).cid) + await block.get((await nodes[0]()).cid) throw new Error('Should have errored') } catch (err) { diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index 49a92d87..c4e88e8a 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -1,122 +1,123 @@ /* eslint-env mocha */ 'use strict' -const { expect } = require('aegir/utils/chai') -const mh = require('multihashing-async').multihash -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') -const { UnixFS } = require('ipfs-unixfs') -const builder = require('../src/dag-builder') -const first = require('it-first') -const blockApi = require('./helpers/block') -const uint8ArrayFromString = require('uint8arrays/from-string') -const defaultOptions = require('../src/options') -const asAsyncIterable = require('./helpers/as-async-iterable') - -describe('builder', () => { - /** @type {import('ipld')} */ - let ipld - /** @type {import('../src').BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) - - const testMultihashes = Object.keys(mh.names).slice(1, 10) - - it('allows multihash hash algorithm to be specified', async () => { - for (let i = 0; i < testMultihashes.length; i++) { - const hashAlg = testMultihashes[i] - const content = uint8ArrayFromString(String(Math.random() + Date.now())) - const inputFile = { - path: content + '.txt', - content: asAsyncIterable(content) - } - - const result = await first(builder([inputFile], block, { - ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names - hashAlg - })) - - if (!result) { - throw new Error('Nothing built') - } - - const imported = await result() - - expect(imported).to.exist() - - // Verify multihash has been encoded using hashAlg - expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) - - // Fetch using hashAlg encoded multihash - const node = await ipld.get(imported.cid) - - const fetchedContent = UnixFS.unmarshal(node.Data).data - expect(fetchedContent).to.deep.equal(content) - } - }) - - it('allows multihash hash algorithm to be specified for big file', async function () { - this.timeout(30000) - - for (let i = 0; i < testMultihashes.length; i++) { - const hashAlg = testMultihashes[i] - const content = String(Math.random() + Date.now()) - const inputFile = { - path: content + '.txt', - // Bigger than maxChunkSize - content: asAsyncIterable(new Uint8Array(262144 + 5).fill(1)) - } - - const result = await first(builder([inputFile], block, { - ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names - hashAlg - })) - - if (!result) { - throw new Error('Nothing built') - } - - const imported = await result() - - expect(imported).to.exist() - expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) - } - }) - - it('allows multihash hash algorithm to be specified for a directory', async () => { - for (let i = 0; i < testMultihashes.length; i++) { - const hashAlg = testMultihashes[i] - const inputFile = { - path: `${String(Math.random() + Date.now())}-dir` - } - - const result = await first(builder([{ ...inputFile }], block, { - ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names - hashAlg - })) - - if (!result) { - return new Error('Nothing built') - } - - const imported = await result() - - expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) - - // Fetch using hashAlg encoded multihash - const node = await ipld.get(imported.cid) - - const meta = UnixFS.unmarshal(node.Data) - expect(meta.type).to.equal('directory') - } - }) -}) +//const { expect } = require('aegir/utils/chai') +//const mh = require('multiformats/hashes/digest') +//// @ts-ignore +//const dagPb = require('@ipld/dag-pb') +//const { UnixFS } = require('ipfs-unixfs') +//const builder = require('../src/dag-builder') +//const first = require('it-first') +//const blockApi = require('./helpers/block') +//const uint8ArrayFromString = require('uint8arrays/from-string') +//const defaultOptions = require('../src/options') +//const asAsyncIterable = require('./helpers/as-async-iterable') + +// TODO vmx 2021-02-24: enable these tests again, they currently test with +//'sha1', 'sha2-256', 'sha2-512', 'sha3-512', 'sha3-384', 'sha3-256', 'sha3-224', 'shake-128', 'shake-256' + +//describe('builder', () => { +// /** @type {import('ipld')} */ +// let ipld +// /** @type {import('../src').BlockAPI} */ +// let block +// +// before(async () => { +// ipld = await inMemory(IPLD) +// block = blockApi(ipld) +// }) +// +// const testMultihashes = Object.keys(mh.names).slice(1, 10) +// +// it('allows multihash hash algorithm to be specified', async () => { +// for (let i = 0; i < testMultihashes.length; i++) { +// const hashAlg = testMultihashes[i] +// const content = uint8ArrayFromString(String(Math.random() + Date.now())) +// const inputFile = { +// path: content + '.txt', +// content: asAsyncIterable(content) +// } +// +// const result = await first(builder([inputFile], block, { +// ...defaultOptions(), +// // @ts-ignore thinks these aren't valid hash alg names +// hashAlg +// })) +// +// if (!result) { +// throw new Error('Nothing built') +// } +// +// const imported = await result() +// +// expect(imported).to.exist() +// +// // Verify multihash has been encoded using hashAlg +// expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) +// +// // Fetch using hashAlg encoded multihash +// const node = await ipld.get(imported.cid) +// +// const fetchedContent = UnixFS.unmarshal(node.Data).data +// expect(fetchedContent).to.deep.equal(content) +// } +// }) +// +// it('allows multihash hash algorithm to be specified for big file', async function () { +// this.timeout(30000) +// +// for (let i = 0; i < testMultihashes.length; i++) { +// const hashAlg = testMultihashes[i] +// const content = String(Math.random() + Date.now()) +// const inputFile = { +// path: content + '.txt', +// // Bigger than maxChunkSize +// content: asAsyncIterable(new Uint8Array(262144 + 5).fill(1)) +// } +// +// const result = await first(builder([inputFile], block, { +// ...defaultOptions(), +// // @ts-ignore thinks these aren't valid hash alg names +// hashAlg +// })) +// +// if (!result) { +// throw new Error('Nothing built') +// } +// +// const imported = await result() +// +// expect(imported).to.exist() +// expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) +// } +// }) +// +// it('allows multihash hash algorithm to be specified for a directory', async () => { +// for (let i = 0; i < testMultihashes.length; i++) { +// const hashAlg = testMultihashes[i] +// const inputFile = { +// path: `${String(Math.random() + Date.now())}-dir` +// } +// +// const result = await first(builder([{ ...inputFile }], block, { +// ...defaultOptions(), +// // @ts-ignore thinks these aren't valid hash alg names +// hashAlg +// })) +// +// if (!result) { +// return new Error('Nothing built') +// } +// +// const imported = await result() +// +// expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) +// +// // Fetch using hashAlg encoded multihash +// const node = await ipld.get(imported.cid) +// +// const meta = UnixFS.unmarshal(node.Data) +// expect(meta.type).to.equal('directory') +// } +// }) +//}) diff --git a/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js b/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js index ebb7a796..3ea49a80 100644 --- a/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js +++ b/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js @@ -3,25 +3,23 @@ const { importer } = require('../src') const { expect } = require('aegir/utils/chai') +const rawCodec = require('multiformats/codecs/raw') // @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') -const mc = require('multicodec') +const { sha256 } = require('multiformats/hashes/sha2') +const Block = require('multiformats/block') const blockApi = require('./helpers/block') const uint8ArrayFromString = require('uint8arrays/from-string') const { UnixFS } = require('ipfs-unixfs') + const iter = async function * () { yield uint8ArrayFromString('one') yield uint8ArrayFromString('two') } describe('custom chunker', function () { - /** @type {import('ipld')} */ - let ipld /** @type {import('../src').BlockAPI} */ - let block + const block = blockApi() /** * @param {AsyncIterable} content @@ -32,9 +30,15 @@ describe('custom chunker', function () { * @param {Uint8Array} buf */ const put = async (buf) => { - const cid = await ipld.put(buf, mc.RAW) + const encodedBlock = await Block.encode({ + value: buf, + // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2739: Type 'typeof import("/js-multiformats/dist/types/codecs/raw")' is missing the following properties from type 'BlockEncoder': name, code, encode + codec: rawCodec, + hasher: sha256 + }) + return { - cid, + cid: encodedBlock.cid, size: buf.length, unixfs: new UnixFS() } @@ -54,11 +58,6 @@ describe('custom chunker', function () { } } - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) - it('keeps custom chunking', async () => { const content = iter() for await (const part of importer([{ path: 'test', content }], block, { diff --git a/packages/ipfs-unixfs-importer/test/hash-parity-with-go-ipfs.spec.js b/packages/ipfs-unixfs-importer/test/hash-parity-with-go-ipfs.spec.js index 9e67f52e..df59ce90 100644 --- a/packages/ipfs-unixfs-importer/test/hash-parity-with-go-ipfs.spec.js +++ b/packages/ipfs-unixfs-importer/test/hash-parity-with-go-ipfs.spec.js @@ -4,10 +4,6 @@ const { importer } = require('../src') const { expect } = require('aegir/utils/chai') -// @ts-ignore -const IPLD = require('ipld') -// @ts-ignore -const inMemory = require('ipld-in-memory') const randomByteStream = require('./helpers/finite-pseudorandom-byte-stream') const first = require('it-first') const blockApi = require('./helpers/block') @@ -39,15 +35,8 @@ strategies.forEach(strategy => { } describe('go-ipfs interop using importer:' + strategy, () => { - /** @type {import('ipld')} */ - let ipld /** @type {import('../src').BlockAPI} */ - let block - - before(async () => { - ipld = await inMemory(IPLD) - block = blockApi(ipld) - }) + const block = blockApi() it('yields the same tree as go-ipfs', async function () { this.timeout(100 * 1000) diff --git a/packages/ipfs-unixfs-importer/test/helpers/block.js b/packages/ipfs-unixfs-importer/test/helpers/block.js index 330d8a14..2c6de7ca 100644 --- a/packages/ipfs-unixfs-importer/test/helpers/block.js +++ b/packages/ipfs-unixfs-importer/test/helpers/block.js @@ -1,60 +1,28 @@ 'use strict' -const { - DAGNode, - util -} = require('ipld-dag-pb') -const multicodec = require('multicodec') -const mh = require('multihashing-async').multihash -const CID = require('cids') -const Block = require('ipld-block') +function createBlockApi () { + /** @type {{[key: string]: Uint8Array}} */ + const blocks = {} -/** - * @param {import('ipld')} ipld - */ -function createBlockApi (ipld) { - // make ipld behave like the block api, some tests need to pull - // data from ipld so can't use a simple in-memory cid->block map - /** @type {import('../../src/types').BlockAPI} */ + /** @type {import('../../src').BlockAPI} */ const BlockApi = { - put: async (buf, options) => { - if (!options || !options.cid) { - throw new Error('No cid passed') + put: async ({ cid, bytes }, options) => { + if (!(options && !options.onlyHash)) { + blocks[cid.toV1().toString()] = bytes } - const cid = new CID(options.cid) - - const multihash = mh.decode(cid.multihash) - - if (Block.isBlock(buf)) { - buf = buf.data - } - - /** @type {any} */ - let obj = buf - - if (cid.codec === 'dag-pb') { - obj = util.deserialize(buf) - } - - await ipld.put(obj, cid.codec === 'dag-pb' ? multicodec.DAG_PB : multicodec.RAW, { - cidVersion: cid.version, - hashAlg: multihash.code - }) - - return new Block(buf, cid) + return { cid, bytes } }, - get: async (cid, options) => { - cid = new CID(cid) - - /** @type {Uint8Array} */ - let buf = await ipld.get(cid, options) - - if (buf instanceof DAGNode) { - buf = buf.serialize() + get: async (cid, _options) => { + const bytes = blocks[cid.toV1().toString()] + if (bytes === undefined) { + const error = new Error() + // @ts-ignore - TODO vmx 2021-03-24: Should the error type be wrapped in a custom type? + error.code = 'ERR_NOT_FOUND' + throw(error) } - return new Block(buf, cid) + return { cid, bytes } } } From 9663d146c661229e85a00248c14685d99d06d9e7 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Fri, 26 Mar 2021 15:35:58 +0100 Subject: [PATCH 03/22] feat: replace hashAlg option with actual hasher Instead of passing it a number, you now pass in a hasher implementation. --- .../src/dag-builder/file/buffer-importer.js | 2 +- .../src/dag-builder/file/index.js | 21 ++++++++++++++-- packages/ipfs-unixfs-importer/src/options.js | 4 ++-- packages/ipfs-unixfs-importer/src/types.d.ts | 7 +++--- .../ipfs-unixfs-importer/src/utils/persist.js | 24 +++++-------------- 5 files changed, 32 insertions(+), 26 deletions(-) diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js index 147d97af..e1b86524 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js @@ -26,7 +26,7 @@ async function * bufferImporter (file, block, options) { const opts = { codec: mc.DAG_PB, cidVersion: options.cidVersion, - hashAlg: options.hashAlg, + hasher: options.hasher, onlyHash: options.onlyHash } diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js index 3df0b0ab..6ee30e90 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js @@ -96,11 +96,28 @@ const reduce = (file, block, options) => { const multihash = mh.decode(leaf.cid.multihash.bytes) buffer = encode(prepare({ Data: leaf.unixfs.marshal() })) + //// TODO vmx 2021-03-26: This is what the original code does, it checks + //// the multihash of the original leaf node and uses then the same + //// hasher. i wonder if that's really needed or if we could just use + //// the hasher from `options.hasher` instead. + //let hasher + //switch multihash { + // case sha256.code { + // hasher = sha256 + // break; + // } + // //case identity.code { + // // hasher = identity + // // break; + // //} + // default: { + // throw new Error(`Unsupported hasher "${multihash}"`) + // } + //} leaf.cid = await persist(buffer, block, { ...options, codec: mc.DAG_PB, - // @ts-ignore - hashAlg: multihash.code, + hasher: options.hasher, cidVersion: options.cidVersion }) leaf.size = buffer.length diff --git a/packages/ipfs-unixfs-importer/src/options.js b/packages/ipfs-unixfs-importer/src/options.js index 6f1b0fdc..6dd51a45 100644 --- a/packages/ipfs-unixfs-importer/src/options.js +++ b/packages/ipfs-unixfs-importer/src/options.js @@ -2,7 +2,7 @@ const mergeOptions = require('merge-options').bind({ ignoreUndefined: true }) const multihashing = require('multihashing-async') -const mc = require('multicodec') +const { sha256 } = require('multiformats/hashes/sha2') /** * @param {Uint8Array} buf @@ -39,7 +39,7 @@ const defaultOptions = { rawLeaves: false, onlyHash: false, reduceSingleLeafToSelf: true, - hashAlg: mc.SHA2_256, + hasher: sha256, leafType: 'file', // 'raw' cidVersion: 0, progress: () => () => {}, diff --git a/packages/ipfs-unixfs-importer/src/types.d.ts b/packages/ipfs-unixfs-importer/src/types.d.ts index 98464a0b..5b0c44cc 100644 --- a/packages/ipfs-unixfs-importer/src/types.d.ts +++ b/packages/ipfs-unixfs-importer/src/types.d.ts @@ -2,6 +2,7 @@ import { UnixFS, Mtime } from 'ipfs-unixfs' import CID from 'multiformats/cid' import { HashName } from 'multihashes' import { CodecName } from 'multicodec' +import MultihashDigest from 'multiformats/hashes/hasher' interface ImportCandidate { path?: string @@ -52,7 +53,7 @@ interface UserImporterOptions { rawLeaves?: boolean onlyHash?: boolean reduceSingleLeafToSelf?: boolean - hashAlg?: CodecCode + hasher?: MultihashDigest leafType?: 'file' | 'raw' cidVersion?: CIDVersion progress?: ProgressHandler @@ -87,7 +88,7 @@ interface ImporterOptions { rawLeaves: boolean onlyHash: boolean reduceSingleLeafToSelf: boolean - hashAlg: CodecCode + hasher: MultihashDigest leafType: 'file' | 'raw' cidVersion: CIDVersion progress: ProgressHandler @@ -133,7 +134,7 @@ export interface PersistOptions { //codec?: string codec?: number cidVersion: CIDVersion - hashAlg: CodecCode + hasher: MultihashDigest onlyHash: boolean preload?: boolean timeout?: number diff --git a/packages/ipfs-unixfs-importer/src/utils/persist.js b/packages/ipfs-unixfs-importer/src/utils/persist.js index c31b2d63..6be0d8f9 100644 --- a/packages/ipfs-unixfs-importer/src/utils/persist.js +++ b/packages/ipfs-unixfs-importer/src/utils/persist.js @@ -1,7 +1,6 @@ 'use strict' const mc = require('multicodec') -const { sha256 } = require('multiformats/hashes/sha2') const CID = require('multiformats/cid') /** @@ -10,30 +9,19 @@ const CID = require('multiformats/cid') * @param {import('../types').PersistOptions} options */ const persist = async (buffer, block, options) => { - if (!options.codec) { - options.codec = mc.DAG_PB - } - - if (!options.cidVersion) { - options.cidVersion = 0 + if (!options.hasher) { + throw new Error(`Hasher must be specified.`) } - if (!options.hashAlg) { - options.hashAlg = mc.SHA2_256 + if (!options.codec) { + options.codec = mc.DAG_PB } - if (options.hashAlg !== mc.SHA2_256) { + if (options.cidVersion === undefined) { options.cidVersion = 1 } - let multihash - switch (options.hashAlg) { - case mc.SHA2_256: - multihash = await sha256.digest(buffer) - break - default: - throw(`TODO vmx 2021-02-24: support other hash algorithms. ${options.hashAlg} not found.`) - } + const multihash = await options.hasher.digest(buffer) // TODO vmx 2021-02-24: no idea why TypeScript fails here, it should work // @ts-ignore const cid = CID.create(options.cidVersion, options.codec, multihash) From ce3d3244dc64593bbd72296d8ad5d30dbfcfee8e Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Fri, 26 Mar 2021 20:13:33 +0100 Subject: [PATCH 04/22] fixup with WIP commit: things almost work, make it fully work once js-multiformats pr is merged --- .../test/helpers/block.js | 4 +- .../ipfs-unixfs-importer/src/utils/persist.js | 2 +- .../test/builder-balanced.spec.js | 2 +- .../ipfs-unixfs-importer/test/builder.spec.js | 233 +++++++++--------- .../test/helpers/block.js | 4 +- 5 files changed, 119 insertions(+), 126 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/test/helpers/block.js b/packages/ipfs-unixfs-exporter/test/helpers/block.js index 3f35201a..38c7f614 100644 --- a/packages/ipfs-unixfs-exporter/test/helpers/block.js +++ b/packages/ipfs-unixfs-exporter/test/helpers/block.js @@ -7,7 +7,7 @@ function createBlockApi () { /** @type {import('ipfs-unixfs-importer').BlockAPI} */ const BlockApi = { put: async ({ cid, bytes }, options) => { - if (!(options && options.onlyHash)) { + if (!options || !options.onlyHash) { blocks[cid.toV1().toString()] = bytes } @@ -16,7 +16,7 @@ function createBlockApi () { get: async (cid, _options) => { const bytes = blocks[cid.toV1().toString()] if (bytes === undefined) { - const error = new Error() + const error = new Error(`Couold not find data for CID '${cid}'`) // @ts-ignore - TODO vmx 2021-03-24: Should the error type be wrapped in a custom type? error.code = 'ERR_NOT_FOUND' throw(error) diff --git a/packages/ipfs-unixfs-importer/src/utils/persist.js b/packages/ipfs-unixfs-importer/src/utils/persist.js index 6be0d8f9..dafb0490 100644 --- a/packages/ipfs-unixfs-importer/src/utils/persist.js +++ b/packages/ipfs-unixfs-importer/src/utils/persist.js @@ -1,7 +1,7 @@ 'use strict' const mc = require('multicodec') -const CID = require('multiformats/cid') +const { CID } = require('multiformats') /** * @param {Uint8Array} buffer diff --git a/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js b/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js index 05088949..4e7fe174 100644 --- a/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js @@ -3,7 +3,7 @@ const { expect } = require('aegir/utils/chai') const builder = require('../src/dag-builder/file/balanced') -const CID = require('multiformats/cid') +const { CID } = require('multiformats') const defaultOptions = require('../src/options') /** diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index c4e88e8a..8a9be899 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -1,123 +1,116 @@ /* eslint-env mocha */ 'use strict' -//const { expect } = require('aegir/utils/chai') -//const mh = require('multiformats/hashes/digest') -//// @ts-ignore -//const dagPb = require('@ipld/dag-pb') -//const { UnixFS } = require('ipfs-unixfs') -//const builder = require('../src/dag-builder') -//const first = require('it-first') -//const blockApi = require('./helpers/block') -//const uint8ArrayFromString = require('uint8arrays/from-string') -//const defaultOptions = require('../src/options') -//const asAsyncIterable = require('./helpers/as-async-iterable') - -// TODO vmx 2021-02-24: enable these tests again, they currently test with -//'sha1', 'sha2-256', 'sha2-512', 'sha3-512', 'sha3-384', 'sha3-256', 'sha3-224', 'shake-128', 'shake-256' - -//describe('builder', () => { -// /** @type {import('ipld')} */ -// let ipld -// /** @type {import('../src').BlockAPI} */ -// let block -// -// before(async () => { -// ipld = await inMemory(IPLD) -// block = blockApi(ipld) -// }) -// -// const testMultihashes = Object.keys(mh.names).slice(1, 10) -// -// it('allows multihash hash algorithm to be specified', async () => { -// for (let i = 0; i < testMultihashes.length; i++) { -// const hashAlg = testMultihashes[i] -// const content = uint8ArrayFromString(String(Math.random() + Date.now())) -// const inputFile = { -// path: content + '.txt', -// content: asAsyncIterable(content) -// } -// -// const result = await first(builder([inputFile], block, { -// ...defaultOptions(), -// // @ts-ignore thinks these aren't valid hash alg names -// hashAlg -// })) -// -// if (!result) { -// throw new Error('Nothing built') -// } -// -// const imported = await result() -// -// expect(imported).to.exist() -// -// // Verify multihash has been encoded using hashAlg -// expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) -// -// // Fetch using hashAlg encoded multihash -// const node = await ipld.get(imported.cid) -// -// const fetchedContent = UnixFS.unmarshal(node.Data).data -// expect(fetchedContent).to.deep.equal(content) -// } -// }) -// -// it('allows multihash hash algorithm to be specified for big file', async function () { -// this.timeout(30000) -// -// for (let i = 0; i < testMultihashes.length; i++) { -// const hashAlg = testMultihashes[i] -// const content = String(Math.random() + Date.now()) -// const inputFile = { -// path: content + '.txt', -// // Bigger than maxChunkSize -// content: asAsyncIterable(new Uint8Array(262144 + 5).fill(1)) -// } -// -// const result = await first(builder([inputFile], block, { -// ...defaultOptions(), -// // @ts-ignore thinks these aren't valid hash alg names -// hashAlg -// })) -// -// if (!result) { -// throw new Error('Nothing built') -// } -// -// const imported = await result() -// -// expect(imported).to.exist() -// expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) -// } -// }) -// -// it('allows multihash hash algorithm to be specified for a directory', async () => { -// for (let i = 0; i < testMultihashes.length; i++) { -// const hashAlg = testMultihashes[i] -// const inputFile = { -// path: `${String(Math.random() + Date.now())}-dir` -// } -// -// const result = await first(builder([{ ...inputFile }], block, { -// ...defaultOptions(), -// // @ts-ignore thinks these aren't valid hash alg names -// hashAlg -// })) -// -// if (!result) { -// return new Error('Nothing built') -// } -// -// const imported = await result() -// -// expect(mh.decode(imported.cid.multihash).name).to.equal(hashAlg) -// -// // Fetch using hashAlg encoded multihash -// const node = await ipld.get(imported.cid) -// -// const meta = UnixFS.unmarshal(node.Data) -// expect(meta.type).to.equal('directory') -// } -// }) -//}) +const { expect } = require('aegir/utils/chai') +const mh = require('multiformats/hashes/digest') +const { sha256, sha512 } = require('multiformats/hashes/sha2') +const { decode } = require('@ipld/dag-pb') +// @ts-ignore +const dagPb = require('@ipld/dag-pb') +const { UnixFS } = require('ipfs-unixfs') +const builder = require('../src/dag-builder') +const first = require('it-first') +const blockApi = require('./helpers/block') +const uint8ArrayFromString = require('uint8arrays/from-string') +const defaultOptions = require('../src/options') +const asAsyncIterable = require('./helpers/as-async-iterable') + +describe('builder', () => { + /** @type {import('../src').BlockAPI} */ + const block = blockApi() + + const testMultihashes = [sha256, sha512] + + it('allows multihash hash algorithm to be specified', async () => { + for (let i = 0; i < testMultihashes.length; i++) { + const hasher = testMultihashes[i] + const content = uint8ArrayFromString(String(Math.random() + Date.now())) + const inputFile = { + path: content + '.txt', + content: asAsyncIterable(content) + } + + const result = await first(builder([inputFile], block, { + ...defaultOptions(), + // @ts-ignore thinks these aren't valid hash alg names + hasher + })) + + if (!result) { + throw new Error('Nothing built') + } + + const imported = await result() + expect(imported).to.exist() + + // Verify multihash has been encoded using hasher + expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) + + // Fetch using hasher encoded multihash + const importedBlock = await block.get(imported.cid) + const node = decode(importedBlock.bytes) + + const fetchedContent = UnixFS.unmarshal(node.Data).data + expect(fetchedContent).to.deep.equal(content) + } + }) + + it('allows multihash hash algorithm to be specified for big file', async function () { + this.timeout(30000) + + for (let i = 0; i < testMultihashes.length; i++) { + const hasher = testMultihashes[i] + const content = String(Math.random() + Date.now()) + const inputFile = { + path: content + '.txt', + // Bigger than maxChunkSize + content: asAsyncIterable(new Uint8Array(262144 + 5).fill(1)) + } + + const result = await first(builder([inputFile], block, { + ...defaultOptions(), + // @ts-ignore thinks these aren't valid hash alg names + hasher + })) + + if (!result) { + throw new Error('Nothing built') + } + + const imported = await result() + + expect(imported).to.exist() + expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) + } + }) + + it('allows multihash hash algorithm to be specified for a directory', async () => { + for (let i = 0; i < testMultihashes.length; i++) { + const hasher = testMultihashes[i] + const inputFile = { + path: `${String(Math.random() + Date.now())}-dir` + } + + const result = await first(builder([{ ...inputFile }], block, { + ...defaultOptions(), + // @ts-ignore thinks these aren't valid hash alg names + hasher + })) + + if (!result) { + return new Error('Nothing built') + } + + const imported = await result() + + expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) + + // Fetch using hasher encoded multihash + const importedBlock = await block.get(imported.cid) + const node = decode(importedBlock.bytes) + + const meta = UnixFS.unmarshal(node.Data) + expect(meta.type).to.equal('directory') + } + }) +}) diff --git a/packages/ipfs-unixfs-importer/test/helpers/block.js b/packages/ipfs-unixfs-importer/test/helpers/block.js index 2c6de7ca..5a062c7e 100644 --- a/packages/ipfs-unixfs-importer/test/helpers/block.js +++ b/packages/ipfs-unixfs-importer/test/helpers/block.js @@ -7,7 +7,7 @@ function createBlockApi () { /** @type {import('../../src').BlockAPI} */ const BlockApi = { put: async ({ cid, bytes }, options) => { - if (!(options && !options.onlyHash)) { + if (!options || !options.onlyHash) { blocks[cid.toV1().toString()] = bytes } @@ -16,7 +16,7 @@ function createBlockApi () { get: async (cid, _options) => { const bytes = blocks[cid.toV1().toString()] if (bytes === undefined) { - const error = new Error() + const error = new Error(`Couold not find data for CID '${cid}'`) // @ts-ignore - TODO vmx 2021-03-24: Should the error type be wrapped in a custom type? error.code = 'ERR_NOT_FOUND' throw(error) From e746040b6d638281e0c5ea95f8c72681910e8534 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Sat, 27 Mar 2021 01:29:25 +0100 Subject: [PATCH 05/22] chore: format builder.spec.js properly --- .../ipfs-unixfs-importer/test/builder.spec.js | 184 +++++++++--------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index 8a9be899..ebb727e2 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -21,96 +21,96 @@ describe('builder', () => { const testMultihashes = [sha256, sha512] - it('allows multihash hash algorithm to be specified', async () => { - for (let i = 0; i < testMultihashes.length; i++) { - const hasher = testMultihashes[i] - const content = uint8ArrayFromString(String(Math.random() + Date.now())) - const inputFile = { - path: content + '.txt', - content: asAsyncIterable(content) - } - - const result = await first(builder([inputFile], block, { - ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names - hasher - })) - - if (!result) { - throw new Error('Nothing built') - } - - const imported = await result() - expect(imported).to.exist() - - // Verify multihash has been encoded using hasher - expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) - - // Fetch using hasher encoded multihash - const importedBlock = await block.get(imported.cid) - const node = decode(importedBlock.bytes) - - const fetchedContent = UnixFS.unmarshal(node.Data).data - expect(fetchedContent).to.deep.equal(content) - } + it('allows multihash hash algorithm to be specified', async () => { + for (let i = 0; i < testMultihashes.length; i++) { + const hasher = testMultihashes[i] + const content = uint8ArrayFromString(String(Math.random() + Date.now())) + const inputFile = { + path: content + '.txt', + content: asAsyncIterable(content) + } + + const result = await first(builder([inputFile], block, { + ...defaultOptions(), + // @ts-ignore thinks these aren't valid hash alg names + hasher + })) + + if (!result) { + throw new Error('Nothing built') + } + + const imported = await result() + expect(imported).to.exist() + + // Verify multihash has been encoded using hasher + expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) + + // Fetch using hasher encoded multihash + const importedBlock = await block.get(imported.cid) + const node = decode(importedBlock.bytes) + + const fetchedContent = UnixFS.unmarshal(node.Data).data + expect(fetchedContent).to.deep.equal(content) + } + }) + + it('allows multihash hash algorithm to be specified for big file', async function () { + this.timeout(30000) + + for (let i = 0; i < testMultihashes.length; i++) { + const hasher = testMultihashes[i] + const content = String(Math.random() + Date.now()) + const inputFile = { + path: content + '.txt', + // Bigger than maxChunkSize + content: asAsyncIterable(new Uint8Array(262144 + 5).fill(1)) + } + + const result = await first(builder([inputFile], block, { + ...defaultOptions(), + // @ts-ignore thinks these aren't valid hash alg names + hasher + })) + + if (!result) { + throw new Error('Nothing built') + } + + const imported = await result() + + expect(imported).to.exist() + expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) + } + }) + + it('allows multihash hash algorithm to be specified for a directory', async () => { + for (let i = 0; i < testMultihashes.length; i++) { + const hasher = testMultihashes[i] + const inputFile = { + path: `${String(Math.random() + Date.now())}-dir` + } + + const result = await first(builder([{ ...inputFile }], block, { + ...defaultOptions(), + // @ts-ignore thinks these aren't valid hash alg names + hasher + })) + + if (!result) { + return new Error('Nothing built') + } + + const imported = await result() + + expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) + + // Fetch using hasher encoded multihash + const importedBlock = await block.get(imported.cid) + const node = decode(importedBlock.bytes) + + const meta = UnixFS.unmarshal(node.Data) + expect(meta.type).to.equal('directory') + } + }) }) - - it('allows multihash hash algorithm to be specified for big file', async function () { - this.timeout(30000) - - for (let i = 0; i < testMultihashes.length; i++) { - const hasher = testMultihashes[i] - const content = String(Math.random() + Date.now()) - const inputFile = { - path: content + '.txt', - // Bigger than maxChunkSize - content: asAsyncIterable(new Uint8Array(262144 + 5).fill(1)) - } - - const result = await first(builder([inputFile], block, { - ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names - hasher - })) - - if (!result) { - throw new Error('Nothing built') - } - - const imported = await result() - - expect(imported).to.exist() - expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) - } - }) - - it('allows multihash hash algorithm to be specified for a directory', async () => { - for (let i = 0; i < testMultihashes.length; i++) { - const hasher = testMultihashes[i] - const inputFile = { - path: `${String(Math.random() + Date.now())}-dir` - } - - const result = await first(builder([{ ...inputFile }], block, { - ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names - hasher - })) - - if (!result) { - return new Error('Nothing built') - } - - const imported = await result() - - expect(mh.decode(imported.cid.multihash.bytes).code).to.equal(hasher.code) - - // Fetch using hasher encoded multihash - const importedBlock = await block.get(imported.cid) - const node = decode(importedBlock.bytes) - - const meta = UnixFS.unmarshal(node.Data) - expect(meta.type).to.equal('directory') - } - }) -}) From 052eb3f3675eb503666c0a5e59d181fd64c27a24 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Sat, 27 Mar 2021 01:10:33 +0100 Subject: [PATCH 06/22] fix: fix typescript typechecking errors --- packages/ipfs-unixfs-exporter/src/index.js | 2 +- .../src/resolvers/dag-cbor.js | 2 +- packages/ipfs-unixfs-exporter/src/types.d.ts | 2 +- .../src/utils/find-cid-in-shard.js | 2 +- .../test/exporter-sharded.spec.js | 4 +- .../test/exporter.spec.js | 48 +------------------ .../test/helpers/collect-leaf-cids.js | 6 +-- .../test/import-export-dir-sharding.spec.js | 11 +---- .../test/import-export-nested-dir.spec.js | 2 +- .../test/import-export.spec.js | 1 - .../test/importer.spec.js | 20 +------- .../src/dag-builder/file/index.js | 8 ++-- packages/ipfs-unixfs-importer/src/dir-flat.js | 2 + packages/ipfs-unixfs-importer/src/dir.js | 2 +- packages/ipfs-unixfs-importer/src/types.d.ts | 2 +- .../ipfs-unixfs-importer/src/utils/persist.js | 2 +- .../test/builder-balanced.spec.js | 2 +- .../ipfs-unixfs-importer/test/builder.spec.js | 3 +- .../test/chunker-custom.spec.js | 1 - 19 files changed, 22 insertions(+), 100 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/src/index.js b/packages/ipfs-unixfs-exporter/src/index.js index bccd626d..179fe436 100644 --- a/packages/ipfs-unixfs-exporter/src/index.js +++ b/packages/ipfs-unixfs-exporter/src/index.js @@ -1,7 +1,7 @@ 'use strict' const errCode = require('err-code') -const CID = require('multiformats/cid') +const { CID } = require('multiformats/cid') const resolve = require('./resolvers') const last = require('it-last') diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js index 1b4195d8..39c87e60 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js @@ -1,6 +1,6 @@ 'use strict' -const CID = require('multiformats/cid') +const { CID } = require('multiformats/cid') const errCode = require('err-code') // @ts-ignore const dagCbor = require('@ipld/dag-cbor') diff --git a/packages/ipfs-unixfs-exporter/src/types.d.ts b/packages/ipfs-unixfs-exporter/src/types.d.ts index ee54ed86..34e520e1 100644 --- a/packages/ipfs-unixfs-exporter/src/types.d.ts +++ b/packages/ipfs-unixfs-exporter/src/types.d.ts @@ -1,4 +1,4 @@ -import { CID } from 'multiformats' +import { CID } from 'multiformats/cid' import UnixFS from 'ipfs-unixfs' import DAGNode from 'ipld-dag-pb' diff --git a/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js b/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js index a4bc8d93..aaaa00ea 100644 --- a/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js +++ b/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js @@ -7,7 +7,7 @@ const { decode } = require('@ipld/dag-pb') /** * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockService - * @typedef {import('multiformats').CID} CID + * @typedef {import('multiformats/cid').CID} CID * @typedef {import('../types').ExporterOptions} ExporterOptions * @typedef {import('../types').PbNode} PbNode * @typedef {import('../types').PbLink} PbLink diff --git a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js index 963f3cc3..451aad90 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js @@ -17,7 +17,7 @@ const uint8ArrayConcat = require('uint8arrays/concat') const asAsyncIterable = require('./helpers/as-async-iterable') /** - * @typedef {import('multiformats').CID} CID + * @typedef {import('multiformats/cid').CID} CID */ const SHARD_SPLIT_THRESHOLD = 10 @@ -103,7 +103,6 @@ describe('exporter sharded', function () { expect(dirMetadata.type).to.equal('hamt-sharded-directory') - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(dirCid, block) expect(exported.cid.toString()).to.be.equal(dirCid.toString()) @@ -140,7 +139,6 @@ describe('exporter sharded', function () { it('exports all files from a sharded directory with subshards', async () => { const numFiles = 31 const dirCid = await createShard(numFiles) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(dirCid, block) if (exported.type !== 'directory') { diff --git a/packages/ipfs-unixfs-exporter/test/exporter.spec.js b/packages/ipfs-unixfs-exporter/test/exporter.spec.js index 270358e1..d7a4b30e 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter.spec.js @@ -3,7 +3,7 @@ const { expect } = require('aegir/utils/chai') const { UnixFS } = require('ipfs-unixfs') -const CID = require('multiformats/cid') +const { CID } = require('multiformats/cid') // @ts-ignore - TODO vmx 2021-03-25: add those typedefs const dagPb = require('@ipld/dag-pb') // @ts-ignore - TODO vmx 2021-03-25: add those typedefs @@ -109,7 +109,6 @@ describe('exporter', () => { */ async function addAndReadTestFile ({ file, offset, length, strategy = 'balanced', path = '/foo', maxChunkSize, rawLeaves }) { const cid = await addTestFile({ file, strategy, path, maxChunkSize, rawLeaves }) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const entry = await exporter(cid, block) if (entry.type !== 'file' && entry.type !== 'raw') { @@ -159,7 +158,6 @@ describe('exporter', () => { links.push({ Name: '', - // TODO vmx 2021-03-24: this might make the test fail, perhaps just use `0`? Tsize: child.node.Data.length, Hash: child.cid }) @@ -190,7 +188,6 @@ describe('exporter', () => { expect(unmarsh.data).to.deep.equal(result.file.data) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(result.cid, block) expect(file).to.have.property('cid') @@ -252,7 +249,6 @@ describe('exporter', () => { throw new Error('Unexpected data') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(result.cid, block) if (file.type !== 'file') { @@ -322,7 +318,6 @@ describe('exporter', () => { }) await block.put(fileBlock) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(fileBlock.cid, block) if (exported.type !== 'file') { @@ -351,7 +346,6 @@ describe('exporter', () => { throw new Error('Expected data') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(result.cid, block) if (file.type !== 'file') { @@ -373,7 +367,6 @@ describe('exporter', () => { file: uint8ArrayConcat(await all(randomBytes(ONE_MEG * 6))) }) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(cid, block) if (file.type !== 'file') { @@ -395,7 +388,6 @@ describe('exporter', () => { file: bytes }) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(cid, block) expect(file).to.have.property('path', cid.toString()) @@ -462,7 +454,6 @@ describe('exporter', () => { throw new Error('Nothing imported') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dir = await exporter(importedDir.cid, block) if (dir.type !== 'directory') { @@ -511,7 +502,6 @@ describe('exporter', () => { throw new Error('Nothing imported') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dir = await exporter(importedDir.cid, block) if (dir.type !== 'directory') { @@ -668,7 +658,6 @@ describe('exporter', () => { throw new Error('Nothing imported') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(imported.cid, block) if (file.type !== 'file') { @@ -689,7 +678,6 @@ describe('exporter', () => { throw new Error('Nothing imported') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dir = await exporter(imported.cid, block) if (dir.type !== 'directory') { @@ -809,7 +797,6 @@ describe('exporter', () => { file: bigFile, maxChunkSize: 1024 }) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(cid, block) if (file.type !== 'file') { @@ -848,7 +835,6 @@ describe('exporter', () => { const hash = 'bafybeidu2qqwriogfndznz32swi5r4p2wruf6ztu5k7my53tsezwhncs5y' try { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code await exporter(hash, block) } catch (err) { expect(err.code).to.equal('ERR_NOT_FOUND') @@ -858,11 +844,9 @@ describe('exporter', () => { it('exports file with data on internal and leaf nodes', async () => { const leaf = await createAndPersistNode('raw', [0x04, 0x05, 0x06, 0x07], []) const node = await createAndPersistNode('file', [0x00, 0x01, 0x02, 0x03], [ - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code leaf ]) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(node.cid, block) if (file.type !== 'file') { @@ -892,22 +876,16 @@ describe('exporter', () => { ]) const internalNodes = await Promise.all([ - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code createAndPersistNode('raw', [0x04, 0x05, 0x06, 0x07], [leaves[1]]), - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code createAndPersistNode('raw', undefined, [leaves[2]]) ]) const node = await createAndPersistNode('file', undefined, [ - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code leaves[0], - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code internalNodes[0], - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code internalNodes[1] ]) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(node.cid, block) if (file.type !== 'file') { @@ -927,11 +905,9 @@ describe('exporter', () => { it('exports file with data on internal and leaf nodes with an offset that only fetches data from leaf nodes', async () => { const leaf = await createAndPersistNode('raw', [0x04, 0x05, 0x06, 0x07], []) const node = await createAndPersistNode('file', [0x00, 0x01, 0x02, 0x03], [ - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code leaf ]) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(node.cid, block) if (file.type !== 'file') { @@ -959,7 +935,6 @@ describe('exporter', () => { throw new Error('Nothing imported') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(imported.cid, block) if (file.type !== 'file') { @@ -985,9 +960,7 @@ describe('exporter', () => { throw new Error('Nothing imported') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const file = await exporter(imported.cid, block) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code expect(CID.asCID(file.cid)).to.not.be.undefined() if (file.type !== 'raw') { @@ -1007,7 +980,6 @@ describe('exporter', () => { await block.put(cborBlock) try { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code await exporter(`${cborBlock.cid}/baz`, block) } catch (err) { expect(err.code).to.equal('ERR_NO_PROP') @@ -1025,7 +997,6 @@ describe('exporter', () => { hasher: sha256 }) await block.put(cborBlock) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(`${cborBlock.cid}`, block) if (exported.type !== 'object') { @@ -1036,11 +1007,9 @@ describe('exporter', () => { }) it('errors when exporting a node with no resolver', async () => { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const cid = CID.create(1, mc.GIT_RAW, CID.parse('zdj7WkRPAX9o9nb9zPbXzwG7JEs78uyhwbUs8JSUayB98DWWY').multihash) try { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code await exporter(`${cid}`, block) } catch (err) { expect(err.code).to.equal('ERR_NO_RESOLVER') @@ -1050,14 +1019,12 @@ describe('exporter', () => { it('errors if we try to export links from inside a raw node', async () => { const rawBlock = await Block.encode({ value: Uint8Array.from([0, 1, 2, 3, 4]), - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code codec: rawCodec, hasher: sha256 }) await block.put(rawBlock) try { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code await exporter(`${rawBlock.cid}/lol`, block) } catch (err) { expect(err.code).to.equal('ERR_NOT_FOUND') @@ -1073,7 +1040,6 @@ describe('exporter', () => { await block.put(dagpbBlock) try { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code await exporter(dagpbBlock.cid, block) } catch (err) { expect(err.code).to.equal('ERR_NOT_UNIXFS') @@ -1108,7 +1074,6 @@ describe('exporter', () => { }) await block.put(dagpbBlock) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(dagpbBlock.cid, block) if (exported.type !== 'file') { @@ -1128,7 +1093,6 @@ describe('exporter', () => { content: asAsyncIterable(uint8ArrayFromString('hello world')) }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(imported[0].cid, block) expect(exported.depth).to.equal(0) @@ -1150,7 +1114,6 @@ describe('exporter', () => { throw new Error('Nothing imported') } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await all(recursive(dir.cid, block)) const dirCid = dir.cid.toString() @@ -1177,10 +1140,8 @@ describe('exporter', () => { it('exports a CID encoded with the identity hash', async () => { const data = uint8ArrayFromString('hello world') const hash = mh.create(mc.IDENTITY, data) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const cid = CID.create(1, mc.IDENTITY, hash) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(cid, block) if (exported.type !== 'identity') { @@ -1196,10 +1157,8 @@ describe('exporter', () => { it('exports a CID encoded with the identity hash with an offset', async () => { const data = uint8ArrayFromString('hello world') const hash = mh.create(mc.IDENTITY, data) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const cid = CID.create(1, mc.IDENTITY, hash) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(cid, block) if (exported.type !== 'identity') { @@ -1216,10 +1175,8 @@ describe('exporter', () => { it('exports a CID encoded with the identity hash with a length', async () => { const data = uint8ArrayFromString('hello world') const hash = mh.create(mc.IDENTITY, data) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const cid = CID.create(1, mc.IDENTITY, hash) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(cid, block) if (exported.type !== 'identity') { @@ -1236,10 +1193,8 @@ describe('exporter', () => { it('exports a CID encoded with the identity hash with an offset and a length', async () => { const data = uint8ArrayFromString('hello world') const hash = mh.create(mc.IDENTITY, data) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const cid = CID.create(1, mc.IDENTITY, hash) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const exported = await exporter(cid, block) if (exported.type !== 'identity') { @@ -1260,7 +1215,6 @@ describe('exporter', () => { // data should not be in IPLD const data = uint8ArrayFromString(`hello world '${Math.random()}`) const hash = mh.create(mc.SHA2_256, data) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const cid = CID.create(1, mc.DAG_PB, hash) const message = `User aborted ${Math.random()}` diff --git a/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js b/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js index e4150bcc..9808314e 100644 --- a/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js +++ b/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js @@ -8,15 +8,14 @@ const { decode } = require('@ipld/dag-pb') */ /** - * @param {import('multiformats/cid')} cid + * @param {import('multiformats/cid').CID} cid * @param {import('ipfs-unixfs-importer/src/types').BlockAPI} blockService */ module.exports = function (cid, blockService) { /** - * @param {import('multiformats/cid')} cid + * @param {import('multiformats/cid').CID} cid */ async function * traverse (cid) { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const block = await blockService.get(cid) const node = decode(block.bytes) @@ -33,7 +32,6 @@ module.exports = function (cid, blockService) { /** * @param {PbLink} link */ - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code link => traverse(link.Hash) ) } diff --git a/packages/ipfs-unixfs-exporter/test/import-export-dir-sharding.spec.js b/packages/ipfs-unixfs-exporter/test/import-export-dir-sharding.spec.js index 876260dc..5aecb98c 100644 --- a/packages/ipfs-unixfs-exporter/test/import-export-dir-sharding.spec.js +++ b/packages/ipfs-unixfs-exporter/test/import-export-dir-sharding.spec.js @@ -37,7 +37,6 @@ describe('builder: directory sharding', () => { expect(nodes[0].path).to.equal('a/b') expect(nodes[1].path).to.equal('a') - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dirNode = await exporter(nodes[1].cid, block) if (dirNode.type !== 'directory') { @@ -46,7 +45,6 @@ describe('builder: directory sharding', () => { expect(dirNode.unixfs.type).to.equal('directory') - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const fileNode = await exporter(nodes[0].cid, block) if (fileNode.type !== 'file') { @@ -74,7 +72,6 @@ describe('builder: directory sharding', () => { expect(nodes[0].path).to.equal('a/b') expect(nodes[1].path).to.equal('a') - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node = await exporter(nodes[1].cid, block) if (node.type !== 'directory') { @@ -95,7 +92,6 @@ describe('builder: directory sharding', () => { const nonShardedHash = nodes[1].cid - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dir = await exporter(nonShardedHash, block) if (dir.type !== 'directory') { @@ -133,7 +129,6 @@ describe('builder: directory sharding', () => { const shardedHash = nodes[1].cid - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dir = await exporter(shardedHash, block) if (dir.type !== 'directory') { @@ -201,7 +196,6 @@ describe('builder: directory sharding', () => { expect(nodes.length).to.equal(maxDirs + 1) // files plus the containing directory - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dir = await exporter(nodes[nodes.length - 1].cid, block) if (dir.type !== 'directory') { @@ -224,7 +218,7 @@ describe('builder: directory sharding', () => { const maxDirs = 2000 const maxDepth = 3 - /** @type {import('multiformats').CID} */ + /** @type {import('multiformats/cid').CID} */ let rootHash before(async () => { @@ -271,7 +265,6 @@ describe('builder: directory sharding', () => { }) it('imports a big dir', async () => { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dir = await exporter(rootHash, block) /** @@ -347,7 +340,6 @@ describe('builder: directory sharding', () => { } } - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const dir = await exporter(rootHash, block) const entries = await collectContent(dir) @@ -362,7 +354,6 @@ describe('builder: directory sharding', () => { it('exports a big dir with subpath', async () => { const exportHash = rootHash.toString() + '/big/big/2000' - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node = await exporter(exportHash, block) expect(node.path).to.equal(exportHash) diff --git a/packages/ipfs-unixfs-exporter/test/import-export-nested-dir.spec.js b/packages/ipfs-unixfs-exporter/test/import-export-nested-dir.spec.js index 94a0da81..436aab8b 100644 --- a/packages/ipfs-unixfs-exporter/test/import-export-nested-dir.spec.js +++ b/packages/ipfs-unixfs-exporter/test/import-export-nested-dir.spec.js @@ -110,7 +110,7 @@ async function recursiveExport (node, path, entries = []) { } /** - * @param {{ path?: string, cid: import('multiformats').CID }} node + * @param {{ path?: string, cid: import('multiformats/cid').CID }} node */ function normalizeNode (node) { return { diff --git a/packages/ipfs-unixfs-exporter/test/import-export.spec.js b/packages/ipfs-unixfs-exporter/test/import-export.spec.js index 2120cc6b..0767f2a7 100644 --- a/packages/ipfs-unixfs-exporter/test/import-export.spec.js +++ b/packages/ipfs-unixfs-exporter/test/import-export.spec.js @@ -38,7 +38,6 @@ describe('import and export', function () { for await (const file of importer(values, block, importerOptions)) { expect(file.path).to.eql(path) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const result = await exporter(file.cid, block) if (result.type !== 'file') { diff --git a/packages/ipfs-unixfs-exporter/test/importer.spec.js b/packages/ipfs-unixfs-exporter/test/importer.spec.js index 7062b3bd..69733f47 100644 --- a/packages/ipfs-unixfs-exporter/test/importer.spec.js +++ b/packages/ipfs-unixfs-exporter/test/importer.spec.js @@ -23,7 +23,7 @@ const uint8ArrayConcat = require('uint8arrays/concat') const uint8ArrayFromString = require('uint8arrays/from-string') const asAsyncIterable = require('./helpers/as-async-iterable') const last = require('it-last') -const CID = require('multiformats/cid') +const { CID } = require('multiformats/cid') const { base58btc } = require('multiformats/bases/base58') // @ts-ignore - TODO vmx 2021-03-25: add the types const { decode } = require('@ipld/dag-pb') @@ -619,7 +619,6 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block, options)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const result = stringifyMh(files) expect(result.length).to.equal(5) @@ -755,7 +754,6 @@ strategies.forEach((strategy) => { } // Check the imported content is correct - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node = await exporter(cid, block) if (node.type !== 'file') { @@ -801,7 +799,6 @@ strategies.forEach((strategy) => { path: '1.2MiB.txt', content: asAsyncIterable(bigFile) }], block, options)) { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code for await (const { cid } of collectLeafCids(file.cid, block)) { expect(cid).to.have.property('codec', 'raw') expect(cid).to.have.property('version', 1) @@ -822,7 +819,6 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile), mtime: parseMtime(now) }], block, options)) { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node = await exporter(file.cid, block) expect(node).to.have.deep.nested.property('unixfs.mtime', dateToTimespec(now)) @@ -839,7 +835,6 @@ strategies.forEach((strategy) => { mtime: parseMtime(now) }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node = await exporter(entries[0].cid, block) expect(node).to.have.deep.nested.property('unixfs.mtime', dateToTimespec(now)) }) @@ -859,7 +854,6 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const nodes = await all(recursive(entries[entries.length - 1].cid, block)) const node = nodes.filter(node => node.type === 'directory').pop() @@ -886,7 +880,6 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const nodes = await all(recursive(entries[entries.length - 1].cid, block)) const node = nodes.filter(node => node.type === 'directory').pop() @@ -918,7 +911,6 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const nodes = await all(recursive(entries[entries.length - 1].cid, block)) const node = nodes.filter(node => node.type === 'directory' && node.name === 'bar').pop() @@ -950,7 +942,6 @@ strategies.forEach((strategy) => { shardSplitThreshold: 0 })) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const nodes = await all(recursive(entries[entries.length - 1].cid, block)) const node = nodes.filter(node => node.type === 'directory' && node.unixfs.type === 'hamt-sharded-directory').pop() @@ -974,7 +965,6 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile), mode }], block, options)) { - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node = await exporter(file.cid, block) expect(node).to.have.nested.property('unixfs.mode', mode) @@ -991,7 +981,6 @@ strategies.forEach((strategy) => { mode }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node = await exporter(entries[0].cid, block) expect(node).to.have.nested.property('unixfs.mode', mode) }) @@ -1012,11 +1001,9 @@ strategies.forEach((strategy) => { mode: mode2 }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node1 = await exporter(entries[0].cid, block) expect(node1).to.have.nested.property('unixfs.mode', mode1) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node2 = await exporter(entries[1].cid, block) expect(node2).to.have.nested.property('unixfs.mode', mode2) }) @@ -1035,11 +1022,9 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node1 = await exporter(entries[0].cid, block) expect(node1).to.have.nested.property('unixfs.mode', mode) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node2 = await exporter(entries[1].cid, block) expect(node2).to.have.nested.property('unixfs.mode').that.does.not.equal(mode) }) @@ -1052,11 +1037,9 @@ strategies.forEach((strategy) => { content: asAsyncIterable(bigFile) }], block)) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node1 = await exporter(entries[0].cid, block) expect(node1).to.have.nested.property('unixfs.mode', 0o0644) - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const node2 = await exporter(entries[1].cid, block) expect(node2).to.have.nested.property('unixfs.mode', 0o0755) }) @@ -1069,7 +1052,6 @@ describe('configuration', () => { it('alllows configuring with custom dag and tree builder', async () => { let builtTree = false - // @ts-ignore - TODO vmx 2021-03-25: the multiformats package is the problem, not the code const cid = CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn') const unixfs = new UnixFS({ type: 'directory' }) diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js index 6ee30e90..cbe6da24 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js @@ -11,7 +11,7 @@ const { const parallelBatch = require('it-parallel-batch') const mc = require('multicodec') const mh = require('multiformats/hashes/digest') -const RAW = require('multiformats/codecs/raw').code +const rawCodec = require('multiformats/codecs/raw') /** * @typedef {import('../../types').BlockAPI} BlockAPI @@ -80,7 +80,7 @@ const reduce = (file, block, options) => { if (leaves.length === 1 && leaves[0].single && options.reduceSingleLeafToSelf) { const leaf = leaves[0] - if (leaf.cid.code === RAW && (file.mtime !== undefined || file.mode !== undefined)) { + if (leaf.cid.code === rawCodec.code && (file.mtime !== undefined || file.mode !== undefined)) { // only one leaf node which is a buffer - we have metadata so convert it into a // UnixFS entry otherwise we'll have nowhere to store the metadata let { bytes: buffer } = await block.get(leaf.cid, options) @@ -140,7 +140,7 @@ const reduce = (file, block, options) => { const links = leaves .filter(leaf => { - if (leaf.cid.code === RAW && leaf.size) { + if (leaf.cid.code === rawCodec.code && leaf.size) { return true } @@ -151,7 +151,7 @@ const reduce = (file, block, options) => { return Boolean(leaf.unixfs && leaf.unixfs.data && leaf.unixfs.data.length) }) .map((leaf) => { - if (leaf.cid.code === RAW) { + if (leaf.cid.code === rawCodec.code) { // node is a leaf buffer f.addBlockSize(leaf.size) diff --git a/packages/ipfs-unixfs-importer/src/dir-flat.js b/packages/ipfs-unixfs-importer/src/dir-flat.js index 872762eb..dba90d02 100644 --- a/packages/ipfs-unixfs-importer/src/dir-flat.js +++ b/packages/ipfs-unixfs-importer/src/dir-flat.js @@ -110,6 +110,7 @@ class DirFlat extends Dir { }) /** @type {PbNode} */ + // @ts-ignore - TODO vmx 2021-03-27: fix this const node = { Data: unixfs.marshal(), Links: links } const buffer = encode(prepare(node)) const cid = await persist(buffer, block, this.options) @@ -121,6 +122,7 @@ class DirFlat extends Dir { (acc, curr) => acc + curr.Tsize, 0) + // @ts-ignore - TODO vmx 2021-03-27: fix this this.cid = cid this.size = size diff --git a/packages/ipfs-unixfs-importer/src/dir.js b/packages/ipfs-unixfs-importer/src/dir.js index 6fc53868..d235e38c 100644 --- a/packages/ipfs-unixfs-importer/src/dir.js +++ b/packages/ipfs-unixfs-importer/src/dir.js @@ -5,7 +5,7 @@ * @typedef {import('./types').ImportResult} ImportResult * @typedef {import('./types').InProgressImportResult} InProgressImportResult * @typedef {import('./types').BlockAPI} BlockAPI - * @typedef {import('multiformats/cid')} CID + * @typedef {import('multiformats/cid').CID} CID * @typedef {object} DirProps * @property {boolean} root * @property {boolean} dir diff --git a/packages/ipfs-unixfs-importer/src/types.d.ts b/packages/ipfs-unixfs-importer/src/types.d.ts index 5b0c44cc..2d32eefd 100644 --- a/packages/ipfs-unixfs-importer/src/types.d.ts +++ b/packages/ipfs-unixfs-importer/src/types.d.ts @@ -1,5 +1,5 @@ import { UnixFS, Mtime } from 'ipfs-unixfs' -import CID from 'multiformats/cid' +import { CID } from 'multiformats/cid' import { HashName } from 'multihashes' import { CodecName } from 'multicodec' import MultihashDigest from 'multiformats/hashes/hasher' diff --git a/packages/ipfs-unixfs-importer/src/utils/persist.js b/packages/ipfs-unixfs-importer/src/utils/persist.js index dafb0490..49ab67fb 100644 --- a/packages/ipfs-unixfs-importer/src/utils/persist.js +++ b/packages/ipfs-unixfs-importer/src/utils/persist.js @@ -1,7 +1,7 @@ 'use strict' const mc = require('multicodec') -const { CID } = require('multiformats') +const { CID } = require('multiformats/cid') /** * @param {Uint8Array} buffer diff --git a/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js b/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js index 4e7fe174..8edf9576 100644 --- a/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js @@ -3,7 +3,7 @@ const { expect } = require('aegir/utils/chai') const builder = require('../src/dag-builder/file/balanced') -const { CID } = require('multiformats') +const { CID } = require('multiformats/cid') const defaultOptions = require('../src/options') /** diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index ebb727e2..9bbc6030 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -4,9 +4,8 @@ const { expect } = require('aegir/utils/chai') const mh = require('multiformats/hashes/digest') const { sha256, sha512 } = require('multiformats/hashes/sha2') +// @ts-ignore - TODO vmx 2021-03-27 define those types const { decode } = require('@ipld/dag-pb') -// @ts-ignore -const dagPb = require('@ipld/dag-pb') const { UnixFS } = require('ipfs-unixfs') const builder = require('../src/dag-builder') const first = require('it-first') diff --git a/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js b/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js index 3ea49a80..4b9af44d 100644 --- a/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js +++ b/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js @@ -32,7 +32,6 @@ describe('custom chunker', function () { const put = async (buf) => { const encodedBlock = await Block.encode({ value: buf, - // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2739: Type 'typeof import("/js-multiformats/dist/types/codecs/raw")' is missing the following properties from type 'BlockEncoder': name, code, encode codec: rawCodec, hasher: sha256 }) From 5e250c80e67cd67690c71b4187b0a7a2882e2a3d Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 29 Mar 2021 15:35:05 +0200 Subject: [PATCH 07/22] fix: more typescript type fixes --- packages/ipfs-unixfs-exporter/src/index.js | 3 --- packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js | 1 - packages/ipfs-unixfs-exporter/src/resolvers/identity.js | 2 -- packages/ipfs-unixfs-exporter/src/resolvers/raw.js | 2 -- .../ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js | 1 - packages/ipfs-unixfs-importer/src/dag-builder/file/index.js | 5 ++--- packages/ipfs-unixfs-importer/src/dir-flat.js | 3 --- packages/ipfs-unixfs-importer/src/utils/persist.js | 3 --- packages/ipfs-unixfs-importer/test/builder-balanced.spec.js | 4 ---- packages/ipfs-unixfs-importer/test/builder.spec.js | 3 --- 10 files changed, 2 insertions(+), 25 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/src/index.js b/packages/ipfs-unixfs-exporter/src/index.js index 179fe436..68a1a3ab 100644 --- a/packages/ipfs-unixfs-exporter/src/index.js +++ b/packages/ipfs-unixfs-exporter/src/index.js @@ -32,13 +32,11 @@ const cidAndRest = (path) => { if (path instanceof Uint8Array) { console.log('vmx: index: path:', path) return { - // @ts-ignore cid: CID.decode(path), toResolve: [] } } - // @ts-ignore const cid = CID.asCID(path) if (cid) { return { @@ -55,7 +53,6 @@ const cidAndRest = (path) => { const output = toPathComponents(path) return { - // @ts-ignore cid: CID.parse(output[0]), toResolve: output.slice(1) } diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js index 39c87e60..a76bce3b 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js @@ -26,7 +26,6 @@ const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, toResolve.shift() subPath = `${subPath}/${prop}` - // @ts-ignore const subObjectCid = CID.asCID(subObject[prop]) if (subObjectCid) { return { diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/identity.js b/packages/ipfs-unixfs-exporter/src/resolvers/identity.js index cc7b0cf9..c21093bf 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/identity.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/identity.js @@ -36,7 +36,6 @@ const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, if (toResolve.length) { throw errCode(new Error(`No link named ${path} found in raw node ${cid}`), 'ERR_NOT_FOUND') } - // @ts-ignore const buf = await mh.decode(cid.multihash.bytes) return { @@ -44,7 +43,6 @@ const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, type: 'identity', name, path, - // @ts-ignore cid, content: rawContent(buf.digest), depth, diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/raw.js b/packages/ipfs-unixfs-exporter/src/resolvers/raw.js index 10198e53..2bb0892b 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/raw.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/raw.js @@ -42,13 +42,11 @@ const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, type: 'raw', name, path, - // @ts-ignore cid, content: rawContent(block.bytes), depth, // TODO vmx 2021-03-24: Check if `size` is needed size: 0, - // @ts-ignore node: block.bytes } } diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js index 94e52a17..64d0a606 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js @@ -97,7 +97,6 @@ const unixFsResolver = async (cid, name, path, toResolve, resolve, depth, blockS type: unixfs.isDirectory() ? 'directory' : 'file', name, path, - // @ts-ignore cid, // @ts-ignore content: contentExporters[unixfs.type](cid, node, unixfs, path, resolve, depth, blockService), diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js index cbe6da24..f11c85d8 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js @@ -10,7 +10,7 @@ const { } = require('@ipld/dag-pb') const parallelBatch = require('it-parallel-batch') const mc = require('multicodec') -const mh = require('multiformats/hashes/digest') +//const mh = require('multiformats/hashes/digest') const rawCodec = require('multiformats/codecs/raw') /** @@ -92,14 +92,13 @@ const reduce = (file, block, options) => { data: buffer }) - // @ts-ignore - const multihash = mh.decode(leaf.cid.multihash.bytes) buffer = encode(prepare({ Data: leaf.unixfs.marshal() })) //// TODO vmx 2021-03-26: This is what the original code does, it checks //// the multihash of the original leaf node and uses then the same //// hasher. i wonder if that's really needed or if we could just use //// the hasher from `options.hasher` instead. + //const multihash = mh.decode(leaf.cid.multihash.bytes) //let hasher //switch multihash { // case sha256.code { diff --git a/packages/ipfs-unixfs-importer/src/dir-flat.js b/packages/ipfs-unixfs-importer/src/dir-flat.js index dba90d02..645020f9 100644 --- a/packages/ipfs-unixfs-importer/src/dir-flat.js +++ b/packages/ipfs-unixfs-importer/src/dir-flat.js @@ -102,7 +102,6 @@ class DirFlat extends Dir { } } - // @ts-ignore - TODO vmx 2021-03-24: figure out what's wrong and fix it const unixfs = new UnixFS({ type: 'directory', mtime: this.mtime, @@ -110,7 +109,6 @@ class DirFlat extends Dir { }) /** @type {PbNode} */ - // @ts-ignore - TODO vmx 2021-03-27: fix this const node = { Data: unixfs.marshal(), Links: links } const buffer = encode(prepare(node)) const cid = await persist(buffer, block, this.options) @@ -122,7 +120,6 @@ class DirFlat extends Dir { (acc, curr) => acc + curr.Tsize, 0) - // @ts-ignore - TODO vmx 2021-03-27: fix this this.cid = cid this.size = size diff --git a/packages/ipfs-unixfs-importer/src/utils/persist.js b/packages/ipfs-unixfs-importer/src/utils/persist.js index 49ab67fb..4201f0fb 100644 --- a/packages/ipfs-unixfs-importer/src/utils/persist.js +++ b/packages/ipfs-unixfs-importer/src/utils/persist.js @@ -22,13 +22,10 @@ const persist = async (buffer, block, options) => { } const multihash = await options.hasher.digest(buffer) - // TODO vmx 2021-02-24: no idea why TypeScript fails here, it should work - // @ts-ignore const cid = CID.create(options.cidVersion, options.codec, multihash) if (!options.onlyHash) { await block.put({ - // @ts-ignore TODO vmx 2021-03-17 bytes: buffer, cid }, { diff --git a/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js b/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js index 8edf9576..84c072cf 100644 --- a/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder-balanced.spec.js @@ -31,7 +31,6 @@ const options = { describe('builder: balanced', () => { it('reduces one value into itself', async () => { const source = [{ - // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2339: Property 'parse' does not exist on type 'typeof import("/js-multiformats/dist/types/cid")' cid: CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), size: 0 }] @@ -45,15 +44,12 @@ describe('builder: balanced', () => { it('reduces 3 values into parent', async () => { const source = [{ - // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2339: Property 'parse' does not exist on type 'typeof import("/js-multiformats/dist/types/cid")' cid: CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), size: 0 }, { - // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2339: Property 'parse' does not exist on type 'typeof import("/js-multiformats/dist/types/cid")' cid: CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), size: 0 }, { - // @ts-ignore - TODO vmx 2021-03-25: fix: error TS2339: Property 'parse' does not exist on type 'typeof import("/js-multiformats/dist/types/cid")' cid: CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'), size: 0 }] diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index 9bbc6030..82a3959d 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -31,7 +31,6 @@ describe('builder', () => { const result = await first(builder([inputFile], block, { ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names hasher })) @@ -68,7 +67,6 @@ describe('builder', () => { const result = await first(builder([inputFile], block, { ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names hasher })) @@ -92,7 +90,6 @@ describe('builder', () => { const result = await first(builder([{ ...inputFile }], block, { ...defaultOptions(), - // @ts-ignore thinks these aren't valid hash alg names hasher })) From 566e5f9318a753226e852bfda5613d344c0a21f3 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 29 Mar 2021 17:29:18 +0200 Subject: [PATCH 08/22] fix: more typescript type fixes --- packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js | 1 - .../ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js | 1 - packages/ipfs-unixfs-exporter/test/exporter.spec.js | 1 - 3 files changed, 3 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js index a76bce3b..0276dc72 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js @@ -2,7 +2,6 @@ const { CID } = require('multiformats/cid') const errCode = require('err-code') -// @ts-ignore const dagCbor = require('@ipld/dag-cbor') /** diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js index 6ca4e9c3..d76f0ac9 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js @@ -6,7 +6,6 @@ const { UnixFS } = require('ipfs-unixfs') const errCode = require('err-code') // @ts-ignore const dagPb = require('@ipld/dag-pb') -// @ts-ignore const dagCbor = require('@ipld/dag-cbor') const mc = require('multicodec') diff --git a/packages/ipfs-unixfs-exporter/test/exporter.spec.js b/packages/ipfs-unixfs-exporter/test/exporter.spec.js index d7a4b30e..dc45405d 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter.spec.js @@ -6,7 +6,6 @@ const { UnixFS } = require('ipfs-unixfs') const { CID } = require('multiformats/cid') // @ts-ignore - TODO vmx 2021-03-25: add those typedefs const dagPb = require('@ipld/dag-pb') -// @ts-ignore - TODO vmx 2021-03-25: add those typedefs const dagCbor = require('@ipld/dag-cbor') const rawCodec = require('multiformats/codecs/raw') const { sha256 } = require('multiformats/hashes/sha2') From 1f898d280087ea62a7af38c57d2f58cf8e47a32f Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Thu, 1 Apr 2021 11:12:01 +0200 Subject: [PATCH 09/22] chore: update dependencies A few `@ts-ignore`s are needed until js-dag-cbor is updated to work properly with CommonJS and TypeScript types. --- packages/ipfs-unixfs-exporter/package.json | 4 ++-- packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js | 1 + .../src/resolvers/unixfs-v1/content/file.js | 1 + packages/ipfs-unixfs-exporter/test/exporter.spec.js | 3 +++ packages/ipfs-unixfs-importer/package.json | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/package.json b/packages/ipfs-unixfs-exporter/package.json index e4d02512..cfa723ec 100644 --- a/packages/ipfs-unixfs-exporter/package.json +++ b/packages/ipfs-unixfs-exporter/package.json @@ -56,14 +56,14 @@ "util": "^0.12.3" }, "dependencies": { - "@ipld/dag-cbor": "^3.0.0", + "@ipld/dag-cbor": "^4.0.0", "@ipld/dag-pb": "^0.0.1", "err-code": "^3.0.1", "hamt-sharding": "^2.0.0", "ipfs-unixfs": "^4.0.3", "it-last": "^1.0.5", "multicodec": "^3.0.1", - "multiformats": "^4.6.1", + "multiformats": "^6.0.0", "multihashing-async": "^2.1.0" }, "types": "dist/src/index.d.ts", diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js index 0276dc72..b5af4859 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js @@ -13,6 +13,7 @@ const dagCbor = require('@ipld/dag-cbor') */ const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, options) => { const block = await blockService.get(cid) + // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types const object = dagCbor.decode(block.bytes) let subObject = object let subPath = path diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js index d76f0ac9..cb3edb80 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js @@ -77,6 +77,7 @@ async function * emitBytes (blockService, node, start, end, streamPosition = 0, child = block.bytes break; case mc.DAG_CBOR: + // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types child = await dagCbor.decode(block.bytes) break; default: diff --git a/packages/ipfs-unixfs-exporter/test/exporter.spec.js b/packages/ipfs-unixfs-exporter/test/exporter.spec.js index dc45405d..8902a766 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter.spec.js @@ -973,6 +973,7 @@ describe('exporter', () => { it('errors when exporting a non-existent key from a cbor node', async () => { const cborBlock = await Block.encode({ value: { foo: 'bar' }, + // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types codec: dagCbor, hasher: sha256 }) @@ -992,6 +993,7 @@ describe('exporter', () => { const cborBlock = await Block.encode({ value: node, + // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types codec: dagCbor, hasher: sha256 }) @@ -1048,6 +1050,7 @@ describe('exporter', () => { it('errors we export a unixfs node that has a non-unixfs/dag-pb child', async () => { const cborBlock = await Block.encode({ value: { foo: 'bar' }, + // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types codec: dagCbor, hasher: sha256 }) diff --git a/packages/ipfs-unixfs-importer/package.json b/packages/ipfs-unixfs-importer/package.json index e748fba0..9bef775f 100644 --- a/packages/ipfs-unixfs-importer/package.json +++ b/packages/ipfs-unixfs-importer/package.json @@ -58,7 +58,7 @@ "it-parallel-batch": "^1.0.9", "merge-options": "^3.0.4", "multicodec": "^3.0.1", - "multiformats": "^4.6.1", + "multiformats": "^6.0.0", "multihashing-async": "^2.1.0", "rabin-wasm": "^0.1.4", "uint8arrays": "^2.1.2" From 11d8d74120a5c1ddf5a9342860f52696d0b86aaa Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 5 Apr 2021 13:33:30 +0200 Subject: [PATCH 10/22] fix: use correct size of the node --- packages/ipfs-unixfs-exporter/src/resolvers/raw.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/raw.js b/packages/ipfs-unixfs-exporter/src/resolvers/raw.js index 2bb0892b..e7af9a94 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/raw.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/raw.js @@ -45,8 +45,7 @@ const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, cid, content: rawContent(block.bytes), depth, - // TODO vmx 2021-03-24: Check if `size` is needed - size: 0, + size: block.bytes.length, node: block.bytes } } From 75ac9ff3074b0dc25c2b81545a31d38410474bd7 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Wed, 7 Apr 2021 15:38:35 +0200 Subject: [PATCH 11/22] chore: fix linter errors --- packages/ipfs-unixfs-exporter/src/index.js | 1 - .../src/resolvers/unixfs-v1/content/file.js | 8 ++-- .../test/exporter.spec.js | 9 ++--- .../test/helpers/block.js | 7 ++-- .../test/importer.spec.js | 3 +- .../src/dag-builder/file/index.js | 40 +++++++++---------- .../ipfs-unixfs-importer/src/utils/persist.js | 4 +- .../ipfs-unixfs-importer/test/builder.spec.js | 2 +- .../test/chunker-custom.spec.js | 1 - .../test/helpers/block.js | 7 ++-- 10 files changed, 36 insertions(+), 46 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/src/index.js b/packages/ipfs-unixfs-exporter/src/index.js index 68a1a3ab..9819a83b 100644 --- a/packages/ipfs-unixfs-exporter/src/index.js +++ b/packages/ipfs-unixfs-exporter/src/index.js @@ -30,7 +30,6 @@ const toPathComponents = (path = '') => { */ const cidAndRest = (path) => { if (path instanceof Uint8Array) { - console.log('vmx: index: path:', path) return { cid: CID.decode(path), toResolve: [] diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js index cb3edb80..780d62d3 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js @@ -66,7 +66,7 @@ async function * emitBytes (blockService, node, start, end, streamPosition = 0, (end > childStart && end <= childEnd) || // child has end byte (start < childStart && end > childEnd)) { // child is between offset and end bytes const block = await blockService.get(childLink.Hash, { - signal: options.signal, + signal: options.signal }) let child switch (childLink.Hash.code) { @@ -75,18 +75,16 @@ async function * emitBytes (blockService, node, start, end, streamPosition = 0, break case mc.RAW: child = block.bytes - break; + break case mc.DAG_CBOR: // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types child = await dagCbor.decode(block.bytes) - break; + break default: // TODO vmx 2021-03-05: fix this type issue properly // @ts-ignore throw Error(`Unsupported codec: ${mc.getName(childLink.Hash.code)}`) } - //console.log('file: childlink cid codec:', childLink.Hash.code) - //const child = await decode(block.bytes) for await (const buf of emitBytes(blockService, child, start, end, streamPosition, options)) { streamPosition += buf.length diff --git a/packages/ipfs-unixfs-exporter/test/exporter.spec.js b/packages/ipfs-unixfs-exporter/test/exporter.spec.js index 8902a766..6e3623d3 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter.spec.js @@ -269,7 +269,6 @@ describe('exporter', () => { data: content.slice(0, 5) }) const chunkNode1 = dagPb.prepare({ Data: chunk1.marshal() }) - // TODO vmx 2022-02-23: Use CIv0 const chunkBlock1 = await Block.encode({ value: chunkNode1, codec: dagPb, @@ -283,7 +282,6 @@ describe('exporter', () => { codec: dagPb, hasher: sha256 }) - // TODO vmx 2022-02-23: USE CIDv0 const chunkBlock2 = await Block.encode({ value: chunkNode2, codec: dagPb, @@ -302,14 +300,13 @@ describe('exporter', () => { Links: [{ Name: '', Tsize: chunkNode1.size, - Hash: chunkBlock1.cid + Hash: chunkBlock1.cid.toV0() }, { Name: '', Tsize: chunkNode2.size, - Hash: chunkBlock2.cid + Hash: chunkBlock2.cid.toV0() }] }) - // TODO vmx 2022-02-23: Use CIDv0 const fileBlock = await Block.encode({ value: fileNode, codec: dagPb, @@ -317,7 +314,7 @@ describe('exporter', () => { }) await block.put(fileBlock) - const exported = await exporter(fileBlock.cid, block) + const exported = await exporter(fileBlock.cid.toV0(), block) if (exported.type !== 'file') { throw new Error('Unexpected type') diff --git a/packages/ipfs-unixfs-exporter/test/helpers/block.js b/packages/ipfs-unixfs-exporter/test/helpers/block.js index 38c7f614..6afc2a56 100644 --- a/packages/ipfs-unixfs-exporter/test/helpers/block.js +++ b/packages/ipfs-unixfs-exporter/test/helpers/block.js @@ -1,5 +1,7 @@ 'use strict' +const errCode = require('err-code') + function createBlockApi () { /** @type {{[key: string]: Uint8Array}} */ const blocks = {} @@ -16,10 +18,7 @@ function createBlockApi () { get: async (cid, _options) => { const bytes = blocks[cid.toV1().toString()] if (bytes === undefined) { - const error = new Error(`Couold not find data for CID '${cid}'`) - // @ts-ignore - TODO vmx 2021-03-24: Should the error type be wrapped in a custom type? - error.code = 'ERR_NOT_FOUND' - throw(error) + throw errCode(new Error(`Couold not find data for CID '${cid}'`), 'ERR_NOT_FOUND') } return { cid, bytes } diff --git a/packages/ipfs-unixfs-exporter/test/importer.spec.js b/packages/ipfs-unixfs-exporter/test/importer.spec.js index 69733f47..30e9753a 100644 --- a/packages/ipfs-unixfs-exporter/test/importer.spec.js +++ b/packages/ipfs-unixfs-exporter/test/importer.spec.js @@ -30,7 +30,6 @@ const { decode } = require('@ipld/dag-pb') const { parseMtime } = require('ipfs-unixfs') /** - * @typedef {import('ipfs-core-types/src/block-service').BlockService} BlockService * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockAPI * @typedef {import('../src/types').PbNode} PbNode */ @@ -226,7 +225,7 @@ const checkLeafNodeTypes = async (block, options, expected) => { node.Links.map(link => block.get(link.Hash)) ) - linkedBlocks.forEach(({ bytes}) => { + linkedBlocks.forEach(({ bytes }) => { const node = decode(bytes) const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal(expected) diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js index f11c85d8..39a20988 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js @@ -10,7 +10,7 @@ const { } = require('@ipld/dag-pb') const parallelBatch = require('it-parallel-batch') const mc = require('multicodec') -//const mh = require('multiformats/hashes/digest') +// const mh = require('multiformats/hashes/digest') const rawCodec = require('multiformats/codecs/raw') /** @@ -94,25 +94,25 @@ const reduce = (file, block, options) => { buffer = encode(prepare({ Data: leaf.unixfs.marshal() })) - //// TODO vmx 2021-03-26: This is what the original code does, it checks - //// the multihash of the original leaf node and uses then the same - //// hasher. i wonder if that's really needed or if we could just use - //// the hasher from `options.hasher` instead. - //const multihash = mh.decode(leaf.cid.multihash.bytes) - //let hasher - //switch multihash { - // case sha256.code { - // hasher = sha256 - // break; - // } - // //case identity.code { - // // hasher = identity - // // break; - // //} - // default: { - // throw new Error(`Unsupported hasher "${multihash}"`) - // } - //} + // // TODO vmx 2021-03-26: This is what the original code does, it checks + // // the multihash of the original leaf node and uses then the same + // // hasher. i wonder if that's really needed or if we could just use + // // the hasher from `options.hasher` instead. + // const multihash = mh.decode(leaf.cid.multihash.bytes) + // let hasher + // switch multihash { + // case sha256.code { + // hasher = sha256 + // break; + // } + // //case identity.code { + // // hasher = identity + // // break; + // //} + // default: { + // throw new Error(`Unsupported hasher "${multihash}"`) + // } + // } leaf.cid = await persist(buffer, block, { ...options, codec: mc.DAG_PB, diff --git a/packages/ipfs-unixfs-importer/src/utils/persist.js b/packages/ipfs-unixfs-importer/src/utils/persist.js index 4201f0fb..bf170df5 100644 --- a/packages/ipfs-unixfs-importer/src/utils/persist.js +++ b/packages/ipfs-unixfs-importer/src/utils/persist.js @@ -10,7 +10,7 @@ const { CID } = require('multiformats/cid') */ const persist = async (buffer, block, options) => { if (!options.hasher) { - throw new Error(`Hasher must be specified.`) + throw new Error('Hasher must be specified.') } if (!options.codec) { @@ -32,7 +32,7 @@ const persist = async (buffer, block, options) => { // @ts-ignore pin option is missing from block api typedefs pin: options.pin, preload: options.preload, - timeout: options.timeout, + timeout: options.timeout }) } diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index 82a3959d..92b4ed23 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -109,4 +109,4 @@ describe('builder', () => { expect(meta.type).to.equal('directory') } }) - }) +}) diff --git a/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js b/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js index 4b9af44d..e65989bc 100644 --- a/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js +++ b/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js @@ -11,7 +11,6 @@ const blockApi = require('./helpers/block') const uint8ArrayFromString = require('uint8arrays/from-string') const { UnixFS } = require('ipfs-unixfs') - const iter = async function * () { yield uint8ArrayFromString('one') yield uint8ArrayFromString('two') diff --git a/packages/ipfs-unixfs-importer/test/helpers/block.js b/packages/ipfs-unixfs-importer/test/helpers/block.js index 5a062c7e..f3dd708c 100644 --- a/packages/ipfs-unixfs-importer/test/helpers/block.js +++ b/packages/ipfs-unixfs-importer/test/helpers/block.js @@ -1,5 +1,7 @@ 'use strict' +const errCode = require('err-code') + function createBlockApi () { /** @type {{[key: string]: Uint8Array}} */ const blocks = {} @@ -16,10 +18,7 @@ function createBlockApi () { get: async (cid, _options) => { const bytes = blocks[cid.toV1().toString()] if (bytes === undefined) { - const error = new Error(`Couold not find data for CID '${cid}'`) - // @ts-ignore - TODO vmx 2021-03-24: Should the error type be wrapped in a custom type? - error.code = 'ERR_NOT_FOUND' - throw(error) + throw errCode(new Error(`Couold not find data for CID '${cid}'`), 'ERR_NOT_FOUND') } return { cid, bytes } From 7b58b00e29a26407a9d161cee355b028291c4699 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Wed, 7 Apr 2021 15:56:09 +0200 Subject: [PATCH 12/22] chore: remove/comment some ts-ignores --- packages/ipfs-unixfs-exporter/src/resolvers/index.js | 2 +- .../src/resolvers/unixfs-v1/content/file.js | 3 +-- packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js | 2 +- packages/ipfs-unixfs-importer/test/chunker-custom.spec.js | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/index.js b/packages/ipfs-unixfs-exporter/src/resolvers/index.js index c873e544..8a8be0c5 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/index.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/index.js @@ -28,7 +28,7 @@ function resolve (cid, name, path, toResolve, depth, blockService, options) { const resolver = resolvers[cid.code] if (!resolver) { - // @ts-ignore - TODO vmx 2021-03-05: Add proper typing + // @ts-ignore - A `CodecCode` is expected, but a number is just fine throw errCode(new Error(`No resolver for codec ${multicodec.getName(cid.code)}`), 'ERR_NO_RESOLVER') } diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js index 780d62d3..eefd7d4e 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js @@ -81,8 +81,7 @@ async function * emitBytes (blockService, node, start, end, streamPosition = 0, child = await dagCbor.decode(block.bytes) break default: - // TODO vmx 2021-03-05: fix this type issue properly - // @ts-ignore + // @ts-ignore - A `CodecCode` is expected, but a number is just fine throw Error(`Unsupported codec: ${mc.getName(childLink.Hash.code)}`) } diff --git a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js index 451aad90..f9965c13 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js @@ -128,7 +128,7 @@ describe('exporter sharded', function () { const data = uint8ArrayConcat(await all(dirFile.content())) // validate the CID - // @ts-ignore - TODO vmx 2021-03-25: fix that one + // @ts-ignore - files[dirFile.name].cid is defined expect(files[dirFile.name].cid.toString()).that.deep.equals(dirFile.cid.toString()) // validate the exported file content diff --git a/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js b/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js index e65989bc..6e40a1c9 100644 --- a/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js +++ b/packages/ipfs-unixfs-importer/test/chunker-custom.spec.js @@ -4,7 +4,6 @@ const { importer } = require('../src') const { expect } = require('aegir/utils/chai') const rawCodec = require('multiformats/codecs/raw') -// @ts-ignore const { sha256 } = require('multiformats/hashes/sha2') const Block = require('multiformats/block') const blockApi = require('./helpers/block') From 2fd91c1a4d74776745d704f525d9c2e3733ab53c Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 22 Apr 2021 19:38:38 +1000 Subject: [PATCH 13/22] chore: use latest multiformats, dag-pb and dag-cbor w/ types --- packages/ipfs-unixfs-exporter/package.json | 6 +++--- .../src/resolvers/dag-cbor.js | 1 - .../resolvers/unixfs-v1/content/directory.js | 2 +- .../src/resolvers/unixfs-v1/content/file.js | 10 +++++---- .../content/hamt-sharded-directory.js | 6 +++--- .../src/resolvers/unixfs-v1/index.js | 8 +++++-- packages/ipfs-unixfs-exporter/src/types.d.ts | 21 ++++--------------- .../src/utils/find-cid-in-shard.js | 18 +++++++++++----- .../test/exporter-sharded.spec.js | 1 - .../test/exporter.spec.js | 12 ++++------- .../test/helpers/collect-leaf-cids.js | 1 - .../test/importer.spec.js | 5 ++--- packages/ipfs-unixfs-importer/package.json | 4 ++-- packages/ipfs-unixfs-importer/src/dir-flat.js | 10 ++++----- .../ipfs-unixfs-importer/test/builder.spec.js | 1 - 15 files changed, 49 insertions(+), 57 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/package.json b/packages/ipfs-unixfs-exporter/package.json index cfa723ec..02d175b6 100644 --- a/packages/ipfs-unixfs-exporter/package.json +++ b/packages/ipfs-unixfs-exporter/package.json @@ -56,14 +56,14 @@ "util": "^0.12.3" }, "dependencies": { - "@ipld/dag-cbor": "^4.0.0", - "@ipld/dag-pb": "^0.0.1", + "@ipld/dag-cbor": "https://gitpkg.now.sh/ipld/js-dag-cbor/dist?rvagg/esm-ts-build-improvements", + "@ipld/dag-pb": "https://gitpkg.now.sh/ipld/js-dag-pb/dist?rvagg/types", "err-code": "^3.0.1", "hamt-sharding": "^2.0.0", "ipfs-unixfs": "^4.0.3", "it-last": "^1.0.5", "multicodec": "^3.0.1", - "multiformats": "^6.0.0", + "multiformats": "https://gitpkg.now.sh/multiformats/js-multiformats/dist?rvagg/moar-generic-blockcodec", "multihashing-async": "^2.1.0" }, "types": "dist/src/index.d.ts", diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js index b5af4859..0276dc72 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js @@ -13,7 +13,6 @@ const dagCbor = require('@ipld/dag-cbor') */ const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, options) => { const block = await blockService.get(cid) - // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types const object = dagCbor.decode(block.bytes) let subObject = object let subPath = path diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.js index 17c46b4d..751673f4 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.js @@ -20,7 +20,7 @@ const directoryContent = (cid, node, unixfs, path, resolve, depth, blockService) const links = node.Links.slice(offset, length) for (const link of links) { - const result = await resolve(link.Hash, link.Name, `${path}/${link.Name}`, [], depth + 1, blockService, options) + const result = await resolve(link.Hash, link.Name || '', `${path}/${link.Name || ''}`, [], depth + 1, blockService, options) if (result.entry) { yield result.entry diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js index eefd7d4e..64918a42 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js @@ -4,7 +4,6 @@ const extractDataFromBlock = require('../../../utils/extract-data-from-block') const validateOffsetAndLength = require('../../../utils/validate-offset-and-length') const { UnixFS } = require('ipfs-unixfs') const errCode = require('err-code') -// @ts-ignore const dagPb = require('@ipld/dag-pb') const dagCbor = require('@ipld/dag-cbor') const mc = require('multicodec') @@ -12,10 +11,10 @@ const mc = require('multicodec') /** * @typedef {import('../../../types').ExporterOptions} ExporterOptions * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockService - * @typedef {import('../../../types').PbNode} PbNode + * @typedef {import('@ipld/dag-pb').PBNode} PBNode * * @param {BlockService} blockService - * @param {PbNode} node + * @param {PBNode} node * @param {number} start * @param {number} end * @param {number} streamPosition @@ -36,6 +35,10 @@ async function * emitBytes (blockService, node, start, end, streamPosition = 0, return streamPosition } + if (node.Data == null) { + throw errCode(new Error('no data in PBNode'), 'ERR_NOT_UNIXFS') + } + let file try { @@ -77,7 +80,6 @@ async function * emitBytes (blockService, node, start, end, streamPosition = 0, child = block.bytes break case mc.DAG_CBOR: - // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types child = await dagCbor.decode(block.bytes) break default: diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js index 1a18aef8..35fa1eba 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js @@ -9,7 +9,7 @@ const { decode } = require('@ipld/dag-pb') * @typedef {import('../../../types').Resolve} Resolve * @typedef {import('../../../types').UnixfsV1DirectoryContent} UnixfsV1DirectoryContent * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver - * @typedef {import('../../../types').PbNode} PbNode + * @typedef {import('@ipld/dag-pb').PBNode} PBNode */ /** @@ -28,7 +28,7 @@ const hamtShardedDirectoryContent = (cid, node, unixfs, path, resolve, depth, bl } /** - * @param {PbNode} node + * @param {PBNode} node * @param {string} path * @param {Resolve} resolve * @param {number} depth @@ -41,7 +41,7 @@ async function * listDirectory (node, path, resolve, depth, blockService, option const links = node.Links for (const link of links) { - const name = link.Name.substring(2) + const name = link.Name != null ? link.Name.substring(2) : null if (name) { const result = await resolve(link.Hash, name, `${path}/${name}`, [], depth + 1, blockService, options) diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js index 64d0a606..7c278414 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js @@ -13,11 +13,11 @@ const { decode } = require('@ipld/dag-pb') * @typedef {import('../../types').Resolve} Resolve * @typedef {import('../../types').Resolver} Resolver * @typedef {import('../../types').UnixfsV1Resolver} UnixfsV1Resolver - * @typedef {import('../../types').PbNode} PbNode + * @typedef {import('@ipld/dag-pb').PBNode} PBNode */ /** - * @param {PbNode} node + * @param {PBNode} node * @param {string} name */ const findLinkCid = (node, name) => { @@ -55,6 +55,10 @@ const unixFsResolver = async (cid, name, path, toResolve, resolve, depth, blockS name = cid.toString() } + if (node.Data == null) { + throw errCode(new Error('no data in PBNode'), 'ERR_NOT_UNIXFS') + } + try { unixfs = UnixFS.unmarshal(node.Data) } catch (err) { diff --git a/packages/ipfs-unixfs-exporter/src/types.d.ts b/packages/ipfs-unixfs-exporter/src/types.d.ts index 34e520e1..73f4c8e7 100644 --- a/packages/ipfs-unixfs-exporter/src/types.d.ts +++ b/packages/ipfs-unixfs-exporter/src/types.d.ts @@ -1,6 +1,6 @@ import { CID } from 'multiformats/cid' import UnixFS from 'ipfs-unixfs' -import DAGNode from 'ipld-dag-pb' +import { PBNode } from '@ipld/dag-pb' interface ExporterOptions { offset?: number @@ -22,13 +22,13 @@ interface Exportable { interface UnixFSFile extends Exportable { type: 'file' unixfs: UnixFS - node: DAGNode + node: PBNode } interface UnixFSDirectory extends Exportable { type: 'directory' unixfs: UnixFS - node: DAGNode + node: PBNode } interface ObjectNode extends Exportable { @@ -66,20 +66,7 @@ type Resolver = (cid: CID, name: string, path: string, toResolve: string[], reso type UnixfsV1FileContent = AsyncIterable | Iterable type UnixfsV1DirectoryContent = AsyncIterable | Iterable type UnixfsV1Content = UnixfsV1FileContent | UnixfsV1DirectoryContent -type UnixfsV1Resolver = (cid: CID, node: DAGNode, unixfs: UnixFS, path: string, resolve: Resolve, depth: number, ipld: IPLD) => (options: ExporterOptions) => UnixfsV1Content - - -// TODO vmx 2021=03-24: Just temporary until js-dag-pb has porper types -interface PbLink { - Name: string, - Tsize: number, - Hash: CID -} - -interface PbNode { - Data: Uint8Array, - Links: PbLink[] -} +type UnixfsV1Resolver = (cid: CID, node: PBNode, unixfs: UnixFS, path: string, resolve: Resolve, depth: number, ipld: IPLD) => (options: ExporterOptions) => UnixfsV1Content interface Block { cid: CID, diff --git a/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js b/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js index aaaa00ea..07f4f6ee 100644 --- a/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js +++ b/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js @@ -9,8 +9,8 @@ const { decode } = require('@ipld/dag-pb') * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockService * @typedef {import('multiformats/cid').CID} CID * @typedef {import('../types').ExporterOptions} ExporterOptions - * @typedef {import('../types').PbNode} PbNode - * @typedef {import('../types').PbLink} PbLink + * @typedef {import('@ipld/dag-pb').PBNode} PBNode + * @typedef {import('@ipld/dag-pb').PBLink} PBLink */ // FIXME: this is copy/pasted from ipfs-unixfs-importer/src/dir-sharded.js @@ -36,13 +36,17 @@ const hashFn = async function (buf) { } /** - * @param {PbLink[]} links + * @param {PBLink[]} links * @param {Bucket} bucket * @param {Bucket} rootBucket */ const addLinksToHamtBucket = (links, bucket, rootBucket) => { return Promise.all( links.map(link => { + if (link.Name == null) { + // TODO(@rvagg): what do? this is technically possible + throw new Error('Unexpected Link without a Name') + } if (link.Name.length === 2) { const pos = parseInt(link.Name, 16) @@ -92,7 +96,7 @@ const toBucketPath = (position) => { * @property {Bucket} rootBucket * @property {Bucket} lastBucket * - * @param {PbNode} node + * @param {PBNode} node * @param {string} name * @param {BlockService} blockService * @param {ShardTraversalContext} [context] @@ -125,6 +129,10 @@ const findShardCid = async (node, name, blockService, context, options) => { } const link = node.Links.find(link => { + if (link.Name == null) { + return false + } + const entryPrefix = link.Name.substring(0, 2) const entryName = link.Name.substring(2) @@ -145,7 +153,7 @@ const findShardCid = async (node, name, blockService, context, options) => { return null } - if (link.Name.substring(2) === name) { + if (link.Name != null && link.Name.substring(2) === name) { return link.Hash } diff --git a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js index f9965c13..75224a93 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js @@ -8,7 +8,6 @@ const last = require('it-last') const randomBytes = require('it-buffer-stream') const { exporter, walkPath } = require('../src') const { importer } = require('ipfs-unixfs-importer') -// @ts-ignore - TODO vmx 2021-03-25 const dagPb = require('@ipld/dag-pb') const { sha256 } = require('multiformats/hashes/sha2') const Block = require('multiformats/block') diff --git a/packages/ipfs-unixfs-exporter/test/exporter.spec.js b/packages/ipfs-unixfs-exporter/test/exporter.spec.js index 6e3623d3..797a33f5 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter.spec.js @@ -4,7 +4,6 @@ const { expect } = require('aegir/utils/chai') const { UnixFS } = require('ipfs-unixfs') const { CID } = require('multiformats/cid') -// @ts-ignore - TODO vmx 2021-03-25: add those typedefs const dagPb = require('@ipld/dag-pb') const dagCbor = require('@ipld/dag-cbor') const rawCodec = require('multiformats/codecs/raw') @@ -28,8 +27,8 @@ const asAsyncIterable = require('./helpers/as-async-iterable') const ONE_MEG = Math.pow(1024, 2) /** - * @typedef {import('../src/types').PbLink} PbLink - * @typedef {import('../src/types').PbNode} PbNode + * @typedef {import('@ipld/dag-pb').PBLink} PBLink + * @typedef {import('@ipld/dag-pb').PBNode} PBNode */ describe('exporter', () => { @@ -49,7 +48,7 @@ describe('exporter', () => { * @param {object} [options] * @param {string} [options.type='file'] * @param {Uint8Array} [options.content] - * @param {PbLink[]} [options.links=[]] + * @param {PBLink[]} [options.links=[]] */ async function dagPut (options = {}) { options.type = options.type || 'file' @@ -143,7 +142,7 @@ describe('exporter', () => { /** * @param {'file' | 'directory' | 'raw'} type * @param {Uint8Array | ArrayLike | undefined} data - * @param {{ node: PbNode, cid: CID }[]} children + * @param {{ node: PBNode, cid: CID }[]} children */ async function createAndPersistNode (type, data, children) { const file = new UnixFS({ type, data: data ? Uint8Array.from(data) : undefined }) @@ -970,7 +969,6 @@ describe('exporter', () => { it('errors when exporting a non-existent key from a cbor node', async () => { const cborBlock = await Block.encode({ value: { foo: 'bar' }, - // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types codec: dagCbor, hasher: sha256 }) @@ -990,7 +988,6 @@ describe('exporter', () => { const cborBlock = await Block.encode({ value: node, - // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types codec: dagCbor, hasher: sha256 }) @@ -1047,7 +1044,6 @@ describe('exporter', () => { it('errors we export a unixfs node that has a non-unixfs/dag-pb child', async () => { const cborBlock = await Block.encode({ value: { foo: 'bar' }, - // @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types codec: dagCbor, hasher: sha256 }) diff --git a/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js b/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js index 9808314e..5d067858 100644 --- a/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js +++ b/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js @@ -1,6 +1,5 @@ 'use strict' -// @ts-ignore - TODO vmx 2021-03-25: add typedefs const { decode } = require('@ipld/dag-pb') /** diff --git a/packages/ipfs-unixfs-exporter/test/importer.spec.js b/packages/ipfs-unixfs-exporter/test/importer.spec.js index 30e9753a..8e27da2f 100644 --- a/packages/ipfs-unixfs-exporter/test/importer.spec.js +++ b/packages/ipfs-unixfs-exporter/test/importer.spec.js @@ -25,13 +25,12 @@ const asAsyncIterable = require('./helpers/as-async-iterable') const last = require('it-last') const { CID } = require('multiformats/cid') const { base58btc } = require('multiformats/bases/base58') -// @ts-ignore - TODO vmx 2021-03-25: add the types const { decode } = require('@ipld/dag-pb') const { parseMtime } = require('ipfs-unixfs') /** * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockAPI - * @typedef {import('../src/types').PbNode} PbNode + * @typedef {import('@ipld/dag-pb').PBNode} PBNode */ /** @@ -214,7 +213,7 @@ const checkLeafNodeTypes = async (block, options, expected) => { // @type {Block} const fileBlock = await block.get(file.cid) - /** @type {PbNode} */ + /** @type {PBNode} */ const node = decode(fileBlock.bytes) const meta = UnixFS.unmarshal(node.Data) diff --git a/packages/ipfs-unixfs-importer/package.json b/packages/ipfs-unixfs-importer/package.json index 9bef775f..e146fc6c 100644 --- a/packages/ipfs-unixfs-importer/package.json +++ b/packages/ipfs-unixfs-importer/package.json @@ -46,7 +46,7 @@ "util": "^0.12.3" }, "dependencies": { - "@ipld/dag-pb": "0.0.1", + "@ipld/dag-pb": "https://gitpkg.now.sh/ipld/js-dag-pb/dist?rvagg/types", "bl": "^5.0.0", "cids": "^1.1.5", "err-code": "^3.0.1", @@ -58,7 +58,7 @@ "it-parallel-batch": "^1.0.9", "merge-options": "^3.0.4", "multicodec": "^3.0.1", - "multiformats": "^6.0.0", + "multiformats": "https://gitpkg.now.sh/multiformats/js-multiformats/dist?rvagg/moar-generic-blockcodec", "multihashing-async": "^2.1.0", "rabin-wasm": "^0.1.4", "uint8arrays": "^2.1.2" diff --git a/packages/ipfs-unixfs-importer/src/dir-flat.js b/packages/ipfs-unixfs-importer/src/dir-flat.js index 645020f9..07f192b7 100644 --- a/packages/ipfs-unixfs-importer/src/dir-flat.js +++ b/packages/ipfs-unixfs-importer/src/dir-flat.js @@ -15,8 +15,8 @@ const persist = require('./utils/persist') * @typedef {import('./types').InProgressImportResult} InProgressImportResult * @typedef {import('./types').BlockAPI} BlockAPI * @typedef {import('./dir').DirProps} DirProps - * @typedef {import('ipfs-unixfs-exporter/src/types').PbNode} PbNode - * @typedef {import('ipfs-unixfs-exporter/src/types').PbLink} PbLink + * @typedef {import('@ipld/dag-pb').PBNode} PBNode + * @typedef {import('@ipld/dag-pb').PBLink} PBLink */ class DirFlat extends Dir { @@ -108,16 +108,16 @@ class DirFlat extends Dir { mode: this.mode }) - /** @type {PbNode} */ + /** @type {PBNode} */ const node = { Data: unixfs.marshal(), Links: links } const buffer = encode(prepare(node)) const cid = await persist(buffer, block, this.options) const size = buffer.length + node.Links.reduce( /** * @param {number} acc - * @param {PbLink} curr + * @param {PBLink} curr */ - (acc, curr) => acc + curr.Tsize, + (acc, curr) => acc + (curr.Tsize == null ? 0 : curr.Tsize), 0) this.cid = cid diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index 92b4ed23..ff087b3a 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -4,7 +4,6 @@ const { expect } = require('aegir/utils/chai') const mh = require('multiformats/hashes/digest') const { sha256, sha512 } = require('multiformats/hashes/sha2') -// @ts-ignore - TODO vmx 2021-03-27 define those types const { decode } = require('@ipld/dag-pb') const { UnixFS } = require('ipfs-unixfs') const builder = require('../src/dag-builder') From 1145e02159dfb6a4fced13b600093dfffdc54346 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 22 Apr 2021 19:54:11 +1000 Subject: [PATCH 14/22] chore: fix lint errors --- .../test/exporter-sharded.spec.js | 2 ++ packages/ipfs-unixfs-exporter/test/exporter.spec.js | 13 +++++++++---- .../test/helpers/collect-leaf-cids.js | 4 ++-- packages/ipfs-unixfs-exporter/test/importer.spec.js | 6 ++++++ packages/ipfs-unixfs-importer/package.json | 1 - packages/ipfs-unixfs-importer/test/builder.spec.js | 4 ++++ 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js index 75224a93..641d87ea 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js @@ -98,6 +98,8 @@ describe('exporter sharded', function () { const encodedBlock = await block.get(dirCid) const dir = dagPb.decode(encodedBlock.bytes) + expect(dir.Data).to.not.be.undefined() + // @ts-ignore ^ we've checked that it's defined const dirMetadata = UnixFS.unmarshal(dir.Data) expect(dirMetadata.type).to.equal('hamt-sharded-directory') diff --git a/packages/ipfs-unixfs-exporter/test/exporter.spec.js b/packages/ipfs-unixfs-exporter/test/exporter.spec.js index 797a33f5..e37cf985 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter.spec.js @@ -150,13 +150,14 @@ describe('exporter', () => { for (let i = 0; i < children.length; i++) { const child = children[i] + // @ts-ignore - we can guarantee that it's not undefined const leaf = UnixFS.unmarshal(child.node.Data) file.addBlockSize(leaf.fileSize()) links.push({ Name: '', - Tsize: child.node.Data.length, + Tsize: child.node.Data != null ? child.node.Data.length : 0, Hash: child.cid }) } @@ -182,6 +183,8 @@ describe('exporter', () => { const result = await dagPut() const encodedBlock = await block.get(result.cid) const node = dagPb.decode(encodedBlock.bytes) + expect(node.Data).is.not.undefined() + // @ts-ignore ^ we've checked that it's defined const unmarsh = UnixFS.unmarshal(node.Data) expect(unmarsh.data).to.deep.equal(result.file.data) @@ -241,6 +244,8 @@ describe('exporter', () => { const encodedBlock = await block.get(result.cid) const node = dagPb.decode(encodedBlock.bytes) + expect(node.Data).is.not.undefined() + // @ts-ignore ^ we've checked that it's defined const unmarsh = UnixFS.unmarshal(node.Data) if (!unmarsh.data) { @@ -298,11 +303,11 @@ describe('exporter', () => { Data: file.marshal(), Links: [{ Name: '', - Tsize: chunkNode1.size, + Tsize: chunkNode1.Data != null ? chunkNode1.Data.length : 0, Hash: chunkBlock1.cid.toV0() }, { Name: '', - Tsize: chunkNode2.size, + Tsize: chunkNode2.Data != null ? chunkNode2.Data.length : 0, Hash: chunkBlock2.cid.toV0() }] }) @@ -332,7 +337,7 @@ describe('exporter', () => { content: uint8ArrayConcat(await all(randomBytes(100))), links: [{ Name: '', - Tsize: chunk.node.size, + Tsize: chunk.node.Data != null ? chunk.node.Data.length : 0, Hash: chunk.cid }] }) diff --git a/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js b/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js index 5d067858..6d221983 100644 --- a/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js +++ b/packages/ipfs-unixfs-exporter/test/helpers/collect-leaf-cids.js @@ -3,7 +3,7 @@ const { decode } = require('@ipld/dag-pb') /** - * @typedef {import('../../src/types').PbLink} PbLink + * @typedef {import('@ipld/dag-pb').PBLink} PBLink */ /** @@ -29,7 +29,7 @@ module.exports = function (cid, blockService) { node.Links.forEach( /** - * @param {PbLink} link + * @param {PBLink} link */ link => traverse(link.Hash) ) diff --git a/packages/ipfs-unixfs-exporter/test/importer.spec.js b/packages/ipfs-unixfs-exporter/test/importer.spec.js index 8e27da2f..257bb955 100644 --- a/packages/ipfs-unixfs-exporter/test/importer.spec.js +++ b/packages/ipfs-unixfs-exporter/test/importer.spec.js @@ -215,6 +215,8 @@ const checkLeafNodeTypes = async (block, options, expected) => { const fileBlock = await block.get(file.cid) /** @type {PBNode} */ const node = decode(fileBlock.bytes) + expect(node.Data).to.not.be.undefined() + // @ts-ignore ^ we know it's not undefined const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal('file') @@ -226,6 +228,8 @@ const checkLeafNodeTypes = async (block, options, expected) => { linkedBlocks.forEach(({ bytes }) => { const node = decode(bytes) + expect(node.Data).to.not.be.undefined() + // @ts-ignore ^ we know it's not undefined const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal(expected) }) @@ -243,6 +247,8 @@ const checkNodeLinks = async (block, options, expected) => { }], block, options)) { const fileBlock = await block.get(file.cid) const node = decode(fileBlock.bytes) + expect(node.Data).to.not.be.undefined() + // @ts-ignore ^ we know it's not undefined const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal('file') diff --git a/packages/ipfs-unixfs-importer/package.json b/packages/ipfs-unixfs-importer/package.json index e146fc6c..403e315b 100644 --- a/packages/ipfs-unixfs-importer/package.json +++ b/packages/ipfs-unixfs-importer/package.json @@ -48,7 +48,6 @@ "dependencies": { "@ipld/dag-pb": "https://gitpkg.now.sh/ipld/js-dag-pb/dist?rvagg/types", "bl": "^5.0.0", - "cids": "^1.1.5", "err-code": "^3.0.1", "hamt-sharding": "^2.0.0", "ipfs-unixfs": "^4.0.3", diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index ff087b3a..5089c147 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -47,6 +47,8 @@ describe('builder', () => { const importedBlock = await block.get(imported.cid) const node = decode(importedBlock.bytes) + expect(node.Data).to.not.be.undefined() + // @ts-ignore ^ we've checked that it's defined const fetchedContent = UnixFS.unmarshal(node.Data).data expect(fetchedContent).to.deep.equal(content) } @@ -104,6 +106,8 @@ describe('builder', () => { const importedBlock = await block.get(imported.cid) const node = decode(importedBlock.bytes) + expect(node.Data).to.not.be.undefined() + // @ts-ignore ^ we've checked that it's defined const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal('directory') } From 6109622a80f763eb008aeaec215f86948f981cce Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 23 Apr 2021 17:15:13 +1000 Subject: [PATCH 15/22] chore: remove more @ts-ignores --- .../unixfs-v1/content/hamt-sharded-directory.js | 1 - .../src/resolvers/unixfs-v1/index.js | 1 - .../src/utils/find-cid-in-shard.js | 1 - .../test/exporter-sharded.spec.js | 5 +++-- .../ipfs-unixfs-exporter/test/exporter.spec.js | 10 ++++++---- .../ipfs-unixfs-exporter/test/importer.spec.js | 15 +++++++++------ .../ipfs-unixfs-importer/src/dag-builder/dir.js | 6 +----- .../src/dag-builder/file/buffer-importer.js | 6 +----- .../src/dag-builder/file/index.js | 7 +------ packages/ipfs-unixfs-importer/src/dir-flat.js | 6 +----- packages/ipfs-unixfs-importer/src/dir-sharded.js | 6 +----- .../ipfs-unixfs-importer/test/builder.spec.js | 11 ++++++----- 12 files changed, 29 insertions(+), 46 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js index 35fa1eba..0aa1fb1a 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js @@ -1,6 +1,5 @@ 'use strict' -// @ts-ignore const { decode } = require('@ipld/dag-pb') /** diff --git a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js index 7c278414..12200d13 100644 --- a/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js +++ b/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js @@ -3,7 +3,6 @@ const errCode = require('err-code') const { UnixFS } = require('ipfs-unixfs') const findShardCid = require('../../utils/find-cid-in-shard') -// @ts-ignore const { decode } = require('@ipld/dag-pb') /** diff --git a/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js b/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js index 07f4f6ee..4d7cc066 100644 --- a/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js +++ b/packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.js @@ -2,7 +2,6 @@ const { Bucket, createHAMT } = require('hamt-sharding') const multihashing = require('multihashing-async') -// @ts-ignore const { decode } = require('@ipld/dag-pb') /** diff --git a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js index 641d87ea..f0605172 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.js @@ -98,8 +98,9 @@ describe('exporter sharded', function () { const encodedBlock = await block.get(dirCid) const dir = dagPb.decode(encodedBlock.bytes) - expect(dir.Data).to.not.be.undefined() - // @ts-ignore ^ we've checked that it's defined + if (!dir.Data) { + throw Error('PBNode Data undefined') + } const dirMetadata = UnixFS.unmarshal(dir.Data) expect(dirMetadata.type).to.equal('hamt-sharded-directory') diff --git a/packages/ipfs-unixfs-exporter/test/exporter.spec.js b/packages/ipfs-unixfs-exporter/test/exporter.spec.js index e37cf985..67207623 100644 --- a/packages/ipfs-unixfs-exporter/test/exporter.spec.js +++ b/packages/ipfs-unixfs-exporter/test/exporter.spec.js @@ -183,8 +183,9 @@ describe('exporter', () => { const result = await dagPut() const encodedBlock = await block.get(result.cid) const node = dagPb.decode(encodedBlock.bytes) - expect(node.Data).is.not.undefined() - // @ts-ignore ^ we've checked that it's defined + if (!node.Data) { + throw new Error('PBNode Data undefined') + } const unmarsh = UnixFS.unmarshal(node.Data) expect(unmarsh.data).to.deep.equal(result.file.data) @@ -244,8 +245,9 @@ describe('exporter', () => { const encodedBlock = await block.get(result.cid) const node = dagPb.decode(encodedBlock.bytes) - expect(node.Data).is.not.undefined() - // @ts-ignore ^ we've checked that it's defined + if (!node.Data) { + throw new Error('PBNode Data undefined') + } const unmarsh = UnixFS.unmarshal(node.Data) if (!unmarsh.data) { diff --git a/packages/ipfs-unixfs-exporter/test/importer.spec.js b/packages/ipfs-unixfs-exporter/test/importer.spec.js index 257bb955..bae88e6a 100644 --- a/packages/ipfs-unixfs-exporter/test/importer.spec.js +++ b/packages/ipfs-unixfs-exporter/test/importer.spec.js @@ -215,8 +215,9 @@ const checkLeafNodeTypes = async (block, options, expected) => { const fileBlock = await block.get(file.cid) /** @type {PBNode} */ const node = decode(fileBlock.bytes) - expect(node.Data).to.not.be.undefined() - // @ts-ignore ^ we know it's not undefined + if (!node.Data) { + throw new Error('PBNode Data undefined') + } const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal('file') @@ -228,8 +229,9 @@ const checkLeafNodeTypes = async (block, options, expected) => { linkedBlocks.forEach(({ bytes }) => { const node = decode(bytes) - expect(node.Data).to.not.be.undefined() - // @ts-ignore ^ we know it's not undefined + if (!node.Data) { + throw new Error('PBNode Data undefined') + } const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal(expected) }) @@ -247,8 +249,9 @@ const checkNodeLinks = async (block, options, expected) => { }], block, options)) { const fileBlock = await block.get(file.cid) const node = decode(fileBlock.bytes) - expect(node.Data).to.not.be.undefined() - // @ts-ignore ^ we know it's not undefined + if (!node.Data) { + throw new Error('PBNode Data undefined') + } const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal('file') diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/dir.js b/packages/ipfs-unixfs-importer/src/dag-builder/dir.js index ce9c9693..cd5749f2 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/dir.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/dir.js @@ -2,11 +2,7 @@ const { UnixFS } = require('ipfs-unixfs') const persist = require('../utils/persist') -const { - encode, - prepare -// @ts-ignore -} = require('@ipld/dag-pb') +const { encode, prepare } = require('@ipld/dag-pb') /** * @typedef {import('../types').Directory} Directory diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js index e1b86524..6cd2d914 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/buffer-importer.js @@ -2,11 +2,7 @@ const { UnixFS } = require('ipfs-unixfs') const persist = require('../../utils/persist') -const { - encode, - prepare -// @ts-ignore -} = require('@ipld/dag-pb') +const { encode, prepare } = require('@ipld/dag-pb') const mc = require('multicodec') /** diff --git a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js index 39a20988..10128b7a 100644 --- a/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js +++ b/packages/ipfs-unixfs-importer/src/dag-builder/file/index.js @@ -3,14 +3,9 @@ const errCode = require('err-code') const { UnixFS } = require('ipfs-unixfs') const persist = require('../../utils/persist') -const { - encode, - prepare -// @ts-ignore -} = require('@ipld/dag-pb') +const { encode, prepare } = require('@ipld/dag-pb') const parallelBatch = require('it-parallel-batch') const mc = require('multicodec') -// const mh = require('multiformats/hashes/digest') const rawCodec = require('multiformats/codecs/raw') /** diff --git a/packages/ipfs-unixfs-importer/src/dir-flat.js b/packages/ipfs-unixfs-importer/src/dir-flat.js index 07f192b7..2d6e11c1 100644 --- a/packages/ipfs-unixfs-importer/src/dir-flat.js +++ b/packages/ipfs-unixfs-importer/src/dir-flat.js @@ -1,10 +1,6 @@ 'use strict' -const { - encode, - prepare -// @ts-ignore -} = require('@ipld/dag-pb') +const { encode, prepare } = require('@ipld/dag-pb') const { UnixFS } = require('ipfs-unixfs') const Dir = require('./dir') const persist = require('./utils/persist') diff --git a/packages/ipfs-unixfs-importer/src/dir-sharded.js b/packages/ipfs-unixfs-importer/src/dir-sharded.js index 3361ed76..9b523496 100644 --- a/packages/ipfs-unixfs-importer/src/dir-sharded.js +++ b/packages/ipfs-unixfs-importer/src/dir-sharded.js @@ -1,10 +1,6 @@ 'use strict' -const { - encode, - prepare -// @ts-ignore -} = require('@ipld/dag-pb') +const { encode, prepare } = require('@ipld/dag-pb') const { UnixFS } = require('ipfs-unixfs') const Dir = require('./dir') const persist = require('./utils/persist') diff --git a/packages/ipfs-unixfs-importer/test/builder.spec.js b/packages/ipfs-unixfs-importer/test/builder.spec.js index 5089c147..1f77e288 100644 --- a/packages/ipfs-unixfs-importer/test/builder.spec.js +++ b/packages/ipfs-unixfs-importer/test/builder.spec.js @@ -46,9 +46,9 @@ describe('builder', () => { // Fetch using hasher encoded multihash const importedBlock = await block.get(imported.cid) const node = decode(importedBlock.bytes) - - expect(node.Data).to.not.be.undefined() - // @ts-ignore ^ we've checked that it's defined + if (!node.Data) { + throw new Error('PBNode Data undefined') + } const fetchedContent = UnixFS.unmarshal(node.Data).data expect(fetchedContent).to.deep.equal(content) } @@ -106,8 +106,9 @@ describe('builder', () => { const importedBlock = await block.get(imported.cid) const node = decode(importedBlock.bytes) - expect(node.Data).to.not.be.undefined() - // @ts-ignore ^ we've checked that it's defined + if (!node.Data) { + throw new Error('PBNode Data undefined') + } const meta = UnixFS.unmarshal(node.Data) expect(meta.type).to.equal('directory') } From 3ffbb5b29eaf5f7089d1e339ea13ee89f09906e0 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 23 Apr 2021 22:42:10 +1000 Subject: [PATCH 16/22] chore: update travis env to focal --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3c3df143..ab015ea4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: node_js cache: npm +dist: focal branches: only: From 426cc8bbc5f2cdcbd0814edd9829cfae3dfaeaf6 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sat, 24 Apr 2021 19:43:00 +1000 Subject: [PATCH 17/22] TEMPORARY dist/ directories for gitpkg --- .gitignore | 1 - .../ipfs-unixfs-exporter/dist/src/index.d.ts | 29 + .../dist/src/index.d.ts.map | 1 + .../dist/src/resolvers/dag-cbor.d.ts | 13 + .../dist/src/resolvers/dag-cbor.d.ts.map | 1 + .../dist/src/resolvers/identity.d.ts | 11 + .../dist/src/resolvers/identity.d.ts.map | 1 + .../dist/src/resolvers/index.d.ts | 14 + .../dist/src/resolvers/index.d.ts.map | 1 + .../dist/src/resolvers/raw.d.ts | 10 + .../dist/src/resolvers/raw.d.ts.map | 1 + .../unixfs-v1/content/directory.d.ts | 17 + .../unixfs-v1/content/directory.d.ts.map | 1 + .../src/resolvers/unixfs-v1/content/file.d.ts | 12 + .../resolvers/unixfs-v1/content/file.d.ts.map | 1 + .../content/hamt-sharded-directory.d.ts | 23 + .../content/hamt-sharded-directory.d.ts.map | 1 + .../src/resolvers/unixfs-v1/content/raw.d.ts | 15 + .../resolvers/unixfs-v1/content/raw.d.ts.map | 1 + .../dist/src/resolvers/unixfs-v1/index.d.ts | 15 + .../src/resolvers/unixfs-v1/index.d.ts.map | 1 + .../ipfs-unixfs-exporter/dist/src/types.d.ts | 74 + .../src/utils/extract-data-from-block.d.ts | 3 + .../utils/extract-data-from-block.d.ts.map | 1 + .../dist/src/utils/find-cid-in-shard.d.ts | 30 + .../dist/src/utils/find-cid-in-shard.d.ts.map | 1 + .../src/utils/validate-offset-and-length.d.ts | 11 + .../utils/validate-offset-and-length.d.ts.map | 1 + .../dist/src/chunker/fixed-size.d.ts | 3 + .../dist/src/chunker/fixed-size.d.ts.map | 1 + .../dist/src/chunker/index.d.ts | 5 + .../dist/src/chunker/index.d.ts.map | 1 + .../dist/src/chunker/rabin.d.ts | 10 + .../dist/src/chunker/rabin.d.ts.map | 1 + .../dist/src/dag-builder/dir.d.ts | 13 + .../dist/src/dag-builder/dir.d.ts.map | 1 + .../dist/src/dag-builder/file/balanced.d.ts | 13 + .../src/dag-builder/file/balanced.d.ts.map | 1 + .../src/dag-builder/file/buffer-importer.d.ts | 13 + .../dag-builder/file/buffer-importer.d.ts.map | 1 + .../dist/src/dag-builder/file/flat.d.ts | 3 + .../dist/src/dag-builder/file/flat.d.ts.map | 1 + .../dist/src/dag-builder/file/index.d.ts | 15 + .../dist/src/dag-builder/file/index.d.ts.map | 1 + .../dist/src/dag-builder/file/trickle.d.ts | 9 + .../src/dag-builder/file/trickle.d.ts.map | 1 + .../dist/src/dag-builder/index.d.ts | 14 + .../dist/src/dag-builder/index.d.ts.map | 1 + .../dist/src/dag-builder/validate-chunks.d.ts | 13 + .../src/dag-builder/validate-chunks.d.ts.map | 1 + .../dist/src/dir-flat.d.ts | 31 + .../dist/src/dir-flat.d.ts.map | 1 + .../dist/src/dir-sharded.d.ts | 28 + .../dist/src/dir-sharded.d.ts.map | 1 + .../ipfs-unixfs-importer/dist/src/dir.d.ts | 85 ++ .../dist/src/dir.d.ts.map | 1 + .../dist/src/flat-to-shard.d.ts | 6 + .../dist/src/flat-to-shard.d.ts.map | 1 + .../ipfs-unixfs-importer/dist/src/index.d.ts | 43 + .../dist/src/index.d.ts.map | 1 + .../dist/src/options.d.ts | 5 + .../dist/src/options.d.ts.map | 1 + .../dist/src/tree-builder.d.ts | 14 + .../dist/src/tree-builder.d.ts.map | 1 + .../ipfs-unixfs-importer/dist/src/types.d.ts | 167 +++ .../dist/src/utils/persist.d.ts | 9 + .../dist/src/utils/persist.d.ts.map | 1 + .../dist/src/utils/to-path-components.d.ts | 3 + .../src/utils/to-path-components.d.ts.map | 1 + packages/ipfs-unixfs/dist/src/index.d.ts | 73 + packages/ipfs-unixfs/dist/src/index.d.ts.map | 1 + packages/ipfs-unixfs/dist/src/types.d.ts | 7 + packages/ipfs-unixfs/dist/src/unixfs.d.ts | 238 +++ .../dist/test/unixfs-format.spec.d.ts | 2 + .../dist/test/unixfs-format.spec.d.ts.map | 1 + .../ipfs-unixfs/dist/tsconfig.tsbuildinfo | 1292 +++++++++++++++++ 76 files changed, 2426 insertions(+), 1 deletion(-) create mode 100644 packages/ipfs-unixfs-exporter/dist/src/index.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/types.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/index.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/index.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/options.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/options.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/types.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map create mode 100644 packages/ipfs-unixfs/dist/src/index.d.ts create mode 100644 packages/ipfs-unixfs/dist/src/index.d.ts.map create mode 100644 packages/ipfs-unixfs/dist/src/types.d.ts create mode 100644 packages/ipfs-unixfs/dist/src/unixfs.d.ts create mode 100644 packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts create mode 100644 packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map create mode 100644 packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo diff --git a/.gitignore b/.gitignore index 5691469f..60182528 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,3 @@ build node_modules lib -dist diff --git a/packages/ipfs-unixfs-exporter/dist/src/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts new file mode 100644 index 00000000..ae8b732d --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts @@ -0,0 +1,29 @@ +export type UnixFS = import('ipfs-unixfs').UnixFS; +export type BlockAPI = import('ipfs-unixfs-importer/src/types').BlockAPI; +export type ExporterOptions = import('./types').ExporterOptions; +export type UnixFSFile = import('./types').UnixFSFile; +export type UnixFSDirectory = import('./types').UnixFSDirectory; +export type ObjectNode = import('./types').ObjectNode; +export type RawNode = import('./types').RawNode; +export type IdentityNode = import('./types').IdentityNode; +export type UnixFSEntry = import('./types').UnixFSEntry; +/** + * @param {string | CID} path + * @param {BlockAPI} blockService + * @param {ExporterOptions} [options] + */ +export function exporter(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): Promise; +/** + * @param {string | CID} path + * @param {BlockAPI} blockService + * @param {ExporterOptions} [options] + */ +export function walkPath(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): AsyncGenerator; +/** + * @param {string | CID} path + * @param {BlockAPI} blockService + * @param {ExporterOptions} [options] + */ +export function recursive(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): AsyncGenerator; +import { CID } from "multiformats/cid"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map new file mode 100644 index 00000000..ff6d6da2 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"qBAQa,OAAO,aAAa,EAAE,MAAM;uBAC5B,OAAO,gCAAgC,EAAE,QAAQ;8BACjD,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,SAAS,EAAE,UAAU;8BAC5B,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,SAAS,EAAE,UAAU;sBAC5B,OAAO,SAAS,EAAE,OAAO;2BACzB,OAAO,SAAS,EAAE,YAAY;0BAC9B,OAAO,SAAS,EAAE,WAAW;AAmF1C;;;;GAIG;AACH,+BAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,mGAWlB;AAlDD;;;;GAIG;AACH,+BAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,yHAiClB;AAiBD;;;;GAIG;AACH,gCAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,yHAoClB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts new file mode 100644 index 00000000..0023df0e --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts @@ -0,0 +1,13 @@ +export = resolve; +/** + * @typedef {import('../types').Resolver} Resolver + */ +/** + * @type {Resolver} + */ +declare const resolve: Resolver; +declare namespace resolve { + export { Resolver }; +} +type Resolver = import('../types').Resolver; +//# sourceMappingURL=dag-cbor.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map new file mode 100644 index 00000000..421183a1 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dag-cbor.d.ts","sourceRoot":"","sources":["../../../src/resolvers/dag-cbor.js"],"names":[],"mappings":";AAMA;;GAEG;AAEH;;GAEG;AACH,uBAFU,QAAQ,CA6DjB;;;;gBAjEY,OAAO,UAAU,EAAE,QAAQ"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts new file mode 100644 index 00000000..48b711a6 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts @@ -0,0 +1,11 @@ +export = resolve; +/** + * @type {Resolver} + */ +declare const resolve: Resolver; +declare namespace resolve { + export { ExporterOptions, Resolver }; +} +type Resolver = import('../types').Resolver; +type ExporterOptions = import('../types').ExporterOptions; +//# sourceMappingURL=identity.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map new file mode 100644 index 00000000..5830ebd8 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/resolvers/identity.js"],"names":[],"mappings":";AA+BA;;GAEG;AACH,uBAFU,QAAQ,CAoBjB;;;;gBA3CY,OAAO,UAAU,EAAE,QAAQ;uBAD3B,OAAO,UAAU,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts new file mode 100644 index 00000000..310e738a --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts @@ -0,0 +1,14 @@ +export = resolve; +/** + * @type {Resolve} + */ +declare function resolve(cid: import("multiformats/cid").CID, name: string, path: string, toResolve: string[], depth: number, blockService: any, options: import("../types").ExporterOptions): Promise; +declare namespace resolve { + export { BlockAPI, ExporterOptions, UnixFSEntry, Resolver, Resolve }; +} +type BlockAPI = import('../').BlockAPI; +type ExporterOptions = import('../types').ExporterOptions; +type UnixFSEntry = import('../types').UnixFSEntry; +type Resolver = import('../types').Resolver; +type Resolve = import('../types').Resolve; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map new file mode 100644 index 00000000..5c1528b0 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resolvers/index.js"],"names":[],"mappings":";AAuBA;;GAEG;AACH,yOASC;;;;gBA7BY,OAAO,KAAK,EAAE,QAAQ;uBACtB,OAAO,UAAU,EAAE,eAAe;mBAClC,OAAO,UAAU,EAAE,WAAW;gBAC9B,OAAO,UAAU,EAAE,QAAQ;eAC3B,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts new file mode 100644 index 00000000..c1bbde83 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts @@ -0,0 +1,10 @@ +export = resolve; +/** + * @type {import('../types').Resolver} + */ +declare const resolve: import('../types').Resolver; +declare namespace resolve { + export { ExporterOptions }; +} +type ExporterOptions = import('../types').ExporterOptions; +//# sourceMappingURL=raw.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map new file mode 100644 index 00000000..aeb0b6d0 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"raw.d.ts","sourceRoot":"","sources":["../../../src/resolvers/raw.js"],"names":[],"mappings":";AA6BA;;GAEG;AACH,uBAFU,OAAO,UAAU,EAAE,QAAQ,CAqBpC;;;;uBA5CY,OAAO,UAAU,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts new file mode 100644 index 00000000..cd496970 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts @@ -0,0 +1,17 @@ +export = directoryContent; +/** + * @typedef {import('../../../types').ExporterOptions} ExporterOptions + * @typedef {import('../../../types').UnixfsV1DirectoryContent} UnixfsV1DirectoryContent + * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver + */ +/** + * @type {UnixfsV1Resolver} + */ +declare const directoryContent: UnixfsV1Resolver; +declare namespace directoryContent { + export { ExporterOptions, UnixfsV1DirectoryContent, UnixfsV1Resolver }; +} +type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; +type ExporterOptions = import('../../../types').ExporterOptions; +type UnixfsV1DirectoryContent = import('../../../types').UnixfsV1DirectoryContent; +//# sourceMappingURL=directory.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map new file mode 100644 index 00000000..193e0f25 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/directory.js"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH;;GAEG;AACH,gCAFU,gBAAgB,CAsBzB;;;;wBA1BY,OAAO,gBAAgB,EAAE,gBAAgB;uBAFzC,OAAO,gBAAgB,EAAE,eAAe;gCACxC,OAAO,gBAAgB,EAAE,wBAAwB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts new file mode 100644 index 00000000..5049b5de --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts @@ -0,0 +1,12 @@ +export = fileContent; +/** + * @type {import('../').UnixfsV1Resolver} + */ +declare const fileContent: import('../').UnixfsV1Resolver; +declare namespace fileContent { + export { ExporterOptions, BlockService, PBNode }; +} +type ExporterOptions = import('../../../types').ExporterOptions; +type BlockService = import('ipfs-unixfs-importer/src/types').BlockAPI; +type PBNode = import('@ipld/dag-pb').PBNode; +//# sourceMappingURL=file.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map new file mode 100644 index 00000000..d1b5b2a9 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/file.js"],"names":[],"mappings":";AAqGA;;GAEG;AACH,2BAFU,OAAO,KAAK,EAAE,gBAAgB,CAyBvC;;;;uBApHY,OAAO,gBAAgB,EAAE,eAAe;oBACxC,OAAO,gCAAgC,EAAE,QAAQ;cACjD,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts new file mode 100644 index 00000000..fa9dac87 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts @@ -0,0 +1,23 @@ +export = hamtShardedDirectoryContent; +/** + * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockAPI + * @typedef {import('../../../types').ExporterOptions} ExporterOptions + * @typedef {import('../../../types').Resolve} Resolve + * @typedef {import('../../../types').UnixfsV1DirectoryContent} UnixfsV1DirectoryContent + * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver + * @typedef {import('@ipld/dag-pb').PBNode} PBNode + */ +/** + * @type {UnixfsV1Resolver} + */ +declare const hamtShardedDirectoryContent: UnixfsV1Resolver; +declare namespace hamtShardedDirectoryContent { + export { BlockAPI, ExporterOptions, Resolve, UnixfsV1DirectoryContent, UnixfsV1Resolver, PBNode }; +} +type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; +type BlockAPI = import('ipfs-unixfs-importer/src/types').BlockAPI; +type ExporterOptions = import('../../../types').ExporterOptions; +type Resolve = import('../../../types').Resolve; +type UnixfsV1DirectoryContent = import('../../../types').UnixfsV1DirectoryContent; +type PBNode = import('@ipld/dag-pb').PBNode; +//# sourceMappingURL=hamt-sharded-directory.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map new file mode 100644 index 00000000..94a26f78 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hamt-sharded-directory.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/hamt-sharded-directory.js"],"names":[],"mappings":";AAIA;;;;;;;GAOG;AAEH;;GAEG;AACH,2CAFU,gBAAgB,CAYzB;;;;wBAjBY,OAAO,gBAAgB,EAAE,gBAAgB;gBAJzC,OAAO,gCAAgC,EAAE,QAAQ;uBACjD,OAAO,gBAAgB,EAAE,eAAe;eACxC,OAAO,gBAAgB,EAAE,OAAO;gCAChC,OAAO,gBAAgB,EAAE,wBAAwB;cAEjD,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts new file mode 100644 index 00000000..e1e92ca8 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts @@ -0,0 +1,15 @@ +export = rawContent; +/** + * @typedef {import('../../../types').ExporterOptions} ExporterOptions + * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver + */ +/** + * @type {UnixfsV1Resolver} + */ +declare const rawContent: UnixfsV1Resolver; +declare namespace rawContent { + export { ExporterOptions, UnixfsV1Resolver }; +} +type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; +type ExporterOptions = import('../../../types').ExporterOptions; +//# sourceMappingURL=raw.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map new file mode 100644 index 00000000..aec0596d --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"raw.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/raw.js"],"names":[],"mappings":";AAKA;;;GAGG;AAEH;;GAEG;AACH,0BAFU,gBAAgB,CAsBzB;;;;wBA1BY,OAAO,gBAAgB,EAAE,gBAAgB;uBADzC,OAAO,gBAAgB,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts new file mode 100644 index 00000000..fa0762f2 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts @@ -0,0 +1,15 @@ +export = unixFsResolver; +/** + * @type {Resolver} + */ +declare const unixFsResolver: Resolver; +declare namespace unixFsResolver { + export { ExporterOptions, UnixFSEntry, Resolve, Resolver, UnixfsV1Resolver, PBNode }; +} +type Resolver = import('../../types').Resolver; +type ExporterOptions = import('../../types').ExporterOptions; +type UnixFSEntry = import('../../types').UnixFSEntry; +type Resolve = import('../../types').Resolve; +type UnixfsV1Resolver = import('../../types').UnixfsV1Resolver; +type PBNode = import('@ipld/dag-pb').PBNode; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map new file mode 100644 index 00000000..76c94694 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/unixfs-v1/index.js"],"names":[],"mappings":";AA2CA;;GAEG;AACH,8BAFU,QAAQ,CAoEjB;;;;gBApGY,OAAO,aAAa,EAAE,QAAQ;uBAH9B,OAAO,aAAa,EAAE,eAAe;mBACrC,OAAO,aAAa,EAAE,WAAW;eACjC,OAAO,aAAa,EAAE,OAAO;wBAE7B,OAAO,aAAa,EAAE,gBAAgB;cACtC,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/types.d.ts b/packages/ipfs-unixfs-exporter/dist/src/types.d.ts new file mode 100644 index 00000000..73f4c8e7 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/types.d.ts @@ -0,0 +1,74 @@ +import { CID } from 'multiformats/cid' +import UnixFS from 'ipfs-unixfs' +import { PBNode } from '@ipld/dag-pb' + +interface ExporterOptions { + offset?: number + length?: number + signal?: AbortSignal + timeout?: number +} + +interface Exportable { + type: 'file' | 'directory' | 'object' | 'raw' | 'identity', + name: string + path: string + cid: CID + depth: number + size: number + content: (options?: ExporterOptions) => AsyncIterable +} + +interface UnixFSFile extends Exportable { + type: 'file' + unixfs: UnixFS + node: PBNode +} + +interface UnixFSDirectory extends Exportable { + type: 'directory' + unixfs: UnixFS + node: PBNode +} + +interface ObjectNode extends Exportable { + type: 'object' + node: Uint8Array +} + +interface RawNode extends Exportable { + type: 'raw' + node: Uint8Array +} + +interface IdentityNode extends Exportable { + type: 'identity' + node: Uint8Array +} + +type UnixFSEntry = UnixFSFile | UnixFSDirectory | ObjectNode | RawNode | IdentityNode + +interface NextResult { + cid: CID + name: string + path: string + toResolve: string[] +} + +interface ResolveResult { + entry: UnixFSEntry + next?: NextResult +} + +type Resolve = (cid: CID, name: string, path: string, toResolve: string[], depth: number, ipld: IPLD, options: ExporterOptions) => Promise +type Resolver = (cid: CID, name: string, path: string, toResolve: string[], resolve: Resolve, depth: number, ipld: IPLD, options: ExporterOptions) => Promise + +type UnixfsV1FileContent = AsyncIterable | Iterable +type UnixfsV1DirectoryContent = AsyncIterable | Iterable +type UnixfsV1Content = UnixfsV1FileContent | UnixfsV1DirectoryContent +type UnixfsV1Resolver = (cid: CID, node: PBNode, unixfs: UnixFS, path: string, resolve: Resolve, depth: number, ipld: IPLD) => (options: ExporterOptions) => UnixfsV1Content + +interface Block { + cid: CID, + bytes: Uint8Array +} diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts new file mode 100644 index 00000000..bc211869 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts @@ -0,0 +1,3 @@ +declare function _exports(block: Uint8Array, blockStart: number, requestedStart: number, requestedEnd: number): Uint8Array; +export = _exports; +//# sourceMappingURL=extract-data-from-block.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map new file mode 100644 index 00000000..761824c0 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"extract-data-from-block.d.ts","sourceRoot":"","sources":["../../../src/utils/extract-data-from-block.js"],"names":[],"mappings":"AAQiB,iCALN,UAAU,cACV,MAAM,kBACN,MAAM,gBACN,MAAM,cAuBhB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts new file mode 100644 index 00000000..03f9b264 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts @@ -0,0 +1,30 @@ +export = findShardCid; +/** + * @typedef {object} ShardTraversalContext + * @property {number} hamtDepth + * @property {Bucket} rootBucket + * @property {Bucket} lastBucket + * + * @param {PBNode} node + * @param {string} name + * @param {BlockService} blockService + * @param {ShardTraversalContext} [context] + * @param {ExporterOptions} [options] + * @returns {Promise} + */ +declare function findShardCid(node: PBNode, name: string, blockService: BlockService, context?: ShardTraversalContext | undefined, options?: import("../types").ExporterOptions | undefined): Promise; +declare namespace findShardCid { + export { BlockService, CID, ExporterOptions, PBNode, PBLink, ShardTraversalContext }; +} +type PBNode = import('@ipld/dag-pb').PBNode; +type BlockService = import('ipfs-unixfs-importer/src/types').BlockAPI; +type ShardTraversalContext = { + hamtDepth: number; + rootBucket: Bucket; + lastBucket: Bucket; +}; +type CID = import('multiformats/cid').CID; +type ExporterOptions = import('../types').ExporterOptions; +type PBLink = import('@ipld/dag-pb').PBLink; +import { Bucket } from "hamt-sharding"; +//# sourceMappingURL=find-cid-in-shard.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map new file mode 100644 index 00000000..ce27c753 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"find-cid-in-shard.d.ts","sourceRoot":"","sources":["../../../src/utils/find-cid-in-shard.js"],"names":[],"mappings":";AA2FA;;;;;;;;;;;;GAYG;AACH,oCAPW,MAAM,QACN,MAAM,gBACN,YAAY,0GAGV,QAAQ,GAAG,GAAC,IAAI,CAAC,CA8D7B;;;;cA1JY,OAAO,cAAc,EAAE,MAAM;oBAH7B,OAAO,gCAAgC,EAAE,QAAQ;;eAsFhD,MAAM;gBACN,OAAO,OAAO,CAAC;gBACf,OAAO,OAAO,CAAC;;WAvFhB,OAAO,kBAAkB,EAAE,GAAG;uBAC9B,OAAO,UAAU,EAAE,eAAe;cAElC,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts new file mode 100644 index 00000000..d181958e --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts @@ -0,0 +1,11 @@ +export = validateOffsetAndLength; +/** + * @param {number} size + * @param {number} [offset] + * @param {number} [length] + */ +declare function validateOffsetAndLength(size: number, offset?: number | undefined, length?: number | undefined): { + offset: number; + length: number; +}; +//# sourceMappingURL=validate-offset-and-length.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map new file mode 100644 index 00000000..5b1f25be --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validate-offset-and-length.d.ts","sourceRoot":"","sources":["../../../src/utils/validate-offset-and-length.js"],"names":[],"mappings":";AAIA;;;;GAIG;AACH,+CAJW,MAAM;;;EAiChB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts new file mode 100644 index 00000000..214ca322 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts @@ -0,0 +1,3 @@ +declare const _exports: import('../types').Chunker; +export = _exports; +//# sourceMappingURL=fixed-size.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map new file mode 100644 index 00000000..8a1f19c7 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fixed-size.d.ts","sourceRoot":"","sources":["../../../src/chunker/fixed-size.js"],"names":[],"mappings":"wBAMU,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts new file mode 100644 index 00000000..8b01a3ea --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts @@ -0,0 +1,5 @@ +declare function _exports(type: import('../types').ChunkerType, source: AsyncIterable, options: import('../types').ImporterOptions): AsyncIterable; +export = _exports; +export type ImporterOptions = import('../types').ImporterOptions; +export type Chunker = import('../types').Chunker; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map new file mode 100644 index 00000000..151c9fb3 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chunker/index.js"],"names":[],"mappings":"AAsBiB,gCAJN,OAAO,UAAU,EAAE,WAAW,UAC9B,cAAc,UAAU,CAAC,WACzB,OAAO,UAAU,EAAE,eAAe,6BAU5C;;8BAzBY,OAAO,UAAU,EAAE,eAAe;sBAClC,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts new file mode 100644 index 00000000..2403c0d9 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts @@ -0,0 +1,10 @@ +declare const _exports: import('../types').Chunker; +export = _exports; +export type RabinOptions = { + min: number; + max: number; + bits: number; + window: number; + polynomial: number; +}; +//# sourceMappingURL=rabin.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map new file mode 100644 index 00000000..202ebd76 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rabin.d.ts","sourceRoot":"","sources":["../../../src/chunker/rabin.js"],"names":[],"mappings":"wBAkBU,OAAO,UAAU,EAAE,OAAO;;;SARtB,MAAM;SACN,MAAM;UACN,MAAM;YACN,MAAM;gBACN,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts new file mode 100644 index 00000000..e5a5ca6e --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts @@ -0,0 +1,13 @@ +export = dirBuilder; +/** + * @typedef {import('../types').Directory} Directory + */ +/** + * @type {import('../types').UnixFSV1DagBuilder} + */ +declare const dirBuilder: import('../types').UnixFSV1DagBuilder; +declare namespace dirBuilder { + export { Directory }; +} +type Directory = import('../types').Directory; +//# sourceMappingURL=dir.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map new file mode 100644 index 00000000..45275d2d --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/dir.js"],"names":[],"mappings":";AAMA;;GAEG;AAEH;;GAEG;AACH,0BAFU,OAAO,UAAU,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAmBzD;;;;iBAvBY,OAAO,UAAU,EAAE,SAAS"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts new file mode 100644 index 00000000..e84f8a1c --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts @@ -0,0 +1,13 @@ +export = balanced; +/** + * @typedef {import('../../types').FileDAGBuilder} FileDAGBuilder + */ +/** + * @type {FileDAGBuilder} + */ +declare function balanced(source: AsyncIterable | Iterable, reduce: import("../../types").Reducer, options: import("../../types").ImporterOptions): Promise; +declare namespace balanced { + export { FileDAGBuilder }; +} +type FileDAGBuilder = import('../../types').FileDAGBuilder; +//# sourceMappingURL=balanced.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map new file mode 100644 index 00000000..33a36921 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"balanced.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/balanced.js"],"names":[],"mappings":";AAIA;;GAEG;AAEH;;GAEG;AACH,sSAEC;;;;sBARY,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts new file mode 100644 index 00000000..71b3b20e --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts @@ -0,0 +1,13 @@ +export = bufferImporter; +/** + * @typedef {import('../../types').BufferImporter} BufferImporter + */ +/** + * @type {BufferImporter} + */ +declare function bufferImporter(file: import("../../types").File, block: import("../../types").BlockAPI, options: import("../../types").ImporterOptions): AsyncIterable<() => Promise>; +declare namespace bufferImporter { + export { BufferImporter }; +} +type BufferImporter = import('../../types').BufferImporter; +//# sourceMappingURL=buffer-importer.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map new file mode 100644 index 00000000..86a57d6a --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"buffer-importer.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/buffer-importer.js"],"names":[],"mappings":";AAOA;;GAEG;AAEH;;GAEG;AACH,qOAmCC;;;;sBAzCY,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts new file mode 100644 index 00000000..5be05008 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts @@ -0,0 +1,3 @@ +declare const _exports: import('../../types').FileDAGBuilder; +export = _exports; +//# sourceMappingURL=flat.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map new file mode 100644 index 00000000..b8b0d861 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/flat.js"],"names":[],"mappings":"wBAKU,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts new file mode 100644 index 00000000..9320e69c --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts @@ -0,0 +1,15 @@ +export = fileBuilder; +/** + * @type {import('../../types').UnixFSV1DagBuilder} + */ +declare function fileBuilder(file: import("../../types").File, block: import("../../types").BlockAPI, options: import("../../types").ImporterOptions): Promise; +declare namespace fileBuilder { + export { BlockAPI, File, ImporterOptions, Reducer, DAGBuilder, FileDAGBuilder }; +} +type BlockAPI = import('../../types').BlockAPI; +type File = import('../../types').File; +type ImporterOptions = import('../../types').ImporterOptions; +type Reducer = import('../../types').Reducer; +type DAGBuilder = import('../../types').DAGBuilder; +type FileDAGBuilder = import('../../types').FileDAGBuilder; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map new file mode 100644 index 00000000..3677ef11 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/index.js"],"names":[],"mappings":";AA+LA;;GAEG;AACH,6MAQC;;;;gBA/LY,OAAO,aAAa,EAAE,QAAQ;YAC9B,OAAO,aAAa,EAAE,IAAI;uBAC1B,OAAO,aAAa,EAAE,eAAe;eACrC,OAAO,aAAa,EAAE,OAAO;kBAC7B,OAAO,aAAa,EAAE,UAAU;sBAChC,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts new file mode 100644 index 00000000..42ce17c0 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts @@ -0,0 +1,9 @@ +declare const _exports: FileDAGBuilder; +export = _exports; +export type UnixFS = import('ipfs-unixfs').UnixFS; +export type ImporterOptions = import('../../types').ImporterOptions; +export type InProgressImportResult = import('../../types').InProgressImportResult; +export type TrickleDagNode = import('../../types').TrickleDagNode; +export type Reducer = import('../../types').Reducer; +export type FileDAGBuilder = import('../../types').FileDAGBuilder; +//# sourceMappingURL=trickle.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map new file mode 100644 index 00000000..f2bff826 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"trickle.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/trickle.js"],"names":[],"mappings":"wBAcU,cAAc;;qBATX,OAAO,aAAa,EAAE,MAAM;8BAC5B,OAAO,aAAa,EAAE,eAAe;qCACrC,OAAO,aAAa,EAAE,sBAAsB;6BAC5C,OAAO,aAAa,EAAE,cAAc;sBACpC,OAAO,aAAa,EAAE,OAAO;6BAC7B,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts new file mode 100644 index 00000000..143999a7 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts @@ -0,0 +1,14 @@ +export = dagBuilder; +/** + * @type {DAGBuilder} + */ +declare function dagBuilder(source: AsyncIterable | Iterable, block: import("../types").BlockAPI, options: import("../types").ImporterOptions): AsyncIterable<() => Promise>; +declare namespace dagBuilder { + export { File, Directory, DAGBuilder, Chunker, ChunkValidator }; +} +type File = import('../types').File; +type Directory = import('../types').Directory; +type DAGBuilder = import('../types').DAGBuilder; +type Chunker = import('../types').Chunker; +type ChunkValidator = import('../types').ChunkValidator; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map new file mode 100644 index 00000000..b25ac40f --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/index.js"],"names":[],"mappings":";AAsDA;;GAEG;AACH,gSA4DC;;;;YA9GY,OAAO,UAAU,EAAE,IAAI;iBACvB,OAAO,UAAU,EAAE,SAAS;kBAC5B,OAAO,UAAU,EAAE,UAAU;eAC7B,OAAO,UAAU,EAAE,OAAO;sBAC1B,OAAO,UAAU,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts new file mode 100644 index 00000000..d3df9e80 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts @@ -0,0 +1,13 @@ +export = validateChunks; +/** + * @typedef {import('../types').ChunkValidator} ChunkValidator + */ +/** + * @type {ChunkValidator} + */ +declare function validateChunks(source: AsyncIterable): AsyncIterable; +declare namespace validateChunks { + export { ChunkValidator }; +} +type ChunkValidator = import('../types').ChunkValidator; +//# sourceMappingURL=validate-chunks.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map new file mode 100644 index 00000000..a2e34ccc --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validate-chunks.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/validate-chunks.js"],"names":[],"mappings":";AAKA;;GAEG;AAEH;;GAEG;AACH,8FAgBC;;;;sBAtBY,OAAO,UAAU,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts new file mode 100644 index 00000000..40b912f7 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts @@ -0,0 +1,31 @@ +export = DirFlat; +/** + * @typedef {import('./types').ImporterOptions} ImporterOptions + * @typedef {import('./types').ImportResult} ImportResult + * @typedef {import('./types').InProgressImportResult} InProgressImportResult + * @typedef {import('./types').BlockAPI} BlockAPI + * @typedef {import('./dir').DirProps} DirProps + * @typedef {import('@ipld/dag-pb').PBNode} PBNode + * @typedef {import('@ipld/dag-pb').PBLink} PBLink + */ +declare class DirFlat extends Dir { + /** @type {{ [key: string]: InProgressImportResult | Dir }} */ + _children: { + [key: string]: import("./types").InProgressImportResult | Dir; + }; + childCount(): number; + directChildrenCount(): number; + onlyChild(): import("./types").InProgressImportResult | Dir; +} +declare namespace DirFlat { + export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, DirProps, PBNode, PBLink }; +} +import Dir = require("./dir"); +type ImporterOptions = import('./types').ImporterOptions; +type ImportResult = import('./types').ImportResult; +type InProgressImportResult = import('./types').InProgressImportResult; +type BlockAPI = import('./types').BlockAPI; +type DirProps = import('./dir').DirProps; +type PBNode = import('@ipld/dag-pb').PBNode; +type PBLink = import('@ipld/dag-pb').PBLink; +//# sourceMappingURL=dir-flat.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map new file mode 100644 index 00000000..7b35660b --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dir-flat.d.ts","sourceRoot":"","sources":["../../src/dir-flat.js"],"names":[],"mappings":";AAOA;;;;;;;;GAQG;AAEH;IAQI,8DAA8D;IAC9D;;MAAmB;IAqBrB,qBAEC;IAED,8BAEC;IAED,4DAEC;CAuEF;;;;;uBAxHY,OAAO,SAAS,EAAE,eAAe;oBACjC,OAAO,SAAS,EAAE,YAAY;8BAC9B,OAAO,SAAS,EAAE,sBAAsB;gBACxC,OAAO,SAAS,EAAE,QAAQ;gBAC1B,OAAO,OAAO,EAAE,QAAQ;cACxB,OAAO,cAAc,EAAE,MAAM;cAC7B,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts new file mode 100644 index 00000000..cfdaee94 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts @@ -0,0 +1,28 @@ +export = DirSharded; +/** + * @typedef {import('./types').ImporterOptions} ImporterOptions + * @typedef {import('./types').ImportResult} ImportResult + * @typedef {import('./types').InProgressImportResult} InProgressImportResult + * @typedef {import('./types').BlockAPI} BlockAPI + */ +/** + * @typedef {import('./dir').DirProps} DirProps + */ +declare class DirSharded extends Dir { + /** @type {Bucket} */ + _bucket: Bucket; + childCount(): number; + directChildrenCount(): number; + onlyChild(): Bucket | Bucket.BucketChild; +} +declare namespace DirSharded { + export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, DirProps }; +} +import Dir = require("./dir"); +import { Bucket } from "hamt-sharding"; +type InProgressImportResult = import('./types').InProgressImportResult; +type ImporterOptions = import('./types').ImporterOptions; +type ImportResult = import('./types').ImportResult; +type BlockAPI = import('./types').BlockAPI; +type DirProps = import('./dir').DirProps; +//# sourceMappingURL=dir-sharded.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map new file mode 100644 index 00000000..885d2704 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dir-sharded.d.ts","sourceRoot":"","sources":["../../src/dir-sharded.js"],"names":[],"mappings":";AAQA;;;;;GAKG;AAEH;;GAEG;AAEH;IAQI,mDAAmD;IACnD,SADW,OAAO,sBAAsB,GAAG,GAAG,CAAC,CAI7C;IAkBJ,qBAEC;IAED,8BAEC;IAED,yIAEC;CAuBF;;;;;;8BAvEY,OAAO,SAAS,EAAE,sBAAsB;uBAFxC,OAAO,SAAS,EAAE,eAAe;oBACjC,OAAO,SAAS,EAAE,YAAY;gBAE9B,OAAO,SAAS,EAAE,QAAQ;gBAI1B,OAAO,OAAO,EAAE,QAAQ"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts new file mode 100644 index 00000000..088f7c31 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts @@ -0,0 +1,85 @@ +export = Dir; +/** + * @typedef {import('./types').ImporterOptions} ImporterOptions + * @typedef {import('./types').ImportResult} ImportResult + * @typedef {import('./types').InProgressImportResult} InProgressImportResult + * @typedef {import('./types').BlockAPI} BlockAPI + * @typedef {import('multiformats/cid').CID} CID + * @typedef {object} DirProps + * @property {boolean} root + * @property {boolean} dir + * @property {string} path + * @property {boolean} dirty + * @property {boolean} flat + * @property {Dir} [parent] + * @property {string} [parentKey] + * @property {import('ipfs-unixfs').UnixFS} [unixfs] + * @property {number} [mode] + * @property {import('ipfs-unixfs').Mtime} [mtime] + */ +declare class Dir { + /** + * + * @param {DirProps} props + * @param {ImporterOptions} options + */ + constructor(props: DirProps, options: ImporterOptions); + options: import("./types").ImporterOptions; + root: boolean; + dir: boolean; + path: string; + dirty: boolean; + flat: boolean; + parent: import("./dir") | undefined; + parentKey: string | undefined; + unixfs: import("ipfs-unixfs").UnixFS | undefined; + mode: number | undefined; + mtime: any; + /** @type {CID | undefined} */ + cid: CID | undefined; + /** @type {number | undefined} */ + size: number | undefined; + /** + * @param {string} name + * @param {InProgressImportResult | Dir} value + */ + put(name: string, value: InProgressImportResult | Dir): Promise; + /** + * @param {string} name + * @returns {Promise} + */ + get(name: string): Promise; + /** + * @returns {AsyncIterable<{ key: string, child: InProgressImportResult | Dir}>} + */ + eachChildSeries(): AsyncIterable<{ + key: string; + child: InProgressImportResult | Dir; + }>; + /** + * @param {BlockAPI} block + * @returns {AsyncIterable} + */ + flush(block: BlockAPI): AsyncIterable; +} +declare namespace Dir { + export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, CID, DirProps }; +} +type CID = import('multiformats/cid').CID; +type InProgressImportResult = import('./types').InProgressImportResult; +type BlockAPI = import('./types').BlockAPI; +type ImportResult = import('./types').ImportResult; +type DirProps = { + root: boolean; + dir: boolean; + path: string; + dirty: boolean; + flat: boolean; + parent?: import("./dir") | undefined; + parentKey?: string | undefined; + unixfs?: import("ipfs-unixfs").UnixFS | undefined; + mode?: number | undefined; + mtime?: any; +}; +type ImporterOptions = import('./types').ImporterOptions; +//# sourceMappingURL=dir.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map new file mode 100644 index 00000000..054a7216 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;OAIG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,oCAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB,WAAwB;IAExB,8BAA8B;IAC9B,KADW,GAAG,GAAG,SAAS,CACN;IACpB,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACR;IAGvB;;;OAGG;IACH,UAHW,MAAM,SACN,sBAAsB,GAAG,GAAG,iBAEZ;IAE3B;;;OAGG;IACH,UAHW,MAAM,GACJ,QAAQ,sBAAsB,GAAG,GAAG,GAAG,SAAS,CAAC,CAI7D;IAED;;OAEG;IACH,mBAFa,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAA;KAAC,CAAC,CAEjD;IAE9B;;;OAGG;IACH,aAHW,QAAQ,GACN,cAAc,YAAY,CAAC,CAEf;CAC1B;;;;WA/DY,OAAO,kBAAkB,EAAE,GAAG;8BAF9B,OAAO,SAAS,EAAE,sBAAsB;gBACxC,OAAO,SAAS,EAAE,QAAQ;oBAF1B,OAAO,SAAS,EAAE,YAAY;;UAK7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;uBAVR,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts new file mode 100644 index 00000000..02dfe981 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts @@ -0,0 +1,6 @@ +declare function _exports(child: Dir | null, dir: Dir, threshold: number, options: ImporterOptions): Promise; +export = _exports; +export type Dir = import('./dir'); +export type ImporterOptions = import('./types').ImporterOptions; +import DirSharded = require("./dir-sharded"); +//# sourceMappingURL=flat-to-shard.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map new file mode 100644 index 00000000..30a3a53b --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"flat-to-shard.d.ts","sourceRoot":"","sources":["../../src/flat-to-shard.js"],"names":[],"mappings":"AAiBiB,iCANN,GAAG,GAAG,IAAI,OACV,GAAG,aACH,MAAM,WACN,eAAe,GACb,QAAQ,UAAU,CAAC,CA6B/B;;kBAtCY,OAAO,OAAO,CAAC;8BACf,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/index.d.ts new file mode 100644 index 00000000..0f654835 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/index.d.ts @@ -0,0 +1,43 @@ +export type BlockAPI = import('./types').BlockAPI; +export type ImportCandidate = import('./types').ImportCandidate; +export type UserImporterOptions = import('./types').UserImporterOptions; +export type ImporterOptions = import('./types').ImporterOptions; +export type Directory = import('./types').Directory; +export type File = import('./types').File; +export type ImportResult = import('./types').ImportResult; +export type Chunker = import('./types').Chunker; +export type DAGBuilder = import('./types').DAGBuilder; +export type TreeBuilder = import('./types').TreeBuilder; +export type BufferImporter = import('./types').BufferImporter; +export type ChunkValidator = import('./types').ChunkValidator; +export type Reducer = import('./types').Reducer; +export type ProgressHandler = import('./types').ProgressHandler; +/** + * @typedef {import('./types').BlockAPI} BlockAPI + * @typedef {import('./types').ImportCandidate} ImportCandidate + * @typedef {import('./types').UserImporterOptions} UserImporterOptions + * @typedef {import('./types').ImporterOptions} ImporterOptions + * @typedef {import('./types').Directory} Directory + * @typedef {import('./types').File} File + * @typedef {import('./types').ImportResult} ImportResult + * + * @typedef {import('./types').Chunker} Chunker + * @typedef {import('./types').DAGBuilder} DAGBuilder + * @typedef {import('./types').TreeBuilder} TreeBuilder + * @typedef {import('./types').BufferImporter} BufferImporter + * @typedef {import('./types').ChunkValidator} ChunkValidator + * @typedef {import('./types').Reducer} Reducer + * @typedef {import('./types').ProgressHandler} ProgressHandler + */ +/** + * @param {AsyncIterable | Iterable | ImportCandidate} source + * @param {BlockAPI} block + * @param {UserImporterOptions} options + */ +export function importer(source: AsyncIterable | Iterable | ImportCandidate, block: BlockAPI, options?: UserImporterOptions): AsyncGenerator<{ + cid: import("multiformats/cid").CID; + path: string | undefined; + unixfs: import("ipfs-unixfs").UnixFS | undefined; + size: number; +}, void, unknown>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map new file mode 100644 index 00000000..6a5777a2 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"uBAMa,OAAO,SAAS,EAAE,QAAQ;8BAC1B,OAAO,SAAS,EAAE,eAAe;kCACjC,OAAO,SAAS,EAAE,mBAAmB;8BACrC,OAAO,SAAS,EAAE,eAAe;wBACjC,OAAO,SAAS,EAAE,SAAS;mBAC3B,OAAO,SAAS,EAAE,IAAI;2BACtB,OAAO,SAAS,EAAE,YAAY;sBAE9B,OAAO,SAAS,EAAE,OAAO;yBACzB,OAAO,SAAS,EAAE,UAAU;0BAC5B,OAAO,SAAS,EAAE,WAAW;6BAC7B,OAAO,SAAS,EAAE,cAAc;6BAChC,OAAO,SAAS,EAAE,cAAc;sBAChC,OAAO,SAAS,EAAE,OAAO;8BACzB,OAAO,SAAS,EAAE,eAAe;AAf9C;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,iCAJW,cAAc,eAAe,CAAC,GAAG,SAAS,eAAe,CAAC,GAAG,eAAe,SAC5E,QAAQ,YACR,mBAAmB;;;;;kBAwC7B"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/options.d.ts b/packages/ipfs-unixfs-importer/dist/src/options.d.ts new file mode 100644 index 00000000..6f391813 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/options.d.ts @@ -0,0 +1,5 @@ +declare function _exports(options?: UserImporterOptions): ImporterOptions; +export = _exports; +export type UserImporterOptions = import('./types').UserImporterOptions; +export type ImporterOptions = import('./types').ImporterOptions; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map new file mode 100644 index 00000000..c9e50ba1 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.js"],"names":[],"mappings":"AAwEiB,oCAHN,mBAAmB,GACjB,eAAe,CAI3B;;kCA9CY,OAAO,SAAS,EAAE,mBAAmB;8BACrC,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts new file mode 100644 index 00000000..8f654459 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts @@ -0,0 +1,14 @@ +export = treeBuilder; +/** + * @type {TreeBuilder} + */ +declare function treeBuilder(source: AsyncIterable, block: import("./types").BlockAPI, options: import("./types").ImporterOptions): AsyncIterable; +declare namespace treeBuilder { + export { ImportResult, InProgressImportResult, ImporterOptions, BlockAPI, TreeBuilder }; +} +type ImportResult = import('./types').ImportResult; +type InProgressImportResult = import('./types').InProgressImportResult; +type ImporterOptions = import('./types').ImporterOptions; +type BlockAPI = import('./types').BlockAPI; +type TreeBuilder = (source: AsyncIterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable; +//# sourceMappingURL=tree-builder.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map new file mode 100644 index 00000000..c9dd22ca --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/tree-builder.js"],"names":[],"mappings":";AAiFA;;GAEG;AACH,4NAiCC;;;;oBA7GY,OAAO,SAAS,EAAE,YAAY;8BAC9B,OAAO,SAAS,EAAE,sBAAsB;uBACxC,OAAO,SAAS,EAAE,eAAe;gBACjC,OAAO,SAAS,EAAE,QAAQ;4BACjB,cAAc,sBAAsB,CAAC,SAAS,QAAQ,WAAW,eAAe,KAAK,cAAc,YAAY,CAAC"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/types.d.ts b/packages/ipfs-unixfs-importer/dist/src/types.d.ts new file mode 100644 index 00000000..2d32eefd --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/types.d.ts @@ -0,0 +1,167 @@ +import { UnixFS, Mtime } from 'ipfs-unixfs' +import { CID } from 'multiformats/cid' +import { HashName } from 'multihashes' +import { CodecName } from 'multicodec' +import MultihashDigest from 'multiformats/hashes/hasher' + +interface ImportCandidate { + path?: string + content?: AsyncIterable + mtime?: Mtime + mode?: number +} + +interface File { + content: AsyncIterable + path?: string + mtime?: Mtime + mode?: number +} + +interface Directory { + path?: string + mtime?: Mtime + mode?: number +} + +interface ImportResult { + cid: CID + size: number + path?: string + unixfs?: UnixFS +} + +interface InProgressImportResult extends ImportResult { + single?: boolean +} + +type ChunkerType = 'fixed' | 'rabin' +type ProgressHandler = (chunkSize: number, path?: string) => void +type HamtHashFn = (value: Uint8Array) => Promise +type Chunker = (source: AsyncIterable, options: ImporterOptions) => AsyncIterable +type DAGBuilder = (source: AsyncIterable | Iterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable<() => Promise> +type TreeBuilder = (source: AsyncIterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable +type BufferImporter = (file: File, block: BlockAPI, options: ImporterOptions) => AsyncIterable<() => Promise> +type ChunkValidator = (source: AsyncIterable, options: ImporterOptions) => AsyncIterable +type UnixFSV1DagBuilder = (item: T, block: BlockAPI, options: ImporterOptions) => Promise +type Reducer = (leaves: InProgressImportResult[]) => Promise + +type FileDAGBuilder = (source: AsyncIterable | Iterable, reducer: Reducer, options: ImporterOptions) => Promise + +interface UserImporterOptions { + strategy?: 'balanced' | 'flat' | 'trickle' + rawLeaves?: boolean + onlyHash?: boolean + reduceSingleLeafToSelf?: boolean + hasher?: MultihashDigest + leafType?: 'file' | 'raw' + cidVersion?: CIDVersion + progress?: ProgressHandler + shardSplitThreshold?: number + fileImportConcurrency?: number + blockWriteConcurrency?: number + minChunkSize?: number + maxChunkSize?: number + avgChunkSize?: number + window?: number + polynomial?: number + maxChildrenPerNode?: number + layerRepeat?: number + wrapWithDirectory?: boolean + pin?: boolean + recursive?: boolean + hidden?: boolean + preload?: boolean + timeout?: number + hamtHashFn?: HamtHashFn + hamtBucketBits?: number + hamtHashCode?: number + chunker?: ChunkerType | Chunker + dagBuilder?: DAGBuilder + treeBuilder?: TreeBuilder + bufferImporter?: BufferImporter + chunkValidator?: ChunkValidator +} + +interface ImporterOptions { + strategy: 'balanced' | 'flat' | 'trickle' + rawLeaves: boolean + onlyHash: boolean + reduceSingleLeafToSelf: boolean + hasher: MultihashDigest + leafType: 'file' | 'raw' + cidVersion: CIDVersion + progress: ProgressHandler + shardSplitThreshold: number + fileImportConcurrency: number + blockWriteConcurrency: number + minChunkSize: number + maxChunkSize: number + avgChunkSize: number + window: number + polynomial: number + maxChildrenPerNode: number + layerRepeat: number + wrapWithDirectory: boolean + pin: boolean + recursive: boolean + hidden: boolean + preload: boolean + timeout?: number + hamtHashFn: HamtHashFn + hamtBucketBits: number + hamtHashCode: number + chunker: ChunkerType | Chunker + dagBuilder?: DAGBuilder + treeBuilder?: TreeBuilder + bufferImporter?: BufferImporter + chunkValidator?: ChunkValidator +} + +export interface TrickleDagNode { + children: InProgressImportResult[], + depth: number, + maxDepth: number, + maxChildren: number, + data?: InProgressImportResult[], + parent?: TrickleDagNode + cid?: CID, + size?: number, + unixfs?: UnixFS +} + +export interface PersistOptions { + //codec?: string + codec?: number + cidVersion: CIDVersion + hasher: MultihashDigest + onlyHash: boolean + preload?: boolean + timeout?: number + signal?: AbortSignal +} + +// TODO vmx 2021-03-24: decide where to put this +export interface Block { + cid: CID + bytes: Uint8Array +} + +// TODO: remove this and get from core-ipfs-types +export interface BlockAPI { + get: (cid: CID, options?: BlockOptions) => Promise + put: (block: Block, options?: PutOptions) => Promise +} + +// TODO: remove this and get from core-ipfs-types +export interface BlockOptions { + signal?: AbortSignal + timeout?: number + preload?: boolean +} + +// TODO: remove this and get from core-ipfs-types +export interface PutOptions extends BlockOptions { + onlyHash?: boolean + pin?: boolean +} diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts new file mode 100644 index 00000000..29e94370 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts @@ -0,0 +1,9 @@ +export = persist; +/** + * @param {Uint8Array} buffer + * @param {import('../types').BlockAPI} block + * @param {import('../types').PersistOptions} options + */ +declare function persist(buffer: Uint8Array, block: import('../types').BlockAPI, options: import('../types').PersistOptions): Promise; +import { CID } from "multiformats/cid"; +//# sourceMappingURL=persist.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map new file mode 100644 index 00000000..b45eeb7c --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/utils/persist.js"],"names":[],"mappings":";AAKA;;;;GAIG;AACH,iCAJW,UAAU,SACV,OAAO,UAAU,EAAE,QAAQ,WAC3B,OAAO,UAAU,EAAE,cAAc,gBA+B3C"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts new file mode 100644 index 00000000..0888cc82 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts @@ -0,0 +1,3 @@ +export = toPathComponents; +declare function toPathComponents(path?: string): string[]; +//# sourceMappingURL=to-path-components.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map new file mode 100644 index 00000000..e1370932 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"to-path-components.d.ts","sourceRoot":"","sources":["../../../src/utils/to-path-components.js"],"names":[],"mappings":";AAEA,2DAMC"} \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/src/index.d.ts b/packages/ipfs-unixfs/dist/src/index.d.ts new file mode 100644 index 00000000..02e4ff88 --- /dev/null +++ b/packages/ipfs-unixfs/dist/src/index.d.ts @@ -0,0 +1,73 @@ +export type Mtime = import('./types').Mtime; +export type MtimeLike = import('./types').MtimeLike; +declare class Data { + /** + * Decode from protobuf https://github.com/ipfs/specs/blob/master/UNIXFS.md + * + * @param {Uint8Array} marshaled + */ + static unmarshal(marshaled: Uint8Array): Data; + /** + * @param {object} [options] + * @param {string} [options.type='file'] + * @param {Uint8Array} [options.data] + * @param {number[]} [options.blockSizes] + * @param {number} [options.hashType] + * @param {number} [options.fanout] + * @param {MtimeLike | null} [options.mtime] + * @param {number | string} [options.mode] + */ + constructor(options?: { + type?: string | undefined; + data?: Uint8Array | undefined; + blockSizes?: number[] | undefined; + hashType?: number | undefined; + fanout?: number | undefined; + mtime?: import("./types").MtimeLike | null | undefined; + mode?: string | number | undefined; + } | undefined); + type: string; + data: Uint8Array | undefined; + hashType: number | undefined; + fanout: number | undefined; + /** @type {number[]} */ + blockSizes: number[]; + _originalMode: number; + /** + * @param {number | undefined} mode + */ + set mode(arg: number | undefined); + /** + * @returns {number | undefined} + */ + get mode(): number | undefined; + mtime: import("./types").Mtime | undefined; + _mode: number | undefined; + isDirectory(): boolean; + /** + * @param {number} size + */ + addBlockSize(size: number): void; + /** + * @param {number} index + */ + removeBlockSize(index: number): void; + /** + * Returns `0` for directories or `data.length + sum(blockSizes)` for everything else + */ + fileSize(): number; + /** + * encode to protobuf Uint8Array + */ + marshal(): Uint8Array; +} +/** + * @param {string | number | undefined} [mode] + */ +export function parseMode(mode?: string | number | undefined): number | undefined; +/** + * @param {any} input + */ +export function parseMtime(input: any): import("./types").Mtime | undefined; +export { Data as UnixFS }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/src/index.d.ts.map b/packages/ipfs-unixfs/dist/src/index.d.ts.map new file mode 100644 index 00000000..7f8672a2 --- /dev/null +++ b/packages/ipfs-unixfs/dist/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"oBAQa,OAAO,SAAS,EAAE,KAAK;wBACvB,OAAO,SAAS,EAAE,SAAS;AAmHxC;IACE;;;;OAIG;IACH,4BAFW,UAAU,QA4BpB;IAED;;;;;;;;;OASG;IACH;;;;;;;;mBAkCC;IAjBC,aAA0B;IAC1B,6BAAgB;IAChB,6BAAwB;IACxB,2BAAoB;IAEpB,uBAAuB;IACvB,YADW,MAAM,EAAE,CACe;IAClC,sBAAsB;IAYxB;;OAEG;IACH,kCAQC;IAED;;OAEG;IACH,+BAEC;IA1BG,2CAA8B;IAYhC,0BAA4E;IAgB9E,uBAEC;IAED;;OAEG;IACH,mBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,uBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,mBAgBC;IAED;;OAEG;IACH,sBA+DC;CACF;AA7SD;;GAEG;AACH,iCAFW,MAAM,GAAG,MAAM,GAAG,SAAS,sBAoBrC;AAED;;GAEG;AACH,kCAFW,GAAG,uCAqEb"} \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/src/types.d.ts b/packages/ipfs-unixfs/dist/src/types.d.ts new file mode 100644 index 00000000..cedc5057 --- /dev/null +++ b/packages/ipfs-unixfs/dist/src/types.d.ts @@ -0,0 +1,7 @@ + +export interface Mtime { + secs: number + nsecs?: number +} + +export type MtimeLike = Mtime | { Seconds: number, FractionalNanoseconds?: number } | [number, number] | Date diff --git a/packages/ipfs-unixfs/dist/src/unixfs.d.ts b/packages/ipfs-unixfs/dist/src/unixfs.d.ts new file mode 100644 index 00000000..ca5a8549 --- /dev/null +++ b/packages/ipfs-unixfs/dist/src/unixfs.d.ts @@ -0,0 +1,238 @@ +import * as $protobuf from "protobufjs"; +/** Properties of a Data. */ +export interface IData { + + /** Data Type */ + Type: Data.DataType; + + /** Data Data */ + Data?: (Uint8Array|null); + + /** Data filesize */ + filesize?: (number|null); + + /** Data blocksizes */ + blocksizes?: (number[]|null); + + /** Data hashType */ + hashType?: (number|null); + + /** Data fanout */ + fanout?: (number|null); + + /** Data mode */ + mode?: (number|null); + + /** Data mtime */ + mtime?: (IUnixTime|null); +} + +/** Represents a Data. */ +export class Data implements IData { + + /** + * Constructs a new Data. + * @param [p] Properties to set + */ + constructor(p?: IData); + + /** Data Type. */ + public Type: Data.DataType; + + /** Data Data. */ + public Data: Uint8Array; + + /** Data filesize. */ + public filesize: number; + + /** Data blocksizes. */ + public blocksizes: number[]; + + /** Data hashType. */ + public hashType: number; + + /** Data fanout. */ + public fanout: number; + + /** Data mode. */ + public mode: number; + + /** Data mtime. */ + public mtime?: (IUnixTime|null); + + /** + * Encodes the specified Data message. Does not implicitly {@link Data.verify|verify} messages. + * @param m Data message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: IData, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Data message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): Data; + + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @param d Plain object + * @returns Data + */ + public static fromObject(d: { [k: string]: any }): Data; + + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @param m Data + * @param [o] Conversion options + * @returns Plain object + */ + public static toObject(m: Data, o?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Data to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; +} + +export namespace Data { + + /** DataType enum. */ + enum DataType { + Raw = 0, + Directory = 1, + File = 2, + Metadata = 3, + Symlink = 4, + HAMTShard = 5 + } +} + +/** Properties of an UnixTime. */ +export interface IUnixTime { + + /** UnixTime Seconds */ + Seconds: number; + + /** UnixTime FractionalNanoseconds */ + FractionalNanoseconds?: (number|null); +} + +/** Represents an UnixTime. */ +export class UnixTime implements IUnixTime { + + /** + * Constructs a new UnixTime. + * @param [p] Properties to set + */ + constructor(p?: IUnixTime); + + /** UnixTime Seconds. */ + public Seconds: number; + + /** UnixTime FractionalNanoseconds. */ + public FractionalNanoseconds: number; + + /** + * Encodes the specified UnixTime message. Does not implicitly {@link UnixTime.verify|verify} messages. + * @param m UnixTime message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: IUnixTime, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnixTime message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns UnixTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): UnixTime; + + /** + * Creates an UnixTime message from a plain object. Also converts values to their respective internal types. + * @param d Plain object + * @returns UnixTime + */ + public static fromObject(d: { [k: string]: any }): UnixTime; + + /** + * Creates a plain object from an UnixTime message. Also converts values to other types if specified. + * @param m UnixTime + * @param [o] Conversion options + * @returns Plain object + */ + public static toObject(m: UnixTime, o?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnixTime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; +} + +/** Properties of a Metadata. */ +export interface IMetadata { + + /** Metadata MimeType */ + MimeType?: (string|null); +} + +/** Represents a Metadata. */ +export class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [p] Properties to set + */ + constructor(p?: IMetadata); + + /** Metadata MimeType. */ + public MimeType: string; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link Metadata.verify|verify} messages. + * @param m Metadata message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: IMetadata, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): Metadata; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param d Plain object + * @returns Metadata + */ + public static fromObject(d: { [k: string]: any }): Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param m Metadata + * @param [o] Conversion options + * @returns Plain object + */ + public static toObject(m: Metadata, o?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; +} diff --git a/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts new file mode 100644 index 00000000..2e4973f1 --- /dev/null +++ b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=unixfs-format.spec.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map new file mode 100644 index 00000000..3fd95c66 --- /dev/null +++ b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"unixfs-format.spec.d.ts","sourceRoot":"","sources":["../../test/unixfs-format.spec.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo b/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo new file mode 100644 index 00000000..c25e7150 --- /dev/null +++ b/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo @@ -0,0 +1,1292 @@ +{ + "program": { + "fileInfos": { + "../../../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895", + "signature": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.d.ts": { + "version": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "signature": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "affectsGlobalScope": false + }, + "../../../node_modules/typescript/lib/lib.es2016.d.ts": { + "version": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "signature": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "affectsGlobalScope": false + }, + "../../../node_modules/typescript/lib/lib.es2017.d.ts": { + "version": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "signature": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "affectsGlobalScope": false + }, + "../../../node_modules/typescript/lib/lib.es2018.d.ts": { + "version": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "signature": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "affectsGlobalScope": false + }, + "../../../node_modules/typescript/lib/lib.es2019.d.ts": { + "version": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "signature": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "affectsGlobalScope": false + }, + "../../../node_modules/typescript/lib/lib.es2020.d.ts": { + "version": "e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940", + "signature": "e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940", + "affectsGlobalScope": false + }, + "../../../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b", + "signature": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.dom.iterable.d.ts": { + "version": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "signature": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.core.d.ts": { + "version": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "signature": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.collection.d.ts": { + "version": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "signature": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.generator.d.ts": { + "version": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "signature": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts": { + "version": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "signature": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.promise.d.ts": { + "version": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "signature": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts": { + "version": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357", + "signature": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts": { + "version": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6", + "signature": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts": { + "version": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "signature": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": { + "version": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "signature": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts": { + "version": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "signature": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2017.object.d.ts": { + "version": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "signature": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": { + "version": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "signature": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2017.string.d.ts": { + "version": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "signature": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2017.intl.d.ts": { + "version": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "signature": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": { + "version": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "signature": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": { + "version": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "signature": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": { + "version": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "signature": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2018.intl.d.ts": { + "version": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "signature": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2018.promise.d.ts": { + "version": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "signature": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts": { + "version": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "signature": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2019.array.d.ts": { + "version": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "signature": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2019.object.d.ts": { + "version": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "signature": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2019.string.d.ts": { + "version": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "signature": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts": { + "version": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "signature": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts": { + "version": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "signature": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2020.promise.d.ts": { + "version": "7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862", + "signature": "7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts": { + "version": "e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40", + "signature": "e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2020.string.d.ts": { + "version": "faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e", + "signature": "faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts": { + "version": "936d7d2e8851af9ccfa5333b15e877a824417d352b1d7fd06388639dc69ef80a", + "signature": "936d7d2e8851af9ccfa5333b15e877a824417d352b1d7fd06388639dc69ef80a", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.es2020.intl.d.ts": { + "version": "e79ca55569f09a5dc3354be04dba4ae85865b1dce98bf46738ffe231c669621f", + "signature": "e79ca55569f09a5dc3354be04dba4ae85865b1dce98bf46738ffe231c669621f", + "affectsGlobalScope": true + }, + "../../../node_modules/typescript/lib/lib.esnext.intl.d.ts": { + "version": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e", + "signature": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e", + "affectsGlobalScope": true + }, + "../../../node_modules/protobufjs/index.d.ts": { + "version": "2d00c5da183a0a701d9a242f775a23606d98ea789bb94303d48e272201204d85", + "signature": "2d00c5da183a0a701d9a242f775a23606d98ea789bb94303d48e272201204d85", + "affectsGlobalScope": false + }, + "../src/unixfs.d.ts": { + "version": "73d05042815b5a14ebaf565ad246e1cc17b9a328d80da339bdd7b40f60f07828", + "signature": "73d05042815b5a14ebaf565ad246e1cc17b9a328d80da339bdd7b40f60f07828", + "affectsGlobalScope": false + }, + "../node_modules/err-code/dist/index.d.ts": { + "version": "a02a19deaa2c497d36c136459dd2561b57ebb22075ac0d6aad176430a8639aa1", + "signature": "a02a19deaa2c497d36c136459dd2561b57ebb22075ac0d6aad176430a8639aa1", + "affectsGlobalScope": false + }, + "../src/types.d.ts": { + "version": "df037a1c4bb54f6aa65f2482a6b1d976b5b3c31d49ea5b7deb10197e0608ae9e", + "signature": "df037a1c4bb54f6aa65f2482a6b1d976b5b3c31d49ea5b7deb10197e0608ae9e", + "affectsGlobalScope": false + }, + "../src/index.js": { + "version": "e6b6c563ab9741f3a6da94ed2e2390b207ec4bf2fe0fd0722df8acfdc930a713", + "signature": "ae7b1240bfe299fcb85712afff404a5b90c533375f4edd4b3c1515aaf1b5631d", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/chai/index.d.ts": { + "version": "e9cf450600c496a87ab96d288157b79be6c193e8623bd93553d5d64755940dea", + "signature": "e9cf450600c496a87ab96d288157b79be6c193e8623bd93553d5d64755940dea", + "affectsGlobalScope": true + }, + "../../../node_modules/aegir/dist/utils/chai.d.ts": { + "version": "ec75f5e20d3603007740d7da648fdaa5129c83d672d96b99fb907c721589a55c", + "signature": "ec75f5e20d3603007740d7da648fdaa5129c83d672d96b99fb907c721589a55c", + "affectsGlobalScope": false + }, + "../../../node_modules/aegir/dist/utils/fixtures.d.ts": { + "version": "a8c10138639ce587acf8a6ce227177a737708fb592705fc0754c12d3a18b5130", + "signature": "a8c10138639ce587acf8a6ce227177a737708fb592705fc0754c12d3a18b5130", + "affectsGlobalScope": false + }, + "../../../node_modules/multibase/src/types.d.ts": { + "version": "40166c5a74c5420962d2f223211c3b99be001a5b60a23828d1c9eb7a768a877f", + "signature": "40166c5a74c5420962d2f223211c3b99be001a5b60a23828d1c9eb7a768a877f", + "affectsGlobalScope": false + }, + "../../../node_modules/uint8arrays/dist/from-string.d.ts": { + "version": "c44e238f0d17834e54b2fc91fbda1f4c42e807e26aaf052ed67a427c5870b963", + "signature": "c44e238f0d17834e54b2fc91fbda1f4c42e807e26aaf052ed67a427c5870b963", + "affectsGlobalScope": false + }, + "../test/unixfs-format.spec.js": { + "version": "c9e3da89b30af692dbc91420a4eb9d0cf6322b8a966d5adb3e868e843cabf084", + "signature": "f40e8bdafdffb90065d371f14774f2f279ec0f96ca7814be66c81f6fe84fcf2c", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/chai-as-promised/index.d.ts": { + "version": "c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2", + "signature": "c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/chai-subset/index.d.ts": { + "version": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", + "signature": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/dirty-chai/index.d.ts": { + "version": "5849dc8dc641e09624b923c5efd78206d48903a68944124051d18ae8117cb475", + "signature": "5849dc8dc641e09624b923c5efd78206d48903a68944124051d18ae8117cb475", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/globals.d.ts": { + "version": "583b4bd4e441916be4bf152ee323c4ffa6e178fd25df2ee2215ef05c7feb5ad4", + "signature": "583b4bd4e441916be4bf152ee323c4ffa6e178fd25df2ee2215ef05c7feb5ad4", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/async_hooks.d.ts": { + "version": "d20f08527645f62facb2d66c2b7bd31ea964b59c897d00bddb1efe8c13890b72", + "signature": "d20f08527645f62facb2d66c2b7bd31ea964b59c897d00bddb1efe8c13890b72", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/buffer.d.ts": { + "version": "5726b5ce952dc5beaeb08d5f64236632501568a54a390363d2339ba1dc5393b1", + "signature": "5726b5ce952dc5beaeb08d5f64236632501568a54a390363d2339ba1dc5393b1", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/child_process.d.ts": { + "version": "674bedbfd2004e233e2a266a3d2286e524f0d58787a98522d834d6ccda1d215a", + "signature": "674bedbfd2004e233e2a266a3d2286e524f0d58787a98522d834d6ccda1d215a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/cluster.d.ts": { + "version": "714637d594e1a38a075091fe464ca91c6abc0b154784b4287f6883200e28ccef", + "signature": "714637d594e1a38a075091fe464ca91c6abc0b154784b4287f6883200e28ccef", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/console.d.ts": { + "version": "23edba5f47d3409810c563fe8034ae2c59e718e1ef8570f4152ccdde1915a096", + "signature": "23edba5f47d3409810c563fe8034ae2c59e718e1ef8570f4152ccdde1915a096", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/constants.d.ts": { + "version": "0e9c55f894ca2d9cf63b5b0d43a8cec1772dd560233fd16275bc7a485eb82f83", + "signature": "0e9c55f894ca2d9cf63b5b0d43a8cec1772dd560233fd16275bc7a485eb82f83", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/crypto.d.ts": { + "version": "d53b352a01645c470a0d8c31bf290ba791fc28ade0ce187a4a50f5c2f826f75e", + "signature": "d53b352a01645c470a0d8c31bf290ba791fc28ade0ce187a4a50f5c2f826f75e", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/dgram.d.ts": { + "version": "5f0a09de75bd965c21dc6d73671ba88830272f9ed62897bb0aa9754b369b1eed", + "signature": "5f0a09de75bd965c21dc6d73671ba88830272f9ed62897bb0aa9754b369b1eed", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/dns.d.ts": { + "version": "2b34e7fcba9e1f24e7f54ba5c8be5a8895b0b8b444ccf6548e04acdee0899317", + "signature": "2b34e7fcba9e1f24e7f54ba5c8be5a8895b0b8b444ccf6548e04acdee0899317", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/domain.d.ts": { + "version": "06d2be99c3dd2ff52114d02ee443ba486ab482423df1941d3c97d6a92e924d70", + "signature": "06d2be99c3dd2ff52114d02ee443ba486ab482423df1941d3c97d6a92e924d70", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/events.d.ts": { + "version": "bfd4f140c07091b5e8a963c89e6fa3f44b6cfcbc11471b465cf63e2d020ad0eb", + "signature": "bfd4f140c07091b5e8a963c89e6fa3f44b6cfcbc11471b465cf63e2d020ad0eb", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/fs.d.ts": { + "version": "a106a0bea088b70879ac88ff606dc253c0cc474ea05ad3a282b8bfb1091ae576", + "signature": "a106a0bea088b70879ac88ff606dc253c0cc474ea05ad3a282b8bfb1091ae576", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/fs/promises.d.ts": { + "version": "c98ce957db9eebd75f53edda3f6893e05ab2d2283b5667b18e31bcdb6427ed10", + "signature": "c98ce957db9eebd75f53edda3f6893e05ab2d2283b5667b18e31bcdb6427ed10", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/http.d.ts": { + "version": "37eed30fc8318b8ac76eac6f41d0758a9d0bffd8f3ff353e3ad0f8717dd08d92", + "signature": "37eed30fc8318b8ac76eac6f41d0758a9d0bffd8f3ff353e3ad0f8717dd08d92", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/http2.d.ts": { + "version": "9aff68f1b847b846d3d50a58c9f8f99389bedd0258d1b1c201f11b97ecfd36f8", + "signature": "9aff68f1b847b846d3d50a58c9f8f99389bedd0258d1b1c201f11b97ecfd36f8", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/https.d.ts": { + "version": "1978992206803f5761e99e893d93b25abc818c5fe619674fdf2ae02b29f641ba", + "signature": "1978992206803f5761e99e893d93b25abc818c5fe619674fdf2ae02b29f641ba", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/inspector.d.ts": { + "version": "05fbe81f09fc455a2c343d2458d2b3c600c90b92b22926be765ee79326be9466", + "signature": "05fbe81f09fc455a2c343d2458d2b3c600c90b92b22926be765ee79326be9466", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/module.d.ts": { + "version": "8e7d6dae9e19bbe47600dcfd4418db85b30ae7351474ea0aad5e628f9845d340", + "signature": "8e7d6dae9e19bbe47600dcfd4418db85b30ae7351474ea0aad5e628f9845d340", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/net.d.ts": { + "version": "f20ea392f7f27feb7a90e5a24319a4e365b07bf83c39a547711fe7ff9df68657", + "signature": "f20ea392f7f27feb7a90e5a24319a4e365b07bf83c39a547711fe7ff9df68657", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/os.d.ts": { + "version": "32542c4660ecda892a333a533feedba31738ee538ef6a78eb73af647137bc3fc", + "signature": "32542c4660ecda892a333a533feedba31738ee538ef6a78eb73af647137bc3fc", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/path.d.ts": { + "version": "0ecacea5047d1a7d350e7049dbd22f26435be5e8736a81a56afec5b3264db1ca", + "signature": "0ecacea5047d1a7d350e7049dbd22f26435be5e8736a81a56afec5b3264db1ca", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/perf_hooks.d.ts": { + "version": "ffcb4ebde21f83370ed402583888b28651d2eb7f05bfec9482eb46d82adedd7f", + "signature": "ffcb4ebde21f83370ed402583888b28651d2eb7f05bfec9482eb46d82adedd7f", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/process.d.ts": { + "version": "fcb95c45150c717706119f12f2a3639d51baa041cd5bb441eb8501e04b52c501", + "signature": "fcb95c45150c717706119f12f2a3639d51baa041cd5bb441eb8501e04b52c501", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/punycode.d.ts": { + "version": "a7b43c69f9602d198825e403ee34e5d64f83c48b391b2897e8c0e6f72bca35f8", + "signature": "a7b43c69f9602d198825e403ee34e5d64f83c48b391b2897e8c0e6f72bca35f8", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/querystring.d.ts": { + "version": "f4a3fc4efc6944e7b7bd4ccfa45e0df68b6359808e6cf9d061f04fd964a7b2d3", + "signature": "f4a3fc4efc6944e7b7bd4ccfa45e0df68b6359808e6cf9d061f04fd964a7b2d3", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/readline.d.ts": { + "version": "73cad675aead7a2c05cf934e7e700c61d84b2037ac1d576c3f751199b25331da", + "signature": "73cad675aead7a2c05cf934e7e700c61d84b2037ac1d576c3f751199b25331da", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/repl.d.ts": { + "version": "8c3137ba3583ec18484429ec1c8eff89efdc42730542f157b38b102fdccc0c71", + "signature": "8c3137ba3583ec18484429ec1c8eff89efdc42730542f157b38b102fdccc0c71", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/stream.d.ts": { + "version": "74594bec8a9fa1a2cd40268f9ab95d0c44b6080345da6e8b913939d19b1d57ae", + "signature": "74594bec8a9fa1a2cd40268f9ab95d0c44b6080345da6e8b913939d19b1d57ae", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/string_decoder.d.ts": { + "version": "94ca7beec4e274d32362b54e0133152f7b4be9487db7b005070c03880b6363aa", + "signature": "94ca7beec4e274d32362b54e0133152f7b4be9487db7b005070c03880b6363aa", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/timers.d.ts": { + "version": "2d713cbcbd5bcc38d91546eaeea7bb1c8686dc4a2995a28556d957b1b9de11d9", + "signature": "2d713cbcbd5bcc38d91546eaeea7bb1c8686dc4a2995a28556d957b1b9de11d9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/tls.d.ts": { + "version": "bbf21f210782db4193359010a4710786add43e3b50aa42fc0d371f45b4e4d8d3", + "signature": "bbf21f210782db4193359010a4710786add43e3b50aa42fc0d371f45b4e4d8d3", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/trace_events.d.ts": { + "version": "0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a", + "signature": "0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/tty.d.ts": { + "version": "3ce933f0c3955f67f67eb7d6b5c83c2c54a18472c1d6f2bb651e51dd40c84837", + "signature": "3ce933f0c3955f67f67eb7d6b5c83c2c54a18472c1d6f2bb651e51dd40c84837", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/url.d.ts": { + "version": "631e96db896d645f7132c488ad34a16d71fd2be9f44696f8c98289ee1c8cbfa9", + "signature": "631e96db896d645f7132c488ad34a16d71fd2be9f44696f8c98289ee1c8cbfa9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/util.d.ts": { + "version": "2c77230d381cba81eb6f87cda2fbfff6c0427c6546c2e2590110effff37c58f7", + "signature": "2c77230d381cba81eb6f87cda2fbfff6c0427c6546c2e2590110effff37c58f7", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/v8.d.ts": { + "version": "da86ee9a2f09a4583db1d5e37815894967e1f694ad9f3c25e84e0e4d40411e14", + "signature": "da86ee9a2f09a4583db1d5e37815894967e1f694ad9f3c25e84e0e4d40411e14", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/vm.d.ts": { + "version": "141a943e5690105898a67537a470f70b56d0e183441b56051d929e902376b7b2", + "signature": "141a943e5690105898a67537a470f70b56d0e183441b56051d929e902376b7b2", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/worker_threads.d.ts": { + "version": "ddc086b1adac44e2fccf55422da1e90fa970e659d77f99712422a421564b4877", + "signature": "ddc086b1adac44e2fccf55422da1e90fa970e659d77f99712422a421564b4877", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/zlib.d.ts": { + "version": "515ef1d99036ff0dafa5bf738e02222edea94e0d97a0aa0ff277ac5e96b57977", + "signature": "515ef1d99036ff0dafa5bf738e02222edea94e0d97a0aa0ff277ac5e96b57977", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/globals.global.d.ts": { + "version": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "signature": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/wasi.d.ts": { + "version": "780058f4a804c8bdcdd2f60e7af64b2bc57d149c1586ee3db732a84d659a50bf", + "signature": "780058f4a804c8bdcdd2f60e7af64b2bc57d149c1586ee3db732a84d659a50bf", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/ts3.6/base.d.ts": { + "version": "ae68a04912ee5a0f589276f9ec60b095f8c40d48128a4575b3fdd7d93806931c", + "signature": "ae68a04912ee5a0f589276f9ec60b095f8c40d48128a4575b3fdd7d93806931c", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/assert.d.ts": { + "version": "19d580a3b42ad5caeaee266ae958260e23f2df0549ee201c886c8bd7a4f01d4e", + "signature": "19d580a3b42ad5caeaee266ae958260e23f2df0549ee201c886c8bd7a4f01d4e", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/base.d.ts": { + "version": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "signature": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/index.d.ts": { + "version": "9c4c395e927045b324877acdc4bfb95f128f36bc9f073266a2f0342495075a4f", + "signature": "9c4c395e927045b324877acdc4bfb95f128f36bc9f073266a2f0342495075a4f", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/minimatch/index.d.ts": { + "version": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2", + "signature": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/glob/index.d.ts": { + "version": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", + "signature": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/is-windows/index.d.ts": { + "version": "b938f24d3af55eba025debac20bcf2d6a3be6033f1bb41462d6ca7d6c81e0314", + "signature": "b938f24d3af55eba025debac20bcf2d6a3be6033f1bb41462d6ca7d6c81e0314", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts": { + "version": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "signature": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/json-schema/index.d.ts": { + "version": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27", + "signature": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/json5/index.d.ts": { + "version": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538", + "signature": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/long/index.d.ts": { + "version": "e8465811693dfe4e96ef2b3dffda539d6edfe896961b7af37b44db2c0e48532b", + "signature": "e8465811693dfe4e96ef2b3dffda539d6edfe896961b7af37b44db2c0e48532b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/minimist/index.d.ts": { + "version": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", + "signature": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/mocha/index.d.ts": { + "version": "0359800d3b440f8515001431cde1500944e156040577425eb3f7b80af0846612", + "signature": "0359800d3b440f8515001431cde1500944e156040577425eb3f7b80af0846612", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/normalize-package-data/index.d.ts": { + "version": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "signature": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/parse-json/index.d.ts": { + "version": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "signature": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "affectsGlobalScope": false + }, + "../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts": { + "version": "b79a450a5233f10fa43da81c35a17f8eec71fea394d0ff91620819e0af513fe9", + "signature": "b79a450a5233f10fa43da81c35a17f8eec71fea394d0ff91620819e0af513fe9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/sinon/index.d.ts": { + "version": "fc8a86547dc1da127bad3a5c71137b9e8bb9de3c91df12869dd52e3ff2346e61", + "signature": "fc8a86547dc1da127bad3a5c71137b9e8bb9de3c91df12869dd52e3ff2346e61", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/sinonjs__fake-timers/index.d.ts": { + "version": "558a9770503071d5a6fc6c596f7230bb79f2d034ced4a205bd1ebcad3b5879ec", + "signature": "558a9770503071d5a6fc6c596f7230bb79f2d034ced4a205bd1ebcad3b5879ec", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/yargs-parser/index.d.ts": { + "version": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", + "signature": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/yargs/index.d.ts": { + "version": "5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11", + "signature": "5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/yauzl/index.d.ts": { + "version": "3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26", + "signature": "3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26", + "affectsGlobalScope": false + } + }, + "options": { + "strict": true, + "outDir": "./", + "allowJs": true, + "checkJs": true, + "target": 7, + "lib": [ + "lib.es2020.d.ts", + "lib.es2020.promise.d.ts", + "lib.es2020.string.d.ts", + "lib.es2020.bigint.d.ts", + "lib.dom.d.ts", + "lib.dom.iterable.d.ts" + ], + "noEmit": false, + "noEmitOnError": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "incremental": true, + "composite": true, + "isolatedModules": true, + "removeComments": false, + "esModuleInterop": true, + "moduleResolution": 2, + "noImplicitReturns": false, + "noFallthroughCasesInSwitch": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "importsNotUsedAsValues": 2, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true, + "stripInternal": true, + "resolveJsonModule": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../../../node_modules/@types/chai-as-promised/index.d.ts": [ + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/@types/chai-subset/index.d.ts": [ + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/@types/dirty-chai/index.d.ts": [ + "../../../node_modules/@types/chai-as-promised/index.d.ts", + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/@types/glob/index.d.ts": [ + "../../../node_modules/@types/minimatch/index.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/node/assert.d.ts": [ + "../../../node_modules/@types/node/assert.d.ts" + ], + "../../../node_modules/@types/node/async_hooks.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts" + ], + "../../../node_modules/@types/node/base.d.ts": [ + "../../../node_modules/@types/node/assert.d.ts", + "../../../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../../../node_modules/@types/node/buffer.d.ts": [ + "../../../node_modules/@types/node/buffer.d.ts" + ], + "../../../node_modules/@types/node/child_process.d.ts": [ + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/cluster.d.ts": [ + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/cluster.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/console.d.ts": [ + "../../../node_modules/@types/node/util.d.ts" + ], + "../../../node_modules/@types/node/constants.d.ts": [ + "../../../node_modules/@types/node/constants.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/os.d.ts" + ], + "../../../node_modules/@types/node/crypto.d.ts": [ + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/dgram.d.ts": [ + "../../../node_modules/@types/node/dgram.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/dns.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts" + ], + "../../../node_modules/@types/node/domain.d.ts": [ + "../../../node_modules/@types/node/domain.d.ts", + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/events.d.ts": [ + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/fs.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/fs/promises.d.ts": [ + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts" + ], + "../../../node_modules/@types/node/http.d.ts": [ + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/http2.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/http2.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/https.d.ts": [ + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/https.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/index.d.ts": [ + "../../../node_modules/@types/node/base.d.ts" + ], + "../../../node_modules/@types/node/inspector.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/inspector.d.ts" + ], + "../../../node_modules/@types/node/module.d.ts": [ + "../../../node_modules/@types/node/module.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/net.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/os.d.ts": [ + "../../../node_modules/@types/node/os.d.ts" + ], + "../../../node_modules/@types/node/path.d.ts": [ + "../../../node_modules/@types/node/path.d.ts" + ], + "../../../node_modules/@types/node/perf_hooks.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts", + "../../../node_modules/@types/node/perf_hooks.d.ts" + ], + "../../../node_modules/@types/node/process.d.ts": [ + "../../../node_modules/@types/node/tty.d.ts" + ], + "../../../node_modules/@types/node/punycode.d.ts": [ + "../../../node_modules/@types/node/punycode.d.ts" + ], + "../../../node_modules/@types/node/querystring.d.ts": [ + "../../../node_modules/@types/node/querystring.d.ts" + ], + "../../../node_modules/@types/node/readline.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/readline.d.ts" + ], + "../../../node_modules/@types/node/repl.d.ts": [ + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/repl.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/vm.d.ts" + ], + "../../../node_modules/@types/node/stream.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/string_decoder.d.ts": [ + "../../../node_modules/@types/node/string_decoder.d.ts" + ], + "../../../node_modules/@types/node/timers.d.ts": [ + "../../../node_modules/@types/node/timers.d.ts" + ], + "../../../node_modules/@types/node/tls.d.ts": [ + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/tls.d.ts" + ], + "../../../node_modules/@types/node/trace_events.d.ts": [ + "../../../node_modules/@types/node/trace_events.d.ts" + ], + "../../../node_modules/@types/node/ts3.6/base.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts", + "../../../node_modules/@types/node/buffer.d.ts", + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/cluster.d.ts", + "../../../node_modules/@types/node/console.d.ts", + "../../../node_modules/@types/node/constants.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/dgram.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/domain.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/globals.d.ts", + "../../../node_modules/@types/node/globals.global.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/http2.d.ts", + "../../../node_modules/@types/node/https.d.ts", + "../../../node_modules/@types/node/inspector.d.ts", + "../../../node_modules/@types/node/module.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/os.d.ts", + "../../../node_modules/@types/node/path.d.ts", + "../../../node_modules/@types/node/perf_hooks.d.ts", + "../../../node_modules/@types/node/process.d.ts", + "../../../node_modules/@types/node/punycode.d.ts", + "../../../node_modules/@types/node/querystring.d.ts", + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/repl.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/string_decoder.d.ts", + "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/trace_events.d.ts", + "../../../node_modules/@types/node/tty.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/v8.d.ts", + "../../../node_modules/@types/node/vm.d.ts", + "../../../node_modules/@types/node/wasi.d.ts", + "../../../node_modules/@types/node/worker_threads.d.ts", + "../../../node_modules/@types/node/zlib.d.ts" + ], + "../../../node_modules/@types/node/tty.d.ts": [ + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/tty.d.ts" + ], + "../../../node_modules/@types/node/url.d.ts": [ + "../../../node_modules/@types/node/querystring.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/util.d.ts": [ + "../../../node_modules/@types/node/util.d.ts" + ], + "../../../node_modules/@types/node/v8.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/v8.d.ts" + ], + "../../../node_modules/@types/node/vm.d.ts": [ + "../../../node_modules/@types/node/vm.d.ts" + ], + "../../../node_modules/@types/node/wasi.d.ts": [ + "../../../node_modules/@types/node/wasi.d.ts" + ], + "../../../node_modules/@types/node/worker_threads.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/vm.d.ts", + "../../../node_modules/@types/node/worker_threads.d.ts" + ], + "../../../node_modules/@types/node/zlib.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/zlib.d.ts" + ], + "../../../node_modules/@types/sinon/index.d.ts": [ + "../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts" + ], + "../../../node_modules/@types/yargs/index.d.ts": [ + "../../../node_modules/@types/yargs-parser/index.d.ts" + ], + "../../../node_modules/@types/yauzl/index.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/aegir/dist/utils/chai.d.ts": [ + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/uint8arrays/dist/from-string.d.ts": [ + "../../../node_modules/multibase/src/types.d.ts" + ], + "../src/index.js": [ + "../node_modules/err-code/dist/index.d.ts", + "../src/types.d.ts", + "../src/unixfs.d.ts" + ], + "../src/unixfs.d.ts": [ + "../../../node_modules/protobufjs/index.d.ts" + ], + "../test/unixfs-format.spec.js": [ + "../../../node_modules/aegir/dist/utils/chai.d.ts", + "../../../node_modules/aegir/dist/utils/fixtures.d.ts", + "../../../node_modules/uint8arrays/dist/from-string.d.ts", + "../src/index.js", + "../src/unixfs.d.ts" + ] + }, + "exportedModulesMap": { + "../../../node_modules/@types/chai-as-promised/index.d.ts": [ + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/@types/chai-subset/index.d.ts": [ + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/@types/dirty-chai/index.d.ts": [ + "../../../node_modules/@types/chai-as-promised/index.d.ts", + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/@types/glob/index.d.ts": [ + "../../../node_modules/@types/minimatch/index.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/node/assert.d.ts": [ + "../../../node_modules/@types/node/assert.d.ts" + ], + "../../../node_modules/@types/node/async_hooks.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts" + ], + "../../../node_modules/@types/node/base.d.ts": [ + "../../../node_modules/@types/node/assert.d.ts", + "../../../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../../../node_modules/@types/node/buffer.d.ts": [ + "../../../node_modules/@types/node/buffer.d.ts" + ], + "../../../node_modules/@types/node/child_process.d.ts": [ + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/cluster.d.ts": [ + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/cluster.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/console.d.ts": [ + "../../../node_modules/@types/node/util.d.ts" + ], + "../../../node_modules/@types/node/constants.d.ts": [ + "../../../node_modules/@types/node/constants.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/os.d.ts" + ], + "../../../node_modules/@types/node/crypto.d.ts": [ + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/dgram.d.ts": [ + "../../../node_modules/@types/node/dgram.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/dns.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts" + ], + "../../../node_modules/@types/node/domain.d.ts": [ + "../../../node_modules/@types/node/domain.d.ts", + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/events.d.ts": [ + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/fs.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/fs/promises.d.ts": [ + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts" + ], + "../../../node_modules/@types/node/http.d.ts": [ + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/http2.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/http2.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/https.d.ts": [ + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/https.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/index.d.ts": [ + "../../../node_modules/@types/node/base.d.ts" + ], + "../../../node_modules/@types/node/inspector.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/inspector.d.ts" + ], + "../../../node_modules/@types/node/module.d.ts": [ + "../../../node_modules/@types/node/module.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/net.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/os.d.ts": [ + "../../../node_modules/@types/node/os.d.ts" + ], + "../../../node_modules/@types/node/path.d.ts": [ + "../../../node_modules/@types/node/path.d.ts" + ], + "../../../node_modules/@types/node/perf_hooks.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts", + "../../../node_modules/@types/node/perf_hooks.d.ts" + ], + "../../../node_modules/@types/node/process.d.ts": [ + "../../../node_modules/@types/node/tty.d.ts" + ], + "../../../node_modules/@types/node/punycode.d.ts": [ + "../../../node_modules/@types/node/punycode.d.ts" + ], + "../../../node_modules/@types/node/querystring.d.ts": [ + "../../../node_modules/@types/node/querystring.d.ts" + ], + "../../../node_modules/@types/node/readline.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/readline.d.ts" + ], + "../../../node_modules/@types/node/repl.d.ts": [ + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/repl.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/vm.d.ts" + ], + "../../../node_modules/@types/node/stream.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/string_decoder.d.ts": [ + "../../../node_modules/@types/node/string_decoder.d.ts" + ], + "../../../node_modules/@types/node/timers.d.ts": [ + "../../../node_modules/@types/node/timers.d.ts" + ], + "../../../node_modules/@types/node/tls.d.ts": [ + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/tls.d.ts" + ], + "../../../node_modules/@types/node/trace_events.d.ts": [ + "../../../node_modules/@types/node/trace_events.d.ts" + ], + "../../../node_modules/@types/node/ts3.6/base.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts", + "../../../node_modules/@types/node/buffer.d.ts", + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/cluster.d.ts", + "../../../node_modules/@types/node/console.d.ts", + "../../../node_modules/@types/node/constants.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/dgram.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/domain.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/globals.d.ts", + "../../../node_modules/@types/node/globals.global.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/http2.d.ts", + "../../../node_modules/@types/node/https.d.ts", + "../../../node_modules/@types/node/inspector.d.ts", + "../../../node_modules/@types/node/module.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/os.d.ts", + "../../../node_modules/@types/node/path.d.ts", + "../../../node_modules/@types/node/perf_hooks.d.ts", + "../../../node_modules/@types/node/process.d.ts", + "../../../node_modules/@types/node/punycode.d.ts", + "../../../node_modules/@types/node/querystring.d.ts", + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/repl.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/string_decoder.d.ts", + "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/trace_events.d.ts", + "../../../node_modules/@types/node/tty.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/v8.d.ts", + "../../../node_modules/@types/node/vm.d.ts", + "../../../node_modules/@types/node/wasi.d.ts", + "../../../node_modules/@types/node/worker_threads.d.ts", + "../../../node_modules/@types/node/zlib.d.ts" + ], + "../../../node_modules/@types/node/tty.d.ts": [ + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/tty.d.ts" + ], + "../../../node_modules/@types/node/url.d.ts": [ + "../../../node_modules/@types/node/querystring.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/util.d.ts": [ + "../../../node_modules/@types/node/util.d.ts" + ], + "../../../node_modules/@types/node/v8.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/v8.d.ts" + ], + "../../../node_modules/@types/node/vm.d.ts": [ + "../../../node_modules/@types/node/vm.d.ts" + ], + "../../../node_modules/@types/node/wasi.d.ts": [ + "../../../node_modules/@types/node/wasi.d.ts" + ], + "../../../node_modules/@types/node/worker_threads.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/vm.d.ts", + "../../../node_modules/@types/node/worker_threads.d.ts" + ], + "../../../node_modules/@types/node/zlib.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/zlib.d.ts" + ], + "../../../node_modules/@types/sinon/index.d.ts": [ + "../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts" + ], + "../../../node_modules/@types/yargs/index.d.ts": [ + "../../../node_modules/@types/yargs-parser/index.d.ts" + ], + "../../../node_modules/@types/yauzl/index.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/aegir/dist/utils/chai.d.ts": [ + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/uint8arrays/dist/from-string.d.ts": [ + "../../../node_modules/multibase/src/types.d.ts" + ], + "../src/index.js": [ + "../src/types.d.ts" + ], + "../src/unixfs.d.ts": [ + "../../../node_modules/protobufjs/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts", + "../../../node_modules/@types/chai-as-promised/index.d.ts", + "../../../node_modules/@types/chai-subset/index.d.ts", + "../../../node_modules/@types/chai/index.d.ts", + "../../../node_modules/@types/dirty-chai/index.d.ts", + "../../../node_modules/@types/glob/index.d.ts", + "../../../node_modules/@types/is-windows/index.d.ts", + "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts", + "../../../node_modules/@types/json-schema/index.d.ts", + "../../../node_modules/@types/json5/index.d.ts", + "../../../node_modules/@types/long/index.d.ts", + "../../../node_modules/@types/minimatch/index.d.ts", + "../../../node_modules/@types/minimist/index.d.ts", + "../../../node_modules/@types/mocha/index.d.ts", + "../../../node_modules/@types/node/assert.d.ts", + "../../../node_modules/@types/node/async_hooks.d.ts", + "../../../node_modules/@types/node/base.d.ts", + "../../../node_modules/@types/node/buffer.d.ts", + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/cluster.d.ts", + "../../../node_modules/@types/node/console.d.ts", + "../../../node_modules/@types/node/constants.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/dgram.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/domain.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/globals.d.ts", + "../../../node_modules/@types/node/globals.global.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/http2.d.ts", + "../../../node_modules/@types/node/https.d.ts", + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/node/inspector.d.ts", + "../../../node_modules/@types/node/module.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/os.d.ts", + "../../../node_modules/@types/node/path.d.ts", + "../../../node_modules/@types/node/perf_hooks.d.ts", + "../../../node_modules/@types/node/process.d.ts", + "../../../node_modules/@types/node/punycode.d.ts", + "../../../node_modules/@types/node/querystring.d.ts", + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/repl.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/string_decoder.d.ts", + "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/trace_events.d.ts", + "../../../node_modules/@types/node/ts3.6/base.d.ts", + "../../../node_modules/@types/node/tty.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/v8.d.ts", + "../../../node_modules/@types/node/vm.d.ts", + "../../../node_modules/@types/node/wasi.d.ts", + "../../../node_modules/@types/node/worker_threads.d.ts", + "../../../node_modules/@types/node/zlib.d.ts", + "../../../node_modules/@types/normalize-package-data/index.d.ts", + "../../../node_modules/@types/parse-json/index.d.ts", + "../../../node_modules/@types/sinon/index.d.ts", + "../../../node_modules/@types/sinonjs__fake-timers/index.d.ts", + "../../../node_modules/@types/yargs-parser/index.d.ts", + "../../../node_modules/@types/yargs/index.d.ts", + "../../../node_modules/@types/yauzl/index.d.ts", + "../../../node_modules/aegir/dist/utils/chai.d.ts", + "../../../node_modules/aegir/dist/utils/fixtures.d.ts", + "../../../node_modules/multibase/src/types.d.ts", + "../../../node_modules/protobufjs/index.d.ts", + "../../../node_modules/typescript/lib/lib.dom.d.ts", + "../../../node_modules/typescript/lib/lib.dom.iterable.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.collection.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.core.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.generator.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.promise.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "../../../node_modules/typescript/lib/lib.es2016.d.ts", + "../../../node_modules/typescript/lib/lib.es2017.d.ts", + "../../../node_modules/typescript/lib/lib.es2017.intl.d.ts", + "../../../node_modules/typescript/lib/lib.es2017.object.d.ts", + "../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "../../../node_modules/typescript/lib/lib.es2017.string.d.ts", + "../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "../../../node_modules/typescript/lib/lib.es2018.d.ts", + "../../../node_modules/typescript/lib/lib.es2018.intl.d.ts", + "../../../node_modules/typescript/lib/lib.es2018.promise.d.ts", + "../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "../../../node_modules/typescript/lib/lib.es2019.array.d.ts", + "../../../node_modules/typescript/lib/lib.es2019.d.ts", + "../../../node_modules/typescript/lib/lib.es2019.object.d.ts", + "../../../node_modules/typescript/lib/lib.es2019.string.d.ts", + "../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "../../../node_modules/typescript/lib/lib.es2020.d.ts", + "../../../node_modules/typescript/lib/lib.es2020.intl.d.ts", + "../../../node_modules/typescript/lib/lib.es2020.promise.d.ts", + "../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts", + "../../../node_modules/typescript/lib/lib.es2020.string.d.ts", + "../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts", + "../../../node_modules/typescript/lib/lib.es5.d.ts", + "../../../node_modules/typescript/lib/lib.esnext.intl.d.ts", + "../../../node_modules/uint8arrays/dist/from-string.d.ts", + "../node_modules/err-code/dist/index.d.ts", + "../src/index.js", + "../src/types.d.ts", + "../src/unixfs.d.ts", + "../test/unixfs-format.spec.js" + ] + }, + "version": "4.2.3" +} \ No newline at end of file From 856f6de48b3ce8277874c8995d4a8fda1e1666f3 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Tue, 4 May 2021 14:15:03 +0100 Subject: [PATCH 18/22] chore: update deps --- packages/ipfs-unixfs-exporter/package.json | 6 +- .../ipfs-unixfs-importer/dist/src/dir.d.ts | 4 +- .../dist/src/dir.d.ts.map | 2 +- packages/ipfs-unixfs-importer/package.json | 4 +- .../ipfs-unixfs/dist/tsconfig.tsbuildinfo | 206 ++++++++++++------ 5 files changed, 151 insertions(+), 71 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/package.json b/packages/ipfs-unixfs-exporter/package.json index 02d175b6..a9ef0a45 100644 --- a/packages/ipfs-unixfs-exporter/package.json +++ b/packages/ipfs-unixfs-exporter/package.json @@ -56,14 +56,14 @@ "util": "^0.12.3" }, "dependencies": { - "@ipld/dag-cbor": "https://gitpkg.now.sh/ipld/js-dag-cbor/dist?rvagg/esm-ts-build-improvements", - "@ipld/dag-pb": "https://gitpkg.now.sh/ipld/js-dag-pb/dist?rvagg/types", + "@ipld/dag-cbor": "^5.0.0", + "@ipld/dag-pb": "^1.1.0", "err-code": "^3.0.1", "hamt-sharding": "^2.0.0", "ipfs-unixfs": "^4.0.3", "it-last": "^1.0.5", "multicodec": "^3.0.1", - "multiformats": "https://gitpkg.now.sh/multiformats/js-multiformats/dist?rvagg/moar-generic-blockcodec", + "multiformats": "^7.0.0", "multihashing-async": "^2.1.0" }, "types": "dist/src/index.d.ts", diff --git a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts index 088f7c31..b9edc648 100644 --- a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts +++ b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts @@ -34,7 +34,7 @@ declare class Dir { parentKey: string | undefined; unixfs: import("ipfs-unixfs").UnixFS | undefined; mode: number | undefined; - mtime: any; + mtime: import("ipfs-unixfs/dist/src/types").Mtime | undefined; /** @type {CID | undefined} */ cid: CID | undefined; /** @type {number | undefined} */ @@ -79,7 +79,7 @@ type DirProps = { parentKey?: string | undefined; unixfs?: import("ipfs-unixfs").UnixFS | undefined; mode?: number | undefined; - mtime?: any; + mtime?: import("ipfs-unixfs/dist/src/types").Mtime | undefined; }; type ImporterOptions = import('./types').ImporterOptions; //# sourceMappingURL=dir.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map index 054a7216..28399a34 100644 --- a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map +++ b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;OAIG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,oCAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB,WAAwB;IAExB,8BAA8B;IAC9B,KADW,GAAG,GAAG,SAAS,CACN;IACpB,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACR;IAGvB;;;OAGG;IACH,UAHW,MAAM,SACN,sBAAsB,GAAG,GAAG,iBAEZ;IAE3B;;;OAGG;IACH,UAHW,MAAM,GACJ,QAAQ,sBAAsB,GAAG,GAAG,GAAG,SAAS,CAAC,CAI7D;IAED;;OAEG;IACH,mBAFa,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAA;KAAC,CAAC,CAEjD;IAE9B;;;OAGG;IACH,aAHW,QAAQ,GACN,cAAc,YAAY,CAAC,CAEf;CAC1B;;;;WA/DY,OAAO,kBAAkB,EAAE,GAAG;8BAF9B,OAAO,SAAS,EAAE,sBAAsB;gBACxC,OAAO,SAAS,EAAE,QAAQ;oBAF1B,OAAO,SAAS,EAAE,YAAY;;UAK7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;uBAVR,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file +{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;OAIG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,oCAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB,8DAAwB;IAExB,8BAA8B;IAC9B,KADW,GAAG,GAAG,SAAS,CACN;IACpB,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACR;IAGvB;;;OAGG;IACH,UAHW,MAAM,SACN,sBAAsB,GAAG,GAAG,iBAEZ;IAE3B;;;OAGG;IACH,UAHW,MAAM,GACJ,QAAQ,sBAAsB,GAAG,GAAG,GAAG,SAAS,CAAC,CAI7D;IAED;;OAEG;IACH,mBAFa,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAA;KAAC,CAAC,CAEjD;IAE9B;;;OAGG;IACH,aAHW,QAAQ,GACN,cAAc,YAAY,CAAC,CAEf;CAC1B;;;;WA/DY,OAAO,kBAAkB,EAAE,GAAG;8BAF9B,OAAO,SAAS,EAAE,sBAAsB;gBACxC,OAAO,SAAS,EAAE,QAAQ;oBAF1B,OAAO,SAAS,EAAE,YAAY;;UAK7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;uBAVR,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/package.json b/packages/ipfs-unixfs-importer/package.json index 403e315b..f69b80f0 100644 --- a/packages/ipfs-unixfs-importer/package.json +++ b/packages/ipfs-unixfs-importer/package.json @@ -46,7 +46,7 @@ "util": "^0.12.3" }, "dependencies": { - "@ipld/dag-pb": "https://gitpkg.now.sh/ipld/js-dag-pb/dist?rvagg/types", + "@ipld/dag-pb": "^1.1.0", "bl": "^5.0.0", "err-code": "^3.0.1", "hamt-sharding": "^2.0.0", @@ -57,7 +57,7 @@ "it-parallel-batch": "^1.0.9", "merge-options": "^3.0.4", "multicodec": "^3.0.1", - "multiformats": "https://gitpkg.now.sh/multiformats/js-multiformats/dist?rvagg/moar-generic-blockcodec", + "multiformats": "^7.0.0", "multihashing-async": "^2.1.0", "rabin-wasm": "^0.1.4", "uint8arrays": "^2.1.2" diff --git a/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo b/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo index c25e7150..f5cb3ae4 100644 --- a/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo +++ b/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo @@ -202,8 +202,8 @@ "affectsGlobalScope": true }, "../../../node_modules/protobufjs/index.d.ts": { - "version": "2d00c5da183a0a701d9a242f775a23606d98ea789bb94303d48e272201204d85", - "signature": "2d00c5da183a0a701d9a242f775a23606d98ea789bb94303d48e272201204d85", + "version": "1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da", + "signature": "1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da", "affectsGlobalScope": false }, "../src/unixfs.d.ts": { @@ -227,13 +227,33 @@ "affectsGlobalScope": true }, "../../../node_modules/@types/chai/index.d.ts": { - "version": "e9cf450600c496a87ab96d288157b79be6c193e8623bd93553d5d64755940dea", - "signature": "e9cf450600c496a87ab96d288157b79be6c193e8623bd93553d5d64755940dea", + "version": "dc45d3b40fe1c20d7823e179b8e41530ae32c221e0e4d759397f110647d8d566", + "signature": "dc45d3b40fe1c20d7823e179b8e41530ae32c221e0e4d759397f110647d8d566", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/chai-as-promised/index.d.ts": { + "version": "c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2", + "signature": "c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2", + "affectsGlobalScope": true + }, + "../../../node_modules/chai-parentheses/index.d.ts": { + "version": "c1f79c6d85cd84518fd7349588b3c61bdc189f58e3866f925cbf4631c81e31f9", + "signature": "c1f79c6d85cd84518fd7349588b3c61bdc189f58e3866f925cbf4631c81e31f9", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/chai-subset/index.d.ts": { + "version": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", + "signature": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", + "affectsGlobalScope": true + }, + "../../../node_modules/chai-bytes/index.d.ts": { + "version": "c6950fb69844190789c747a2ee2d49f34bd84273d692176d2c54d18d95fa3387", + "signature": "c6950fb69844190789c747a2ee2d49f34bd84273d692176d2c54d18d95fa3387", "affectsGlobalScope": true }, "../../../node_modules/aegir/dist/utils/chai.d.ts": { - "version": "ec75f5e20d3603007740d7da648fdaa5129c83d672d96b99fb907c721589a55c", - "signature": "ec75f5e20d3603007740d7da648fdaa5129c83d672d96b99fb907c721589a55c", + "version": "33f12bdfbbb9a552db999b771a6e831fd0c94b321f958a1473def67b2b3e473f", + "signature": "33f12bdfbbb9a552db999b771a6e831fd0c94b321f958a1473def67b2b3e473f", "affectsGlobalScope": false }, "../../../node_modules/aegir/dist/utils/fixtures.d.ts": { @@ -256,24 +276,14 @@ "signature": "f40e8bdafdffb90065d371f14774f2f279ec0f96ca7814be66c81f6fe84fcf2c", "affectsGlobalScope": true }, - "../../../node_modules/@types/chai-as-promised/index.d.ts": { - "version": "c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2", - "signature": "c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/chai-subset/index.d.ts": { - "version": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", - "signature": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/dirty-chai/index.d.ts": { - "version": "5849dc8dc641e09624b923c5efd78206d48903a68944124051d18ae8117cb475", - "signature": "5849dc8dc641e09624b923c5efd78206d48903a68944124051d18ae8117cb475", - "affectsGlobalScope": true + "../../../node_modules/@types/node/assert/strict.d.ts": { + "version": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", + "signature": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", + "affectsGlobalScope": false }, "../../../node_modules/@types/node/globals.d.ts": { - "version": "583b4bd4e441916be4bf152ee323c4ffa6e178fd25df2ee2215ef05c7feb5ad4", - "signature": "583b4bd4e441916be4bf152ee323c4ffa6e178fd25df2ee2215ef05c7feb5ad4", + "version": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", + "signature": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", "affectsGlobalScope": true }, "../../../node_modules/@types/node/async_hooks.d.ts": { @@ -307,8 +317,8 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/crypto.d.ts": { - "version": "d53b352a01645c470a0d8c31bf290ba791fc28ade0ce187a4a50f5c2f826f75e", - "signature": "d53b352a01645c470a0d8c31bf290ba791fc28ade0ce187a4a50f5c2f826f75e", + "version": "4105385afd60b90ebac359d02a186250885839122850d776c0ad0e327c1afb65", + "signature": "4105385afd60b90ebac359d02a186250885839122850d776c0ad0e327c1afb65", "affectsGlobalScope": false }, "../../../node_modules/@types/node/dgram.d.ts": { @@ -317,8 +327,13 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/dns.d.ts": { - "version": "2b34e7fcba9e1f24e7f54ba5c8be5a8895b0b8b444ccf6548e04acdee0899317", - "signature": "2b34e7fcba9e1f24e7f54ba5c8be5a8895b0b8b444ccf6548e04acdee0899317", + "version": "12b2ab05a3ededc0e8938f2e16e4e2e30fc82b6d97b414067c26253f26fce69a", + "signature": "12b2ab05a3ededc0e8938f2e16e4e2e30fc82b6d97b414067c26253f26fce69a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/dns/promises.d.ts": { + "version": "e4ab7077b5adff3156d258a284986dc85e0bcf0fff1670df5c7f83efc25d4cc6", + "signature": "e4ab7077b5adff3156d258a284986dc85e0bcf0fff1670df5c7f83efc25d4cc6", "affectsGlobalScope": false }, "../../../node_modules/@types/node/domain.d.ts": { @@ -327,13 +342,13 @@ "affectsGlobalScope": true }, "../../../node_modules/@types/node/events.d.ts": { - "version": "bfd4f140c07091b5e8a963c89e6fa3f44b6cfcbc11471b465cf63e2d020ad0eb", - "signature": "bfd4f140c07091b5e8a963c89e6fa3f44b6cfcbc11471b465cf63e2d020ad0eb", + "version": "eb15e56611c2a853526a2e202234dd1676bd37cc2fcdbd9843470f7dafb37f15", + "signature": "eb15e56611c2a853526a2e202234dd1676bd37cc2fcdbd9843470f7dafb37f15", "affectsGlobalScope": true }, "../../../node_modules/@types/node/fs.d.ts": { - "version": "a106a0bea088b70879ac88ff606dc253c0cc474ea05ad3a282b8bfb1091ae576", - "signature": "a106a0bea088b70879ac88ff606dc253c0cc474ea05ad3a282b8bfb1091ae576", + "version": "2e0b4284620082f63b144da8096b207e9e9590c0e599834332b90624db0cc4a8", + "signature": "2e0b4284620082f63b144da8096b207e9e9590c0e599834332b90624db0cc4a8", "affectsGlobalScope": false }, "../../../node_modules/@types/node/fs/promises.d.ts": { @@ -347,8 +362,8 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/http2.d.ts": { - "version": "9aff68f1b847b846d3d50a58c9f8f99389bedd0258d1b1c201f11b97ecfd36f8", - "signature": "9aff68f1b847b846d3d50a58c9f8f99389bedd0258d1b1c201f11b97ecfd36f8", + "version": "2f69728fd1ca1f381879bbf20a42ae47a8f7286e000afd138c6cf870d90d882f", + "signature": "2f69728fd1ca1f381879bbf20a42ae47a8f7286e000afd138c6cf870d90d882f", "affectsGlobalScope": false }, "../../../node_modules/@types/node/https.d.ts": { @@ -367,8 +382,8 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/net.d.ts": { - "version": "f20ea392f7f27feb7a90e5a24319a4e365b07bf83c39a547711fe7ff9df68657", - "signature": "f20ea392f7f27feb7a90e5a24319a4e365b07bf83c39a547711fe7ff9df68657", + "version": "2c381d36201776828c67a307ad5fd8cbcf9ecaffb1fc7f77f7ce433d1a632b7f", + "signature": "2c381d36201776828c67a307ad5fd8cbcf9ecaffb1fc7f77f7ce433d1a632b7f", "affectsGlobalScope": false }, "../../../node_modules/@types/node/os.d.ts": { @@ -412,8 +427,13 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/stream.d.ts": { - "version": "74594bec8a9fa1a2cd40268f9ab95d0c44b6080345da6e8b913939d19b1d57ae", - "signature": "74594bec8a9fa1a2cd40268f9ab95d0c44b6080345da6e8b913939d19b1d57ae", + "version": "2b6906b19436e07d874a51a5829d94ab690337c4ee652735ab422a8f102168be", + "signature": "2b6906b19436e07d874a51a5829d94ab690337c4ee652735ab422a8f102168be", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/stream/promises.d.ts": { + "version": "1b98a8704d0c68520ccb02ac44782b7ffdaab40d23d2fa00e13923b528587f8b", + "signature": "1b98a8704d0c68520ccb02ac44782b7ffdaab40d23d2fa00e13923b528587f8b", "affectsGlobalScope": false }, "../../../node_modules/@types/node/string_decoder.d.ts": { @@ -422,8 +442,13 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/timers.d.ts": { - "version": "2d713cbcbd5bcc38d91546eaeea7bb1c8686dc4a2995a28556d957b1b9de11d9", - "signature": "2d713cbcbd5bcc38d91546eaeea7bb1c8686dc4a2995a28556d957b1b9de11d9", + "version": "911175d5a29fce5f6f471bcab94524474a1f99eec9cb86fe96505a40ce75f972", + "signature": "911175d5a29fce5f6f471bcab94524474a1f99eec9cb86fe96505a40ce75f972", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/timers/promises.d.ts": { + "version": "8b4f4519834b57645d2483af74d6f5d1675260a5b0e9aa6026f3e021edd2c5e9", + "signature": "8b4f4519834b57645d2483af74d6f5d1675260a5b0e9aa6026f3e021edd2c5e9", "affectsGlobalScope": false }, "../../../node_modules/@types/node/tls.d.ts": { @@ -462,8 +487,8 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/worker_threads.d.ts": { - "version": "ddc086b1adac44e2fccf55422da1e90fa970e659d77f99712422a421564b4877", - "signature": "ddc086b1adac44e2fccf55422da1e90fa970e659d77f99712422a421564b4877", + "version": "0124e458b12ba82b08c87220a1c9d4fb7701dcda8f11e28f7d7266281501bcba", + "signature": "0124e458b12ba82b08c87220a1c9d4fb7701dcda8f11e28f7d7266281501bcba", "affectsGlobalScope": false }, "../../../node_modules/@types/node/zlib.d.ts": { @@ -482,8 +507,8 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/ts3.6/base.d.ts": { - "version": "ae68a04912ee5a0f589276f9ec60b095f8c40d48128a4575b3fdd7d93806931c", - "signature": "ae68a04912ee5a0f589276f9ec60b095f8c40d48128a4575b3fdd7d93806931c", + "version": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", + "signature": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", "affectsGlobalScope": false }, "../../../node_modules/@types/node/assert.d.ts": { @@ -497,8 +522,8 @@ "affectsGlobalScope": false }, "../../../node_modules/@types/node/index.d.ts": { - "version": "9c4c395e927045b324877acdc4bfb95f128f36bc9f073266a2f0342495075a4f", - "signature": "9c4c395e927045b324877acdc4bfb95f128f36bc9f073266a2f0342495075a4f", + "version": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", + "signature": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", "affectsGlobalScope": false }, "../../../node_modules/@types/minimatch/index.d.ts": { @@ -511,11 +536,6 @@ "signature": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", "affectsGlobalScope": false }, - "../../../node_modules/@types/is-windows/index.d.ts": { - "version": "b938f24d3af55eba025debac20bcf2d6a3be6033f1bb41462d6ca7d6c81e0314", - "signature": "b938f24d3af55eba025debac20bcf2d6a3be6033f1bb41462d6ca7d6c81e0314", - "affectsGlobalScope": false - }, "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts": { "version": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", "signature": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", @@ -630,10 +650,6 @@ "../../../node_modules/@types/chai-subset/index.d.ts": [ "../../../node_modules/@types/chai/index.d.ts" ], - "../../../node_modules/@types/dirty-chai/index.d.ts": [ - "../../../node_modules/@types/chai-as-promised/index.d.ts", - "../../../node_modules/@types/chai/index.d.ts" - ], "../../../node_modules/@types/glob/index.d.ts": [ "../../../node_modules/@types/minimatch/index.d.ts", "../../../node_modules/@types/node/events.d.ts", @@ -642,6 +658,9 @@ "../../../node_modules/@types/node/assert.d.ts": [ "../../../node_modules/@types/node/assert.d.ts" ], + "../../../node_modules/@types/node/assert/strict.d.ts": [ + "../../../node_modules/@types/node/assert.d.ts" + ], "../../../node_modules/@types/node/async_hooks.d.ts": [ "../../../node_modules/@types/node/async_hooks.d.ts" ], @@ -685,7 +704,12 @@ "../../../node_modules/@types/node/net.d.ts" ], "../../../node_modules/@types/node/dns.d.ts": [ - "../../../node_modules/@types/node/dns.d.ts" + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/dns/promises.d.ts" + ], + "../../../node_modules/@types/node/dns/promises.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/dns/promises.d.ts" ], "../../../node_modules/@types/node/domain.d.ts": [ "../../../node_modules/@types/node/domain.d.ts", @@ -775,7 +799,12 @@ ], "../../../node_modules/@types/node/stream.d.ts": [ "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/stream.d.ts" + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/stream/promises.d.ts" + ], + "../../../node_modules/@types/node/stream/promises.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/stream/promises.d.ts" ], "../../../node_modules/@types/node/string_decoder.d.ts": [ "../../../node_modules/@types/node/string_decoder.d.ts" @@ -783,6 +812,10 @@ "../../../node_modules/@types/node/timers.d.ts": [ "../../../node_modules/@types/node/timers.d.ts" ], + "../../../node_modules/@types/node/timers/promises.d.ts": [ + "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/timers/promises.d.ts" + ], "../../../node_modules/@types/node/tls.d.ts": [ "../../../node_modules/@types/node/net.d.ts", "../../../node_modules/@types/node/tls.d.ts" @@ -791,6 +824,7 @@ "../../../node_modules/@types/node/trace_events.d.ts" ], "../../../node_modules/@types/node/ts3.6/base.d.ts": [ + "../../../node_modules/@types/node/assert/strict.d.ts", "../../../node_modules/@types/node/async_hooks.d.ts", "../../../node_modules/@types/node/buffer.d.ts", "../../../node_modules/@types/node/child_process.d.ts", @@ -800,6 +834,7 @@ "../../../node_modules/@types/node/crypto.d.ts", "../../../node_modules/@types/node/dgram.d.ts", "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/dns/promises.d.ts", "../../../node_modules/@types/node/domain.d.ts", "../../../node_modules/@types/node/events.d.ts", "../../../node_modules/@types/node/fs.d.ts", @@ -821,8 +856,10 @@ "../../../node_modules/@types/node/readline.d.ts", "../../../node_modules/@types/node/repl.d.ts", "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/stream/promises.d.ts", "../../../node_modules/@types/node/string_decoder.d.ts", "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/timers/promises.d.ts", "../../../node_modules/@types/node/tls.d.ts", "../../../node_modules/@types/node/trace_events.d.ts", "../../../node_modules/@types/node/tty.d.ts", @@ -879,6 +916,17 @@ "../../../node_modules/@types/node/stream.d.ts" ], "../../../node_modules/aegir/dist/utils/chai.d.ts": [ + "../../../node_modules/@types/chai-as-promised/index.d.ts", + "../../../node_modules/@types/chai-subset/index.d.ts", + "../../../node_modules/@types/chai/index.d.ts", + "../../../node_modules/chai-bytes/index.d.ts", + "../../../node_modules/chai-parentheses/index.d.ts" + ], + "../../../node_modules/chai-bytes/index.d.ts": [ + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/chai-parentheses/index.d.ts": [ + "../../../node_modules/@types/chai-as-promised/index.d.ts", "../../../node_modules/@types/chai/index.d.ts" ], "../../../node_modules/uint8arrays/dist/from-string.d.ts": [ @@ -907,10 +955,6 @@ "../../../node_modules/@types/chai-subset/index.d.ts": [ "../../../node_modules/@types/chai/index.d.ts" ], - "../../../node_modules/@types/dirty-chai/index.d.ts": [ - "../../../node_modules/@types/chai-as-promised/index.d.ts", - "../../../node_modules/@types/chai/index.d.ts" - ], "../../../node_modules/@types/glob/index.d.ts": [ "../../../node_modules/@types/minimatch/index.d.ts", "../../../node_modules/@types/node/events.d.ts", @@ -919,6 +963,9 @@ "../../../node_modules/@types/node/assert.d.ts": [ "../../../node_modules/@types/node/assert.d.ts" ], + "../../../node_modules/@types/node/assert/strict.d.ts": [ + "../../../node_modules/@types/node/assert.d.ts" + ], "../../../node_modules/@types/node/async_hooks.d.ts": [ "../../../node_modules/@types/node/async_hooks.d.ts" ], @@ -962,7 +1009,12 @@ "../../../node_modules/@types/node/net.d.ts" ], "../../../node_modules/@types/node/dns.d.ts": [ - "../../../node_modules/@types/node/dns.d.ts" + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/dns/promises.d.ts" + ], + "../../../node_modules/@types/node/dns/promises.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/dns/promises.d.ts" ], "../../../node_modules/@types/node/domain.d.ts": [ "../../../node_modules/@types/node/domain.d.ts", @@ -1052,7 +1104,12 @@ ], "../../../node_modules/@types/node/stream.d.ts": [ "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/stream.d.ts" + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/stream/promises.d.ts" + ], + "../../../node_modules/@types/node/stream/promises.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/stream/promises.d.ts" ], "../../../node_modules/@types/node/string_decoder.d.ts": [ "../../../node_modules/@types/node/string_decoder.d.ts" @@ -1060,6 +1117,10 @@ "../../../node_modules/@types/node/timers.d.ts": [ "../../../node_modules/@types/node/timers.d.ts" ], + "../../../node_modules/@types/node/timers/promises.d.ts": [ + "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/timers/promises.d.ts" + ], "../../../node_modules/@types/node/tls.d.ts": [ "../../../node_modules/@types/node/net.d.ts", "../../../node_modules/@types/node/tls.d.ts" @@ -1068,6 +1129,7 @@ "../../../node_modules/@types/node/trace_events.d.ts" ], "../../../node_modules/@types/node/ts3.6/base.d.ts": [ + "../../../node_modules/@types/node/assert/strict.d.ts", "../../../node_modules/@types/node/async_hooks.d.ts", "../../../node_modules/@types/node/buffer.d.ts", "../../../node_modules/@types/node/child_process.d.ts", @@ -1077,6 +1139,7 @@ "../../../node_modules/@types/node/crypto.d.ts", "../../../node_modules/@types/node/dgram.d.ts", "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/dns/promises.d.ts", "../../../node_modules/@types/node/domain.d.ts", "../../../node_modules/@types/node/events.d.ts", "../../../node_modules/@types/node/fs.d.ts", @@ -1098,8 +1161,10 @@ "../../../node_modules/@types/node/readline.d.ts", "../../../node_modules/@types/node/repl.d.ts", "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/stream/promises.d.ts", "../../../node_modules/@types/node/string_decoder.d.ts", "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/timers/promises.d.ts", "../../../node_modules/@types/node/tls.d.ts", "../../../node_modules/@types/node/trace_events.d.ts", "../../../node_modules/@types/node/tty.d.ts", @@ -1156,6 +1221,17 @@ "../../../node_modules/@types/node/stream.d.ts" ], "../../../node_modules/aegir/dist/utils/chai.d.ts": [ + "../../../node_modules/@types/chai-as-promised/index.d.ts", + "../../../node_modules/@types/chai-subset/index.d.ts", + "../../../node_modules/@types/chai/index.d.ts", + "../../../node_modules/chai-bytes/index.d.ts", + "../../../node_modules/chai-parentheses/index.d.ts" + ], + "../../../node_modules/chai-bytes/index.d.ts": [ + "../../../node_modules/@types/chai/index.d.ts" + ], + "../../../node_modules/chai-parentheses/index.d.ts": [ + "../../../node_modules/@types/chai-as-promised/index.d.ts", "../../../node_modules/@types/chai/index.d.ts" ], "../../../node_modules/uint8arrays/dist/from-string.d.ts": [ @@ -1173,9 +1249,7 @@ "../../../node_modules/@types/chai-as-promised/index.d.ts", "../../../node_modules/@types/chai-subset/index.d.ts", "../../../node_modules/@types/chai/index.d.ts", - "../../../node_modules/@types/dirty-chai/index.d.ts", "../../../node_modules/@types/glob/index.d.ts", - "../../../node_modules/@types/is-windows/index.d.ts", "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts", "../../../node_modules/@types/json-schema/index.d.ts", "../../../node_modules/@types/json5/index.d.ts", @@ -1184,6 +1258,7 @@ "../../../node_modules/@types/minimist/index.d.ts", "../../../node_modules/@types/mocha/index.d.ts", "../../../node_modules/@types/node/assert.d.ts", + "../../../node_modules/@types/node/assert/strict.d.ts", "../../../node_modules/@types/node/async_hooks.d.ts", "../../../node_modules/@types/node/base.d.ts", "../../../node_modules/@types/node/buffer.d.ts", @@ -1194,6 +1269,7 @@ "../../../node_modules/@types/node/crypto.d.ts", "../../../node_modules/@types/node/dgram.d.ts", "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/dns/promises.d.ts", "../../../node_modules/@types/node/domain.d.ts", "../../../node_modules/@types/node/events.d.ts", "../../../node_modules/@types/node/fs.d.ts", @@ -1216,8 +1292,10 @@ "../../../node_modules/@types/node/readline.d.ts", "../../../node_modules/@types/node/repl.d.ts", "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/stream/promises.d.ts", "../../../node_modules/@types/node/string_decoder.d.ts", "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/timers/promises.d.ts", "../../../node_modules/@types/node/tls.d.ts", "../../../node_modules/@types/node/trace_events.d.ts", "../../../node_modules/@types/node/ts3.6/base.d.ts", @@ -1238,6 +1316,8 @@ "../../../node_modules/@types/yauzl/index.d.ts", "../../../node_modules/aegir/dist/utils/chai.d.ts", "../../../node_modules/aegir/dist/utils/fixtures.d.ts", + "../../../node_modules/chai-bytes/index.d.ts", + "../../../node_modules/chai-parentheses/index.d.ts", "../../../node_modules/multibase/src/types.d.ts", "../../../node_modules/protobufjs/index.d.ts", "../../../node_modules/typescript/lib/lib.dom.d.ts", From e0c5e27ca5eea9b61f13749d9405bcecd2150d29 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 7 May 2021 14:46:28 +0100 Subject: [PATCH 19/22] chore: remove dist dirs --- .gitignore | 2 + .../ipfs-unixfs-exporter/dist/src/index.d.ts | 29 - .../dist/src/index.d.ts.map | 1 - .../dist/src/resolvers/dag-cbor.d.ts | 13 - .../dist/src/resolvers/dag-cbor.d.ts.map | 1 - .../dist/src/resolvers/identity.d.ts | 11 - .../dist/src/resolvers/identity.d.ts.map | 1 - .../dist/src/resolvers/index.d.ts | 14 - .../dist/src/resolvers/index.d.ts.map | 1 - .../dist/src/resolvers/raw.d.ts | 10 - .../dist/src/resolvers/raw.d.ts.map | 1 - .../unixfs-v1/content/directory.d.ts | 17 - .../unixfs-v1/content/directory.d.ts.map | 1 - .../src/resolvers/unixfs-v1/content/file.d.ts | 12 - .../resolvers/unixfs-v1/content/file.d.ts.map | 1 - .../content/hamt-sharded-directory.d.ts | 23 - .../content/hamt-sharded-directory.d.ts.map | 1 - .../src/resolvers/unixfs-v1/content/raw.d.ts | 15 - .../resolvers/unixfs-v1/content/raw.d.ts.map | 1 - .../dist/src/resolvers/unixfs-v1/index.d.ts | 15 - .../src/resolvers/unixfs-v1/index.d.ts.map | 1 - .../ipfs-unixfs-exporter/dist/src/types.d.ts | 74 - .../src/utils/extract-data-from-block.d.ts | 3 - .../utils/extract-data-from-block.d.ts.map | 1 - .../dist/src/utils/find-cid-in-shard.d.ts | 30 - .../dist/src/utils/find-cid-in-shard.d.ts.map | 1 - .../src/utils/validate-offset-and-length.d.ts | 11 - .../utils/validate-offset-and-length.d.ts.map | 1 - .../dist/src/chunker/fixed-size.d.ts | 3 - .../dist/src/chunker/fixed-size.d.ts.map | 1 - .../dist/src/chunker/index.d.ts | 5 - .../dist/src/chunker/index.d.ts.map | 1 - .../dist/src/chunker/rabin.d.ts | 10 - .../dist/src/chunker/rabin.d.ts.map | 1 - .../dist/src/dag-builder/dir.d.ts | 13 - .../dist/src/dag-builder/dir.d.ts.map | 1 - .../dist/src/dag-builder/file/balanced.d.ts | 13 - .../src/dag-builder/file/balanced.d.ts.map | 1 - .../src/dag-builder/file/buffer-importer.d.ts | 13 - .../dag-builder/file/buffer-importer.d.ts.map | 1 - .../dist/src/dag-builder/file/flat.d.ts | 3 - .../dist/src/dag-builder/file/flat.d.ts.map | 1 - .../dist/src/dag-builder/file/index.d.ts | 15 - .../dist/src/dag-builder/file/index.d.ts.map | 1 - .../dist/src/dag-builder/file/trickle.d.ts | 9 - .../src/dag-builder/file/trickle.d.ts.map | 1 - .../dist/src/dag-builder/index.d.ts | 14 - .../dist/src/dag-builder/index.d.ts.map | 1 - .../dist/src/dag-builder/validate-chunks.d.ts | 13 - .../src/dag-builder/validate-chunks.d.ts.map | 1 - .../dist/src/dir-flat.d.ts | 31 - .../dist/src/dir-flat.d.ts.map | 1 - .../dist/src/dir-sharded.d.ts | 28 - .../dist/src/dir-sharded.d.ts.map | 1 - .../ipfs-unixfs-importer/dist/src/dir.d.ts | 85 - .../dist/src/dir.d.ts.map | 1 - .../dist/src/flat-to-shard.d.ts | 6 - .../dist/src/flat-to-shard.d.ts.map | 1 - .../ipfs-unixfs-importer/dist/src/index.d.ts | 43 - .../dist/src/index.d.ts.map | 1 - .../dist/src/options.d.ts | 5 - .../dist/src/options.d.ts.map | 1 - .../dist/src/tree-builder.d.ts | 14 - .../dist/src/tree-builder.d.ts.map | 1 - .../ipfs-unixfs-importer/dist/src/types.d.ts | 167 -- .../dist/src/utils/persist.d.ts | 9 - .../dist/src/utils/persist.d.ts.map | 1 - .../dist/src/utils/to-path-components.d.ts | 3 - .../src/utils/to-path-components.d.ts.map | 1 - packages/ipfs-unixfs/dist/src/index.d.ts | 73 - packages/ipfs-unixfs/dist/src/index.d.ts.map | 1 - packages/ipfs-unixfs/dist/src/types.d.ts | 7 - packages/ipfs-unixfs/dist/src/unixfs.d.ts | 238 --- .../dist/test/unixfs-format.spec.d.ts | 2 - .../dist/test/unixfs-format.spec.d.ts.map | 1 - .../ipfs-unixfs/dist/tsconfig.tsbuildinfo | 1372 ----------------- 76 files changed, 2 insertions(+), 2506 deletions(-) delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/index.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/types.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts delete mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dir.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/index.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/index.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/options.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/options.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/types.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map delete mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts delete mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map delete mode 100644 packages/ipfs-unixfs/dist/src/index.d.ts delete mode 100644 packages/ipfs-unixfs/dist/src/index.d.ts.map delete mode 100644 packages/ipfs-unixfs/dist/src/types.d.ts delete mode 100644 packages/ipfs-unixfs/dist/src/unixfs.d.ts delete mode 100644 packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts delete mode 100644 packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map delete mode 100644 packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo diff --git a/.gitignore b/.gitignore index 60182528..3ee370ec 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ build node_modules lib +dist + diff --git a/packages/ipfs-unixfs-exporter/dist/src/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts deleted file mode 100644 index ae8b732d..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export type UnixFS = import('ipfs-unixfs').UnixFS; -export type BlockAPI = import('ipfs-unixfs-importer/src/types').BlockAPI; -export type ExporterOptions = import('./types').ExporterOptions; -export type UnixFSFile = import('./types').UnixFSFile; -export type UnixFSDirectory = import('./types').UnixFSDirectory; -export type ObjectNode = import('./types').ObjectNode; -export type RawNode = import('./types').RawNode; -export type IdentityNode = import('./types').IdentityNode; -export type UnixFSEntry = import('./types').UnixFSEntry; -/** - * @param {string | CID} path - * @param {BlockAPI} blockService - * @param {ExporterOptions} [options] - */ -export function exporter(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): Promise; -/** - * @param {string | CID} path - * @param {BlockAPI} blockService - * @param {ExporterOptions} [options] - */ -export function walkPath(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): AsyncGenerator; -/** - * @param {string | CID} path - * @param {BlockAPI} blockService - * @param {ExporterOptions} [options] - */ -export function recursive(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): AsyncGenerator; -import { CID } from "multiformats/cid"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map deleted file mode 100644 index ff6d6da2..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"qBAQa,OAAO,aAAa,EAAE,MAAM;uBAC5B,OAAO,gCAAgC,EAAE,QAAQ;8BACjD,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,SAAS,EAAE,UAAU;8BAC5B,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,SAAS,EAAE,UAAU;sBAC5B,OAAO,SAAS,EAAE,OAAO;2BACzB,OAAO,SAAS,EAAE,YAAY;0BAC9B,OAAO,SAAS,EAAE,WAAW;AAmF1C;;;;GAIG;AACH,+BAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,mGAWlB;AAlDD;;;;GAIG;AACH,+BAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,yHAiClB;AAiBD;;;;GAIG;AACH,gCAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,yHAoClB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts deleted file mode 100644 index 0023df0e..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export = resolve; -/** - * @typedef {import('../types').Resolver} Resolver - */ -/** - * @type {Resolver} - */ -declare const resolve: Resolver; -declare namespace resolve { - export { Resolver }; -} -type Resolver = import('../types').Resolver; -//# sourceMappingURL=dag-cbor.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map deleted file mode 100644 index 421183a1..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dag-cbor.d.ts","sourceRoot":"","sources":["../../../src/resolvers/dag-cbor.js"],"names":[],"mappings":";AAMA;;GAEG;AAEH;;GAEG;AACH,uBAFU,QAAQ,CA6DjB;;;;gBAjEY,OAAO,UAAU,EAAE,QAAQ"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts deleted file mode 100644 index 48b711a6..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export = resolve; -/** - * @type {Resolver} - */ -declare const resolve: Resolver; -declare namespace resolve { - export { ExporterOptions, Resolver }; -} -type Resolver = import('../types').Resolver; -type ExporterOptions = import('../types').ExporterOptions; -//# sourceMappingURL=identity.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map deleted file mode 100644 index 5830ebd8..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/resolvers/identity.js"],"names":[],"mappings":";AA+BA;;GAEG;AACH,uBAFU,QAAQ,CAoBjB;;;;gBA3CY,OAAO,UAAU,EAAE,QAAQ;uBAD3B,OAAO,UAAU,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts deleted file mode 100644 index 310e738a..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export = resolve; -/** - * @type {Resolve} - */ -declare function resolve(cid: import("multiformats/cid").CID, name: string, path: string, toResolve: string[], depth: number, blockService: any, options: import("../types").ExporterOptions): Promise; -declare namespace resolve { - export { BlockAPI, ExporterOptions, UnixFSEntry, Resolver, Resolve }; -} -type BlockAPI = import('../').BlockAPI; -type ExporterOptions = import('../types').ExporterOptions; -type UnixFSEntry = import('../types').UnixFSEntry; -type Resolver = import('../types').Resolver; -type Resolve = import('../types').Resolve; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map deleted file mode 100644 index 5c1528b0..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resolvers/index.js"],"names":[],"mappings":";AAuBA;;GAEG;AACH,yOASC;;;;gBA7BY,OAAO,KAAK,EAAE,QAAQ;uBACtB,OAAO,UAAU,EAAE,eAAe;mBAClC,OAAO,UAAU,EAAE,WAAW;gBAC9B,OAAO,UAAU,EAAE,QAAQ;eAC3B,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts deleted file mode 100644 index c1bbde83..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export = resolve; -/** - * @type {import('../types').Resolver} - */ -declare const resolve: import('../types').Resolver; -declare namespace resolve { - export { ExporterOptions }; -} -type ExporterOptions = import('../types').ExporterOptions; -//# sourceMappingURL=raw.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map deleted file mode 100644 index aeb0b6d0..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"raw.d.ts","sourceRoot":"","sources":["../../../src/resolvers/raw.js"],"names":[],"mappings":";AA6BA;;GAEG;AACH,uBAFU,OAAO,UAAU,EAAE,QAAQ,CAqBpC;;;;uBA5CY,OAAO,UAAU,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts deleted file mode 100644 index cd496970..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export = directoryContent; -/** - * @typedef {import('../../../types').ExporterOptions} ExporterOptions - * @typedef {import('../../../types').UnixfsV1DirectoryContent} UnixfsV1DirectoryContent - * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver - */ -/** - * @type {UnixfsV1Resolver} - */ -declare const directoryContent: UnixfsV1Resolver; -declare namespace directoryContent { - export { ExporterOptions, UnixfsV1DirectoryContent, UnixfsV1Resolver }; -} -type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; -type ExporterOptions = import('../../../types').ExporterOptions; -type UnixfsV1DirectoryContent = import('../../../types').UnixfsV1DirectoryContent; -//# sourceMappingURL=directory.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map deleted file mode 100644 index 193e0f25..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/directory.js"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH;;GAEG;AACH,gCAFU,gBAAgB,CAsBzB;;;;wBA1BY,OAAO,gBAAgB,EAAE,gBAAgB;uBAFzC,OAAO,gBAAgB,EAAE,eAAe;gCACxC,OAAO,gBAAgB,EAAE,wBAAwB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts deleted file mode 100644 index 5049b5de..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export = fileContent; -/** - * @type {import('../').UnixfsV1Resolver} - */ -declare const fileContent: import('../').UnixfsV1Resolver; -declare namespace fileContent { - export { ExporterOptions, BlockService, PBNode }; -} -type ExporterOptions = import('../../../types').ExporterOptions; -type BlockService = import('ipfs-unixfs-importer/src/types').BlockAPI; -type PBNode = import('@ipld/dag-pb').PBNode; -//# sourceMappingURL=file.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map deleted file mode 100644 index d1b5b2a9..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/file.js"],"names":[],"mappings":";AAqGA;;GAEG;AACH,2BAFU,OAAO,KAAK,EAAE,gBAAgB,CAyBvC;;;;uBApHY,OAAO,gBAAgB,EAAE,eAAe;oBACxC,OAAO,gCAAgC,EAAE,QAAQ;cACjD,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts deleted file mode 100644 index fa9dac87..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export = hamtShardedDirectoryContent; -/** - * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockAPI - * @typedef {import('../../../types').ExporterOptions} ExporterOptions - * @typedef {import('../../../types').Resolve} Resolve - * @typedef {import('../../../types').UnixfsV1DirectoryContent} UnixfsV1DirectoryContent - * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver - * @typedef {import('@ipld/dag-pb').PBNode} PBNode - */ -/** - * @type {UnixfsV1Resolver} - */ -declare const hamtShardedDirectoryContent: UnixfsV1Resolver; -declare namespace hamtShardedDirectoryContent { - export { BlockAPI, ExporterOptions, Resolve, UnixfsV1DirectoryContent, UnixfsV1Resolver, PBNode }; -} -type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; -type BlockAPI = import('ipfs-unixfs-importer/src/types').BlockAPI; -type ExporterOptions = import('../../../types').ExporterOptions; -type Resolve = import('../../../types').Resolve; -type UnixfsV1DirectoryContent = import('../../../types').UnixfsV1DirectoryContent; -type PBNode = import('@ipld/dag-pb').PBNode; -//# sourceMappingURL=hamt-sharded-directory.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map deleted file mode 100644 index 94a26f78..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hamt-sharded-directory.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/hamt-sharded-directory.js"],"names":[],"mappings":";AAIA;;;;;;;GAOG;AAEH;;GAEG;AACH,2CAFU,gBAAgB,CAYzB;;;;wBAjBY,OAAO,gBAAgB,EAAE,gBAAgB;gBAJzC,OAAO,gCAAgC,EAAE,QAAQ;uBACjD,OAAO,gBAAgB,EAAE,eAAe;eACxC,OAAO,gBAAgB,EAAE,OAAO;gCAChC,OAAO,gBAAgB,EAAE,wBAAwB;cAEjD,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts deleted file mode 100644 index e1e92ca8..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export = rawContent; -/** - * @typedef {import('../../../types').ExporterOptions} ExporterOptions - * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver - */ -/** - * @type {UnixfsV1Resolver} - */ -declare const rawContent: UnixfsV1Resolver; -declare namespace rawContent { - export { ExporterOptions, UnixfsV1Resolver }; -} -type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; -type ExporterOptions = import('../../../types').ExporterOptions; -//# sourceMappingURL=raw.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map deleted file mode 100644 index aec0596d..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"raw.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/raw.js"],"names":[],"mappings":";AAKA;;;GAGG;AAEH;;GAEG;AACH,0BAFU,gBAAgB,CAsBzB;;;;wBA1BY,OAAO,gBAAgB,EAAE,gBAAgB;uBADzC,OAAO,gBAAgB,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts deleted file mode 100644 index fa0762f2..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export = unixFsResolver; -/** - * @type {Resolver} - */ -declare const unixFsResolver: Resolver; -declare namespace unixFsResolver { - export { ExporterOptions, UnixFSEntry, Resolve, Resolver, UnixfsV1Resolver, PBNode }; -} -type Resolver = import('../../types').Resolver; -type ExporterOptions = import('../../types').ExporterOptions; -type UnixFSEntry = import('../../types').UnixFSEntry; -type Resolve = import('../../types').Resolve; -type UnixfsV1Resolver = import('../../types').UnixfsV1Resolver; -type PBNode = import('@ipld/dag-pb').PBNode; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map deleted file mode 100644 index 76c94694..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/unixfs-v1/index.js"],"names":[],"mappings":";AA2CA;;GAEG;AACH,8BAFU,QAAQ,CAoEjB;;;;gBApGY,OAAO,aAAa,EAAE,QAAQ;uBAH9B,OAAO,aAAa,EAAE,eAAe;mBACrC,OAAO,aAAa,EAAE,WAAW;eACjC,OAAO,aAAa,EAAE,OAAO;wBAE7B,OAAO,aAAa,EAAE,gBAAgB;cACtC,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/types.d.ts b/packages/ipfs-unixfs-exporter/dist/src/types.d.ts deleted file mode 100644 index 73f4c8e7..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/types.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { CID } from 'multiformats/cid' -import UnixFS from 'ipfs-unixfs' -import { PBNode } from '@ipld/dag-pb' - -interface ExporterOptions { - offset?: number - length?: number - signal?: AbortSignal - timeout?: number -} - -interface Exportable { - type: 'file' | 'directory' | 'object' | 'raw' | 'identity', - name: string - path: string - cid: CID - depth: number - size: number - content: (options?: ExporterOptions) => AsyncIterable -} - -interface UnixFSFile extends Exportable { - type: 'file' - unixfs: UnixFS - node: PBNode -} - -interface UnixFSDirectory extends Exportable { - type: 'directory' - unixfs: UnixFS - node: PBNode -} - -interface ObjectNode extends Exportable { - type: 'object' - node: Uint8Array -} - -interface RawNode extends Exportable { - type: 'raw' - node: Uint8Array -} - -interface IdentityNode extends Exportable { - type: 'identity' - node: Uint8Array -} - -type UnixFSEntry = UnixFSFile | UnixFSDirectory | ObjectNode | RawNode | IdentityNode - -interface NextResult { - cid: CID - name: string - path: string - toResolve: string[] -} - -interface ResolveResult { - entry: UnixFSEntry - next?: NextResult -} - -type Resolve = (cid: CID, name: string, path: string, toResolve: string[], depth: number, ipld: IPLD, options: ExporterOptions) => Promise -type Resolver = (cid: CID, name: string, path: string, toResolve: string[], resolve: Resolve, depth: number, ipld: IPLD, options: ExporterOptions) => Promise - -type UnixfsV1FileContent = AsyncIterable | Iterable -type UnixfsV1DirectoryContent = AsyncIterable | Iterable -type UnixfsV1Content = UnixfsV1FileContent | UnixfsV1DirectoryContent -type UnixfsV1Resolver = (cid: CID, node: PBNode, unixfs: UnixFS, path: string, resolve: Resolve, depth: number, ipld: IPLD) => (options: ExporterOptions) => UnixfsV1Content - -interface Block { - cid: CID, - bytes: Uint8Array -} diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts deleted file mode 100644 index bc211869..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function _exports(block: Uint8Array, blockStart: number, requestedStart: number, requestedEnd: number): Uint8Array; -export = _exports; -//# sourceMappingURL=extract-data-from-block.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map deleted file mode 100644 index 761824c0..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extract-data-from-block.d.ts","sourceRoot":"","sources":["../../../src/utils/extract-data-from-block.js"],"names":[],"mappings":"AAQiB,iCALN,UAAU,cACV,MAAM,kBACN,MAAM,gBACN,MAAM,cAuBhB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts deleted file mode 100644 index 03f9b264..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export = findShardCid; -/** - * @typedef {object} ShardTraversalContext - * @property {number} hamtDepth - * @property {Bucket} rootBucket - * @property {Bucket} lastBucket - * - * @param {PBNode} node - * @param {string} name - * @param {BlockService} blockService - * @param {ShardTraversalContext} [context] - * @param {ExporterOptions} [options] - * @returns {Promise} - */ -declare function findShardCid(node: PBNode, name: string, blockService: BlockService, context?: ShardTraversalContext | undefined, options?: import("../types").ExporterOptions | undefined): Promise; -declare namespace findShardCid { - export { BlockService, CID, ExporterOptions, PBNode, PBLink, ShardTraversalContext }; -} -type PBNode = import('@ipld/dag-pb').PBNode; -type BlockService = import('ipfs-unixfs-importer/src/types').BlockAPI; -type ShardTraversalContext = { - hamtDepth: number; - rootBucket: Bucket; - lastBucket: Bucket; -}; -type CID = import('multiformats/cid').CID; -type ExporterOptions = import('../types').ExporterOptions; -type PBLink = import('@ipld/dag-pb').PBLink; -import { Bucket } from "hamt-sharding"; -//# sourceMappingURL=find-cid-in-shard.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map deleted file mode 100644 index ce27c753..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"find-cid-in-shard.d.ts","sourceRoot":"","sources":["../../../src/utils/find-cid-in-shard.js"],"names":[],"mappings":";AA2FA;;;;;;;;;;;;GAYG;AACH,oCAPW,MAAM,QACN,MAAM,gBACN,YAAY,0GAGV,QAAQ,GAAG,GAAC,IAAI,CAAC,CA8D7B;;;;cA1JY,OAAO,cAAc,EAAE,MAAM;oBAH7B,OAAO,gCAAgC,EAAE,QAAQ;;eAsFhD,MAAM;gBACN,OAAO,OAAO,CAAC;gBACf,OAAO,OAAO,CAAC;;WAvFhB,OAAO,kBAAkB,EAAE,GAAG;uBAC9B,OAAO,UAAU,EAAE,eAAe;cAElC,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts deleted file mode 100644 index d181958e..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export = validateOffsetAndLength; -/** - * @param {number} size - * @param {number} [offset] - * @param {number} [length] - */ -declare function validateOffsetAndLength(size: number, offset?: number | undefined, length?: number | undefined): { - offset: number; - length: number; -}; -//# sourceMappingURL=validate-offset-and-length.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map deleted file mode 100644 index 5b1f25be..00000000 --- a/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validate-offset-and-length.d.ts","sourceRoot":"","sources":["../../../src/utils/validate-offset-and-length.js"],"names":[],"mappings":";AAIA;;;;GAIG;AACH,+CAJW,MAAM;;;EAiChB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts deleted file mode 100644 index 214ca322..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _exports: import('../types').Chunker; -export = _exports; -//# sourceMappingURL=fixed-size.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map deleted file mode 100644 index 8a1f19c7..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fixed-size.d.ts","sourceRoot":"","sources":["../../../src/chunker/fixed-size.js"],"names":[],"mappings":"wBAMU,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts deleted file mode 100644 index 8b01a3ea..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function _exports(type: import('../types').ChunkerType, source: AsyncIterable, options: import('../types').ImporterOptions): AsyncIterable; -export = _exports; -export type ImporterOptions = import('../types').ImporterOptions; -export type Chunker = import('../types').Chunker; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map deleted file mode 100644 index 151c9fb3..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chunker/index.js"],"names":[],"mappings":"AAsBiB,gCAJN,OAAO,UAAU,EAAE,WAAW,UAC9B,cAAc,UAAU,CAAC,WACzB,OAAO,UAAU,EAAE,eAAe,6BAU5C;;8BAzBY,OAAO,UAAU,EAAE,eAAe;sBAClC,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts deleted file mode 100644 index 2403c0d9..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare const _exports: import('../types').Chunker; -export = _exports; -export type RabinOptions = { - min: number; - max: number; - bits: number; - window: number; - polynomial: number; -}; -//# sourceMappingURL=rabin.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map deleted file mode 100644 index 202ebd76..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin.d.ts","sourceRoot":"","sources":["../../../src/chunker/rabin.js"],"names":[],"mappings":"wBAkBU,OAAO,UAAU,EAAE,OAAO;;;SARtB,MAAM;SACN,MAAM;UACN,MAAM;YACN,MAAM;gBACN,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts deleted file mode 100644 index e5a5ca6e..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export = dirBuilder; -/** - * @typedef {import('../types').Directory} Directory - */ -/** - * @type {import('../types').UnixFSV1DagBuilder} - */ -declare const dirBuilder: import('../types').UnixFSV1DagBuilder; -declare namespace dirBuilder { - export { Directory }; -} -type Directory = import('../types').Directory; -//# sourceMappingURL=dir.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map deleted file mode 100644 index 45275d2d..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/dir.js"],"names":[],"mappings":";AAMA;;GAEG;AAEH;;GAEG;AACH,0BAFU,OAAO,UAAU,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAmBzD;;;;iBAvBY,OAAO,UAAU,EAAE,SAAS"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts deleted file mode 100644 index e84f8a1c..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export = balanced; -/** - * @typedef {import('../../types').FileDAGBuilder} FileDAGBuilder - */ -/** - * @type {FileDAGBuilder} - */ -declare function balanced(source: AsyncIterable | Iterable, reduce: import("../../types").Reducer, options: import("../../types").ImporterOptions): Promise; -declare namespace balanced { - export { FileDAGBuilder }; -} -type FileDAGBuilder = import('../../types').FileDAGBuilder; -//# sourceMappingURL=balanced.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map deleted file mode 100644 index 33a36921..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"balanced.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/balanced.js"],"names":[],"mappings":";AAIA;;GAEG;AAEH;;GAEG;AACH,sSAEC;;;;sBARY,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts deleted file mode 100644 index 71b3b20e..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export = bufferImporter; -/** - * @typedef {import('../../types').BufferImporter} BufferImporter - */ -/** - * @type {BufferImporter} - */ -declare function bufferImporter(file: import("../../types").File, block: import("../../types").BlockAPI, options: import("../../types").ImporterOptions): AsyncIterable<() => Promise>; -declare namespace bufferImporter { - export { BufferImporter }; -} -type BufferImporter = import('../../types').BufferImporter; -//# sourceMappingURL=buffer-importer.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map deleted file mode 100644 index 86a57d6a..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer-importer.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/buffer-importer.js"],"names":[],"mappings":";AAOA;;GAEG;AAEH;;GAEG;AACH,qOAmCC;;;;sBAzCY,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts deleted file mode 100644 index 5be05008..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _exports: import('../../types').FileDAGBuilder; -export = _exports; -//# sourceMappingURL=flat.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map deleted file mode 100644 index b8b0d861..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/flat.js"],"names":[],"mappings":"wBAKU,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts deleted file mode 100644 index 9320e69c..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export = fileBuilder; -/** - * @type {import('../../types').UnixFSV1DagBuilder} - */ -declare function fileBuilder(file: import("../../types").File, block: import("../../types").BlockAPI, options: import("../../types").ImporterOptions): Promise; -declare namespace fileBuilder { - export { BlockAPI, File, ImporterOptions, Reducer, DAGBuilder, FileDAGBuilder }; -} -type BlockAPI = import('../../types').BlockAPI; -type File = import('../../types').File; -type ImporterOptions = import('../../types').ImporterOptions; -type Reducer = import('../../types').Reducer; -type DAGBuilder = import('../../types').DAGBuilder; -type FileDAGBuilder = import('../../types').FileDAGBuilder; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map deleted file mode 100644 index 3677ef11..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/index.js"],"names":[],"mappings":";AA+LA;;GAEG;AACH,6MAQC;;;;gBA/LY,OAAO,aAAa,EAAE,QAAQ;YAC9B,OAAO,aAAa,EAAE,IAAI;uBAC1B,OAAO,aAAa,EAAE,eAAe;eACrC,OAAO,aAAa,EAAE,OAAO;kBAC7B,OAAO,aAAa,EAAE,UAAU;sBAChC,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts deleted file mode 100644 index 42ce17c0..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare const _exports: FileDAGBuilder; -export = _exports; -export type UnixFS = import('ipfs-unixfs').UnixFS; -export type ImporterOptions = import('../../types').ImporterOptions; -export type InProgressImportResult = import('../../types').InProgressImportResult; -export type TrickleDagNode = import('../../types').TrickleDagNode; -export type Reducer = import('../../types').Reducer; -export type FileDAGBuilder = import('../../types').FileDAGBuilder; -//# sourceMappingURL=trickle.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map deleted file mode 100644 index f2bff826..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trickle.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/trickle.js"],"names":[],"mappings":"wBAcU,cAAc;;qBATX,OAAO,aAAa,EAAE,MAAM;8BAC5B,OAAO,aAAa,EAAE,eAAe;qCACrC,OAAO,aAAa,EAAE,sBAAsB;6BAC5C,OAAO,aAAa,EAAE,cAAc;sBACpC,OAAO,aAAa,EAAE,OAAO;6BAC7B,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts deleted file mode 100644 index 143999a7..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export = dagBuilder; -/** - * @type {DAGBuilder} - */ -declare function dagBuilder(source: AsyncIterable | Iterable, block: import("../types").BlockAPI, options: import("../types").ImporterOptions): AsyncIterable<() => Promise>; -declare namespace dagBuilder { - export { File, Directory, DAGBuilder, Chunker, ChunkValidator }; -} -type File = import('../types').File; -type Directory = import('../types').Directory; -type DAGBuilder = import('../types').DAGBuilder; -type Chunker = import('../types').Chunker; -type ChunkValidator = import('../types').ChunkValidator; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map deleted file mode 100644 index b25ac40f..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/index.js"],"names":[],"mappings":";AAsDA;;GAEG;AACH,gSA4DC;;;;YA9GY,OAAO,UAAU,EAAE,IAAI;iBACvB,OAAO,UAAU,EAAE,SAAS;kBAC5B,OAAO,UAAU,EAAE,UAAU;eAC7B,OAAO,UAAU,EAAE,OAAO;sBAC1B,OAAO,UAAU,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts deleted file mode 100644 index d3df9e80..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export = validateChunks; -/** - * @typedef {import('../types').ChunkValidator} ChunkValidator - */ -/** - * @type {ChunkValidator} - */ -declare function validateChunks(source: AsyncIterable): AsyncIterable; -declare namespace validateChunks { - export { ChunkValidator }; -} -type ChunkValidator = import('../types').ChunkValidator; -//# sourceMappingURL=validate-chunks.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map deleted file mode 100644 index a2e34ccc..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validate-chunks.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/validate-chunks.js"],"names":[],"mappings":";AAKA;;GAEG;AAEH;;GAEG;AACH,8FAgBC;;;;sBAtBY,OAAO,UAAU,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts deleted file mode 100644 index 40b912f7..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export = DirFlat; -/** - * @typedef {import('./types').ImporterOptions} ImporterOptions - * @typedef {import('./types').ImportResult} ImportResult - * @typedef {import('./types').InProgressImportResult} InProgressImportResult - * @typedef {import('./types').BlockAPI} BlockAPI - * @typedef {import('./dir').DirProps} DirProps - * @typedef {import('@ipld/dag-pb').PBNode} PBNode - * @typedef {import('@ipld/dag-pb').PBLink} PBLink - */ -declare class DirFlat extends Dir { - /** @type {{ [key: string]: InProgressImportResult | Dir }} */ - _children: { - [key: string]: import("./types").InProgressImportResult | Dir; - }; - childCount(): number; - directChildrenCount(): number; - onlyChild(): import("./types").InProgressImportResult | Dir; -} -declare namespace DirFlat { - export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, DirProps, PBNode, PBLink }; -} -import Dir = require("./dir"); -type ImporterOptions = import('./types').ImporterOptions; -type ImportResult = import('./types').ImportResult; -type InProgressImportResult = import('./types').InProgressImportResult; -type BlockAPI = import('./types').BlockAPI; -type DirProps = import('./dir').DirProps; -type PBNode = import('@ipld/dag-pb').PBNode; -type PBLink = import('@ipld/dag-pb').PBLink; -//# sourceMappingURL=dir-flat.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map deleted file mode 100644 index 7b35660b..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dir-flat.d.ts","sourceRoot":"","sources":["../../src/dir-flat.js"],"names":[],"mappings":";AAOA;;;;;;;;GAQG;AAEH;IAQI,8DAA8D;IAC9D;;MAAmB;IAqBrB,qBAEC;IAED,8BAEC;IAED,4DAEC;CAuEF;;;;;uBAxHY,OAAO,SAAS,EAAE,eAAe;oBACjC,OAAO,SAAS,EAAE,YAAY;8BAC9B,OAAO,SAAS,EAAE,sBAAsB;gBACxC,OAAO,SAAS,EAAE,QAAQ;gBAC1B,OAAO,OAAO,EAAE,QAAQ;cACxB,OAAO,cAAc,EAAE,MAAM;cAC7B,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts deleted file mode 100644 index cfdaee94..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export = DirSharded; -/** - * @typedef {import('./types').ImporterOptions} ImporterOptions - * @typedef {import('./types').ImportResult} ImportResult - * @typedef {import('./types').InProgressImportResult} InProgressImportResult - * @typedef {import('./types').BlockAPI} BlockAPI - */ -/** - * @typedef {import('./dir').DirProps} DirProps - */ -declare class DirSharded extends Dir { - /** @type {Bucket} */ - _bucket: Bucket; - childCount(): number; - directChildrenCount(): number; - onlyChild(): Bucket | Bucket.BucketChild; -} -declare namespace DirSharded { - export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, DirProps }; -} -import Dir = require("./dir"); -import { Bucket } from "hamt-sharding"; -type InProgressImportResult = import('./types').InProgressImportResult; -type ImporterOptions = import('./types').ImporterOptions; -type ImportResult = import('./types').ImportResult; -type BlockAPI = import('./types').BlockAPI; -type DirProps = import('./dir').DirProps; -//# sourceMappingURL=dir-sharded.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map deleted file mode 100644 index 885d2704..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dir-sharded.d.ts","sourceRoot":"","sources":["../../src/dir-sharded.js"],"names":[],"mappings":";AAQA;;;;;GAKG;AAEH;;GAEG;AAEH;IAQI,mDAAmD;IACnD,SADW,OAAO,sBAAsB,GAAG,GAAG,CAAC,CAI7C;IAkBJ,qBAEC;IAED,8BAEC;IAED,yIAEC;CAuBF;;;;;;8BAvEY,OAAO,SAAS,EAAE,sBAAsB;uBAFxC,OAAO,SAAS,EAAE,eAAe;oBACjC,OAAO,SAAS,EAAE,YAAY;gBAE9B,OAAO,SAAS,EAAE,QAAQ;gBAI1B,OAAO,OAAO,EAAE,QAAQ"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts deleted file mode 100644 index b9edc648..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -export = Dir; -/** - * @typedef {import('./types').ImporterOptions} ImporterOptions - * @typedef {import('./types').ImportResult} ImportResult - * @typedef {import('./types').InProgressImportResult} InProgressImportResult - * @typedef {import('./types').BlockAPI} BlockAPI - * @typedef {import('multiformats/cid').CID} CID - * @typedef {object} DirProps - * @property {boolean} root - * @property {boolean} dir - * @property {string} path - * @property {boolean} dirty - * @property {boolean} flat - * @property {Dir} [parent] - * @property {string} [parentKey] - * @property {import('ipfs-unixfs').UnixFS} [unixfs] - * @property {number} [mode] - * @property {import('ipfs-unixfs').Mtime} [mtime] - */ -declare class Dir { - /** - * - * @param {DirProps} props - * @param {ImporterOptions} options - */ - constructor(props: DirProps, options: ImporterOptions); - options: import("./types").ImporterOptions; - root: boolean; - dir: boolean; - path: string; - dirty: boolean; - flat: boolean; - parent: import("./dir") | undefined; - parentKey: string | undefined; - unixfs: import("ipfs-unixfs").UnixFS | undefined; - mode: number | undefined; - mtime: import("ipfs-unixfs/dist/src/types").Mtime | undefined; - /** @type {CID | undefined} */ - cid: CID | undefined; - /** @type {number | undefined} */ - size: number | undefined; - /** - * @param {string} name - * @param {InProgressImportResult | Dir} value - */ - put(name: string, value: InProgressImportResult | Dir): Promise; - /** - * @param {string} name - * @returns {Promise} - */ - get(name: string): Promise; - /** - * @returns {AsyncIterable<{ key: string, child: InProgressImportResult | Dir}>} - */ - eachChildSeries(): AsyncIterable<{ - key: string; - child: InProgressImportResult | Dir; - }>; - /** - * @param {BlockAPI} block - * @returns {AsyncIterable} - */ - flush(block: BlockAPI): AsyncIterable; -} -declare namespace Dir { - export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, CID, DirProps }; -} -type CID = import('multiformats/cid').CID; -type InProgressImportResult = import('./types').InProgressImportResult; -type BlockAPI = import('./types').BlockAPI; -type ImportResult = import('./types').ImportResult; -type DirProps = { - root: boolean; - dir: boolean; - path: string; - dirty: boolean; - flat: boolean; - parent?: import("./dir") | undefined; - parentKey?: string | undefined; - unixfs?: import("ipfs-unixfs").UnixFS | undefined; - mode?: number | undefined; - mtime?: import("ipfs-unixfs/dist/src/types").Mtime | undefined; -}; -type ImporterOptions = import('./types').ImporterOptions; -//# sourceMappingURL=dir.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map deleted file mode 100644 index 28399a34..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;OAIG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,oCAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB,8DAAwB;IAExB,8BAA8B;IAC9B,KADW,GAAG,GAAG,SAAS,CACN;IACpB,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACR;IAGvB;;;OAGG;IACH,UAHW,MAAM,SACN,sBAAsB,GAAG,GAAG,iBAEZ;IAE3B;;;OAGG;IACH,UAHW,MAAM,GACJ,QAAQ,sBAAsB,GAAG,GAAG,GAAG,SAAS,CAAC,CAI7D;IAED;;OAEG;IACH,mBAFa,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAA;KAAC,CAAC,CAEjD;IAE9B;;;OAGG;IACH,aAHW,QAAQ,GACN,cAAc,YAAY,CAAC,CAEf;CAC1B;;;;WA/DY,OAAO,kBAAkB,EAAE,GAAG;8BAF9B,OAAO,SAAS,EAAE,sBAAsB;gBACxC,OAAO,SAAS,EAAE,QAAQ;oBAF1B,OAAO,SAAS,EAAE,YAAY;;UAK7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;uBAVR,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts deleted file mode 100644 index 02dfe981..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare function _exports(child: Dir | null, dir: Dir, threshold: number, options: ImporterOptions): Promise; -export = _exports; -export type Dir = import('./dir'); -export type ImporterOptions = import('./types').ImporterOptions; -import DirSharded = require("./dir-sharded"); -//# sourceMappingURL=flat-to-shard.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map deleted file mode 100644 index 30a3a53b..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flat-to-shard.d.ts","sourceRoot":"","sources":["../../src/flat-to-shard.js"],"names":[],"mappings":"AAiBiB,iCANN,GAAG,GAAG,IAAI,OACV,GAAG,aACH,MAAM,WACN,eAAe,GACb,QAAQ,UAAU,CAAC,CA6B/B;;kBAtCY,OAAO,OAAO,CAAC;8BACf,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/index.d.ts deleted file mode 100644 index 0f654835..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export type BlockAPI = import('./types').BlockAPI; -export type ImportCandidate = import('./types').ImportCandidate; -export type UserImporterOptions = import('./types').UserImporterOptions; -export type ImporterOptions = import('./types').ImporterOptions; -export type Directory = import('./types').Directory; -export type File = import('./types').File; -export type ImportResult = import('./types').ImportResult; -export type Chunker = import('./types').Chunker; -export type DAGBuilder = import('./types').DAGBuilder; -export type TreeBuilder = import('./types').TreeBuilder; -export type BufferImporter = import('./types').BufferImporter; -export type ChunkValidator = import('./types').ChunkValidator; -export type Reducer = import('./types').Reducer; -export type ProgressHandler = import('./types').ProgressHandler; -/** - * @typedef {import('./types').BlockAPI} BlockAPI - * @typedef {import('./types').ImportCandidate} ImportCandidate - * @typedef {import('./types').UserImporterOptions} UserImporterOptions - * @typedef {import('./types').ImporterOptions} ImporterOptions - * @typedef {import('./types').Directory} Directory - * @typedef {import('./types').File} File - * @typedef {import('./types').ImportResult} ImportResult - * - * @typedef {import('./types').Chunker} Chunker - * @typedef {import('./types').DAGBuilder} DAGBuilder - * @typedef {import('./types').TreeBuilder} TreeBuilder - * @typedef {import('./types').BufferImporter} BufferImporter - * @typedef {import('./types').ChunkValidator} ChunkValidator - * @typedef {import('./types').Reducer} Reducer - * @typedef {import('./types').ProgressHandler} ProgressHandler - */ -/** - * @param {AsyncIterable | Iterable | ImportCandidate} source - * @param {BlockAPI} block - * @param {UserImporterOptions} options - */ -export function importer(source: AsyncIterable | Iterable | ImportCandidate, block: BlockAPI, options?: UserImporterOptions): AsyncGenerator<{ - cid: import("multiformats/cid").CID; - path: string | undefined; - unixfs: import("ipfs-unixfs").UnixFS | undefined; - size: number; -}, void, unknown>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map deleted file mode 100644 index 6a5777a2..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"uBAMa,OAAO,SAAS,EAAE,QAAQ;8BAC1B,OAAO,SAAS,EAAE,eAAe;kCACjC,OAAO,SAAS,EAAE,mBAAmB;8BACrC,OAAO,SAAS,EAAE,eAAe;wBACjC,OAAO,SAAS,EAAE,SAAS;mBAC3B,OAAO,SAAS,EAAE,IAAI;2BACtB,OAAO,SAAS,EAAE,YAAY;sBAE9B,OAAO,SAAS,EAAE,OAAO;yBACzB,OAAO,SAAS,EAAE,UAAU;0BAC5B,OAAO,SAAS,EAAE,WAAW;6BAC7B,OAAO,SAAS,EAAE,cAAc;6BAChC,OAAO,SAAS,EAAE,cAAc;sBAChC,OAAO,SAAS,EAAE,OAAO;8BACzB,OAAO,SAAS,EAAE,eAAe;AAf9C;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,iCAJW,cAAc,eAAe,CAAC,GAAG,SAAS,eAAe,CAAC,GAAG,eAAe,SAC5E,QAAQ,YACR,mBAAmB;;;;;kBAwC7B"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/options.d.ts b/packages/ipfs-unixfs-importer/dist/src/options.d.ts deleted file mode 100644 index 6f391813..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/options.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function _exports(options?: UserImporterOptions): ImporterOptions; -export = _exports; -export type UserImporterOptions = import('./types').UserImporterOptions; -export type ImporterOptions = import('./types').ImporterOptions; -//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map deleted file mode 100644 index c9e50ba1..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.js"],"names":[],"mappings":"AAwEiB,oCAHN,mBAAmB,GACjB,eAAe,CAI3B;;kCA9CY,OAAO,SAAS,EAAE,mBAAmB;8BACrC,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts deleted file mode 100644 index 8f654459..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export = treeBuilder; -/** - * @type {TreeBuilder} - */ -declare function treeBuilder(source: AsyncIterable, block: import("./types").BlockAPI, options: import("./types").ImporterOptions): AsyncIterable; -declare namespace treeBuilder { - export { ImportResult, InProgressImportResult, ImporterOptions, BlockAPI, TreeBuilder }; -} -type ImportResult = import('./types').ImportResult; -type InProgressImportResult = import('./types').InProgressImportResult; -type ImporterOptions = import('./types').ImporterOptions; -type BlockAPI = import('./types').BlockAPI; -type TreeBuilder = (source: AsyncIterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable; -//# sourceMappingURL=tree-builder.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map deleted file mode 100644 index c9dd22ca..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/tree-builder.js"],"names":[],"mappings":";AAiFA;;GAEG;AACH,4NAiCC;;;;oBA7GY,OAAO,SAAS,EAAE,YAAY;8BAC9B,OAAO,SAAS,EAAE,sBAAsB;uBACxC,OAAO,SAAS,EAAE,eAAe;gBACjC,OAAO,SAAS,EAAE,QAAQ;4BACjB,cAAc,sBAAsB,CAAC,SAAS,QAAQ,WAAW,eAAe,KAAK,cAAc,YAAY,CAAC"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/types.d.ts b/packages/ipfs-unixfs-importer/dist/src/types.d.ts deleted file mode 100644 index 2d32eefd..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/types.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { UnixFS, Mtime } from 'ipfs-unixfs' -import { CID } from 'multiformats/cid' -import { HashName } from 'multihashes' -import { CodecName } from 'multicodec' -import MultihashDigest from 'multiformats/hashes/hasher' - -interface ImportCandidate { - path?: string - content?: AsyncIterable - mtime?: Mtime - mode?: number -} - -interface File { - content: AsyncIterable - path?: string - mtime?: Mtime - mode?: number -} - -interface Directory { - path?: string - mtime?: Mtime - mode?: number -} - -interface ImportResult { - cid: CID - size: number - path?: string - unixfs?: UnixFS -} - -interface InProgressImportResult extends ImportResult { - single?: boolean -} - -type ChunkerType = 'fixed' | 'rabin' -type ProgressHandler = (chunkSize: number, path?: string) => void -type HamtHashFn = (value: Uint8Array) => Promise -type Chunker = (source: AsyncIterable, options: ImporterOptions) => AsyncIterable -type DAGBuilder = (source: AsyncIterable | Iterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable<() => Promise> -type TreeBuilder = (source: AsyncIterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable -type BufferImporter = (file: File, block: BlockAPI, options: ImporterOptions) => AsyncIterable<() => Promise> -type ChunkValidator = (source: AsyncIterable, options: ImporterOptions) => AsyncIterable -type UnixFSV1DagBuilder = (item: T, block: BlockAPI, options: ImporterOptions) => Promise -type Reducer = (leaves: InProgressImportResult[]) => Promise - -type FileDAGBuilder = (source: AsyncIterable | Iterable, reducer: Reducer, options: ImporterOptions) => Promise - -interface UserImporterOptions { - strategy?: 'balanced' | 'flat' | 'trickle' - rawLeaves?: boolean - onlyHash?: boolean - reduceSingleLeafToSelf?: boolean - hasher?: MultihashDigest - leafType?: 'file' | 'raw' - cidVersion?: CIDVersion - progress?: ProgressHandler - shardSplitThreshold?: number - fileImportConcurrency?: number - blockWriteConcurrency?: number - minChunkSize?: number - maxChunkSize?: number - avgChunkSize?: number - window?: number - polynomial?: number - maxChildrenPerNode?: number - layerRepeat?: number - wrapWithDirectory?: boolean - pin?: boolean - recursive?: boolean - hidden?: boolean - preload?: boolean - timeout?: number - hamtHashFn?: HamtHashFn - hamtBucketBits?: number - hamtHashCode?: number - chunker?: ChunkerType | Chunker - dagBuilder?: DAGBuilder - treeBuilder?: TreeBuilder - bufferImporter?: BufferImporter - chunkValidator?: ChunkValidator -} - -interface ImporterOptions { - strategy: 'balanced' | 'flat' | 'trickle' - rawLeaves: boolean - onlyHash: boolean - reduceSingleLeafToSelf: boolean - hasher: MultihashDigest - leafType: 'file' | 'raw' - cidVersion: CIDVersion - progress: ProgressHandler - shardSplitThreshold: number - fileImportConcurrency: number - blockWriteConcurrency: number - minChunkSize: number - maxChunkSize: number - avgChunkSize: number - window: number - polynomial: number - maxChildrenPerNode: number - layerRepeat: number - wrapWithDirectory: boolean - pin: boolean - recursive: boolean - hidden: boolean - preload: boolean - timeout?: number - hamtHashFn: HamtHashFn - hamtBucketBits: number - hamtHashCode: number - chunker: ChunkerType | Chunker - dagBuilder?: DAGBuilder - treeBuilder?: TreeBuilder - bufferImporter?: BufferImporter - chunkValidator?: ChunkValidator -} - -export interface TrickleDagNode { - children: InProgressImportResult[], - depth: number, - maxDepth: number, - maxChildren: number, - data?: InProgressImportResult[], - parent?: TrickleDagNode - cid?: CID, - size?: number, - unixfs?: UnixFS -} - -export interface PersistOptions { - //codec?: string - codec?: number - cidVersion: CIDVersion - hasher: MultihashDigest - onlyHash: boolean - preload?: boolean - timeout?: number - signal?: AbortSignal -} - -// TODO vmx 2021-03-24: decide where to put this -export interface Block { - cid: CID - bytes: Uint8Array -} - -// TODO: remove this and get from core-ipfs-types -export interface BlockAPI { - get: (cid: CID, options?: BlockOptions) => Promise - put: (block: Block, options?: PutOptions) => Promise -} - -// TODO: remove this and get from core-ipfs-types -export interface BlockOptions { - signal?: AbortSignal - timeout?: number - preload?: boolean -} - -// TODO: remove this and get from core-ipfs-types -export interface PutOptions extends BlockOptions { - onlyHash?: boolean - pin?: boolean -} diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts deleted file mode 100644 index 29e94370..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export = persist; -/** - * @param {Uint8Array} buffer - * @param {import('../types').BlockAPI} block - * @param {import('../types').PersistOptions} options - */ -declare function persist(buffer: Uint8Array, block: import('../types').BlockAPI, options: import('../types').PersistOptions): Promise; -import { CID } from "multiformats/cid"; -//# sourceMappingURL=persist.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map deleted file mode 100644 index b45eeb7c..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/utils/persist.js"],"names":[],"mappings":";AAKA;;;;GAIG;AACH,iCAJW,UAAU,SACV,OAAO,UAAU,EAAE,QAAQ,WAC3B,OAAO,UAAU,EAAE,cAAc,gBA+B3C"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts deleted file mode 100644 index 0888cc82..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export = toPathComponents; -declare function toPathComponents(path?: string): string[]; -//# sourceMappingURL=to-path-components.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map deleted file mode 100644 index e1370932..00000000 --- a/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"to-path-components.d.ts","sourceRoot":"","sources":["../../../src/utils/to-path-components.js"],"names":[],"mappings":";AAEA,2DAMC"} \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/src/index.d.ts b/packages/ipfs-unixfs/dist/src/index.d.ts deleted file mode 100644 index 02e4ff88..00000000 --- a/packages/ipfs-unixfs/dist/src/index.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -export type Mtime = import('./types').Mtime; -export type MtimeLike = import('./types').MtimeLike; -declare class Data { - /** - * Decode from protobuf https://github.com/ipfs/specs/blob/master/UNIXFS.md - * - * @param {Uint8Array} marshaled - */ - static unmarshal(marshaled: Uint8Array): Data; - /** - * @param {object} [options] - * @param {string} [options.type='file'] - * @param {Uint8Array} [options.data] - * @param {number[]} [options.blockSizes] - * @param {number} [options.hashType] - * @param {number} [options.fanout] - * @param {MtimeLike | null} [options.mtime] - * @param {number | string} [options.mode] - */ - constructor(options?: { - type?: string | undefined; - data?: Uint8Array | undefined; - blockSizes?: number[] | undefined; - hashType?: number | undefined; - fanout?: number | undefined; - mtime?: import("./types").MtimeLike | null | undefined; - mode?: string | number | undefined; - } | undefined); - type: string; - data: Uint8Array | undefined; - hashType: number | undefined; - fanout: number | undefined; - /** @type {number[]} */ - blockSizes: number[]; - _originalMode: number; - /** - * @param {number | undefined} mode - */ - set mode(arg: number | undefined); - /** - * @returns {number | undefined} - */ - get mode(): number | undefined; - mtime: import("./types").Mtime | undefined; - _mode: number | undefined; - isDirectory(): boolean; - /** - * @param {number} size - */ - addBlockSize(size: number): void; - /** - * @param {number} index - */ - removeBlockSize(index: number): void; - /** - * Returns `0` for directories or `data.length + sum(blockSizes)` for everything else - */ - fileSize(): number; - /** - * encode to protobuf Uint8Array - */ - marshal(): Uint8Array; -} -/** - * @param {string | number | undefined} [mode] - */ -export function parseMode(mode?: string | number | undefined): number | undefined; -/** - * @param {any} input - */ -export function parseMtime(input: any): import("./types").Mtime | undefined; -export { Data as UnixFS }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/src/index.d.ts.map b/packages/ipfs-unixfs/dist/src/index.d.ts.map deleted file mode 100644 index 7f8672a2..00000000 --- a/packages/ipfs-unixfs/dist/src/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"oBAQa,OAAO,SAAS,EAAE,KAAK;wBACvB,OAAO,SAAS,EAAE,SAAS;AAmHxC;IACE;;;;OAIG;IACH,4BAFW,UAAU,QA4BpB;IAED;;;;;;;;;OASG;IACH;;;;;;;;mBAkCC;IAjBC,aAA0B;IAC1B,6BAAgB;IAChB,6BAAwB;IACxB,2BAAoB;IAEpB,uBAAuB;IACvB,YADW,MAAM,EAAE,CACe;IAClC,sBAAsB;IAYxB;;OAEG;IACH,kCAQC;IAED;;OAEG;IACH,+BAEC;IA1BG,2CAA8B;IAYhC,0BAA4E;IAgB9E,uBAEC;IAED;;OAEG;IACH,mBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,uBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,mBAgBC;IAED;;OAEG;IACH,sBA+DC;CACF;AA7SD;;GAEG;AACH,iCAFW,MAAM,GAAG,MAAM,GAAG,SAAS,sBAoBrC;AAED;;GAEG;AACH,kCAFW,GAAG,uCAqEb"} \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/src/types.d.ts b/packages/ipfs-unixfs/dist/src/types.d.ts deleted file mode 100644 index cedc5057..00000000 --- a/packages/ipfs-unixfs/dist/src/types.d.ts +++ /dev/null @@ -1,7 +0,0 @@ - -export interface Mtime { - secs: number - nsecs?: number -} - -export type MtimeLike = Mtime | { Seconds: number, FractionalNanoseconds?: number } | [number, number] | Date diff --git a/packages/ipfs-unixfs/dist/src/unixfs.d.ts b/packages/ipfs-unixfs/dist/src/unixfs.d.ts deleted file mode 100644 index ca5a8549..00000000 --- a/packages/ipfs-unixfs/dist/src/unixfs.d.ts +++ /dev/null @@ -1,238 +0,0 @@ -import * as $protobuf from "protobufjs"; -/** Properties of a Data. */ -export interface IData { - - /** Data Type */ - Type: Data.DataType; - - /** Data Data */ - Data?: (Uint8Array|null); - - /** Data filesize */ - filesize?: (number|null); - - /** Data blocksizes */ - blocksizes?: (number[]|null); - - /** Data hashType */ - hashType?: (number|null); - - /** Data fanout */ - fanout?: (number|null); - - /** Data mode */ - mode?: (number|null); - - /** Data mtime */ - mtime?: (IUnixTime|null); -} - -/** Represents a Data. */ -export class Data implements IData { - - /** - * Constructs a new Data. - * @param [p] Properties to set - */ - constructor(p?: IData); - - /** Data Type. */ - public Type: Data.DataType; - - /** Data Data. */ - public Data: Uint8Array; - - /** Data filesize. */ - public filesize: number; - - /** Data blocksizes. */ - public blocksizes: number[]; - - /** Data hashType. */ - public hashType: number; - - /** Data fanout. */ - public fanout: number; - - /** Data mode. */ - public mode: number; - - /** Data mtime. */ - public mtime?: (IUnixTime|null); - - /** - * Encodes the specified Data message. Does not implicitly {@link Data.verify|verify} messages. - * @param m Data message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: IData, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Data message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Data - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): Data; - - /** - * Creates a Data message from a plain object. Also converts values to their respective internal types. - * @param d Plain object - * @returns Data - */ - public static fromObject(d: { [k: string]: any }): Data; - - /** - * Creates a plain object from a Data message. Also converts values to other types if specified. - * @param m Data - * @param [o] Conversion options - * @returns Plain object - */ - public static toObject(m: Data, o?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Data to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; -} - -export namespace Data { - - /** DataType enum. */ - enum DataType { - Raw = 0, - Directory = 1, - File = 2, - Metadata = 3, - Symlink = 4, - HAMTShard = 5 - } -} - -/** Properties of an UnixTime. */ -export interface IUnixTime { - - /** UnixTime Seconds */ - Seconds: number; - - /** UnixTime FractionalNanoseconds */ - FractionalNanoseconds?: (number|null); -} - -/** Represents an UnixTime. */ -export class UnixTime implements IUnixTime { - - /** - * Constructs a new UnixTime. - * @param [p] Properties to set - */ - constructor(p?: IUnixTime); - - /** UnixTime Seconds. */ - public Seconds: number; - - /** UnixTime FractionalNanoseconds. */ - public FractionalNanoseconds: number; - - /** - * Encodes the specified UnixTime message. Does not implicitly {@link UnixTime.verify|verify} messages. - * @param m UnixTime message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: IUnixTime, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnixTime message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns UnixTime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): UnixTime; - - /** - * Creates an UnixTime message from a plain object. Also converts values to their respective internal types. - * @param d Plain object - * @returns UnixTime - */ - public static fromObject(d: { [k: string]: any }): UnixTime; - - /** - * Creates a plain object from an UnixTime message. Also converts values to other types if specified. - * @param m UnixTime - * @param [o] Conversion options - * @returns Plain object - */ - public static toObject(m: UnixTime, o?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnixTime to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; -} - -/** Properties of a Metadata. */ -export interface IMetadata { - - /** Metadata MimeType */ - MimeType?: (string|null); -} - -/** Represents a Metadata. */ -export class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [p] Properties to set - */ - constructor(p?: IMetadata); - - /** Metadata MimeType. */ - public MimeType: string; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link Metadata.verify|verify} messages. - * @param m Metadata message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: IMetadata, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): Metadata; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param d Plain object - * @returns Metadata - */ - public static fromObject(d: { [k: string]: any }): Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param m Metadata - * @param [o] Conversion options - * @returns Plain object - */ - public static toObject(m: Metadata, o?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; -} diff --git a/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts deleted file mode 100644 index 2e4973f1..00000000 --- a/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=unixfs-format.spec.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map deleted file mode 100644 index 3fd95c66..00000000 --- a/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"unixfs-format.spec.d.ts","sourceRoot":"","sources":["../../test/unixfs-format.spec.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo b/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo deleted file mode 100644 index f5cb3ae4..00000000 --- a/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo +++ /dev/null @@ -1,1372 +0,0 @@ -{ - "program": { - "fileInfos": { - "../../../node_modules/typescript/lib/lib.es5.d.ts": { - "version": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895", - "signature": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.d.ts": { - "version": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", - "signature": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", - "affectsGlobalScope": false - }, - "../../../node_modules/typescript/lib/lib.es2016.d.ts": { - "version": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", - "signature": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", - "affectsGlobalScope": false - }, - "../../../node_modules/typescript/lib/lib.es2017.d.ts": { - "version": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", - "signature": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", - "affectsGlobalScope": false - }, - "../../../node_modules/typescript/lib/lib.es2018.d.ts": { - "version": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", - "signature": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", - "affectsGlobalScope": false - }, - "../../../node_modules/typescript/lib/lib.es2019.d.ts": { - "version": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", - "signature": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", - "affectsGlobalScope": false - }, - "../../../node_modules/typescript/lib/lib.es2020.d.ts": { - "version": "e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940", - "signature": "e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940", - "affectsGlobalScope": false - }, - "../../../node_modules/typescript/lib/lib.dom.d.ts": { - "version": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b", - "signature": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.dom.iterable.d.ts": { - "version": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", - "signature": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.core.d.ts": { - "version": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", - "signature": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.collection.d.ts": { - "version": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", - "signature": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.generator.d.ts": { - "version": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", - "signature": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts": { - "version": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", - "signature": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.promise.d.ts": { - "version": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", - "signature": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts": { - "version": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357", - "signature": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts": { - "version": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6", - "signature": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts": { - "version": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", - "signature": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": { - "version": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", - "signature": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts": { - "version": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", - "signature": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2017.object.d.ts": { - "version": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", - "signature": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": { - "version": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", - "signature": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2017.string.d.ts": { - "version": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", - "signature": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2017.intl.d.ts": { - "version": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", - "signature": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": { - "version": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", - "signature": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": { - "version": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", - "signature": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": { - "version": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", - "signature": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2018.intl.d.ts": { - "version": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", - "signature": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2018.promise.d.ts": { - "version": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", - "signature": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts": { - "version": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", - "signature": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2019.array.d.ts": { - "version": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", - "signature": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2019.object.d.ts": { - "version": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", - "signature": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2019.string.d.ts": { - "version": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", - "signature": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts": { - "version": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", - "signature": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts": { - "version": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", - "signature": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2020.promise.d.ts": { - "version": "7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862", - "signature": "7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts": { - "version": "e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40", - "signature": "e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2020.string.d.ts": { - "version": "faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e", - "signature": "faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts": { - "version": "936d7d2e8851af9ccfa5333b15e877a824417d352b1d7fd06388639dc69ef80a", - "signature": "936d7d2e8851af9ccfa5333b15e877a824417d352b1d7fd06388639dc69ef80a", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.es2020.intl.d.ts": { - "version": "e79ca55569f09a5dc3354be04dba4ae85865b1dce98bf46738ffe231c669621f", - "signature": "e79ca55569f09a5dc3354be04dba4ae85865b1dce98bf46738ffe231c669621f", - "affectsGlobalScope": true - }, - "../../../node_modules/typescript/lib/lib.esnext.intl.d.ts": { - "version": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e", - "signature": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e", - "affectsGlobalScope": true - }, - "../../../node_modules/protobufjs/index.d.ts": { - "version": "1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da", - "signature": "1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da", - "affectsGlobalScope": false - }, - "../src/unixfs.d.ts": { - "version": "73d05042815b5a14ebaf565ad246e1cc17b9a328d80da339bdd7b40f60f07828", - "signature": "73d05042815b5a14ebaf565ad246e1cc17b9a328d80da339bdd7b40f60f07828", - "affectsGlobalScope": false - }, - "../node_modules/err-code/dist/index.d.ts": { - "version": "a02a19deaa2c497d36c136459dd2561b57ebb22075ac0d6aad176430a8639aa1", - "signature": "a02a19deaa2c497d36c136459dd2561b57ebb22075ac0d6aad176430a8639aa1", - "affectsGlobalScope": false - }, - "../src/types.d.ts": { - "version": "df037a1c4bb54f6aa65f2482a6b1d976b5b3c31d49ea5b7deb10197e0608ae9e", - "signature": "df037a1c4bb54f6aa65f2482a6b1d976b5b3c31d49ea5b7deb10197e0608ae9e", - "affectsGlobalScope": false - }, - "../src/index.js": { - "version": "e6b6c563ab9741f3a6da94ed2e2390b207ec4bf2fe0fd0722df8acfdc930a713", - "signature": "ae7b1240bfe299fcb85712afff404a5b90c533375f4edd4b3c1515aaf1b5631d", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/chai/index.d.ts": { - "version": "dc45d3b40fe1c20d7823e179b8e41530ae32c221e0e4d759397f110647d8d566", - "signature": "dc45d3b40fe1c20d7823e179b8e41530ae32c221e0e4d759397f110647d8d566", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/chai-as-promised/index.d.ts": { - "version": "c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2", - "signature": "c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2", - "affectsGlobalScope": true - }, - "../../../node_modules/chai-parentheses/index.d.ts": { - "version": "c1f79c6d85cd84518fd7349588b3c61bdc189f58e3866f925cbf4631c81e31f9", - "signature": "c1f79c6d85cd84518fd7349588b3c61bdc189f58e3866f925cbf4631c81e31f9", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/chai-subset/index.d.ts": { - "version": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", - "signature": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", - "affectsGlobalScope": true - }, - "../../../node_modules/chai-bytes/index.d.ts": { - "version": "c6950fb69844190789c747a2ee2d49f34bd84273d692176d2c54d18d95fa3387", - "signature": "c6950fb69844190789c747a2ee2d49f34bd84273d692176d2c54d18d95fa3387", - "affectsGlobalScope": true - }, - "../../../node_modules/aegir/dist/utils/chai.d.ts": { - "version": "33f12bdfbbb9a552db999b771a6e831fd0c94b321f958a1473def67b2b3e473f", - "signature": "33f12bdfbbb9a552db999b771a6e831fd0c94b321f958a1473def67b2b3e473f", - "affectsGlobalScope": false - }, - "../../../node_modules/aegir/dist/utils/fixtures.d.ts": { - "version": "a8c10138639ce587acf8a6ce227177a737708fb592705fc0754c12d3a18b5130", - "signature": "a8c10138639ce587acf8a6ce227177a737708fb592705fc0754c12d3a18b5130", - "affectsGlobalScope": false - }, - "../../../node_modules/multibase/src/types.d.ts": { - "version": "40166c5a74c5420962d2f223211c3b99be001a5b60a23828d1c9eb7a768a877f", - "signature": "40166c5a74c5420962d2f223211c3b99be001a5b60a23828d1c9eb7a768a877f", - "affectsGlobalScope": false - }, - "../../../node_modules/uint8arrays/dist/from-string.d.ts": { - "version": "c44e238f0d17834e54b2fc91fbda1f4c42e807e26aaf052ed67a427c5870b963", - "signature": "c44e238f0d17834e54b2fc91fbda1f4c42e807e26aaf052ed67a427c5870b963", - "affectsGlobalScope": false - }, - "../test/unixfs-format.spec.js": { - "version": "c9e3da89b30af692dbc91420a4eb9d0cf6322b8a966d5adb3e868e843cabf084", - "signature": "f40e8bdafdffb90065d371f14774f2f279ec0f96ca7814be66c81f6fe84fcf2c", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/node/assert/strict.d.ts": { - "version": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", - "signature": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/globals.d.ts": { - "version": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", - "signature": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/node/async_hooks.d.ts": { - "version": "d20f08527645f62facb2d66c2b7bd31ea964b59c897d00bddb1efe8c13890b72", - "signature": "d20f08527645f62facb2d66c2b7bd31ea964b59c897d00bddb1efe8c13890b72", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/buffer.d.ts": { - "version": "5726b5ce952dc5beaeb08d5f64236632501568a54a390363d2339ba1dc5393b1", - "signature": "5726b5ce952dc5beaeb08d5f64236632501568a54a390363d2339ba1dc5393b1", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/child_process.d.ts": { - "version": "674bedbfd2004e233e2a266a3d2286e524f0d58787a98522d834d6ccda1d215a", - "signature": "674bedbfd2004e233e2a266a3d2286e524f0d58787a98522d834d6ccda1d215a", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/cluster.d.ts": { - "version": "714637d594e1a38a075091fe464ca91c6abc0b154784b4287f6883200e28ccef", - "signature": "714637d594e1a38a075091fe464ca91c6abc0b154784b4287f6883200e28ccef", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/console.d.ts": { - "version": "23edba5f47d3409810c563fe8034ae2c59e718e1ef8570f4152ccdde1915a096", - "signature": "23edba5f47d3409810c563fe8034ae2c59e718e1ef8570f4152ccdde1915a096", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/node/constants.d.ts": { - "version": "0e9c55f894ca2d9cf63b5b0d43a8cec1772dd560233fd16275bc7a485eb82f83", - "signature": "0e9c55f894ca2d9cf63b5b0d43a8cec1772dd560233fd16275bc7a485eb82f83", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/crypto.d.ts": { - "version": "4105385afd60b90ebac359d02a186250885839122850d776c0ad0e327c1afb65", - "signature": "4105385afd60b90ebac359d02a186250885839122850d776c0ad0e327c1afb65", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/dgram.d.ts": { - "version": "5f0a09de75bd965c21dc6d73671ba88830272f9ed62897bb0aa9754b369b1eed", - "signature": "5f0a09de75bd965c21dc6d73671ba88830272f9ed62897bb0aa9754b369b1eed", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/dns.d.ts": { - "version": "12b2ab05a3ededc0e8938f2e16e4e2e30fc82b6d97b414067c26253f26fce69a", - "signature": "12b2ab05a3ededc0e8938f2e16e4e2e30fc82b6d97b414067c26253f26fce69a", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/dns/promises.d.ts": { - "version": "e4ab7077b5adff3156d258a284986dc85e0bcf0fff1670df5c7f83efc25d4cc6", - "signature": "e4ab7077b5adff3156d258a284986dc85e0bcf0fff1670df5c7f83efc25d4cc6", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/domain.d.ts": { - "version": "06d2be99c3dd2ff52114d02ee443ba486ab482423df1941d3c97d6a92e924d70", - "signature": "06d2be99c3dd2ff52114d02ee443ba486ab482423df1941d3c97d6a92e924d70", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/node/events.d.ts": { - "version": "eb15e56611c2a853526a2e202234dd1676bd37cc2fcdbd9843470f7dafb37f15", - "signature": "eb15e56611c2a853526a2e202234dd1676bd37cc2fcdbd9843470f7dafb37f15", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/node/fs.d.ts": { - "version": "2e0b4284620082f63b144da8096b207e9e9590c0e599834332b90624db0cc4a8", - "signature": "2e0b4284620082f63b144da8096b207e9e9590c0e599834332b90624db0cc4a8", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/fs/promises.d.ts": { - "version": "c98ce957db9eebd75f53edda3f6893e05ab2d2283b5667b18e31bcdb6427ed10", - "signature": "c98ce957db9eebd75f53edda3f6893e05ab2d2283b5667b18e31bcdb6427ed10", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/http.d.ts": { - "version": "37eed30fc8318b8ac76eac6f41d0758a9d0bffd8f3ff353e3ad0f8717dd08d92", - "signature": "37eed30fc8318b8ac76eac6f41d0758a9d0bffd8f3ff353e3ad0f8717dd08d92", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/http2.d.ts": { - "version": "2f69728fd1ca1f381879bbf20a42ae47a8f7286e000afd138c6cf870d90d882f", - "signature": "2f69728fd1ca1f381879bbf20a42ae47a8f7286e000afd138c6cf870d90d882f", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/https.d.ts": { - "version": "1978992206803f5761e99e893d93b25abc818c5fe619674fdf2ae02b29f641ba", - "signature": "1978992206803f5761e99e893d93b25abc818c5fe619674fdf2ae02b29f641ba", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/inspector.d.ts": { - "version": "05fbe81f09fc455a2c343d2458d2b3c600c90b92b22926be765ee79326be9466", - "signature": "05fbe81f09fc455a2c343d2458d2b3c600c90b92b22926be765ee79326be9466", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/module.d.ts": { - "version": "8e7d6dae9e19bbe47600dcfd4418db85b30ae7351474ea0aad5e628f9845d340", - "signature": "8e7d6dae9e19bbe47600dcfd4418db85b30ae7351474ea0aad5e628f9845d340", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/net.d.ts": { - "version": "2c381d36201776828c67a307ad5fd8cbcf9ecaffb1fc7f77f7ce433d1a632b7f", - "signature": "2c381d36201776828c67a307ad5fd8cbcf9ecaffb1fc7f77f7ce433d1a632b7f", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/os.d.ts": { - "version": "32542c4660ecda892a333a533feedba31738ee538ef6a78eb73af647137bc3fc", - "signature": "32542c4660ecda892a333a533feedba31738ee538ef6a78eb73af647137bc3fc", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/path.d.ts": { - "version": "0ecacea5047d1a7d350e7049dbd22f26435be5e8736a81a56afec5b3264db1ca", - "signature": "0ecacea5047d1a7d350e7049dbd22f26435be5e8736a81a56afec5b3264db1ca", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/perf_hooks.d.ts": { - "version": "ffcb4ebde21f83370ed402583888b28651d2eb7f05bfec9482eb46d82adedd7f", - "signature": "ffcb4ebde21f83370ed402583888b28651d2eb7f05bfec9482eb46d82adedd7f", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/process.d.ts": { - "version": "fcb95c45150c717706119f12f2a3639d51baa041cd5bb441eb8501e04b52c501", - "signature": "fcb95c45150c717706119f12f2a3639d51baa041cd5bb441eb8501e04b52c501", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/node/punycode.d.ts": { - "version": "a7b43c69f9602d198825e403ee34e5d64f83c48b391b2897e8c0e6f72bca35f8", - "signature": "a7b43c69f9602d198825e403ee34e5d64f83c48b391b2897e8c0e6f72bca35f8", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/querystring.d.ts": { - "version": "f4a3fc4efc6944e7b7bd4ccfa45e0df68b6359808e6cf9d061f04fd964a7b2d3", - "signature": "f4a3fc4efc6944e7b7bd4ccfa45e0df68b6359808e6cf9d061f04fd964a7b2d3", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/readline.d.ts": { - "version": "73cad675aead7a2c05cf934e7e700c61d84b2037ac1d576c3f751199b25331da", - "signature": "73cad675aead7a2c05cf934e7e700c61d84b2037ac1d576c3f751199b25331da", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/repl.d.ts": { - "version": "8c3137ba3583ec18484429ec1c8eff89efdc42730542f157b38b102fdccc0c71", - "signature": "8c3137ba3583ec18484429ec1c8eff89efdc42730542f157b38b102fdccc0c71", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/stream.d.ts": { - "version": "2b6906b19436e07d874a51a5829d94ab690337c4ee652735ab422a8f102168be", - "signature": "2b6906b19436e07d874a51a5829d94ab690337c4ee652735ab422a8f102168be", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/stream/promises.d.ts": { - "version": "1b98a8704d0c68520ccb02ac44782b7ffdaab40d23d2fa00e13923b528587f8b", - "signature": "1b98a8704d0c68520ccb02ac44782b7ffdaab40d23d2fa00e13923b528587f8b", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/string_decoder.d.ts": { - "version": "94ca7beec4e274d32362b54e0133152f7b4be9487db7b005070c03880b6363aa", - "signature": "94ca7beec4e274d32362b54e0133152f7b4be9487db7b005070c03880b6363aa", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/timers.d.ts": { - "version": "911175d5a29fce5f6f471bcab94524474a1f99eec9cb86fe96505a40ce75f972", - "signature": "911175d5a29fce5f6f471bcab94524474a1f99eec9cb86fe96505a40ce75f972", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/timers/promises.d.ts": { - "version": "8b4f4519834b57645d2483af74d6f5d1675260a5b0e9aa6026f3e021edd2c5e9", - "signature": "8b4f4519834b57645d2483af74d6f5d1675260a5b0e9aa6026f3e021edd2c5e9", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/tls.d.ts": { - "version": "bbf21f210782db4193359010a4710786add43e3b50aa42fc0d371f45b4e4d8d3", - "signature": "bbf21f210782db4193359010a4710786add43e3b50aa42fc0d371f45b4e4d8d3", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/trace_events.d.ts": { - "version": "0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a", - "signature": "0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/tty.d.ts": { - "version": "3ce933f0c3955f67f67eb7d6b5c83c2c54a18472c1d6f2bb651e51dd40c84837", - "signature": "3ce933f0c3955f67f67eb7d6b5c83c2c54a18472c1d6f2bb651e51dd40c84837", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/url.d.ts": { - "version": "631e96db896d645f7132c488ad34a16d71fd2be9f44696f8c98289ee1c8cbfa9", - "signature": "631e96db896d645f7132c488ad34a16d71fd2be9f44696f8c98289ee1c8cbfa9", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/util.d.ts": { - "version": "2c77230d381cba81eb6f87cda2fbfff6c0427c6546c2e2590110effff37c58f7", - "signature": "2c77230d381cba81eb6f87cda2fbfff6c0427c6546c2e2590110effff37c58f7", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/v8.d.ts": { - "version": "da86ee9a2f09a4583db1d5e37815894967e1f694ad9f3c25e84e0e4d40411e14", - "signature": "da86ee9a2f09a4583db1d5e37815894967e1f694ad9f3c25e84e0e4d40411e14", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/vm.d.ts": { - "version": "141a943e5690105898a67537a470f70b56d0e183441b56051d929e902376b7b2", - "signature": "141a943e5690105898a67537a470f70b56d0e183441b56051d929e902376b7b2", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/worker_threads.d.ts": { - "version": "0124e458b12ba82b08c87220a1c9d4fb7701dcda8f11e28f7d7266281501bcba", - "signature": "0124e458b12ba82b08c87220a1c9d4fb7701dcda8f11e28f7d7266281501bcba", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/zlib.d.ts": { - "version": "515ef1d99036ff0dafa5bf738e02222edea94e0d97a0aa0ff277ac5e96b57977", - "signature": "515ef1d99036ff0dafa5bf738e02222edea94e0d97a0aa0ff277ac5e96b57977", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/globals.global.d.ts": { - "version": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", - "signature": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/node/wasi.d.ts": { - "version": "780058f4a804c8bdcdd2f60e7af64b2bc57d149c1586ee3db732a84d659a50bf", - "signature": "780058f4a804c8bdcdd2f60e7af64b2bc57d149c1586ee3db732a84d659a50bf", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/ts3.6/base.d.ts": { - "version": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", - "signature": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/assert.d.ts": { - "version": "19d580a3b42ad5caeaee266ae958260e23f2df0549ee201c886c8bd7a4f01d4e", - "signature": "19d580a3b42ad5caeaee266ae958260e23f2df0549ee201c886c8bd7a4f01d4e", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/base.d.ts": { - "version": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", - "signature": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/node/index.d.ts": { - "version": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", - "signature": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/minimatch/index.d.ts": { - "version": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2", - "signature": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/glob/index.d.ts": { - "version": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", - "signature": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts": { - "version": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", - "signature": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/json-schema/index.d.ts": { - "version": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27", - "signature": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/json5/index.d.ts": { - "version": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538", - "signature": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/long/index.d.ts": { - "version": "e8465811693dfe4e96ef2b3dffda539d6edfe896961b7af37b44db2c0e48532b", - "signature": "e8465811693dfe4e96ef2b3dffda539d6edfe896961b7af37b44db2c0e48532b", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/minimist/index.d.ts": { - "version": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", - "signature": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/mocha/index.d.ts": { - "version": "0359800d3b440f8515001431cde1500944e156040577425eb3f7b80af0846612", - "signature": "0359800d3b440f8515001431cde1500944e156040577425eb3f7b80af0846612", - "affectsGlobalScope": true - }, - "../../../node_modules/@types/normalize-package-data/index.d.ts": { - "version": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", - "signature": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/parse-json/index.d.ts": { - "version": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", - "signature": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", - "affectsGlobalScope": false - }, - "../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts": { - "version": "b79a450a5233f10fa43da81c35a17f8eec71fea394d0ff91620819e0af513fe9", - "signature": "b79a450a5233f10fa43da81c35a17f8eec71fea394d0ff91620819e0af513fe9", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/sinon/index.d.ts": { - "version": "fc8a86547dc1da127bad3a5c71137b9e8bb9de3c91df12869dd52e3ff2346e61", - "signature": "fc8a86547dc1da127bad3a5c71137b9e8bb9de3c91df12869dd52e3ff2346e61", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/sinonjs__fake-timers/index.d.ts": { - "version": "558a9770503071d5a6fc6c596f7230bb79f2d034ced4a205bd1ebcad3b5879ec", - "signature": "558a9770503071d5a6fc6c596f7230bb79f2d034ced4a205bd1ebcad3b5879ec", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/yargs-parser/index.d.ts": { - "version": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", - "signature": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/yargs/index.d.ts": { - "version": "5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11", - "signature": "5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11", - "affectsGlobalScope": false - }, - "../../../node_modules/@types/yauzl/index.d.ts": { - "version": "3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26", - "signature": "3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26", - "affectsGlobalScope": false - } - }, - "options": { - "strict": true, - "outDir": "./", - "allowJs": true, - "checkJs": true, - "target": 7, - "lib": [ - "lib.es2020.d.ts", - "lib.es2020.promise.d.ts", - "lib.es2020.string.d.ts", - "lib.es2020.bigint.d.ts", - "lib.dom.d.ts", - "lib.dom.iterable.d.ts" - ], - "noEmit": false, - "noEmitOnError": true, - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true, - "incremental": true, - "composite": true, - "isolatedModules": true, - "removeComments": false, - "esModuleInterop": true, - "moduleResolution": 2, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": false, - "importsNotUsedAsValues": 2, - "forceConsistentCasingInFileNames": true, - "skipLibCheck": true, - "stripInternal": true, - "resolveJsonModule": true, - "configFilePath": "../tsconfig.json" - }, - "referencedMap": { - "../../../node_modules/@types/chai-as-promised/index.d.ts": [ - "../../../node_modules/@types/chai/index.d.ts" - ], - "../../../node_modules/@types/chai-subset/index.d.ts": [ - "../../../node_modules/@types/chai/index.d.ts" - ], - "../../../node_modules/@types/glob/index.d.ts": [ - "../../../node_modules/@types/minimatch/index.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/index.d.ts" - ], - "../../../node_modules/@types/node/assert.d.ts": [ - "../../../node_modules/@types/node/assert.d.ts" - ], - "../../../node_modules/@types/node/assert/strict.d.ts": [ - "../../../node_modules/@types/node/assert.d.ts" - ], - "../../../node_modules/@types/node/async_hooks.d.ts": [ - "../../../node_modules/@types/node/async_hooks.d.ts" - ], - "../../../node_modules/@types/node/base.d.ts": [ - "../../../node_modules/@types/node/assert.d.ts", - "../../../node_modules/@types/node/ts3.6/base.d.ts" - ], - "../../../node_modules/@types/node/buffer.d.ts": [ - "../../../node_modules/@types/node/buffer.d.ts" - ], - "../../../node_modules/@types/node/child_process.d.ts": [ - "../../../node_modules/@types/node/child_process.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/stream.d.ts" - ], - "../../../node_modules/@types/node/cluster.d.ts": [ - "../../../node_modules/@types/node/child_process.d.ts", - "../../../node_modules/@types/node/cluster.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/net.d.ts" - ], - "../../../node_modules/@types/node/console.d.ts": [ - "../../../node_modules/@types/node/util.d.ts" - ], - "../../../node_modules/@types/node/constants.d.ts": [ - "../../../node_modules/@types/node/constants.d.ts", - "../../../node_modules/@types/node/crypto.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/os.d.ts" - ], - "../../../node_modules/@types/node/crypto.d.ts": [ - "../../../node_modules/@types/node/crypto.d.ts", - "../../../node_modules/@types/node/stream.d.ts" - ], - "../../../node_modules/@types/node/dgram.d.ts": [ - "../../../node_modules/@types/node/dgram.d.ts", - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/net.d.ts" - ], - "../../../node_modules/@types/node/dns.d.ts": [ - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/dns/promises.d.ts" - ], - "../../../node_modules/@types/node/dns/promises.d.ts": [ - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/dns/promises.d.ts" - ], - "../../../node_modules/@types/node/domain.d.ts": [ - "../../../node_modules/@types/node/domain.d.ts", - "../../../node_modules/@types/node/events.d.ts" - ], - "../../../node_modules/@types/node/events.d.ts": [ - "../../../node_modules/@types/node/events.d.ts" - ], - "../../../node_modules/@types/node/fs.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/fs/promises.d.ts": [ - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts" - ], - "../../../node_modules/@types/node/http.d.ts": [ - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/http2.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/http2.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/tls.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/https.d.ts": [ - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/https.d.ts", - "../../../node_modules/@types/node/tls.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/index.d.ts": [ - "../../../node_modules/@types/node/base.d.ts" - ], - "../../../node_modules/@types/node/inspector.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/inspector.d.ts" - ], - "../../../node_modules/@types/node/module.d.ts": [ - "../../../node_modules/@types/node/module.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/net.d.ts": [ - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/stream.d.ts" - ], - "../../../node_modules/@types/node/os.d.ts": [ - "../../../node_modules/@types/node/os.d.ts" - ], - "../../../node_modules/@types/node/path.d.ts": [ - "../../../node_modules/@types/node/path.d.ts" - ], - "../../../node_modules/@types/node/perf_hooks.d.ts": [ - "../../../node_modules/@types/node/async_hooks.d.ts", - "../../../node_modules/@types/node/perf_hooks.d.ts" - ], - "../../../node_modules/@types/node/process.d.ts": [ - "../../../node_modules/@types/node/tty.d.ts" - ], - "../../../node_modules/@types/node/punycode.d.ts": [ - "../../../node_modules/@types/node/punycode.d.ts" - ], - "../../../node_modules/@types/node/querystring.d.ts": [ - "../../../node_modules/@types/node/querystring.d.ts" - ], - "../../../node_modules/@types/node/readline.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/readline.d.ts" - ], - "../../../node_modules/@types/node/repl.d.ts": [ - "../../../node_modules/@types/node/readline.d.ts", - "../../../node_modules/@types/node/repl.d.ts", - "../../../node_modules/@types/node/util.d.ts", - "../../../node_modules/@types/node/vm.d.ts" - ], - "../../../node_modules/@types/node/stream.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/stream/promises.d.ts" - ], - "../../../node_modules/@types/node/stream/promises.d.ts": [ - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/stream/promises.d.ts" - ], - "../../../node_modules/@types/node/string_decoder.d.ts": [ - "../../../node_modules/@types/node/string_decoder.d.ts" - ], - "../../../node_modules/@types/node/timers.d.ts": [ - "../../../node_modules/@types/node/timers.d.ts" - ], - "../../../node_modules/@types/node/timers/promises.d.ts": [ - "../../../node_modules/@types/node/timers.d.ts", - "../../../node_modules/@types/node/timers/promises.d.ts" - ], - "../../../node_modules/@types/node/tls.d.ts": [ - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/tls.d.ts" - ], - "../../../node_modules/@types/node/trace_events.d.ts": [ - "../../../node_modules/@types/node/trace_events.d.ts" - ], - "../../../node_modules/@types/node/ts3.6/base.d.ts": [ - "../../../node_modules/@types/node/assert/strict.d.ts", - "../../../node_modules/@types/node/async_hooks.d.ts", - "../../../node_modules/@types/node/buffer.d.ts", - "../../../node_modules/@types/node/child_process.d.ts", - "../../../node_modules/@types/node/cluster.d.ts", - "../../../node_modules/@types/node/console.d.ts", - "../../../node_modules/@types/node/constants.d.ts", - "../../../node_modules/@types/node/crypto.d.ts", - "../../../node_modules/@types/node/dgram.d.ts", - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/dns/promises.d.ts", - "../../../node_modules/@types/node/domain.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts", - "../../../node_modules/@types/node/globals.d.ts", - "../../../node_modules/@types/node/globals.global.d.ts", - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/http2.d.ts", - "../../../node_modules/@types/node/https.d.ts", - "../../../node_modules/@types/node/inspector.d.ts", - "../../../node_modules/@types/node/module.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/os.d.ts", - "../../../node_modules/@types/node/path.d.ts", - "../../../node_modules/@types/node/perf_hooks.d.ts", - "../../../node_modules/@types/node/process.d.ts", - "../../../node_modules/@types/node/punycode.d.ts", - "../../../node_modules/@types/node/querystring.d.ts", - "../../../node_modules/@types/node/readline.d.ts", - "../../../node_modules/@types/node/repl.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/stream/promises.d.ts", - "../../../node_modules/@types/node/string_decoder.d.ts", - "../../../node_modules/@types/node/timers.d.ts", - "../../../node_modules/@types/node/timers/promises.d.ts", - "../../../node_modules/@types/node/tls.d.ts", - "../../../node_modules/@types/node/trace_events.d.ts", - "../../../node_modules/@types/node/tty.d.ts", - "../../../node_modules/@types/node/url.d.ts", - "../../../node_modules/@types/node/util.d.ts", - "../../../node_modules/@types/node/v8.d.ts", - "../../../node_modules/@types/node/vm.d.ts", - "../../../node_modules/@types/node/wasi.d.ts", - "../../../node_modules/@types/node/worker_threads.d.ts", - "../../../node_modules/@types/node/zlib.d.ts" - ], - "../../../node_modules/@types/node/tty.d.ts": [ - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/tty.d.ts" - ], - "../../../node_modules/@types/node/url.d.ts": [ - "../../../node_modules/@types/node/querystring.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/util.d.ts": [ - "../../../node_modules/@types/node/util.d.ts" - ], - "../../../node_modules/@types/node/v8.d.ts": [ - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/v8.d.ts" - ], - "../../../node_modules/@types/node/vm.d.ts": [ - "../../../node_modules/@types/node/vm.d.ts" - ], - "../../../node_modules/@types/node/wasi.d.ts": [ - "../../../node_modules/@types/node/wasi.d.ts" - ], - "../../../node_modules/@types/node/worker_threads.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/url.d.ts", - "../../../node_modules/@types/node/vm.d.ts", - "../../../node_modules/@types/node/worker_threads.d.ts" - ], - "../../../node_modules/@types/node/zlib.d.ts": [ - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/zlib.d.ts" - ], - "../../../node_modules/@types/sinon/index.d.ts": [ - "../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts" - ], - "../../../node_modules/@types/yargs/index.d.ts": [ - "../../../node_modules/@types/yargs-parser/index.d.ts" - ], - "../../../node_modules/@types/yauzl/index.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/index.d.ts", - "../../../node_modules/@types/node/stream.d.ts" - ], - "../../../node_modules/aegir/dist/utils/chai.d.ts": [ - "../../../node_modules/@types/chai-as-promised/index.d.ts", - "../../../node_modules/@types/chai-subset/index.d.ts", - "../../../node_modules/@types/chai/index.d.ts", - "../../../node_modules/chai-bytes/index.d.ts", - "../../../node_modules/chai-parentheses/index.d.ts" - ], - "../../../node_modules/chai-bytes/index.d.ts": [ - "../../../node_modules/@types/chai/index.d.ts" - ], - "../../../node_modules/chai-parentheses/index.d.ts": [ - "../../../node_modules/@types/chai-as-promised/index.d.ts", - "../../../node_modules/@types/chai/index.d.ts" - ], - "../../../node_modules/uint8arrays/dist/from-string.d.ts": [ - "../../../node_modules/multibase/src/types.d.ts" - ], - "../src/index.js": [ - "../node_modules/err-code/dist/index.d.ts", - "../src/types.d.ts", - "../src/unixfs.d.ts" - ], - "../src/unixfs.d.ts": [ - "../../../node_modules/protobufjs/index.d.ts" - ], - "../test/unixfs-format.spec.js": [ - "../../../node_modules/aegir/dist/utils/chai.d.ts", - "../../../node_modules/aegir/dist/utils/fixtures.d.ts", - "../../../node_modules/uint8arrays/dist/from-string.d.ts", - "../src/index.js", - "../src/unixfs.d.ts" - ] - }, - "exportedModulesMap": { - "../../../node_modules/@types/chai-as-promised/index.d.ts": [ - "../../../node_modules/@types/chai/index.d.ts" - ], - "../../../node_modules/@types/chai-subset/index.d.ts": [ - "../../../node_modules/@types/chai/index.d.ts" - ], - "../../../node_modules/@types/glob/index.d.ts": [ - "../../../node_modules/@types/minimatch/index.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/index.d.ts" - ], - "../../../node_modules/@types/node/assert.d.ts": [ - "../../../node_modules/@types/node/assert.d.ts" - ], - "../../../node_modules/@types/node/assert/strict.d.ts": [ - "../../../node_modules/@types/node/assert.d.ts" - ], - "../../../node_modules/@types/node/async_hooks.d.ts": [ - "../../../node_modules/@types/node/async_hooks.d.ts" - ], - "../../../node_modules/@types/node/base.d.ts": [ - "../../../node_modules/@types/node/assert.d.ts", - "../../../node_modules/@types/node/ts3.6/base.d.ts" - ], - "../../../node_modules/@types/node/buffer.d.ts": [ - "../../../node_modules/@types/node/buffer.d.ts" - ], - "../../../node_modules/@types/node/child_process.d.ts": [ - "../../../node_modules/@types/node/child_process.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/stream.d.ts" - ], - "../../../node_modules/@types/node/cluster.d.ts": [ - "../../../node_modules/@types/node/child_process.d.ts", - "../../../node_modules/@types/node/cluster.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/net.d.ts" - ], - "../../../node_modules/@types/node/console.d.ts": [ - "../../../node_modules/@types/node/util.d.ts" - ], - "../../../node_modules/@types/node/constants.d.ts": [ - "../../../node_modules/@types/node/constants.d.ts", - "../../../node_modules/@types/node/crypto.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/os.d.ts" - ], - "../../../node_modules/@types/node/crypto.d.ts": [ - "../../../node_modules/@types/node/crypto.d.ts", - "../../../node_modules/@types/node/stream.d.ts" - ], - "../../../node_modules/@types/node/dgram.d.ts": [ - "../../../node_modules/@types/node/dgram.d.ts", - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/net.d.ts" - ], - "../../../node_modules/@types/node/dns.d.ts": [ - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/dns/promises.d.ts" - ], - "../../../node_modules/@types/node/dns/promises.d.ts": [ - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/dns/promises.d.ts" - ], - "../../../node_modules/@types/node/domain.d.ts": [ - "../../../node_modules/@types/node/domain.d.ts", - "../../../node_modules/@types/node/events.d.ts" - ], - "../../../node_modules/@types/node/events.d.ts": [ - "../../../node_modules/@types/node/events.d.ts" - ], - "../../../node_modules/@types/node/fs.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/fs/promises.d.ts": [ - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts" - ], - "../../../node_modules/@types/node/http.d.ts": [ - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/http2.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/http2.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/tls.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/https.d.ts": [ - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/https.d.ts", - "../../../node_modules/@types/node/tls.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/index.d.ts": [ - "../../../node_modules/@types/node/base.d.ts" - ], - "../../../node_modules/@types/node/inspector.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/inspector.d.ts" - ], - "../../../node_modules/@types/node/module.d.ts": [ - "../../../node_modules/@types/node/module.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/net.d.ts": [ - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/stream.d.ts" - ], - "../../../node_modules/@types/node/os.d.ts": [ - "../../../node_modules/@types/node/os.d.ts" - ], - "../../../node_modules/@types/node/path.d.ts": [ - "../../../node_modules/@types/node/path.d.ts" - ], - "../../../node_modules/@types/node/perf_hooks.d.ts": [ - "../../../node_modules/@types/node/async_hooks.d.ts", - "../../../node_modules/@types/node/perf_hooks.d.ts" - ], - "../../../node_modules/@types/node/process.d.ts": [ - "../../../node_modules/@types/node/tty.d.ts" - ], - "../../../node_modules/@types/node/punycode.d.ts": [ - "../../../node_modules/@types/node/punycode.d.ts" - ], - "../../../node_modules/@types/node/querystring.d.ts": [ - "../../../node_modules/@types/node/querystring.d.ts" - ], - "../../../node_modules/@types/node/readline.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/readline.d.ts" - ], - "../../../node_modules/@types/node/repl.d.ts": [ - "../../../node_modules/@types/node/readline.d.ts", - "../../../node_modules/@types/node/repl.d.ts", - "../../../node_modules/@types/node/util.d.ts", - "../../../node_modules/@types/node/vm.d.ts" - ], - "../../../node_modules/@types/node/stream.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/stream/promises.d.ts" - ], - "../../../node_modules/@types/node/stream/promises.d.ts": [ - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/stream/promises.d.ts" - ], - "../../../node_modules/@types/node/string_decoder.d.ts": [ - "../../../node_modules/@types/node/string_decoder.d.ts" - ], - "../../../node_modules/@types/node/timers.d.ts": [ - "../../../node_modules/@types/node/timers.d.ts" - ], - "../../../node_modules/@types/node/timers/promises.d.ts": [ - "../../../node_modules/@types/node/timers.d.ts", - "../../../node_modules/@types/node/timers/promises.d.ts" - ], - "../../../node_modules/@types/node/tls.d.ts": [ - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/tls.d.ts" - ], - "../../../node_modules/@types/node/trace_events.d.ts": [ - "../../../node_modules/@types/node/trace_events.d.ts" - ], - "../../../node_modules/@types/node/ts3.6/base.d.ts": [ - "../../../node_modules/@types/node/assert/strict.d.ts", - "../../../node_modules/@types/node/async_hooks.d.ts", - "../../../node_modules/@types/node/buffer.d.ts", - "../../../node_modules/@types/node/child_process.d.ts", - "../../../node_modules/@types/node/cluster.d.ts", - "../../../node_modules/@types/node/console.d.ts", - "../../../node_modules/@types/node/constants.d.ts", - "../../../node_modules/@types/node/crypto.d.ts", - "../../../node_modules/@types/node/dgram.d.ts", - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/dns/promises.d.ts", - "../../../node_modules/@types/node/domain.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts", - "../../../node_modules/@types/node/globals.d.ts", - "../../../node_modules/@types/node/globals.global.d.ts", - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/http2.d.ts", - "../../../node_modules/@types/node/https.d.ts", - "../../../node_modules/@types/node/inspector.d.ts", - "../../../node_modules/@types/node/module.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/os.d.ts", - "../../../node_modules/@types/node/path.d.ts", - "../../../node_modules/@types/node/perf_hooks.d.ts", - "../../../node_modules/@types/node/process.d.ts", - "../../../node_modules/@types/node/punycode.d.ts", - "../../../node_modules/@types/node/querystring.d.ts", - "../../../node_modules/@types/node/readline.d.ts", - "../../../node_modules/@types/node/repl.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/stream/promises.d.ts", - "../../../node_modules/@types/node/string_decoder.d.ts", - "../../../node_modules/@types/node/timers.d.ts", - "../../../node_modules/@types/node/timers/promises.d.ts", - "../../../node_modules/@types/node/tls.d.ts", - "../../../node_modules/@types/node/trace_events.d.ts", - "../../../node_modules/@types/node/tty.d.ts", - "../../../node_modules/@types/node/url.d.ts", - "../../../node_modules/@types/node/util.d.ts", - "../../../node_modules/@types/node/v8.d.ts", - "../../../node_modules/@types/node/vm.d.ts", - "../../../node_modules/@types/node/wasi.d.ts", - "../../../node_modules/@types/node/worker_threads.d.ts", - "../../../node_modules/@types/node/zlib.d.ts" - ], - "../../../node_modules/@types/node/tty.d.ts": [ - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/tty.d.ts" - ], - "../../../node_modules/@types/node/url.d.ts": [ - "../../../node_modules/@types/node/querystring.d.ts", - "../../../node_modules/@types/node/url.d.ts" - ], - "../../../node_modules/@types/node/util.d.ts": [ - "../../../node_modules/@types/node/util.d.ts" - ], - "../../../node_modules/@types/node/v8.d.ts": [ - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/v8.d.ts" - ], - "../../../node_modules/@types/node/vm.d.ts": [ - "../../../node_modules/@types/node/vm.d.ts" - ], - "../../../node_modules/@types/node/wasi.d.ts": [ - "../../../node_modules/@types/node/wasi.d.ts" - ], - "../../../node_modules/@types/node/worker_threads.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/url.d.ts", - "../../../node_modules/@types/node/vm.d.ts", - "../../../node_modules/@types/node/worker_threads.d.ts" - ], - "../../../node_modules/@types/node/zlib.d.ts": [ - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/zlib.d.ts" - ], - "../../../node_modules/@types/sinon/index.d.ts": [ - "../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts" - ], - "../../../node_modules/@types/yargs/index.d.ts": [ - "../../../node_modules/@types/yargs-parser/index.d.ts" - ], - "../../../node_modules/@types/yauzl/index.d.ts": [ - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/index.d.ts", - "../../../node_modules/@types/node/stream.d.ts" - ], - "../../../node_modules/aegir/dist/utils/chai.d.ts": [ - "../../../node_modules/@types/chai-as-promised/index.d.ts", - "../../../node_modules/@types/chai-subset/index.d.ts", - "../../../node_modules/@types/chai/index.d.ts", - "../../../node_modules/chai-bytes/index.d.ts", - "../../../node_modules/chai-parentheses/index.d.ts" - ], - "../../../node_modules/chai-bytes/index.d.ts": [ - "../../../node_modules/@types/chai/index.d.ts" - ], - "../../../node_modules/chai-parentheses/index.d.ts": [ - "../../../node_modules/@types/chai-as-promised/index.d.ts", - "../../../node_modules/@types/chai/index.d.ts" - ], - "../../../node_modules/uint8arrays/dist/from-string.d.ts": [ - "../../../node_modules/multibase/src/types.d.ts" - ], - "../src/index.js": [ - "../src/types.d.ts" - ], - "../src/unixfs.d.ts": [ - "../../../node_modules/protobufjs/index.d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts", - "../../../node_modules/@types/chai-as-promised/index.d.ts", - "../../../node_modules/@types/chai-subset/index.d.ts", - "../../../node_modules/@types/chai/index.d.ts", - "../../../node_modules/@types/glob/index.d.ts", - "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts", - "../../../node_modules/@types/json-schema/index.d.ts", - "../../../node_modules/@types/json5/index.d.ts", - "../../../node_modules/@types/long/index.d.ts", - "../../../node_modules/@types/minimatch/index.d.ts", - "../../../node_modules/@types/minimist/index.d.ts", - "../../../node_modules/@types/mocha/index.d.ts", - "../../../node_modules/@types/node/assert.d.ts", - "../../../node_modules/@types/node/assert/strict.d.ts", - "../../../node_modules/@types/node/async_hooks.d.ts", - "../../../node_modules/@types/node/base.d.ts", - "../../../node_modules/@types/node/buffer.d.ts", - "../../../node_modules/@types/node/child_process.d.ts", - "../../../node_modules/@types/node/cluster.d.ts", - "../../../node_modules/@types/node/console.d.ts", - "../../../node_modules/@types/node/constants.d.ts", - "../../../node_modules/@types/node/crypto.d.ts", - "../../../node_modules/@types/node/dgram.d.ts", - "../../../node_modules/@types/node/dns.d.ts", - "../../../node_modules/@types/node/dns/promises.d.ts", - "../../../node_modules/@types/node/domain.d.ts", - "../../../node_modules/@types/node/events.d.ts", - "../../../node_modules/@types/node/fs.d.ts", - "../../../node_modules/@types/node/fs/promises.d.ts", - "../../../node_modules/@types/node/globals.d.ts", - "../../../node_modules/@types/node/globals.global.d.ts", - "../../../node_modules/@types/node/http.d.ts", - "../../../node_modules/@types/node/http2.d.ts", - "../../../node_modules/@types/node/https.d.ts", - "../../../node_modules/@types/node/index.d.ts", - "../../../node_modules/@types/node/inspector.d.ts", - "../../../node_modules/@types/node/module.d.ts", - "../../../node_modules/@types/node/net.d.ts", - "../../../node_modules/@types/node/os.d.ts", - "../../../node_modules/@types/node/path.d.ts", - "../../../node_modules/@types/node/perf_hooks.d.ts", - "../../../node_modules/@types/node/process.d.ts", - "../../../node_modules/@types/node/punycode.d.ts", - "../../../node_modules/@types/node/querystring.d.ts", - "../../../node_modules/@types/node/readline.d.ts", - "../../../node_modules/@types/node/repl.d.ts", - "../../../node_modules/@types/node/stream.d.ts", - "../../../node_modules/@types/node/stream/promises.d.ts", - "../../../node_modules/@types/node/string_decoder.d.ts", - "../../../node_modules/@types/node/timers.d.ts", - "../../../node_modules/@types/node/timers/promises.d.ts", - "../../../node_modules/@types/node/tls.d.ts", - "../../../node_modules/@types/node/trace_events.d.ts", - "../../../node_modules/@types/node/ts3.6/base.d.ts", - "../../../node_modules/@types/node/tty.d.ts", - "../../../node_modules/@types/node/url.d.ts", - "../../../node_modules/@types/node/util.d.ts", - "../../../node_modules/@types/node/v8.d.ts", - "../../../node_modules/@types/node/vm.d.ts", - "../../../node_modules/@types/node/wasi.d.ts", - "../../../node_modules/@types/node/worker_threads.d.ts", - "../../../node_modules/@types/node/zlib.d.ts", - "../../../node_modules/@types/normalize-package-data/index.d.ts", - "../../../node_modules/@types/parse-json/index.d.ts", - "../../../node_modules/@types/sinon/index.d.ts", - "../../../node_modules/@types/sinonjs__fake-timers/index.d.ts", - "../../../node_modules/@types/yargs-parser/index.d.ts", - "../../../node_modules/@types/yargs/index.d.ts", - "../../../node_modules/@types/yauzl/index.d.ts", - "../../../node_modules/aegir/dist/utils/chai.d.ts", - "../../../node_modules/aegir/dist/utils/fixtures.d.ts", - "../../../node_modules/chai-bytes/index.d.ts", - "../../../node_modules/chai-parentheses/index.d.ts", - "../../../node_modules/multibase/src/types.d.ts", - "../../../node_modules/protobufjs/index.d.ts", - "../../../node_modules/typescript/lib/lib.dom.d.ts", - "../../../node_modules/typescript/lib/lib.dom.iterable.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.collection.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.core.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.generator.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.promise.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts", - "../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", - "../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts", - "../../../node_modules/typescript/lib/lib.es2016.d.ts", - "../../../node_modules/typescript/lib/lib.es2017.d.ts", - "../../../node_modules/typescript/lib/lib.es2017.intl.d.ts", - "../../../node_modules/typescript/lib/lib.es2017.object.d.ts", - "../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", - "../../../node_modules/typescript/lib/lib.es2017.string.d.ts", - "../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", - "../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", - "../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", - "../../../node_modules/typescript/lib/lib.es2018.d.ts", - "../../../node_modules/typescript/lib/lib.es2018.intl.d.ts", - "../../../node_modules/typescript/lib/lib.es2018.promise.d.ts", - "../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts", - "../../../node_modules/typescript/lib/lib.es2019.array.d.ts", - "../../../node_modules/typescript/lib/lib.es2019.d.ts", - "../../../node_modules/typescript/lib/lib.es2019.object.d.ts", - "../../../node_modules/typescript/lib/lib.es2019.string.d.ts", - "../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts", - "../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts", - "../../../node_modules/typescript/lib/lib.es2020.d.ts", - "../../../node_modules/typescript/lib/lib.es2020.intl.d.ts", - "../../../node_modules/typescript/lib/lib.es2020.promise.d.ts", - "../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts", - "../../../node_modules/typescript/lib/lib.es2020.string.d.ts", - "../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts", - "../../../node_modules/typescript/lib/lib.es5.d.ts", - "../../../node_modules/typescript/lib/lib.esnext.intl.d.ts", - "../../../node_modules/uint8arrays/dist/from-string.d.ts", - "../node_modules/err-code/dist/index.d.ts", - "../src/index.js", - "../src/types.d.ts", - "../src/unixfs.d.ts", - "../test/unixfs-format.spec.js" - ] - }, - "version": "4.2.3" -} \ No newline at end of file From 09bb43e9271c95f68e0da678109a6a474ebecbf3 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 7 May 2021 14:46:48 +0100 Subject: [PATCH 20/22] chore: ignore dist dirs --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3ee370ec..5691469f 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,3 @@ node_modules lib dist - From 63827a4c557ce0a226bc059b1bd2f1c55bee11cd Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 7 May 2021 15:33:05 +0100 Subject: [PATCH 21/22] chore: update deps --- packages/ipfs-unixfs-exporter/package.json | 2 +- packages/ipfs-unixfs-importer/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ipfs-unixfs-exporter/package.json b/packages/ipfs-unixfs-exporter/package.json index a9ef0a45..84219b35 100644 --- a/packages/ipfs-unixfs-exporter/package.json +++ b/packages/ipfs-unixfs-exporter/package.json @@ -63,7 +63,7 @@ "ipfs-unixfs": "^4.0.3", "it-last": "^1.0.5", "multicodec": "^3.0.1", - "multiformats": "^7.0.0", + "multiformats": "^8.0.3", "multihashing-async": "^2.1.0" }, "types": "dist/src/index.d.ts", diff --git a/packages/ipfs-unixfs-importer/package.json b/packages/ipfs-unixfs-importer/package.json index f69b80f0..a32db397 100644 --- a/packages/ipfs-unixfs-importer/package.json +++ b/packages/ipfs-unixfs-importer/package.json @@ -57,7 +57,7 @@ "it-parallel-batch": "^1.0.9", "merge-options": "^3.0.4", "multicodec": "^3.0.1", - "multiformats": "^7.0.0", + "multiformats": "^8.0.3", "multihashing-async": "^2.1.0", "rabin-wasm": "^0.1.4", "uint8arrays": "^2.1.2" From 880a8326f625428ea81333b7897a0979b3ed4a75 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 19 May 2021 09:58:51 +0200 Subject: [PATCH 22/22] chore: add dist folders --- .gitignore | 1 - .../ipfs-unixfs-exporter/dist/src/index.d.ts | 29 + .../dist/src/index.d.ts.map | 1 + .../dist/src/resolvers/dag-cbor.d.ts | 13 + .../dist/src/resolvers/dag-cbor.d.ts.map | 1 + .../dist/src/resolvers/identity.d.ts | 11 + .../dist/src/resolvers/identity.d.ts.map | 1 + .../dist/src/resolvers/index.d.ts | 14 + .../dist/src/resolvers/index.d.ts.map | 1 + .../dist/src/resolvers/raw.d.ts | 10 + .../dist/src/resolvers/raw.d.ts.map | 1 + .../unixfs-v1/content/directory.d.ts | 17 + .../unixfs-v1/content/directory.d.ts.map | 1 + .../src/resolvers/unixfs-v1/content/file.d.ts | 12 + .../resolvers/unixfs-v1/content/file.d.ts.map | 1 + .../content/hamt-sharded-directory.d.ts | 23 + .../content/hamt-sharded-directory.d.ts.map | 1 + .../src/resolvers/unixfs-v1/content/raw.d.ts | 15 + .../resolvers/unixfs-v1/content/raw.d.ts.map | 1 + .../dist/src/resolvers/unixfs-v1/index.d.ts | 15 + .../src/resolvers/unixfs-v1/index.d.ts.map | 1 + .../ipfs-unixfs-exporter/dist/src/types.d.ts | 74 + .../src/utils/extract-data-from-block.d.ts | 3 + .../utils/extract-data-from-block.d.ts.map | 1 + .../dist/src/utils/find-cid-in-shard.d.ts | 30 + .../dist/src/utils/find-cid-in-shard.d.ts.map | 1 + .../src/utils/validate-offset-and-length.d.ts | 11 + .../utils/validate-offset-and-length.d.ts.map | 1 + packages/ipfs-unixfs-exporter/package.json | 2 +- .../dist/src/chunker/fixed-size.d.ts | 3 + .../dist/src/chunker/fixed-size.d.ts.map | 1 + .../dist/src/chunker/index.d.ts | 5 + .../dist/src/chunker/index.d.ts.map | 1 + .../dist/src/chunker/rabin.d.ts | 10 + .../dist/src/chunker/rabin.d.ts.map | 1 + .../dist/src/dag-builder/dir.d.ts | 13 + .../dist/src/dag-builder/dir.d.ts.map | 1 + .../dist/src/dag-builder/file/balanced.d.ts | 13 + .../src/dag-builder/file/balanced.d.ts.map | 1 + .../src/dag-builder/file/buffer-importer.d.ts | 13 + .../dag-builder/file/buffer-importer.d.ts.map | 1 + .../dist/src/dag-builder/file/flat.d.ts | 3 + .../dist/src/dag-builder/file/flat.d.ts.map | 1 + .../dist/src/dag-builder/file/index.d.ts | 15 + .../dist/src/dag-builder/file/index.d.ts.map | 1 + .../dist/src/dag-builder/file/trickle.d.ts | 9 + .../src/dag-builder/file/trickle.d.ts.map | 1 + .../dist/src/dag-builder/index.d.ts | 14 + .../dist/src/dag-builder/index.d.ts.map | 1 + .../dist/src/dag-builder/validate-chunks.d.ts | 13 + .../src/dag-builder/validate-chunks.d.ts.map | 1 + .../dist/src/dir-flat.d.ts | 31 + .../dist/src/dir-flat.d.ts.map | 1 + .../dist/src/dir-sharded.d.ts | 28 + .../dist/src/dir-sharded.d.ts.map | 1 + .../ipfs-unixfs-importer/dist/src/dir.d.ts | 85 ++ .../dist/src/dir.d.ts.map | 1 + .../dist/src/flat-to-shard.d.ts | 6 + .../dist/src/flat-to-shard.d.ts.map | 1 + .../ipfs-unixfs-importer/dist/src/index.d.ts | 43 + .../dist/src/index.d.ts.map | 1 + .../dist/src/options.d.ts | 5 + .../dist/src/options.d.ts.map | 1 + .../dist/src/tree-builder.d.ts | 14 + .../dist/src/tree-builder.d.ts.map | 1 + .../ipfs-unixfs-importer/dist/src/types.d.ts | 167 +++ .../dist/src/utils/persist.d.ts | 9 + .../dist/src/utils/persist.d.ts.map | 1 + .../dist/src/utils/to-path-components.d.ts | 3 + .../src/utils/to-path-components.d.ts.map | 1 + packages/ipfs-unixfs-importer/tsconfig.json | 3 +- packages/ipfs-unixfs/dist/src/index.d.ts | 73 + packages/ipfs-unixfs/dist/src/index.d.ts.map | 1 + packages/ipfs-unixfs/dist/src/types.d.ts | 7 + packages/ipfs-unixfs/dist/src/unixfs.d.ts | 238 ++++ .../dist/test/unixfs-format.spec.d.ts | 2 + .../dist/test/unixfs-format.spec.d.ts.map | 1 + .../ipfs-unixfs/dist/tsconfig.tsbuildinfo | 1232 +++++++++++++++++ 78 files changed, 2369 insertions(+), 3 deletions(-) create mode 100644 packages/ipfs-unixfs-exporter/dist/src/index.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/types.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts create mode 100644 packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/index.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/index.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/options.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/options.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/types.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map create mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts create mode 100644 packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map create mode 100644 packages/ipfs-unixfs/dist/src/index.d.ts create mode 100644 packages/ipfs-unixfs/dist/src/index.d.ts.map create mode 100644 packages/ipfs-unixfs/dist/src/types.d.ts create mode 100644 packages/ipfs-unixfs/dist/src/unixfs.d.ts create mode 100644 packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts create mode 100644 packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map create mode 100644 packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo diff --git a/.gitignore b/.gitignore index 5691469f..60182528 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,3 @@ build node_modules lib -dist diff --git a/packages/ipfs-unixfs-exporter/dist/src/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts new file mode 100644 index 00000000..ae8b732d --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts @@ -0,0 +1,29 @@ +export type UnixFS = import('ipfs-unixfs').UnixFS; +export type BlockAPI = import('ipfs-unixfs-importer/src/types').BlockAPI; +export type ExporterOptions = import('./types').ExporterOptions; +export type UnixFSFile = import('./types').UnixFSFile; +export type UnixFSDirectory = import('./types').UnixFSDirectory; +export type ObjectNode = import('./types').ObjectNode; +export type RawNode = import('./types').RawNode; +export type IdentityNode = import('./types').IdentityNode; +export type UnixFSEntry = import('./types').UnixFSEntry; +/** + * @param {string | CID} path + * @param {BlockAPI} blockService + * @param {ExporterOptions} [options] + */ +export function exporter(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): Promise; +/** + * @param {string | CID} path + * @param {BlockAPI} blockService + * @param {ExporterOptions} [options] + */ +export function walkPath(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): AsyncGenerator; +/** + * @param {string | CID} path + * @param {BlockAPI} blockService + * @param {ExporterOptions} [options] + */ +export function recursive(path: string | CID, blockService: BlockAPI, options?: import("./types").ExporterOptions | undefined): AsyncGenerator; +import { CID } from "multiformats/cid"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map new file mode 100644 index 00000000..ff6d6da2 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"qBAQa,OAAO,aAAa,EAAE,MAAM;uBAC5B,OAAO,gCAAgC,EAAE,QAAQ;8BACjD,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,SAAS,EAAE,UAAU;8BAC5B,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,SAAS,EAAE,UAAU;sBAC5B,OAAO,SAAS,EAAE,OAAO;2BACzB,OAAO,SAAS,EAAE,YAAY;0BAC9B,OAAO,SAAS,EAAE,WAAW;AAmF1C;;;;GAIG;AACH,+BAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,mGAWlB;AAlDD;;;;GAIG;AACH,+BAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,yHAiClB;AAiBD;;;;GAIG;AACH,gCAJW,MAAM,GAAG,GAAG,gBACZ,QAAQ,yHAoClB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts new file mode 100644 index 00000000..0023df0e --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts @@ -0,0 +1,13 @@ +export = resolve; +/** + * @typedef {import('../types').Resolver} Resolver + */ +/** + * @type {Resolver} + */ +declare const resolve: Resolver; +declare namespace resolve { + export { Resolver }; +} +type Resolver = import('../types').Resolver; +//# sourceMappingURL=dag-cbor.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map new file mode 100644 index 00000000..421183a1 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dag-cbor.d.ts","sourceRoot":"","sources":["../../../src/resolvers/dag-cbor.js"],"names":[],"mappings":";AAMA;;GAEG;AAEH;;GAEG;AACH,uBAFU,QAAQ,CA6DjB;;;;gBAjEY,OAAO,UAAU,EAAE,QAAQ"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts new file mode 100644 index 00000000..48b711a6 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts @@ -0,0 +1,11 @@ +export = resolve; +/** + * @type {Resolver} + */ +declare const resolve: Resolver; +declare namespace resolve { + export { ExporterOptions, Resolver }; +} +type Resolver = import('../types').Resolver; +type ExporterOptions = import('../types').ExporterOptions; +//# sourceMappingURL=identity.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map new file mode 100644 index 00000000..5830ebd8 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/resolvers/identity.js"],"names":[],"mappings":";AA+BA;;GAEG;AACH,uBAFU,QAAQ,CAoBjB;;;;gBA3CY,OAAO,UAAU,EAAE,QAAQ;uBAD3B,OAAO,UAAU,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts new file mode 100644 index 00000000..310e738a --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts @@ -0,0 +1,14 @@ +export = resolve; +/** + * @type {Resolve} + */ +declare function resolve(cid: import("multiformats/cid").CID, name: string, path: string, toResolve: string[], depth: number, blockService: any, options: import("../types").ExporterOptions): Promise; +declare namespace resolve { + export { BlockAPI, ExporterOptions, UnixFSEntry, Resolver, Resolve }; +} +type BlockAPI = import('../').BlockAPI; +type ExporterOptions = import('../types').ExporterOptions; +type UnixFSEntry = import('../types').UnixFSEntry; +type Resolver = import('../types').Resolver; +type Resolve = import('../types').Resolve; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map new file mode 100644 index 00000000..5c1528b0 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resolvers/index.js"],"names":[],"mappings":";AAuBA;;GAEG;AACH,yOASC;;;;gBA7BY,OAAO,KAAK,EAAE,QAAQ;uBACtB,OAAO,UAAU,EAAE,eAAe;mBAClC,OAAO,UAAU,EAAE,WAAW;gBAC9B,OAAO,UAAU,EAAE,QAAQ;eAC3B,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts new file mode 100644 index 00000000..c1bbde83 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts @@ -0,0 +1,10 @@ +export = resolve; +/** + * @type {import('../types').Resolver} + */ +declare const resolve: import('../types').Resolver; +declare namespace resolve { + export { ExporterOptions }; +} +type ExporterOptions = import('../types').ExporterOptions; +//# sourceMappingURL=raw.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map new file mode 100644 index 00000000..aeb0b6d0 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"raw.d.ts","sourceRoot":"","sources":["../../../src/resolvers/raw.js"],"names":[],"mappings":";AA6BA;;GAEG;AACH,uBAFU,OAAO,UAAU,EAAE,QAAQ,CAqBpC;;;;uBA5CY,OAAO,UAAU,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts new file mode 100644 index 00000000..cd496970 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts @@ -0,0 +1,17 @@ +export = directoryContent; +/** + * @typedef {import('../../../types').ExporterOptions} ExporterOptions + * @typedef {import('../../../types').UnixfsV1DirectoryContent} UnixfsV1DirectoryContent + * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver + */ +/** + * @type {UnixfsV1Resolver} + */ +declare const directoryContent: UnixfsV1Resolver; +declare namespace directoryContent { + export { ExporterOptions, UnixfsV1DirectoryContent, UnixfsV1Resolver }; +} +type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; +type ExporterOptions = import('../../../types').ExporterOptions; +type UnixfsV1DirectoryContent = import('../../../types').UnixfsV1DirectoryContent; +//# sourceMappingURL=directory.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map new file mode 100644 index 00000000..193e0f25 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/directory.js"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH;;GAEG;AACH,gCAFU,gBAAgB,CAsBzB;;;;wBA1BY,OAAO,gBAAgB,EAAE,gBAAgB;uBAFzC,OAAO,gBAAgB,EAAE,eAAe;gCACxC,OAAO,gBAAgB,EAAE,wBAAwB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts new file mode 100644 index 00000000..5049b5de --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts @@ -0,0 +1,12 @@ +export = fileContent; +/** + * @type {import('../').UnixfsV1Resolver} + */ +declare const fileContent: import('../').UnixfsV1Resolver; +declare namespace fileContent { + export { ExporterOptions, BlockService, PBNode }; +} +type ExporterOptions = import('../../../types').ExporterOptions; +type BlockService = import('ipfs-unixfs-importer/src/types').BlockAPI; +type PBNode = import('@ipld/dag-pb').PBNode; +//# sourceMappingURL=file.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map new file mode 100644 index 00000000..d1b5b2a9 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/file.js"],"names":[],"mappings":";AAqGA;;GAEG;AACH,2BAFU,OAAO,KAAK,EAAE,gBAAgB,CAyBvC;;;;uBApHY,OAAO,gBAAgB,EAAE,eAAe;oBACxC,OAAO,gCAAgC,EAAE,QAAQ;cACjD,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts new file mode 100644 index 00000000..fa9dac87 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts @@ -0,0 +1,23 @@ +export = hamtShardedDirectoryContent; +/** + * @typedef {import('ipfs-unixfs-importer/src/types').BlockAPI} BlockAPI + * @typedef {import('../../../types').ExporterOptions} ExporterOptions + * @typedef {import('../../../types').Resolve} Resolve + * @typedef {import('../../../types').UnixfsV1DirectoryContent} UnixfsV1DirectoryContent + * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver + * @typedef {import('@ipld/dag-pb').PBNode} PBNode + */ +/** + * @type {UnixfsV1Resolver} + */ +declare const hamtShardedDirectoryContent: UnixfsV1Resolver; +declare namespace hamtShardedDirectoryContent { + export { BlockAPI, ExporterOptions, Resolve, UnixfsV1DirectoryContent, UnixfsV1Resolver, PBNode }; +} +type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; +type BlockAPI = import('ipfs-unixfs-importer/src/types').BlockAPI; +type ExporterOptions = import('../../../types').ExporterOptions; +type Resolve = import('../../../types').Resolve; +type UnixfsV1DirectoryContent = import('../../../types').UnixfsV1DirectoryContent; +type PBNode = import('@ipld/dag-pb').PBNode; +//# sourceMappingURL=hamt-sharded-directory.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map new file mode 100644 index 00000000..94a26f78 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hamt-sharded-directory.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/hamt-sharded-directory.js"],"names":[],"mappings":";AAIA;;;;;;;GAOG;AAEH;;GAEG;AACH,2CAFU,gBAAgB,CAYzB;;;;wBAjBY,OAAO,gBAAgB,EAAE,gBAAgB;gBAJzC,OAAO,gCAAgC,EAAE,QAAQ;uBACjD,OAAO,gBAAgB,EAAE,eAAe;eACxC,OAAO,gBAAgB,EAAE,OAAO;gCAChC,OAAO,gBAAgB,EAAE,wBAAwB;cAEjD,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts new file mode 100644 index 00000000..e1e92ca8 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts @@ -0,0 +1,15 @@ +export = rawContent; +/** + * @typedef {import('../../../types').ExporterOptions} ExporterOptions + * @typedef {import('../../../types').UnixfsV1Resolver} UnixfsV1Resolver + */ +/** + * @type {UnixfsV1Resolver} + */ +declare const rawContent: UnixfsV1Resolver; +declare namespace rawContent { + export { ExporterOptions, UnixfsV1Resolver }; +} +type UnixfsV1Resolver = import('../../../types').UnixfsV1Resolver; +type ExporterOptions = import('../../../types').ExporterOptions; +//# sourceMappingURL=raw.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map new file mode 100644 index 00000000..aec0596d --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"raw.d.ts","sourceRoot":"","sources":["../../../../../src/resolvers/unixfs-v1/content/raw.js"],"names":[],"mappings":";AAKA;;;GAGG;AAEH;;GAEG;AACH,0BAFU,gBAAgB,CAsBzB;;;;wBA1BY,OAAO,gBAAgB,EAAE,gBAAgB;uBADzC,OAAO,gBAAgB,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts new file mode 100644 index 00000000..fa0762f2 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts @@ -0,0 +1,15 @@ +export = unixFsResolver; +/** + * @type {Resolver} + */ +declare const unixFsResolver: Resolver; +declare namespace unixFsResolver { + export { ExporterOptions, UnixFSEntry, Resolve, Resolver, UnixfsV1Resolver, PBNode }; +} +type Resolver = import('../../types').Resolver; +type ExporterOptions = import('../../types').ExporterOptions; +type UnixFSEntry = import('../../types').UnixFSEntry; +type Resolve = import('../../types').Resolve; +type UnixfsV1Resolver = import('../../types').UnixfsV1Resolver; +type PBNode = import('@ipld/dag-pb').PBNode; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map new file mode 100644 index 00000000..76c94694 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/unixfs-v1/index.js"],"names":[],"mappings":";AA2CA;;GAEG;AACH,8BAFU,QAAQ,CAoEjB;;;;gBApGY,OAAO,aAAa,EAAE,QAAQ;uBAH9B,OAAO,aAAa,EAAE,eAAe;mBACrC,OAAO,aAAa,EAAE,WAAW;eACjC,OAAO,aAAa,EAAE,OAAO;wBAE7B,OAAO,aAAa,EAAE,gBAAgB;cACtC,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/types.d.ts b/packages/ipfs-unixfs-exporter/dist/src/types.d.ts new file mode 100644 index 00000000..73f4c8e7 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/types.d.ts @@ -0,0 +1,74 @@ +import { CID } from 'multiformats/cid' +import UnixFS from 'ipfs-unixfs' +import { PBNode } from '@ipld/dag-pb' + +interface ExporterOptions { + offset?: number + length?: number + signal?: AbortSignal + timeout?: number +} + +interface Exportable { + type: 'file' | 'directory' | 'object' | 'raw' | 'identity', + name: string + path: string + cid: CID + depth: number + size: number + content: (options?: ExporterOptions) => AsyncIterable +} + +interface UnixFSFile extends Exportable { + type: 'file' + unixfs: UnixFS + node: PBNode +} + +interface UnixFSDirectory extends Exportable { + type: 'directory' + unixfs: UnixFS + node: PBNode +} + +interface ObjectNode extends Exportable { + type: 'object' + node: Uint8Array +} + +interface RawNode extends Exportable { + type: 'raw' + node: Uint8Array +} + +interface IdentityNode extends Exportable { + type: 'identity' + node: Uint8Array +} + +type UnixFSEntry = UnixFSFile | UnixFSDirectory | ObjectNode | RawNode | IdentityNode + +interface NextResult { + cid: CID + name: string + path: string + toResolve: string[] +} + +interface ResolveResult { + entry: UnixFSEntry + next?: NextResult +} + +type Resolve = (cid: CID, name: string, path: string, toResolve: string[], depth: number, ipld: IPLD, options: ExporterOptions) => Promise +type Resolver = (cid: CID, name: string, path: string, toResolve: string[], resolve: Resolve, depth: number, ipld: IPLD, options: ExporterOptions) => Promise + +type UnixfsV1FileContent = AsyncIterable | Iterable +type UnixfsV1DirectoryContent = AsyncIterable | Iterable +type UnixfsV1Content = UnixfsV1FileContent | UnixfsV1DirectoryContent +type UnixfsV1Resolver = (cid: CID, node: PBNode, unixfs: UnixFS, path: string, resolve: Resolve, depth: number, ipld: IPLD) => (options: ExporterOptions) => UnixfsV1Content + +interface Block { + cid: CID, + bytes: Uint8Array +} diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts new file mode 100644 index 00000000..bc211869 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts @@ -0,0 +1,3 @@ +declare function _exports(block: Uint8Array, blockStart: number, requestedStart: number, requestedEnd: number): Uint8Array; +export = _exports; +//# sourceMappingURL=extract-data-from-block.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map new file mode 100644 index 00000000..761824c0 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"extract-data-from-block.d.ts","sourceRoot":"","sources":["../../../src/utils/extract-data-from-block.js"],"names":[],"mappings":"AAQiB,iCALN,UAAU,cACV,MAAM,kBACN,MAAM,gBACN,MAAM,cAuBhB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts new file mode 100644 index 00000000..03f9b264 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts @@ -0,0 +1,30 @@ +export = findShardCid; +/** + * @typedef {object} ShardTraversalContext + * @property {number} hamtDepth + * @property {Bucket} rootBucket + * @property {Bucket} lastBucket + * + * @param {PBNode} node + * @param {string} name + * @param {BlockService} blockService + * @param {ShardTraversalContext} [context] + * @param {ExporterOptions} [options] + * @returns {Promise} + */ +declare function findShardCid(node: PBNode, name: string, blockService: BlockService, context?: ShardTraversalContext | undefined, options?: import("../types").ExporterOptions | undefined): Promise; +declare namespace findShardCid { + export { BlockService, CID, ExporterOptions, PBNode, PBLink, ShardTraversalContext }; +} +type PBNode = import('@ipld/dag-pb').PBNode; +type BlockService = import('ipfs-unixfs-importer/src/types').BlockAPI; +type ShardTraversalContext = { + hamtDepth: number; + rootBucket: Bucket; + lastBucket: Bucket; +}; +type CID = import('multiformats/cid').CID; +type ExporterOptions = import('../types').ExporterOptions; +type PBLink = import('@ipld/dag-pb').PBLink; +import { Bucket } from "hamt-sharding"; +//# sourceMappingURL=find-cid-in-shard.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map new file mode 100644 index 00000000..ce27c753 --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"find-cid-in-shard.d.ts","sourceRoot":"","sources":["../../../src/utils/find-cid-in-shard.js"],"names":[],"mappings":";AA2FA;;;;;;;;;;;;GAYG;AACH,oCAPW,MAAM,QACN,MAAM,gBACN,YAAY,0GAGV,QAAQ,GAAG,GAAC,IAAI,CAAC,CA8D7B;;;;cA1JY,OAAO,cAAc,EAAE,MAAM;oBAH7B,OAAO,gCAAgC,EAAE,QAAQ;;eAsFhD,MAAM;gBACN,OAAO,OAAO,CAAC;gBACf,OAAO,OAAO,CAAC;;WAvFhB,OAAO,kBAAkB,EAAE,GAAG;uBAC9B,OAAO,UAAU,EAAE,eAAe;cAElC,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts new file mode 100644 index 00000000..d181958e --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts @@ -0,0 +1,11 @@ +export = validateOffsetAndLength; +/** + * @param {number} size + * @param {number} [offset] + * @param {number} [length] + */ +declare function validateOffsetAndLength(size: number, offset?: number | undefined, length?: number | undefined): { + offset: number; + length: number; +}; +//# sourceMappingURL=validate-offset-and-length.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map new file mode 100644 index 00000000..5b1f25be --- /dev/null +++ b/packages/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validate-offset-and-length.d.ts","sourceRoot":"","sources":["../../../src/utils/validate-offset-and-length.js"],"names":[],"mappings":";AAIA;;;;GAIG;AACH,+CAJW,MAAM;;;EAiChB"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-exporter/package.json b/packages/ipfs-unixfs-exporter/package.json index 84219b35..965f11f6 100644 --- a/packages/ipfs-unixfs-exporter/package.json +++ b/packages/ipfs-unixfs-exporter/package.json @@ -42,7 +42,7 @@ "detect-node": "^2.0.4", "events": "^3.3.0", "ipfs-core-types": "^0.3.1", - "ipfs-unixfs-importer": "^7.0.3", + "ipfs-unixfs-importer": "../ipfs-unixfs-importer", "it-all": "^1.0.5", "it-buffer-stream": "^2.0.0", "it-first": "^1.0.6", diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts new file mode 100644 index 00000000..214ca322 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts @@ -0,0 +1,3 @@ +declare const _exports: import('../types').Chunker; +export = _exports; +//# sourceMappingURL=fixed-size.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map new file mode 100644 index 00000000..8a1f19c7 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/fixed-size.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fixed-size.d.ts","sourceRoot":"","sources":["../../../src/chunker/fixed-size.js"],"names":[],"mappings":"wBAMU,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts new file mode 100644 index 00000000..8b01a3ea --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts @@ -0,0 +1,5 @@ +declare function _exports(type: import('../types').ChunkerType, source: AsyncIterable, options: import('../types').ImporterOptions): AsyncIterable; +export = _exports; +export type ImporterOptions = import('../types').ImporterOptions; +export type Chunker = import('../types').Chunker; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map new file mode 100644 index 00000000..151c9fb3 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chunker/index.js"],"names":[],"mappings":"AAsBiB,gCAJN,OAAO,UAAU,EAAE,WAAW,UAC9B,cAAc,UAAU,CAAC,WACzB,OAAO,UAAU,EAAE,eAAe,6BAU5C;;8BAzBY,OAAO,UAAU,EAAE,eAAe;sBAClC,OAAO,UAAU,EAAE,OAAO"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts new file mode 100644 index 00000000..2403c0d9 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts @@ -0,0 +1,10 @@ +declare const _exports: import('../types').Chunker; +export = _exports; +export type RabinOptions = { + min: number; + max: number; + bits: number; + window: number; + polynomial: number; +}; +//# sourceMappingURL=rabin.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map new file mode 100644 index 00000000..202ebd76 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/chunker/rabin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rabin.d.ts","sourceRoot":"","sources":["../../../src/chunker/rabin.js"],"names":[],"mappings":"wBAkBU,OAAO,UAAU,EAAE,OAAO;;;SARtB,MAAM;SACN,MAAM;UACN,MAAM;YACN,MAAM;gBACN,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts new file mode 100644 index 00000000..e5a5ca6e --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts @@ -0,0 +1,13 @@ +export = dirBuilder; +/** + * @typedef {import('../types').Directory} Directory + */ +/** + * @type {import('../types').UnixFSV1DagBuilder} + */ +declare const dirBuilder: import('../types').UnixFSV1DagBuilder; +declare namespace dirBuilder { + export { Directory }; +} +type Directory = import('../types').Directory; +//# sourceMappingURL=dir.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map new file mode 100644 index 00000000..45275d2d --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/dir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/dir.js"],"names":[],"mappings":";AAMA;;GAEG;AAEH;;GAEG;AACH,0BAFU,OAAO,UAAU,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAmBzD;;;;iBAvBY,OAAO,UAAU,EAAE,SAAS"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts new file mode 100644 index 00000000..e84f8a1c --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts @@ -0,0 +1,13 @@ +export = balanced; +/** + * @typedef {import('../../types').FileDAGBuilder} FileDAGBuilder + */ +/** + * @type {FileDAGBuilder} + */ +declare function balanced(source: AsyncIterable | Iterable, reduce: import("../../types").Reducer, options: import("../../types").ImporterOptions): Promise; +declare namespace balanced { + export { FileDAGBuilder }; +} +type FileDAGBuilder = import('../../types').FileDAGBuilder; +//# sourceMappingURL=balanced.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map new file mode 100644 index 00000000..33a36921 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/balanced.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"balanced.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/balanced.js"],"names":[],"mappings":";AAIA;;GAEG;AAEH;;GAEG;AACH,sSAEC;;;;sBARY,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts new file mode 100644 index 00000000..71b3b20e --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts @@ -0,0 +1,13 @@ +export = bufferImporter; +/** + * @typedef {import('../../types').BufferImporter} BufferImporter + */ +/** + * @type {BufferImporter} + */ +declare function bufferImporter(file: import("../../types").File, block: import("../../types").BlockAPI, options: import("../../types").ImporterOptions): AsyncIterable<() => Promise>; +declare namespace bufferImporter { + export { BufferImporter }; +} +type BufferImporter = import('../../types').BufferImporter; +//# sourceMappingURL=buffer-importer.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map new file mode 100644 index 00000000..86a57d6a --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/buffer-importer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"buffer-importer.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/buffer-importer.js"],"names":[],"mappings":";AAOA;;GAEG;AAEH;;GAEG;AACH,qOAmCC;;;;sBAzCY,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts new file mode 100644 index 00000000..5be05008 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts @@ -0,0 +1,3 @@ +declare const _exports: import('../../types').FileDAGBuilder; +export = _exports; +//# sourceMappingURL=flat.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map new file mode 100644 index 00000000..b8b0d861 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/flat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/flat.js"],"names":[],"mappings":"wBAKU,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts new file mode 100644 index 00000000..9320e69c --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts @@ -0,0 +1,15 @@ +export = fileBuilder; +/** + * @type {import('../../types').UnixFSV1DagBuilder} + */ +declare function fileBuilder(file: import("../../types").File, block: import("../../types").BlockAPI, options: import("../../types").ImporterOptions): Promise; +declare namespace fileBuilder { + export { BlockAPI, File, ImporterOptions, Reducer, DAGBuilder, FileDAGBuilder }; +} +type BlockAPI = import('../../types').BlockAPI; +type File = import('../../types').File; +type ImporterOptions = import('../../types').ImporterOptions; +type Reducer = import('../../types').Reducer; +type DAGBuilder = import('../../types').DAGBuilder; +type FileDAGBuilder = import('../../types').FileDAGBuilder; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map new file mode 100644 index 00000000..3677ef11 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/index.js"],"names":[],"mappings":";AA+LA;;GAEG;AACH,6MAQC;;;;gBA/LY,OAAO,aAAa,EAAE,QAAQ;YAC9B,OAAO,aAAa,EAAE,IAAI;uBAC1B,OAAO,aAAa,EAAE,eAAe;eACrC,OAAO,aAAa,EAAE,OAAO;kBAC7B,OAAO,aAAa,EAAE,UAAU;sBAChC,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts new file mode 100644 index 00000000..42ce17c0 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts @@ -0,0 +1,9 @@ +declare const _exports: FileDAGBuilder; +export = _exports; +export type UnixFS = import('ipfs-unixfs').UnixFS; +export type ImporterOptions = import('../../types').ImporterOptions; +export type InProgressImportResult = import('../../types').InProgressImportResult; +export type TrickleDagNode = import('../../types').TrickleDagNode; +export type Reducer = import('../../types').Reducer; +export type FileDAGBuilder = import('../../types').FileDAGBuilder; +//# sourceMappingURL=trickle.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map new file mode 100644 index 00000000..f2bff826 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/file/trickle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"trickle.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/trickle.js"],"names":[],"mappings":"wBAcU,cAAc;;qBATX,OAAO,aAAa,EAAE,MAAM;8BAC5B,OAAO,aAAa,EAAE,eAAe;qCACrC,OAAO,aAAa,EAAE,sBAAsB;6BAC5C,OAAO,aAAa,EAAE,cAAc;sBACpC,OAAO,aAAa,EAAE,OAAO;6BAC7B,OAAO,aAAa,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts new file mode 100644 index 00000000..143999a7 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts @@ -0,0 +1,14 @@ +export = dagBuilder; +/** + * @type {DAGBuilder} + */ +declare function dagBuilder(source: AsyncIterable | Iterable, block: import("../types").BlockAPI, options: import("../types").ImporterOptions): AsyncIterable<() => Promise>; +declare namespace dagBuilder { + export { File, Directory, DAGBuilder, Chunker, ChunkValidator }; +} +type File = import('../types').File; +type Directory = import('../types').Directory; +type DAGBuilder = import('../types').DAGBuilder; +type Chunker = import('../types').Chunker; +type ChunkValidator = import('../types').ChunkValidator; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map new file mode 100644 index 00000000..b25ac40f --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/index.js"],"names":[],"mappings":";AAsDA;;GAEG;AACH,gSA4DC;;;;YA9GY,OAAO,UAAU,EAAE,IAAI;iBACvB,OAAO,UAAU,EAAE,SAAS;kBAC5B,OAAO,UAAU,EAAE,UAAU;eAC7B,OAAO,UAAU,EAAE,OAAO;sBAC1B,OAAO,UAAU,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts new file mode 100644 index 00000000..d3df9e80 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts @@ -0,0 +1,13 @@ +export = validateChunks; +/** + * @typedef {import('../types').ChunkValidator} ChunkValidator + */ +/** + * @type {ChunkValidator} + */ +declare function validateChunks(source: AsyncIterable): AsyncIterable; +declare namespace validateChunks { + export { ChunkValidator }; +} +type ChunkValidator = import('../types').ChunkValidator; +//# sourceMappingURL=validate-chunks.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map new file mode 100644 index 00000000..a2e34ccc --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validate-chunks.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/validate-chunks.js"],"names":[],"mappings":";AAKA;;GAEG;AAEH;;GAEG;AACH,8FAgBC;;;;sBAtBY,OAAO,UAAU,EAAE,cAAc"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts new file mode 100644 index 00000000..40b912f7 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts @@ -0,0 +1,31 @@ +export = DirFlat; +/** + * @typedef {import('./types').ImporterOptions} ImporterOptions + * @typedef {import('./types').ImportResult} ImportResult + * @typedef {import('./types').InProgressImportResult} InProgressImportResult + * @typedef {import('./types').BlockAPI} BlockAPI + * @typedef {import('./dir').DirProps} DirProps + * @typedef {import('@ipld/dag-pb').PBNode} PBNode + * @typedef {import('@ipld/dag-pb').PBLink} PBLink + */ +declare class DirFlat extends Dir { + /** @type {{ [key: string]: InProgressImportResult | Dir }} */ + _children: { + [key: string]: import("./types").InProgressImportResult | Dir; + }; + childCount(): number; + directChildrenCount(): number; + onlyChild(): import("./types").InProgressImportResult | Dir; +} +declare namespace DirFlat { + export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, DirProps, PBNode, PBLink }; +} +import Dir = require("./dir"); +type ImporterOptions = import('./types').ImporterOptions; +type ImportResult = import('./types').ImportResult; +type InProgressImportResult = import('./types').InProgressImportResult; +type BlockAPI = import('./types').BlockAPI; +type DirProps = import('./dir').DirProps; +type PBNode = import('@ipld/dag-pb').PBNode; +type PBLink = import('@ipld/dag-pb').PBLink; +//# sourceMappingURL=dir-flat.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map new file mode 100644 index 00000000..7b35660b --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir-flat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dir-flat.d.ts","sourceRoot":"","sources":["../../src/dir-flat.js"],"names":[],"mappings":";AAOA;;;;;;;;GAQG;AAEH;IAQI,8DAA8D;IAC9D;;MAAmB;IAqBrB,qBAEC;IAED,8BAEC;IAED,4DAEC;CAuEF;;;;;uBAxHY,OAAO,SAAS,EAAE,eAAe;oBACjC,OAAO,SAAS,EAAE,YAAY;8BAC9B,OAAO,SAAS,EAAE,sBAAsB;gBACxC,OAAO,SAAS,EAAE,QAAQ;gBAC1B,OAAO,OAAO,EAAE,QAAQ;cACxB,OAAO,cAAc,EAAE,MAAM;cAC7B,OAAO,cAAc,EAAE,MAAM"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts new file mode 100644 index 00000000..cfdaee94 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts @@ -0,0 +1,28 @@ +export = DirSharded; +/** + * @typedef {import('./types').ImporterOptions} ImporterOptions + * @typedef {import('./types').ImportResult} ImportResult + * @typedef {import('./types').InProgressImportResult} InProgressImportResult + * @typedef {import('./types').BlockAPI} BlockAPI + */ +/** + * @typedef {import('./dir').DirProps} DirProps + */ +declare class DirSharded extends Dir { + /** @type {Bucket} */ + _bucket: Bucket; + childCount(): number; + directChildrenCount(): number; + onlyChild(): Bucket | Bucket.BucketChild; +} +declare namespace DirSharded { + export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, DirProps }; +} +import Dir = require("./dir"); +import { Bucket } from "hamt-sharding"; +type InProgressImportResult = import('./types').InProgressImportResult; +type ImporterOptions = import('./types').ImporterOptions; +type ImportResult = import('./types').ImportResult; +type BlockAPI = import('./types').BlockAPI; +type DirProps = import('./dir').DirProps; +//# sourceMappingURL=dir-sharded.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map new file mode 100644 index 00000000..885d2704 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir-sharded.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dir-sharded.d.ts","sourceRoot":"","sources":["../../src/dir-sharded.js"],"names":[],"mappings":";AAQA;;;;;GAKG;AAEH;;GAEG;AAEH;IAQI,mDAAmD;IACnD,SADW,OAAO,sBAAsB,GAAG,GAAG,CAAC,CAI7C;IAkBJ,qBAEC;IAED,8BAEC;IAED,yIAEC;CAuBF;;;;;;8BAvEY,OAAO,SAAS,EAAE,sBAAsB;uBAFxC,OAAO,SAAS,EAAE,eAAe;oBACjC,OAAO,SAAS,EAAE,YAAY;gBAE9B,OAAO,SAAS,EAAE,QAAQ;gBAI1B,OAAO,OAAO,EAAE,QAAQ"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts new file mode 100644 index 00000000..b9edc648 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts @@ -0,0 +1,85 @@ +export = Dir; +/** + * @typedef {import('./types').ImporterOptions} ImporterOptions + * @typedef {import('./types').ImportResult} ImportResult + * @typedef {import('./types').InProgressImportResult} InProgressImportResult + * @typedef {import('./types').BlockAPI} BlockAPI + * @typedef {import('multiformats/cid').CID} CID + * @typedef {object} DirProps + * @property {boolean} root + * @property {boolean} dir + * @property {string} path + * @property {boolean} dirty + * @property {boolean} flat + * @property {Dir} [parent] + * @property {string} [parentKey] + * @property {import('ipfs-unixfs').UnixFS} [unixfs] + * @property {number} [mode] + * @property {import('ipfs-unixfs').Mtime} [mtime] + */ +declare class Dir { + /** + * + * @param {DirProps} props + * @param {ImporterOptions} options + */ + constructor(props: DirProps, options: ImporterOptions); + options: import("./types").ImporterOptions; + root: boolean; + dir: boolean; + path: string; + dirty: boolean; + flat: boolean; + parent: import("./dir") | undefined; + parentKey: string | undefined; + unixfs: import("ipfs-unixfs").UnixFS | undefined; + mode: number | undefined; + mtime: import("ipfs-unixfs/dist/src/types").Mtime | undefined; + /** @type {CID | undefined} */ + cid: CID | undefined; + /** @type {number | undefined} */ + size: number | undefined; + /** + * @param {string} name + * @param {InProgressImportResult | Dir} value + */ + put(name: string, value: InProgressImportResult | Dir): Promise; + /** + * @param {string} name + * @returns {Promise} + */ + get(name: string): Promise; + /** + * @returns {AsyncIterable<{ key: string, child: InProgressImportResult | Dir}>} + */ + eachChildSeries(): AsyncIterable<{ + key: string; + child: InProgressImportResult | Dir; + }>; + /** + * @param {BlockAPI} block + * @returns {AsyncIterable} + */ + flush(block: BlockAPI): AsyncIterable; +} +declare namespace Dir { + export { ImporterOptions, ImportResult, InProgressImportResult, BlockAPI, CID, DirProps }; +} +type CID = import('multiformats/cid').CID; +type InProgressImportResult = import('./types').InProgressImportResult; +type BlockAPI = import('./types').BlockAPI; +type ImportResult = import('./types').ImportResult; +type DirProps = { + root: boolean; + dir: boolean; + path: string; + dirty: boolean; + flat: boolean; + parent?: import("./dir") | undefined; + parentKey?: string | undefined; + unixfs?: import("ipfs-unixfs").UnixFS | undefined; + mode?: number | undefined; + mtime?: import("ipfs-unixfs/dist/src/types").Mtime | undefined; +}; +type ImporterOptions = import('./types').ImporterOptions; +//# sourceMappingURL=dir.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map new file mode 100644 index 00000000..28399a34 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/dir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;OAIG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,oCAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB,8DAAwB;IAExB,8BAA8B;IAC9B,KADW,GAAG,GAAG,SAAS,CACN;IACpB,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACR;IAGvB;;;OAGG;IACH,UAHW,MAAM,SACN,sBAAsB,GAAG,GAAG,iBAEZ;IAE3B;;;OAGG;IACH,UAHW,MAAM,GACJ,QAAQ,sBAAsB,GAAG,GAAG,GAAG,SAAS,CAAC,CAI7D;IAED;;OAEG;IACH,mBAFa,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAA;KAAC,CAAC,CAEjD;IAE9B;;;OAGG;IACH,aAHW,QAAQ,GACN,cAAc,YAAY,CAAC,CAEf;CAC1B;;;;WA/DY,OAAO,kBAAkB,EAAE,GAAG;8BAF9B,OAAO,SAAS,EAAE,sBAAsB;gBACxC,OAAO,SAAS,EAAE,QAAQ;oBAF1B,OAAO,SAAS,EAAE,YAAY;;UAK7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;uBAVR,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts new file mode 100644 index 00000000..02dfe981 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts @@ -0,0 +1,6 @@ +declare function _exports(child: Dir | null, dir: Dir, threshold: number, options: ImporterOptions): Promise; +export = _exports; +export type Dir = import('./dir'); +export type ImporterOptions = import('./types').ImporterOptions; +import DirSharded = require("./dir-sharded"); +//# sourceMappingURL=flat-to-shard.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map new file mode 100644 index 00000000..30a3a53b --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/flat-to-shard.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"flat-to-shard.d.ts","sourceRoot":"","sources":["../../src/flat-to-shard.js"],"names":[],"mappings":"AAiBiB,iCANN,GAAG,GAAG,IAAI,OACV,GAAG,aACH,MAAM,WACN,eAAe,GACb,QAAQ,UAAU,CAAC,CA6B/B;;kBAtCY,OAAO,OAAO,CAAC;8BACf,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/index.d.ts b/packages/ipfs-unixfs-importer/dist/src/index.d.ts new file mode 100644 index 00000000..0f654835 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/index.d.ts @@ -0,0 +1,43 @@ +export type BlockAPI = import('./types').BlockAPI; +export type ImportCandidate = import('./types').ImportCandidate; +export type UserImporterOptions = import('./types').UserImporterOptions; +export type ImporterOptions = import('./types').ImporterOptions; +export type Directory = import('./types').Directory; +export type File = import('./types').File; +export type ImportResult = import('./types').ImportResult; +export type Chunker = import('./types').Chunker; +export type DAGBuilder = import('./types').DAGBuilder; +export type TreeBuilder = import('./types').TreeBuilder; +export type BufferImporter = import('./types').BufferImporter; +export type ChunkValidator = import('./types').ChunkValidator; +export type Reducer = import('./types').Reducer; +export type ProgressHandler = import('./types').ProgressHandler; +/** + * @typedef {import('./types').BlockAPI} BlockAPI + * @typedef {import('./types').ImportCandidate} ImportCandidate + * @typedef {import('./types').UserImporterOptions} UserImporterOptions + * @typedef {import('./types').ImporterOptions} ImporterOptions + * @typedef {import('./types').Directory} Directory + * @typedef {import('./types').File} File + * @typedef {import('./types').ImportResult} ImportResult + * + * @typedef {import('./types').Chunker} Chunker + * @typedef {import('./types').DAGBuilder} DAGBuilder + * @typedef {import('./types').TreeBuilder} TreeBuilder + * @typedef {import('./types').BufferImporter} BufferImporter + * @typedef {import('./types').ChunkValidator} ChunkValidator + * @typedef {import('./types').Reducer} Reducer + * @typedef {import('./types').ProgressHandler} ProgressHandler + */ +/** + * @param {AsyncIterable | Iterable | ImportCandidate} source + * @param {BlockAPI} block + * @param {UserImporterOptions} options + */ +export function importer(source: AsyncIterable | Iterable | ImportCandidate, block: BlockAPI, options?: UserImporterOptions): AsyncGenerator<{ + cid: import("multiformats/cid").CID; + path: string | undefined; + unixfs: import("ipfs-unixfs").UnixFS | undefined; + size: number; +}, void, unknown>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map new file mode 100644 index 00000000..6a5777a2 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"uBAMa,OAAO,SAAS,EAAE,QAAQ;8BAC1B,OAAO,SAAS,EAAE,eAAe;kCACjC,OAAO,SAAS,EAAE,mBAAmB;8BACrC,OAAO,SAAS,EAAE,eAAe;wBACjC,OAAO,SAAS,EAAE,SAAS;mBAC3B,OAAO,SAAS,EAAE,IAAI;2BACtB,OAAO,SAAS,EAAE,YAAY;sBAE9B,OAAO,SAAS,EAAE,OAAO;yBACzB,OAAO,SAAS,EAAE,UAAU;0BAC5B,OAAO,SAAS,EAAE,WAAW;6BAC7B,OAAO,SAAS,EAAE,cAAc;6BAChC,OAAO,SAAS,EAAE,cAAc;sBAChC,OAAO,SAAS,EAAE,OAAO;8BACzB,OAAO,SAAS,EAAE,eAAe;AAf9C;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,iCAJW,cAAc,eAAe,CAAC,GAAG,SAAS,eAAe,CAAC,GAAG,eAAe,SAC5E,QAAQ,YACR,mBAAmB;;;;;kBAwC7B"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/options.d.ts b/packages/ipfs-unixfs-importer/dist/src/options.d.ts new file mode 100644 index 00000000..6f391813 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/options.d.ts @@ -0,0 +1,5 @@ +declare function _exports(options?: UserImporterOptions): ImporterOptions; +export = _exports; +export type UserImporterOptions = import('./types').UserImporterOptions; +export type ImporterOptions = import('./types').ImporterOptions; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map new file mode 100644 index 00000000..c9e50ba1 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.js"],"names":[],"mappings":"AAwEiB,oCAHN,mBAAmB,GACjB,eAAe,CAI3B;;kCA9CY,OAAO,SAAS,EAAE,mBAAmB;8BACrC,OAAO,SAAS,EAAE,eAAe"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts new file mode 100644 index 00000000..8f654459 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts @@ -0,0 +1,14 @@ +export = treeBuilder; +/** + * @type {TreeBuilder} + */ +declare function treeBuilder(source: AsyncIterable, block: import("./types").BlockAPI, options: import("./types").ImporterOptions): AsyncIterable; +declare namespace treeBuilder { + export { ImportResult, InProgressImportResult, ImporterOptions, BlockAPI, TreeBuilder }; +} +type ImportResult = import('./types').ImportResult; +type InProgressImportResult = import('./types').InProgressImportResult; +type ImporterOptions = import('./types').ImporterOptions; +type BlockAPI = import('./types').BlockAPI; +type TreeBuilder = (source: AsyncIterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable; +//# sourceMappingURL=tree-builder.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map new file mode 100644 index 00000000..c9dd22ca --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/tree-builder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/tree-builder.js"],"names":[],"mappings":";AAiFA;;GAEG;AACH,4NAiCC;;;;oBA7GY,OAAO,SAAS,EAAE,YAAY;8BAC9B,OAAO,SAAS,EAAE,sBAAsB;uBACxC,OAAO,SAAS,EAAE,eAAe;gBACjC,OAAO,SAAS,EAAE,QAAQ;4BACjB,cAAc,sBAAsB,CAAC,SAAS,QAAQ,WAAW,eAAe,KAAK,cAAc,YAAY,CAAC"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/types.d.ts b/packages/ipfs-unixfs-importer/dist/src/types.d.ts new file mode 100644 index 00000000..2d32eefd --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/types.d.ts @@ -0,0 +1,167 @@ +import { UnixFS, Mtime } from 'ipfs-unixfs' +import { CID } from 'multiformats/cid' +import { HashName } from 'multihashes' +import { CodecName } from 'multicodec' +import MultihashDigest from 'multiformats/hashes/hasher' + +interface ImportCandidate { + path?: string + content?: AsyncIterable + mtime?: Mtime + mode?: number +} + +interface File { + content: AsyncIterable + path?: string + mtime?: Mtime + mode?: number +} + +interface Directory { + path?: string + mtime?: Mtime + mode?: number +} + +interface ImportResult { + cid: CID + size: number + path?: string + unixfs?: UnixFS +} + +interface InProgressImportResult extends ImportResult { + single?: boolean +} + +type ChunkerType = 'fixed' | 'rabin' +type ProgressHandler = (chunkSize: number, path?: string) => void +type HamtHashFn = (value: Uint8Array) => Promise +type Chunker = (source: AsyncIterable, options: ImporterOptions) => AsyncIterable +type DAGBuilder = (source: AsyncIterable | Iterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable<() => Promise> +type TreeBuilder = (source: AsyncIterable, block: BlockAPI, options: ImporterOptions) => AsyncIterable +type BufferImporter = (file: File, block: BlockAPI, options: ImporterOptions) => AsyncIterable<() => Promise> +type ChunkValidator = (source: AsyncIterable, options: ImporterOptions) => AsyncIterable +type UnixFSV1DagBuilder = (item: T, block: BlockAPI, options: ImporterOptions) => Promise +type Reducer = (leaves: InProgressImportResult[]) => Promise + +type FileDAGBuilder = (source: AsyncIterable | Iterable, reducer: Reducer, options: ImporterOptions) => Promise + +interface UserImporterOptions { + strategy?: 'balanced' | 'flat' | 'trickle' + rawLeaves?: boolean + onlyHash?: boolean + reduceSingleLeafToSelf?: boolean + hasher?: MultihashDigest + leafType?: 'file' | 'raw' + cidVersion?: CIDVersion + progress?: ProgressHandler + shardSplitThreshold?: number + fileImportConcurrency?: number + blockWriteConcurrency?: number + minChunkSize?: number + maxChunkSize?: number + avgChunkSize?: number + window?: number + polynomial?: number + maxChildrenPerNode?: number + layerRepeat?: number + wrapWithDirectory?: boolean + pin?: boolean + recursive?: boolean + hidden?: boolean + preload?: boolean + timeout?: number + hamtHashFn?: HamtHashFn + hamtBucketBits?: number + hamtHashCode?: number + chunker?: ChunkerType | Chunker + dagBuilder?: DAGBuilder + treeBuilder?: TreeBuilder + bufferImporter?: BufferImporter + chunkValidator?: ChunkValidator +} + +interface ImporterOptions { + strategy: 'balanced' | 'flat' | 'trickle' + rawLeaves: boolean + onlyHash: boolean + reduceSingleLeafToSelf: boolean + hasher: MultihashDigest + leafType: 'file' | 'raw' + cidVersion: CIDVersion + progress: ProgressHandler + shardSplitThreshold: number + fileImportConcurrency: number + blockWriteConcurrency: number + minChunkSize: number + maxChunkSize: number + avgChunkSize: number + window: number + polynomial: number + maxChildrenPerNode: number + layerRepeat: number + wrapWithDirectory: boolean + pin: boolean + recursive: boolean + hidden: boolean + preload: boolean + timeout?: number + hamtHashFn: HamtHashFn + hamtBucketBits: number + hamtHashCode: number + chunker: ChunkerType | Chunker + dagBuilder?: DAGBuilder + treeBuilder?: TreeBuilder + bufferImporter?: BufferImporter + chunkValidator?: ChunkValidator +} + +export interface TrickleDagNode { + children: InProgressImportResult[], + depth: number, + maxDepth: number, + maxChildren: number, + data?: InProgressImportResult[], + parent?: TrickleDagNode + cid?: CID, + size?: number, + unixfs?: UnixFS +} + +export interface PersistOptions { + //codec?: string + codec?: number + cidVersion: CIDVersion + hasher: MultihashDigest + onlyHash: boolean + preload?: boolean + timeout?: number + signal?: AbortSignal +} + +// TODO vmx 2021-03-24: decide where to put this +export interface Block { + cid: CID + bytes: Uint8Array +} + +// TODO: remove this and get from core-ipfs-types +export interface BlockAPI { + get: (cid: CID, options?: BlockOptions) => Promise + put: (block: Block, options?: PutOptions) => Promise +} + +// TODO: remove this and get from core-ipfs-types +export interface BlockOptions { + signal?: AbortSignal + timeout?: number + preload?: boolean +} + +// TODO: remove this and get from core-ipfs-types +export interface PutOptions extends BlockOptions { + onlyHash?: boolean + pin?: boolean +} diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts new file mode 100644 index 00000000..29e94370 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts @@ -0,0 +1,9 @@ +export = persist; +/** + * @param {Uint8Array} buffer + * @param {import('../types').BlockAPI} block + * @param {import('../types').PersistOptions} options + */ +declare function persist(buffer: Uint8Array, block: import('../types').BlockAPI, options: import('../types').PersistOptions): Promise; +import { CID } from "multiformats/cid"; +//# sourceMappingURL=persist.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map new file mode 100644 index 00000000..b45eeb7c --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/utils/persist.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/utils/persist.js"],"names":[],"mappings":";AAKA;;;;GAIG;AACH,iCAJW,UAAU,SACV,OAAO,UAAU,EAAE,QAAQ,WAC3B,OAAO,UAAU,EAAE,cAAc,gBA+B3C"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts new file mode 100644 index 00000000..0888cc82 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts @@ -0,0 +1,3 @@ +export = toPathComponents; +declare function toPathComponents(path?: string): string[]; +//# sourceMappingURL=to-path-components.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map new file mode 100644 index 00000000..e1370932 --- /dev/null +++ b/packages/ipfs-unixfs-importer/dist/src/utils/to-path-components.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"to-path-components.d.ts","sourceRoot":"","sources":["../../../src/utils/to-path-components.js"],"names":[],"mappings":";AAEA,2DAMC"} \ No newline at end of file diff --git a/packages/ipfs-unixfs-importer/tsconfig.json b/packages/ipfs-unixfs-importer/tsconfig.json index c6eb8f25..ecced392 100644 --- a/packages/ipfs-unixfs-importer/tsconfig.json +++ b/packages/ipfs-unixfs-importer/tsconfig.json @@ -10,7 +10,8 @@ ], "exclude": [ "dist", - "node_modules" + "node_modules", + "src/unixfs.js" ], "references": [ { diff --git a/packages/ipfs-unixfs/dist/src/index.d.ts b/packages/ipfs-unixfs/dist/src/index.d.ts new file mode 100644 index 00000000..02e4ff88 --- /dev/null +++ b/packages/ipfs-unixfs/dist/src/index.d.ts @@ -0,0 +1,73 @@ +export type Mtime = import('./types').Mtime; +export type MtimeLike = import('./types').MtimeLike; +declare class Data { + /** + * Decode from protobuf https://github.com/ipfs/specs/blob/master/UNIXFS.md + * + * @param {Uint8Array} marshaled + */ + static unmarshal(marshaled: Uint8Array): Data; + /** + * @param {object} [options] + * @param {string} [options.type='file'] + * @param {Uint8Array} [options.data] + * @param {number[]} [options.blockSizes] + * @param {number} [options.hashType] + * @param {number} [options.fanout] + * @param {MtimeLike | null} [options.mtime] + * @param {number | string} [options.mode] + */ + constructor(options?: { + type?: string | undefined; + data?: Uint8Array | undefined; + blockSizes?: number[] | undefined; + hashType?: number | undefined; + fanout?: number | undefined; + mtime?: import("./types").MtimeLike | null | undefined; + mode?: string | number | undefined; + } | undefined); + type: string; + data: Uint8Array | undefined; + hashType: number | undefined; + fanout: number | undefined; + /** @type {number[]} */ + blockSizes: number[]; + _originalMode: number; + /** + * @param {number | undefined} mode + */ + set mode(arg: number | undefined); + /** + * @returns {number | undefined} + */ + get mode(): number | undefined; + mtime: import("./types").Mtime | undefined; + _mode: number | undefined; + isDirectory(): boolean; + /** + * @param {number} size + */ + addBlockSize(size: number): void; + /** + * @param {number} index + */ + removeBlockSize(index: number): void; + /** + * Returns `0` for directories or `data.length + sum(blockSizes)` for everything else + */ + fileSize(): number; + /** + * encode to protobuf Uint8Array + */ + marshal(): Uint8Array; +} +/** + * @param {string | number | undefined} [mode] + */ +export function parseMode(mode?: string | number | undefined): number | undefined; +/** + * @param {any} input + */ +export function parseMtime(input: any): import("./types").Mtime | undefined; +export { Data as UnixFS }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/src/index.d.ts.map b/packages/ipfs-unixfs/dist/src/index.d.ts.map new file mode 100644 index 00000000..7f8672a2 --- /dev/null +++ b/packages/ipfs-unixfs/dist/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"oBAQa,OAAO,SAAS,EAAE,KAAK;wBACvB,OAAO,SAAS,EAAE,SAAS;AAmHxC;IACE;;;;OAIG;IACH,4BAFW,UAAU,QA4BpB;IAED;;;;;;;;;OASG;IACH;;;;;;;;mBAkCC;IAjBC,aAA0B;IAC1B,6BAAgB;IAChB,6BAAwB;IACxB,2BAAoB;IAEpB,uBAAuB;IACvB,YADW,MAAM,EAAE,CACe;IAClC,sBAAsB;IAYxB;;OAEG;IACH,kCAQC;IAED;;OAEG;IACH,+BAEC;IA1BG,2CAA8B;IAYhC,0BAA4E;IAgB9E,uBAEC;IAED;;OAEG;IACH,mBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,uBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,mBAgBC;IAED;;OAEG;IACH,sBA+DC;CACF;AA7SD;;GAEG;AACH,iCAFW,MAAM,GAAG,MAAM,GAAG,SAAS,sBAoBrC;AAED;;GAEG;AACH,kCAFW,GAAG,uCAqEb"} \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/src/types.d.ts b/packages/ipfs-unixfs/dist/src/types.d.ts new file mode 100644 index 00000000..cedc5057 --- /dev/null +++ b/packages/ipfs-unixfs/dist/src/types.d.ts @@ -0,0 +1,7 @@ + +export interface Mtime { + secs: number + nsecs?: number +} + +export type MtimeLike = Mtime | { Seconds: number, FractionalNanoseconds?: number } | [number, number] | Date diff --git a/packages/ipfs-unixfs/dist/src/unixfs.d.ts b/packages/ipfs-unixfs/dist/src/unixfs.d.ts new file mode 100644 index 00000000..ca5a8549 --- /dev/null +++ b/packages/ipfs-unixfs/dist/src/unixfs.d.ts @@ -0,0 +1,238 @@ +import * as $protobuf from "protobufjs"; +/** Properties of a Data. */ +export interface IData { + + /** Data Type */ + Type: Data.DataType; + + /** Data Data */ + Data?: (Uint8Array|null); + + /** Data filesize */ + filesize?: (number|null); + + /** Data blocksizes */ + blocksizes?: (number[]|null); + + /** Data hashType */ + hashType?: (number|null); + + /** Data fanout */ + fanout?: (number|null); + + /** Data mode */ + mode?: (number|null); + + /** Data mtime */ + mtime?: (IUnixTime|null); +} + +/** Represents a Data. */ +export class Data implements IData { + + /** + * Constructs a new Data. + * @param [p] Properties to set + */ + constructor(p?: IData); + + /** Data Type. */ + public Type: Data.DataType; + + /** Data Data. */ + public Data: Uint8Array; + + /** Data filesize. */ + public filesize: number; + + /** Data blocksizes. */ + public blocksizes: number[]; + + /** Data hashType. */ + public hashType: number; + + /** Data fanout. */ + public fanout: number; + + /** Data mode. */ + public mode: number; + + /** Data mtime. */ + public mtime?: (IUnixTime|null); + + /** + * Encodes the specified Data message. Does not implicitly {@link Data.verify|verify} messages. + * @param m Data message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: IData, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Data message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): Data; + + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @param d Plain object + * @returns Data + */ + public static fromObject(d: { [k: string]: any }): Data; + + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @param m Data + * @param [o] Conversion options + * @returns Plain object + */ + public static toObject(m: Data, o?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Data to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; +} + +export namespace Data { + + /** DataType enum. */ + enum DataType { + Raw = 0, + Directory = 1, + File = 2, + Metadata = 3, + Symlink = 4, + HAMTShard = 5 + } +} + +/** Properties of an UnixTime. */ +export interface IUnixTime { + + /** UnixTime Seconds */ + Seconds: number; + + /** UnixTime FractionalNanoseconds */ + FractionalNanoseconds?: (number|null); +} + +/** Represents an UnixTime. */ +export class UnixTime implements IUnixTime { + + /** + * Constructs a new UnixTime. + * @param [p] Properties to set + */ + constructor(p?: IUnixTime); + + /** UnixTime Seconds. */ + public Seconds: number; + + /** UnixTime FractionalNanoseconds. */ + public FractionalNanoseconds: number; + + /** + * Encodes the specified UnixTime message. Does not implicitly {@link UnixTime.verify|verify} messages. + * @param m UnixTime message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: IUnixTime, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnixTime message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns UnixTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): UnixTime; + + /** + * Creates an UnixTime message from a plain object. Also converts values to their respective internal types. + * @param d Plain object + * @returns UnixTime + */ + public static fromObject(d: { [k: string]: any }): UnixTime; + + /** + * Creates a plain object from an UnixTime message. Also converts values to other types if specified. + * @param m UnixTime + * @param [o] Conversion options + * @returns Plain object + */ + public static toObject(m: UnixTime, o?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnixTime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; +} + +/** Properties of a Metadata. */ +export interface IMetadata { + + /** Metadata MimeType */ + MimeType?: (string|null); +} + +/** Represents a Metadata. */ +export class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [p] Properties to set + */ + constructor(p?: IMetadata); + + /** Metadata MimeType. */ + public MimeType: string; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link Metadata.verify|verify} messages. + * @param m Metadata message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: IMetadata, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): Metadata; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param d Plain object + * @returns Metadata + */ + public static fromObject(d: { [k: string]: any }): Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param m Metadata + * @param [o] Conversion options + * @returns Plain object + */ + public static toObject(m: Metadata, o?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; +} diff --git a/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts new file mode 100644 index 00000000..2e4973f1 --- /dev/null +++ b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=unixfs-format.spec.d.ts.map \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map new file mode 100644 index 00000000..3fd95c66 --- /dev/null +++ b/packages/ipfs-unixfs/dist/test/unixfs-format.spec.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"unixfs-format.spec.d.ts","sourceRoot":"","sources":["../../test/unixfs-format.spec.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo b/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo new file mode 100644 index 00000000..b6dcbb3d --- /dev/null +++ b/packages/ipfs-unixfs/dist/tsconfig.tsbuildinfo @@ -0,0 +1,1232 @@ +{ + "program": { + "fileInfos": { + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es5.d.ts": { + "version": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895", + "signature": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.d.ts": { + "version": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "signature": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "affectsGlobalScope": false + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2016.d.ts": { + "version": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "signature": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "affectsGlobalScope": false + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.d.ts": { + "version": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "signature": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "affectsGlobalScope": false + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.d.ts": { + "version": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "signature": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "affectsGlobalScope": false + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.d.ts": { + "version": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "signature": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "affectsGlobalScope": false + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.d.ts": { + "version": "e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940", + "signature": "e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940", + "affectsGlobalScope": false + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.dom.d.ts": { + "version": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b", + "signature": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.dom.iterable.d.ts": { + "version": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "signature": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.core.d.ts": { + "version": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "signature": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.collection.d.ts": { + "version": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "signature": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.generator.d.ts": { + "version": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "signature": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.iterable.d.ts": { + "version": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "signature": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.promise.d.ts": { + "version": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "signature": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.proxy.d.ts": { + "version": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357", + "signature": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.reflect.d.ts": { + "version": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6", + "signature": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.symbol.d.ts": { + "version": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "signature": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": { + "version": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "signature": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2016.array.include.d.ts": { + "version": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "signature": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.object.d.ts": { + "version": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "signature": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": { + "version": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "signature": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.string.d.ts": { + "version": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "signature": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.intl.d.ts": { + "version": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "signature": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": { + "version": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "signature": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": { + "version": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "signature": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": { + "version": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "signature": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.intl.d.ts": { + "version": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "signature": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.promise.d.ts": { + "version": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "signature": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.regexp.d.ts": { + "version": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "signature": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.array.d.ts": { + "version": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "signature": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.object.d.ts": { + "version": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "signature": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.string.d.ts": { + "version": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "signature": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.symbol.d.ts": { + "version": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "signature": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.bigint.d.ts": { + "version": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "signature": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.promise.d.ts": { + "version": "7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862", + "signature": "7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts": { + "version": "e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40", + "signature": "e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.string.d.ts": { + "version": "faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e", + "signature": "faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts": { + "version": "936d7d2e8851af9ccfa5333b15e877a824417d352b1d7fd06388639dc69ef80a", + "signature": "936d7d2e8851af9ccfa5333b15e877a824417d352b1d7fd06388639dc69ef80a", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.intl.d.ts": { + "version": "e79ca55569f09a5dc3354be04dba4ae85865b1dce98bf46738ffe231c669621f", + "signature": "e79ca55569f09a5dc3354be04dba4ae85865b1dce98bf46738ffe231c669621f", + "affectsGlobalScope": true + }, + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.esnext.intl.d.ts": { + "version": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e", + "signature": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e", + "affectsGlobalScope": true + }, + "../node_modules/protobufjs/index.d.ts": { + "version": "1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da", + "signature": "1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da", + "affectsGlobalScope": false + }, + "../src/unixfs.d.ts": { + "version": "73d05042815b5a14ebaf565ad246e1cc17b9a328d80da339bdd7b40f60f07828", + "signature": "73d05042815b5a14ebaf565ad246e1cc17b9a328d80da339bdd7b40f60f07828", + "affectsGlobalScope": false + }, + "../node_modules/err-code/dist/index.d.ts": { + "version": "a02a19deaa2c497d36c136459dd2561b57ebb22075ac0d6aad176430a8639aa1", + "signature": "a02a19deaa2c497d36c136459dd2561b57ebb22075ac0d6aad176430a8639aa1", + "affectsGlobalScope": false + }, + "../src/types.d.ts": { + "version": "df037a1c4bb54f6aa65f2482a6b1d976b5b3c31d49ea5b7deb10197e0608ae9e", + "signature": "df037a1c4bb54f6aa65f2482a6b1d976b5b3c31d49ea5b7deb10197e0608ae9e", + "affectsGlobalScope": false + }, + "../src/index.js": { + "version": "e6b6c563ab9741f3a6da94ed2e2390b207ec4bf2fe0fd0722df8acfdc930a713", + "signature": "ae7b1240bfe299fcb85712afff404a5b90c533375f4edd4b3c1515aaf1b5631d", + "affectsGlobalScope": true + }, + "../node_modules/@types/chai/index.d.ts": { + "version": "f5fcdcb84e1594e419ad42eb62d96491739433c90bb810edbacf4e7d2908865c", + "signature": "f5fcdcb84e1594e419ad42eb62d96491739433c90bb810edbacf4e7d2908865c", + "affectsGlobalScope": true + }, + "../node_modules/@types/chai-as-promised/index.d.ts": { + "version": "f6ae17283c6912c202004178339d6d22f8c9edfe4e335f9f11b555c631633daf", + "signature": "f6ae17283c6912c202004178339d6d22f8c9edfe4e335f9f11b555c631633daf", + "affectsGlobalScope": true + }, + "../node_modules/chai-parentheses/index.d.ts": { + "version": "c1f79c6d85cd84518fd7349588b3c61bdc189f58e3866f925cbf4631c81e31f9", + "signature": "c1f79c6d85cd84518fd7349588b3c61bdc189f58e3866f925cbf4631c81e31f9", + "affectsGlobalScope": true + }, + "../node_modules/@types/chai-subset/index.d.ts": { + "version": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", + "signature": "f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71", + "affectsGlobalScope": true + }, + "../node_modules/chai-bytes/index.d.ts": { + "version": "c6950fb69844190789c747a2ee2d49f34bd84273d692176d2c54d18d95fa3387", + "signature": "c6950fb69844190789c747a2ee2d49f34bd84273d692176d2c54d18d95fa3387", + "affectsGlobalScope": true + }, + "../node_modules/aegir/dist/utils/chai.d.ts": { + "version": "33f12bdfbbb9a552db999b771a6e831fd0c94b321f958a1473def67b2b3e473f", + "signature": "33f12bdfbbb9a552db999b771a6e831fd0c94b321f958a1473def67b2b3e473f", + "affectsGlobalScope": false + }, + "../node_modules/aegir/dist/utils/fixtures.d.ts": { + "version": "a8c10138639ce587acf8a6ce227177a737708fb592705fc0754c12d3a18b5130", + "signature": "a8c10138639ce587acf8a6ce227177a737708fb592705fc0754c12d3a18b5130", + "affectsGlobalScope": false + }, + "../node_modules/multibase/src/types.d.ts": { + "version": "40166c5a74c5420962d2f223211c3b99be001a5b60a23828d1c9eb7a768a877f", + "signature": "40166c5a74c5420962d2f223211c3b99be001a5b60a23828d1c9eb7a768a877f", + "affectsGlobalScope": false + }, + "../node_modules/uint8arrays/dist/from-string.d.ts": { + "version": "c44e238f0d17834e54b2fc91fbda1f4c42e807e26aaf052ed67a427c5870b963", + "signature": "c44e238f0d17834e54b2fc91fbda1f4c42e807e26aaf052ed67a427c5870b963", + "affectsGlobalScope": false + }, + "../test/unixfs-format.spec.js": { + "version": "c9e3da89b30af692dbc91420a4eb9d0cf6322b8a966d5adb3e868e843cabf084", + "signature": "f40e8bdafdffb90065d371f14774f2f279ec0f96ca7814be66c81f6fe84fcf2c", + "affectsGlobalScope": true + }, + "../node_modules/@types/istanbul-lib-coverage/index.d.ts": { + "version": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "signature": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "affectsGlobalScope": false + }, + "../node_modules/@types/json-schema/index.d.ts": { + "version": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27", + "signature": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27", + "affectsGlobalScope": false + }, + "../node_modules/@types/json5/index.d.ts": { + "version": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538", + "signature": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538", + "affectsGlobalScope": false + }, + "../node_modules/@types/long/index.d.ts": { + "version": "e8465811693dfe4e96ef2b3dffda539d6edfe896961b7af37b44db2c0e48532b", + "signature": "e8465811693dfe4e96ef2b3dffda539d6edfe896961b7af37b44db2c0e48532b", + "affectsGlobalScope": false + }, + "../node_modules/@types/minimist/index.d.ts": { + "version": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", + "signature": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", + "affectsGlobalScope": false + }, + "../node_modules/@types/mocha/index.d.ts": { + "version": "0359800d3b440f8515001431cde1500944e156040577425eb3f7b80af0846612", + "signature": "0359800d3b440f8515001431cde1500944e156040577425eb3f7b80af0846612", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/assert/strict.d.ts": { + "version": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", + "signature": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/globals.d.ts": { + "version": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", + "signature": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/async_hooks.d.ts": { + "version": "c9e8a340da877b05a52525554aa255b3f44958c7f6748ebf5cbe0bfbe6766878", + "signature": "c9e8a340da877b05a52525554aa255b3f44958c7f6748ebf5cbe0bfbe6766878", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/buffer.d.ts": { + "version": "a473cf45c3d9809518f8af913312139d9f4db6887dc554e0d06d0f4e52722e6b", + "signature": "a473cf45c3d9809518f8af913312139d9f4db6887dc554e0d06d0f4e52722e6b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/child_process.d.ts": { + "version": "a668dfae917097b30fc29bbebeeb869cee22529f2aa9976cea03c7e834a1b841", + "signature": "a668dfae917097b30fc29bbebeeb869cee22529f2aa9976cea03c7e834a1b841", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/cluster.d.ts": { + "version": "04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef", + "signature": "04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/console.d.ts": { + "version": "c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870", + "signature": "c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/constants.d.ts": { + "version": "45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491", + "signature": "45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/crypto.d.ts": { + "version": "51a77d65fbadc93dcdf454ea1d94bd9f1f146008d890bea4f168dd397192b9fb", + "signature": "51a77d65fbadc93dcdf454ea1d94bd9f1f146008d890bea4f168dd397192b9fb", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dgram.d.ts": { + "version": "797a9d37eb1f76143311c3f0a186ce5c0d8735e94c0ca08ff8712a876c9b4f9e", + "signature": "797a9d37eb1f76143311c3f0a186ce5c0d8735e94c0ca08ff8712a876c9b4f9e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dns.d.ts": { + "version": "ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28", + "signature": "ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dns/promises.d.ts": { + "version": "64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753", + "signature": "64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/domain.d.ts": { + "version": "2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5", + "signature": "2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/events.d.ts": { + "version": "36ba0e764ace4fb55e6165c5f33f2826f88b1d3767f7ec658fe2f6c85ac5e776", + "signature": "36ba0e764ace4fb55e6165c5f33f2826f88b1d3767f7ec658fe2f6c85ac5e776", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/fs.d.ts": { + "version": "d3315298050252531e7db9046296ca2162fa5218a85b10a62ed79140e3822e3c", + "signature": "d3315298050252531e7db9046296ca2162fa5218a85b10a62ed79140e3822e3c", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/fs/promises.d.ts": { + "version": "bdaf554ae2d9d09e2a42f58a29ef7f80e5b5c1d7b96bfb717243dc91a477216e", + "signature": "bdaf554ae2d9d09e2a42f58a29ef7f80e5b5c1d7b96bfb717243dc91a477216e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/http.d.ts": { + "version": "bd311ff12ac011f5531edd217189606e7a697376d6109e8a18361358f6249b46", + "signature": "bd311ff12ac011f5531edd217189606e7a697376d6109e8a18361358f6249b46", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/http2.d.ts": { + "version": "a870e564e578dccc7b34018d6919f9466bae462b4bafc3449ca63a2331ac27c5", + "signature": "a870e564e578dccc7b34018d6919f9466bae462b4bafc3449ca63a2331ac27c5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/https.d.ts": { + "version": "13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452", + "signature": "13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/inspector.d.ts": { + "version": "42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8", + "signature": "42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/module.d.ts": { + "version": "0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d", + "signature": "0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/net.d.ts": { + "version": "1eaf8fecdae37cc4c85f496d2bdb9e8d46c21b3643b7e27d3646a330585515a5", + "signature": "1eaf8fecdae37cc4c85f496d2bdb9e8d46c21b3643b7e27d3646a330585515a5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/os.d.ts": { + "version": "69640cc2e76dad52daeb9914e6b70c5c9a5591a3a65190a2d3ea432cf0015e16", + "signature": "69640cc2e76dad52daeb9914e6b70c5c9a5591a3a65190a2d3ea432cf0015e16", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/path.d.ts": { + "version": "21e64a125f65dff99cc3ed366c96e922b90daed343eb52ecdace5f220401dcda", + "signature": "21e64a125f65dff99cc3ed366c96e922b90daed343eb52ecdace5f220401dcda", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/perf_hooks.d.ts": { + "version": "4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0", + "signature": "4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/process.d.ts": { + "version": "61977e8f4c042abd392645828c90afd1b551a6fd32c51b93717c68003ce7c983", + "signature": "61977e8f4c042abd392645828c90afd1b551a6fd32c51b93717c68003ce7c983", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/punycode.d.ts": { + "version": "7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6", + "signature": "7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/querystring.d.ts": { + "version": "992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58", + "signature": "992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/readline.d.ts": { + "version": "3b790d08129aca55fd5ae1672d1d26594147ac0d5f2eedc30c7575eb18daef7e", + "signature": "3b790d08129aca55fd5ae1672d1d26594147ac0d5f2eedc30c7575eb18daef7e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/repl.d.ts": { + "version": "64535caf208a02420d2d04eb2029269efedd11eb8597ada0d5e6f3d54ec663ae", + "signature": "64535caf208a02420d2d04eb2029269efedd11eb8597ada0d5e6f3d54ec663ae", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/stream.d.ts": { + "version": "3b02b1e3c3a6730d79e2c8652f3be6a7caef1a604b9c5103abbbcea921694be1", + "signature": "3b02b1e3c3a6730d79e2c8652f3be6a7caef1a604b9c5103abbbcea921694be1", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/stream/promises.d.ts": { + "version": "fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6", + "signature": "fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/string_decoder.d.ts": { + "version": "4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50", + "signature": "4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/timers.d.ts": { + "version": "f49709e8c096b05aca0674d39f471aa05261de7c756df9abdf4a53ed0fa98901", + "signature": "f49709e8c096b05aca0674d39f471aa05261de7c756df9abdf4a53ed0fa98901", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/timers/promises.d.ts": { + "version": "baca27d1de400e027cdc70217ca73e414002baef5798aa24a921097c20066fa1", + "signature": "baca27d1de400e027cdc70217ca73e414002baef5798aa24a921097c20066fa1", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/tls.d.ts": { + "version": "f89a6d56f0267f6e73c707f8a89d2f38e9928e10bfa505f39a4f4bf954093aee", + "signature": "f89a6d56f0267f6e73c707f8a89d2f38e9928e10bfa505f39a4f4bf954093aee", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/trace_events.d.ts": { + "version": "7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4", + "signature": "7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/tty.d.ts": { + "version": "9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5", + "signature": "9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/url.d.ts": { + "version": "dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9", + "signature": "dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/util.d.ts": { + "version": "e649840284bab8c4d09cadc125cd7fbde7529690cc1a0881872b6a9cd202819b", + "signature": "e649840284bab8c4d09cadc125cd7fbde7529690cc1a0881872b6a9cd202819b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/v8.d.ts": { + "version": "a364b4a8a015ae377052fa4fac94204d79a69d879567f444c7ceff1b7a18482d", + "signature": "a364b4a8a015ae377052fa4fac94204d79a69d879567f444c7ceff1b7a18482d", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/vm.d.ts": { + "version": "1aa7dbace2b7b2ef60897dcd4f66252ee6ba85e594ded8918c9acdcecda1896c", + "signature": "1aa7dbace2b7b2ef60897dcd4f66252ee6ba85e594ded8918c9acdcecda1896c", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/worker_threads.d.ts": { + "version": "1535aeef6e803bc8c784b14c99bd214dba9223df4914f3dee616af351ab46042", + "signature": "1535aeef6e803bc8c784b14c99bd214dba9223df4914f3dee616af351ab46042", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/zlib.d.ts": { + "version": "4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875", + "signature": "4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/globals.global.d.ts": { + "version": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "signature": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/wasi.d.ts": { + "version": "4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3", + "signature": "4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/ts3.6/base.d.ts": { + "version": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", + "signature": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/assert.d.ts": { + "version": "b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76", + "signature": "b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/base.d.ts": { + "version": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "signature": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/index.d.ts": { + "version": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", + "signature": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", + "affectsGlobalScope": false + }, + "../node_modules/@types/normalize-package-data/index.d.ts": { + "version": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "signature": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "affectsGlobalScope": false + }, + "../node_modules/@types/parse-json/index.d.ts": { + "version": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "signature": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "affectsGlobalScope": false + }, + "../node_modules/@types/sinonjs__fake-timers/index.d.ts": { + "version": "558a9770503071d5a6fc6c596f7230bb79f2d034ced4a205bd1ebcad3b5879ec", + "signature": "558a9770503071d5a6fc6c596f7230bb79f2d034ced4a205bd1ebcad3b5879ec", + "affectsGlobalScope": false + }, + "../node_modules/@types/sinon/index.d.ts": { + "version": "9d92b037978bb9525bc4b673ebddd443277542e010c0aef019c03a170ccdaa73", + "signature": "9d92b037978bb9525bc4b673ebddd443277542e010c0aef019c03a170ccdaa73", + "affectsGlobalScope": false + }, + "../node_modules/@types/yargs-parser/index.d.ts": { + "version": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", + "signature": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", + "affectsGlobalScope": false + }, + "../node_modules/@types/yargs/index.d.ts": { + "version": "5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11", + "signature": "5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11", + "affectsGlobalScope": false + }, + "../node_modules/@types/yauzl/index.d.ts": { + "version": "3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26", + "signature": "3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/minimatch/index.d.ts": { + "version": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2", + "signature": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/glob/index.d.ts": { + "version": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", + "signature": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", + "affectsGlobalScope": false + } + }, + "options": { + "strict": true, + "outDir": "./", + "allowJs": true, + "checkJs": true, + "target": 7, + "lib": [ + "lib.es2020.d.ts", + "lib.es2020.promise.d.ts", + "lib.es2020.string.d.ts", + "lib.es2020.bigint.d.ts", + "lib.dom.d.ts", + "lib.dom.iterable.d.ts" + ], + "noEmit": false, + "noEmitOnError": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "incremental": true, + "composite": true, + "isolatedModules": true, + "removeComments": false, + "esModuleInterop": true, + "moduleResolution": 2, + "noImplicitReturns": false, + "noFallthroughCasesInSwitch": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "importsNotUsedAsValues": 2, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true, + "stripInternal": true, + "resolveJsonModule": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../../../node_modules/@types/glob/index.d.ts": [ + "../../../node_modules/@types/minimatch/index.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/chai-as-promised/index.d.ts": [ + "../node_modules/@types/chai/index.d.ts" + ], + "../node_modules/@types/chai-subset/index.d.ts": [ + "../node_modules/@types/chai/index.d.ts" + ], + "../node_modules/@types/node/assert/strict.d.ts": [ + "../node_modules/@types/node/assert.d.ts" + ], + "../node_modules/@types/node/base.d.ts": [ + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../node_modules/@types/node/child_process.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/cluster.d.ts": [ + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/console.d.ts": [ + "../node_modules/@types/node/util.d.ts" + ], + "../node_modules/@types/node/constants.d.ts": [ + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/os.d.ts" + ], + "../node_modules/@types/node/crypto.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/dgram.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/dns.d.ts": [ + "../node_modules/@types/node/dns/promises.d.ts" + ], + "../node_modules/@types/node/dns/promises.d.ts": [ + "../node_modules/@types/node/dns.d.ts" + ], + "../node_modules/@types/node/domain.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/events.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/fs.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/fs/promises.d.ts": [ + "../node_modules/@types/node/fs.d.ts" + ], + "../node_modules/@types/node/http.d.ts": [ + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/http2.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/https.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/index.d.ts": [ + "../node_modules/@types/node/base.d.ts" + ], + "../node_modules/@types/node/inspector.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/module.d.ts": [ + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/net.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/perf_hooks.d.ts": [ + "../node_modules/@types/node/async_hooks.d.ts" + ], + "../node_modules/@types/node/process.d.ts": [ + "../node_modules/@types/node/tty.d.ts" + ], + "../node_modules/@types/node/readline.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/repl.d.ts": [ + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/stream.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream/promises.d.ts" + ], + "../node_modules/@types/node/stream/promises.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/timers/promises.d.ts": [ + "../node_modules/@types/node/timers.d.ts" + ], + "../node_modules/@types/node/tls.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/ts3.6/base.d.ts": [ + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts" + ], + "../node_modules/@types/node/tty.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/url.d.ts": [ + "../node_modules/@types/node/querystring.d.ts" + ], + "../node_modules/@types/node/v8.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/worker_threads.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/zlib.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/sinon/index.d.ts": [ + "../node_modules/@types/sinonjs__fake-timers/index.d.ts" + ], + "../node_modules/@types/yargs/index.d.ts": [ + "../node_modules/@types/yargs-parser/index.d.ts" + ], + "../node_modules/@types/yauzl/index.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/aegir/dist/utils/chai.d.ts": [ + "../node_modules/@types/chai-as-promised/index.d.ts", + "../node_modules/@types/chai-subset/index.d.ts", + "../node_modules/@types/chai/index.d.ts", + "../node_modules/chai-bytes/index.d.ts", + "../node_modules/chai-parentheses/index.d.ts" + ], + "../node_modules/chai-bytes/index.d.ts": [ + "../node_modules/@types/chai/index.d.ts" + ], + "../node_modules/chai-parentheses/index.d.ts": [ + "../node_modules/@types/chai-as-promised/index.d.ts", + "../node_modules/@types/chai/index.d.ts" + ], + "../node_modules/uint8arrays/dist/from-string.d.ts": [ + "../node_modules/multibase/src/types.d.ts" + ], + "../src/index.js": [ + "../node_modules/err-code/dist/index.d.ts", + "../src/types.d.ts", + "../src/unixfs.d.ts" + ], + "../src/unixfs.d.ts": [ + "../node_modules/protobufjs/index.d.ts" + ], + "../test/unixfs-format.spec.js": [ + "../node_modules/aegir/dist/utils/chai.d.ts", + "../node_modules/aegir/dist/utils/fixtures.d.ts", + "../node_modules/uint8arrays/dist/from-string.d.ts", + "../src/index.js", + "../src/unixfs.d.ts" + ] + }, + "exportedModulesMap": { + "../../../node_modules/@types/glob/index.d.ts": [ + "../../../node_modules/@types/minimatch/index.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/chai-as-promised/index.d.ts": [ + "../node_modules/@types/chai/index.d.ts" + ], + "../node_modules/@types/chai-subset/index.d.ts": [ + "../node_modules/@types/chai/index.d.ts" + ], + "../node_modules/@types/node/assert/strict.d.ts": [ + "../node_modules/@types/node/assert.d.ts" + ], + "../node_modules/@types/node/base.d.ts": [ + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../node_modules/@types/node/child_process.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/cluster.d.ts": [ + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/console.d.ts": [ + "../node_modules/@types/node/util.d.ts" + ], + "../node_modules/@types/node/constants.d.ts": [ + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/os.d.ts" + ], + "../node_modules/@types/node/crypto.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/dgram.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/dns.d.ts": [ + "../node_modules/@types/node/dns/promises.d.ts" + ], + "../node_modules/@types/node/dns/promises.d.ts": [ + "../node_modules/@types/node/dns.d.ts" + ], + "../node_modules/@types/node/domain.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/events.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/fs.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/fs/promises.d.ts": [ + "../node_modules/@types/node/fs.d.ts" + ], + "../node_modules/@types/node/http.d.ts": [ + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/http2.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/https.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/index.d.ts": [ + "../node_modules/@types/node/base.d.ts" + ], + "../node_modules/@types/node/inspector.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/module.d.ts": [ + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/net.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/perf_hooks.d.ts": [ + "../node_modules/@types/node/async_hooks.d.ts" + ], + "../node_modules/@types/node/process.d.ts": [ + "../node_modules/@types/node/tty.d.ts" + ], + "../node_modules/@types/node/readline.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/repl.d.ts": [ + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/stream.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream/promises.d.ts" + ], + "../node_modules/@types/node/stream/promises.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/timers/promises.d.ts": [ + "../node_modules/@types/node/timers.d.ts" + ], + "../node_modules/@types/node/tls.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/ts3.6/base.d.ts": [ + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts" + ], + "../node_modules/@types/node/tty.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/url.d.ts": [ + "../node_modules/@types/node/querystring.d.ts" + ], + "../node_modules/@types/node/v8.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/worker_threads.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/zlib.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/sinon/index.d.ts": [ + "../node_modules/@types/sinonjs__fake-timers/index.d.ts" + ], + "../node_modules/@types/yargs/index.d.ts": [ + "../node_modules/@types/yargs-parser/index.d.ts" + ], + "../node_modules/@types/yauzl/index.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/aegir/dist/utils/chai.d.ts": [ + "../node_modules/@types/chai-as-promised/index.d.ts", + "../node_modules/@types/chai-subset/index.d.ts", + "../node_modules/@types/chai/index.d.ts", + "../node_modules/chai-bytes/index.d.ts", + "../node_modules/chai-parentheses/index.d.ts" + ], + "../node_modules/chai-bytes/index.d.ts": [ + "../node_modules/@types/chai/index.d.ts" + ], + "../node_modules/chai-parentheses/index.d.ts": [ + "../node_modules/@types/chai-as-promised/index.d.ts", + "../node_modules/@types/chai/index.d.ts" + ], + "../node_modules/uint8arrays/dist/from-string.d.ts": [ + "../node_modules/multibase/src/types.d.ts" + ], + "../src/index.js": [ + "../src/types.d.ts" + ], + "../src/unixfs.d.ts": [ + "../node_modules/protobufjs/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../node_modules/@types/glob/index.d.ts", + "../../../node_modules/@types/minimatch/index.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.dom.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.dom.iterable.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.collection.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.core.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.generator.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.promise.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2016.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.intl.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.object.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.string.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.intl.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.promise.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.array.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.object.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.string.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.intl.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.promise.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.string.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.es5.d.ts", + "../../ipfs-unixfs-exporter/node_modules/typescript/lib/lib.esnext.intl.d.ts", + "../node_modules/@types/chai-as-promised/index.d.ts", + "../node_modules/@types/chai-subset/index.d.ts", + "../node_modules/@types/chai/index.d.ts", + "../node_modules/@types/istanbul-lib-coverage/index.d.ts", + "../node_modules/@types/json-schema/index.d.ts", + "../node_modules/@types/json5/index.d.ts", + "../node_modules/@types/long/index.d.ts", + "../node_modules/@types/minimist/index.d.ts", + "../node_modules/@types/mocha/index.d.ts", + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/base.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts", + "../node_modules/@types/normalize-package-data/index.d.ts", + "../node_modules/@types/parse-json/index.d.ts", + "../node_modules/@types/sinon/index.d.ts", + "../node_modules/@types/sinonjs__fake-timers/index.d.ts", + "../node_modules/@types/yargs-parser/index.d.ts", + "../node_modules/@types/yargs/index.d.ts", + "../node_modules/@types/yauzl/index.d.ts", + "../node_modules/aegir/dist/utils/chai.d.ts", + "../node_modules/aegir/dist/utils/fixtures.d.ts", + "../node_modules/chai-bytes/index.d.ts", + "../node_modules/chai-parentheses/index.d.ts", + "../node_modules/err-code/dist/index.d.ts", + "../node_modules/multibase/src/types.d.ts", + "../node_modules/protobufjs/index.d.ts", + "../node_modules/uint8arrays/dist/from-string.d.ts", + "../src/index.js", + "../src/types.d.ts", + "../src/unixfs.d.ts", + "../test/unixfs-format.spec.js" + ] + }, + "version": "4.2.3" +} \ No newline at end of file