You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ipfs-unixfs-exporter

Package Overview
Dependencies
Maintainers
3
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-unixfs-exporter - npm Package Compare versions

Comparing version

to
12.0.2

6

dist/src/index.d.ts
import { CID } from 'multiformats/cid';
import type { UnixFS } from 'ipfs-unixfs';
import type { PBNode } from '@ipld/dag-pb';
import type { Blockstore } from 'interface-blockstore';
import type { Blockstore as InterfaceBlockstore } from 'interface-blockstore';
import type { Bucket } from 'hamt-sharding';

@@ -71,2 +71,6 @@ export interface ExporterOptions {

}
export interface BlockstoreOptions {
signal?: AbortSignal;
}
export type Blockstore = Pick<InterfaceBlockstore, 'has' | 'put' | 'get'>;
export declare function walkPath(path: string | CID, blockstore: Blockstore, options?: ExporterOptions): AsyncGenerator<UnixFSEntry, void, any>;

@@ -73,0 +77,0 @@ export declare function exporter(path: string | CID, blockstore: Blockstore, options?: ExporterOptions): Promise<UnixFSEntry>;

8

dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts
import type { UnixfsV1Resolver } from '../../../index.js';
/**
* @typedef {import('interface-blockstore').Blockstore} Blockstore
* @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
*/
declare const hamtShardedDirectoryContent: UnixfsV1Resolver;
export default hamtShardedDirectoryContent;
//# sourceMappingURL=hamt-sharded-directory.d.ts.map

@@ -5,10 +5,2 @@ import parallel from 'it-parallel';

import { decode } from '@ipld/dag-pb';
/**
* @typedef {import('interface-blockstore').Blockstore} Blockstore
* @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
*/
const hamtShardedDirectoryContent = (cid, node, unixfs, path, resolve, depth, blockstore) => {

@@ -15,0 +7,0 @@ function yieldHamtDirectoryContent(options = {}) {

import { PBNode } from '@ipld/dag-pb';
import type { Blockstore } from 'interface-blockstore';
import type { ExporterOptions, ShardTraversalContext } from '../index.js';
import type { ExporterOptions, ShardTraversalContext, Blockstore } from '../index.js';
import type { CID } from 'multiformats/cid';

@@ -5,0 +4,0 @@ declare const findShardCid: (node: PBNode, name: string, blockstore: Blockstore, context?: ShardTraversalContext, options?: ExporterOptions) => Promise<CID | undefined>;

{
"BlockstoreOptions": "https://ipfs.github.io/js-ipfs-unixfs/interfaces/ipfs_unixfs_exporter.BlockstoreOptions.html",
"Exportable": "https://ipfs.github.io/js-ipfs-unixfs/interfaces/ipfs_unixfs_exporter.Exportable.html",

@@ -15,2 +16,3 @@ "ExporterOptions": "https://ipfs.github.io/js-ipfs-unixfs/interfaces/ipfs_unixfs_exporter.ExporterOptions.html",

"UnixfsV1Resolver": "https://ipfs.github.io/js-ipfs-unixfs/interfaces/ipfs_unixfs_exporter.UnixfsV1Resolver.html",
"Blockstore": "https://ipfs.github.io/js-ipfs-unixfs/types/ipfs_unixfs_exporter.Blockstore.html",
"UnixFSEntry": "https://ipfs.github.io/js-ipfs-unixfs/types/ipfs_unixfs_exporter.UnixFSEntry.html",

@@ -17,0 +19,0 @@ "UnixfsV1Content": "https://ipfs.github.io/js-ipfs-unixfs/types/ipfs_unixfs_exporter.UnixfsV1Content.html",

{
"name": "ipfs-unixfs-exporter",
"version": "12.0.1",
"version": "12.0.2",
"description": "JavaScript implementation of the UnixFs exporter used by IPFS",

@@ -134,3 +134,3 @@ "license": "Apache-2.0 OR MIT",

"lint": "aegir lint",
"dep-check": "aegir dep-check -i interface-blockstore",
"dep-check": "aegir dep-check",
"release": "aegir release"

@@ -144,3 +144,3 @@ },

"hamt-sharding": "^3.0.0",
"interface-blockstore": "^4.0.0",
"interface-blockstore": "^4.0.1",
"ipfs-unixfs": "^11.0.0",

@@ -147,0 +147,0 @@ "it-filter": "^2.0.0",

@@ -7,3 +7,3 @@ import errCode from 'err-code'

import type { PBNode } from '@ipld/dag-pb'
import type { Blockstore } from 'interface-blockstore'
import type { Blockstore as InterfaceBlockstore } from 'interface-blockstore'
import type { Bucket } from 'hamt-sharding'

@@ -83,2 +83,8 @@

export interface BlockstoreOptions {
signal?: AbortSignal
}
export type Blockstore = Pick<InterfaceBlockstore, 'has' | 'put' | 'get'>
const toPathComponents = (path: string = ''): string[] => {

@@ -85,0 +91,0 @@ // split on / unless escaped with \

@@ -12,4 +12,3 @@ import extractDataFromBlock from '../../../utils/extract-data-from-block.js'

import PQueue from 'p-queue'
import type { Blockstore } from 'interface-blockstore'
import type { ExporterOptions, UnixfsV1FileContent, UnixfsV1Resolver } from '../../../index.js'
import type { ExporterOptions, UnixfsV1FileContent, UnixfsV1Resolver, Blockstore } from '../../../index.js'

@@ -16,0 +15,0 @@ async function walkDAG (blockstore: Blockstore, node: dagPb.PBNode | Uint8Array, queue: Pushable<Uint8Array>, streamPosition: bigint, start: bigint, end: bigint, walkQueue: PQueue, options: ExporterOptions): Promise<void> {

@@ -5,14 +5,4 @@ import parallel from 'it-parallel'

import { decode, PBNode } from '@ipld/dag-pb'
import type { Blockstore } from 'interface-blockstore'
import type { ExporterOptions, Resolve, UnixfsV1DirectoryContent, UnixfsV1Resolver } from '../../../index.js'
import type { ExporterOptions, Resolve, UnixfsV1DirectoryContent, UnixfsV1Resolver, Blockstore } from '../../../index.js'
/**
* @typedef {import('interface-blockstore').Blockstore} Blockstore
* @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
*/
const hamtShardedDirectoryContent: UnixfsV1Resolver = (cid, node, unixfs, path, resolve, depth, blockstore) => {

@@ -19,0 +9,0 @@ function yieldHamtDirectoryContent (options: ExporterOptions = {}): UnixfsV1DirectoryContent {

@@ -5,4 +5,3 @@

import { murmur3128 } from '@multiformats/murmur3'
import type { Blockstore } from 'interface-blockstore'
import type { ExporterOptions, ShardTraversalContext } from '../index.js'
import type { ExporterOptions, ShardTraversalContext, Blockstore } from '../index.js'
import type { CID } from 'multiformats/cid'

@@ -9,0 +8,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet