Comparing version 2.9.13 to 2.9.14
{ | ||
"name": "ipfs-api", | ||
"version": "2.9.13", | ||
"version": "2.9.14", | ||
"description": "A client library for the IPFS API", | ||
@@ -27,3 +27,3 @@ "main": "src/index.js", | ||
"babel-core": "^6.1.21", | ||
"babel-eslint": "^4.1.3", | ||
"babel-eslint": "^4.1.6", | ||
"babel-loader": "^6.2.0", | ||
@@ -37,2 +37,3 @@ "babel-plugin-transform-runtime": "^6.1.18", | ||
"eslint-plugin-standard": "^1.3.1", | ||
"glob-stream": "5.2.0", | ||
"gulp": "^3.9.0", | ||
@@ -49,3 +50,3 @@ "gulp-bump": "^1.0.0", | ||
"https-browserify": "0.0.1", | ||
"ipfsd-ctl": "^0.6.1", | ||
"ipfsd-ctl": "^0.7.1", | ||
"json-loader": "^0.5.3", | ||
@@ -70,3 +71,3 @@ "karma": "^0.13.11", | ||
"vinyl-source-stream": "^1.1.0", | ||
"webpack-stream": "^2.1.1" | ||
"webpack-stream": "^3.1.0" | ||
}, | ||
@@ -73,0 +74,0 @@ "scripts": { |
@@ -58,7 +58,6 @@ IPFS API wrapper library in JavaScript | ||
If are using this module in a browser with something like browserify, then you will get an error saying that the origin is not allowed. This would be a CORS ("Cross Origin Resource Sharing") failure. The ipfs server rejects requests from unknown domains by default. You can whitelist the domain that you are calling from by exporting `API_ORIGIN` and restarting the daemon, like: | ||
If are using this module in a browser with something like browserify, then you will get an error saying that the origin is not allowed. This would be a CORS ("Cross Origin Resource Sharing") failure. The ipfs server rejects requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this: | ||
```bash | ||
export API_ORIGIN="http://localhost:8080" | ||
ipfs daemon | ||
$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"http://example.com\"]" | ||
``` | ||
@@ -65,0 +64,0 @@ |
@@ -5,2 +5,3 @@ 'use strict' | ||
const Qs = require('qs') | ||
const ndjson = require('ndjson') | ||
const getFilesStream = require('./get-files-stream') | ||
@@ -14,10 +15,6 @@ | ||
const parsed = [] | ||
res.on('data', chunk => { | ||
try { | ||
parsed.push(JSON.parse(chunk)) | ||
} catch (err) { | ||
// Browser quirks emit more than needed sometimes | ||
} | ||
}) | ||
res.on('end', () => cb(null, parsed)) | ||
res | ||
.pipe(ndjson.parse()) | ||
.on('data', parsed.push.bind(parsed)) | ||
.on('end', () => cb(null, parsed)) | ||
} | ||
@@ -24,0 +21,0 @@ |
@@ -5,7 +5,2 @@ 'use strict' | ||
it('ping another peer', done => { | ||
// TODO remove this when https://github.com/ipfs/js-ipfs-api/issues/135 is resolved | ||
if (!isNode) { | ||
return done() | ||
} | ||
apiClients['b'].id((err, id) => { | ||
@@ -12,0 +7,0 @@ expect(err).to.not.exist |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16312883
6938
43
225