Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.on('error', function () {
logging.error('Failed to create server.cache.js.gz');
compressionFinished = true;
})
.pipe(output)
.on('finish', function () {
logging.info('Created server.cache.js.gz');
compressionFinished = true;
})
.on('error', function () {
logging.error('Failed to create server.cache.js.gz');
compressionFinished = true;
});
// wait for compression to complete
deasync.loopWhile(function(){return !compressionFinished;});
}
dispatchSync(action) {
let done = false;
let result;
action(this.mockDispatch, this.getState).then((r) => {
result = r;
done = true;
});
require('deasync').loopWhile(() => !done);
//require('deasync').sleep(100);
return result;
}
beforeEach: function (cb) {
mongoose.connect(config.mongoDbURI)
require('deasync').loopWhile(function () {
return mongoose.connection.readyState !== 1
})
cb()
},
afterEach: function (cb) {
}},{key:'dispatchSync',value:function dispatchSync(
action){
var done=false;
var result=void 0;
action(this.mockDispatch,this.getState).then(function(r){
result=r;
done=true;
});
require('deasync').loopWhile(function(){return!done;});
//require('deasync').sleep(100);
return result;
}},{key:'dispatch',value:function dispatch(
content = it.parse(content, tag, function (prc) {
var s = prc.trim().split('=>');
var data = JSON.parse(s[1].trim());
var done = false;
var content;
rinco.render.file(rinco.fs.path.join(config.PAGES_DIR, s[0].trim()), function (data) {
content = data;
done=true;
}, ['rinco_js', 'rinco_css', 'rinco_reload', 'rinco_mustache'], true);
require('deasync').loopWhile(function(){return !done;});
return rinco.render.mustache.to_html(content, data);
});
});
callSync(cmd: string) {
p.stdin.write(`${cmd}\n`);
let data: string;
p.stdout.once("data", d => {
data = d.toString();
});
while (!data) deasync.roo;
deasync.loopWhile(() => !data);
return data;
}
"message": body.data.plain_text
};
done = true;
} else {
data = {
"error": true,
"message": body.message
};
done = true;
}
}
});
require('deasync').loopWhile(function () {
return !done;
});
return data;
}
};
}
done = true
}
if (reallyDone) {
return
}
if (data.toString().startsWith('>>>')) {
if (done) {
tinker.stdin.write(`json_encode($_)\n`)
} else {
tinker.stdin.write(`${php.replace(/[\n\r]/g, ' ').trim()}\n`)
}
}
})
deasync.loopWhile(() => !reallyDone)
tinker.stdin.end()
return result
}
var done = false;
var hxw;
sharp(input)
.raw()
.toBuffer(function (err, data, info) {
if (err) { throw err; }
var shape = [info.width | 0, info.height | 0, info.channels];
var stride = [info.channels, info.channels * info.width | 0, 1];
var wxh = new NdArray(new Uint8Array(data), shape, stride, 0);
hxw = wxh.transpose(1, 0);
if (isGrayscale(hxw)) {
hxw = hxw.pick(null, null, 1);
}
done = true;
});
deasync.loopWhile(function () { return !done; });
return hxw;
};
rc.environments.live = {
ethereum: {
host: res.eth_host,
port: res.eth_port,
account: res.default_account
},
ipfs: {
host: res.ipfs_host,
port: res.ipfs_port
}
};
done = true;
});
deasync.loopWhile(function () { return !done; });
DappleRC.validate(rc);
return rc;
}
};