mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
boo
This commit is contained in:
parent
8732fc5d8c
commit
2ecd852cfd
@ -1,5 +1,5 @@
|
||||
{ "name": "gun"
|
||||
, "version": "0.0.1u"
|
||||
, "version": "0.0.1v"
|
||||
, "author": "Mark Nadal"
|
||||
, "description": "Graph engine."
|
||||
, "engines": {
|
||||
@ -8,7 +8,7 @@
|
||||
, "dependencies": {
|
||||
"mime": "~>1.2.11",
|
||||
"theory": "~>0.2.6",
|
||||
"coalesce": "~>0.1.9bq",
|
||||
"coalesce": "~>0.1.9br",
|
||||
"aws-sdk": "~>2.0.0",
|
||||
"fakeredis": "~>0.1.3",
|
||||
"redis": "~>0.10.1",
|
||||
|
19
shots.js
19
shots.js
@ -168,19 +168,7 @@ module.exports = require('theory')
|
||||
if(!m || !m.how){ return }
|
||||
if(m.where && m.where.mid){
|
||||
console.log("servers chats:", m);
|
||||
if(opt.src && opt.src.send){
|
||||
m.what.count += 1;
|
||||
if(22 < m.what.count){ return }
|
||||
opt.src.send(m);
|
||||
}
|
||||
return;
|
||||
}
|
||||
(function(){
|
||||
if(opt.src && opt.src.send){
|
||||
var m = {count: 1, how:{gun: 9}};
|
||||
opt.src.send(m);
|
||||
}
|
||||
})();
|
||||
var where = a.text.is(m.where)? m.where : m.where.at;
|
||||
if(m.how.gun === 3){
|
||||
shot.shell(m.what._['%']||where, function(g,e){
|
||||
@ -195,6 +183,7 @@ module.exports = require('theory')
|
||||
return;
|
||||
}
|
||||
if(!where){ return }
|
||||
if(m.where
|
||||
store.add(m);
|
||||
shot.shell(where, function(g,e){
|
||||
var done = function(){
|
||||
@ -213,6 +202,12 @@ module.exports = require('theory')
|
||||
done.end = function(){};
|
||||
shot.spray.transform(g, m, done, e);
|
||||
});
|
||||
if(m.where && !m.where.mid && opt.src.send){
|
||||
var who = m.who, env = m.where;
|
||||
m.who = {}; m.where.at = null;
|
||||
opt.src.send(m);
|
||||
m.who = who; m.where.at = (env||{}).at;
|
||||
}
|
||||
}
|
||||
shot.pump = function(fn){
|
||||
shot.pump.action = fn || shot.pump.action;
|
||||
|
@ -98,10 +98,13 @@ module.exports=require('theory')
|
||||
console.log('graph', g());
|
||||
var p = g('packageson');
|
||||
var val = p('version');
|
||||
console.log(val);
|
||||
var ran = p('random');
|
||||
console.log(val, ran);
|
||||
val = a.num.is(val)? (val + 1) : 0;
|
||||
console.log(val);
|
||||
ran = a.text.r();
|
||||
console.log(val, 'and total randomness ---->', ran);
|
||||
p('version',val);
|
||||
p('random',ran);
|
||||
a.time.wait(function(){
|
||||
shot.shell('gunjs.herokuapp.com/tests/package.json',function(gg){
|
||||
var pp = gg('packageson');
|
||||
|
Loading…
x
Reference in New Issue
Block a user