Comparing version 1.1.3 to 1.1.4
@@ -60,3 +60,3 @@ 'use strict'; | ||
}); | ||
}, { concurrency: 1 }).then((r) => resolve(final)); | ||
}, { concurrency: 1 }).then((r) => resolve(this)); | ||
}); | ||
@@ -113,4 +113,4 @@ } | ||
return new Promise((resolve, reject) => { | ||
const list = new Log(ipfs, id, items); | ||
resolve(list); | ||
const log = new Log(ipfs, id, items); | ||
resolve(log); | ||
}); | ||
@@ -132,4 +132,3 @@ } | ||
.then((items) => { | ||
const log = Log.create(ipfs, json.id, items); | ||
resolve(log); | ||
Log.create(ipfs, json.id, items).then(resolve).catch(reject); | ||
}).catch(reject) | ||
@@ -145,4 +144,3 @@ }); | ||
.then((res) => { | ||
const log = Log.fromJson(ipfs, JSON.parse(res.Data)); | ||
resolve(log); | ||
Log.fromJson(ipfs, JSON.parse(res.Data)).then(resolve).catch(reject); | ||
}).catch(reject); | ||
@@ -149,0 +147,0 @@ }); |
'use strict'; | ||
class Node { | ||
constructor(ipfs, payload, next) { | ||
constructor(payload, next) { | ||
this.payload = payload || null; | ||
@@ -39,3 +39,3 @@ this.hash = null; | ||
return new Promise((resolve, reject) => { | ||
const node = new Node(ipfs, data, next); | ||
const node = new Node(data, next); | ||
Node.getIpfsHash(ipfs, node) | ||
@@ -42,0 +42,0 @@ .then((hash) => { |
{ | ||
"name": "ipfs-log", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Append-only log for IPFS", | ||
@@ -15,3 +15,3 @@ "main": "lib/log.js", | ||
"asyncawait": "^1.0.3", | ||
"ipfsd-ctl": "^0.10.0", | ||
"ipfsd-ctl": "^0.10.1", | ||
"mocha": "^2.4.5" | ||
@@ -18,0 +18,0 @@ }, |
@@ -8,3 +8,2 @@ 'use strict'; | ||
const ipfsd = require('ipfsd-ctl'); | ||
const ipfsAPI = require('ipfs-api') | ||
const Log = require('../lib/log'); | ||
@@ -11,0 +10,0 @@ const Node = require('../lib/node'); |
@@ -34,9 +34,2 @@ 'use strict'; | ||
// after(async((done) => { | ||
// ipfs.stopDaemon(err => { | ||
// if (err) throw err | ||
// stopped = true | ||
// }) | ||
// })); | ||
describe('create', () => { | ||
@@ -43,0 +36,0 @@ it('creates a an empty node', async((done) => { |
Sorry, the diff of this file is not supported yet
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
47249
1148