-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: jsipfs add --only-hash (#1233) #1266
Conversation
* add --only-hash flag * skeleton http option passing, checkpoint commit to check some broken tests. * deep logging for debugging. Checkpoint * found the levledown problem! line endings! * add only-hash as a qs option for the send-files-stream. Also added some tests to help me figure that out * update --only-hash test, increase timeout for the afterAll hook. I think it takes longer because the --only-hash test leaves an unresolved ipfs.ls command. Would love to be able to cancel it :) * ipfs-exec/ipfs.fail should throw on a non-failing command && use random file for ipfs add --only-hash test. * fix an ipfs config test. * lint * clean: move test/http-api/extra/files.js to test/http-api/files.js
src/cli/commands/files/add.js
Outdated
@@ -182,7 +188,8 @@ module.exports = { | |||
strategy: argv.trickle ? 'trickle' : 'balanced', | |||
shardSplitThreshold: argv.enableShardingExperiment ? argv.shardSplitThreshold : Infinity, | |||
'cid-version': argv['cid-version'], | |||
'raw-leaves': argv['raw-leaves'] | |||
'raw-leaves': argv['raw-leaves'], | |||
onlyHash: argv['only-hash'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be 'only-hash'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we keep it onlyHash
. cid-version
and raw-leaves
are the outlier here. There are many hyphenated options we convert to camelCase at the entry points of cli/http-api such as the above shardSplittingThreshold
and dag --local-resolve
, object --input-enc
.
I can change raw-leaves and cid-version instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JonKrone I like that. Go for it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Continuing the work from #1233