This commit is contained in:
SSMP 2016-08-12 15:25:49 -07:00
parent df8c3c0d90
commit 028e597a9b
15 changed files with 208 additions and 89 deletions

View file

@ -1,6 +1,6 @@
{
"name": "node-ipc",
"version": "8.1.0",
"version": "8.1.1",
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",
"main": "node-ipc.js",
"directories": {
@ -11,10 +11,10 @@
},
"dependencies": {
"colors": "*",
"event-pubsub": "^2.0.0",
"js-message": "*",
"js-queue": "^0.1.2",
"node-cmd": "*"
"event-pubsub": ">=2.1.2",
"js-message": ">=1.0.5",
"js-queue": ">=1.0.0",
"node-cmd": ">=1.1.1"
},
"devDependencies": {
"blanket": "^1.2.1",

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,10 +166,13 @@ 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) }
.medium .chart { border:1px solid #666; }
.medium .cover-fill { background: #666; }
/* 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; }
.cbranch-no { background: yellow !important; color: #111; }
@ -177,8 +180,6 @@ table.coverage td span.cline-any {
.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,24 +20,24 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">67.24% </span>
<span class="strong">67.48% </span>
<span class="quiet">Statements</span>
<span class='fraction'>273/406</span>
<span class='fraction'>278/412</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">56.19% </span>
<span class="strong">56.28% </span>
<span class="quiet">Branches</span>
<span class='fraction'>118/210</span>
<span class='fraction'>121/215</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="strong">87.8% </span>
<span class="quiet">Functions</span>
<span class='fraction'>35/40</span>
<span class='fraction'>36/41</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">67.24% </span>
<span class="strong">67.48% </span>
<span class="quiet">Lines</span>
<span class='fraction'>273/406</span>
<span class='fraction'>278/412</span>
</div>
</div>
</div>
@ -86,15 +86,15 @@
<tr>
<td class="file high" data-value="node-ipc/entities/"><a href="node-ipc/entities/index.html">node-ipc/entities/</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="90" class="pic high"><div class="chart"><div class="cover-fill" style="width: 90%;"></div><div class="cover-empty" style="width:10%;"></div></div></td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="57.14" class="pct medium">57.14%</td>
<td data-value="7" class="abs medium">4/7</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="2" class="abs medium">1/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
</tr>
<tr>
@ -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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 GMT-0700 (PDT)
</div>
</div>
<script src="prettify.js"></script>

View file

@ -739,7 +739,7 @@ module.exports=init;
</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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -130,7 +130,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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -103,7 +103,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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -1171,7 +1171,7 @@ module.exports=init;
</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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,24 +20,24 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">90% </span>
<span class="quiet">Statements</span>
<span class='fraction'>4/4</span>
<span class='fraction'>9/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="strong">57.14% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/2</span>
<span class='fraction'>4/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">90% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/4</span>
<span class='fraction'>9/10</span>
</div>
</div>
</div>
@ -147,13 +147,61 @@
102
103
104
105</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140</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-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">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">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-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>
@ -248,18 +296,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">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-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">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-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-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></td><td class="text"><pre class="prettyprint lang-js">'use strict';
&nbsp;
/*eslint no-magic-numbers: ["error", { "ignore": [ 0] }]*/
&nbsp;
/**
* @module entities
*/
&nbsp;
const os = require('os');
&nbsp;
/**
* @class Defaults
* @description Defaults Entity
*/
class Defaults{
&nbsp;
/**
* @constructor
* @method constructor
* @return {void}
*/
constructor(){
const IPType=os.networkInterfaces()[
Object.keys(os.networkInterfaces())[0]
][0].family;
&nbsp;
Object.defineProperties(
this,
@ -277,7 +360,7 @@ class Defaults{
networkHost : {
enumerable:true,
writable:true,
value:(IPType=='IPv6')? <span class="branch-0 cbranch-no" title="branch not covered" >'::1' </span>: '127.0.0.1'
value: ''
},
networkPort : {
enumerable:true,
@ -342,7 +425,7 @@ class Defaults{
IPType : {
enumerable:true,
writable:true,
value:IPType
value: getIPType()
},
tls : {
enumerable:true,
@ -351,9 +434,31 @@ class Defaults{
}
}
);
&nbsp;
this.networkHost = (this.IPType == 'IPv6') ? <span class="branch-0 cbranch-no" title="branch not covered" >'::1' </span>: '127.0.0.1';
}
}
&nbsp;
/**
* method to get ip type
*
* @method getIPType
* @return {string} ip type
*/
function getIPType() {
const networkInterfaces = os.networkInterfaces();
let IPType = '';
<span class="missing-if-branch" title="if path not taken" >I</span>if (networkInterfaces
&amp;&amp; Array.isArray(networkInterfaces)
&amp;&amp; <span class="branch-2 cbranch-no" title="branch not covered" >networkInterfaces.length &gt; 0)</span> {
// getting the family of first network interface available
<span class="cstat-no" title="statement not covered" > IPType = networkInterfaces [</span>
Object.keys( networkInterfaces )[0]
][0].family;
}
return IPType;
}
&nbsp;
module.exports=Defaults;
&nbsp;</pre></td></tr>
</table></pre>
@ -361,7 +466,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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,24 +20,24 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">90% </span>
<span class="quiet">Statements</span>
<span class='fraction'>4/4</span>
<span class='fraction'>9/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="strong">57.14% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/2</span>
<span class='fraction'>4/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">90% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/4</span>
<span class='fraction'>9/10</span>
</div>
</div>
</div>
@ -60,15 +60,15 @@
</thead>
<tbody><tr>
<td class="file high" data-value="Defaults.js"><a href="Defaults.js.html">Defaults.js</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="90" class="pic high"><div class="chart"><div class="cover-fill" style="width: 90%;"></div><div class="cover-empty" style="width:10%;"></div></div></td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="57.14" class="pct medium">57.14%</td>
<td data-value="7" class="abs medium">4/7</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="2" class="abs medium">1/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>

View file

@ -815,7 +815,7 @@ function disconnect(id){
&nbsp;
this.of[id].explicitlyDisconnected=true;
&nbsp;
this.of[id].off('*');
this.of[id].off('*','*');
<span class="missing-if-branch" title="else path not taken" >E</span>if(this.of[id].socket){
<span class="missing-if-branch" title="else path not taken" >E</span>if(this.of[id].socket.destroy){
this.of[id].socket.destroy();
@ -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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 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 Thu Jul 14 2016 16:03:57 GMT-0700 (PDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Aug 12 2016 15:23:14 GMT-0700 (PDT)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -1,5 +1,5 @@
TN:
SF:/home/bmiller/git/node-ipc/node-ipc.js
SF:/home/ssmp/git/node-ipc/node-ipc.js
FN:6,(anonymous_1)
FNF:1
FNH:1
@ -14,7 +14,7 @@ BRF:0
BRH:0
end_of_record
TN:
SF:/home/bmiller/git/node-ipc/services/IPC.js
SF:/home/ssmp/git/node-ipc/services/IPC.js
FN:9,(anonymous_1)
FN:64,log
FN:90,disconnect
@ -248,24 +248,37 @@ BRF:74
BRH:45
end_of_record
TN:
SF:/home/bmiller/git/node-ipc/entities/Defaults.js
FN:6,(anonymous_1)
FNF:1
FNH:1
SF:/home/ssmp/git/node-ipc/entities/Defaults.js
FN:22,(anonymous_1)
FN:125,getIPType
FNF:2
FNH:2
FNDA:1,(anonymous_1)
DA:3,1
DA:7,1
DA:11,1
DA:104,1
LF:4
LH:4
BRDA:27,1,0,0
BRDA:27,1,1,1
BRF:2
BRH:1
FNDA:1,getIPType
DA:9,1
DA:24,1
DA:115,1
DA:125,1
DA:126,1
DA:127,1
DA:128,1
DA:132,0
DA:136,1
DA:139,1
LF:10
LH:9
BRDA:115,1,0,0
BRDA:115,1,1,1
BRDA:128,2,0,0
BRDA:128,2,1,1
BRDA:128,3,0,1
BRDA:128,3,1,1
BRDA:128,3,2,0
BRF:7
BRH:4
end_of_record
TN:
SF:/home/bmiller/git/node-ipc/dao/client.js
SF:/home/ssmp/git/node-ipc/dao/client.js
FN:11,init
FN:28,emit
FN:51,syncEmit
@ -431,7 +444,7 @@ BRF:41
BRH:21
end_of_record
TN:
SF:/home/bmiller/git/node-ipc/dao/eventParser.js
SF:/home/ssmp/git/node-ipc/dao/eventParser.js
FN:9,formatData
FN:21,parseDataEvents
FNF:2
@ -464,7 +477,7 @@ BRF:7
BRH:3
end_of_record
TN:
SF:/home/bmiller/git/node-ipc/dao/socketServer.js
SF:/home/ssmp/git/node-ipc/dao/socketServer.js
FN:11,emit
FN:43,broadcast
FN:66,init