Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Update to be compatible with IPFS 0.4.0 #74

Merged
merged 37 commits into from
Apr 8, 2016
Merged

Update to be compatible with IPFS 0.4.0 #74

merged 37 commits into from
Apr 8, 2016

Conversation

daviddias
Copy link
Contributor

WIP:

  • files API
  • ipfs object patch updates
  • more tests
  • works with 0.4.0
  • waiting on 0.4.0 to be merged

ipfs.files.rm(<path>, [<options>], function (err) {})
```

For `rm -r` pass a options obj with `r: true`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be noce to have recursive: true as an alias for r: true as that is much more readable in code segment. Also is this the only option that can be passed atm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be able to accept any of the options that is available through the cli.

(ref: #58 how is the new README going? Anything I could pull and use the new format to add the remaining options?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but would be nice if that's documented here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely agree:) added to the WIP todo to make it explicit

@dignifiedquire
Copy link
Contributor

@diasdavid this needs some updating I think ;)

@daviddias
Copy link
Contributor Author

Yeah, I need to rebase, but it works quite nicely, ipfs-blob-store uses it :) Can't wait for 0.4.0 to be released for this to be part of the global set

@daviddias
Copy link
Contributor Author

Now with all the latest and greatest fancy sparkles from 2.9.3 :)

"ignore": [
"dist/*"
]
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed anymore

This was referenced Dec 19, 2015
@daviddias
Copy link
Contributor Author

@whyrusleeping, ipfs add -r is not returning the root folder hash

repro:

  1. git clone ...
  2. npm i
  3. cp $GOPATH/bin/ipfs node_modules/go-ipfs/bin/ipfs
  4. npm test

note, use latest dev0.4.0

@@ -28,7 +28,7 @@ function onRes (buffer, cb) {
const isJson = res.headers['content-type'] === 'application/json'

if (res.statusCode >= 400 || !res.statusCode) {
const error = new Error(`Server responded with ${res.statusCode}`)
let error = new Error(`Server responded with ${res.statusCode}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

@daviddias
Copy link
Contributor Author

woot! so we have files-api using latest 0.4.0 + ipfs/kubo#2046

@nginnever just pushed also a new dist so you can use it on the browser :)

@daviddias
Copy link
Contributor Author

@nginnever
Copy link
Contributor

Chya! Danke! Now I don't have to learn webpack today :)

@daviddias daviddias changed the title feat/files-api Update to be compatible with IPFS 0.4.0 Feb 22, 2016
@daviddias
Copy link
Contributor Author

wooooo it's green! :D

//cc @haadcode @harlantwood @dignifiedquire @nginnever @RichardLitt @xicombd @victorbjelkholm and all the people that have contributed or looked for this version for quite some time, it is here! Thank you :)

@daviddias daviddias merged commit ef054eb into master Apr 8, 2016
@RichardLitt
Copy link
Contributor

Wooo!

@RichardLitt RichardLitt deleted the feat/files-api branch April 13, 2016 01:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants