Comparing version 0.0.5 to 0.0.6
# Changelog | ||
## 0.0.4 | ||
## unreleased | ||
* implement JSONRPC over tcp layer (jayson) | ||
* add command server/clients | ||
* add command server/commands | ||
* add command server/maxClients | ||
* add command server/quit | ||
* add command server/shutdown | ||
* add command database/db | ||
* add command database/loadDatabase | ||
* add command database/listDatabases | ||
* add command database/saveDatabase | ||
* add command database/addCollection | ||
* add command database/listCollections | ||
* add command collection/get | ||
* add command collection/insert | ||
### Added | ||
### Changed | ||
## [0.0.6](https://github.com/sloki-project/sloki/milestone/4) - 2019-02-09 | ||
### Added | ||
* add method wait for testing purpuse [(one sec)](https://github.com/sloki-project/sloki/commit/80c51ac81d18e18794f1782486aec9d8b4166c55) | ||
### Changed | ||
* fix db is not sticked to tcp session if db already exists [#17](https://github.com/sloki-project/sloki/issues/17) | ||
* improve find filters [#18](https://github.com/sloki-project/sloki/issues/18) | ||
## [0.0.5](https://github.com/sloki-project/sloki/milestone/3) - 2019-02-08 | ||
### Added | ||
* add method collection/update [#5](https://github.com/sloki-project/sloki/issues/5) | ||
* add method collection/find [#3](https://github.com/sloki-project/sloki/issues/3) | ||
* add method collection/remove [#4](https://github.com/sloki-project/sloki/issues/4) | ||
* add method collection/get [#2](https://github.com/sloki-project/sloki/issues/2) | ||
### Changed | ||
* fix client destroy connexion when client end [#15](https://github.com/sloki-project/sloki/issues/15) | ||
* fix insert return behavior [#9](https://github.com/sloki-project/sloki/issues/9) | ||
* improve code: merge jsonrpc/lokijs layers [#14](https://github.com/sloki-project/sloki/issues/14) | ||
* improve method collection/insert options [#11](https://github.com/sloki-project/sloki/issues/11) | ||
* improve sanity check [#10](https://github.com/sloki-project/sloki/issues/10) | ||
## [0.0.4](https://github.com/sloki-project/sloki/milestone/2) - 2019-02-07 | ||
### Added | ||
* add JSONRPC over tcp layer (jayson) | ||
* add method server/clients | ||
* add method server/methods | ||
* add method server/maxClients | ||
* add method server/quit | ||
* add method server/shutdown | ||
* add method database/db | ||
* add method database/loadDatabase | ||
* add method database/listDatabases | ||
* add method database/saveDatabase | ||
* add method database/addCollection | ||
* add method database/listCollections | ||
* add method collection/get | ||
* add method collection/insert | ||
* add tests | ||
## 0.0.0 | ||
* Start |
{ | ||
"name": "sloki", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A NodeJS server for LokiJS", | ||
@@ -37,3 +37,3 @@ "main": "index.js", | ||
"pretty-bytes": "^5.1.0", | ||
"sloki-node-client": "0.0.5" | ||
"sloki-node-client": "0.0.6" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
@@ -95,3 +95,3 @@ # Sloki (WORK IN PROGRESS) | ||
<summary> | ||
<b><img src="http://progressed.io/bar/100"/> Commands: client and server related</b> | ||
<b><img src="http://progressed.io/bar/100"/> Methods: client and server related</b> | ||
</summary> | ||
@@ -115,3 +115,3 @@ <p> | ||
<summary> | ||
<b><img src="http://progressed.io/bar/77"/> Commands: database related</b> | ||
<b><img src="http://progressed.io/bar/77"/> Methods: database related</b> | ||
</summary> | ||
@@ -157,3 +157,3 @@ <p> | ||
<summary> | ||
<b><img src="http://progressed.io/bar/5"/> Commands: collection related</b> | ||
<b><img src="http://progressed.io/bar/10"/> Methods: collection related</b> | ||
</summary> | ||
@@ -164,6 +164,9 @@ <p> | ||
| Status | Command | Parameter(s) | Description | ||
|:-----------------:|-------------------------------|-------------------------------|---------------- | ||
| :heavy_check_mark:| insert | collectionName, document | insert a document | ||
| :heavy_check_mark:| get | collectionName, lokiId | return a document by his id | ||
| Status | Command | Parameter(s) | Description | ||
|:-----------------:|-------------------------------|-----------------------------------|---------------- | ||
| :heavy_check_mark:| get | collectionName, lokiId | return a document by his id | ||
| :heavy_check_mark:| insert | collectionName, document | insert a document | ||
| :heavy_check_mark:| update | collectionName, document | update a document | ||
| :heavy_check_mark:| remove | collectionName, document or id | remove a document | ||
| :heavy_check_mark:| find | collectionName, filter | find document(s) | ||
@@ -170,0 +173,0 @@ </p> |
@@ -24,3 +24,3 @@ const log = require('evillogger')({ ns:'collection/find' }); | ||
name:'Filters', | ||
mandatory:true, | ||
mandatory:false, | ||
description:'Filters', | ||
@@ -27,0 +27,0 @@ sanityCheck:{ |
@@ -1,2 +0,1 @@ | ||
const log = require('evillogger')({ ns:'database/addCollection' }); | ||
const shared = require('../../shared'); | ||
@@ -55,5 +54,4 @@ const Method = require('../../Method'); | ||
callback(null, shared.collections[`${databaseName}.${collectionName}`]); | ||
log.debug(`collection ${databaseName}.${collectionName} created`); | ||
} | ||
module.exports = new Method(descriptor, handler); |
@@ -52,2 +52,3 @@ const log = require('evillogger')({ ns:'database/loadDatabase' }); | ||
if (shared.dbs[databaseName]) { | ||
socket.loki.currentDatabase = databaseName; | ||
log.info(`${socket.id}: current database is now ${databaseName} (loaded)`); | ||
@@ -54,0 +55,0 @@ callback(null, shared.dbs[databaseName]); |
@@ -6,3 +6,3 @@ const Method = require('../../Method'); | ||
name:'quit', | ||
categories:['client'], | ||
categories:['server'], | ||
description:{ | ||
@@ -9,0 +9,0 @@ short:'Disconnect', |
@@ -40,4 +40,7 @@ const log = require('evillogger')({ ns:'Command' }); | ||
if (params.length>descriptor.parameters.length) { | ||
triggerError(`${descriptor.name}: number of parameters should be lower or equal than ${descriptor.parameters.length}`, callback); | ||
return; | ||
if (descriptor.parameters.length>0) { | ||
triggerError(`${descriptor.name}: number of parameters should be lower or equal than ${descriptor.parameters.length}`, callback); | ||
return; | ||
} | ||
triggerError(`${descriptor.name}: this method does not wait for parameters`, callback); | ||
} | ||
@@ -44,0 +47,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
219
2
90386
2207
+ Addedasync@2.6.4(transitive)
+ Addedsloki-node-client@0.0.6(transitive)
- Removedsloki-node-client@0.0.5(transitive)
Updatedsloki-node-client@0.0.6