cleanup, performance improvements and reformatting

This commit is contained in:
RIAEvangelist 2017-04-15 22:17:25 -07:00
parent e4098d1921
commit 8886f82faa
18 changed files with 1483 additions and 1454 deletions

View file

@ -12,9 +12,11 @@ if(process.version[1]>4){
Events = require('event-pubsub');
}
let eventParser = new EventParser();
class Client extends Events{
constructor(config,log){
super(config);
super();
Object.assign(
this,
{
@ -29,6 +31,8 @@ class Client extends Events{
explicitlyDisconnected: false
}
);
eventParser=new EventParser(this.config);
}
}
@ -42,7 +46,7 @@ function emit(type,data){
if(this.config.rawBuffer){
message=new Buffer(type,this.config.encoding);
}else{
message=client.format(message);
message=eventParser.format(message);
}
if(!this.config.sync){
@ -221,14 +225,14 @@ function connect(){
data=(this.ipcBuffer+=data);
if(data.slice(-1)!=client.delimiter || data.indexOf(client.delimiter) == -1){
if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
client.log('Messages are large, You may want to consider smaller messages.');
return;
}
this.ipcBuffer='';
const events = client.parse(data);
const events = eventParser.parse(data);
const eCount = events.length;
for(let i=0; i<eCount; i++){
let message=new Message;

View file

@ -12,9 +12,11 @@ if(process.version[1]>4){
Events = require('event-pubsub');
}
let eventParser = new EventParser();
class Server extends Events{
constructor(path,config,log,port){
super(config);
super();
Object.assign(
this,
{
@ -31,6 +33,8 @@ class Server extends Events{
}
);
eventParser=new EventParser(this.config);
this.on(
'close',
serverClosed.bind(this)
@ -291,7 +295,7 @@ function startServer() {
'error',
err
);
}.bind(this)
}
);
this.server.maxConnections=this.config.maxConnections;

View file

@ -1,18 +1,16 @@
'use strict';
const Defaults = require('./Defaults.js');
class Parser{
constructor(config){
Object.assign(
this,
{
parse : parseDataEvents,
format : formatData,
delimiter : config.delimiter||'\f'
if(!config){
config=new Defaults;
}
);
this.delimiter=config.delimiter;
}
formatData(message){
format(message){
if(!message.data && message.data!==false && message.data!==0){
message.data={};
}
@ -20,12 +18,12 @@ class Parser{
message.data={};
}
message=message.JSON+parser.delimiter;
message=message.JSON+this.delimiter;
return message;
}
parseDataEvents(data){
let events=data.split(parser.delimiter);
parse(data){
let events=data.split(this.delimiter);
events.pop();
return events;
}

View file

@ -10,17 +10,16 @@
"node": ">=4.0.0"
},
"dependencies": {
"colors": "*",
"event-pubsub": "4.2.4",
"js-message": ">=1.0.5",
"js-queue": ">=2.0.0"
"js-message": "1.0.5",
"js-queue": "2.0.0"
},
"devDependencies": {
"codacy-coverage": "^1.1.3",
"jasmine": "^2.4.1",
"istanbul": "^0.4.1",
"codacy-coverage": "^2.0.0",
"node-cmd": ">=1.2.0"
"codacy-coverage": "1.1.3",
"jasmine": "2.4.1",
"istanbul": "0.4.1",
"codacy-coverage": "2.0.0",
"node-cmd": "2.0.0"
},
"scripts": {
"test-windows": "istanbul cover -x **/spec/** -dir ./spec/coverage ./node_modules/jasmine/bin/jasmine.js",

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@ body {
font-size: 14px;
color:#333;
}
.small { font-size: 12px; }
.small { font-size: 12px;; }
*, *:after, *:before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
@ -166,13 +166,10 @@ table.coverage td span.cline-any {
/* dark green */
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
.high .chart { border:1px solid rgb(77,146,33) }
/* dark yellow (gold) */
.medium .chart { border:1px solid #f9cd0b; }
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
/* light yellow */
.medium { background: #fff4c2; }
/* light gray */
span.cline-neutral { background: #eaeaea; }
.medium .chart { border:1px solid #666; }
.medium .cover-fill { background: #666; }
.cbranch-no { background: yellow !important; color: #111; }
@ -180,6 +177,8 @@ span.cline-neutral { background: #eaeaea; }
.fstat-skip { background: #ddd; color: #111 !important; }
.cbranch-skip { background: #ddd !important; color: #111; }
span.cline-neutral { background: #eaeaea; }
.medium { background: #eaeaea; }
.cover-fill, .cover-empty {
display:inline-block;

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">28.7% </span>
<span class="strong">69.32% </span>
<span class="quiet">Statements</span>
<span class='fraction'>128/446</span>
<span class='fraction'>314/453</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">12.88% </span>
<span class="strong">56.65% </span>
<span class="quiet">Branches</span>
<span class='fraction'>30/233</span>
<span class='fraction'>132/233</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">33.33% </span>
<span class="strong">85.71% </span>
<span class="quiet">Functions</span>
<span class='fraction'>14/42</span>
<span class='fraction'>36/42</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">28.7% </span>
<span class="strong">69.32% </span>
<span class="quiet">Lines</span>
<span class='fraction'>128/446</span>
<span class='fraction'>314/453</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<div class='status-line medium'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
@ -72,42 +72,42 @@
</tr>
<tr>
<td class="file low" data-value="node-ipc/dao/"><a href="node-ipc/dao/index.html">node-ipc/dao/</a></td>
<td data-value="21.93" class="pic low"><div class="chart"><div class="cover-fill" style="width: 21%;"></div><div class="cover-empty" style="width:79%;"></div></div></td>
<td data-value="21.93" class="pct low">21.93%</td>
<td data-value="269" class="abs low">59/269</td>
<td data-value="9.09" class="pct low">9.09%</td>
<td data-value="143" class="abs low">13/143</td>
<td data-value="25" class="pct low">25%</td>
<td data-value="28" class="abs low">7/28</td>
<td data-value="21.93" class="pct low">21.93%</td>
<td data-value="269" class="abs low">59/269</td>
<td class="file medium" data-value="node-ipc/dao/"><a href="node-ipc/dao/index.html">node-ipc/dao/</a></td>
<td data-value="67.03" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 67%;"></div><div class="cover-empty" style="width:33%;"></div></div></td>
<td data-value="67.03" class="pct medium">67.03%</td>
<td data-value="273" class="abs medium">183/273</td>
<td data-value="54.55" class="pct medium">54.55%</td>
<td data-value="143" class="abs medium">78/143</td>
<td data-value="82.14" class="pct high">82.14%</td>
<td data-value="28" class="abs high">23/28</td>
<td data-value="67.03" class="pct medium">67.03%</td>
<td data-value="273" class="abs medium">183/273</td>
</tr>
<tr>
<td class="file medium" data-value="node-ipc/entities/"><a href="node-ipc/entities/index.html">node-ipc/entities/</a></td>
<td data-value="71.05" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 71%;"></div><div class="cover-empty" style="width:29%;"></div></div></td>
<td data-value="71.05" class="pct medium">71.05%</td>
<td data-value="38" class="abs medium">27/38</td>
<td data-value="25" class="pct low">25%</td>
<td data-value="16" class="abs low">4/16</td>
<td data-value="40" class="pct low">40%</td>
<td data-value="5" class="abs low">2/5</td>
<td data-value="71.05" class="pct medium">71.05%</td>
<td data-value="38" class="abs medium">27/38</td>
<td class="file high" data-value="node-ipc/entities/"><a href="node-ipc/entities/index.html">node-ipc/entities/</a></td>
<td data-value="92.68" class="pic high"><div class="chart"><div class="cover-fill" style="width: 92%;"></div><div class="cover-empty" style="width:8%;"></div></div></td>
<td data-value="92.68" class="pct high">92.68%</td>
<td data-value="41" class="abs high">38/41</td>
<td data-value="56.25" class="pct medium">56.25%</td>
<td data-value="16" class="abs medium">9/16</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="92.68" class="pct high">92.68%</td>
<td data-value="41" class="abs high">38/41</td>
</tr>
<tr>
<td class="file low" data-value="node-ipc/services/"><a href="node-ipc/services/index.html">node-ipc/services/</a></td>
<td data-value="28.15" class="pic low"><div class="chart"><div class="cover-fill" style="width: 28%;"></div><div class="cover-empty" style="width:72%;"></div></div></td>
<td data-value="28.15" class="pct low">28.15%</td>
<td data-value="135" class="abs low">38/135</td>
<td data-value="17.57" class="pct low">17.57%</td>
<td data-value="74" class="abs low">13/74</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="8" class="abs medium">4/8</td>
<td data-value="28.15" class="pct low">28.15%</td>
<td data-value="135" class="abs low">38/135</td>
<td class="file medium" data-value="node-ipc/services/"><a href="node-ipc/services/index.html">node-ipc/services/</a></td>
<td data-value="65.93" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 65%;"></div><div class="cover-empty" style="width:35%;"></div></div></td>
<td data-value="65.93" class="pct medium">65.93%</td>
<td data-value="135" class="abs medium">89/135</td>
<td data-value="60.81" class="pct medium">60.81%</td>
<td data-value="74" class="abs medium">45/74</td>
<td data-value="87.5" class="pct high">87.5%</td>
<td data-value="8" class="abs high">7/8</td>
<td data-value="65.93" class="pct medium">65.93%</td>
<td data-value="135" class="abs medium">89/135</td>
</tr>
</tbody>
@ -116,7 +116,7 @@
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">40.54% </span>
<span class="strong">71.68% </span>
<span class="quiet">Statements</span>
<span class='fraction'>45/111</span>
<span class='fraction'>81/113</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">22.64% </span>
<span class="strong">50.94% </span>
<span class="quiet">Branches</span>
<span class='fraction'>12/53</span>
<span class='fraction'>27/53</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">77.78% </span>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>7/9</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">40.54% </span>
<span class="strong">71.68% </span>
<span class="quiet">Lines</span>
<span class='fraction'>45/111</span>
<span class='fraction'>81/113</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
@ -296,7 +296,11 @@
251
252
253
254</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
254
255
256
257
258</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -310,62 +314,182 @@
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
@ -373,134 +497,18 @@
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -513,37 +521,37 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -563,9 +571,11 @@ let Events = require('event-pubsub/es5');
Events = require('event-pubsub');
}
&nbsp;
let eventParser = new EventParser();
&nbsp;
class Client extends Events{
constructor(config,log){
super(config);
super();
Object.assign(
this,
{
@ -580,6 +590,8 @@ class Client extends Events{
explicitlyDisconnected: false
}
);
&nbsp;
eventParser=new EventParser(this.config);
}
}
&nbsp;
@ -593,22 +605,22 @@ function emit(type,data){
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
<span class="cstat-no" title="statement not covered" > message=new Buffer(type,this.config.encoding);</span>
}else{
message=client.format(message);
message=eventParser.format(message);
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!this.config.sync){</span>
<span class="cstat-no" title="statement not covered" > this.socket.write(message);</span>
<span class="cstat-no" title="statement not covered" > return;</span>
if(!this.config.sync){
this.socket.write(message);
return;
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.queue.add(</span>
this.queue.add(
syncEmit.bind(this,message)
);
}
&nbsp;
<span class="fstat-no" title="function not covered" >function syncEmit(message){</span>
<span class="cstat-no" title="statement not covered" > this.log('dispatching event to ', this.id, this.path, ' : ', message);</span>
<span class="cstat-no" title="statement not covered" > this.socket.write(message);</span>
function syncEmit(message){
this.log('dispatching event to ', this.id, this.path, ' : ', message);
this.socket.write(message);
}
&nbsp;
function connect(){
@ -623,7 +635,7 @@ function connect(){
&nbsp;
const options={};
&nbsp;
<span class="missing-if-branch" title="else path not taken" >E</span>if(!client.port){
if(!client.port){
client.log('Connecting client on Unix Socket :', client.path);
&nbsp;
options.path=client.path;
@ -636,32 +648,32 @@ function connect(){
&nbsp;
client.socket = net.connect(options);
}else{
<span class="cstat-no" title="statement not covered" > options.host=client.path;</span>
<span class="cstat-no" title="statement not covered" > options.port=client.port;</span>
options.host=client.path;
options.port=client.port;
&nbsp;
<span class="cstat-no" title="statement not covered" > if(client.config.interface.localAddress){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.localAddress){
<span class="cstat-no" title="statement not covered" > options.localAddress=client.config.interface.localAddress;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(client.config.interface.localPort){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.localPort){
<span class="cstat-no" title="statement not covered" > options.localPort=client.config.interface.localPort;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(client.config.interface.family){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.family){
<span class="cstat-no" title="statement not covered" > options.family=client.config.interface.family;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(client.config.interface.hints){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.hints){
<span class="cstat-no" title="statement not covered" > options.hints=client.config.interface.hints;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(client.config.interface.lookup){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.lookup){
<span class="cstat-no" title="statement not covered" > options.lookup=client.config.interface.lookup;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!client.config.tls){</span>
<span class="cstat-no" title="statement not covered" > client.log('Connecting client via TCP to', options);</span>
<span class="cstat-no" title="statement not covered" > client.socket = net.connect(options);</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if(!client.config.tls){
client.log('Connecting client via TCP to', options);
client.socket = net.connect(options);
}else{
<span class="cstat-no" title="statement not covered" > client.log('Connecting client via TLS to', client.path ,client.port,client.config.tls);</span>
<span class="cstat-no" title="statement not covered" > if(client.config.tls.private){</span>
@ -705,8 +717,8 @@ function connect(){
'connect',
function connectionMade(){
client.publish('connect');
<span class="cstat-no" title="statement not covered" > client.retriesRemaining=client.config.maxRetries;</span>
<span class="cstat-no" title="statement not covered" > client.log('retrying reset');</span>
client.retriesRemaining=client.config.maxRetries;
client.log('retrying reset');
}
);
&nbsp;
@ -751,9 +763,9 @@ function connect(){
&nbsp;
client.socket.on(
'data',
<span class="fstat-no" title="function not covered" > function(data) {</span>
<span class="cstat-no" title="statement not covered" > client.log('## received events ##');</span>
<span class="cstat-no" title="statement not covered" > if(client.config.rawBuffer){</span>
function(data) {
client.log('## received events ##');
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.rawBuffer){
<span class="cstat-no" title="statement not covered" > client.publish(</span>
'data',
new Buffer(data,client.config.encoding)
@ -766,37 +778,37 @@ function connect(){
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!this.ipcBuffer){</span>
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if(!this.ipcBuffer){
this.ipcBuffer='';
}
&nbsp;
<span class="cstat-no" title="statement not covered" > data=(this.ipcBuffer+=data);</span>
data=(this.ipcBuffer+=data);
&nbsp;
<span class="cstat-no" title="statement not covered" > if(data.slice(-1)!=client.delimiter || data.indexOf(client.delimiter) == -1){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
<span class="cstat-no" title="statement not covered" > client.log('Messages are large, You may want to consider smaller messages.');</span>
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
this.ipcBuffer='';
&nbsp;
<span class="cstat-no" title="statement not covered" > const events = client.parse(data);</span>
<span class="cstat-no" title="statement not covered" > const eCount = events.length;</span>
<span class="cstat-no" title="statement not covered" > for(let i=0; i&lt;eCount; i++){</span>
<span class="cstat-no" title="statement not covered" > let message=new Message;</span>
<span class="cstat-no" title="statement not covered" > message.load(events[i]);</span>
const events = eventParser.parse(data);
const eCount = events.length;
for(let i=0; i&lt;eCount; i++){
let message=new Message;
message.load(events[i]);
&nbsp;
<span class="cstat-no" title="statement not covered" > client.log('detected event', message.type, message.data);</span>
<span class="cstat-no" title="statement not covered" > client.publish(</span>
client.log('detected event', message.type, message.data);
client.publish(
message.type,
message.data
);
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!client.config.sync){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(!client.config.sync){
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > client.queue.next();</span>
client.queue.next();
}
);
}
@ -808,7 +820,7 @@ module.exports=Client;
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">21.93% </span>
<span class="strong">67.03% </span>
<span class="quiet">Statements</span>
<span class='fraction'>59/269</span>
<span class='fraction'>183/273</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">9.09% </span>
<span class="strong">54.55% </span>
<span class="quiet">Branches</span>
<span class='fraction'>13/143</span>
<span class='fraction'>78/143</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">25% </span>
<span class="strong">82.14% </span>
<span class="quiet">Functions</span>
<span class='fraction'>7/28</span>
<span class='fraction'>23/28</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">21.93% </span>
<span class="strong">67.03% </span>
<span class="quiet">Lines</span>
<span class='fraction'>59/269</span>
<span class='fraction'>183/273</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<div class='status-line medium'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
@ -59,29 +59,29 @@
</tr>
</thead>
<tbody><tr>
<td class="file low" data-value="client.js"><a href="client.js.html">client.js</a></td>
<td data-value="40.54" class="pic low"><div class="chart"><div class="cover-fill" style="width: 40%;"></div><div class="cover-empty" style="width:60%;"></div></div></td>
<td data-value="40.54" class="pct low">40.54%</td>
<td data-value="111" class="abs low">45/111</td>
<td data-value="22.64" class="pct low">22.64%</td>
<td data-value="53" class="abs low">12/53</td>
<td data-value="77.78" class="pct medium">77.78%</td>
<td data-value="9" class="abs medium">7/9</td>
<td data-value="40.54" class="pct low">40.54%</td>
<td data-value="111" class="abs low">45/111</td>
<td class="file medium" data-value="client.js"><a href="client.js.html">client.js</a></td>
<td data-value="71.68" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 71%;"></div><div class="cover-empty" style="width:29%;"></div></div></td>
<td data-value="71.68" class="pct medium">71.68%</td>
<td data-value="113" class="abs medium">81/113</td>
<td data-value="50.94" class="pct medium">50.94%</td>
<td data-value="53" class="abs medium">27/53</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="71.68" class="pct medium">71.68%</td>
<td data-value="113" class="abs medium">81/113</td>
</tr>
<tr>
<td class="file low" data-value="socketServer.js"><a href="socketServer.js.html">socketServer.js</a></td>
<td data-value="8.86" class="pic low"><div class="chart"><div class="cover-fill" style="width: 8%;"></div><div class="cover-empty" style="width:92%;"></div></div></td>
<td data-value="8.86" class="pct low">8.86%</td>
<td data-value="158" class="abs low">14/158</td>
<td data-value="1.11" class="pct low">1.11%</td>
<td data-value="90" class="abs low">1/90</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="19" class="abs low">0/19</td>
<td data-value="8.86" class="pct low">8.86%</td>
<td data-value="158" class="abs low">14/158</td>
<td class="file medium" data-value="socketServer.js"><a href="socketServer.js.html">socketServer.js</a></td>
<td data-value="63.75" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 63%;"></div><div class="cover-empty" style="width:37%;"></div></div></td>
<td data-value="63.75" class="pct medium">63.75%</td>
<td data-value="160" class="abs medium">102/160</td>
<td data-value="56.67" class="pct medium">56.67%</td>
<td data-value="90" class="abs medium">51/90</td>
<td data-value="73.68" class="pct medium">73.68%</td>
<td data-value="19" class="abs medium">14/19</td>
<td data-value="63.75" class="pct medium">63.75%</td>
<td data-value="160" class="abs medium">102/160</td>
</tr>
</tbody>
@ -90,7 +90,7 @@
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">8.86% </span>
<span class="strong">63.75% </span>
<span class="quiet">Statements</span>
<span class='fraction'>14/158</span>
<span class='fraction'>102/160</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">1.11% </span>
<span class="strong">56.67% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/90</span>
<span class='fraction'>51/90</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="strong">73.68% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/19</span>
<span class='fraction'>14/19</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">8.86% </span>
<span class="strong">63.75% </span>
<span class="quiet">Lines</span>
<span class='fraction'>14/158</span>
<span class='fraction'>102/160</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
@ -437,7 +437,11 @@
392
393
394
395</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
395
396
397
398
399</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -451,49 +455,53 @@
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -501,32 +509,32 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
@ -556,37 +564,37 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -596,33 +604,33 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -631,26 +639,26 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
@ -659,69 +667,69 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
@ -733,42 +741,42 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -809,15 +817,15 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -845,10 +853,12 @@ let Events = require('event-pubsub/es5');
Events = require('event-pubsub');
}
&nbsp;
let eventParser = new EventParser();
&nbsp;
class Server extends Events{
constructor<span class="fstat-no" title="function not covered" >(path,config,log,port){</span>
<span class="cstat-no" title="statement not covered" > super(config);</span>
<span class="cstat-no" title="statement not covered" > Object.assign(</span>
constructor(path,config,log,port){
super();
Object.assign(
this,
{
config : config,
@ -864,63 +874,65 @@ class Server extends Events{
}
);
&nbsp;
<span class="cstat-no" title="statement not covered" > this.on(</span>
eventParser=new EventParser(this.config);
&nbsp;
this.on(
'close',
serverClosed.bind(this)
);
}
&nbsp;
onStart<span class="fstat-no" title="function not covered" >(socket){</span>
<span class="cstat-no" title="statement not covered" > this.trigger(</span>
onStart(socket){
this.trigger(
'start',
socket
);
}
&nbsp;
stop<span class="fstat-no" title="function not covered" >(){</span>
<span class="cstat-no" title="statement not covered" > this.server.close();</span>
stop(){
this.server.close();
}
&nbsp;
start<span class="fstat-no" title="function not covered" >(){</span>
<span class="cstat-no" title="statement not covered" > if(!this.path){</span>
start(){
<span class="missing-if-branch" title="if path not taken" >I</span>if(!this.path){
<span class="cstat-no" title="statement not covered" > this.log('Socket Server Path not specified, refusing to start');</span>
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > fs.unlink(</span>
fs.unlink(
this.path,
startServer.bind(this)
);
}
}
&nbsp;
<span class="fstat-no" title="function not covered" >function emit(socket, type, data){</span>
<span class="cstat-no" title="statement not covered" > this.log('dispatching event to socket', ' : ', type, data);</span>
function emit(socket, type, data){
this.log('dispatching event to socket', ' : ', type, data);
&nbsp;
<span class="cstat-no" title="statement not covered" > let message=new Message;</span>
<span class="cstat-no" title="statement not covered" > message.type=type;</span>
<span class="cstat-no" title="statement not covered" > message.data=data;</span>
let message=new Message;
message.type=type;
message.data=data;
&nbsp;
<span class="cstat-no" title="statement not covered" > if(this.config.rawBuffer){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
<span class="cstat-no" title="statement not covered" > this.log(this.config.encoding)</span>
<span class="cstat-no" title="statement not covered" > message=new Buffer(type,this.config.encoding);</span>
}else{
<span class="cstat-no" title="statement not covered" > message=eventParser.format(message);</span>
message=eventParser.format(message);
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(this.udp4 || this.udp6){</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if(this.udp4 || this.udp6){
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!socket.address || !socket.port){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(!socket.address || !socket.port){
<span class="cstat-no" title="statement not covered" > this.log('Attempting to emit to a single UDP socket without supplying socket address or port. Redispatching event as broadcast to all connected sockets');</span>
<span class="cstat-no" title="statement not covered" > this.broadcast(type,data);</span>
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server.write(</span>
this.server.write(
message,
socket
);
<span class="cstat-no" title="statement not covered" > return;</span>
return;
}
&nbsp;
<span class="cstat-no" title="statement not covered" > socket.write(message);</span>
@ -949,38 +961,38 @@ class Server extends Events{
}
}
&nbsp;
<span class="fstat-no" title="function not covered" >function serverClosed(){</span>
<span class="cstat-no" title="statement not covered" > for(let i=0, count=this.sockets.length; i&lt;count; i++){</span>
<span class="cstat-no" title="statement not covered" > let socket=this.sockets[i];</span>
<span class="cstat-no" title="statement not covered" > let destroyedSocketId=false;</span>
function serverClosed(){
for(let i=0, count=this.sockets.length; i&lt;count; i++){
let socket=this.sockets[i];
let destroyedSocketId=false;
&nbsp;
<span class="cstat-no" title="statement not covered" > if(socket){</span>
<span class="cstat-no" title="statement not covered" > if(socket.readable){</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if(socket){
<span class="missing-if-branch" title="if path not taken" >I</span>if(socket.readable){
<span class="cstat-no" title="statement not covered" > continue;</span>
}
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(socket.id){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(socket.id){
<span class="cstat-no" title="statement not covered" > destroyedSocketId=socket.id;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.log('socket disconnected',destroyedSocketId.toString());</span>
this.log('socket disconnected',destroyedSocketId.toString());
&nbsp;
<span class="cstat-no" title="statement not covered" > if(socket &amp;&amp; socket.destroy){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(socket &amp;&amp; socket.destroy){
<span class="cstat-no" title="statement not covered" > socket.destroy();</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.sockets.splice(i,1);</span>
this.sockets.splice(i,1);
&nbsp;
<span class="cstat-no" title="statement not covered" > this.publish('socket.disconnected', socket, destroyedSocketId);</span>
this.publish('socket.disconnected', socket, destroyedSocketId);
&nbsp;
<span class="cstat-no" title="statement not covered" > return;</span>
return;
}
}
&nbsp;
<span class="fstat-no" title="function not covered" >function gotData(socket,data,UDPSocket){</span>
<span class="cstat-no" title="statement not covered" > let sock=((this.udp4 || this.udp6)? UDPSocket : socket);</span>
<span class="cstat-no" title="statement not covered" > if(this.config.rawBuffer){</span>
function gotData(socket,data,UDPSocket){
let sock=((this.udp4 || this.udp6)? UDPSocket : <span class="branch-1 cbranch-no" title="branch not covered" >socket)</span>;
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
<span class="cstat-no" title="statement not covered" > data=new Buffer(data,this.config.encoding);</span>
<span class="cstat-no" title="statement not covered" > this.publish(</span>
'data',
@ -990,33 +1002,33 @@ class Server extends Events{
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!this.ipcBuffer){</span>
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if(!this.ipcBuffer){
this.ipcBuffer='';
}
&nbsp;
<span class="cstat-no" title="statement not covered" > data=(this.ipcBuffer+=data);</span>
data=(this.ipcBuffer+=data);
&nbsp;
<span class="cstat-no" title="statement not covered" > if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
<span class="cstat-no" title="statement not covered" > this.log('Messages are large, You may want to consider smaller messages.');</span>
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
this.ipcBuffer='';
&nbsp;
<span class="cstat-no" title="statement not covered" > data=eventParser.parse(data);</span>
data=eventParser.parse(data);
&nbsp;
<span class="cstat-no" title="statement not covered" > while(data.length&gt;0){</span>
<span class="cstat-no" title="statement not covered" > let message=new Message;</span>
<span class="cstat-no" title="statement not covered" > message.load(data.shift());</span>
while(data.length&gt;0){
let message=new Message;
message.load(data.shift());
&nbsp;
// Only set the sock id if it is specified.
<span class="cstat-no" title="statement not covered" > if (message.data &amp;&amp; message.data.id){</span>
<span class="cstat-no" title="statement not covered" > sock.id=message.data.id;</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if (message.data &amp;&amp; message.data.id){
sock.id=message.data.id;
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.log('received event of : ',message.type,message.data);</span>
this.log('received event of : ',message.type,message.data);
&nbsp;
<span class="cstat-no" title="statement not covered" > this.publish(</span>
this.publish(
message.type,
message.data,
sock
@ -1024,27 +1036,27 @@ class Server extends Events{
}
}
&nbsp;
<span class="fstat-no" title="function not covered" >function socketClosed(socket){</span>
<span class="cstat-no" title="statement not covered" > this.publish(</span>
function socketClosed(socket){
this.publish(
'close',
socket
);
}
&nbsp;
<span class="fstat-no" title="function not covered" >function serverCreated(socket) {</span>
<span class="cstat-no" title="statement not covered" > this.sockets.push(socket);</span>
function serverCreated(socket) {
this.sockets.push(socket);
&nbsp;
<span class="cstat-no" title="statement not covered" > if(socket.setEncoding){</span>
<span class="cstat-no" title="statement not covered" > socket.setEncoding(this.config.encoding);</span>
if(socket.setEncoding){
socket.setEncoding(this.config.encoding);
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.log('## socket connection to server detected ##');</span>
<span class="cstat-no" title="statement not covered" > socket.on(</span>
this.log('## socket connection to server detected ##');
socket.on(
'close',
socketClosed.bind(this)
);
&nbsp;
<span class="cstat-no" title="statement not covered" > socket.on(</span>
socket.on(
'error',
<span class="fstat-no" title="function not covered" > function(err){</span>
<span class="cstat-no" title="statement not covered" > this.log('server socket error',err);</span>
@ -1053,69 +1065,69 @@ class Server extends Events{
}.bind(this)
);
&nbsp;
<span class="cstat-no" title="statement not covered" > socket.on(</span>
socket.on(
'data',
gotData.bind(this,socket)
);
&nbsp;
<span class="cstat-no" title="statement not covered" > socket.on(</span>
socket.on(
'message',
<span class="fstat-no" title="function not covered" > function(msg,rinfo) {</span>
<span class="cstat-no" title="statement not covered" > if (!rinfo){</span>
function(msg,rinfo) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!rinfo){
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.log('Received UDP message from ', rinfo.address, rinfo.port);</span>
<span class="cstat-no" title="statement not covered" > let data;</span>
this.log('Received UDP message from ', rinfo.address, rinfo.port);
let data;
&nbsp;
<span class="cstat-no" title="statement not covered" > if(this.config.rawSocket){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawSocket){
<span class="cstat-no" title="statement not covered" > data=new Buffer(msg,this.config.encoding);</span>
}else{
<span class="cstat-no" title="statement not covered" > data=msg.toString();</span>
data=msg.toString();
}
<span class="cstat-no" title="statement not covered" > socket.emit('data',data,rinfo);</span>
socket.emit('data',data,rinfo);
}.bind(this)
);
&nbsp;
<span class="cstat-no" title="statement not covered" > this.publish(</span>
this.publish(
'connect',
socket
);
&nbsp;
<span class="cstat-no" title="statement not covered" > if(this.config.rawBuffer){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
<span class="cstat-no" title="statement not covered" > return;</span>
}
}
&nbsp;
<span class="fstat-no" title="function not covered" >function startServer() {</span>
<span class="cstat-no" title="statement not covered" > this.log(</span>
function startServer() {
this.log(
'starting server on ',this.path,
((this.port)?`:${this.port}`:'')
);
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!this.udp4 &amp;&amp; !this.udp6){</span>
<span class="cstat-no" title="statement not covered" > this.log('starting TLS server',this.config.tls);</span>
<span class="cstat-no" title="statement not covered" > if(!this.config.tls){</span>
<span class="cstat-no" title="statement not covered" > this.server=net.createServer(</span>
if(!this.udp4 &amp;&amp; !this.udp6){
this.log('starting TLS server',this.config.tls);
<span class="missing-if-branch" title="else path not taken" >E</span>if(!this.config.tls){
this.server=net.createServer(
serverCreated.bind(this)
);
}else{
<span class="cstat-no" title="statement not covered" > startTLSServer.bind(this)();</span>
}
}else{
<span class="cstat-no" title="statement not covered" > this.server=dgram.createSocket(</span>
this.server=dgram.createSocket(
((this.udp4)? 'udp4':'udp6')
);
<span class="cstat-no" title="statement not covered" > this.server.write=UDPWrite.bind(this);</span>
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
this.server.write=UDPWrite.bind(this);
this.server.on(
'listening',
<span class="fstat-no" title="function not covered" > function UDPServerStarted() {</span>
<span class="cstat-no" title="statement not covered" > serverCreated.bind(this)(this.server);</span>
function UDPServerStarted() {
serverCreated.bind(this)(this.server);
}.bind(this)
);
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
this.server.on(
'error',
<span class="fstat-no" title="function not covered" > function(err){</span>
<span class="cstat-no" title="statement not covered" > this.log('server error',err);</span>
@ -1127,42 +1139,42 @@ class Server extends Events{
}
);
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server.maxConnections=this.config.maxConnections;</span>
this.server.maxConnections=this.config.maxConnections;
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!this.port){</span>
<span class="cstat-no" title="statement not covered" > this.log('starting server as', 'Unix || Windows Socket');</span>
<span class="cstat-no" title="statement not covered" > if (process.platform ==='win32'){</span>
if(!this.port){
this.log('starting server as', 'Unix || Windows Socket');
<span class="missing-if-branch" title="if path not taken" >I</span>if (process.platform ==='win32'){
<span class="cstat-no" title="statement not covered" > this.path = this.path.replace(/^\//, '');</span>
<span class="cstat-no" title="statement not covered" > this.path = this.path.replace(/\//g, '-');</span>
<span class="cstat-no" title="statement not covered" > this.path= `\\\\.\\pipe\\${this.path}`;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server.listen(</span>
this.server.listen(
this.path,
this.onStart.bind(this)
);
&nbsp;
<span class="cstat-no" title="statement not covered" > return;</span>
return;
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!this.udp4 &amp;&amp; !this.udp6){</span>
<span class="cstat-no" title="statement not covered" > this.log('starting server as', (this.config.tls?'TLS':'TCP'));</span>
<span class="cstat-no" title="statement not covered" > this.server.listen(</span>
if(!this.udp4 &amp;&amp; !this.udp6){
this.log('starting server as', (this.config.tls?<span class="branch-0 cbranch-no" title="branch not covered" >'TLS':</span>'TCP'));
this.server.listen(
this.port,
this.path,
this.onStart.bind(this)
);
<span class="cstat-no" title="statement not covered" > return;</span>
return;
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.log('starting server as',((this.udp4)? 'udp4':'udp6'));</span>
this.log('starting server as',((this.udp4)? 'udp4':'udp6'));
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server.bind(</span>
this.server.bind(
this.port,
this.path
);
&nbsp;
<span class="cstat-no" title="statement not covered" > this.onStart(</span>
this.onStart(
{
address : this.path,
port : this.port
@ -1202,16 +1214,16 @@ class Server extends Events{
);
}
&nbsp;
<span class="fstat-no" title="function not covered" >function UDPWrite(message,socket){</span>
<span class="cstat-no" title="statement not covered" > let data=new Buffer(message, this.config.encoding);</span>
<span class="cstat-no" title="statement not covered" > this.server.send(</span>
function UDPWrite(message,socket){
let data=new Buffer(message, this.config.encoding);
this.server.send(
data,
0,
data.length,
socket.port,
socket.address,
<span class="fstat-no" title="function not covered" > function(err, bytes) {</span>
<span class="cstat-no" title="statement not covered" > if(err){</span>
function(err, bytes) {
<span class="missing-if-branch" title="if path not taken" >I</span>if(err){
<span class="cstat-no" title="statement not covered" > this.log('error writing data to socket',err);</span>
<span class="cstat-no" title="statement not covered" > this.publish(</span>
'error',
@ -1231,7 +1243,7 @@ module.exports=Server;
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -144,31 +144,31 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -185,9 +185,9 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -195,7 +195,7 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
@ -283,7 +283,7 @@ module.exports=Defaults;
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">9.09% </span>
<span class="strong">85.71% </span>
<span class="quiet">Statements</span>
<span class='fraction'>1/11</span>
<span class='fraction'>12/14</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="strong">55.56% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/9</span>
<span class='fraction'>5/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/3</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">9.09% </span>
<span class="strong">85.71% </span>
<span class="quiet">Lines</span>
<span class='fraction'>1/11</span>
<span class='fraction'>12/14</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
@ -75,72 +75,66 @@
30
31
32
33
34
35</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
33</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9×</span>
<span class="cline-any cline-yes">9×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">9×</span>
<span class="cline-any cline-yes">9×</span>
<span class="cline-any cline-yes">9×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
&nbsp;
const Defaults = require('./Defaults.js');
&nbsp;
class Parser{
constructor<span class="fstat-no" title="function not covered" >(config){</span>
<span class="cstat-no" title="statement not covered" > Object.assign(</span>
this,
{
parse : parseDataEvents,
format : formatData,
delimiter : config.delimiter||'\f'
constructor(config){
if(!config){
config=new Defaults;
}
);
this.delimiter=config.delimiter;
}
&nbsp;
formatData<span class="fstat-no" title="function not covered" >(message){</span>
<span class="cstat-no" title="statement not covered" > if(!message.data &amp;&amp; message.data!==false &amp;&amp; message.data!==0){</span>
format(message){
<span class="missing-if-branch" title="if path not taken" >I</span>if(!message.data &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >message.data!==false </span>&amp;&amp; <span class="branch-2 cbranch-no" title="branch not covered" >message.data!==0)</span>{
<span class="cstat-no" title="statement not covered" > message.data={};</span>
}
<span class="cstat-no" title="statement not covered" > if(message.data['_maxListeners']){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(message.data['_maxListeners']){
<span class="cstat-no" title="statement not covered" > message.data={};</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > message=message.JSON+parser.delimiter;</span>
<span class="cstat-no" title="statement not covered" > return message;</span>
message=message.JSON+this.delimiter;
return message;
}
&nbsp;
parseDataEvents<span class="fstat-no" title="function not covered" >(data){</span>
<span class="cstat-no" title="statement not covered" > let events=data.split(parser.delimiter);</span>
<span class="cstat-no" title="statement not covered" > events.pop();</span>
<span class="cstat-no" title="statement not covered" > return events;</span>
parse(data){
let events=data.split(this.delimiter);
events.pop();
return events;
}
}
&nbsp;
@ -151,7 +145,7 @@ module.exports=Parser;
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">71.05% </span>
<span class="strong">92.68% </span>
<span class="quiet">Statements</span>
<span class='fraction'>27/38</span>
<span class='fraction'>38/41</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">25% </span>
<span class="strong">56.25% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/16</span>
<span class='fraction'>9/16</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">40% </span>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/5</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">71.05% </span>
<span class="strong">92.68% </span>
<span class="quiet">Lines</span>
<span class='fraction'>27/38</span>
<span class='fraction'>38/41</span>
</div>
</div>
</div>
<div class='status-line medium'></div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
@ -72,16 +72,16 @@
</tr>
<tr>
<td class="file low" data-value="EventParser.js"><a href="EventParser.js.html">EventParser.js</a></td>
<td data-value="9.09" class="pic low"><div class="chart"><div class="cover-fill" style="width: 9%;"></div><div class="cover-empty" style="width:91%;"></div></div></td>
<td data-value="9.09" class="pct low">9.09%</td>
<td data-value="11" class="abs low">1/11</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="9" class="abs low">0/9</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="3" class="abs low">0/3</td>
<td data-value="9.09" class="pct low">9.09%</td>
<td data-value="11" class="abs low">1/11</td>
<td class="file high" data-value="EventParser.js"><a href="EventParser.js.html">EventParser.js</a></td>
<td data-value="85.71" class="pic high"><div class="chart"><div class="cover-fill" style="width: 85%;"></div><div class="cover-empty" style="width:15%;"></div></div></td>
<td data-value="85.71" class="pct high">85.71%</td>
<td data-value="14" class="abs high">12/14</td>
<td data-value="55.56" class="pct medium">55.56%</td>
<td data-value="9" class="abs medium">5/9</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="85.71" class="pct high">85.71%</td>
<td data-value="14" class="abs high">12/14</td>
</tr>
</tbody>
@ -90,7 +90,7 @@
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -77,7 +77,7 @@
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>

View file

@ -112,7 +112,7 @@ module.exports=new IPCModule;
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">28.15% </span>
<span class="strong">65.93% </span>
<span class="quiet">Statements</span>
<span class='fraction'>38/135</span>
<span class='fraction'>89/135</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">17.57% </span>
<span class="strong">60.81% </span>
<span class="quiet">Branches</span>
<span class='fraction'>13/74</span>
<span class='fraction'>45/74</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="strong">87.5% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/8</span>
<span class='fraction'>7/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">28.15% </span>
<span class="strong">65.93% </span>
<span class="quiet">Lines</span>
<span class='fraction'>38/135</span>
<span class='fraction'>89/135</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
@ -445,18 +445,18 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">27×</span>
<span class="cline-any cline-yes">116×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27×</span>
<span class="cline-any cline-yes">116×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27×</span>
<span class="cline-any cline-yes">89×</span>
<span class="cline-any cline-yes">83×</span>
<span class="cline-any cline-yes">116×</span>
<span class="cline-any cline-yes">370×</span>
<span class="cline-any cline-yes">336×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">34×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -465,53 +465,53 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27×</span>
<span class="cline-any cline-yes">116×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -522,93 +522,93 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -616,7 +616,7 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -625,7 +625,7 @@
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -638,34 +638,47 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -674,28 +687,15 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -708,14 +708,14 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
@ -825,12 +825,12 @@ function disconnect(id){
delete this.of[id];
}
&nbsp;
<span class="fstat-no" title="function not covered" >function serve(path,callback){</span>
<span class="cstat-no" title="statement not covered" > if(typeof path=='function'){</span>
function serve(path,callback){
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof path=='function'){
<span class="cstat-no" title="statement not covered" > callback=path;</span>
<span class="cstat-no" title="statement not covered" > path=false;</span>
}
<span class="cstat-no" title="statement not covered" > if(!path){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(!path){
<span class="cstat-no" title="statement not covered" > this.log(</span>
'Server path not specified, so defaulting to'.notice,
'ipc.config.socketRoot + ipc.config.appspace + ipc.config.id'.variable,
@ -839,17 +839,17 @@ function disconnect(id){
<span class="cstat-no" title="statement not covered" > path=this.config.socketRoot+this.config.appspace+this.config.id;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!callback){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(!callback){
<span class="cstat-no" title="statement not covered" > callback=emptyCallback;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server=new Server(</span>
this.server=new Server(
path,
this.config,
log
);
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
this.server.on(
'start',
callback
);
@ -859,78 +859,78 @@ function disconnect(id){
//Do Nothing
}
&nbsp;
<span class="fstat-no" title="function not covered" >function serveNet(host,port,UDPType,callback){</span>
<span class="cstat-no" title="statement not covered" > if(typeof host=='number'){</span>
<span class="cstat-no" title="statement not covered" > callback=UDPType;</span>
<span class="cstat-no" title="statement not covered" > UDPType=port;</span>
<span class="cstat-no" title="statement not covered" > port=host;</span>
<span class="cstat-no" title="statement not covered" > host=false;</span>
function serveNet(host,port,UDPType,callback){
if(typeof host=='number'){
callback=UDPType;
UDPType=port;
port=host;
host=false;
}
<span class="cstat-no" title="statement not covered" > if(typeof host=='function'){</span>
<span class="cstat-no" title="statement not covered" > callback=host;</span>
<span class="cstat-no" title="statement not covered" > UDPType=false;</span>
<span class="cstat-no" title="statement not covered" > host=false;</span>
<span class="cstat-no" title="statement not covered" > port=false;</span>
if(typeof host=='function'){
callback=host;
UDPType=false;
host=false;
port=false;
}
<span class="cstat-no" title="statement not covered" > if(!host){</span>
<span class="cstat-no" title="statement not covered" > this.log(</span>
if(!host){
this.log(
'Server host not specified, so defaulting to'.notice,
'ipc.config.networkHost'.variable,
this.config.networkHost.data
);
<span class="cstat-no" title="statement not covered" > host=this.config.networkHost;</span>
host=this.config.networkHost;
}
<span class="cstat-no" title="statement not covered" > if(host.toLowerCase()=='udp4' || host.toLowerCase()=='udp6'){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(host.toLowerCase()=='udp4' || host.toLowerCase()=='udp6'){
<span class="cstat-no" title="statement not covered" > callback=port;</span>
<span class="cstat-no" title="statement not covered" > UDPType=host.toLowerCase();</span>
<span class="cstat-no" title="statement not covered" > port=false;</span>
<span class="cstat-no" title="statement not covered" > host=this.config.networkHost;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(typeof port=='string'){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof port=='string'){
<span class="cstat-no" title="statement not covered" > callback=UDPType;</span>
<span class="cstat-no" title="statement not covered" > UDPType=port;</span>
<span class="cstat-no" title="statement not covered" > port=false;</span>
}
<span class="cstat-no" title="statement not covered" > if(typeof port=='function'){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof port=='function'){
<span class="cstat-no" title="statement not covered" > callback=port;</span>
<span class="cstat-no" title="statement not covered" > UDPType=false;</span>
<span class="cstat-no" title="statement not covered" > port=false;</span>
}
<span class="cstat-no" title="statement not covered" > if(!port){</span>
<span class="cstat-no" title="statement not covered" > this.log(</span>
if(!port){
this.log(
'Server port not specified, so defaulting to'.notice,
'ipc.config.networkPort'.variable,
this.config.networkPort
);
<span class="cstat-no" title="statement not covered" > port=this.config.networkPort;</span>
port=this.config.networkPort;
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(typeof UDPType=='function'){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof UDPType=='function'){
<span class="cstat-no" title="statement not covered" > callback=UDPType;</span>
<span class="cstat-no" title="statement not covered" > UDPType=false;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(!callback){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(!callback){
<span class="cstat-no" title="statement not covered" > callback=emptyCallback;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server=new Server(</span>
this.server=new Server(
host,
this.config,
log,
port
);
&nbsp;
<span class="cstat-no" title="statement not covered" > if(UDPType){</span>
<span class="cstat-no" title="statement not covered" > this.server[UDPType]=true;</span>
<span class="cstat-no" title="statement not covered" > if(UDPType === "udp4" &amp;&amp; host === "::1") {</span>
if(UDPType){
this.server[UDPType]=true;
<span class="missing-if-branch" title="if path not taken" >I</span>if(UDPType === "udp4" &amp;&amp; host === "::1") {
// bind udp4 socket to an ipv4 address
<span class="cstat-no" title="statement not covered" > this.server.path = "127.0.0.1";</span>
}
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
this.server.on(
'start',
callback
);
@ -985,38 +985,38 @@ function connect(id,path,callback){
callback(this);
}
&nbsp;
<span class="fstat-no" title="function not covered" >function connectNet(id,host,port,callback){</span>
<span class="cstat-no" title="statement not covered" > if(!id){</span>
function connectNet(id,host,port,callback){
<span class="missing-if-branch" title="if path not taken" >I</span>if(!id){
<span class="cstat-no" title="statement not covered" > this.log(</span>
'Service id required'.warn,
'Requested service connection without specifying service id. Aborting connection attempt'.notice
);
<span class="cstat-no" title="statement not covered" > return;</span>
}
<span class="cstat-no" title="statement not covered" > if(typeof host=='number'){</span>
<span class="cstat-no" title="statement not covered" > callback=port;</span>
<span class="cstat-no" title="statement not covered" > port=host;</span>
<span class="cstat-no" title="statement not covered" > host=false;</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if(typeof host=='number'){
callback=port;
port=host;
host=false;
}
<span class="cstat-no" title="statement not covered" > if(typeof host=='function'){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof host=='function'){
<span class="cstat-no" title="statement not covered" > callback=host;</span>
<span class="cstat-no" title="statement not covered" > host=false;</span>
<span class="cstat-no" title="statement not covered" > port=false;</span>
}
<span class="cstat-no" title="statement not covered" > if(!host){</span>
<span class="cstat-no" title="statement not covered" > this.log(</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if(!host){
this.log(
'Server host not specified, so defaulting to'.notice,
'ipc.config.networkHost'.variable,
this.config.networkHost.data
);
<span class="cstat-no" title="statement not covered" > host=this.config.networkHost;</span>
host=this.config.networkHost;
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(typeof port=='function'){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof port=='function'){
<span class="cstat-no" title="statement not covered" > callback=port;</span>
<span class="cstat-no" title="statement not covered" > port=false;</span>
}
<span class="cstat-no" title="statement not covered" > if(!port){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(!port){
<span class="cstat-no" title="statement not covered" > this.log(</span>
'Server port not specified, so defaulting to'.notice,
'ipc.config.networkPort'.variable,
@ -1025,15 +1025,15 @@ function connect(id,path,callback){
<span class="cstat-no" title="statement not covered" > port=this.config.networkPort;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(typeof callback == 'string'){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof callback == 'string'){
<span class="cstat-no" title="statement not covered" > UDPType=callback;</span>
<span class="cstat-no" title="statement not covered" > callback=false;</span>
}
<span class="cstat-no" title="statement not covered" > if(!callback){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(!callback){
<span class="cstat-no" title="statement not covered" > callback=emptyCallback;</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > if(this.of[id]){</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.of[id]){
<span class="cstat-no" title="statement not covered" > if(!this.of[id].socket.destroyed){</span>
<span class="cstat-no" title="statement not covered" > this.log(</span>
'Already Connected to'.notice,
@ -1046,14 +1046,14 @@ function connect(id,path,callback){
<span class="cstat-no" title="statement not covered" > this.of[id].socket.destroy();</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > this.of[id] = new Client(this.config,this.log);</span>
<span class="cstat-no" title="statement not covered" > this.of[id].id = id;</span>
<span class="cstat-no" title="statement not covered" > this.of[id].path = host;</span>
<span class="cstat-no" title="statement not covered" > this.of[id].port = port;</span>
this.of[id] = new Client(this.config,this.log);
this.of[id].id = id;
this.of[id].path = host;
this.of[id].port = port;
&nbsp;
<span class="cstat-no" title="statement not covered" > this.of[id].connect();</span>
this.of[id].connect();
&nbsp;
<span class="cstat-no" title="statement not covered" > callback(this);</span>
callback(this);
}
&nbsp;
module.exports=IPC;
@ -1063,7 +1063,7 @@ module.exports=IPC;
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">28.15% </span>
<span class="strong">65.93% </span>
<span class="quiet">Statements</span>
<span class='fraction'>38/135</span>
<span class='fraction'>89/135</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">17.57% </span>
<span class="strong">60.81% </span>
<span class="quiet">Branches</span>
<span class='fraction'>13/74</span>
<span class='fraction'>45/74</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="strong">87.5% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/8</span>
<span class='fraction'>7/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">28.15% </span>
<span class="strong">65.93% </span>
<span class="quiet">Lines</span>
<span class='fraction'>38/135</span>
<span class='fraction'>89/135</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<div class='status-line medium'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
@ -59,16 +59,16 @@
</tr>
</thead>
<tbody><tr>
<td class="file low" data-value="IPC.js"><a href="IPC.js.html">IPC.js</a></td>
<td data-value="28.15" class="pic low"><div class="chart"><div class="cover-fill" style="width: 28%;"></div><div class="cover-empty" style="width:72%;"></div></div></td>
<td data-value="28.15" class="pct low">28.15%</td>
<td data-value="135" class="abs low">38/135</td>
<td data-value="17.57" class="pct low">17.57%</td>
<td data-value="74" class="abs low">13/74</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="8" class="abs medium">4/8</td>
<td data-value="28.15" class="pct low">28.15%</td>
<td data-value="135" class="abs low">38/135</td>
<td class="file medium" data-value="IPC.js"><a href="IPC.js.html">IPC.js</a></td>
<td data-value="65.93" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 65%;"></div><div class="cover-empty" style="width:35%;"></div></div></td>
<td data-value="65.93" class="pct medium">65.93%</td>
<td data-value="135" class="abs medium">89/135</td>
<td data-value="60.81" class="pct medium">60.81%</td>
<td data-value="74" class="abs medium">45/74</td>
<td data-value="87.5" class="pct high">87.5%</td>
<td data-value="8" class="abs high">7/8</td>
<td data-value="65.93" class="pct medium">65.93%</td>
<td data-value="135" class="abs medium">89/135</td>
</tr>
</tbody>
@ -77,7 +77,7 @@
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 22:16:06 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

File diff suppressed because it is too large Load diff