Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
feat: expose import concurrency controls (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain authored and Alan Shaw committed Dec 6, 2019
1 parent fff35c8 commit 47093d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
},
"dependencies": {
"abort-controller": "^3.0.0",
"async-iterator-all": "^1.0.0",
"async-iterator-to-pull-stream": "^1.3.0",
"bignumber.js": "^9.0.0",
"bl": "^4.0.0",
Expand All @@ -60,6 +59,7 @@
"ipld-dag-pb": "^0.18.1",
"ipld-raw": "^4.0.0",
"is-ipfs": "~0.6.1",
"it-all": "^1.0.1",
"it-glob": "0.0.7",
"it-tar": "^1.1.1",
"it-to-stream": "^0.1.1",
Expand Down
2 changes: 2 additions & 0 deletions src/add/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ module.exports = configure(({ ky }) => {
if (options.trickle != null) searchParams.set('trickle', options.trickle)
if (options.wrapWithDirectory != null) searchParams.set('wrap-with-directory', options.wrapWithDirectory)
if (options.preload != null) searchParams.set('preload', options.preload)
if (options.fileImportConcurrency != null) searchParams.set('file-import-concurrency', options.fileImportConcurrency)
if (options.blockWriteConcurrency != null) searchParams.set('block-write-concurrency', options.blockWriteConcurrency)

const res = await ky.post('add', {
timeout: options.timeout,
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const nodeify = require('promise-nodeify')
const callbackify = require('callbackify')
const all = require('async-iterator-all')
const all = require('it-all')
const toPullStream = require('async-iterator-to-pull-stream')
const toStream = require('it-to-stream')
const BufferList = require('bl/BufferList')
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converters.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const toPull = require('async-iterator-to-pull-stream')
const all = require('async-iterator-all')
const all = require('it-all')
const toStream = require('it-to-stream')
const { Buffer } = require('buffer')

Expand Down

0 comments on commit 47093d5

Please sign in to comment.