New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ipfs-unixfs-importer

Package Overview
Dependencies
Maintainers
3
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-unixfs-importer - npm Package Compare versions

Comparing version 14.0.1 to 14.0.2

3

dist/src/dag-builder/dir.d.ts

@@ -1,3 +0,2 @@

import type { Directory, InProgressImportResult } from '../index.js';
import type { Blockstore } from 'interface-blockstore';
import type { Directory, InProgressImportResult, Blockstore } from '../index.js';
import type { Version } from 'multiformats/cid';

@@ -4,0 +3,0 @@ export interface DirBuilderOptions {

@@ -1,3 +0,2 @@

import type { BufferImporter, File, InProgressImportResult } from '../index.js';
import type { Blockstore } from 'interface-blockstore';
import type { BufferImporter, File, InProgressImportResult, Blockstore } from '../index.js';
import type { FileLayout } from '../layout/index.js';

@@ -4,0 +3,0 @@ import type { Version } from 'multiformats/cid';

@@ -31,5 +31,5 @@ import { UnixFS } from 'ipfs-unixfs';

if (file.mtime !== undefined || file.mode !== undefined) {
// only one leaf node which is a buffer - we have metadata so convert it into a
// only one leaf node which is a raw leaf - we have metadata so convert it into a
// UnixFS entry otherwise we'll have nowhere to store the metadata
let buffer = await blockstore.get(leaf.cid);
let buffer = await blockstore.get(leaf.cid, options);
leaf.unixfs = new UnixFS({

@@ -36,0 +36,0 @@ type: 'file',

import { DirBuilderOptions } from './dir.js';
import { FileBuilderOptions } from './file.js';
import type { ImportCandidate, InProgressImportResult } from '../index.js';
import type { Blockstore } from 'interface-blockstore';
import type { ImportCandidate, InProgressImportResult, Blockstore } from '../index.js';
import type { ChunkValidator } from './validate-chunks.js';

@@ -6,0 +5,0 @@ import type { Chunker } from '../chunker/index.js';

@@ -1,5 +0,4 @@

import type { Blockstore } from 'interface-blockstore';
import type { Blockstore, ImportResult, InProgressImportResult } from './index.js';
import type { Mtime, UnixFS } from 'ipfs-unixfs';
import { CID } from 'multiformats/cid';
import type { ImportResult, InProgressImportResult } from './index.js';
import type { PersistOptions } from './utils/persist.js';

@@ -6,0 +5,0 @@ export interface DirProps {

import { DAGBuilder } from './dag-builder/index.js';
import type { UnixFS, Mtime } from 'ipfs-unixfs';
import type { CID, Version as CIDVersion } from 'multiformats/cid';
import type { Blockstore } from 'interface-blockstore';
import type { Blockstore as InterfaceBlockstore } from 'interface-blockstore';
import { ChunkValidator } from './dag-builder/validate-chunks.js';

@@ -11,2 +11,6 @@ import type { Chunker } from './chunker/index.js';

export type ImportContent = ByteStream | Uint8Array;
export interface BlockstoreOptions {
signal?: AbortSignal;
}
export type Blockstore = Pick<InterfaceBlockstore, 'has' | 'put' | 'get'>;
export interface FileCandidate {

@@ -13,0 +17,0 @@ path?: string;

import { CID } from 'multiformats/cid';
import type { Blockstore } from 'interface-blockstore';
import type { Blockstore } from '../index.js';
import type { BlockCodec } from 'multiformats/codecs/interface';

@@ -4,0 +4,0 @@ import type { Version as CIDVersion } from 'multiformats/cid';

@@ -8,2 +8,3 @@ {

"ImporterSourceStream": "https://ipfs.github.io/js-ipfs-unixfs/types/ipfs_unixfs_importer._internal_.ImporterSourceStream.html",
"BlockstoreOptions": "https://ipfs.github.io/js-ipfs-unixfs/interfaces/ipfs_unixfs_importer.BlockstoreOptions.html",
"BufferImporter": "https://ipfs.github.io/js-ipfs-unixfs/interfaces/ipfs_unixfs_importer.BufferImporter.html",

@@ -20,2 +21,3 @@ "Directory": "https://ipfs.github.io/js-ipfs-unixfs/interfaces/ipfs_unixfs_importer.Directory.html",

"TreeBuilder": "https://ipfs.github.io/js-ipfs-unixfs/interfaces/ipfs_unixfs_importer.TreeBuilder.html",
"Blockstore": "https://ipfs.github.io/js-ipfs-unixfs/types/ipfs_unixfs_importer.Blockstore.html",
"ByteStream": "https://ipfs.github.io/js-ipfs-unixfs/types/ipfs_unixfs_importer.ByteStream.html",

@@ -22,0 +24,0 @@ "ImportCandidate": "https://ipfs.github.io/js-ipfs-unixfs/types/ipfs_unixfs_importer.ImportCandidate.html",

{
"name": "ipfs-unixfs-importer",
"version": "14.0.1",
"version": "14.0.2",
"description": "JavaScript implementation of the UnixFs importer used by IPFS",

@@ -158,3 +158,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"

@@ -167,4 +167,4 @@ },

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

@@ -171,0 +171,0 @@ "it-batch": "^2.0.0",

import { UnixFS } from 'ipfs-unixfs'
import { persist } from '../utils/persist.js'
import { encode, prepare } from '@ipld/dag-pb'
import type { Directory, InProgressImportResult } from '../index.js'
import type { Blockstore } from 'interface-blockstore'
import type { Directory, InProgressImportResult, Blockstore } from '../index.js'
import type { Version } from 'multiformats/cid'

@@ -7,0 +6,0 @@

@@ -6,4 +6,3 @@ import { UnixFS } from 'ipfs-unixfs'

import * as rawCodec from 'multiformats/codecs/raw'
import type { BufferImporter, File, InProgressImportResult } from '../index.js'
import type { Blockstore } from 'interface-blockstore'
import type { BufferImporter, File, InProgressImportResult, Blockstore } from '../index.js'
import type { FileLayout, Reducer } from '../layout/index.js'

@@ -53,5 +52,5 @@ import type { Version } from 'multiformats/cid'

if (file.mtime !== undefined || file.mode !== undefined) {
// only one leaf node which is a buffer - we have metadata so convert it into a
// only one leaf node which is a raw leaf - we have metadata so convert it into a
// UnixFS entry otherwise we'll have nowhere to store the metadata
let buffer = await blockstore.get(leaf.cid)
let buffer = await blockstore.get(leaf.cid, options)

@@ -58,0 +57,0 @@ leaf.unixfs = new UnixFS({

import { dirBuilder, DirBuilderOptions } from './dir.js'
import { fileBuilder, FileBuilderOptions } from './file.js'
import errCode from 'err-code'
import type { Directory, File, FileCandidate, ImportCandidate, InProgressImportResult } from '../index.js'
import type { Blockstore } from 'interface-blockstore'
import type { Directory, File, FileCandidate, ImportCandidate, InProgressImportResult, Blockstore } from '../index.js'
import type { ChunkValidator } from './validate-chunks.js'

@@ -7,0 +6,0 @@ import type { Chunker } from '../chunker/index.js'

@@ -1,5 +0,4 @@

import type { Blockstore } from 'interface-blockstore'
import type { Blockstore, ImportResult, InProgressImportResult } from './index.js'
import type { Mtime, UnixFS } from 'ipfs-unixfs'
import { CID } from 'multiformats/cid'
import type { ImportResult, InProgressImportResult } from './index.js'
import type { PersistOptions } from './utils/persist.js'

@@ -6,0 +5,0 @@

@@ -6,3 +6,3 @@ import parallelBatch from 'it-parallel-batch'

import type { CID, Version as CIDVersion } from 'multiformats/cid'
import type { Blockstore } from 'interface-blockstore'
import type { Blockstore as InterfaceBlockstore } from 'interface-blockstore'
import { ChunkValidator, defaultChunkValidator } from './dag-builder/validate-chunks.js'

@@ -20,2 +20,8 @@ import { fixedSize } from './chunker/fixed-size.js'

export interface BlockstoreOptions {
signal?: AbortSignal
}
export type Blockstore = Pick<InterfaceBlockstore, 'has' | 'put' | 'get'>
export interface FileCandidate {

@@ -22,0 +28,0 @@ path?: string

@@ -5,4 +5,3 @@ import { DirFlat } from './dir-flat.js'

import { toPathComponents } from './utils/to-path-components.js'
import type { ImportResult, InProgressImportResult, TreeBuilder } from './index.js'
import type { Blockstore } from 'interface-blockstore'
import type { ImportResult, InProgressImportResult, TreeBuilder, Blockstore } from './index.js'
import type { PersistOptions } from './utils/persist.js'

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

import { CID } from 'multiformats/cid'
import * as dagPb from '@ipld/dag-pb'
import { sha256 } from 'multiformats/hashes/sha2'
import type { Blockstore } from 'interface-blockstore'
import type { Blockstore } from '../index.js'
import type { BlockCodec } from 'multiformats/codecs/interface'

@@ -6,0 +6,0 @@ import type { Version as CIDVersion } from 'multiformats/cid'

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc