@saulx/selva
Advanced tools
Comparing version 0.2.5 to 0.2.15
@@ -32,3 +32,6 @@ "use strict"; | ||
} | ||
if ((props.$list || props.$find) && ignore !== '$list' && ignore !== '$') { | ||
if ((props.$list || props.$find) && | ||
ignore !== '$list' && | ||
ignore !== '$' && | ||
ignore !== '$find') { | ||
// field that needs to get the result | ||
@@ -35,0 +38,0 @@ if (field) { |
@@ -182,2 +182,5 @@ "use strict"; | ||
} | ||
else if (traverse) { | ||
meta.traverse = traverse; | ||
} | ||
return [{ results, meta }, null]; | ||
@@ -184,0 +187,0 @@ }; |
@@ -122,2 +122,3 @@ "use strict"; | ||
let sub; | ||
// not so nice.... | ||
const queryId = redis.sha1hex(cjson.encode(getOptions)); | ||
@@ -192,9 +193,8 @@ for (let i = 0; i < querySubs.length; i++) { | ||
// need to check if TYPE is there | ||
// no qeury on fields etc easy | ||
// if (!sub.ids) { | ||
// sub.ids = {} | ||
// } | ||
// for (let i = 1; i < meta.ids.length; i++) { | ||
// sub.ids[meta.ids[i]] = true | ||
// } | ||
if (!sub.ids) { | ||
sub.ids = {}; | ||
} | ||
for (let i = 1; i < meta.ids.length; i++) { | ||
sub.ids[meta.ids[i]] = true; | ||
} | ||
} | ||
@@ -201,0 +201,0 @@ if (sub.ids || !meta.ast) { |
@@ -223,2 +223,3 @@ "use strict"; | ||
async fetch(opts) { | ||
console.info('LOG>? do it???'); | ||
const str = await this.redis.loadAndEvalScript('fetch', SCRIPTS.fetch, 0, [], [`${this.loglevel}:${this.clientId}`, JSON.stringify(opts)]); | ||
@@ -225,0 +226,0 @@ return JSON.parse(str); |
@@ -99,3 +99,2 @@ "use strict"; | ||
return () => { | ||
console.log('REMOVE', channel); | ||
this.sub.unsubscribe(channel); | ||
@@ -155,2 +154,3 @@ delete this.subscriptions[channel]; | ||
this.sub.on('message', (channel, message) => { | ||
// does this allways happen now? | ||
if (channel.startsWith('___selva_lua_logs:') && this.log) { | ||
@@ -157,0 +157,0 @@ this.log(JSON.parse(message)); |
{ | ||
"name": "@saulx/selva", | ||
"version": "0.2.5", | ||
"version": "0.2.15", | ||
"main": "dist/src/index.js", | ||
@@ -75,3 +75,3 @@ "scripts": { | ||
"typescript-to-lua": "^0.30.1", | ||
"@saulx/selva-server": "0.2.2" | ||
"@saulx/selva-server": "0.2.12" | ||
}, | ||
@@ -88,2 +88,2 @@ "dependencies": { | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
931029
7753