Skip to content

Commit 339b6a7

Browse files
author
sevenbitbyte
committed
deep-set to lodash.set
1 parent 18c6c29 commit 339b6a7

8 files changed

Lines changed: 11 additions & 8 deletions

File tree

examples/test-peer-party-service.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class ExampleService extends Dataparty.IService {
1818
this.addEndpoint(Dataparty.endpoint_paths.secureecho)
1919
this.addEndpoint(Dataparty.endpoint_paths.identity)
2020
this.addEndpoint(Dataparty.endpoint_paths.version)
21+
22+
this.addSchema(Path.join(__dirname, './party/schema/user.js'))
2123
}
2224

2325
}

examples/test-service-node-host.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async function main(){
8080

8181
console.log('started')
8282

83-
//process.exit()
83+
process.exit()
8484
}
8585

8686

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"@dataparty/crypto": "1.0.3",
6363
"@dataparty/tasker": "^0.0.2",
6464
"@diva.exchange/i2p-sam": "^4.1.8",
65-
"joi": "^17.9.1",
6665
"@markwylde/liferaft": "^1.3.4",
6766
"@vercel/ncc": "^0.36.1",
6867
"ajv": "6.9.1",
@@ -80,11 +79,12 @@
8079
"express": "^4.17.1",
8180
"express-list-routes": "^0.1.4",
8281
"git-repo-info": "^2.1.1",
82+
"joi": "^17.9.1",
8383
"joi-objectid": "^4.0.2",
8484
"jshashes": "^1.0.8",
8585
"jsonpath-plus": "^0.20.1",
8686
"last-eventemitter": "^1.1.1",
87-
"lodash": "^4.17.4",
87+
"lodash": "^4.17.21",
8888
"lokijs": "1.5.6",
8989
"mkdirp": "^0.5.1",
9090
"moment": "^2.29.4",

src/config/json-file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const fs = require('fs')
44
const Path = require('path')
55
const mkdirp = require('mkdirp')
6-
const deepSet = require('deep-set')
6+
const deepSet = require('lodash').set
77
const reach = require('../utils/reach')
88
const logger = require('debug')('dataparty.config.json-file')
99

src/config/local-storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const deepSet = require('deep-set')
3+
const deepSet = require('lodash').set
44
const reach = require('../utils/reach')
55
const logger = require('debug')('dataparty.config.local-storage');
66

src/config/memory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const deepSet = require('deep-set')
3+
const deepSet = require('lodash').set
44
const reach = require('../utils/reach')
55
const logger = require('debug')('dataparty.config.memory');
66

src/party/idocument.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ class IDocument extends EventEmitter {
176176

177177
const rawDocuments = (await party.create(type, data))
178178

179-
debug('hydrating', rawDocuments)
180-
return (await party.factory.hydrate(rawDocuments))[0]
179+
debug('hydrating', rawDocuments)
180+
return (await party.factory.hydrate(rawDocuments))[0]
181181

182182
/*const docs = (await party.find()
183183
.type(rawDocument.$meta.type)

src/party/iparty.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class IParty {
7777
async createDocument(type, data, id){
7878
let Type = this.factory.getFactory(type)
7979

80+
8081
return await Type.create(this, {data, type, id})
8182
}
8283

0 commit comments

Comments
 (0)